@regulaforensics/idv-interfaces 3.6.336-nightly → 3.6.338-rc
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 +10 -0
- package/dist/main.js +50 -40
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,10 @@ export declare type FailedAssets = {
|
|
|
46
46
|
|
|
47
47
|
export declare const getLayoutDirectionFromLocale: (locale?: string) => DirectionType;
|
|
48
48
|
|
|
49
|
+
export declare type IdvAsset = {
|
|
50
|
+
idvAsset: ImageLike;
|
|
51
|
+
};
|
|
52
|
+
|
|
49
53
|
export declare type IdvModuleProps<TModuleProps, TModulesConfig> = {
|
|
50
54
|
isProcessing?: (isProcessing: boolean) => void;
|
|
51
55
|
moduleProps: TModuleProps;
|
|
@@ -75,6 +79,10 @@ export declare type ImageBase = {
|
|
|
75
79
|
|
|
76
80
|
declare type ImageFailurePolicy = 'ignore' | 'placeholderImage' | 'error';
|
|
77
81
|
|
|
82
|
+
export declare type ImageLike = ImageBase & {
|
|
83
|
+
placeholderImage?: ImageLike;
|
|
84
|
+
};
|
|
85
|
+
|
|
78
86
|
export declare type ModuleClass<TModuleProps = unknown, TModulesConfig = unknown> = IdvModuleStaticMethods & (new (...args: any[]) => BaseModule<TModuleProps, TModulesConfig>);
|
|
79
87
|
|
|
80
88
|
export declare function parseWebSpecificFields<T>(json: T): T;
|
|
@@ -88,6 +96,8 @@ export declare const PerformTypes: {
|
|
|
88
96
|
|
|
89
97
|
export declare function registerModule<TModuleProps = unknown, TModulesConfig = unknown>(name: string, ModuleClass: ModuleClass<TModuleProps, TModulesConfig>): void;
|
|
90
98
|
|
|
99
|
+
export declare const resolveRenderableImageSrc: (idvAsset?: IdvAsset, preloadAssetsRequired?: boolean, failedAssets?: FailedAssets) => string | undefined;
|
|
100
|
+
|
|
91
101
|
export declare const RTL_LANGUAGES: string[];
|
|
92
102
|
|
|
93
103
|
export declare function wait(ms: number): Promise<unknown>;
|
package/dist/main.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
1
|
+
var u = Object.defineProperty;
|
|
2
|
+
var g = Object.getOwnPropertySymbols;
|
|
3
|
+
var p = Object.prototype.hasOwnProperty, E = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var h = (r, e, t) => e in r ? u(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t, c = (r, e) => {
|
|
5
5
|
for (var t in e || (e = {}))
|
|
6
|
-
|
|
7
|
-
if (
|
|
8
|
-
for (var t of
|
|
9
|
-
E.call(e, t) &&
|
|
6
|
+
p.call(e, t) && h(r, t, e[t]);
|
|
7
|
+
if (g)
|
|
8
|
+
for (var t of g(e))
|
|
9
|
+
E.call(e, t) && h(r, t, e[t]);
|
|
10
10
|
return r;
|
|
11
11
|
};
|
|
12
12
|
class o {
|
|
@@ -15,13 +15,13 @@ class o {
|
|
|
15
15
|
errorCodeKey: t,
|
|
16
16
|
message: i,
|
|
17
17
|
underlyingError: n,
|
|
18
|
-
underlyingBaseError:
|
|
19
|
-
domain:
|
|
20
|
-
module:
|
|
21
|
-
errorEnumName:
|
|
22
|
-
shortDomainCode:
|
|
18
|
+
underlyingBaseError: a,
|
|
19
|
+
domain: d,
|
|
20
|
+
module: s,
|
|
21
|
+
errorEnumName: l,
|
|
22
|
+
shortDomainCode: f
|
|
23
23
|
}) {
|
|
24
|
-
this.errorCode = e, this.errorCodeKey = t, this.message = i, this.underlyingError = n, this.underlyingBaseError =
|
|
24
|
+
this.errorCode = e, this.errorCodeKey = t, this.message = i, this.underlyingError = n, this.underlyingBaseError = a, this.module = s, this.domain = d, this.errorEnumName = l, this.shortDomainCode = f;
|
|
25
25
|
}
|
|
26
26
|
static getErrorKey(e, t) {
|
|
27
27
|
const i = Object.keys(t).find((n) => t[n] === e);
|
|
@@ -56,9 +56,9 @@ class o {
|
|
|
56
56
|
return this.underlyingBaseError instanceof o && (e += `-${this.underlyingBaseError.fullChain}`), e;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
class
|
|
59
|
+
class I extends HTMLElement {
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function L(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
63
|
const t = e.getSupportedTemplates();
|
|
64
64
|
console.log(`${e == null ? void 0 : e.displayName} supported templates: ${t.join(", ")}`);
|
|
@@ -71,50 +71,60 @@ function B(r, e) {
|
|
|
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
|
|
75
|
-
function
|
|
74
|
+
const y = (r) => typeof r == "object" && r !== null && !Array.isArray(r);
|
|
75
|
+
function m(r) {
|
|
76
76
|
if (Array.isArray(r))
|
|
77
|
-
return r.map(
|
|
78
|
-
if (
|
|
79
|
-
const e =
|
|
77
|
+
return r.map(m);
|
|
78
|
+
if (y(r)) {
|
|
79
|
+
const e = c({}, r);
|
|
80
80
|
if (delete e.ios, delete e.android, delete e.web, "web" in r)
|
|
81
|
-
if (
|
|
82
|
-
const i =
|
|
83
|
-
return
|
|
81
|
+
if (y(r.web)) {
|
|
82
|
+
const i = m(e);
|
|
83
|
+
return c(c({}, i), r.web);
|
|
84
84
|
} else
|
|
85
85
|
return r.web;
|
|
86
86
|
const t = {};
|
|
87
87
|
for (const [i, n] of Object.entries(e))
|
|
88
|
-
t[i] =
|
|
88
|
+
t[i] = m(n);
|
|
89
89
|
return t;
|
|
90
90
|
}
|
|
91
91
|
return r;
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function N(r) {
|
|
94
94
|
return Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0));
|
|
95
95
|
}
|
|
96
|
-
const
|
|
96
|
+
const B = {
|
|
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
|
|
104
|
-
const
|
|
103
|
+
var b = /* @__PURE__ */ ((r) => (r.RTL = "rtl", r.LTR = "ltr", r))(b || {});
|
|
104
|
+
const w = ["ar", "he"], O = (r) => {
|
|
105
105
|
var t;
|
|
106
106
|
const e = r ? (t = r.substring(0, 2)) == null ? void 0 : t.toLowerCase() : "";
|
|
107
|
-
return
|
|
107
|
+
return w.includes(e) ? "rtl" : "ltr";
|
|
108
|
+
}, $ = (r, e) => r.base64 && !(e != null && e.base64.has(r.base64)) ? r.base64 : r.imageURL && !(e != null && e.imageURL.has(r.imageURL)) ? r.imageURL : "", S = (r, e, t) => {
|
|
109
|
+
var n;
|
|
110
|
+
if (!e) return;
|
|
111
|
+
let i = (n = r == null ? void 0 : r.idvAsset) != null ? n : null;
|
|
112
|
+
for (; i; ) {
|
|
113
|
+
const a = $(i, t);
|
|
114
|
+
if (a) return a;
|
|
115
|
+
i = i.failurePolicy === "placeholderImage" && i.placeholderImage || null;
|
|
116
|
+
}
|
|
108
117
|
};
|
|
109
118
|
export {
|
|
110
119
|
o as BaseError,
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
+
I as BaseModule,
|
|
121
|
+
b as DirectionType,
|
|
122
|
+
B as PerformTypes,
|
|
123
|
+
w as RTL_LANGUAGES,
|
|
124
|
+
N as cleanObjectFromUndefined,
|
|
125
|
+
O as getLayoutDirectionFromLocale,
|
|
126
|
+
m as parseWebSpecificFields,
|
|
127
|
+
L as registerModule,
|
|
128
|
+
S as resolveRenderableImageSrc,
|
|
129
|
+
T as wait
|
|
120
130
|
};
|
package/package.json
CHANGED