@scbt-ecom/ui 0.78.4 → 0.78.5
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 +33 -33
- package/dist/widget.js.map +1 -1
- package/package.json +1 -1
package/dist/widget.js
CHANGED
|
@@ -4,7 +4,7 @@ var Qe = (t) => {
|
|
|
4
4
|
};
|
|
5
5
|
var Pt = (t, e, r) => e in t ? Bt(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
|
|
6
6
|
var de = (t, e, r) => Pt(t, typeof e != "symbol" ? e + "" : e, r), Ce = (t, e, r) => e.has(t) || Qe("Cannot " + r);
|
|
7
|
-
var x = (t, e, r) => (Ce(t, e, "read from private field"), r ? r.call(t) : e.get(t)),
|
|
7
|
+
var x = (t, e, r) => (Ce(t, e, "read from private field"), r ? r.call(t) : e.get(t)), _ = (t, e, r) => e.has(t) ? Qe("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), w = (t, e, r, o) => (Ce(t, e, "write to private field"), o ? o.call(t, r) : e.set(t, r), r), q = (t, e, r) => (Ce(t, e, "access private method"), r);
|
|
8
8
|
var fe = (t, e, r, o) => ({
|
|
9
9
|
set _(i) {
|
|
10
10
|
w(t, e, i, r);
|
|
@@ -27,7 +27,7 @@ import { createPortal as Nt } from "react-dom";
|
|
|
27
27
|
var H, pt, lr = (pt = class extends st {
|
|
28
28
|
constructor(e = {}) {
|
|
29
29
|
super();
|
|
30
|
-
|
|
30
|
+
_(this, H);
|
|
31
31
|
this.config = e, w(this, H, /* @__PURE__ */ new Map());
|
|
32
32
|
}
|
|
33
33
|
build(e, r, o) {
|
|
@@ -99,10 +99,10 @@ var H, pt, lr = (pt = class extends st {
|
|
|
99
99
|
}, H = new WeakMap(), pt), z, O, G, L, W, ct, dr = (ct = class extends Rt {
|
|
100
100
|
constructor(e) {
|
|
101
101
|
super();
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
102
|
+
_(this, L);
|
|
103
|
+
_(this, z);
|
|
104
|
+
_(this, O);
|
|
105
|
+
_(this, G);
|
|
106
106
|
this.mutationId = e.mutationId, w(this, O, e.mutationCache), w(this, z, []), this.state = e.state || ur(), this.setOptions(e.options), this.scheduleGc();
|
|
107
107
|
}
|
|
108
108
|
setOptions(e) {
|
|
@@ -134,7 +134,7 @@ var H, pt, lr = (pt = class extends st {
|
|
|
134
134
|
this.execute(this.state.variables);
|
|
135
135
|
}
|
|
136
136
|
async execute(e) {
|
|
137
|
-
var a, d, u, m, h, p, c, f, b, j, g, N, T, U, M,
|
|
137
|
+
var a, d, u, m, h, p, c, f, b, j, g, N, T, U, M, I, R, V, pe, le;
|
|
138
138
|
const r = () => {
|
|
139
139
|
q(this, L, W).call(this, { type: "continue" });
|
|
140
140
|
};
|
|
@@ -193,7 +193,7 @@ var H, pt, lr = (pt = class extends st {
|
|
|
193
193
|
e,
|
|
194
194
|
this.state.context,
|
|
195
195
|
this
|
|
196
|
-
)), await ((
|
|
196
|
+
)), await ((I = (M = this.options).onError) == null ? void 0 : I.call(
|
|
197
197
|
M,
|
|
198
198
|
C,
|
|
199
199
|
e,
|
|
@@ -299,9 +299,9 @@ function ur() {
|
|
|
299
299
|
var A, P, xe, ft, mr = (ft = class extends st {
|
|
300
300
|
constructor(e = {}) {
|
|
301
301
|
super();
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
_(this, A);
|
|
303
|
+
_(this, P);
|
|
304
|
+
_(this, xe);
|
|
305
305
|
this.config = e, w(this, A, /* @__PURE__ */ new Set()), w(this, P, /* @__PURE__ */ new Map()), w(this, xe, 0);
|
|
306
306
|
}
|
|
307
307
|
build(e, r, o) {
|
|
@@ -409,15 +409,15 @@ function Ze(t) {
|
|
|
409
409
|
g = !0;
|
|
410
410
|
}), e.signal)
|
|
411
411
|
});
|
|
412
|
-
}, T = zt(e.options, e.fetchOptions), U = async (M,
|
|
412
|
+
}, T = zt(e.options, e.fetchOptions), U = async (M, I, R) => {
|
|
413
413
|
if (g)
|
|
414
414
|
return Promise.reject();
|
|
415
|
-
if (
|
|
415
|
+
if (I == null && M.pages.length)
|
|
416
416
|
return Promise.resolve(M);
|
|
417
417
|
const V = {
|
|
418
418
|
client: e.client,
|
|
419
419
|
queryKey: e.queryKey,
|
|
420
|
-
pageParam:
|
|
420
|
+
pageParam: I,
|
|
421
421
|
direction: R ? "backward" : "forward",
|
|
422
422
|
meta: e.options.meta
|
|
423
423
|
};
|
|
@@ -427,22 +427,22 @@ function Ze(t) {
|
|
|
427
427
|
), { maxPages: le } = e.options, C = R ? Lt : Qt;
|
|
428
428
|
return {
|
|
429
429
|
pages: C(M.pages, pe, le),
|
|
430
|
-
pageParams: C(M.pageParams,
|
|
430
|
+
pageParams: C(M.pageParams, I, le)
|
|
431
431
|
};
|
|
432
432
|
};
|
|
433
433
|
if (i && a.length) {
|
|
434
|
-
const M = i === "backward",
|
|
434
|
+
const M = i === "backward", I = M ? hr : Xe, R = {
|
|
435
435
|
pages: a,
|
|
436
436
|
pageParams: d
|
|
437
|
-
}, V =
|
|
437
|
+
}, V = I(o, R);
|
|
438
438
|
u = await U(R, V, M);
|
|
439
439
|
} else {
|
|
440
440
|
const M = t ?? a.length;
|
|
441
441
|
do {
|
|
442
|
-
const
|
|
443
|
-
if (m > 0 &&
|
|
442
|
+
const I = m === 0 ? d[0] ?? o.initialPageParam : Xe(o, u);
|
|
443
|
+
if (m > 0 && I == null)
|
|
444
444
|
break;
|
|
445
|
-
u = await U(u,
|
|
445
|
+
u = await U(u, I), m++;
|
|
446
446
|
} while (m < M);
|
|
447
447
|
}
|
|
448
448
|
return u;
|
|
@@ -479,14 +479,14 @@ function hr(t, { pages: e, pageParams: r }) {
|
|
|
479
479
|
}
|
|
480
480
|
var k, K, Z, te, re, X, ne, oe, bt, xr = (bt = class {
|
|
481
481
|
constructor(t = {}) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
482
|
+
_(this, k);
|
|
483
|
+
_(this, K);
|
|
484
|
+
_(this, Z);
|
|
485
|
+
_(this, te);
|
|
486
|
+
_(this, re);
|
|
487
|
+
_(this, X);
|
|
488
|
+
_(this, ne);
|
|
489
|
+
_(this, oe);
|
|
490
490
|
w(this, k, t.queryCache || new lr()), w(this, K, t.mutationCache || new mr()), w(this, Z, t.defaultOptions || {}), w(this, te, /* @__PURE__ */ new Map()), w(this, re, /* @__PURE__ */ new Map()), w(this, X, 0);
|
|
491
491
|
}
|
|
492
492
|
mount() {
|
|
@@ -2123,8 +2123,8 @@ const Sn = ({ promises: t }) => {
|
|
|
2123
2123
|
schema: c,
|
|
2124
2124
|
defaultValues: f,
|
|
2125
2125
|
mode: "onBlur"
|
|
2126
|
-
}), g = En(r, t), N = ir({ control: b, fields: g || [], schema: c }), T = (
|
|
2127
|
-
m && m({ ...
|
|
2126
|
+
}), g = En(r, t), N = ir({ control: b, fields: g || [], schema: c }), T = (I) => {
|
|
2127
|
+
m && m({ ...I, agree: h });
|
|
2128
2128
|
};
|
|
2129
2129
|
return /* @__PURE__ */ n.jsx(It, { children: /* @__PURE__ */ n.jsx("section", { id: y.form, "data-test-id": y.form, className: l("w-full", d == null ? void 0 : d.root), children: /* @__PURE__ */ n.jsxs(
|
|
2130
2130
|
F,
|
|
@@ -2169,12 +2169,12 @@ const Sn = ({ promises: t }) => {
|
|
|
2169
2169
|
/* @__PURE__ */ n.jsx(ze, { control: b, fields: t }),
|
|
2170
2170
|
/* @__PURE__ */ n.jsxs("div", { className: "mob-body-regular-m flex flex-col items-start justify-center gap-4", children: [
|
|
2171
2171
|
Rn(o, h, p, d == null ? void 0 : d.approvement),
|
|
2172
|
-
/* @__PURE__ */ n.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-4 desktop:flex-row", children: u.map((
|
|
2173
|
-
const V =
|
|
2172
|
+
/* @__PURE__ */ n.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-4 desktop:flex-row", children: u.map((I, R) => {
|
|
2173
|
+
const V = I.type === "submit" && o.type === "checkbox" ? !h : !1;
|
|
2174
2174
|
return /* @__PURE__ */ Be(
|
|
2175
2175
|
je,
|
|
2176
2176
|
{
|
|
2177
|
-
...
|
|
2177
|
+
...I,
|
|
2178
2178
|
key: R,
|
|
2179
2179
|
disabled: V,
|
|
2180
2180
|
className: l(
|