@regulaforensics/idv-interfaces 3.2.293-nightly → 3.2.295-nightly
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/index.d.ts +9 -0
- package/dist/main.js +46 -38
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,13 @@ export declare abstract class BaseModule<TModuleProps = unknown, TModulesConfig
|
|
|
33
33
|
|
|
34
34
|
export declare function cleanObjectFromUndefined(obj: Record<string, unknown>): Record<string, unknown>;
|
|
35
35
|
|
|
36
|
+
export declare enum DirectionType {
|
|
37
|
+
RTL = "rtl",
|
|
38
|
+
LTR = "ltr"
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export declare const getLanguageFromLocale: (locale?: string) => string;
|
|
42
|
+
|
|
36
43
|
export declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
|
|
37
44
|
isProcessing?: (isProcessing: boolean) => void;
|
|
38
45
|
moduleProps: TModuleProps;
|
|
@@ -64,6 +71,8 @@ export declare const PerformTypes: {
|
|
|
64
71
|
|
|
65
72
|
export declare function registerModule<TModuleProps = unknown, TModulesConfig = unknown>(name: string, ModuleClass: ModuleClass<TModuleProps, TModulesConfig>): void;
|
|
66
73
|
|
|
74
|
+
export declare const RTL_LANGUAGES: string[];
|
|
75
|
+
|
|
67
76
|
export declare function wait(ms: number): Promise<unknown>;
|
|
68
77
|
|
|
69
78
|
export { }
|
package/dist/main.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var l = Object.defineProperty;
|
|
2
2
|
var m = Object.getOwnPropertySymbols;
|
|
3
3
|
var u = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
-
var y = (r, e,
|
|
5
|
-
for (var
|
|
6
|
-
u.call(e,
|
|
4
|
+
var y = (r, e, t) => e in r ? l(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, s = (r, e) => {
|
|
5
|
+
for (var t in e || (e = {}))
|
|
6
|
+
u.call(e, t) && y(r, t, e[t]);
|
|
7
7
|
if (m)
|
|
8
|
-
for (var
|
|
9
|
-
E.call(e,
|
|
8
|
+
for (var t of m(e))
|
|
9
|
+
E.call(e, t) && y(r, t, e[t]);
|
|
10
10
|
return r;
|
|
11
11
|
};
|
|
12
12
|
class o {
|
|
13
13
|
constructor({
|
|
14
14
|
errorCode: e,
|
|
15
|
-
errorCodeKey:
|
|
16
|
-
message:
|
|
15
|
+
errorCodeKey: t,
|
|
16
|
+
message: i,
|
|
17
17
|
underlyingError: n,
|
|
18
|
-
underlyingBaseError:
|
|
19
|
-
domain:
|
|
20
|
-
module:
|
|
18
|
+
underlyingBaseError: g,
|
|
19
|
+
domain: h,
|
|
20
|
+
module: f,
|
|
21
21
|
errorEnumName: c,
|
|
22
22
|
shortDomainCode: p
|
|
23
23
|
}) {
|
|
24
|
-
this.errorCode = e, this.errorCodeKey =
|
|
24
|
+
this.errorCode = e, this.errorCodeKey = t, this.message = i, this.underlyingError = n, this.underlyingBaseError = g, this.module = f, this.domain = h, this.errorEnumName = c, this.shortDomainCode = p;
|
|
25
25
|
}
|
|
26
|
-
static getErrorKey(e,
|
|
27
|
-
const
|
|
28
|
-
if (!
|
|
26
|
+
static getErrorKey(e, t) {
|
|
27
|
+
const i = Object.keys(t).find((n) => t[n] === e);
|
|
28
|
+
if (!i)
|
|
29
29
|
throw new Error(`Invalid errorCode: ${e} in enum`);
|
|
30
|
-
return
|
|
30
|
+
return i;
|
|
31
31
|
}
|
|
32
32
|
get lastUnderlyingError() {
|
|
33
33
|
let e = this.underlyingBaseError;
|
|
@@ -56,56 +56,64 @@ class o {
|
|
|
56
56
|
return this.underlyingBaseError instanceof o && (e += `-${this.underlyingBaseError.fullChain}`), e;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
class
|
|
59
|
+
class b extends HTMLElement {
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function N(r, e) {
|
|
62
62
|
if (e.displayName ? console.log(`Register module: ${e.displayName}`) : console.error('Missed "displayName" when register module'), e.getSupportedTemplates && typeof e.getSupportedTemplates == "function") {
|
|
63
|
-
const
|
|
64
|
-
console.log(`${e == null ? void 0 : e.displayName} supported templates: ${
|
|
63
|
+
const t = e.getSupportedTemplates();
|
|
64
|
+
console.log(`${e == null ? void 0 : e.displayName} supported templates: ${t.join(", ")}`);
|
|
65
65
|
} else
|
|
66
66
|
console.error('Missed "getSupportedTemplates" method when register module');
|
|
67
67
|
if (e.initialize && typeof e.initialize == "function" || console.error(`${e == null ? void 0 : e.displayName} "initialize" method was not implemented`), e.deinitialize && typeof e.deinitialize == "function" || console.error(`${e == null ? void 0 : e.displayName} "deinitialize" method was not implemented`), e.isReady && typeof e.isReady == "function" || console.error(`${e == null ? void 0 : e.displayName} "isReady" method was not implemented`), e.getIdentifier && typeof e.getIdentifier == "function") {
|
|
68
|
-
const
|
|
69
|
-
console.log(`Module id: ${
|
|
68
|
+
const t = e.getIdentifier();
|
|
69
|
+
console.log(`Module id: ${t}`);
|
|
70
70
|
} else
|
|
71
71
|
console.error('Missed "getIdentifier" when register module');
|
|
72
72
|
customElements.get(e.getIdentifier()) ? console.log(`Module ${r} has already registered`) : customElements.define(r, e), console.log("-------");
|
|
73
73
|
}
|
|
74
|
-
const
|
|
74
|
+
const a = (r) => typeof r == "object" && r !== null && !Array.isArray(r);
|
|
75
75
|
function d(r) {
|
|
76
76
|
if (Array.isArray(r))
|
|
77
77
|
return r.map(d);
|
|
78
|
-
if (
|
|
78
|
+
if (a(r)) {
|
|
79
79
|
const e = s({}, r);
|
|
80
80
|
if (delete e.ios, delete e.android, delete e.web, "web" in r)
|
|
81
|
-
if (
|
|
82
|
-
const
|
|
83
|
-
return s(s({},
|
|
81
|
+
if (a(r.web)) {
|
|
82
|
+
const i = d(e);
|
|
83
|
+
return s(s({}, i), r.web);
|
|
84
84
|
} else
|
|
85
85
|
return r.web;
|
|
86
|
-
const
|
|
87
|
-
for (const [
|
|
88
|
-
i
|
|
89
|
-
return
|
|
86
|
+
const t = {};
|
|
87
|
+
for (const [i, n] of Object.entries(e))
|
|
88
|
+
t[i] = d(n);
|
|
89
|
+
return t;
|
|
90
90
|
}
|
|
91
91
|
return r;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function B(r) {
|
|
94
94
|
return Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0));
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const O = {
|
|
97
97
|
FORM: "form",
|
|
98
98
|
DATA: "data"
|
|
99
99
|
};
|
|
100
|
-
function
|
|
100
|
+
function T(r) {
|
|
101
101
|
return new Promise((e) => setTimeout(e, r));
|
|
102
102
|
}
|
|
103
|
+
var $ = /* @__PURE__ */ ((r) => (r.RTL = "rtl", r.LTR = "ltr", r))($ || {});
|
|
104
|
+
const R = ["ar", "he"], A = (r) => {
|
|
105
|
+
var e;
|
|
106
|
+
return r ? (e = r.substring(0, 2)) == null ? void 0 : e.toLowerCase() : "";
|
|
107
|
+
};
|
|
103
108
|
export {
|
|
104
109
|
o as BaseError,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
b as BaseModule,
|
|
111
|
+
$ as DirectionType,
|
|
112
|
+
O as PerformTypes,
|
|
113
|
+
R as RTL_LANGUAGES,
|
|
114
|
+
B as cleanObjectFromUndefined,
|
|
115
|
+
A as getLanguageFromLocale,
|
|
108
116
|
d as parseClientJSON,
|
|
109
|
-
|
|
110
|
-
|
|
117
|
+
N as registerModule,
|
|
118
|
+
T as wait
|
|
111
119
|
};
|
package/package.json
CHANGED