Skip to content

Commit c1dc95c

Browse files
committed
SAS-1672
- replaced CommunityCommons with 'sanitized version'
1 parent 90cb99d commit c1dc95c

File tree

306 files changed

+2123
-2107
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

306 files changed

+2123
-2107
lines changed

AI Bot Starter App.mpr

4 KB
Binary file not shown.
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import { Base64 } from 'js-base64';
2-
31
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
import { Base64 } from 'js-base64';
10+
411
// BEGIN EXTRA CODE
512
// END EXTRA CODE
13+
614
/**
715
* @param {string} base64
816
* @returns {Promise.<string>}
917
*/
10-
async function Base64Decode(base64) {
11-
// BEGIN USER CODE
18+
export async function Base64Decode(base64) {
19+
// BEGIN USER CODE
1220
return Base64.decode(base64);
13-
// END USER CODE
14-
}
15-
16-
export { Base64Decode };
21+
// END USER CODE
22+
}
Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
1-
import { Base64 } from 'js-base64';
2-
31
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
import { Base64 } from 'js-base64';
10+
411
// BEGIN EXTRA CODE
512
// END EXTRA CODE
13+
614
/**
7-
* This JS Action takes a base64 String and a System.Image, decodes the base64 String and stores the resulting image in the System.Image object
815
* @param {string} base64
916
* @param {MxObject} image
1017
* @returns {Promise.<boolean>}
1118
*/
12-
function Base64DecodeToImage(base64, image) {
13-
// BEGIN USER CODE
19+
export async function Base64DecodeToImage(base64, image) {
20+
// BEGIN USER CODE
1421
if (!base64) {
1522
throw new Error("base64 String should not be empty");
1623
}
@@ -21,7 +28,5 @@ function Base64DecodeToImage(base64, image) {
2128
return new Promise((resolve, reject) => {
2229
mx.data.saveDocument(image.getGuid(), "camera image", {}, blob, () => resolve(true), reject);
2330
});
24-
// END USER CODE
25-
}
26-
27-
export { Base64DecodeToImage };
31+
// END USER CODE
32+
}
Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,22 @@
1-
import { Base64 } from 'js-base64';
2-
31
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
import { Base64 } from 'js-base64';
10+
411
// BEGIN EXTRA CODE
512
// END EXTRA CODE
13+
614
/**
715
* @param {string} stringToEncode
816
* @returns {Promise.<string>}
917
*/
10-
async function Base64Encode(stringToEncode) {
11-
// BEGIN USER CODE
18+
export async function Base64Encode(stringToEncode) {
19+
// BEGIN USER CODE
1220
return Base64.encode(stringToEncode);
13-
// END USER CODE
14-
}
15-
16-
export { Base64Encode };
21+
// END USER CODE
22+
}

javascriptsource/nanoflowcommons/actions/CallPhoneNumber.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
1+
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
110
// BEGIN EXTRA CODE
211
// END EXTRA CODE
12+
313
/**
14+
* This action can be used to launch a phone app on the devices and initiate dialing of the specified phone number. The user has to confirm to initate the actual call.
415
* @param {string} phoneNumber - This field is required.
516
* @returns {Promise.<boolean>}
617
*/
7-
async function CallPhoneNumber(phoneNumber) {
8-
// BEGIN USER CODE
18+
export async function CallPhoneNumber(phoneNumber) {
19+
// BEGIN USER CODE
920
if (!phoneNumber) {
1021
return Promise.reject(new Error("Input parameter 'Phone number' is required"));
1122
}
@@ -31,7 +42,5 @@ async function CallPhoneNumber(phoneNumber) {
3142
return Promise.resolve(true);
3243
}
3344
return Promise.resolve(false);
34-
// END USER CODE
35-
}
36-
37-
export { CallPhoneNumber };
45+
// END USER CODE
46+
}

javascriptsource/nanoflowcommons/actions/ClearCachedSessionData.js

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,20 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
810
// BEGIN EXTRA CODE
911
// END EXTRA CODE
12+
1013
/**
14+
* Clears saved session data from the local storage for offline native and PWAs.
1115
* @returns {Promise.<void>}
1216
*/
13-
async function ClearCachedSessionData() {
14-
// BEGIN USER CODE
17+
export async function ClearCachedSessionData() {
18+
// BEGIN USER CODE
1519
if (mx.session && mx.session.clearCachedSessionData === undefined) {
1620
return Promise.reject(new Error("JS action 'Clear cached session data' is not supported prior to Mendix client v9.14"));
1721
}
1822
await mx.session.clearCachedSessionData();
19-
// END USER CODE
20-
}
21-
22-
export { ClearCachedSessionData };
23+
// END USER CODE
24+
}

javascriptsource/nanoflowcommons/actions/ClearLocalStorage.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
810
// BEGIN EXTRA CODE
911
// END EXTRA CODE
12+
1013
/**
1114
* @returns {Promise.<boolean>}
1215
*/
13-
async function ClearLocalStorage() {
14-
// BEGIN USER CODE
16+
export async function ClearLocalStorage() {
17+
// BEGIN USER CODE
1518
try {
1619
localStorage.clear();
1720
return true;
@@ -20,7 +23,5 @@ async function ClearLocalStorage() {
2023
console.error(e);
2124
return false;
2225
}
23-
// END USER CODE
24-
}
25-
26-
export { ClearLocalStorage };
26+
// END USER CODE
27+
}

javascriptsource/nanoflowcommons/actions/DraftEmail.js

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
// This file was generated by Mendix Studio Pro.
2+
//
3+
// WARNING: Only the following code will be retained when actions are regenerated:
4+
// - the import list
5+
// - the code between BEGIN USER CODE and END USER CODE
6+
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
7+
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
110
// BEGIN EXTRA CODE
211
// END EXTRA CODE
12+
313
/**
414
* Start drafting an email in the platform specified email client. This might work differently for each user depending on their platform and local configuration.
515
* @param {string} recipient - The recipient, or recipients, separated by comma's.
@@ -9,8 +19,8 @@
919
* @param {string} body
1020
* @returns {Promise.<boolean>}
1121
*/
12-
async function DraftEmail(recipient, cc, bcc, subject, body) {
13-
// BEGIN USER CODE
22+
export async function DraftEmail(recipient, cc, bcc, subject, body) {
23+
// BEGIN USER CODE
1424
let url = "mailto:";
1525
if (recipient) {
1626
url += `${encodeURI(recipient)}?`;
@@ -50,7 +60,5 @@ async function DraftEmail(recipient, cc, bcc, subject, body) {
5060
return Promise.resolve(true);
5161
}
5262
return Promise.resolve(false);
53-
// END USER CODE
54-
}
55-
56-
export { DraftEmail };
63+
// END USER CODE
64+
}

javascriptsource/nanoflowcommons/actions/FindObjectWithGUID.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
810
// BEGIN EXTRA CODE
911
// END EXTRA CODE
12+
1013
/**
1114
* @param {MxObject[]} list
1215
* @param {string} objectGUID
1316
* @returns {Promise.<MxObject>}
1417
*/
15-
async function FindObjectWithGUID(list, objectGUID) {
16-
// BEGIN USER CODE
18+
export async function FindObjectWithGUID(list, objectGUID) {
19+
// BEGIN USER CODE
1720
return list.find(element => element.getGuid() === objectGUID);
18-
// END USER CODE
19-
}
20-
21-
export { FindObjectWithGUID };
21+
// END USER CODE
22+
}

javascriptsource/nanoflowcommons/actions/GenerateUniqueID.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
// - the code between BEGIN USER CODE and END USER CODE
66
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
77
// Other code you write will be lost the next time you deploy the project.
8+
import { Big } from "big.js";
9+
810
// BEGIN EXTRA CODE
911
const COUNTER_STORE = "idCounter";
1012
let locked = false;
@@ -36,12 +38,13 @@ async function setItem(key, value) {
3638
throw new Error("No storage API available");
3739
}
3840
// END EXTRA CODE
41+
3942
/**
4043
* Generates a unique ID based on the current session.
4144
* @returns {Promise.<string>}
4245
*/
43-
async function GenerateUniqueID() {
44-
// BEGIN USER CODE
46+
export async function GenerateUniqueID() {
47+
// BEGIN USER CODE
4548
const sessionId = mx.session.getConfig("sessionObjectId");
4649
const rnd = Math.round(Math.random() * 10000);
4750
// eslint-disable-next-line no-unmodified-loop-condition
@@ -55,7 +58,5 @@ async function GenerateUniqueID() {
5558
await setItem(COUNTER_STORE, JSON.stringify(++currentCounter));
5659
locked = false;
5760
return `${sessionId}:${currentCounter}:${rnd}`;
58-
// END USER CODE
59-
}
60-
61-
export { GenerateUniqueID };
61+
// END USER CODE
62+
}

0 commit comments

Comments
 (0)