@frankieone/one-sdk 1.0.0-beta → 1.1.0-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commit.txt +2 -2
- package/dist/esm/features.config.d.ts +39 -0
- package/dist/esm/features.config.d.ts.map +1 -0
- package/dist/esm/features.config.js +38 -0
- package/dist/esm/features.config.js.map +1 -0
- package/dist/esm/modules/biometrics/vendors/Incode/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.js +15 -1
- package/dist/esm/modules/biometrics/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.js +3 -27
- package/dist/esm/modules/biometrics/vendors/OcrLabs/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.d.ts.map +1 -1
- package/dist/esm/modules/biometrics/vendors/Onfido/index.js +9 -9
- package/dist/esm/modules/biometrics/vendors/Onfido/index.js.map +1 -1
- package/dist/esm/modules/biometrics/vendors/dummy-biometrics/index.d.ts +1 -1
- package/dist/esm/modules/common/errors/{OneSDKError.d.ts → OneSDKError.class.d.ts} +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.class.d.ts.map +1 -0
- package/dist/esm/modules/common/errors/{OneSDKError.js → OneSDKError.class.js} +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.class.js.map +1 -0
- package/dist/esm/modules/common/index.d.ts +1 -1
- package/dist/esm/modules/common/index.d.ts.map +1 -1
- package/dist/esm/modules/common/index.js +1 -1
- package/dist/esm/modules/common/index.js.map +1 -1
- package/dist/esm/modules/common/modules/HOF.d.ts +2 -2
- package/dist/esm/modules/common/modules/HOF.js +1 -1
- package/dist/esm/modules/common/modules/error.d.ts +2 -2
- package/dist/esm/modules/common/modules/error.js +2 -2
- package/dist/esm/modules/common/modules/error.js.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/index.d.ts +2 -2
- package/dist/esm/modules/common/modules/eventHub/index.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/index.js +59 -12
- package/dist/esm/modules/common/modules/eventHub/index.js.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/types.d.ts +11 -8
- package/dist/esm/modules/common/modules/eventHub/types.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.d.ts +13 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.d.ts.map +1 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.js +39 -0
- package/dist/esm/modules/common/modules/eventHub/windowEventHub.js.map +1 -0
- package/dist/esm/modules/common/modules/vendorLoading.d.ts +10 -10
- package/dist/esm/modules/common/modules/vendorLoading.d.ts.map +1 -1
- package/dist/esm/modules/common/modules/vendorLoading.js +2 -2
- package/dist/esm/modules/common/modules/vendorLoading.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/{BaseParameters.d.ts → baseParameters.types.d.ts} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/baseParameters.types.d.ts.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/{BaseParameters.js → baseParameters.types.js} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/baseParameters.types.js.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/definition.types.d.ts +15 -3
- package/dist/esm/modules/common/types/oneSDKModules/definition.types.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/index.d.ts +2 -2
- package/dist/esm/modules/common/types/oneSDKModules/index.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/index.js +2 -2
- package/dist/esm/modules/common/types/oneSDKModules/index.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.d.ts +4 -4
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.d.ts.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/initialiseFunction.js.map +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/{TypeSystem.d.ts → typeSystem.types.d.ts} +1 -1
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.d.ts.map +1 -0
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.js +2 -0
- package/dist/esm/modules/common/types/oneSDKModules/typeSystem.types.js.map +1 -0
- package/dist/esm/modules/common/types/recipeConfiguration.types.d.ts +5 -11
- package/dist/esm/modules/common/types/recipeConfiguration.types.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/index.d.ts +2 -1
- package/dist/esm/modules/common/vendors/incode/index.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/index.js +2 -4
- package/dist/esm/modules/common/vendors/incode/index.js.map +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.d.ts +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.d.ts.map +1 -1
- package/dist/esm/modules/common/vendors/incode/startCamera.js +24 -2
- package/dist/esm/modules/common/vendors/incode/startCamera.js.map +1 -1
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.d.ts +13 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.d.ts.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.js +30 -0
- package/dist/esm/modules/common/vendors/smart-ui/promisifySmartUI.js.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.d.ts +35 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.d.ts.map +1 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.js +60 -0
- package/dist/esm/modules/common/vendors/smart-ui/useSmartUI.js.map +1 -0
- package/dist/esm/modules/config/modules.d.ts +4 -2
- package/dist/esm/modules/config/modules.d.ts.map +1 -1
- package/dist/esm/modules/config/modules.js +9 -7
- package/dist/esm/modules/config/modules.js.map +1 -1
- package/dist/esm/modules/idv/actions/mount.d.ts +14 -0
- package/dist/esm/modules/idv/actions/mount.d.ts.map +1 -0
- package/dist/esm/modules/idv/actions/mount.js +67 -0
- package/dist/esm/modules/idv/actions/mount.js.map +1 -0
- package/dist/esm/modules/idv/definition.types.d.ts +2 -1
- package/dist/esm/modules/idv/definition.types.d.ts.map +1 -1
- package/dist/esm/modules/idv/{events.d.ts → events.types.d.ts} +1 -1
- package/dist/esm/modules/idv/events.types.d.ts.map +1 -0
- package/dist/esm/modules/idv/events.types.js +2 -0
- package/dist/esm/modules/idv/events.types.js.map +1 -0
- package/dist/esm/modules/idv/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/index.js +19 -73
- package/dist/esm/modules/idv/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/Incode/index.d.ts +5 -6
- package/dist/esm/modules/idv/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/Incode/index.js +6 -5
- package/dist/esm/modules/idv/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/Mastercard/index.d.ts +5 -5
- package/dist/esm/modules/idv/vendors/Mastercard/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/Mastercard/index.js +11 -12
- package/dist/esm/modules/idv/vendors/Mastercard/index.js.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/endFlow.js +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/endFlow.js.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/index.d.ts +3 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/index.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.d.ts +2 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.js +2 -2
- package/dist/esm/modules/idv/vendors/OcrLabs/startDummyFlow.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.d.ts +7 -5
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.js +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframe.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.d.ts +11 -5
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.js +9 -4
- package/dist/esm/modules/idv/vendors/common/iframeUtils/createIframeEventListener.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.d.ts +8 -4
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.d.ts.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.js +58 -46
- package/dist/esm/modules/idv/vendors/common/iframeUtils/defineIframeIDVWrapper.js.map +1 -1
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.d.ts +12 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.d.ts.map +1 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.js +34 -0
- package/dist/esm/modules/idv/vendors/common/iframeUtils/updateIndividualModuleState.js.map +1 -0
- package/dist/esm/modules/index.d.ts +7 -7
- package/dist/esm/modules/index.d.ts.map +1 -1
- package/dist/esm/modules/index.js +16 -11
- package/dist/esm/modules/index.js.map +1 -1
- package/dist/esm/modules/individual/actions/search.d.ts +3 -3
- package/dist/esm/modules/individual/actions/search.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/search.js +8 -8
- package/dist/esm/modules/individual/actions/search.js.map +1 -1
- package/dist/esm/modules/individual/actions/submit.d.ts +11 -8
- package/dist/esm/modules/individual/actions/submit.d.ts.map +1 -1
- package/dist/esm/modules/individual/actions/submit.js +41 -20
- package/dist/esm/modules/individual/actions/submit.js.map +1 -1
- package/dist/esm/modules/individual/definition.d.ts +13 -13
- package/dist/esm/modules/individual/definition.d.ts.map +1 -1
- package/dist/esm/modules/individual/index.d.ts +3 -3
- package/dist/esm/modules/individual/index.js +23 -23
- package/dist/esm/modules/meta.json +1 -1
- package/dist/esm/modules/ocr/actions/mount.d.ts +9 -4
- package/dist/esm/modules/ocr/actions/mount.d.ts.map +1 -1
- package/dist/esm/modules/ocr/actions/mount.js +54 -32
- package/dist/esm/modules/ocr/actions/mount.js.map +1 -1
- package/dist/esm/modules/ocr/actions/start.d.ts +1 -0
- package/dist/esm/modules/ocr/actions/start.d.ts.map +1 -1
- package/dist/esm/modules/ocr/actions/start.js +85 -69
- package/dist/esm/modules/ocr/actions/start.js.map +1 -1
- package/dist/esm/modules/ocr/definition.d.ts +21 -9
- package/dist/esm/modules/ocr/definition.d.ts.map +1 -1
- package/dist/esm/modules/ocr/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/index.js +6 -4
- package/dist/esm/modules/ocr/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/Incode/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/Incode/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/Incode/index.js +13 -18
- package/dist/esm/modules/ocr/vendors/Incode/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/Onfido/index.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/Onfido/index.js +17 -20
- package/dist/esm/modules/ocr/vendors/Onfido/index.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/initProcess.d.ts +20 -9
- package/dist/esm/modules/ocr/vendors/common/initProcess.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/initProcess.js +52 -17
- package/dist/esm/modules/ocr/vendors/common/initProcess.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.d.ts +2 -2
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.d.ts.map +1 -1
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.js +2 -2
- package/dist/esm/modules/ocr/vendors/common/mutationObserver.js.map +1 -1
- package/dist/esm/modules/ocr/vendors/dummy-ocr/index.d.ts +13 -2
- package/dist/esm/modules/ocr/vendors/dummy-ocr/index.d.ts.map +1 -1
- package/dist/esm/modules/sdk/devTools/attachDevTools.d.ts +22 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.d.ts.map +1 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.js +38 -0
- package/dist/esm/modules/sdk/devTools/attachDevTools.js.map +1 -0
- package/dist/esm/modules/sdk/index.d.ts +2 -2
- package/dist/esm/modules/sdk/index.d.ts.map +1 -1
- package/dist/esm/modules/sdk/index.js +17 -13
- package/dist/esm/modules/sdk/index.js.map +1 -1
- package/dist/esm/modules/sdk/initialisation/componentLoader.d.ts +147 -36
- package/dist/esm/modules/sdk/initialisation/componentLoader.d.ts.map +1 -1
- package/dist/esm/modules/sdk/initialisation/componentLoader.js +14 -11
- package/dist/esm/modules/sdk/initialisation/componentLoader.js.map +1 -1
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.d.ts +4 -4
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.js +26 -26
- package/dist/esm/modules/sdk/initialisation/sharedDependencies.js.map +1 -1
- package/dist/esm/modules/sdk/types/oneSDKParameters.d.ts +5 -4
- package/dist/esm/modules/sdk/types/oneSDKParameters.d.ts.map +1 -1
- package/dist/esm/modules/sdk/types/oneSDKParameters.js.map +1 -1
- package/dist/esm/modules/session/SessionContext.d.ts +1 -1
- package/dist/esm/modules/session/SessionContext.js +6 -6
- package/dist/esm/modules/smart-ui/definition.d.ts +50 -0
- package/dist/esm/modules/smart-ui/definition.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/definition.js +2 -0
- package/dist/esm/modules/smart-ui/definition.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/i18n.json +6 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.d.ts +54 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.js +75 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/index.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.d.ts +9 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.js +42 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/loadSmartUI.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.d.ts +23 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.js +2 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIEvents.types.js.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.d.ts +76 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.js +2 -0
- package/dist/esm/modules/smart-ui/implementations/legacy/smartUIOptions.types.js.map +1 -0
- package/dist/esm/modules/smart-ui/index.d.ts +4 -0
- package/dist/esm/modules/smart-ui/index.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/index.js +26 -0
- package/dist/esm/modules/smart-ui/index.js.map +1 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.d.ts +6 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.d.ts.map +1 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.js +10 -0
- package/dist/esm/modules/smart-ui/validateConfiguration.js.map +1 -0
- package/dist/esm/modules/types.d.ts +16 -16
- package/dist/esm/modules/types.d.ts.map +1 -1
- package/dist/esm/modules/types.js +4 -4
- package/dist/esm/modules/types.js.map +1 -1
- package/dist/release.txt +2 -2
- package/dist/umd/biometrics-dummy.js +1 -1
- package/dist/umd/biometrics-incode.js +1 -1
- package/dist/umd/biometrics-incode.js.map +1 -1
- package/dist/umd/biometrics-ocrlabs.js +1 -1
- package/dist/umd/biometrics-ocrlabs.js.map +1 -1
- package/dist/umd/biometrics-onfido.js +1 -1
- package/dist/umd/biometrics-onfido.js.map +1 -1
- package/dist/umd/device-sardine.js +1 -1
- package/dist/umd/idv-incode.js +1 -1
- package/dist/umd/idv-incode.js.map +1 -1
- package/dist/umd/idv-mastercard.js +1 -1
- package/dist/umd/idv-mastercard.js.map +1 -1
- package/dist/umd/idv-ocrlabs.js +1 -1
- package/dist/umd/idv-ocrlabs.js.map +1 -1
- package/dist/umd/ocr-dummy.js +1 -1
- package/dist/umd/ocr-dummy.js.map +1 -1
- package/dist/umd/ocr-incode.js +1 -1
- package/dist/umd/ocr-incode.js.map +1 -1
- package/dist/umd/ocr-onfido.js +1 -1
- package/dist/umd/ocr-onfido.js.map +1 -1
- package/dist/umd/oneSdk.umd.js +1 -1
- package/dist/umd/oneSdk.umd.js.map +1 -1
- package/dist/umd/smartui-legacy.js +2 -0
- package/dist/umd/smartui-legacy.js.map +1 -0
- package/dist/version.txt +2 -2
- package/package.json +1 -1
- package/dist/esm/modules/common/errors/OneSDKError.d.ts.map +0 -1
- package/dist/esm/modules/common/errors/OneSDKError.js.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/BaseParameters.d.ts.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/BaseParameters.js.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.d.ts.map +0 -1
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.js +0 -2
- package/dist/esm/modules/common/types/oneSDKModules/TypeSystem.js.map +0 -1
- package/dist/esm/modules/idv/events.d.ts.map +0 -1
- package/dist/esm/modules/idv/events.js +0 -2
- package/dist/esm/modules/idv/events.js.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.d.ts +0 -4
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.d.ts.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.js +0 -21
- package/dist/esm/modules/ocr/vendors/common/mutation-observer.js.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.d.ts +0 -18
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.d.ts.map +0 -1
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.js +0 -11
- package/dist/esm/modules/ocr/vendors/common/status-evaluators.js.map +0 -1
|
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|
|
10
10
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
11
11
|
};
|
|
12
12
|
var _SessionContext_meta, _SessionContext_token, _SessionContext_decodedToken, _SessionContext_options;
|
|
13
|
-
import jwtDecode from
|
|
13
|
+
import jwtDecode from 'jwt-decode';
|
|
14
14
|
/**
|
|
15
15
|
*
|
|
16
16
|
*/
|
|
@@ -31,7 +31,7 @@ export class SessionContext {
|
|
|
31
31
|
takenFromStorage: (_a = options === null || options === void 0 ? void 0 : options.takenFromStorage) !== null && _a !== void 0 ? _a : false,
|
|
32
32
|
appReference: (_b = options === null || options === void 0 ? void 0 : options.appReference) !== null && _b !== void 0 ? _b : null,
|
|
33
33
|
}, "f");
|
|
34
|
-
if (typeof tokenOrMeta ===
|
|
34
|
+
if (typeof tokenOrMeta === 'string')
|
|
35
35
|
this.setToken(tokenOrMeta);
|
|
36
36
|
else {
|
|
37
37
|
__classPrivateFieldSet(this, _SessionContext_token, null, "f");
|
|
@@ -39,17 +39,17 @@ export class SessionContext {
|
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
41
|
on() {
|
|
42
|
-
throw new Error(
|
|
42
|
+
throw new Error('No implementation yet. This is WIP');
|
|
43
43
|
}
|
|
44
44
|
off() {
|
|
45
|
-
throw new Error(
|
|
45
|
+
throw new Error('No implementation yet. This is WIP');
|
|
46
46
|
}
|
|
47
47
|
isTakenFromStorage() {
|
|
48
48
|
return Boolean(__classPrivateFieldGet(this, _SessionContext_options, "f").takenFromStorage);
|
|
49
49
|
}
|
|
50
50
|
unpersist() {
|
|
51
51
|
const cleanup = __classPrivateFieldGet(this, _SessionContext_options, "f").takenFromStorage;
|
|
52
|
-
if (typeof cleanup ===
|
|
52
|
+
if (typeof cleanup === 'function')
|
|
53
53
|
return cleanup();
|
|
54
54
|
}
|
|
55
55
|
get appReference() {
|
|
@@ -119,5 +119,5 @@ export class SessionContext {
|
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
121
|
_SessionContext_meta = new WeakMap(), _SessionContext_token = new WeakMap(), _SessionContext_decodedToken = new WeakMap(), _SessionContext_options = new WeakMap();
|
|
122
|
-
export const hasEntityId = (p) => typeof p.entityId ===
|
|
122
|
+
export const hasEntityId = (p) => typeof p.entityId === 'string';
|
|
123
123
|
//# sourceMappingURL=SessionContext.js.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Applicant } from '@module/common/shared/models/Applicant';
|
|
2
|
+
import type { Document } from '@module/common/shared/models/Document';
|
|
3
|
+
import type { ModuleDefinition } from '@module/common/types';
|
|
4
|
+
export type SmartUIModule = ModuleDefinition<{
|
|
5
|
+
module: {
|
|
6
|
+
name: 'smart-ui';
|
|
7
|
+
category: 'component';
|
|
8
|
+
context: {
|
|
9
|
+
mount: (mountElement: string | HTMLElement) => Promise<WrapperContext>;
|
|
10
|
+
};
|
|
11
|
+
events: {
|
|
12
|
+
loaded: [{
|
|
13
|
+
domElement: HTMLElement;
|
|
14
|
+
implementation: string;
|
|
15
|
+
}];
|
|
16
|
+
ready: [{
|
|
17
|
+
domElement: HTMLElement;
|
|
18
|
+
}];
|
|
19
|
+
results: [{
|
|
20
|
+
documents: Document[];
|
|
21
|
+
applicant: Applicant;
|
|
22
|
+
entityId: string;
|
|
23
|
+
}];
|
|
24
|
+
navigation: [{
|
|
25
|
+
page: string;
|
|
26
|
+
}];
|
|
27
|
+
};
|
|
28
|
+
recipe: {
|
|
29
|
+
smartUI: {
|
|
30
|
+
implementation: {
|
|
31
|
+
name: 'legacy';
|
|
32
|
+
version: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
wrapper: {
|
|
38
|
+
loadType: 'async';
|
|
39
|
+
vendors: ['legacy'];
|
|
40
|
+
options: {
|
|
41
|
+
mountElement: HTMLElement;
|
|
42
|
+
};
|
|
43
|
+
context: WrapperContext;
|
|
44
|
+
};
|
|
45
|
+
}>;
|
|
46
|
+
type WrapperContext = {
|
|
47
|
+
cleanup: () => void;
|
|
48
|
+
};
|
|
49
|
+
export {};
|
|
50
|
+
//# sourceMappingURL=definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.d.ts","sourceRoot":"","sources":["../../../../modules/smart-ui/definition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,MAAM,aAAa,GAAG,gBAAgB,CAAC;IAC3C,MAAM,EAAE;QACN,IAAI,EAAE,UAAU,CAAC;QACjB,QAAQ,EAAE,WAAW,CAAC;QACtB,OAAO,EAAE;YACP,KAAK,EAAE,CAAC,YAAY,EAAE,MAAM,GAAG,WAAW,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;SACxE,CAAC;QACF,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;gBAAE,UAAU,EAAE,WAAW,CAAC;gBAAC,cAAc,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;YAC9D,KAAK,EAAE,CAAC;gBAAE,UAAU,EAAE,WAAW,CAAA;aAAE,CAAC,CAAC;YACrC,OAAO,EAAE,CAAC;gBAAE,SAAS,EAAE,QAAQ,EAAE,CAAC;gBAAC,SAAS,EAAE,SAAS,CAAC;gBAAC,QAAQ,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;YAC7E,UAAU,EAAE,CAAC;gBAAE,IAAI,EAAE,MAAM,CAAA;aAAE,CAAC,CAAC;SAChC,CAAC;QACF,MAAM,EAAE;YACN,OAAO,EAAE;gBACP,cAAc,EAAE;oBACd,IAAI,EAAE,QAAQ,CAAC;oBACf,OAAO,EAAE,MAAM,CAAC;iBACjB,CAAC;aACH,CAAC;SACH,CAAC;KACH,CAAC;IACF,OAAO,EAAE;QACP,QAAQ,EAAE,OAAO,CAAC;QAClB,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAC;QACpB,OAAO,EAAE;YACP,YAAY,EAAE,WAAW,CAAC;SAC3B,CAAC;QACF,OAAO,EAAE,cAAc,CAAC;KACzB,CAAC;CACH,CAAC,CAAC;AAEH,KAAK,cAAc,GAAG;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition.js","sourceRoot":"","sources":["../../../../modules/smart-ui/definition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { Document } from '@module/common/shared/models/Document';
|
|
2
|
+
import type { DeepPartial } from '@module/common/shared/models/general';
|
|
3
|
+
import type { SmartUIConfiguration } from './smartUIOptions.types';
|
|
4
|
+
export declare const initialise: import("../../../common/types").WrapperInitialiseFunction<{
|
|
5
|
+
mountElement: HTMLElement;
|
|
6
|
+
}, {
|
|
7
|
+
cleanup: () => void;
|
|
8
|
+
}, "async", {
|
|
9
|
+
localEventHub: import("@module/common").EventHub<{
|
|
10
|
+
loaded: [{
|
|
11
|
+
domElement: HTMLElement;
|
|
12
|
+
implementation: string;
|
|
13
|
+
}];
|
|
14
|
+
ready: [{
|
|
15
|
+
domElement: HTMLElement;
|
|
16
|
+
}];
|
|
17
|
+
results: [{
|
|
18
|
+
documents: Document[];
|
|
19
|
+
applicant: import("../../../common/shared/models/Applicant").Applicant;
|
|
20
|
+
entityId: string;
|
|
21
|
+
}];
|
|
22
|
+
navigation: [{
|
|
23
|
+
page: string;
|
|
24
|
+
}];
|
|
25
|
+
}>;
|
|
26
|
+
recipe: {
|
|
27
|
+
smartUI: {
|
|
28
|
+
implementation: {
|
|
29
|
+
name: "legacy";
|
|
30
|
+
version: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
}> & {
|
|
35
|
+
vendorName: "legacy";
|
|
36
|
+
};
|
|
37
|
+
declare global {
|
|
38
|
+
type Options = {
|
|
39
|
+
ffToken: string;
|
|
40
|
+
width?: string;
|
|
41
|
+
height?: string;
|
|
42
|
+
config?: DeepPartial<SmartUIConfiguration>;
|
|
43
|
+
selector?: string;
|
|
44
|
+
shadow?: boolean;
|
|
45
|
+
entityId?: string;
|
|
46
|
+
applicantReference?: string;
|
|
47
|
+
};
|
|
48
|
+
interface Window {
|
|
49
|
+
frankieFinancial: {
|
|
50
|
+
initialiseOnboardingWidget: (options: Options) => void;
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAMxE,OAAO,KAAK,EAAE,oBAAoB,EAAyB,MAAM,wBAAwB,CAAC;AAQ1F,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsErB,CAAC;AAEH,OAAO,CAAC,MAAM,CAAC;IACb,KAAK,OAAO,GAAG;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,MAAM,CAAC,EAAE,WAAW,CAAC,oBAAoB,CAAC,CAAC;QAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,OAAO,CAAC;QACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,UAAU,MAAM;QACd,gBAAgB,EAAE;YAChB,0BAA0B,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;SACxD,CAAC;KACH;CACF"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { SdkMode } from '../../../index.js';
|
|
11
|
+
import { ENVIRONMENTS, env2url } from '../../../common';
|
|
12
|
+
import { defineWrapper } from '../../../common/modules/defineModule';
|
|
13
|
+
import phrases from './i18n.json';
|
|
14
|
+
import { loadSmartUI } from './loadSmartUI';
|
|
15
|
+
const SUPPORTED_DOCUMENT_TYPES = [
|
|
16
|
+
'PASSPORT',
|
|
17
|
+
'DRIVERS_LICENCE',
|
|
18
|
+
'NATIONAL_ID',
|
|
19
|
+
'NATIONAL_HEALTH_ID',
|
|
20
|
+
];
|
|
21
|
+
export const initialise = defineWrapper('legacy', (...args) => __awaiter(void 0, void 0, void 0, function* () {
|
|
22
|
+
const { eventListener: smartUIEventListener, domElement, cleanup } = yield loadSmartUI(args);
|
|
23
|
+
const [sharedState] = args;
|
|
24
|
+
const localEventHub = sharedState.localEventHub;
|
|
25
|
+
localEventHub.emit('loaded', { domElement, implementation: 'legacy' });
|
|
26
|
+
// setup events
|
|
27
|
+
smartUIEventListener.on('INIT', () => localEventHub.emit('ready', { domElement }));
|
|
28
|
+
smartUIEventListener.on('INIT', ({ configuration }) => localEventHub.emit('info', {
|
|
29
|
+
message: 'Smart UI Initialised',
|
|
30
|
+
payload: {
|
|
31
|
+
smartUIConfiguration: configuration,
|
|
32
|
+
},
|
|
33
|
+
}));
|
|
34
|
+
smartUIEventListener.on(['FF_CHECK_ERROR', 'FF_SAVE_ERROR'], (error) => localEventHub.emit('error', error));
|
|
35
|
+
smartUIEventListener.on(['FF_SAVE_RESULT', 'FF_CHECK_RESULT'], ({ applicant, documents }) => {
|
|
36
|
+
cleanup();
|
|
37
|
+
localEventHub.emit('results', {
|
|
38
|
+
applicant,
|
|
39
|
+
documents,
|
|
40
|
+
entityId: applicant.entityId,
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
smartUIEventListener.on('FF_CHECK_RESULT', () => localEventHub.emit('warning', { message: 'Smart UI emitted check results even when configured to `saveOnly`' }));
|
|
44
|
+
smartUIEventListener.on('FF_ONBOARDING_WIDGET_DESTROYED', cleanup);
|
|
45
|
+
// Initialise smart ui
|
|
46
|
+
const individual = sharedState.oneSdkInstance.individual();
|
|
47
|
+
const documents = individual.access('documents').getValue();
|
|
48
|
+
// Select document types belonging to the entity
|
|
49
|
+
const entityDocumentTypes = documents
|
|
50
|
+
.map((document) => document.idType)
|
|
51
|
+
.filter((idType) => SUPPORTED_DOCUMENT_TYPES.includes(idType));
|
|
52
|
+
// prettier-ignore
|
|
53
|
+
const documentTypes = entityDocumentTypes.length > 0
|
|
54
|
+
? entityDocumentTypes
|
|
55
|
+
: SUPPORTED_DOCUMENT_TYPES;
|
|
56
|
+
const entityIdentifier = sharedState.session.entityId
|
|
57
|
+
? { entityId: sharedState.session.entityId }
|
|
58
|
+
: { applicantReference: sharedState.session.reference };
|
|
59
|
+
const isDummyMode = sharedState.mode.is(SdkMode.DUMMY);
|
|
60
|
+
window.frankieFinancial.initialiseOnboardingWidget(Object.assign(Object.assign({}, entityIdentifier), { ffToken: isDummyMode ? null : sharedState.session.token, width: '100%', height: '100%', config: {
|
|
61
|
+
mode: isDummyMode ? 'demo' : 'production',
|
|
62
|
+
saveOnly: true,
|
|
63
|
+
// Smart ui requires a valid frankieone url to be provided and the session.environment in dummy mode won't be one
|
|
64
|
+
// for that reason here in dummy mode we simply pass the development url
|
|
65
|
+
frankieBackendUrl: isDummyMode ? env2url(ENVIRONMENTS.development) : sharedState.session.environment,
|
|
66
|
+
welcomeScreen: false,
|
|
67
|
+
documentTypes,
|
|
68
|
+
idScanVerification: false,
|
|
69
|
+
phrases,
|
|
70
|
+
} }));
|
|
71
|
+
return {
|
|
72
|
+
cleanup,
|
|
73
|
+
};
|
|
74
|
+
}));
|
|
75
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WrapperParameters } from '@module/common/modules/defineModule';
|
|
2
|
+
import type { SmartUIModule } from '@module/smart-ui/definition';
|
|
3
|
+
import type { SmartUIEvents } from './smartUIEvents.types';
|
|
4
|
+
export declare function loadSmartUI([globalState, { mountElement }]: WrapperParameters<SmartUIModule>): Promise<{
|
|
5
|
+
eventListener: import("@module/common").ListenerFromEmitter<import("@module/common").EventHub<SmartUIEvents>>;
|
|
6
|
+
domElement: HTMLElement;
|
|
7
|
+
cleanup: () => void;
|
|
8
|
+
}>;
|
|
9
|
+
//# sourceMappingURL=loadSmartUI.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadSmartUI.d.ts","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/loadSmartUI.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qCAAqC,CAAC;AAE7E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAEjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI3D,wBAAsB,WAAW,CAAC,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,CAAC,EAAE,iBAAiB,CAAC,aAAa,CAAC;;;;GA6BlG"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { loadAsyncAsset } from '../../../common';
|
|
11
|
+
import { mkWindowEventHub } from '../../../common/modules/eventHub/windowEventHub';
|
|
12
|
+
const CDN_URL = 'https://assets.frankiefinancial.io/onboarding/:version:/ff-onboarding-widget.umd.js';
|
|
13
|
+
export function loadSmartUI([globalState, { mountElement }]) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
16
|
+
const implementation = globalState.recipe.smartUI.implementation;
|
|
17
|
+
if (implementation.name !== 'legacy')
|
|
18
|
+
throw new Error(`Attempt to initialise the wrong implementation of the Smart UI '${implementation.name}'`);
|
|
19
|
+
// Don't load smart ui twice
|
|
20
|
+
if (!((_a = window === null || window === void 0 ? void 0 : window.frankieFinancial) === null || _a === void 0 ? void 0 : _a.initialiseOnboardingWidget)) {
|
|
21
|
+
const version = (_b = implementation.version) !== null && _b !== void 0 ? _b : 'v4';
|
|
22
|
+
yield loadAsyncAsset(CDN_URL.replace(':version:', version));
|
|
23
|
+
}
|
|
24
|
+
const smartUIElement = document.createElement('ff-onboarding-widget');
|
|
25
|
+
mountElement.appendChild(smartUIElement);
|
|
26
|
+
const { cleanup: eventsCleanup, eventListener } = mkWindowEventHub([
|
|
27
|
+
'FF_CHECK_RESULT',
|
|
28
|
+
'FF_CHECK_ERROR',
|
|
29
|
+
'FF_SAVE_RESULT',
|
|
30
|
+
'FF_SAVE_ERROR',
|
|
31
|
+
'INIT',
|
|
32
|
+
'FF_ONBOARDING_WIDGET_DESTROYED',
|
|
33
|
+
]);
|
|
34
|
+
const cleanup = () => {
|
|
35
|
+
eventsCleanup();
|
|
36
|
+
if (mountElement.contains(smartUIElement))
|
|
37
|
+
mountElement.removeChild(smartUIElement);
|
|
38
|
+
};
|
|
39
|
+
return { eventListener, domElement: smartUIElement, cleanup };
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=loadSmartUI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"loadSmartUI.js","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/loadSmartUI.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAKlF,MAAM,OAAO,GAAG,qFAAqF,CAAC;AAEtG,MAAM,UAAgB,WAAW,CAAC,CAAC,WAAW,EAAE,EAAE,YAAY,EAAE,CAAmC;;;QACjG,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;QACjE,IAAI,cAAc,CAAC,IAAI,KAAK,QAAQ;YAClC,MAAM,IAAI,KAAK,CAAC,mEAAmE,cAAc,CAAC,IAAI,GAAG,CAAC,CAAC;QAE7G,4BAA4B;QAC5B,IAAI,CAAC,CAAA,MAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,gBAAgB,0CAAE,0BAA0B,CAAA,EAAE;YACzD,MAAM,OAAO,GAAG,MAAA,cAAc,CAAC,OAAO,mCAAI,IAAI,CAAC;YAC/C,MAAM,cAAc,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,CAAC,CAAC;SAC7D;QAED,MAAM,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,sBAAsB,CAAC,CAAC;QACtE,YAAY,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QAEzC,MAAM,EAAE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,GAAG,gBAAgB,CAAgB;YAChF,iBAAiB;YACjB,gBAAgB;YAChB,gBAAgB;YAChB,eAAe;YACf,MAAM;YACN,gCAAgC;SACjC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,aAAa,EAAE,CAAC;YAChB,IAAI,YAAY,CAAC,QAAQ,CAAC,cAAc,CAAC;gBAAE,YAAY,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;QACtF,CAAC,CAAC;QAEF,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,cAAc,EAAE,OAAO,EAAE,CAAC;;CAC/D"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { OneSDKError } from '@module/common';
|
|
2
|
+
import type { Applicant } from '@module/common/shared/models/Applicant';
|
|
3
|
+
import type { Document } from '@module/common/shared/models/Document';
|
|
4
|
+
import type { CheckSummary } from '@module/types';
|
|
5
|
+
import type { SmartUIConfiguration } from './smartUIOptions.types';
|
|
6
|
+
export type SmartUIEvents = {
|
|
7
|
+
INIT: [{
|
|
8
|
+
configuration: SmartUIConfiguration;
|
|
9
|
+
}];
|
|
10
|
+
FF_SAVE_RESULT: [{
|
|
11
|
+
applicant: Applicant;
|
|
12
|
+
documents: Document[];
|
|
13
|
+
}];
|
|
14
|
+
FF_CHECK_RESULT: [{
|
|
15
|
+
applicant: Applicant;
|
|
16
|
+
documents: Document[];
|
|
17
|
+
checkSummary: CheckSummary;
|
|
18
|
+
}];
|
|
19
|
+
FF_SAVE_ERROR: [OneSDKError];
|
|
20
|
+
FF_CHECK_ERROR: [OneSDKError];
|
|
21
|
+
FF_ONBOARDING_WIDGET_DESTROYED: [];
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=smartUIEvents.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartUIEvents.types.d.ts","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/smartUIEvents.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGnE,MAAM,MAAM,aAAa,GAAG;IAC1B,IAAI,EAAE,CAAC;QAAE,aAAa,EAAE,oBAAoB,CAAA;KAAE,CAAC,CAAC;IAChD,cAAc,EAAE,CAAC;QAAE,SAAS,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,QAAQ,EAAE,CAAA;KAAE,CAAC,CAAC;IAClE,eAAe,EAAE,CAAC;QAAE,SAAS,EAAE,SAAS,CAAC;QAAC,SAAS,EAAE,QAAQ,EAAE,CAAC;QAAC,YAAY,EAAE,YAAY,CAAA;KAAE,CAAC,CAAC;IAC/F,aAAa,EAAE,CAAC,WAAW,CAAC,CAAC;IAC7B,cAAc,EAAE,CAAC,WAAW,CAAC,CAAC;IAC9B,8BAA8B,EAAE,EAAE,CAAC;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartUIEvents.types.js","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/smartUIEvents.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
export type SmartUIConfiguration = {
|
|
2
|
+
mode: SmartUIMode;
|
|
3
|
+
idScanVerification: boolean | {
|
|
4
|
+
releaseVersion: string;
|
|
5
|
+
welcomeScreen: boolean | {
|
|
6
|
+
title: string;
|
|
7
|
+
content: string[];
|
|
8
|
+
ctaText: boolean | string;
|
|
9
|
+
};
|
|
10
|
+
useMobileDevice: boolean;
|
|
11
|
+
useLiveness: boolean;
|
|
12
|
+
injectedCss: string;
|
|
13
|
+
enableLiveDocumentCapture: boolean;
|
|
14
|
+
};
|
|
15
|
+
frankieBackendUrl: string;
|
|
16
|
+
documentTypes: SupportedDocumentType[];
|
|
17
|
+
welcomeScreen: boolean | {
|
|
18
|
+
htmlContent: string | boolean;
|
|
19
|
+
ctaText: boolean | string;
|
|
20
|
+
};
|
|
21
|
+
maxAttemptCount: number;
|
|
22
|
+
phrases: {
|
|
23
|
+
[key: string]: unknown;
|
|
24
|
+
} | null;
|
|
25
|
+
successScreen: {
|
|
26
|
+
ctaUrl: string | null;
|
|
27
|
+
ctaText: string;
|
|
28
|
+
};
|
|
29
|
+
pendingScreen: boolean | {
|
|
30
|
+
htmlContent: string | null;
|
|
31
|
+
ctaActions: {
|
|
32
|
+
url: string;
|
|
33
|
+
text: string;
|
|
34
|
+
}[];
|
|
35
|
+
};
|
|
36
|
+
failureScreen: boolean | {
|
|
37
|
+
ctaUrl: string | null;
|
|
38
|
+
ctaText: string;
|
|
39
|
+
};
|
|
40
|
+
progressBar: boolean;
|
|
41
|
+
checkProfile: string;
|
|
42
|
+
googleAPIKey: string | false;
|
|
43
|
+
acceptedCountries: AcceptedCountriesOptions;
|
|
44
|
+
ageRange: [number, number];
|
|
45
|
+
dateOfBirth: {
|
|
46
|
+
type: 'gregorian' | 'buddhist';
|
|
47
|
+
};
|
|
48
|
+
organisationName: string;
|
|
49
|
+
consentText: string | null;
|
|
50
|
+
requestAddress: boolean | {
|
|
51
|
+
acceptedCountries?: AcceptedCountriesOptions;
|
|
52
|
+
};
|
|
53
|
+
requestID: boolean;
|
|
54
|
+
lazyIDCheck: boolean;
|
|
55
|
+
disableThirdPartyAnalytics: boolean;
|
|
56
|
+
injectedCss: string;
|
|
57
|
+
injectedCssTagID: string | null;
|
|
58
|
+
saveOnly: boolean;
|
|
59
|
+
documentUploads: null | boolean | {
|
|
60
|
+
uploads: {
|
|
61
|
+
title: string;
|
|
62
|
+
description?: string;
|
|
63
|
+
types: SupportedDocumentType;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
enableDeviceCharacteristics: boolean;
|
|
67
|
+
preload: {
|
|
68
|
+
email?: string | null;
|
|
69
|
+
phone?: string | null;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
export type SupportedDocumentType = 'PASSPORT' | 'DRIVERS_LICENCE' | 'NATIONAL_HEALTH_ID' | 'NATIONAL_ID';
|
|
73
|
+
type AcceptedCountriesOptions = string[] | 'ALL';
|
|
74
|
+
export type SmartUIMode = 'demo' | 'production' | 'development';
|
|
75
|
+
export {};
|
|
76
|
+
//# sourceMappingURL=smartUIOptions.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartUIOptions.types.d.ts","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/smartUIOptions.types.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,oBAAoB,GAAG;IAEjC,IAAI,EAAE,WAAW,CAAC;IAClB,kBAAkB,EACd,OAAO,GACP;QACE,cAAc,EAAE,MAAM,CAAC;QACvB,aAAa,EACT,OAAO,GACP;YACE,KAAK,EAAE,MAAM,CAAC;YACd,OAAO,EAAE,MAAM,EAAE,CAAC;YAClB,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;SAC3B,CAAC;QACN,eAAe,EAAE,OAAO,CAAC;QACzB,WAAW,EAAE,OAAO,CAAC;QACrB,WAAW,EAAE,MAAM,CAAC;QACpB,yBAAyB,EAAE,OAAO,CAAC;KACpC,CAAC;IAEN,iBAAiB,EAAE,MAAM,CAAC;IAE1B,aAAa,EAAE,qBAAqB,EAAE,CAAC;IACvC,aAAa,EACT,OAAO,GACP;QAGE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;QAC9B,OAAO,EAAE,OAAO,GAAG,MAAM,CAAC;KAC3B,CAAC;IAEN,eAAe,EAAE,MAAM,CAAC;IAGxB,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,IAAI,CAAC;IAC3C,aAAa,EAAE;QAKb,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,aAAa,EACT,OAAO,GACP;QAUE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;QAI3B,UAAU,EAAE;YAAE,GAAG,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KAC7C,CAAC;IACN,aAAa,EACT,OAAO,GACP;QAKE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IAEN,WAAW,EAAE,OAAO,CAAC;IAKrB,YAAY,EAAE,MAAM,CAAC;IAIrB,YAAY,EAAE,MAAM,GAAG,KAAK,CAAC;IAE7B,iBAAiB,EAAE,wBAAwB,CAAC;IAE5C,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,WAAW,EAAE;QACX,IAAI,EAAE,WAAW,GAAG,UAAU,CAAC;KAChC,CAAC;IAEF,gBAAgB,EAAE,MAAM,CAAC;IAGzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAE3B,cAAc,EAAE,OAAO,GAAG;QAAE,iBAAiB,CAAC,EAAE,wBAAwB,CAAA;KAAE,CAAC;IAE3E,SAAS,EAAE,OAAO,CAAC;IAEnB,WAAW,EAAE,OAAO,CAAC;IAErB,0BAA0B,EAAE,OAAO,CAAC;IAEpC,WAAW,EAAE,MAAM,CAAC;IAEpB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAEhC,QAAQ,EAAE,OAAO,CAAC;IAClB,eAAe,EACX,IAAI,GACJ,OAAO,GACP;QACE,OAAO,EAAE;YACP,KAAK,EAAE,MAAM,CAAC;YACd,WAAW,CAAC,EAAE,MAAM,CAAC;YACrB,KAAK,EAAE,qBAAqB,CAAC;SAC9B,EAAE,CAAC;KACL,CAAC;IACN,2BAA2B,EAAE,OAAO,CAAC;IAErC,OAAO,EAAE;QACP,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC;CACH,CAAC;AACF,MAAM,MAAM,qBAAqB,GAAG,UAAU,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,aAAa,CAAC;AAC1G,KAAK,wBAAwB,GAAG,MAAM,EAAE,GAAG,KAAK,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,GAAG,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smartUIOptions.types.js","sourceRoot":"","sources":["../../../../../../modules/smart-ui/implementations/legacy/smartUIOptions.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../modules/smart-ui/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;;AAElD,wBAsBG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { mkVendorLoader } from '../common';
|
|
2
|
+
import { defineModule } from '../common/modules/defineModule';
|
|
3
|
+
import { validateConfiguration } from './validateConfiguration';
|
|
4
|
+
export default defineModule('smart-ui', (globalState) => {
|
|
5
|
+
validateConfiguration(globalState);
|
|
6
|
+
const loadSmartUI = mkVendorLoader({
|
|
7
|
+
sharedConfiguration: globalState,
|
|
8
|
+
vendorName: 'legacy',
|
|
9
|
+
vendorLoader: {
|
|
10
|
+
legacy: () => import(/* webpackChunkName: 'smartui-legacy' */ './implementations/legacy'),
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
const mount = (mountElement) => {
|
|
14
|
+
const htmlElement = typeof mountElement === 'string' ? document.querySelector(mountElement) : mountElement;
|
|
15
|
+
return loadSmartUI({
|
|
16
|
+
vendorWrapperOptions: {
|
|
17
|
+
eventHub: globalState.localEventHub,
|
|
18
|
+
mountElement: htmlElement,
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
mount,
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../modules/smart-ui/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAEnE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAIhE,eAAe,YAAY,CAAgB,UAAU,EAAE,CAAC,WAAW,EAAE,EAAE;IACrE,qBAAqB,CAAC,WAAW,CAAC,CAAC;IACnC,MAAM,WAAW,GAAG,cAAc,CAAC;QACjC,mBAAmB,EAAE,WAAW;QAChC,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE;YACZ,MAAM,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,wCAAwC,CAAC,0BAA0B,CAAC;SAC1F;KACF,CAAC,CAAC;IACH,MAAM,KAAK,GAA4C,CAAC,YAAY,EAAE,EAAE;QACtE,MAAM,WAAW,GACf,OAAO,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,aAAa,CAAC,YAAY,CAAE,CAAC,CAAC,CAAC,YAAY,CAAC;QAC1F,OAAO,WAAW,CAAC;YACjB,oBAAoB,EAAE;gBACpB,QAAQ,EAAE,WAAW,CAAC,aAAa;gBACnC,YAAY,EAAE,WAAW;aAC1B;SACF,CAAC,CAAC;IACL,CAAC,CAAC;IACF,OAAO;QACL,KAAK;KACN,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { InjectedState } from '@module/common/types';
|
|
2
|
+
import type { SmartUIModule } from './definition';
|
|
3
|
+
export declare function validateConfiguration(globalState: InjectedState): asserts globalState is InjectedState & {
|
|
4
|
+
recipe: SmartUIModule['recipeConfiguration'];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=validateConfiguration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfiguration.d.ts","sourceRoot":"","sources":["../../../../modules/smart-ui/validateConfiguration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAgB,qBAAqB,CACnC,WAAW,EAAE,aAAa,GACzB,OAAO,CAAC,WAAW,IAAI,aAAa,GAAG;IAAE,MAAM,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAA;CAAE,CAOzF"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export function validateConfiguration(globalState) {
|
|
2
|
+
var _a, _b;
|
|
3
|
+
if (!((_b = (_a = globalState.recipe.smartUI) === null || _a === void 0 ? void 0 : _a.implementation) === null || _b === void 0 ? void 0 : _b.name))
|
|
4
|
+
throw new Error('SmartUI recipe configuration is missing');
|
|
5
|
+
const implementation = globalState.recipe.smartUI.implementation;
|
|
6
|
+
const name = implementation.name;
|
|
7
|
+
if (name === 'legacy' && !implementation.version)
|
|
8
|
+
throw new Error('SmartUI recipe configuration is missing version');
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=validateConfiguration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateConfiguration.js","sourceRoot":"","sources":["../../../../modules/smart-ui/validateConfiguration.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,qBAAqB,CACnC,WAA0B;;IAE1B,IAAI,CAAC,CAAA,MAAA,MAAA,WAAW,CAAC,MAAM,CAAC,OAAO,0CAAE,cAAc,0CAAE,IAAI,CAAA;QAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;IAElH,MAAM,cAAc,GAAG,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,cAAc,CAAC;IACjE,MAAM,IAAI,GAAG,cAAc,CAAC,IAAI,CAAC;IAEjC,IAAI,IAAI,KAAK,QAAQ,IAAI,CAAC,cAAc,CAAC,OAAO;QAAE,MAAM,IAAI,KAAK,CAAC,iDAAiD,CAAC,CAAC;AACvH,CAAC"}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
* Explicitly Export types (with type-only exports) and enums (without "type") at the root when importing into a typescript project via npm
|
|
3
3
|
* https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
|
|
4
4
|
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
export type {
|
|
9
|
-
export
|
|
10
|
-
export {
|
|
11
|
-
export type {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export type {
|
|
15
|
-
|
|
16
|
-
export
|
|
17
|
-
type
|
|
18
|
-
export type
|
|
19
|
-
type
|
|
20
|
-
export type IDVModuleContext = IDVModule[
|
|
5
|
+
import type { DeviceModule } from '@module/device';
|
|
6
|
+
import type { IDVModule } from '@module/idv';
|
|
7
|
+
import type { IndividualModule } from '@module/individual';
|
|
8
|
+
export type { Modules } from '@config';
|
|
9
|
+
export { ENVIRONMENTS as Environments } from '@module/common';
|
|
10
|
+
export type { Accessors, ReadonlyAccessors } from '@module/common';
|
|
11
|
+
export type { CheckSummary } from '@module/common/shared/models/CheckSummary';
|
|
12
|
+
export type { DeviceModule, Events as DeviceModuleEvents } from '@module/device';
|
|
13
|
+
export { DummyFrankieApiClient, FrankieApiClient } from '@module/frankie-client';
|
|
14
|
+
export type { IndividualModule, Events as IndividualModuleEvents } from '@module/individual';
|
|
15
|
+
export { Status as OCRStatus } from '@module/ocr';
|
|
16
|
+
export { SdkModes as SdkMode } from '@module/sdk/types';
|
|
17
|
+
export type { OneSdkRootParameters as OneSdkConfiguration, OneSdkContext } from './sdk/types';
|
|
18
|
+
export type DeviceModuleContext = DeviceModule['moduleContext'];
|
|
19
|
+
export type IndividualModuleContext = IndividualModule['moduleContext'];
|
|
20
|
+
export type IDVModuleContext = IDVModule['moduleContext'];
|
|
21
21
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../modules/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../modules/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAE3D,YAAY,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAC9E,YAAY,EAAE,YAAY,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACjF,YAAY,EAAE,gBAAgB,EAAE,MAAM,IAAI,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC;AACxD,YAAY,EAAE,oBAAoB,IAAI,mBAAmB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE9F,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,eAAe,CAAC,CAAC;AAEhE,MAAM,MAAM,uBAAuB,GAAG,gBAAgB,CAAC,eAAe,CAAC,CAAC;AAExE,MAAM,MAAM,gBAAgB,GAAG,SAAS,CAAC,eAAe,CAAC,CAAC"}
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* Explicitly Export types (with type-only exports) and enums (without "type") at the root when importing into a typescript project via npm
|
|
3
3
|
* https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-8.html#type-only-imports-and-export
|
|
4
4
|
*/
|
|
5
|
-
export { ENVIRONMENTS as Environments } from
|
|
6
|
-
export { DummyFrankieApiClient, FrankieApiClient } from
|
|
7
|
-
export { Status as OCRStatus } from
|
|
8
|
-
export { SdkModes as SdkMode } from
|
|
5
|
+
export { ENVIRONMENTS as Environments } from './common';
|
|
6
|
+
export { DummyFrankieApiClient, FrankieApiClient } from './frankie-client';
|
|
7
|
+
export { Status as OCRStatus } from './ocr';
|
|
8
|
+
export { SdkModes as SdkMode } from './sdk/types';
|
|
9
9
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../modules/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../modules/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAE,YAAY,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAI9D,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAEjF,OAAO,EAAE,MAAM,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,mBAAmB,CAAC"}
|
package/dist/release.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
v1.
|
|
2
|
-
v1.
|
|
1
|
+
v1.1.0-beta
|
|
2
|
+
v1.1.0-beta
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[795],{77836:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(
|
|
1
|
+
"use strict";(self.webpackChunkOneSdk=self.webpackChunkOneSdk||[]).push([[795],{77836:(e,t,i)=>{i.d(t,{q:()=>r});var n=i(77494),o=i(36932);const r=e=>{const{biometrics:{provider:{name:t}}}=e;return(e,...i)=>{return new n.OneSDKError((r=t,{DEFAULT:`Error from vendor SDK '${r}'`,INIT_PROCESS:"Error from biometrics submission",[o.ck.PROVIDER_OFFLINE]:`Error initialising biometrics check with '${r}'. The service doesn't appear to be available.`,[o.ck.WAITING_DOC_UPLOAD]:`Error initialising biometrics check with '${r}'. You might need to run the 'ocr' component before running 'biometrics'.`,[o.ck.WAITING_SELFIE_UPLOAD]:`Error initialising biometrics check with '${r}'. You might need to capture selfie before running 'biometrics'.`})[e],i);var r}}},33415:(e,t,i)=>{i.d(t,{g:()=>r});var n=i(77836),o=i(36932);const r=({idvClient:e,recipe:t,eventHub:i})=>{return r=void 0,c=void 0,a=function*(){const{biometrics:{is_synchronous:r}}=t,c=(0,n.q)(t),{checkStatus:s,ocrDocument:a}=yield e.initProcess({isSynchronous:!!r});(0,o.b9)(s)||(0,o.KM)(s)?i.emit("error",c(s)):i.emit(r?"results":"processing",{checkStatus:s,document:a,entityId:e.entityId})},new((s=void 0)||(s=Promise))((function(e,t){function i(e){try{o(a.next(e))}catch(e){t(e)}}function n(e){try{o(a.throw(e))}catch(e){t(e)}}function o(t){var o;t.done?e(t.value):(o=t.value,o instanceof s?o:new s((function(e){e(o)}))).then(i,n)}o((a=a.apply(r,c||[])).next())}));var r,c,s,a}},582:(e,t,i)=>{i.r(t),i.d(t,{initialise:()=>s});var n=i(33415),o=i(99434),r=i(36932),c=function(e,t,i,n){return new(i||(i=Promise))((function(o,r){function c(e){try{a(n.next(e))}catch(e){r(e)}}function s(e){try{a(n.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(c,s)}a((n=n.apply(e,t||[])).next())}))};const s=(0,o.J)("dummy-biometrics",((e,t)=>c(void 0,void 0,void 0,(function*(){const{mountElement:i,eventHub:n}=t,o=new r.Bv(e.frankieClient),{entityId:c,token:s,vendorParameters:d}=yield o.getToken();n.emit("session_data_generated",{session:{entityId:c,token:s,vendorParameters:d}});const l=yield a(e,Object.assign({idvClient:o},t));return i.appendChild(l),e.localEventHub.emit("ready",{domElement:l}),{}})))),a=(e,t)=>c(void 0,void 0,void 0,(function*(){const{recipe:i}=e,{idvClient:o,eventHub:r}=t,s=document.createElement("div");Object.assign(s.style,{position:"relative",height:"480px",width:"640px",margin:"0 auto",overflow:"hidden",display:"flex",flexDirection:"column",alignItems:"center"});const a=document.createElement("h3");a.innerText="Take a selfie!",Object.assign(a.style,{position:"relative",marginBottom:"-40px",zIndex:"1",color:"white"}),s.appendChild(a);const l=document.createElement("div");l.innerHTML='<svg style=\'display: inline-block; width: 50px; margin-left: 20px;\' xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" enable-background="new 0 0 64 64"><path d="M32,2C15.431,2,2,15.432,2,32c0,16.568,13.432,30,30,30c16.568,0,30-13.432,30-30C62,15.432,48.568,2,32,2z M25.025,50 l-0.02-0.02L24.988,50L11,35.6l7.029-7.164l6.977,7.184l21-21.619L53,21.199L25.025,50z" fill="#43a047"/></svg>',Object.assign(l.style,{height:"100%",width:"100%",position:"absolute",display:"flex",alignItems:"center",justifyContent:"center"});const u=document.createElement("video");u.autoplay=!0,u.autofocus=!0,s.appendChild(u);const m=document.createElement("img");m.src="data:image/svg+xml,%3Csvg xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22 width%3D%22740%22 height%3D%221800%22%3E%0D %3Cpath fill-opacity%3D%22.80%22 d%3D%22M0 1800V0h740v1800H0zm237-914.056c0 71.601 59.104 175.672 132.021 175.672s132.022-101.453 132.022-175.672c0-83.917-59.107-151.944-132.022-151.944C296.108 734 237 802.027 237 885.944z%22%2F%3E%0D %3Cpath fill%3D%22none%22 stroke%3D%22%23FFF%22 stroke-width%3D%223%22 d%3D%22M237 885.944c0 71.601 59.104 175.672 132.021 175.672s132.022-101.453 132.022-175.672c0-83.917-59.107-151.944-132.022-151.944C296.108 734 237 802.027 237 885.944z%22%2F%3E%0D%3C%2Fsvg%3E%0D",Object.assign(m.style,{position:"absolute",top:"0",left:"0",height:"1450px",width:"640px",marginTop:"-500px"}),s.appendChild(m);const v=yield d();u.srcObject=v;const h=document.createElement("button");return Object.assign(h.style,{position:"relative",marginTop:"-80px",borderRadius:"50%",height:"50px",width:"50px",background:"white",outline:"2px solid white",outlineOffset:"2px",zIndex:"1"}),h.onclick=()=>c(void 0,void 0,void 0,(function*(){h.disabled=!0,h.style.background="lightgrey",r.emit("detection_complete"),yield(0,n.g)({idvClient:o,recipe:i,eventHub:r}),v.getTracks().forEach((e=>e.stop())),a.remove(),u.remove(),h.remove(),m.remove(),s.appendChild(l),r.emit("session_closed")})),s.appendChild(h),s})),d=()=>c(void 0,void 0,void 0,(function*(){if(navigator.mediaDevices.getUserMedia)return navigator.mediaDevices.getUserMedia({video:{facingMode:"user"}});throw new Error("No media device")}))}}]);
|
|
2
2
|
//# sourceMappingURL=biometrics-dummy.js.map
|