@zerohash-sdk/profile-react 0.14.14 → 0.14.16
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.js +30 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -125,7 +125,7 @@ var s = {
|
|
|
125
125
|
return E ? (T(E, !1), () => {
|
|
126
126
|
b = !0, C();
|
|
127
127
|
}) : m;
|
|
128
|
-
}, y = {
|
|
128
|
+
}, y = () => "0.14.16", b = {
|
|
129
129
|
local: {
|
|
130
130
|
BASE_URL: "/",
|
|
131
131
|
DEV: !1,
|
|
@@ -152,34 +152,34 @@ var s = {
|
|
|
152
152
|
prod: "https://sdk-cdn.zerohash.com",
|
|
153
153
|
"eu-cert": "https://sdk-cdn.cert.zerohash.eu",
|
|
154
154
|
"eu-prod": "https://sdk-cdn.zerohash.eu"
|
|
155
|
-
},
|
|
156
|
-
let { eu: r = !1, legacyAliases: i = !1, local: a =
|
|
155
|
+
}, x = "https://sdk-cdn.gating.0hash.com", S = (e, t, n = {}) => {
|
|
156
|
+
let { eu: r = !1, legacyAliases: i = !1, local: a = b.local } = n, o = (n) => `${n}/${e}/${t}`, s = {
|
|
157
157
|
local: o(a),
|
|
158
|
-
dev: o(
|
|
159
|
-
gating: o(
|
|
160
|
-
cert: o(
|
|
161
|
-
prod: o(
|
|
158
|
+
dev: o(b.dev),
|
|
159
|
+
gating: o(x),
|
|
160
|
+
cert: o(b.cert),
|
|
161
|
+
prod: o(b.prod)
|
|
162
162
|
};
|
|
163
|
-
return i && (s.sandbox = o(
|
|
163
|
+
return i && (s.sandbox = o(b.cert), s.production = o(b.prod)), r && (s["eu-cert"] = o(b["eu-cert"]), s["eu-prod"] = o(b["eu-prod"])), s;
|
|
164
164
|
};
|
|
165
|
-
[...Object.entries(
|
|
165
|
+
[...Object.entries(b).filter(([e]) => e !== "local").map(([, e]) => e)], {
|
|
166
166
|
LOADED: "travel_rule_loaded",
|
|
167
167
|
COMPLETED: "travel_rule_completed"
|
|
168
168
|
}.LOADED;
|
|
169
169
|
//#endregion
|
|
170
170
|
//#region ../../../common/callbacks/dist/shared/models.js
|
|
171
|
-
var
|
|
171
|
+
var C;
|
|
172
172
|
(function(e) {
|
|
173
173
|
e.NETWORK_ERROR = "network_error", e.AUTH_ERROR = "auth_error", e.NOT_FOUND_ERROR = "not_found_error", e.VALIDATION_ERROR = "validation_error", e.SERVER_ERROR = "server_error", e.CLIENT_ERROR = "client_error", e.UNKNOWN_ERROR = "unknown_error";
|
|
174
|
-
})(
|
|
174
|
+
})(C ||= {});
|
|
175
175
|
//#endregion
|
|
176
176
|
//#region ../../../common/react-sdk-base/dist/script-load-fallback.js
|
|
177
|
-
var
|
|
177
|
+
var w = {
|
|
178
178
|
evergreen: "#00381D",
|
|
179
179
|
green: "#CCFFD0",
|
|
180
180
|
offBlack: "#1C1B1C",
|
|
181
181
|
grayLight: "#EBEBE9"
|
|
182
|
-
},
|
|
182
|
+
}, T = ({ onRetry: n, onClose: r }) => t("div", {
|
|
183
183
|
role: "alert",
|
|
184
184
|
style: {
|
|
185
185
|
position: "relative",
|
|
@@ -192,9 +192,9 @@ var C = {
|
|
|
192
192
|
padding: "32px 24px",
|
|
193
193
|
textAlign: "center",
|
|
194
194
|
fontFamily: "inherit",
|
|
195
|
-
color:
|
|
195
|
+
color: w.offBlack,
|
|
196
196
|
background: "#FFFFFF",
|
|
197
|
-
border: `1px solid ${
|
|
197
|
+
border: `1px solid ${w.grayLight}`,
|
|
198
198
|
borderRadius: "12px"
|
|
199
199
|
},
|
|
200
200
|
children: [
|
|
@@ -208,7 +208,7 @@ var C = {
|
|
|
208
208
|
right: "12px",
|
|
209
209
|
display: "flex",
|
|
210
210
|
padding: "4px",
|
|
211
|
-
color:
|
|
211
|
+
color: w.offBlack,
|
|
212
212
|
background: "none",
|
|
213
213
|
border: "none",
|
|
214
214
|
cursor: "pointer",
|
|
@@ -237,7 +237,7 @@ var C = {
|
|
|
237
237
|
"aria-hidden": "true",
|
|
238
238
|
children: e("path", {
|
|
239
239
|
d: "M12 9v4m0 4h.01M10.29 3.86L1.82 18a2 2 0 001.71 3h16.94a2 2 0 001.71-3L13.71 3.86a2 2 0 00-3.42 0z",
|
|
240
|
-
stroke:
|
|
240
|
+
stroke: w.evergreen,
|
|
241
241
|
strokeWidth: "1.5",
|
|
242
242
|
strokeLinecap: "round",
|
|
243
243
|
strokeLinejoin: "round"
|
|
@@ -268,8 +268,8 @@ var C = {
|
|
|
268
268
|
fontSize: "14px",
|
|
269
269
|
fontWeight: 600,
|
|
270
270
|
fontFamily: "inherit",
|
|
271
|
-
color:
|
|
272
|
-
background:
|
|
271
|
+
color: w.green,
|
|
272
|
+
background: w.evergreen,
|
|
273
273
|
border: "none",
|
|
274
274
|
borderRadius: "8px",
|
|
275
275
|
cursor: "pointer"
|
|
@@ -277,12 +277,12 @@ var C = {
|
|
|
277
277
|
children: "Try again"
|
|
278
278
|
})
|
|
279
279
|
]
|
|
280
|
-
}),
|
|
280
|
+
}), E = (e, t) => {
|
|
281
281
|
i(() => {
|
|
282
282
|
let n = e.current;
|
|
283
283
|
if (n) for (let [e, r] of Object.entries(t)) r !== void 0 && Reflect.set(n, e, r);
|
|
284
284
|
});
|
|
285
|
-
},
|
|
285
|
+
}, D = (e) => {
|
|
286
286
|
let { webComponentTag: t, appName: n, appVersion: a, scriptUrls: c, fallbackScriptUrls: l, collectorUrls: u, env: d, jwt: f, timeoutMs: p } = e, [m, h] = o(!1), [g, _] = o(0);
|
|
287
287
|
return i(() => (h(!1), v({
|
|
288
288
|
webComponentTag: t,
|
|
@@ -310,31 +310,32 @@ var C = {
|
|
|
310
310
|
loadFailed: m,
|
|
311
311
|
retry: r(() => _((e) => e + 1), [])
|
|
312
312
|
};
|
|
313
|
-
},
|
|
313
|
+
}, O = S("profile-web", "index.js", { eu: !0 }), k = "zerohash-profile", A = ({ jwt: t, env: r = "prod", theme: i, onError: o, onClose: s, onLoaded: c, onEvent: l, ...u }) => {
|
|
314
314
|
let d = a(null);
|
|
315
|
-
|
|
315
|
+
E(d, {
|
|
316
316
|
theme: i,
|
|
317
317
|
onError: o,
|
|
318
318
|
onClose: s,
|
|
319
319
|
onLoaded: c,
|
|
320
320
|
onEvent: l
|
|
321
321
|
});
|
|
322
|
-
let { loadFailed: f, retry: p } =
|
|
323
|
-
webComponentTag:
|
|
324
|
-
scriptUrls:
|
|
322
|
+
let { loadFailed: f, retry: p } = D({
|
|
323
|
+
webComponentTag: k,
|
|
324
|
+
scriptUrls: O,
|
|
325
325
|
env: r,
|
|
326
326
|
jwt: t
|
|
327
327
|
});
|
|
328
|
-
return f ? /* @__PURE__ */ e(
|
|
328
|
+
return f ? /* @__PURE__ */ e(T, {
|
|
329
329
|
onRetry: p,
|
|
330
330
|
onClose: s
|
|
331
|
-
}) : n.createElement(
|
|
331
|
+
}) : n.createElement(k, {
|
|
332
332
|
ref: d,
|
|
333
333
|
jwt: t,
|
|
334
334
|
env: r,
|
|
335
|
+
sdkversion: y(),
|
|
335
336
|
theme: i,
|
|
336
337
|
...u
|
|
337
338
|
});
|
|
338
339
|
};
|
|
339
340
|
//#endregion
|
|
340
|
-
export {
|
|
341
|
+
export { A as Profile };
|