Skip to content

Commit

Permalink
Automatic update of widgets, themes and modules
Browse files Browse the repository at this point in the history
  • Loading branch information
uicontent committed Nov 8, 2022
1 parent 2a793b1 commit 47dd63f
Show file tree
Hide file tree
Showing 3,654 changed files with 135,942 additions and 5,272 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Binary file modified StarterApp_NativeMobile.mpr
Binary file not shown.
74 changes: 37 additions & 37 deletions javascriptsource/nanoflowcommons/actions/CallPhoneNumber.js
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the code between BEGIN USER CODE and END USER CODE
// Other code you write will be lost the next time you deploy the project.
/**
* @param {string} phoneNumber - This field is required.
* @returns {Promise.<boolean>}
*/
async function CallPhoneNumber(phoneNumber) {
// BEGIN USER CODE
if (!phoneNumber) {
return Promise.reject(new Error("Input parameter 'Phone number' is required"));
}
const url = `tel:${encodeURI(phoneNumber)}`;
// Native platform
if (navigator && navigator.product === "ReactNative") {
const Linking = require("react-native").Linking;
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return false;
}
return Linking.openURL(url).then(() => true);
});
}
// Hybrid platform
if (window && window.cordova) {
window.open(url, "_system");
return Promise.resolve(true);
}
// Web platform
if (window) {
window.location.href = url;
return Promise.resolve(true);
}
return Promise.resolve(false);
// END USER CODE
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the code between BEGIN USER CODE and END USER CODE
// Other code you write will be lost the next time you deploy the project.
/**
* @param {string} phoneNumber - This field is required.
* @returns {Promise.<boolean>}
*/
async function CallPhoneNumber(phoneNumber) {
// BEGIN USER CODE
if (!phoneNumber) {
return Promise.reject(new Error("Input parameter 'Phone number' is required"));
}
const url = `tel:${encodeURI(phoneNumber)}`;
// Native platform
if (navigator && navigator.product === "ReactNative") {
const Linking = require("react-native").Linking;
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return false;
}
return Linking.openURL(url).then(() => true);
});
}
// Hybrid platform
if (window && window.cordova) {
window.open(url, "_system");
return Promise.resolve(true);
}
// Web platform
if (window) {
window.location.href = url;
return Promise.resolve(true);
}
return Promise.resolve(false);
// END USER CODE
}

export { CallPhoneNumber };
112 changes: 56 additions & 56 deletions javascriptsource/nanoflowcommons/actions/DraftEmail.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,59 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the code between BEGIN USER CODE and END USER CODE
// Other code you write will be lost the next time you deploy the project.
/**
* Start drafting an email in the platform specified email client. This might work differently for each user depending on their platform and local configuration.
* @param {string} recipient - The recipient, or recipients, separated by comma's.
* @param {string} cc - The Carbon Copy recipient, or recipients, separated by comma's.
* @param {string} bcc - The Blind Carbon Copy recipient, or recipients, separated by comma's.
* @param {string} subject
* @param {string} body
* @returns {Promise.<boolean>}
*/
async function DraftEmail(recipient, cc, bcc, subject, body) {
// BEGIN USER CODE
let url = "mailto:";
if (recipient) {
url += `${encodeURI(recipient)}?`;
}
if (cc) {
url += `cc=${encodeURIComponent(cc)}&`;
}
if (bcc) {
url += `bcc=${encodeURIComponent(bcc)}&`;
}
if (subject) {
url += `subject=${encodeURIComponent(subject)}&`;
}
if (body) {
url += `body=${encodeURIComponent(body)}&`;
}
// Remove the last '?' or '&'
url = url.slice(0, -1);
// Native platform
if (navigator && navigator.product === "ReactNative") {
const Linking = require("react-native").Linking;
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return false;
}
return Linking.openURL(url).then(() => true);
});
}
// Hybrid platform
if (window && window.cordova) {
window.open(url, "_system");
return Promise.resolve(true);
}
// Web platform
if (window) {
window.location.href = url;
return Promise.resolve(true);
}
return Promise.resolve(false);
// END USER CODE
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the code between BEGIN USER CODE and END USER CODE
// Other code you write will be lost the next time you deploy the project.
/**
* Start drafting an email in the platform specified email client. This might work differently for each user depending on their platform and local configuration.
* @param {string} recipient - The recipient, or recipients, separated by comma's.
* @param {string} cc - The Carbon Copy recipient, or recipients, separated by comma's.
* @param {string} bcc - The Blind Carbon Copy recipient, or recipients, separated by comma's.
* @param {string} subject
* @param {string} body
* @returns {Promise.<boolean>}
*/
async function DraftEmail(recipient, cc, bcc, subject, body) {
// BEGIN USER CODE
let url = "mailto:";
if (recipient) {
url += `${encodeURI(recipient)}?`;
}
if (cc) {
url += `cc=${encodeURIComponent(cc)}&`;
}
if (bcc) {
url += `bcc=${encodeURIComponent(bcc)}&`;
}
if (subject) {
url += `subject=${encodeURIComponent(subject)}&`;
}
if (body) {
url += `body=${encodeURIComponent(body)}&`;
}
// Remove the last '?' or '&'
url = url.slice(0, -1);
// Native platform
if (navigator && navigator.product === "ReactNative") {
const Linking = require("react-native").Linking;
return Linking.canOpenURL(url).then(supported => {
if (!supported) {
return false;
}
return Linking.openURL(url).then(() => true);
});
}
// Hybrid platform
if (window && window.cordova) {
window.open(url, "_system");
return Promise.resolve(true);
}
// Web platform
if (window) {
window.location.href = url;
return Promise.resolve(true);
}
return Promise.resolve(false);
// END USER CODE
}

