@scbt-ecom/ui 0.68.0 → 0.68.1
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/widget.js +30 -36
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -96,14 +96,14 @@ var B, Ue, Wt = (Ue = class extends Ze {
|
|
|
96
96
|
});
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
}, B = new WeakMap(), Ue), R, T, J, _, q, We,
|
|
99
|
+
}, B = new WeakMap(), Ue), R, T, J, _, q, We, Kt = (We = class extends st {
|
|
100
100
|
constructor(e) {
|
|
101
101
|
super();
|
|
102
102
|
C(this, _);
|
|
103
103
|
C(this, R);
|
|
104
104
|
C(this, T);
|
|
105
105
|
C(this, J);
|
|
106
|
-
this.mutationId = e.mutationId, y(this, T, e.mutationCache), y(this, R, []), this.state = e.state ||
|
|
106
|
+
this.mutationId = e.mutationId, y(this, T, e.mutationCache), y(this, R, []), this.state = e.state || $t(), this.setOptions(e.options), this.scheduleGc();
|
|
107
107
|
}
|
|
108
108
|
setOptions(e) {
|
|
109
109
|
this.options = e, this.updateGcTime(this.options.gcTime);
|
|
@@ -134,7 +134,7 @@ var B, Ue, Wt = (Ue = class extends Ze {
|
|
|
134
134
|
this.execute(this.state.variables);
|
|
135
135
|
}
|
|
136
136
|
async execute(e) {
|
|
137
|
-
var a, l, u, m, x, p, c, b, w, v, I, P,
|
|
137
|
+
var a, l, u, m, x, p, c, b, w, v, I, P, $, Q, N, F, V, Z, he, ie;
|
|
138
138
|
const n = () => {
|
|
139
139
|
A(this, _, q).call(this, { type: "continue" });
|
|
140
140
|
};
|
|
@@ -187,8 +187,8 @@ var B, Ue, Wt = (Ue = class extends Ze {
|
|
|
187
187
|
)), await ((P = (I = this.options).onSettled) == null ? void 0 : P.call(I, k, null, e, this.state.context)), A(this, _, q).call(this, { type: "success", data: k }), k;
|
|
188
188
|
} catch (k) {
|
|
189
189
|
try {
|
|
190
|
-
throw await ((Q = (
|
|
191
|
-
|
|
190
|
+
throw await ((Q = ($ = h(this, T).config).onError) == null ? void 0 : Q.call(
|
|
191
|
+
$,
|
|
192
192
|
k,
|
|
193
193
|
e,
|
|
194
194
|
this.state.context,
|
|
@@ -283,7 +283,7 @@ var B, Ue, Wt = (Ue = class extends Ze {
|
|
|
283
283
|
});
|
|
284
284
|
});
|
|
285
285
|
}, We);
|
|
286
|
-
function
|
|
286
|
+
function $t() {
|
|
287
287
|
return {
|
|
288
288
|
context: void 0,
|
|
289
289
|
data: void 0,
|
|
@@ -296,7 +296,7 @@ function Kt() {
|
|
|
296
296
|
submittedAt: 0
|
|
297
297
|
};
|
|
298
298
|
}
|
|
299
|
-
var L, O, xe,
|
|
299
|
+
var L, O, xe, Ke, Zt = (Ke = class extends Ze {
|
|
300
300
|
constructor(e = {}) {
|
|
301
301
|
super();
|
|
302
302
|
C(this, L);
|
|
@@ -305,7 +305,7 @@ var L, O, xe, $e, Zt = ($e = class extends Ze {
|
|
|
305
305
|
this.config = e, y(this, L, /* @__PURE__ */ new Set()), y(this, O, /* @__PURE__ */ new Map()), y(this, xe, 0);
|
|
306
306
|
}
|
|
307
307
|
build(e, n, o) {
|
|
308
|
-
const i = new
|
|
308
|
+
const i = new Kt({
|
|
309
309
|
mutationCache: this,
|
|
310
310
|
mutationId: ++ce(this, xe)._,
|
|
311
311
|
options: e.defaultMutationOptions(n),
|
|
@@ -389,7 +389,7 @@ var L, O, xe, $e, Zt = ($e = class extends Ze {
|
|
|
389
389
|
)
|
|
390
390
|
);
|
|
391
391
|
}
|
|
392
|
-
}, L = new WeakMap(), O = new WeakMap(), xe = new WeakMap(),
|
|
392
|
+
}, L = new WeakMap(), O = new WeakMap(), xe = new WeakMap(), Ke);
|
|
393
393
|
function fe(t) {
|
|
394
394
|
var e;
|
|
395
395
|
return (e = t.options.scope) == null ? void 0 : e.id;
|
|
@@ -409,7 +409,7 @@ function Le(t) {
|
|
|
409
409
|
I = !0;
|
|
410
410
|
}), e.signal)
|
|
411
411
|
});
|
|
412
|
-
},
|
|
412
|
+
}, $ = wt(e.options, e.fetchOptions), Q = async (N, F, V) => {
|
|
413
413
|
if (I)
|
|
414
414
|
return Promise.reject();
|
|
415
415
|
if (F == null && N.pages.length)
|
|
@@ -422,7 +422,7 @@ function Le(t) {
|
|
|
422
422
|
meta: e.options.meta
|
|
423
423
|
};
|
|
424
424
|
P(Z);
|
|
425
|
-
const he = await
|
|
425
|
+
const he = await $(
|
|
426
426
|
Z
|
|
427
427
|
), { maxPages: ie } = e.options, k = V ? vt : Nt;
|
|
428
428
|
return {
|
|
@@ -477,20 +477,20 @@ function Xt(t, { pages: e, pageParams: n }) {
|
|
|
477
477
|
var o;
|
|
478
478
|
return e.length > 0 ? (o = t.getPreviousPageParam) == null ? void 0 : o.call(t, e[0], e, n[0], n) : void 0;
|
|
479
479
|
}
|
|
480
|
-
var j, U, W, ee, te,
|
|
480
|
+
var j, U, W, ee, te, K, re, ne, $e, Jt = ($e = class {
|
|
481
481
|
constructor(t = {}) {
|
|
482
482
|
C(this, j);
|
|
483
483
|
C(this, U);
|
|
484
484
|
C(this, W);
|
|
485
485
|
C(this, ee);
|
|
486
486
|
C(this, te);
|
|
487
|
-
C(this,
|
|
487
|
+
C(this, K);
|
|
488
488
|
C(this, re);
|
|
489
489
|
C(this, ne);
|
|
490
|
-
y(this, j, t.queryCache || new Wt()), y(this, U, t.mutationCache || new Zt()), y(this, W, t.defaultOptions || {}), y(this, ee, /* @__PURE__ */ new Map()), y(this, te, /* @__PURE__ */ new Map()), y(this,
|
|
490
|
+
y(this, j, t.queryCache || new Wt()), y(this, U, t.mutationCache || new Zt()), y(this, W, t.defaultOptions || {}), y(this, ee, /* @__PURE__ */ new Map()), y(this, te, /* @__PURE__ */ new Map()), y(this, K, 0);
|
|
491
491
|
}
|
|
492
492
|
mount() {
|
|
493
|
-
ce(this,
|
|
493
|
+
ce(this, K)._++, h(this, K) === 1 && (y(this, re, Ct.subscribe(async (t) => {
|
|
494
494
|
t && (await this.resumePausedMutations(), h(this, j).onFocus());
|
|
495
495
|
})), y(this, ne, Re.subscribe(async (t) => {
|
|
496
496
|
t && (await this.resumePausedMutations(), h(this, j).onOnline());
|
|
@@ -498,7 +498,7 @@ var j, U, W, ee, te, $, re, ne, Ke, Jt = (Ke = class {
|
|
|
498
498
|
}
|
|
499
499
|
unmount() {
|
|
500
500
|
var t, e;
|
|
501
|
-
ce(this,
|
|
501
|
+
ce(this, K)._--, h(this, K) === 0 && ((t = h(this, re)) == null || t.call(this), y(this, re, void 0), (e = h(this, ne)) == null || e.call(this), y(this, ne, void 0));
|
|
502
502
|
}
|
|
503
503
|
isFetching(t) {
|
|
504
504
|
return h(this, j).findAll({ ...t, fetchStatus: "fetching" }).length;
|
|
@@ -683,7 +683,7 @@ var j, U, W, ee, te, $, re, ne, Ke, Jt = (Ke = class {
|
|
|
683
683
|
clear() {
|
|
684
684
|
h(this, j).clear(), h(this, U).clear();
|
|
685
685
|
}
|
|
686
|
-
}, j = new WeakMap(), U = new WeakMap(), W = new WeakMap(), ee = new WeakMap(), te = new WeakMap(),
|
|
686
|
+
}, j = new WeakMap(), U = new WeakMap(), W = new WeakMap(), ee = new WeakMap(), te = new WeakMap(), K = new WeakMap(), re = new WeakMap(), ne = new WeakMap(), $e);
|
|
687
687
|
const Yt = [
|
|
688
688
|
"header",
|
|
689
689
|
"footer",
|
|
@@ -807,7 +807,7 @@ const Yt = [
|
|
|
807
807
|
default:
|
|
808
808
|
return null;
|
|
809
809
|
}
|
|
810
|
-
},
|
|
810
|
+
}, Kn = (t) => {
|
|
811
811
|
const { logoPath: e = "/", logoType: n = "main", classes: o } = t;
|
|
812
812
|
return /* @__PURE__ */ r.jsx(
|
|
813
813
|
"header",
|
|
@@ -1024,7 +1024,7 @@ const Yt = [
|
|
|
1024
1024
|
}
|
|
1025
1025
|
)
|
|
1026
1026
|
] });
|
|
1027
|
-
},
|
|
1027
|
+
}, $n = ({ variant: t, ...e }) => {
|
|
1028
1028
|
switch (t) {
|
|
1029
1029
|
case "separateImg":
|
|
1030
1030
|
return /* @__PURE__ */ r.jsx(Qe, { ...e });
|
|
@@ -1876,19 +1876,19 @@ const Yt = [
|
|
|
1876
1876
|
default:
|
|
1877
1877
|
return null;
|
|
1878
1878
|
}
|
|
1879
|
-
},
|
|
1879
|
+
}, Kr = ({ entity: t, classes: e, accordionsConfig: n }) => /* @__PURE__ */ r.jsx("div", { className: d("flex flex-col gap-6", e == null ? void 0 : e.entityWrapper), children: Wr({ entity: t, classes: e, accordionsConfig: n }) }), eo = ({ headline: t, tabs: e, classes: n, accordionsConfig: o }) => {
|
|
1880
1880
|
var u, m;
|
|
1881
1881
|
const [i, a] = z(0), l = ye(() => e == null ? void 0 : e.map((x) => x == null ? void 0 : x.tabName), [e]) ?? [];
|
|
1882
1882
|
return !e || (e == null ? void 0 : e.length) === 0 ? null : /* @__PURE__ */ r.jsx("section", { id: g.usefulInfo, "data-test-id": g.usefulInfo, className: d(n == null ? void 0 : n.root), children: /* @__PURE__ */ r.jsxs(S, { className: d(n == null ? void 0 : n.container), children: [
|
|
1883
1883
|
/* @__PURE__ */ r.jsx(H, { className: d(n == null ? void 0 : n.headline), as: "h2", children: t }),
|
|
1884
1884
|
/* @__PURE__ */ r.jsx("div", { className: d("mt-6 flex flex-col gap-2 desktop:mt-12", n == null ? void 0 : n.tabsWrapper), children: /* @__PURE__ */ r.jsx(Tr, { tabsNames: l, activeTab: i, setActiveTab: a, classes: n == null ? void 0 : n.tabs }) }),
|
|
1885
|
-
/* @__PURE__ */ r.jsx("div", { className: d("mt-6 flex flex-col gap-6", n == null ? void 0 : n.contentWrapper), children: (m = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.contents) == null ? void 0 : m.map((x, p) => /* @__PURE__ */ r.jsx(
|
|
1885
|
+
/* @__PURE__ */ r.jsx("div", { className: d("mt-6 flex flex-col gap-6", n == null ? void 0 : n.contentWrapper), children: (m = (u = e == null ? void 0 : e[i]) == null ? void 0 : u.contents) == null ? void 0 : m.map((x, p) => /* @__PURE__ */ r.jsx(Kr, { accordionsConfig: o, ...x, classes: n == null ? void 0 : n.entityClasses }, p)) })
|
|
1886
1886
|
] }) });
|
|
1887
1887
|
}, ht = ({ fields: t, control: e }) => t.map(({ type: n, args: o }) => {
|
|
1888
1888
|
const i = Ft[n];
|
|
1889
1889
|
return /* @__PURE__ */ et(i, { ...o, key: o.name, control: e });
|
|
1890
1890
|
});
|
|
1891
|
-
class
|
|
1891
|
+
class $r {
|
|
1892
1892
|
constructor(e) {
|
|
1893
1893
|
ae(this, "TEXT_NODE", 3);
|
|
1894
1894
|
ae(this, "ELEMENT_NODE", 1);
|
|
@@ -1961,7 +1961,7 @@ class Kr {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
1963
|
const Zr = typeof window < "u";
|
|
1964
|
-
class Xr extends
|
|
1964
|
+
class Xr extends $r {
|
|
1965
1965
|
constructor(e) {
|
|
1966
1966
|
super(e);
|
|
1967
1967
|
}
|
|
@@ -2066,7 +2066,7 @@ const Jr = ({ promises: t }) => {
|
|
|
2066
2066
|
submitProps: a,
|
|
2067
2067
|
classes: l
|
|
2068
2068
|
}) => {
|
|
2069
|
-
var
|
|
2069
|
+
var $, Q;
|
|
2070
2070
|
const { submitCallback: u, ...m } = a || {}, [x, p] = z(!1), c = ut(t), { control: b, handleSubmit: w } = nt({
|
|
2071
2071
|
schema: c,
|
|
2072
2072
|
defaultValues: at.getZodDefaults(c),
|
|
@@ -2092,7 +2092,7 @@ const Jr = ({ promises: t }) => {
|
|
|
2092
2092
|
"desk-body-regular-l flex items-center gap-x-2 rounded-sm desktop:absolute",
|
|
2093
2093
|
"bg-color-blue-grey-100 px-2 py-1 text-color-tetriary",
|
|
2094
2094
|
"right-4 top-4 w-max",
|
|
2095
|
-
(
|
|
2095
|
+
($ = l == null ? void 0 : l.chips) == null ? void 0 : $.root
|
|
2096
2096
|
),
|
|
2097
2097
|
children: [
|
|
2098
2098
|
i.image && /* @__PURE__ */ r.jsx(f, { name: i.image, className: d("size-4", (Q = l == null ? void 0 : l.chips) == null ? void 0 : Q.icon) }),
|
|
@@ -2685,14 +2685,9 @@ const on = (t, e) => {
|
|
|
2685
2685
|
break;
|
|
2686
2686
|
}
|
|
2687
2687
|
return new Intl.NumberFormat("ru-RU", o).format(n);
|
|
2688
|
-
}, sn = (t) => Object.values(t).reduce((n, o) => n.merge(ut(o.fields)), At.object({})), kn = (t, e) => {
|
|
2689
|
-
const
|
|
2690
|
-
|
|
2691
|
-
throw new Error(`Отсутствуют переменные для калькулятора: ${o.join(", ")}`);
|
|
2692
|
-
return t;
|
|
2693
|
-
}, bt = (t, e) => {
|
|
2694
|
-
const n = Object.keys(e), o = Object.values(e), i = kn(t, e), l = new Function(...n, `return ${i};`)(...o);
|
|
2695
|
-
return Number.isNaN(l) ? "0" : l.toString();
|
|
2688
|
+
}, sn = (t) => Object.values(t).reduce((n, o) => n.merge(ut(o.fields)), At.object({})), kn = (t, e) => (t.match(/[a-zA-Z_$][a-zA-Z0-9_$]*/g) || []).filter((i) => !(i in e)).length > 0 ? "" : t, bt = (t, e) => {
|
|
2689
|
+
const n = Object.entries(e).map(([m, x]) => [m, x !== null ? x : "1"]), o = n.map(([m]) => m), i = n.map(([, m]) => m), a = kn(t, Object.fromEntries(n)), u = new Function(...o, `return ${a};`)(...i.map(Number));
|
|
2690
|
+
return Number.isNaN(Number(u)) ? "0" : u.toString();
|
|
2696
2691
|
}, wn = (t, e) => t.map((n) => ({
|
|
2697
2692
|
...n,
|
|
2698
2693
|
value: ct(n.value) ? bt(n.value.formula, e) : n.value
|
|
@@ -2806,7 +2801,6 @@ const on = (t, e) => {
|
|
|
2806
2801
|
calculatorInfoConfig: t,
|
|
2807
2802
|
calculatorFieldsConfig: e
|
|
2808
2803
|
}) => {
|
|
2809
|
-
console.log(t, "@calculatorInfoConfig"), console.log(e, "@calculatorFieldsConfig");
|
|
2810
2804
|
const n = sn(e == null ? void 0 : e.fieldsGroup), o = nt({
|
|
2811
2805
|
schema: n,
|
|
2812
2806
|
mode: "onBlur",
|
|
@@ -2843,7 +2837,7 @@ const on = (t, e) => {
|
|
|
2843
2837
|
export {
|
|
2844
2838
|
Ne as Advantages,
|
|
2845
2839
|
Yn as AuthProvider,
|
|
2846
|
-
|
|
2840
|
+
$n as Banner,
|
|
2847
2841
|
Qe as BannerWithSeparateImg,
|
|
2848
2842
|
Wn as Benefit,
|
|
2849
2843
|
nn as Breadcrumbs,
|
|
@@ -2856,7 +2850,7 @@ export {
|
|
|
2856
2850
|
Zn as Footer,
|
|
2857
2851
|
Xr as HTMLParser,
|
|
2858
2852
|
ge as HTMLRenderer,
|
|
2859
|
-
|
|
2853
|
+
Kn as Header,
|
|
2860
2854
|
Gn as InterLinking,
|
|
2861
2855
|
Jn as LongBanner,
|
|
2862
2856
|
no as SeoHeader,
|