@ekyc_qoobiss/qbs-ect-cmp 2.0.4 → 2.0.6
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/cjs/agreement-check_17.cjs.entry.js +26 -11
- package/dist/collection/components/flow/mobile-redirect/mobile-redirect.js +1 -1
- package/dist/collection/components/identification-component/identification-component.js +19 -9
- package/dist/collection/helpers/ApiCall.js +2 -1
- package/dist/collection/helpers/store.js +4 -0
- package/dist/esm/agreement-check_17.entry.js +26 -11
- package/dist/qbs-ect-cmp/{p-63356af3.entry.js → p-4eb62bf8.entry.js} +2 -2
- package/dist/qbs-ect-cmp/qbs-ect-cmp.esm.js +1 -1
- package/dist/types/helpers/store.d.ts +1 -0
- package/package.json +1 -1
|
@@ -351,6 +351,7 @@ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
|
351
351
|
const { state, onChange } = createStore({
|
|
352
352
|
flowStatus: FlowStatus.LANDING,
|
|
353
353
|
environment: 'PROD',
|
|
354
|
+
debug: false,
|
|
354
355
|
requestId: '',
|
|
355
356
|
redirectId: '',
|
|
356
357
|
initialised: false,
|
|
@@ -363,6 +364,9 @@ const { state, onChange } = createStore({
|
|
|
363
364
|
phoneNumber: '',
|
|
364
365
|
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
365
366
|
});
|
|
367
|
+
onChange('environment', value => {
|
|
368
|
+
state.debug = value == 'QA';
|
|
369
|
+
});
|
|
366
370
|
onChange('flowStatus', value => {
|
|
367
371
|
sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
|
|
368
372
|
});
|
|
@@ -438,7 +442,8 @@ class ApiCall {
|
|
|
438
442
|
return jsonResp.valid;
|
|
439
443
|
}
|
|
440
444
|
async AddIdentificationRequest(deviceInfo) {
|
|
441
|
-
|
|
445
|
+
if (state.debug)
|
|
446
|
+
console.log('Calling identity request with store:' + JSON.stringify(state));
|
|
442
447
|
let data = {
|
|
443
448
|
requestId: state.requestId,
|
|
444
449
|
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
@@ -6008,7 +6013,8 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
|
|
|
6008
6013
|
|
|
6009
6014
|
const IdentificationComponent = class {
|
|
6010
6015
|
async onTokenChange(newValue, _oldValue) {
|
|
6011
|
-
|
|
6016
|
+
if (state.debug)
|
|
6017
|
+
console.log('Token change called with value: ' + newValue);
|
|
6012
6018
|
if (newValue == '') {
|
|
6013
6019
|
newValue = state.token;
|
|
6014
6020
|
return;
|
|
@@ -6019,7 +6025,8 @@ const IdentificationComponent = class {
|
|
|
6019
6025
|
}
|
|
6020
6026
|
}
|
|
6021
6027
|
async onOrderIdChange(newValue, _oldValue) {
|
|
6022
|
-
|
|
6028
|
+
if (state.debug)
|
|
6029
|
+
console.log('OrderId change called with value: ' + newValue);
|
|
6023
6030
|
if (state.requestId !== newValue && newValue != '') {
|
|
6024
6031
|
state.requestId = newValue;
|
|
6025
6032
|
state.initialised = false;
|
|
@@ -6048,7 +6055,8 @@ const IdentificationComponent = class {
|
|
|
6048
6055
|
}
|
|
6049
6056
|
}
|
|
6050
6057
|
async onRedirectIdChange(newValue, _oldValue) {
|
|
6051
|
-
|
|
6058
|
+
if (state.debug)
|
|
6059
|
+
console.log('RedirectId change called with value: ' + newValue);
|
|
6052
6060
|
if (state.redirectId != '') {
|
|
6053
6061
|
newValue = state.redirectId;
|
|
6054
6062
|
return;
|
|
@@ -6112,20 +6120,24 @@ const IdentificationComponent = class {
|
|
|
6112
6120
|
async componentWillLoad() {
|
|
6113
6121
|
Events.init(window);
|
|
6114
6122
|
state.apiBaseUrl = this.api_url;
|
|
6115
|
-
|
|
6123
|
+
if (this.env && this.env != '') {
|
|
6124
|
+
state.environment = this.env;
|
|
6125
|
+
}
|
|
6116
6126
|
this.logInit = {
|
|
6117
6127
|
store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
|
|
6118
6128
|
session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
|
|
6119
6129
|
paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
|
|
6120
6130
|
};
|
|
6121
6131
|
if (this.token) {
|
|
6122
|
-
|
|
6132
|
+
if (state.debug)
|
|
6133
|
+
console.log('Store Token set with property value: ' + this.token);
|
|
6123
6134
|
state.token = this.token;
|
|
6124
6135
|
}
|
|
6125
6136
|
else if (state.token == '') {
|
|
6126
6137
|
state.token = sessionStorage.getItem(SessionKeys.TokenKey);
|
|
6127
6138
|
this.token = state.token;
|
|
6128
|
-
|
|
6139
|
+
if (state.debug)
|
|
6140
|
+
console.log('Store Token set with session value: ' + state.token);
|
|
6129
6141
|
}
|
|
6130
6142
|
if (this.redirect_id) {
|
|
6131
6143
|
state.redirectId = this.redirect_id;
|
|
@@ -6158,16 +6170,19 @@ const IdentificationComponent = class {
|
|
|
6158
6170
|
}
|
|
6159
6171
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
6160
6172
|
if (this.order_id && this.order_id != '') {
|
|
6161
|
-
|
|
6173
|
+
if (state.debug)
|
|
6174
|
+
console.log('Current RequestId has value: ' + this.order_id);
|
|
6162
6175
|
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
6163
|
-
|
|
6176
|
+
if (state.debug)
|
|
6177
|
+
console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
|
|
6164
6178
|
state.flowStatus = FlowStatus.LANDING;
|
|
6165
6179
|
state.initialised = false;
|
|
6166
6180
|
}
|
|
6167
6181
|
state.requestId = this.order_id;
|
|
6168
6182
|
}
|
|
6169
6183
|
else if (savedRequest) {
|
|
6170
|
-
|
|
6184
|
+
if (state.debug)
|
|
6185
|
+
console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
|
|
6171
6186
|
state.requestId = savedRequest;
|
|
6172
6187
|
this.order_id = savedRequest;
|
|
6173
6188
|
}
|
|
@@ -9212,7 +9227,7 @@ const MobileRedirect = class {
|
|
|
9212
9227
|
async componentWillLoad() {
|
|
9213
9228
|
this.infoTextTop = MobileRedirectValues.InfoTop;
|
|
9214
9229
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
9215
|
-
let envUri = state.environment == '
|
|
9230
|
+
let envUri = state.environment == 'QA' ? 'test' : 'ect';
|
|
9216
9231
|
let baseUri = state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
9217
9232
|
this.redirectLink = baseUri + envUri + '/identification?redirectId=' + state.redirectId;
|
|
9218
9233
|
if (state.phoneNumber && state.phoneNumber != '') {
|
|
@@ -25,7 +25,7 @@ export class MobileRedirect {
|
|
|
25
25
|
async componentWillLoad() {
|
|
26
26
|
this.infoTextTop = MobileRedirectValues.InfoTop;
|
|
27
27
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
28
|
-
let envUri = store.environment == '
|
|
28
|
+
let envUri = store.environment == 'QA' ? 'test' : 'ect';
|
|
29
29
|
let baseUri = store.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
30
30
|
this.redirectLink = baseUri + envUri + '/identification?redirectId=' + store.redirectId;
|
|
31
31
|
if (store.phoneNumber && store.phoneNumber != '') {
|
|
@@ -9,7 +9,8 @@ import Events from '../../helpers/Events';
|
|
|
9
9
|
import * as uuid from 'uuid';
|
|
10
10
|
export class IdentificationComponent {
|
|
11
11
|
async onTokenChange(newValue, _oldValue) {
|
|
12
|
-
|
|
12
|
+
if (store.debug)
|
|
13
|
+
console.log('Token change called with value: ' + newValue);
|
|
13
14
|
if (newValue == '') {
|
|
14
15
|
newValue = store.token;
|
|
15
16
|
return;
|
|
@@ -20,7 +21,8 @@ export class IdentificationComponent {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
async onOrderIdChange(newValue, _oldValue) {
|
|
23
|
-
|
|
24
|
+
if (store.debug)
|
|
25
|
+
console.log('OrderId change called with value: ' + newValue);
|
|
24
26
|
if (store.requestId !== newValue && newValue != '') {
|
|
25
27
|
store.requestId = newValue;
|
|
26
28
|
store.initialised = false;
|
|
@@ -49,7 +51,8 @@ export class IdentificationComponent {
|
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
async onRedirectIdChange(newValue, _oldValue) {
|
|
52
|
-
|
|
54
|
+
if (store.debug)
|
|
55
|
+
console.log('RedirectId change called with value: ' + newValue);
|
|
53
56
|
if (store.redirectId != '') {
|
|
54
57
|
newValue = store.redirectId;
|
|
55
58
|
return;
|
|
@@ -112,20 +115,24 @@ export class IdentificationComponent {
|
|
|
112
115
|
async componentWillLoad() {
|
|
113
116
|
Events.init(window);
|
|
114
117
|
store.apiBaseUrl = this.api_url;
|
|
115
|
-
|
|
118
|
+
if (this.env && this.env != '') {
|
|
119
|
+
store.environment = this.env;
|
|
120
|
+
}
|
|
116
121
|
this.logInit = {
|
|
117
122
|
store_values: { request_id: store.requestId, redirect_id: store.redirectId, token: store.token },
|
|
118
123
|
session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
|
|
119
124
|
paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
|
|
120
125
|
};
|
|
121
126
|
if (this.token) {
|
|
122
|
-
|
|
127
|
+
if (store.debug)
|
|
128
|
+
console.log('Store Token set with property value: ' + this.token);
|
|
123
129
|
store.token = this.token;
|
|
124
130
|
}
|
|
125
131
|
else if (store.token == '') {
|
|
126
132
|
store.token = sessionStorage.getItem(SessionKeys.TokenKey);
|
|
127
133
|
this.token = store.token;
|
|
128
|
-
|
|
134
|
+
if (store.debug)
|
|
135
|
+
console.log('Store Token set with session value: ' + store.token);
|
|
129
136
|
}
|
|
130
137
|
if (this.redirect_id) {
|
|
131
138
|
store.redirectId = this.redirect_id;
|
|
@@ -158,16 +165,19 @@ export class IdentificationComponent {
|
|
|
158
165
|
}
|
|
159
166
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
160
167
|
if (this.order_id && this.order_id != '') {
|
|
161
|
-
|
|
168
|
+
if (store.debug)
|
|
169
|
+
console.log('Current RequestId has value: ' + this.order_id);
|
|
162
170
|
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
163
|
-
|
|
171
|
+
if (store.debug)
|
|
172
|
+
console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
|
|
164
173
|
store.flowStatus = FlowStatus.LANDING;
|
|
165
174
|
store.initialised = false;
|
|
166
175
|
}
|
|
167
176
|
store.requestId = this.order_id;
|
|
168
177
|
}
|
|
169
178
|
else if (savedRequest) {
|
|
170
|
-
|
|
179
|
+
if (store.debug)
|
|
180
|
+
console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
|
|
171
181
|
store.requestId = savedRequest;
|
|
172
182
|
this.order_id = savedRequest;
|
|
173
183
|
}
|
|
@@ -55,7 +55,8 @@ export class ApiCall {
|
|
|
55
55
|
return jsonResp.valid;
|
|
56
56
|
}
|
|
57
57
|
async AddIdentificationRequest(deviceInfo) {
|
|
58
|
-
|
|
58
|
+
if (store.debug)
|
|
59
|
+
console.log('Calling identity request with store:' + JSON.stringify(store));
|
|
59
60
|
let data = {
|
|
60
61
|
requestId: store.requestId,
|
|
61
62
|
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
@@ -4,6 +4,7 @@ import { SessionKeys } from './textValues';
|
|
|
4
4
|
const { state, onChange } = createStore({
|
|
5
5
|
flowStatus: FlowStatus.LANDING,
|
|
6
6
|
environment: 'PROD',
|
|
7
|
+
debug: false,
|
|
7
8
|
requestId: '',
|
|
8
9
|
redirectId: '',
|
|
9
10
|
initialised: false,
|
|
@@ -16,6 +17,9 @@ const { state, onChange } = createStore({
|
|
|
16
17
|
phoneNumber: '',
|
|
17
18
|
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
18
19
|
});
|
|
20
|
+
onChange('environment', value => {
|
|
21
|
+
state.debug = value == 'QA';
|
|
22
|
+
});
|
|
19
23
|
onChange('flowStatus', value => {
|
|
20
24
|
sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
|
|
21
25
|
});
|
|
@@ -347,6 +347,7 @@ MobileRedirectValues.InfoAborted = 'Procesului de pe smartphone a fost amanat.';
|
|
|
347
347
|
const { state, onChange } = createStore({
|
|
348
348
|
flowStatus: FlowStatus.LANDING,
|
|
349
349
|
environment: 'PROD',
|
|
350
|
+
debug: false,
|
|
350
351
|
requestId: '',
|
|
351
352
|
redirectId: '',
|
|
352
353
|
initialised: false,
|
|
@@ -359,6 +360,9 @@ const { state, onChange } = createStore({
|
|
|
359
360
|
phoneNumber: '',
|
|
360
361
|
apiBaseUrl: 'https://apiro.id-kyc.com',
|
|
361
362
|
});
|
|
363
|
+
onChange('environment', value => {
|
|
364
|
+
state.debug = value == 'QA';
|
|
365
|
+
});
|
|
362
366
|
onChange('flowStatus', value => {
|
|
363
367
|
sessionStorage.setItem(SessionKeys.FlowStatusKey, FlowStatus[value]);
|
|
364
368
|
});
|
|
@@ -434,7 +438,8 @@ class ApiCall {
|
|
|
434
438
|
return jsonResp.valid;
|
|
435
439
|
}
|
|
436
440
|
async AddIdentificationRequest(deviceInfo) {
|
|
437
|
-
|
|
441
|
+
if (state.debug)
|
|
442
|
+
console.log('Calling identity request with store:' + JSON.stringify(state));
|
|
438
443
|
let data = {
|
|
439
444
|
requestId: state.requestId,
|
|
440
445
|
clientDeviceInfo: JSON.stringify(deviceInfo),
|
|
@@ -6004,7 +6009,8 @@ const identificationComponentCss = "@font-face{font-family:'Inter';font-style:no
|
|
|
6004
6009
|
|
|
6005
6010
|
const IdentificationComponent = class {
|
|
6006
6011
|
async onTokenChange(newValue, _oldValue) {
|
|
6007
|
-
|
|
6012
|
+
if (state.debug)
|
|
6013
|
+
console.log('Token change called with value: ' + newValue);
|
|
6008
6014
|
if (newValue == '') {
|
|
6009
6015
|
newValue = state.token;
|
|
6010
6016
|
return;
|
|
@@ -6015,7 +6021,8 @@ const IdentificationComponent = class {
|
|
|
6015
6021
|
}
|
|
6016
6022
|
}
|
|
6017
6023
|
async onOrderIdChange(newValue, _oldValue) {
|
|
6018
|
-
|
|
6024
|
+
if (state.debug)
|
|
6025
|
+
console.log('OrderId change called with value: ' + newValue);
|
|
6019
6026
|
if (state.requestId !== newValue && newValue != '') {
|
|
6020
6027
|
state.requestId = newValue;
|
|
6021
6028
|
state.initialised = false;
|
|
@@ -6044,7 +6051,8 @@ const IdentificationComponent = class {
|
|
|
6044
6051
|
}
|
|
6045
6052
|
}
|
|
6046
6053
|
async onRedirectIdChange(newValue, _oldValue) {
|
|
6047
|
-
|
|
6054
|
+
if (state.debug)
|
|
6055
|
+
console.log('RedirectId change called with value: ' + newValue);
|
|
6048
6056
|
if (state.redirectId != '') {
|
|
6049
6057
|
newValue = state.redirectId;
|
|
6050
6058
|
return;
|
|
@@ -6108,20 +6116,24 @@ const IdentificationComponent = class {
|
|
|
6108
6116
|
async componentWillLoad() {
|
|
6109
6117
|
Events.init(window);
|
|
6110
6118
|
state.apiBaseUrl = this.api_url;
|
|
6111
|
-
|
|
6119
|
+
if (this.env && this.env != '') {
|
|
6120
|
+
state.environment = this.env;
|
|
6121
|
+
}
|
|
6112
6122
|
this.logInit = {
|
|
6113
6123
|
store_values: { request_id: state.requestId, redirect_id: state.redirectId, token: state.token },
|
|
6114
6124
|
session_values: { request_id: sessionStorage.getItem(SessionKeys.RequestIdKey), token: sessionStorage.getItem(SessionKeys.TokenKey) },
|
|
6115
6125
|
paramete_values: { request_id: this.order_id, redirect_id: this.redirect_id, token: this.token },
|
|
6116
6126
|
};
|
|
6117
6127
|
if (this.token) {
|
|
6118
|
-
|
|
6128
|
+
if (state.debug)
|
|
6129
|
+
console.log('Store Token set with property value: ' + this.token);
|
|
6119
6130
|
state.token = this.token;
|
|
6120
6131
|
}
|
|
6121
6132
|
else if (state.token == '') {
|
|
6122
6133
|
state.token = sessionStorage.getItem(SessionKeys.TokenKey);
|
|
6123
6134
|
this.token = state.token;
|
|
6124
|
-
|
|
6135
|
+
if (state.debug)
|
|
6136
|
+
console.log('Store Token set with session value: ' + state.token);
|
|
6125
6137
|
}
|
|
6126
6138
|
if (this.redirect_id) {
|
|
6127
6139
|
state.redirectId = this.redirect_id;
|
|
@@ -6154,16 +6166,19 @@ const IdentificationComponent = class {
|
|
|
6154
6166
|
}
|
|
6155
6167
|
const savedRequest = sessionStorage.getItem(SessionKeys.RequestIdKey);
|
|
6156
6168
|
if (this.order_id && this.order_id != '') {
|
|
6157
|
-
|
|
6169
|
+
if (state.debug)
|
|
6170
|
+
console.log('Current RequestId has value: ' + this.order_id);
|
|
6158
6171
|
if (savedRequest && savedRequest != '' && savedRequest != this.order_id) {
|
|
6159
|
-
|
|
6172
|
+
if (state.debug)
|
|
6173
|
+
console.log('Session RequestId: ' + savedRequest + ' has different value than property one: ' + this.order_id);
|
|
6160
6174
|
state.flowStatus = FlowStatus.LANDING;
|
|
6161
6175
|
state.initialised = false;
|
|
6162
6176
|
}
|
|
6163
6177
|
state.requestId = this.order_id;
|
|
6164
6178
|
}
|
|
6165
6179
|
else if (savedRequest) {
|
|
6166
|
-
|
|
6180
|
+
if (state.debug)
|
|
6181
|
+
console.log('Current RequestId has no value, setting with session value: ' + savedRequest);
|
|
6167
6182
|
state.requestId = savedRequest;
|
|
6168
6183
|
this.order_id = savedRequest;
|
|
6169
6184
|
}
|
|
@@ -9208,7 +9223,7 @@ const MobileRedirect = class {
|
|
|
9208
9223
|
async componentWillLoad() {
|
|
9209
9224
|
this.infoTextTop = MobileRedirectValues.InfoTop;
|
|
9210
9225
|
this.infoTextBottom = MobileRedirectValues.InfoBottom;
|
|
9211
|
-
let envUri = state.environment == '
|
|
9226
|
+
let envUri = state.environment == 'QA' ? 'test' : 'ect';
|
|
9212
9227
|
let baseUri = state.hasIdBack ? 'https://onmd.id-kyc.com/' : 'https://onro.id-kyc.com/';
|
|
9213
9228
|
this.redirectLink = baseUri + envUri + '/identification?redirectId=' + state.redirectId;
|
|
9214
9229
|
if (state.phoneNumber && state.phoneNumber != '') {
|