export { DraftEmail };
118 changes: 60 additions & 58 deletions javascriptsource/nanoflowcommons/actions/GenerateUniqueID.js
Original file line number Diff line number Diff line change
@@ -1,61 +1,63 @@
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// BEGIN EXTRA CODE
const COUNTER_STORE = "idCounter";
let locked = false;
let currentCounter;
function sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
async function initializeCounter() {
currentCounter = JSON.parse((await getItem(COUNTER_STORE)) || "-1");
}
async function getItem(key) {
if (navigator && navigator.product === "ReactNative") {
const AsyncStorage = (await import('@react-native-community/async-storage')).default;
return AsyncStorage.getItem(key);
}
if (window) {
return window.localStorage.getItem(key);
}
throw new Error("No storage API available");
}
async function setItem(key, value) {
if (navigator && navigator.product === "ReactNative") {
const AsyncStorage = (await import('@react-native-community/async-storage')).default;
return AsyncStorage.setItem(key, value);
}
if (window) {
return window.localStorage.setItem(key, value);
}
throw new Error("No storage API available");
}
// END EXTRA CODE
/**
* Generates a unique ID based on the current session.
* @returns {Promise.<string>}
*/
async function GenerateUniqueID() {
// BEGIN USER CODE
const sessionId = mx.session.getConfig("sessionObjectId");
const rnd = Math.round(Math.random() * 10000);
// eslint-disable-next-line no-unmodified-loop-condition
while (locked) {
await sleep(10);
}
locked = true;
if (typeof currentCounter === "undefined") {
await initializeCounter();
}
await setItem(COUNTER_STORE, JSON.stringify(++currentCounter));
locked = false;
return `${sessionId}:${currentCounter}:${rnd}`;
// END USER CODE
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
// BEGIN EXTRA CODE
const COUNTER_STORE = "idCounter";
let locked = false;
let currentCounter;
function sleep(time) {
return new Promise(resolve => setTimeout(resolve, time));
}
async function initializeCounter() {
currentCounter = JSON.parse((await getItem(COUNTER_STORE)) || "-1");
}
function getItem(key) {
if (navigator && navigator.product === "ReactNative") {
const AsyncStorage = require("@react-native-community/async-storage").default;
return AsyncStorage.getItem(key);
}
if (window) {
const value = window.localStorage.getItem(key);
return Promise.resolve(value);
}
return Promise.reject(new Error("No storage API available"));
}
function setItem(key, value) {
if (navigator && navigator.product === "ReactNative") {
const AsyncStorage = require("@react-native-community/async-storage").default;
return AsyncStorage.setItem(key, value);
}
if (window) {
window.localStorage.setItem(key, value);
return Promise.resolve();
}
return Promise.reject(new Error("No storage API available"));
}
// END EXTRA CODE
/**
* Generates a unique ID based on the current session.
* @returns {Promise.<string>}
*/
async function GenerateUniqueID() {
// BEGIN USER CODE
const sessionId = mx.session.getConfig("sessionObjectId");
const rnd = Math.round(Math.random() * 10000);
// eslint-disable-next-line no-unmodified-loop-condition
while (locked) {
await sleep(10);
}
locked = true;
if (typeof currentCounter === "undefined") {
await initializeCounter();
}
await setItem(COUNTER_STORE, JSON.stringify(++currentCounter));
locked = false;
return `${sessionId}:${currentCounter}:${rnd}`;
// END USER CODE
}

export { GenerateUniqueID };
Loading

0 comments on commit 47dd63f

Please sign in to comment.