@ekyc_qoobiss/qbs-ect-cmp 1.12.9 → 2.0.1
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/README.md +2 -0
- package/dist/cjs/agreement-check_17.cjs.entry.js +113 -38
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/qbs-ect-cmp.cjs.js +1 -1
- package/dist/collection/components/common/agreement-check/agreement-check.js +1 -1
- package/dist/collection/components/common/capture-error/capture-error.js +1 -1
- package/dist/collection/components/common/how-to-info/how-to-info.js +1 -1
- package/dist/collection/components/flow/agreement-info/agreement-info.js +1 -1
- package/dist/collection/components/flow/landing-validation/landing-validation.js +32 -2
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +17 -6
- package/dist/collection/components/flow/sms-code-validation/sms-code-validation.js +14 -3
- package/dist/collection/components/identification-component/identification-component.css +9 -72
- package/dist/collection/components/identification-component/identification-component.js +56 -14
- package/dist/collection/helpers/ApiCall.js +8 -1
- package/dist/collection/helpers/Cameras.js +2 -2
- package/dist/collection/helpers/Events.js +15 -5
- package/dist/collection/helpers/store.js +1 -0
- package/dist/collection/helpers/textValues.js +3 -0
- package/dist/collection/models/IAbortResult.js +1 -0
- package/dist/collection/models/OrderStatuses.js +1 -0
- package/dist/esm/agreement-check_17.entry.js +113 -38
- package/dist/esm/loader.js +1 -1
- package/dist/esm/qbs-ect-cmp.js +1 -1
- package/dist/qbs-ect-cmp/{p-1071c7e5.entry.js → p-7b895b56.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/components/flow/landing-validation/landing-validation.d.ts +4 -0
- package/dist/types/components/flow/mobile-redirect/mobile-redirect.d.ts +1 -0
- package/dist/types/components/flow/sms-code-validation/sms-code-validation.d.ts +2 -0
- package/dist/types/components/identification-component/identification-component.d.ts +3 -1
- package/dist/types/components.d.ts +7 -0
- package/dist/types/helpers/ApiCall.d.ts +1 -0
- package/dist/types/helpers/Cameras.d.ts +1 -1
- package/dist/types/helpers/Events.d.ts +2 -1
- package/dist/types/helpers/store.d.ts +1 -0
- package/dist/types/helpers/textValues.d.ts +3 -0
- package/dist/types/models/IAbortResult.d.ts +3 -0
- package/dist/types/models/IAddRequest.d.ts +1 -0
- package/dist/types/models/OrderStatuses.d.ts +2 -1
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ const patchBrowser = () => {
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
patchBrowser().then(options => {
|
|
20
|
-
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
20
|
+
return index.bootstrapLazy([["loader-dots.cjs",[[1,"loader-dots"]]],["agreement-check_17.cjs",[[1,"identification-component",{"token":[1537],"order_id":[1537],"api_url":[1537],"env":[1537],"redirect_id":[1537],"phone_number":[1537],"idSide":[32],"errorMessage":[32],"errorTitle":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"],[0,"apiError","apiErrorEmitter"]]],[0,"id-double-side",{"device":[16],"showTimeout":[32],"showInvalid":[32],"showHowTo":[32],"front":[32],"flow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoIdCapture","captureIdImage"],[0,"photoIdBackCapture","captureIdBackImage"],[0,"recordingIdCapture","capturedIdRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"id-single-side",{"device":[16],"showTimeout":[32],"showHowTo":[32],"idFlow":[32]},[[0,"captureErrorDone","captureErrorDone"],[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"photoIdCapture","captureIdImage"],[0,"verificationFinished","verificationFinished"],[0,"recordingIdCapture","capturedIdRecording"]]],[0,"user-liveness",{"device":[16],"showError":[32],"showHowTo":[32],"selfieFlow":[32]},[[0,"howToInfoDone","howToDone"],[0,"timeElapsed","timeElapsed"],[0,"captureErrorDone","captureErrorDone"],[0,"photoSelfieCapture","captureSelfieImage"],[0,"recordingSelfieCapture","capturedSelfieRecording"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-info",{"agreementsChecked":[32],"termsChecked":[32],"openAgreements":[32],"openTerms":[32]},[[0,"agreementAcceptance","agreementAcceptanceEmitted"]]],[0,"end-redirect"],[0,"error-end",{"message":[1],"errorTitle":[1,"error-title"]}],[0,"landing-validation",{"device":[16],"warningText":[32]}],[0,"mobile-redirect",{"infoTextTop":[32],"infoTextBottom":[32],"contact":[32],"invalidValue":[32],"waitingMobile":[32],"orderStatus":[32],"redirectLink":[32],"qrCode":[32],"prefilledPhone":[32]}],[0,"sms-code-validation",{"title":[32],"details":[32],"buttonText":[32],"phoneNumber":[32],"code":[32],"prefilledPhone":[32],"canSend":[32]}],[0,"id-back-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"verificationFinished","verificationFinished"],[0,"takePhoto","takePhoto"]]],[0,"selfie-capture",{"device":[16],"videoStarted":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"demoEnded":[32],"demoVideo":[32],"uploadingLink":[32],"captureHeight":[32],"captureWidth":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"agreement-check",{"agreementType":[1,"agreement-type"],"htmlContent":[32]}],[0,"id-capture",{"device":[16],"videoStarted":[32],"cameraSize":[32],"captureTaken":[32],"verified":[32],"titleMesage":[32],"showDemo":[32],"demoVideo":[32]},[[0,"changeTitle","eventChangeTitle"],[0,"videoStarted","eventVideoStarted"],[0,"takePhoto","takePhoto"],[0,"verificationFinished","verificationFinished"]]],[0,"capture-error",{"type":[1]}],[0,"how-to-info",{"idSide":[1,"id-side"],"topTitle":[32],"subTitle":[32],"imagePath":[32],"buttonText":[32]}],[0,"camera-comp",{"modelPath":[1,"model-path"],"device":[16],"probabilityThreshold":[2,"probability-threshold"],"captureMode":[1,"capture-mode"]}]]]], options);
|
|
21
21
|
});
|
|
22
22
|
|
|
23
23
|
exports.setNonce = index.setNonce;
|
|
@@ -19,7 +19,7 @@ export class AgreementCheck {
|
|
|
19
19
|
this.agreementAcceptance.emit({ agreementType: this.agreementType, result });
|
|
20
20
|
}
|
|
21
21
|
render() {
|
|
22
|
-
let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "scroll", innerHTML: this.htmlContent }), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", onClick: () => this.buttonClick(false) }, AgreementCheckValues.ButtonNo), h("button", { class: "normal-button", onClick: () => this.buttonClick(true) }, AgreementCheckValues.ButtonYes)), h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
22
|
+
let content = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "scroll", innerHTML: this.htmlContent }), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("div", { class: "d-flex two-buttons" }, h("button", { class: "normal-button red-button", onClick: () => this.buttonClick(false) }, AgreementCheckValues.ButtonNo), h("button", { class: "normal-button", onClick: () => this.buttonClick(true) }, AgreementCheckValues.ButtonYes)), h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
23
23
|
return this.htmlContent ? content : h("div", null);
|
|
24
24
|
}
|
|
25
25
|
static get is() { return "agreement-check"; }
|
|
@@ -18,7 +18,7 @@ export class CaptureError {
|
|
|
18
18
|
this.eventCaptureErrorDone.emit();
|
|
19
19
|
}
|
|
20
20
|
render() {
|
|
21
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "buletin-container" }, h("img", { class: "w-45", src: this.imagePath })), h("div", null, h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.description)), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, IdCaptureValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
21
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "buletin-container" }, h("img", { class: "w-45", src: this.imagePath })), h("div", null, h("p", { class: "color-red font-weight-bold font-size-2 text-center mt-10" }, this.description)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, IdCaptureValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, IdCaptureValues.FooterText))))));
|
|
22
22
|
}
|
|
23
23
|
static get is() { return "capture-error"; }
|
|
24
24
|
static get originalStyleUrls() {
|
|
@@ -35,7 +35,7 @@ export class HowToInfo {
|
|
|
35
35
|
}
|
|
36
36
|
render() {
|
|
37
37
|
let sub = this.subTitle != '' ? h("p", { class: "font-size-2" }, this.subTitle) : null;
|
|
38
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "div-ci align-center" }, h("img", { src: this.imagePath })), h("div", { class: "text-center" }, h("h1", null, this.topTitle), sub), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, HowToValues.FooterText))))));
|
|
38
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { class: "div-ci align-center" }, h("img", { src: this.imagePath })), h("div", { class: "text-center" }, h("h1", null, this.topTitle), sub), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, HowToValues.FooterText))))));
|
|
39
39
|
}
|
|
40
40
|
static get is() { return "how-to-info"; }
|
|
41
41
|
static get originalStyleUrls() {
|
|
@@ -39,7 +39,7 @@ export class AgreementInfo {
|
|
|
39
39
|
render() {
|
|
40
40
|
let agreementsCheck = h("agreement-check", { agreementType: "agreement" });
|
|
41
41
|
let termsCheck = h("agreement-check", { agreementType: "terms" });
|
|
42
|
-
let mainComp = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, AgreementInfoValues.Title), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), AgreementInfoValues.Agreement)), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), AgreementInfoValues.Terms))), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, AgreementInfoValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
42
|
+
let mainComp = (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, AgreementInfoValues.Title), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.agreementsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.agreementsChecked }), AgreementInfoValues.Agreement)), h("div", { class: "d-flex space-between align-center" }, h("h3", { class: "main-text font-size-2", onClick: () => this.termsClicked() }, h("input", { type: "checkbox", readOnly: true, checked: this.termsChecked }), AgreementInfoValues.Terms))), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, AgreementInfoValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, AgreementInfoValues.FooterText))))));
|
|
43
43
|
return this.openAgreements ? agreementsCheck : this.openTerms ? termsCheck : mainComp;
|
|
44
44
|
}
|
|
45
45
|
static get is() { return "agreement-info"; }
|
|
@@ -8,13 +8,14 @@ import idValidation from '../../../assets/landing/validation.svg';
|
|
|
8
8
|
import store from '../../../helpers/store';
|
|
9
9
|
import Events from '../../../helpers/Events';
|
|
10
10
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
11
|
+
import { ApiCall } from '../../../helpers/ApiCall';
|
|
11
12
|
export class LandingValidation {
|
|
12
13
|
constructor() {
|
|
13
14
|
this.device = undefined;
|
|
14
15
|
this.warningText = undefined;
|
|
15
16
|
}
|
|
16
17
|
async componentWillLoad() {
|
|
17
|
-
|
|
18
|
+
this.apiCall = new ApiCall();
|
|
18
19
|
await this.initRequest();
|
|
19
20
|
}
|
|
20
21
|
componentDidLoad() {
|
|
@@ -42,8 +43,19 @@ export class LandingValidation {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
}
|
|
46
|
+
async leaveFlow() {
|
|
47
|
+
store.initialised = false;
|
|
48
|
+
try {
|
|
49
|
+
await this.apiCall.AbortRequest();
|
|
50
|
+
Events.flowAborted();
|
|
51
|
+
}
|
|
52
|
+
catch (e) {
|
|
53
|
+
Events.flowAborted();
|
|
54
|
+
this.apiErrorEvent.emit(e);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
45
57
|
render() {
|
|
46
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", disabled: !store.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
58
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", null, h("h1", { class: "text-center" }, LandingValues.Title), h("div", { class: "d-flex space-between align-center" }, h("p", { class: "main-text font-size-2" }, LandingValues.Description), h("div", { class: "img-info" }, h("div", { class: "i-effect" }), h("img", { src: info })))), h("div", { class: "info-container" }, h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idSvg })), h("h3", null, LandingValues.IdInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idDevice })), h("h3", null, LandingValues.DeviceInfo)), h("div", { class: "img-text" }, h("div", { class: "bg-img" }, h("img", { src: idValidation })), h("h3", null, LandingValues.SmsInfo))), h("div", { class: "terms-container" }, h("h3", { class: "font-size-2 mb-1 text-center" }, this.warningText)), h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", type: "button", disabled: !store.initialised, onClick: () => this.startFlow() }, LandingValues.Button), h("p", { class: "main-text font-size-2 link-text mb-0", onClick: () => this.leaveFlow() }, LandingValues.ButtonLeave), h("p", { class: "main-text font-size-18 text-right mb-0" }, LandingValues.FooterText))))));
|
|
47
59
|
}
|
|
48
60
|
static get is() { return "landing-validation"; }
|
|
49
61
|
static get originalStyleUrls() {
|
|
@@ -85,4 +97,22 @@ export class LandingValidation {
|
|
|
85
97
|
"warningText": {}
|
|
86
98
|
};
|
|
87
99
|
}
|
|
100
|
+
static get events() {
|
|
101
|
+
return [{
|
|
102
|
+
"method": "apiErrorEvent",
|
|
103
|
+
"name": "apiError",
|
|
104
|
+
"bubbles": true,
|
|
105
|
+
"cancelable": true,
|
|
106
|
+
"composed": true,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": ""
|
|
110
|
+
},
|
|
111
|
+
"complexType": {
|
|
112
|
+
"original": "any",
|
|
113
|
+
"resolved": "any",
|
|
114
|
+
"references": {}
|
|
115
|
+
}
|
|
116
|
+
}];
|
|
117
|
+
}
|
|
88
118
|
}
|
|
@@ -3,6 +3,7 @@ import { MobileRedirectValues } from '../../../helpers/textValues';
|
|
|
3
3
|
import QRCode from 'qrcode';
|
|
4
4
|
import store from '../../../helpers/store';
|
|
5
5
|
import { ApiCall } from '../../../helpers/ApiCall';
|
|
6
|
+
import Events from '../../../helpers/Events';
|
|
6
7
|
import { OrderStatuses } from '../../../models/OrderStatuses';
|
|
7
8
|
import { FlowStatus } from '../../../models/FlowStatus';
|
|
8
9
|
export class MobileRedirect {
|
|
@@ -16,6 +17,7 @@ export class MobileRedirect {
|
|
|
16
17
|
this.orderStatus = undefined;
|
|
17
18
|
this.redirectLink = undefined;
|
|
18
19
|
this.qrCode = undefined;
|
|
20
|
+
this.prefilledPhone = false;
|
|
19
21
|
this.apiCall = new ApiCall();
|
|
20
22
|
this.invalidValue = false;
|
|
21
23
|
this.waitingMobile = false;
|
|
@@ -25,7 +27,11 @@ export class MobileRedirect {
|
|
|
25
27
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
26
28
|
let envUri = store.environment == 'PROD' ? 'ect' : 'test';
|
|
27
29
|
let baseUri = store.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
28
|
-
this.redirectLink = baseUri + envUri + '?redirectId=' + store.redirectId;
|
|
30
|
+
this.redirectLink = baseUri + envUri + '/identification?redirectId=' + store.redirectId;
|
|
31
|
+
if (store.phoneNumber != '') {
|
|
32
|
+
this.contact = store.phoneNumber;
|
|
33
|
+
this.prefilledPhone = true;
|
|
34
|
+
}
|
|
29
35
|
var self = this;
|
|
30
36
|
QRCode.toDataURL(this.redirectLink, { type: 'image/png', errorCorrectionLevel: 'M', scale: 6 }, function (error, url) {
|
|
31
37
|
if (error)
|
|
@@ -55,6 +61,12 @@ export class MobileRedirect {
|
|
|
55
61
|
this.infoTextTop = MobileRedirectValues.InfoWaiting;
|
|
56
62
|
this.waitingMobile = true;
|
|
57
63
|
}
|
|
64
|
+
if (this.orderStatus == OrderStatuses.Aborted) {
|
|
65
|
+
this.waitingMobile = false;
|
|
66
|
+
this.infoTextTop = MobileRedirectValues.InfoAborted;
|
|
67
|
+
Events.init(window);
|
|
68
|
+
Events.flowAborted();
|
|
69
|
+
}
|
|
58
70
|
}
|
|
59
71
|
async buttonClick() {
|
|
60
72
|
if (this.contact == '' || this.contact.length != 10) {
|
|
@@ -76,13 +88,11 @@ export class MobileRedirect {
|
|
|
76
88
|
if (this.contact.length > 10) {
|
|
77
89
|
this.contact = this.contact.substring(0, 10);
|
|
78
90
|
}
|
|
79
|
-
|
|
80
|
-
this.invalidValue = false;
|
|
81
|
-
}
|
|
91
|
+
this.invalidValue = this.contact.length != 10;
|
|
82
92
|
ev.target.value = this.contact;
|
|
83
93
|
}
|
|
84
94
|
render() {
|
|
85
|
-
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { hidden: this.waitingMobile }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop)), h("div", { class: "qr-canvas align-center" }, h("img", { src: this.qrCode })), h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextBottom)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, h("b", null, MobileRedirectValues.Validation)), h("input", { type: "text", id: "codeInput", class: "main-input", value: this.contact, onInput: ev => this.handleChangeContact(ev) })), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), h("p", { class: "main-text font-size-18 text-right mb-0" }, MobileRedirectValues.FooterText)))), h("div", { hidden: this.waitingMobile == false }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop))))));
|
|
95
|
+
return (h("div", { class: "container" }, h("div", { class: "row" }, h("div", { hidden: this.waitingMobile }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop)), h("div", { class: "qr-canvas align-center" }, h("img", { src: this.qrCode })), h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextBottom)), h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1 color-red", hidden: this.invalidValue == false }, h("b", null, MobileRedirectValues.Validation)), h("input", { type: "text", id: "codeInput", class: "main-input", disabled: this.prefilledPhone, value: this.contact, onInput: ev => this.handleChangeContact(ev) })), h("div", { class: "pos-relative" }, h("div", { class: "btn-buletin" }, h("button", { class: "main-button", onClick: () => this.buttonClick() }, "Trimite"), h("p", { class: "main-text font-size-18 text-right mb-0" }, MobileRedirectValues.FooterText)))), h("div", { hidden: this.waitingMobile == false }, h("div", { class: "text-center" }, h("p", { class: "font-size-2" }, this.infoTextTop))))));
|
|
86
96
|
}
|
|
87
97
|
static get is() { return "mobile-redirect"; }
|
|
88
98
|
static get originalStyleUrls() {
|
|
@@ -104,7 +114,8 @@ export class MobileRedirect {
|
|
|
104
114
|
"waitingMobile": {},
|
|
105
115
|
"orderStatus": {},
|
|
106
116
|
"redirectLink": {},
|
|
107
|
-
"qrCode": {}
|
|
117
|
+
"qrCode": {},
|
|
118
|
+
"prefilledPhone": {}
|
|
108
119
|
};
|
|
109
120
|
}
|
|
110
121
|
static get events() {
|
|
@@ -10,6 +10,8 @@ export class SmsCodeValidation {
|
|
|
10
10
|
this.buttonText = undefined;
|
|
11
11
|
this.phoneNumber = undefined;
|
|
12
12
|
this.code = undefined;
|
|
13
|
+
this.prefilledPhone = false;
|
|
14
|
+
this.canSend = false;
|
|
13
15
|
this.apiCall = new ApiCall();
|
|
14
16
|
}
|
|
15
17
|
async doAction() {
|
|
@@ -39,6 +41,11 @@ export class SmsCodeValidation {
|
|
|
39
41
|
this.title = PhoneValidationValues.Title;
|
|
40
42
|
this.details = PhoneValidationValues.Description;
|
|
41
43
|
this.buttonText = PhoneValidationValues.Button;
|
|
44
|
+
if (store.phoneNumber != '') {
|
|
45
|
+
this.phoneNumber = store.phoneNumber;
|
|
46
|
+
this.prefilledPhone = true;
|
|
47
|
+
this.canSend = true;
|
|
48
|
+
}
|
|
42
49
|
}
|
|
43
50
|
if (store.flowStatus == FlowStatus.CODE || store.flowStatus == FlowStatus.CODEERROR) {
|
|
44
51
|
this.title = CodeValidationValues.Title;
|
|
@@ -51,6 +58,7 @@ export class SmsCodeValidation {
|
|
|
51
58
|
this.phoneNumber = value.replace(/\D/g, '');
|
|
52
59
|
if (this.phoneNumber.length > 10)
|
|
53
60
|
this.phoneNumber = this.phoneNumber.substring(0, 10);
|
|
61
|
+
this.canSend = this.phoneNumber.length == 10;
|
|
54
62
|
ev.target.value = this.phoneNumber;
|
|
55
63
|
}
|
|
56
64
|
handleChangeCode(ev) {
|
|
@@ -58,6 +66,7 @@ export class SmsCodeValidation {
|
|
|
58
66
|
this.code = value;
|
|
59
67
|
if (this.code.length > 4)
|
|
60
68
|
this.code = this.code.substring(0, 4);
|
|
69
|
+
this.canSend = this.code.length == 4;
|
|
61
70
|
ev.target.value = this.code;
|
|
62
71
|
}
|
|
63
72
|
render() {
|
|
@@ -67,12 +76,12 @@ export class SmsCodeValidation {
|
|
|
67
76
|
errorBlock = h("p", { class: "main-text font-size-18 mt-15 color-red text-center" }, CodeValidationValues.Error);
|
|
68
77
|
}
|
|
69
78
|
if (store.flowStatus == FlowStatus.PHONE) {
|
|
70
|
-
inputBlock = (h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, PhoneValidationValues.Label)), h("input", { type: "tel", id: "phoneInput", class: "main-input", onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
|
|
79
|
+
inputBlock = (h("div", { class: "input-container mb-15" }, h("label", { class: "font-size-18 mb-1" }, h("b", null, PhoneValidationValues.Label)), h("input", { type: "tel", id: "phoneInput", class: "main-input", disabled: this.prefilledPhone, onInput: ev => this.handleChangePhone(ev), value: this.phoneNumber })));
|
|
71
80
|
}
|
|
72
81
|
else {
|
|
73
82
|
inputBlock = (h("div", { class: "input-container mb-15" }, h("input", { type: "text", id: "codeInput", class: "main-input", onInput: ev => this.handleChangeCode(ev), value: this.code })));
|
|
74
83
|
}
|
|
75
|
-
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title), errorBlock == null ? h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, h("div", { class: "btn-buletin" }, h("button", { id: "action", class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, PhoneValidationValues.FooterText)))));
|
|
84
|
+
return (h("div", { class: "container" }, h("div", { class: "row row-validare" }, h("div", null, h("h1", { class: "text-center" }, this.title), errorBlock == null ? h("p", { class: "main-text font-size-2 mt-15 mb-20 text-center" }, this.details) : errorBlock), inputBlock, h("div", { class: "pos-relative show-bottom" }, h("div", { class: "btn-buletin" }, h("button", { id: "action", disabled: !this.canSend, class: "main-button", onClick: () => this.doAction() }, this.buttonText), h("p", { class: "main-text font-size-18 text-right mb-0" }, PhoneValidationValues.FooterText))))));
|
|
76
85
|
}
|
|
77
86
|
static get is() { return "sms-code-validation"; }
|
|
78
87
|
static get originalStyleUrls() {
|
|
@@ -91,7 +100,9 @@ export class SmsCodeValidation {
|
|
|
91
100
|
"details": {},
|
|
92
101
|
"buttonText": {},
|
|
93
102
|
"phoneNumber": {},
|
|
94
|
-
"code": {}
|
|
103
|
+
"code": {},
|
|
104
|
+
"prefilledPhone": {},
|
|
105
|
+
"canSend": {}
|
|
95
106
|
};
|
|
96
107
|
}
|
|
97
108
|
static get events() {
|
|
@@ -409,6 +409,10 @@ body {
|
|
|
409
409
|
font-weight: 400;
|
|
410
410
|
color: #71727a;
|
|
411
411
|
}
|
|
412
|
+
.link-text {
|
|
413
|
+
margin-top: 1vh;
|
|
414
|
+
text-decoration: underline;
|
|
415
|
+
}
|
|
412
416
|
.font-size-2 {
|
|
413
417
|
font-size: 2vh;
|
|
414
418
|
}
|
|
@@ -512,6 +516,9 @@ a {
|
|
|
512
516
|
width: 100%;
|
|
513
517
|
bottom: 0;
|
|
514
518
|
}
|
|
519
|
+
.show-bottom {
|
|
520
|
+
bottom: -2vh;
|
|
521
|
+
}
|
|
515
522
|
.row-validare .main-input {
|
|
516
523
|
padding: 14px 12px;
|
|
517
524
|
border-radius: 12px;
|
|
@@ -642,13 +649,12 @@ a {
|
|
|
642
649
|
.pos-relative {
|
|
643
650
|
position: relative;
|
|
644
651
|
}
|
|
652
|
+
|
|
645
653
|
.pos-absolute {
|
|
646
654
|
position: absolute;
|
|
647
655
|
}
|
|
648
656
|
.btn-buletin {
|
|
649
|
-
|
|
650
|
-
width: calc(100% - 5vh);
|
|
651
|
-
bottom: 5vh;
|
|
657
|
+
text-align: center;
|
|
652
658
|
}
|
|
653
659
|
.buletin-container img {
|
|
654
660
|
width: 60%;
|
|
@@ -735,15 +741,6 @@ a {
|
|
|
735
741
|
perspective: 1000px;
|
|
736
742
|
rotate: 120deg 0deg;
|
|
737
743
|
}
|
|
738
|
-
.dot-effect {
|
|
739
|
-
position: fixed;
|
|
740
|
-
bottom: 13vh;
|
|
741
|
-
width: calc(100% - 5vh);
|
|
742
|
-
text-align: center;
|
|
743
|
-
display: flex;
|
|
744
|
-
align-items: center;
|
|
745
|
-
justify-content: center;
|
|
746
|
-
}
|
|
747
744
|
.coin-flip {
|
|
748
745
|
animation: flip 0.4s ease-in;
|
|
749
746
|
animation-delay: 0.5s;
|
|
@@ -873,47 +870,6 @@ a {
|
|
|
873
870
|
visibility: visible;
|
|
874
871
|
}
|
|
875
872
|
}
|
|
876
|
-
.dot-shuttle {
|
|
877
|
-
position: relative;
|
|
878
|
-
left: -15px;
|
|
879
|
-
width: 12px;
|
|
880
|
-
height: 12px;
|
|
881
|
-
border-radius: 6px;
|
|
882
|
-
background-color: #1feaa6;
|
|
883
|
-
color: transparent;
|
|
884
|
-
margin: -1px 0;
|
|
885
|
-
opacity: 1;
|
|
886
|
-
}
|
|
887
|
-
|
|
888
|
-
.dot-shuttle::before {
|
|
889
|
-
opacity: 0.5;
|
|
890
|
-
}
|
|
891
|
-
.dot-shuttle::after {
|
|
892
|
-
opacity: 0.5;
|
|
893
|
-
}
|
|
894
|
-
.dot-shuttle::before,
|
|
895
|
-
.dot-shuttle::after {
|
|
896
|
-
content: '';
|
|
897
|
-
display: inline-block;
|
|
898
|
-
position: absolute;
|
|
899
|
-
top: 0;
|
|
900
|
-
width: 12px;
|
|
901
|
-
height: 12px;
|
|
902
|
-
border-radius: 6px;
|
|
903
|
-
background-color: #1feaa6;
|
|
904
|
-
color: transparent;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
.dot-shuttle::before {
|
|
908
|
-
left: 0;
|
|
909
|
-
animation: dotShuttle 2s infinite ease-out;
|
|
910
|
-
}
|
|
911
|
-
|
|
912
|
-
.dot-shuttle::after {
|
|
913
|
-
left: 0;
|
|
914
|
-
animation: dotShuttle 2s infinite ease-out;
|
|
915
|
-
animation-delay: 1s;
|
|
916
|
-
}
|
|
917
873
|
.buletin-container.rotate-x img {
|
|
918
874
|
animation: transform-rotate-x 2s infinite ease-in;
|
|
919
875
|
}
|
|
@@ -952,22 +908,6 @@ a {
|
|
|
952
908
|
transform: perspective(600px) rotateX(40deg);
|
|
953
909
|
}
|
|
954
910
|
}
|
|
955
|
-
@keyframes dotShuttle {
|
|
956
|
-
0%,
|
|
957
|
-
50%,
|
|
958
|
-
100% {
|
|
959
|
-
transform: translateX(0);
|
|
960
|
-
opacity: 1;
|
|
961
|
-
}
|
|
962
|
-
25% {
|
|
963
|
-
transform: translateX(-30px);
|
|
964
|
-
opacity: 0.5;
|
|
965
|
-
}
|
|
966
|
-
75% {
|
|
967
|
-
transform: translateX(30px);
|
|
968
|
-
opacity: 0.5;
|
|
969
|
-
}
|
|
970
|
-
}
|
|
971
911
|
@media only screen and (max-width: 350px) {
|
|
972
912
|
.second-input {
|
|
973
913
|
width: 36px;
|
|
@@ -1035,7 +975,4 @@ a {
|
|
|
1035
975
|
right: auto;
|
|
1036
976
|
top: -10vh;
|
|
1037
977
|
}
|
|
1038
|
-
.dot-effect {
|
|
1039
|
-
max-width: 490px;
|
|
1040
|
-
}
|
|
1041
978
|
}
|
|
@@ -9,6 +9,7 @@ import Events from '../../helpers/Events';
|
|
|
9
9
|
import * as uuid from 'uuid';
|
|
10
10
|
export class IdentificationComponent {
|
|
11
11
|
async onTokenChange(newValue, _oldValue) {
|
|
12
|
+
//console.log('Token change called with value: ' + newValue);
|
|
12
13
|
if (newValue == '') {
|
|
13
14
|
newValue = store.token;
|
|
14
15
|
return;
|
|
@@ -19,10 +20,10 @@ export class IdentificationComponent {
|
|
|
19
20
|
}
|
|
20
21
|
}
|
|
21
22
|
async onOrderIdChange(newValue, _oldValue) {
|
|
22
|
-
|
|
23
|
+
//console.log('OrderId change called with value: ' + newValue);
|
|
24
|
+
if (store.requestId !== newValue && newValue != '') {
|
|
23
25
|
store.requestId = newValue;
|
|
24
26
|
store.initialised = false;
|
|
25
|
-
sessionStorage.clear();
|
|
26
27
|
if (store.flowStatus != FlowStatus.LANDING) {
|
|
27
28
|
store.flowStatus = FlowStatus.LANDING;
|
|
28
29
|
}
|
|
@@ -48,6 +49,7 @@ export class IdentificationComponent {
|
|
|
48
49
|
}
|
|
49
50
|
}
|
|
50
51
|
async onRedirectIdChange(newValue, _oldValue) {
|
|
52
|
+
//console.log('RedirectId change called with value: ' + newValue);
|
|
51
53
|
if (store.redirectId != '') {
|
|
52
54
|
newValue = store.redirectId;
|
|
53
55
|
return;
|
|
@@ -57,17 +59,26 @@ export class IdentificationComponent {
|
|
|
57
59
|
}
|
|
58
60
|
await this.initializeRequest();
|
|
59
61
|
}
|
|
62
|
+
async onPhoneChange(newValue, _oldValue) {
|
|
63
|
+
if (store.phoneNumber != '') {
|
|
64
|
+
newValue = store.phoneNumber;
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
if (store.phoneNumber !== newValue) {
|
|
68
|
+
store.phoneNumber = newValue;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
60
71
|
agreementAcceptanceEmitted(data) {
|
|
61
72
|
try {
|
|
62
73
|
this.apiCall.GenerateAgreement(data.detail.agreementType);
|
|
63
74
|
}
|
|
64
75
|
catch (e) {
|
|
65
|
-
this.apiErrorEmitter(e);
|
|
76
|
+
this.apiErrorEmitter(e, 'Agreement Acceptance');
|
|
66
77
|
}
|
|
67
78
|
}
|
|
68
|
-
async apiErrorEmitter(data) {
|
|
79
|
+
async apiErrorEmitter(data, zone) {
|
|
69
80
|
var _a, _b;
|
|
70
|
-
let apiLogData = { message: '', stack: '' };
|
|
81
|
+
let apiLogData = { message: '', stack: '', zone };
|
|
71
82
|
if (data.detail) {
|
|
72
83
|
this.errorTitle = (_a = data.detail.message) !== null && _a !== void 0 ? _a : '';
|
|
73
84
|
this.errorMessage = (_b = data.detail.stack) !== null && _b !== void 0 ? _b : '';
|
|
@@ -91,6 +102,7 @@ export class IdentificationComponent {
|
|
|
91
102
|
this.api_url = undefined;
|
|
92
103
|
this.env = undefined;
|
|
93
104
|
this.redirect_id = undefined;
|
|
105
|
+
this.phone_number = undefined;
|
|
94
106
|
this.idSide = '';
|
|
95
107
|
this.errorMessage = undefined;
|
|
96
108
|
this.errorTitle = undefined;
|
|
@@ -102,19 +114,25 @@ export class IdentificationComponent {
|
|
|
102
114
|
store.apiBaseUrl = this.api_url;
|
|
103
115
|
store.environment = this.env;
|
|
104
116
|
if (this.token) {
|
|
117
|
+
//console.log('Store Token set with property value: ' + this.token);
|
|
105
118
|
store.token = this.token;
|
|
106
119
|
}
|
|
107
|
-
else {
|
|
120
|
+
else if (store.token == '') {
|
|
108
121
|
store.token = sessionStorage.getItem(SessionKeys.TokenKey);
|
|
122
|
+
this.token = store.token;
|
|
123
|
+
//console.log('Store Token set with session value: ' + store.token);
|
|
109
124
|
}
|
|
110
125
|
if (this.redirect_id) {
|
|
111
126
|
store.redirectId = this.redirect_id;
|
|
112
127
|
}
|
|
128
|
+
if (this.phone_number) {
|
|
129
|
+
store.phoneNumber = this.phone_number;
|
|
130
|
+
}
|
|
113
131
|
var flowSt = sessionStorage.getItem(SessionKeys.FlowStatusKey);
|
|
114
132
|
if (flowSt) {
|
|
115
133
|
store.flowStatus = FlowStatus[flowSt];
|
|
116
134
|
}
|
|
117
|
-
|
|
135
|
+
else {
|
|
118
136
|
store.flowStatus = FlowStatus.LANDING;
|
|
119
137
|
}
|
|
120
138
|
var ini = sessionStorage.getItem(SessionKeys.InitialisedKey);
|
|
@@ -134,15 +152,19 @@ export class IdentificationComponent {
|
|
|
134
152
|
store.phoneValidation = true;
|
|
135
153
|
}
|
|
136
154
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
137
|
-
if (this.order_id) {
|
|
138
|
-
|
|
139
|
-
|
|
155
|
+
if (this.order_id && this.order_id != '') {
|
|
156
|
+
//console.log('Current RequestId has value: ' + this.order_id);
|
|
157
|
+
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
158
|
+
//console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
|
|
140
159
|
store.flowStatus = FlowStatus.LANDING;
|
|
141
160
|
store.initialised = false;
|
|
142
161
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
162
|
+
store.requestId = this.order_id;
|
|
163
|
+
}
|
|
164
|
+
else if (savedRequest) {
|
|
165
|
+
//console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
|
|
166
|
+
store.requestId = savedRequest;
|
|
167
|
+
this.order_id = savedRequest;
|
|
146
168
|
}
|
|
147
169
|
this.apiCall = new ApiCall();
|
|
148
170
|
await this.initializeRequest();
|
|
@@ -169,7 +191,7 @@ export class IdentificationComponent {
|
|
|
169
191
|
}
|
|
170
192
|
}
|
|
171
193
|
catch (e) {
|
|
172
|
-
this.apiErrorEmitter(e);
|
|
194
|
+
this.apiErrorEmitter(e, 'Request Initialisation RequestId:' + store.requestId + ' RedirectId:' + store.redirectId);
|
|
173
195
|
}
|
|
174
196
|
}
|
|
175
197
|
render() {
|
|
@@ -309,6 +331,23 @@ export class IdentificationComponent {
|
|
|
309
331
|
},
|
|
310
332
|
"attribute": "redirect_id",
|
|
311
333
|
"reflect": true
|
|
334
|
+
},
|
|
335
|
+
"phone_number": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"mutable": true,
|
|
338
|
+
"complexType": {
|
|
339
|
+
"original": "string",
|
|
340
|
+
"resolved": "string",
|
|
341
|
+
"references": {}
|
|
342
|
+
},
|
|
343
|
+
"required": false,
|
|
344
|
+
"optional": false,
|
|
345
|
+
"docs": {
|
|
346
|
+
"tags": [],
|
|
347
|
+
"text": ""
|
|
348
|
+
},
|
|
349
|
+
"attribute": "phone_number",
|
|
350
|
+
"reflect": true
|
|
312
351
|
}
|
|
313
352
|
};
|
|
314
353
|
}
|
|
@@ -335,6 +374,9 @@ export class IdentificationComponent {
|
|
|
335
374
|
}, {
|
|
336
375
|
"propName": "redirect_id",
|
|
337
376
|
"methodName": "onRedirectIdChange"
|
|
377
|
+
}, {
|
|
378
|
+
"propName": "phone_number",
|
|
379
|
+
"methodName": "onPhoneChange"
|
|
338
380
|
}];
|
|
339
381
|
}
|
|
340
382
|
static get listeners() {
|
|
@@ -55,10 +55,12 @@ export class ApiCall {
|
|
|
55
55
|
return jsonResp.valid;
|
|
56
56
|
}
|
|
57
57
|
async AddIdentificationRequest(deviceInfo) {
|
|
58
|
+
//console.log('Calling identity request with store:' + JSON.stringify(store));
|
|
58
59
|
let data = {
|
|
59
60
|
requestId: store.requestId,
|
|
60
61
|
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
61
62
|
redirectId: store.redirectId,
|
|
63
|
+
phoneNumber: store.phoneNumber,
|
|
62
64
|
};
|
|
63
65
|
let jsonResp = await this.post(this.urls.IdentityInsert, JSON.stringify(data));
|
|
64
66
|
if (store.requestId == '') {
|
|
@@ -67,6 +69,7 @@ export class ApiCall {
|
|
|
67
69
|
store.hasIdBack = jsonResp.hasIdBack;
|
|
68
70
|
store.agreementsValidation = jsonResp.agreementsValidation;
|
|
69
71
|
store.phoneValidation = jsonResp.phoneValidation;
|
|
72
|
+
store.phoneNumber = jsonResp.phoneNumber;
|
|
70
73
|
return true;
|
|
71
74
|
}
|
|
72
75
|
async UploadFileForRequestB64(requestId, type, file) {
|
|
@@ -98,7 +101,7 @@ export class ApiCall {
|
|
|
98
101
|
return OrderStatuses[resp.status];
|
|
99
102
|
}
|
|
100
103
|
async SendLink(link, phoneNumber) {
|
|
101
|
-
let data = { link: link, phoneNumber: phoneNumber };
|
|
104
|
+
let data = { requestId: store.requestId, link: link, phoneNumber: phoneNumber };
|
|
102
105
|
let resp = await this.post(this.urls.SendLink, JSON.stringify(data));
|
|
103
106
|
return resp.sent;
|
|
104
107
|
}
|
|
@@ -110,4 +113,8 @@ export class ApiCall {
|
|
|
110
113
|
}
|
|
111
114
|
catch (_a) { }
|
|
112
115
|
}
|
|
116
|
+
async AbortRequest() {
|
|
117
|
+
let result = await this.post(this.urls.AbortRequest, JSON.stringify({ requestId: store.requestId }));
|
|
118
|
+
return result.saved;
|
|
119
|
+
}
|
|
113
120
|
}
|