forked from simonmartyr/MxPushNotifications
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #106 from mendix/release/7.1.2
Update module and test project to v7.1.2
- Loading branch information
Showing
88 changed files
with
1,663 additions
and
810 deletions.
There are no files selected for viewing
Binary file not shown.
22 changes: 22 additions & 0 deletions
22
test/javascriptsource/nanoflowcommons/actions/Base64Decode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
import { Base64 } from 'js-base64'; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* @param {string} base64 | ||
* @returns {Promise.<string>} | ||
*/ | ||
export async function Base64Decode(base64) { | ||
// BEGIN USER CODE | ||
return Base64.decode(base64); | ||
// END USER CODE | ||
} |
32 changes: 32 additions & 0 deletions
32
test/javascriptsource/nanoflowcommons/actions/Base64DecodeToImage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
import { Base64 } from 'js-base64'; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* @param {string} base64 | ||
* @param {MxObject} image | ||
* @returns {Promise.<boolean>} | ||
*/ | ||
export async function Base64DecodeToImage(base64, image) { | ||
// BEGIN USER CODE | ||
if (!base64) { | ||
throw new Error("base64 String should not be empty"); | ||
} | ||
if (!image) { | ||
throw new Error("image should not be null"); | ||
} | ||
const blob = new Blob([Base64.toUint8Array(base64)], { type: "image/png" }); | ||
return new Promise((resolve, reject) => { | ||
mx.data.saveDocument(image.getGuid(), "camera image", {}, blob, () => resolve(true), reject); | ||
}); | ||
// END USER CODE | ||
} |
22 changes: 22 additions & 0 deletions
22
test/javascriptsource/nanoflowcommons/actions/Base64Encode.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
import { Base64 } from 'js-base64'; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* @param {string} string | ||
* @returns {Promise.<string>} | ||
*/ | ||
export async function Base64Encode(string) { | ||
// BEGIN USER CODE | ||
return Base64.encode(string); | ||
// END USER CODE | ||
} |
24 changes: 24 additions & 0 deletions
24
test/javascriptsource/nanoflowcommons/actions/ClearCachedSessionData.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* Clears saved session data from the local storage for offline native and PWAs. | ||
* @returns {Promise.<void>} | ||
*/ | ||
export async function ClearCachedSessionData() { | ||
// BEGIN USER CODE | ||
if (mx.session && mx.session.clearCachedSessionData === undefined) { | ||
return Promise.reject(new Error("JS action 'Clear cached session data' is not supported prior to Mendix client v9.14")); | ||
} | ||
await mx.session.clearCachedSessionData(); | ||
// END USER CODE | ||
} |
27 changes: 27 additions & 0 deletions
27
test/javascriptsource/nanoflowcommons/actions/ClearLocalStorage.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* @returns {Promise.<boolean>} | ||
*/ | ||
export async function ClearLocalStorage() { | ||
// BEGIN USER CODE | ||
try { | ||
localStorage.clear(); | ||
return true; | ||
} | ||
catch (e) { | ||
console.error(e); | ||
return false; | ||
} | ||
// END USER CODE | ||
} |
22 changes: 22 additions & 0 deletions
22
test/javascriptsource/nanoflowcommons/actions/FindObjectWithGUID.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// 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. | ||
import { Big } from "big.js"; | ||
|
||
// BEGIN EXTRA CODE | ||
// END EXTRA CODE | ||
|
||
/** | ||
* @param {MxObject[]} list | ||
* @param {string} objectGUID | ||
* @returns {Promise.<MxObject>} | ||
*/ | ||
export async function FindObjectWithGUID(list, objectGUID) { | ||
// BEGIN USER CODE | ||
return list.find(element => element.getGuid() === objectGUID); | ||
// END USER CODE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
test/javascriptsource/nanoflowcommons/actions/GenerateUniqueID.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"nativeDependencies": { | ||
"@react-native-community/async-storage": "1.12.1" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
test/javascriptsource/nanoflowcommons/actions/GetCurrentLocation.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"nativeDependencies": { | ||
"@react-native-community/geolocation": "2.0.2" | ||
"@react-native-community/geolocation": "2.0.2", | ||
"react-native-geolocation-service": "5.2.0" | ||
} | ||
} |
Oops, something went wrong.