@scbt-ecom/ui 0.61.4 → 0.61.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/ui.js +37 -7
- package/dist/ui.js.map +1 -1
- package/dist/widget.js +33 -33
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -13,22 +13,22 @@ var ht = (e, t, r, o) => ({
|
|
|
13
13
|
return h(e, t, o);
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
|
-
import { S as Ut, w as Vt, Q as le, x as I, y as Et, z as ue, E as pe, F as It, G as P, J as he, M as me, T as xe, W as fe, X as Mt, Y as Ot, Z as ce, _ as St, $ as
|
|
16
|
+
import { S as Ut, w as Vt, Q as le, x as I, y as Et, z as ue, E as pe, F as It, G as P, J as he, M as me, T as xe, W as fe, X as Mt, Y as Ot, Z as ce, _ as St, $ as Ft, a0 as be, j as n, B as wt, c as M, R as H, l as Wt, r as ge, H as L, i as c, s as ct, p as je, L as ye, n as vt, A as ot, t as ke, a1 as we, q as ve, U as Gt, m as Nt, k as Ne } from "./index-CeBEX-QQ.js";
|
|
17
17
|
import { c as a, T as k } from "./typeGuards-Bhdr9KYW.js";
|
|
18
18
|
import * as at from "react";
|
|
19
19
|
import { useCallback as Kt, useState as G, useMemo as st, createElement as $t, Fragment as se, useEffect as Zt, useRef as Ct, useReducer as Ce, memo as Xt } from "react";
|
|
20
|
-
import { s as Te, c as bt, g as
|
|
20
|
+
import { s as Te, c as bt, g as Bt, a as Ee } from "./uuid-2wKG15vy.js";
|
|
21
21
|
import { i as Jt } from "./isClient-C9aZtt2Q.js";
|
|
22
22
|
import { a as K, c as Ie, b as Me } from "./useDebounce-QgEEiWs9.js";
|
|
23
23
|
import { o as Oe } from "./utils-Cc0awqbk.js";
|
|
24
24
|
import { z as Yt, Z as Se } from "./index-DGoeevV2.js";
|
|
25
|
-
import { u as
|
|
25
|
+
import { u as Fe } from "./useFieldsProgress-BXzIWmGP.js";
|
|
26
26
|
import { createPortal as te } from "react-dom";
|
|
27
|
-
var
|
|
27
|
+
var F, Qt, Be = (Qt = class extends Ut {
|
|
28
28
|
constructor(t = {}) {
|
|
29
29
|
super();
|
|
30
|
-
C(this,
|
|
31
|
-
this.config = t, y(this,
|
|
30
|
+
C(this, F);
|
|
31
|
+
this.config = t, y(this, F, /* @__PURE__ */ new Map());
|
|
32
32
|
}
|
|
33
33
|
build(t, r, o) {
|
|
34
34
|
const i = r.queryKey, d = r.queryHash ?? Vt(i, r);
|
|
@@ -43,14 +43,14 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
43
43
|
}), this.add(l)), l;
|
|
44
44
|
}
|
|
45
45
|
add(t) {
|
|
46
|
-
h(this,
|
|
46
|
+
h(this, F).has(t.queryHash) || (h(this, F).set(t.queryHash, t), this.notify({
|
|
47
47
|
type: "added",
|
|
48
48
|
query: t
|
|
49
49
|
}));
|
|
50
50
|
}
|
|
51
51
|
remove(t) {
|
|
52
|
-
const r = h(this,
|
|
53
|
-
r && (t.destroy(), r === t && h(this,
|
|
52
|
+
const r = h(this, F).get(t.queryHash);
|
|
53
|
+
r && (t.destroy(), r === t && h(this, F).delete(t.queryHash), this.notify({ type: "removed", query: t }));
|
|
54
54
|
}
|
|
55
55
|
clear() {
|
|
56
56
|
I.batch(() => {
|
|
@@ -60,10 +60,10 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
get(t) {
|
|
63
|
-
return h(this,
|
|
63
|
+
return h(this, F).get(t);
|
|
64
64
|
}
|
|
65
65
|
getAll() {
|
|
66
|
-
return [...h(this,
|
|
66
|
+
return [...h(this, F).values()];
|
|
67
67
|
}
|
|
68
68
|
find(t) {
|
|
69
69
|
const r = { exact: !0, ...t };
|
|
@@ -96,14 +96,14 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
},
|
|
99
|
+
}, F = new WeakMap(), Qt), B, E, J, R, A, zt, Re = (zt = class extends ue {
|
|
100
100
|
constructor(t) {
|
|
101
101
|
super();
|
|
102
102
|
C(this, R);
|
|
103
|
-
C(this,
|
|
103
|
+
C(this, B);
|
|
104
104
|
C(this, E);
|
|
105
105
|
C(this, J);
|
|
106
|
-
this.mutationId = t.mutationId, y(this, E, t.mutationCache), y(this,
|
|
106
|
+
this.mutationId = t.mutationId, y(this, E, t.mutationCache), y(this, B, []), this.state = t.state || He(), this.setOptions(t.options), this.scheduleGc();
|
|
107
107
|
}
|
|
108
108
|
setOptions(t) {
|
|
109
109
|
this.options = t, this.updateGcTime(this.options.gcTime);
|
|
@@ -112,21 +112,21 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
112
112
|
return this.options.meta;
|
|
113
113
|
}
|
|
114
114
|
addObserver(t) {
|
|
115
|
-
h(this,
|
|
115
|
+
h(this, B).includes(t) || (h(this, B).push(t), this.clearGcTimeout(), h(this, E).notify({
|
|
116
116
|
type: "observerAdded",
|
|
117
117
|
mutation: this,
|
|
118
118
|
observer: t
|
|
119
119
|
}));
|
|
120
120
|
}
|
|
121
121
|
removeObserver(t) {
|
|
122
|
-
y(this,
|
|
122
|
+
y(this, B, h(this, B).filter((r) => r !== t)), this.scheduleGc(), h(this, E).notify({
|
|
123
123
|
type: "observerRemoved",
|
|
124
124
|
mutation: this,
|
|
125
125
|
observer: t
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
128
|
optionalRemove() {
|
|
129
|
-
h(this,
|
|
129
|
+
h(this, B).length || (this.state.status === "pending" ? this.scheduleGc() : h(this, E).remove(this));
|
|
130
130
|
}
|
|
131
131
|
continue() {
|
|
132
132
|
var t;
|
|
@@ -216,7 +216,7 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
216
216
|
h(this, E).runNext(this);
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
|
-
},
|
|
219
|
+
}, B = new WeakMap(), E = new WeakMap(), J = new WeakMap(), R = new WeakSet(), A = function(t) {
|
|
220
220
|
const r = (o) => {
|
|
221
221
|
switch (t.type) {
|
|
222
222
|
case "failed":
|
|
@@ -271,7 +271,7 @@ var B, Qt, Fe = (Qt = class extends Ut {
|
|
|
271
271
|
}
|
|
272
272
|
};
|
|
273
273
|
this.state = r(this.state), I.batch(() => {
|
|
274
|
-
h(this,
|
|
274
|
+
h(this, B).forEach((o) => {
|
|
275
275
|
o.onMutationUpdate(t);
|
|
276
276
|
}), h(this, E).notify({
|
|
277
277
|
mutation: this,
|
|
@@ -484,7 +484,7 @@ var g, U, V, tt, et, W, rt, nt, At, De = (At = class {
|
|
|
484
484
|
C(this, W);
|
|
485
485
|
C(this, rt);
|
|
486
486
|
C(this, nt);
|
|
487
|
-
y(this, g, e.queryCache || new
|
|
487
|
+
y(this, g, e.queryCache || new Be()), y(this, U, e.mutationCache || new _e()), y(this, V, e.defaultOptions || {}), y(this, tt, /* @__PURE__ */ new Map()), y(this, et, /* @__PURE__ */ new Map()), y(this, W, 0);
|
|
488
488
|
}
|
|
489
489
|
mount() {
|
|
490
490
|
ht(this, W)._++, h(this, W) === 1 && (y(this, rt, fe.subscribe(async (e) => {
|
|
@@ -633,7 +633,7 @@ var g, U, V, tt, et, W, rt, nt, At, De = (At = class {
|
|
|
633
633
|
getQueryDefaults(e) {
|
|
634
634
|
const t = [...h(this, tt).values()], r = {};
|
|
635
635
|
return t.forEach((o) => {
|
|
636
|
-
|
|
636
|
+
Ft(e, o.queryKey) && Object.assign(r, o.defaultOptions);
|
|
637
637
|
}), r;
|
|
638
638
|
}
|
|
639
639
|
setMutationDefaults(e, t) {
|
|
@@ -645,7 +645,7 @@ var g, U, V, tt, et, W, rt, nt, At, De = (At = class {
|
|
|
645
645
|
getMutationDefaults(e) {
|
|
646
646
|
const t = [...h(this, et).values()], r = {};
|
|
647
647
|
return t.forEach((o) => {
|
|
648
|
-
|
|
648
|
+
Ft(e, o.mutationKey) && Object.assign(r, o.defaultOptions);
|
|
649
649
|
}), r;
|
|
650
650
|
}
|
|
651
651
|
defaultQueryOptions(e) {
|
|
@@ -730,7 +730,7 @@ const Le = [
|
|
|
730
730
|
return /* @__PURE__ */ n.jsxs(
|
|
731
731
|
"li",
|
|
732
732
|
{
|
|
733
|
-
style: { backgroundColor: p ?? "#
|
|
733
|
+
style: { backgroundColor: p ?? "#F3F4F7" },
|
|
734
734
|
className: a(ze({ variant: u }), { "pb-0": o }, { "pb-12": !o }, i == null ? void 0 : i.root),
|
|
735
735
|
children: [
|
|
736
736
|
/* @__PURE__ */ n.jsxs("div", { className: a("flex flex-col items-start justify-between px-4 desktop:px-8 desktop:py-8", i == null ? void 0 : i.wrapper), children: [
|
|
@@ -1828,11 +1828,11 @@ const Le = [
|
|
|
1828
1828
|
/* @__PURE__ */ n.jsx("div", { className: a("mt-6 flex flex-col gap-2 desktop:mt-12", r == null ? void 0 : r.tabsWrapper), children: /* @__PURE__ */ n.jsx(hr, { tabsNames: l, activeTab: i, setActiveTab: d, classes: r == null ? void 0 : r.tabs }) }),
|
|
1829
1829
|
/* @__PURE__ */ n.jsx("div", { className: a("mt-6 flex flex-col gap-6", r == null ? void 0 : r.contentWrapper), children: (p = (u = t == null ? void 0 : t[i]) == null ? void 0 : u.contents) == null ? void 0 : p.map((m, x) => /* @__PURE__ */ n.jsx(Sr, { accordionsConfig: o, ...m, classes: r == null ? void 0 : r.entityClasses }, x)) })
|
|
1830
1830
|
] }) });
|
|
1831
|
-
},
|
|
1831
|
+
}, Fr = ({ fields: e, control: t }) => e.map(({ type: r, args: o }) => {
|
|
1832
1832
|
const i = ke[r];
|
|
1833
1833
|
return /* @__PURE__ */ $t(i, { ...o, key: o.name, control: t });
|
|
1834
1834
|
});
|
|
1835
|
-
class
|
|
1835
|
+
class Br {
|
|
1836
1836
|
constructor(t) {
|
|
1837
1837
|
it(this, "TEXT_NODE", 3);
|
|
1838
1838
|
it(this, "ELEMENT_NODE", 1);
|
|
@@ -1910,7 +1910,7 @@ class Hr extends Error {
|
|
|
1910
1910
|
super(t), this.originalError = r, this.name = "BrowserHTMLParserError";
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
|
-
class _r extends
|
|
1913
|
+
class _r extends Br {
|
|
1914
1914
|
constructor(t) {
|
|
1915
1915
|
super(t);
|
|
1916
1916
|
}
|
|
@@ -2041,7 +2041,7 @@ const Pr = ({ promises: e }) => {
|
|
|
2041
2041
|
schema: f,
|
|
2042
2042
|
defaultValues: Se.getZodDefaults(f),
|
|
2043
2043
|
mode: "onBlur"
|
|
2044
|
-
}), N = qr(r, e), w =
|
|
2044
|
+
}), N = qr(r, e), w = Fe({ control: b, fields: N || [], schema: f }), _ = (s) => {
|
|
2045
2045
|
u && u(s), console.warn(s);
|
|
2046
2046
|
};
|
|
2047
2047
|
return /* @__PURE__ */ n.jsx(Ur, { children: /* @__PURE__ */ n.jsxs(
|
|
@@ -2087,7 +2087,7 @@ const Pr = ({ promises: e }) => {
|
|
|
2087
2087
|
classes: l == null ? void 0 : l.progressBar
|
|
2088
2088
|
}
|
|
2089
2089
|
),
|
|
2090
|
-
/* @__PURE__ */ n.jsx(
|
|
2090
|
+
/* @__PURE__ */ n.jsx(Fr, { control: b, fields: e }),
|
|
2091
2091
|
/* @__PURE__ */ n.jsxs("div", { className: "mob-body-regular-m flex flex-col items-center justify-center gap-4 desktop:flex-row desktop:justify-between", children: [
|
|
2092
2092
|
Vr(o, m, x, l == null ? void 0 : l.approvement),
|
|
2093
2093
|
/* @__PURE__ */ n.jsx(
|
|
@@ -2201,7 +2201,7 @@ const Pr = ({ promises: e }) => {
|
|
|
2201
2201
|
if (i) {
|
|
2202
2202
|
const x = {
|
|
2203
2203
|
index: 0,
|
|
2204
|
-
id:
|
|
2204
|
+
id: Bt(),
|
|
2205
2205
|
path: "/",
|
|
2206
2206
|
label: "home"
|
|
2207
2207
|
};
|
|
@@ -2213,7 +2213,7 @@ const Pr = ({ promises: e }) => {
|
|
|
2213
2213
|
// while root enabled we need to increment index
|
|
2214
2214
|
// cuz we have root breadcrumb
|
|
2215
2215
|
index: i ? f + 1 : f,
|
|
2216
|
-
id:
|
|
2216
|
+
id: Bt(),
|
|
2217
2217
|
path: m,
|
|
2218
2218
|
label: x
|
|
2219
2219
|
};
|
|
@@ -2610,7 +2610,7 @@ const Kr = (e, t) => {
|
|
|
2610
2610
|
document.body
|
|
2611
2611
|
)
|
|
2612
2612
|
] });
|
|
2613
|
-
},
|
|
2613
|
+
}, Fn = ({ categories: e, helpers: t, phone: r }) => {
|
|
2614
2614
|
const { isMobile: o } = K();
|
|
2615
2615
|
return /* @__PURE__ */ n.jsxs("div", { id: j.seoHeader, "data-test-id": j.seoHeader, className: "mx-auto w-full max-w-[1440px]", children: [
|
|
2616
2616
|
o ? /* @__PURE__ */ n.jsx(un, { categories: e.map((i) => i.children).flat(), helpers: t, phone: r }) : /* @__PURE__ */ n.jsx(on, { categories: e, helpers: t, phone: r }),
|
|
@@ -2633,14 +2633,14 @@ export {
|
|
|
2633
2633
|
Y as ButtonWithHandlers,
|
|
2634
2634
|
On as DynamicForm,
|
|
2635
2635
|
Sn as FallbacksView,
|
|
2636
|
-
|
|
2636
|
+
Fr as FieldMapper,
|
|
2637
2637
|
sn as Footer,
|
|
2638
2638
|
_r as HTMLParser,
|
|
2639
2639
|
ft as HTMLRenderer,
|
|
2640
2640
|
vn as Header,
|
|
2641
2641
|
In as InterLinking,
|
|
2642
2642
|
Tn as LongBanner,
|
|
2643
|
-
|
|
2643
|
+
Fn as SeoHeader,
|
|
2644
2644
|
Cn as Stepper,
|
|
2645
2645
|
Mn as UsefulInfo,
|
|
2646
2646
|
Le as WIDGET_LIST,
|