@registrucentras/rc-ses-react-components 2.0.0-rc.5 → 2.0.0-rc.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/components/common/TitleBlock/types.d.ts +3 -1
- package/dist/registrucentras-rc-ses-react-components.cjs +1 -1
- package/dist/registrucentras-rc-ses-react-components.js +320 -320
- package/dist/stories/components/display/TitleBlock.stories.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/common/TitleBlock/index.test.tsx +33 -0
- package/src/components/common/TitleBlock/index.tsx +3 -2
- package/src/components/common/TitleBlock/types.ts +3 -1
- package/src/stories/components/display/TitleBlock.stories.tsx +66 -0
|
@@ -312,7 +312,7 @@ const Oe = {
|
|
|
312
312
|
page: f,
|
|
313
313
|
siblingCount: c ? 0 : 1,
|
|
314
314
|
boundaryCount: 1,
|
|
315
|
-
onChange: (b,
|
|
315
|
+
onChange: (b, S) => g(S)
|
|
316
316
|
}
|
|
317
317
|
),
|
|
318
318
|
/* @__PURE__ */ s(
|
|
@@ -695,25 +695,25 @@ class Rt extends Mt {
|
|
|
695
695
|
} : a;
|
|
696
696
|
const g = this.resolve(e, o);
|
|
697
697
|
let m = g?.res;
|
|
698
|
-
const b = g?.usedKey || a,
|
|
698
|
+
const b = g?.usedKey || a, S = g?.exactUsedKey || a, k = ["[object Number]", "[object Function]", "[object RegExp]"], x = o.joinArrays !== void 0 ? o.joinArrays : this.options.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, O = o.count !== void 0 && !N(o.count), E = Rt.hasDefaultValue(o), P = O ? this.pluralResolver.getSuffix(h, o.count, o) : "", v = o.ordinal && O ? this.pluralResolver.getSuffix(h, o.count, {
|
|
699
699
|
ordinal: !1
|
|
700
700
|
}) : "", L = O && !o.ordinal && o.count === 0, I = L && o[`defaultValue${this.options.pluralSeparator}zero`] || o[`defaultValue${P}`] || o[`defaultValue${v}`] || o.defaultValue;
|
|
701
|
-
let
|
|
702
|
-
|
|
703
|
-
const A = Vt(
|
|
704
|
-
if (
|
|
701
|
+
let C = m;
|
|
702
|
+
y && !m && E && (C = I);
|
|
703
|
+
const A = Vt(C), T = Object.prototype.toString.apply(C);
|
|
704
|
+
if (y && C && A && !k.includes(T) && !(N(x) && Array.isArray(C))) {
|
|
705
705
|
if (!o.returnObjects && !this.options.returnObjects) {
|
|
706
706
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
707
|
-
const M = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b,
|
|
707
|
+
const M = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(b, C, {
|
|
708
708
|
...o,
|
|
709
709
|
ns: c
|
|
710
710
|
}) : `key '${a} (${this.language})' returned an object instead of string.`;
|
|
711
711
|
return i ? (g.res = M, g.usedParams = this.getUsedParamsDetails(o), g) : M;
|
|
712
712
|
}
|
|
713
713
|
if (l) {
|
|
714
|
-
const M = Array.isArray(
|
|
715
|
-
for (const z in
|
|
716
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
714
|
+
const M = Array.isArray(C), D = M ? [] : {}, V = M ? S : b;
|
|
715
|
+
for (const z in C)
|
|
716
|
+
if (Object.prototype.hasOwnProperty.call(C, z)) {
|
|
717
717
|
const U = `${V}${l}${z}`;
|
|
718
718
|
E && !m ? D[z] = this.translate(U, {
|
|
719
719
|
...o,
|
|
@@ -724,12 +724,12 @@ class Rt extends Mt {
|
|
|
724
724
|
...o,
|
|
725
725
|
joinArrays: !1,
|
|
726
726
|
ns: c
|
|
727
|
-
}), D[z] === U && (D[z] =
|
|
727
|
+
}), D[z] === U && (D[z] = C[z]);
|
|
728
728
|
}
|
|
729
729
|
m = D;
|
|
730
730
|
}
|
|
731
|
-
} else if (
|
|
732
|
-
m = m.join(
|
|
731
|
+
} else if (y && N(x) && Array.isArray(m))
|
|
732
|
+
m = m.join(x), m && (m = this.extendTranslation(m, e, o, n));
|
|
733
733
|
else {
|
|
734
734
|
let M = !1, D = !1;
|
|
735
735
|
!this.isValidLookup(m) && E && (M = !0, m = I), this.isValidLookup(m) || (D = !0, m = a);
|
|
@@ -816,25 +816,25 @@ class Rt extends Mt {
|
|
|
816
816
|
let h = d.namespaces;
|
|
817
817
|
this.options.fallbackNS && (h = h.concat(this.options.fallbackNS));
|
|
818
818
|
const f = r.count !== void 0 && !N(r.count), g = f && !r.ordinal && r.count === 0, m = r.context !== void 0 && (N(r.context) || typeof r.context == "number") && r.context !== "", b = r.lngs ? r.lngs : this.languageUtils.toResolveHierarchy(r.lng || this.language, r.fallbackLng);
|
|
819
|
-
h.forEach((
|
|
820
|
-
this.isValidLookup(n) || (a =
|
|
819
|
+
h.forEach((S) => {
|
|
820
|
+
this.isValidLookup(n) || (a = S, !this.checkedLoadedFor[`${b[0]}-${S}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(a) && (this.checkedLoadedFor[`${b[0]}-${S}`] = !0, this.logger.warn(`key "${o}" for languages "${b.join(", ")}" won't get resolved as namespace "${a}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), b.forEach((k) => {
|
|
821
821
|
if (this.isValidLookup(n)) return;
|
|
822
822
|
l = k;
|
|
823
|
-
const
|
|
823
|
+
const x = [p];
|
|
824
824
|
if (this.i18nFormat?.addLookupKeys)
|
|
825
|
-
this.i18nFormat.addLookupKeys(
|
|
825
|
+
this.i18nFormat.addLookupKeys(x, p, k, S, r);
|
|
826
826
|
else {
|
|
827
827
|
let O;
|
|
828
828
|
f && (O = this.pluralResolver.getSuffix(k, r.count, r));
|
|
829
829
|
const E = `${this.options.pluralSeparator}zero`, P = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
830
|
-
if (f && (r.ordinal && O.startsWith(P) &&
|
|
830
|
+
if (f && (r.ordinal && O.startsWith(P) && x.push(p + O.replace(P, this.options.pluralSeparator)), x.push(p + O), g && x.push(p + E)), m) {
|
|
831
831
|
const v = `${p}${this.options.contextSeparator || "_"}${r.context}`;
|
|
832
|
-
|
|
832
|
+
x.push(v), f && (r.ordinal && O.startsWith(P) && x.push(v + O.replace(P, this.options.pluralSeparator)), x.push(v + O), g && x.push(v + E));
|
|
833
833
|
}
|
|
834
834
|
}
|
|
835
|
-
let
|
|
836
|
-
for (;
|
|
837
|
-
this.isValidLookup(n) || (i =
|
|
835
|
+
let y;
|
|
836
|
+
for (; y = x.pop(); )
|
|
837
|
+
this.isValidLookup(n) || (i = y, n = this.getResource(k, S, y, r));
|
|
838
838
|
}));
|
|
839
839
|
});
|
|
840
840
|
}), {
|
|
@@ -1021,11 +1021,11 @@ class _r {
|
|
|
1021
1021
|
nestingPrefixEscaped: g,
|
|
1022
1022
|
nestingSuffix: m,
|
|
1023
1023
|
nestingSuffixEscaped: b,
|
|
1024
|
-
nestingOptionsSeparator:
|
|
1024
|
+
nestingOptionsSeparator: S,
|
|
1025
1025
|
maxReplaces: k,
|
|
1026
|
-
alwaysFormat:
|
|
1026
|
+
alwaysFormat: x
|
|
1027
1027
|
} = e.interpolation;
|
|
1028
|
-
this.escape = r !== void 0 ? r : Bi, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = o !== void 0 ? o : !1, this.prefix = i ? Ae(i) : l || "{{", this.suffix = a ? Ae(a) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" : h ? Ae(h) : "-", this.unescapeSuffix = this.unescapePrefix ? "" : p ? Ae(p) : "", this.nestingPrefix = f ? Ae(f) : g || Ae("$t("), this.nestingSuffix = m ? Ae(m) : b || Ae(")"), this.nestingOptionsSeparator =
|
|
1028
|
+
this.escape = r !== void 0 ? r : Bi, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = o !== void 0 ? o : !1, this.prefix = i ? Ae(i) : l || "{{", this.suffix = a ? Ae(a) : c || "}}", this.formatSeparator = d || ",", this.unescapePrefix = p ? "" : h ? Ae(h) : "-", this.unescapeSuffix = this.unescapePrefix ? "" : p ? Ae(p) : "", this.nestingPrefix = f ? Ae(f) : g || Ae("$t("), this.nestingSuffix = m ? Ae(m) : b || Ae(")"), this.nestingOptionsSeparator = S || ",", this.maxReplaces = k || 1e3, this.alwaysFormat = x !== void 0 ? x : !1, this.resetRegExp();
|
|
1029
1029
|
}
|
|
1030
1030
|
reset() {
|
|
1031
1031
|
this.options && this.init(this.options);
|
|
@@ -1045,8 +1045,8 @@ class _r {
|
|
|
1045
1045
|
interpolationkey: g
|
|
1046
1046
|
}) : k;
|
|
1047
1047
|
}
|
|
1048
|
-
const m = g.split(this.formatSeparator), b = m.shift().trim(),
|
|
1049
|
-
return this.format($r(r, c, b, this.options.keySeparator, this.options.ignoreJSONStructure),
|
|
1048
|
+
const m = g.split(this.formatSeparator), b = m.shift().trim(), S = m.join(this.formatSeparator).trim();
|
|
1049
|
+
return this.format($r(r, c, b, this.options.keySeparator, this.options.ignoreJSONStructure), S, n, {
|
|
1050
1050
|
...o,
|
|
1051
1051
|
...r,
|
|
1052
1052
|
interpolationkey: b
|
|
@@ -1065,8 +1065,8 @@ class _r {
|
|
|
1065
1065
|
const m = i[1].trim();
|
|
1066
1066
|
if (l = d(m), l === void 0)
|
|
1067
1067
|
if (typeof p == "function") {
|
|
1068
|
-
const
|
|
1069
|
-
l = N(
|
|
1068
|
+
const S = p(e, i, o);
|
|
1069
|
+
l = N(S) ? S : "";
|
|
1070
1070
|
} else if (o && Object.prototype.hasOwnProperty.call(o, m))
|
|
1071
1071
|
l = "";
|
|
1072
1072
|
else if (h) {
|
|
@@ -1751,19 +1751,19 @@ function ss(t, e) {
|
|
|
1751
1751
|
const r = e && e.components || is, n = e && e.allowedTags;
|
|
1752
1752
|
let o = !1;
|
|
1753
1753
|
if (n) {
|
|
1754
|
-
const m = typeof n == "function" ? n : function(
|
|
1755
|
-
return n.indexOf(
|
|
1754
|
+
const m = typeof n == "function" ? n : function(x) {
|
|
1755
|
+
return n.indexOf(x) > -1;
|
|
1756
1756
|
};
|
|
1757
|
-
let b = "",
|
|
1757
|
+
let b = "", S = 0;
|
|
1758
1758
|
ft.lastIndex = 0;
|
|
1759
1759
|
let k;
|
|
1760
1760
|
for (; k = ft.exec(t); ) {
|
|
1761
|
-
const
|
|
1762
|
-
b += t.slice(
|
|
1763
|
-
const
|
|
1764
|
-
|
|
1761
|
+
const x = k[0];
|
|
1762
|
+
b += t.slice(S, k.index);
|
|
1763
|
+
const y = x.match(rs);
|
|
1764
|
+
x.startsWith("<!--") || y && m(y[1]) ? (b += x, S = k.index + x.length) : (o = !0, b += tt, S = k.index + 1, ft.lastIndex = S);
|
|
1765
1765
|
}
|
|
1766
|
-
t = b + t.slice(
|
|
1766
|
+
t = b + t.slice(S);
|
|
1767
1767
|
}
|
|
1768
1768
|
const i = [], l = [];
|
|
1769
1769
|
let a, c = -1, d = !1, p = 0, h;
|
|
@@ -1779,55 +1779,55 @@ function ss(t, e) {
|
|
|
1779
1779
|
for (; g = ft.exec(t); )
|
|
1780
1780
|
f.push(g);
|
|
1781
1781
|
return f.forEach(function(m, b) {
|
|
1782
|
-
const
|
|
1783
|
-
if (!
|
|
1784
|
-
let k = 0,
|
|
1785
|
-
for (let P = 0; P <
|
|
1786
|
-
const v =
|
|
1787
|
-
O ? v === O && (O = null) : v === '"' || v === "'" ? O = v : v === "<" ? (k++, k === 2 && (
|
|
1788
|
-
}
|
|
1789
|
-
const E =
|
|
1790
|
-
if (k >
|
|
1791
|
-
const P =
|
|
1782
|
+
const S = m[0];
|
|
1783
|
+
if (!S || S.startsWith("<!--")) return;
|
|
1784
|
+
let k = 0, x = 0, y = -1, O = null;
|
|
1785
|
+
for (let P = 0; P < S.length; P++) {
|
|
1786
|
+
const v = S.charAt(P);
|
|
1787
|
+
O ? v === O && (O = null) : v === '"' || v === "'" ? O = v : v === "<" ? (k++, k === 2 && (y = P)) : v === ">" && x++;
|
|
1788
|
+
}
|
|
1789
|
+
const E = y > -1 && /[a-zA-Z0-9\-!/]/.test(S.charAt(y + 1));
|
|
1790
|
+
if (k > x && E) {
|
|
1791
|
+
const P = S.substring(0, y), v = S.substring(P.length);
|
|
1792
1792
|
f[b][0] = v, f[b].index += P.length;
|
|
1793
1793
|
}
|
|
1794
1794
|
}), f.forEach(function(m, b) {
|
|
1795
|
-
const
|
|
1796
|
-
if (!
|
|
1795
|
+
const S = m[0];
|
|
1796
|
+
if (!S) return;
|
|
1797
1797
|
const k = m.index;
|
|
1798
1798
|
if (k < p) return;
|
|
1799
1799
|
if (d) {
|
|
1800
|
-
if (
|
|
1800
|
+
if (S !== "</" + a.name + ">")
|
|
1801
1801
|
return;
|
|
1802
1802
|
d = !1;
|
|
1803
1803
|
}
|
|
1804
|
-
const
|
|
1804
|
+
const x = S.charAt(1) !== "/", y = S.startsWith("<!--"), O = k + S.length, E = t.charAt(O), P = f[b + 1];
|
|
1805
1805
|
let v;
|
|
1806
1806
|
if (E === "<" && P) {
|
|
1807
1807
|
const I = t.substring(O, P.index);
|
|
1808
1808
|
v = I.split("<").length > I.split(">").length;
|
|
1809
1809
|
}
|
|
1810
1810
|
let L;
|
|
1811
|
-
if (
|
|
1812
|
-
const I = Br(
|
|
1811
|
+
if (y) {
|
|
1812
|
+
const I = Br(S);
|
|
1813
1813
|
if (c < 0)
|
|
1814
1814
|
return i.push(I), i;
|
|
1815
1815
|
L = l[c], L.children.push(I);
|
|
1816
|
-
const
|
|
1817
|
-
return
|
|
1816
|
+
const C = t.slice(O, P ? P.index : void 0);
|
|
1817
|
+
return C.length > 0 && L.children.push({
|
|
1818
1818
|
type: "text",
|
|
1819
|
-
content:
|
|
1819
|
+
content: C
|
|
1820
1820
|
}), i;
|
|
1821
1821
|
}
|
|
1822
|
-
if (
|
|
1823
|
-
c++, a = Br(
|
|
1822
|
+
if (x) {
|
|
1823
|
+
c++, a = Br(S), a.type === "tag" && r[a.name] && (a.type = "component", d = !0);
|
|
1824
1824
|
let I = !1;
|
|
1825
1825
|
if (!d && !a.voidElement && os.test(a.name)) {
|
|
1826
1826
|
I = !0, h || (h = t.toLowerCase());
|
|
1827
|
-
const
|
|
1827
|
+
const C = h.indexOf(
|
|
1828
1828
|
"</" + a.name.toLowerCase() + ">",
|
|
1829
1829
|
O
|
|
1830
|
-
), A =
|
|
1830
|
+
), A = C === -1 ? t.length : C, T = t.slice(O, A);
|
|
1831
1831
|
T && a.children.push({
|
|
1832
1832
|
type: "text",
|
|
1833
1833
|
content: T
|
|
@@ -1838,13 +1838,13 @@ function ss(t, e) {
|
|
|
1838
1838
|
content: t.slice(O, P ? P.index : void 0)
|
|
1839
1839
|
}), c === 0 && i.push(a), L = l[c - 1], L && L.children.push(a), l[c] = a;
|
|
1840
1840
|
}
|
|
1841
|
-
if ((!
|
|
1841
|
+
if ((!x || a.voidElement) && (c > -1 && (a.voidElement || a.name === S.slice(2, -1)) && (c--, a = c === -1 ? i : l[c]), !d && (E !== "<" || v) && E)) {
|
|
1842
1842
|
L = c === -1 ? i : l[c].children;
|
|
1843
1843
|
const I = P ? P.index : -1;
|
|
1844
|
-
let
|
|
1845
|
-
ns.test(
|
|
1844
|
+
let C = t.slice(O, I === -1 ? void 0 : I);
|
|
1845
|
+
ns.test(C) && (C = " "), (I > -1 && c + L.length >= 0 || C !== " ") && L.push({
|
|
1846
1846
|
type: "text",
|
|
1847
|
-
content:
|
|
1847
|
+
content: C
|
|
1848
1848
|
});
|
|
1849
1849
|
}
|
|
1850
1850
|
}), o && Tn(i), i;
|
|
@@ -2038,50 +2038,50 @@ const gs = (t) => {
|
|
|
2038
2038
|
}), o;
|
|
2039
2039
|
}, Cs = (t, e, r, n, o, i, l) => {
|
|
2040
2040
|
if (r === "") return [];
|
|
2041
|
-
const a = o.transKeepBasicHtmlNodesFor || [], c = r && new RegExp(a.map((
|
|
2041
|
+
const a = o.transKeepBasicHtmlNodesFor || [], c = r && new RegExp(a.map((y) => `<${y}`).join("|")).test(r);
|
|
2042
2042
|
if (!t && !e && !c && !l) return [r];
|
|
2043
|
-
const d = e ?? {}, p = (
|
|
2044
|
-
_e(
|
|
2043
|
+
const d = e ?? {}, p = (y) => {
|
|
2044
|
+
_e(y).forEach((E) => {
|
|
2045
2045
|
pe(E) || (Ct(E) ? p(rt(E)) : Me(E) && !Ze(E) && Object.assign(d, E));
|
|
2046
2046
|
});
|
|
2047
2047
|
};
|
|
2048
2048
|
p(t);
|
|
2049
|
-
const h = Object.keys(d), f = (
|
|
2049
|
+
const h = Object.keys(d), f = (y) => /^\d+$/.test(y) || a.indexOf(y) > -1 || h.indexOf(y) > -1, g = cs.parse(`<0>${r}</0>`, {
|
|
2050
2050
|
allowedTags: f
|
|
2051
2051
|
}), m = {
|
|
2052
2052
|
...d,
|
|
2053
2053
|
...i
|
|
2054
|
-
}, b = (
|
|
2055
|
-
const P = rt(
|
|
2056
|
-
return ms(P) && v.length === 0 ||
|
|
2057
|
-
},
|
|
2058
|
-
|
|
2054
|
+
}, b = (y, O, E) => {
|
|
2055
|
+
const P = rt(y), v = k(P, O.children, E);
|
|
2056
|
+
return ms(P) && v.length === 0 || y.props?.i18nIsDynamicList ? P : v;
|
|
2057
|
+
}, S = (y, O, E, P, v) => {
|
|
2058
|
+
y.dummy ? (y.children = O, E.push(Zt(y, {
|
|
2059
2059
|
key: P
|
|
2060
|
-
}, v ? void 0 : O))) : E.push(...mi.map([
|
|
2060
|
+
}, v ? void 0 : O))) : E.push(...mi.map([y], (L) => {
|
|
2061
2061
|
if (L.type === vt || L.props?.i18nIsDynamicList !== void 0) {
|
|
2062
|
-
const
|
|
2062
|
+
const C = {
|
|
2063
2063
|
key: P
|
|
2064
2064
|
};
|
|
2065
2065
|
return L && L.props && Object.keys(L.props).forEach((A) => {
|
|
2066
|
-
A === "children" || A === "i18nIsDynamicList" || (
|
|
2067
|
-
}), He(L.type,
|
|
2066
|
+
A === "children" || A === "i18nIsDynamicList" || (C[A] = L.props[A]);
|
|
2067
|
+
}), He(L.type, C, v ? null : O);
|
|
2068
2068
|
}
|
|
2069
2069
|
const I = {
|
|
2070
2070
|
key: P
|
|
2071
2071
|
};
|
|
2072
|
-
return L && L.props && Object.keys(L.props).forEach((
|
|
2073
|
-
|
|
2072
|
+
return L && L.props && Object.keys(L.props).forEach((C) => {
|
|
2073
|
+
C === "ref" || C === "children" || (I[C] = L.props[C]);
|
|
2074
2074
|
}), Zt(L, I, v ? null : O);
|
|
2075
2075
|
}));
|
|
2076
|
-
}, k = (
|
|
2077
|
-
const P = _e(
|
|
2078
|
-
return v.reduce((I,
|
|
2079
|
-
const T =
|
|
2080
|
-
if (
|
|
2081
|
-
let M = P[parseInt(
|
|
2082
|
-
!M && e && (M = e[
|
|
2076
|
+
}, k = (y, O, E) => {
|
|
2077
|
+
const P = _e(y), v = _e(O), L = {};
|
|
2078
|
+
return v.reduce((I, C, A) => {
|
|
2079
|
+
const T = C.children?.[0]?.content && n.services.interpolator.interpolate(C.children[0].content, m, n.language);
|
|
2080
|
+
if (C.type === "tag") {
|
|
2081
|
+
let M = P[parseInt(C.name, 10)];
|
|
2082
|
+
!M && e && (M = e[C.name]), E.length === 1 && !M && (M = E[0][C.name]), M || (M = {});
|
|
2083
2083
|
const D = {
|
|
2084
|
-
...
|
|
2084
|
+
...C.attrs
|
|
2085
2085
|
};
|
|
2086
2086
|
l && Object.keys(D).forEach((W) => {
|
|
2087
2087
|
const B = D[W];
|
|
@@ -2089,32 +2089,32 @@ const gs = (t) => {
|
|
|
2089
2089
|
});
|
|
2090
2090
|
const V = Object.keys(D).length !== 0 ? bs({
|
|
2091
2091
|
props: D
|
|
2092
|
-
}, M) : M, z = Ze(V), U = z && Ct(
|
|
2092
|
+
}, M) : M, z = Ze(V), U = z && Ct(C, !0) && !C.voidElement, G = c && Me(V) && V.dummy && !z, X = Me(e) && Object.hasOwnProperty.call(e, C.name);
|
|
2093
2093
|
if (pe(V)) {
|
|
2094
2094
|
const W = n.services.interpolator.interpolate(V, m, n.language);
|
|
2095
2095
|
I.push(W);
|
|
2096
2096
|
} else if (Ct(V) || U) {
|
|
2097
|
-
const W = b(V,
|
|
2098
|
-
|
|
2097
|
+
const W = b(V, C, E);
|
|
2098
|
+
S(V, W, I, A);
|
|
2099
2099
|
} else if (G) {
|
|
2100
|
-
const W = k(P,
|
|
2101
|
-
|
|
2102
|
-
} else if (Number.isNaN(parseFloat(
|
|
2100
|
+
const W = k(P, C.children, E);
|
|
2101
|
+
S(V, W, I, A);
|
|
2102
|
+
} else if (Number.isNaN(parseFloat(C.name)))
|
|
2103
2103
|
if (X) {
|
|
2104
|
-
const W = b(V,
|
|
2105
|
-
|
|
2106
|
-
} else if (o.transSupportBasicHtmlNodes && a.indexOf(
|
|
2107
|
-
if (
|
|
2108
|
-
I.push(He(
|
|
2109
|
-
key: `${
|
|
2104
|
+
const W = b(V, C, E);
|
|
2105
|
+
S(V, W, I, A, C.voidElement);
|
|
2106
|
+
} else if (o.transSupportBasicHtmlNodes && a.indexOf(C.name) > -1)
|
|
2107
|
+
if (C.voidElement)
|
|
2108
|
+
I.push(He(C.name, {
|
|
2109
|
+
key: `${C.name}-${A}`
|
|
2110
2110
|
}));
|
|
2111
2111
|
else {
|
|
2112
|
-
const W = L[
|
|
2113
|
-
L[
|
|
2112
|
+
const W = L[C.name] || 0;
|
|
2113
|
+
L[C.name] = W + 1;
|
|
2114
2114
|
let B, ie = 0;
|
|
2115
2115
|
for (let Te = 0; Te < P.length; Te += 1) {
|
|
2116
2116
|
const We = P[Te];
|
|
2117
|
-
if (Ze(We) && We.type ===
|
|
2117
|
+
if (Ze(We) && We.type === C.name) {
|
|
2118
2118
|
if (ie === W) {
|
|
2119
2119
|
B = We;
|
|
2120
2120
|
break;
|
|
@@ -2122,35 +2122,35 @@ const gs = (t) => {
|
|
|
2122
2122
|
ie += 1;
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
|
-
const se = B ? _e(rt(B)) : P, fe = k(se,
|
|
2126
|
-
I.push(He(
|
|
2127
|
-
key: `${
|
|
2125
|
+
const se = B ? _e(rt(B)) : P, fe = k(se, C.children, E);
|
|
2126
|
+
I.push(He(C.name, {
|
|
2127
|
+
key: `${C.name}-${A}`
|
|
2128
2128
|
}, fe));
|
|
2129
2129
|
}
|
|
2130
|
-
else if (
|
|
2131
|
-
I.push(`<${
|
|
2130
|
+
else if (C.voidElement)
|
|
2131
|
+
I.push(`<${C.name} />`);
|
|
2132
2132
|
else {
|
|
2133
|
-
const W = k(P,
|
|
2134
|
-
I.push(`<${
|
|
2133
|
+
const W = k(P, C.children, E);
|
|
2134
|
+
I.push(`<${C.name}>${W}</${C.name}>`);
|
|
2135
2135
|
}
|
|
2136
2136
|
else if (Me(V) && !z) {
|
|
2137
|
-
const W =
|
|
2137
|
+
const W = C.children[0] ? T : null;
|
|
2138
2138
|
W && I.push(W);
|
|
2139
2139
|
} else
|
|
2140
|
-
|
|
2141
|
-
} else if (
|
|
2142
|
-
const M = o.transWrapTextNodes, D = typeof o.unescape == "function" ? o.unescape : hr().unescape, V = l ? D(n.services.interpolator.interpolate(
|
|
2140
|
+
S(V, T, I, A, C.children.length !== 1 || !T);
|
|
2141
|
+
} else if (C.type === "text") {
|
|
2142
|
+
const M = o.transWrapTextNodes, D = typeof o.unescape == "function" ? o.unescape : hr().unescape, V = l ? D(n.services.interpolator.interpolate(C.content, m, n.language)) : n.services.interpolator.interpolate(C.content, m, n.language);
|
|
2143
2143
|
M ? I.push(He(M, {
|
|
2144
|
-
key: `${
|
|
2144
|
+
key: `${C.name}-${A}`
|
|
2145
2145
|
}, V)) : I.push(V);
|
|
2146
2146
|
}
|
|
2147
2147
|
return I;
|
|
2148
2148
|
}, []);
|
|
2149
|
-
},
|
|
2149
|
+
}, x = k([{
|
|
2150
2150
|
dummy: !0,
|
|
2151
2151
|
children: t || []
|
|
2152
2152
|
}], g, _e(t || []));
|
|
2153
|
-
return rt(
|
|
2153
|
+
return rt(x[0]);
|
|
2154
2154
|
}, Bn = (t, e, r) => {
|
|
2155
2155
|
const n = t.key || e, o = Zt(t, {
|
|
2156
2156
|
key: n
|
|
@@ -2194,26 +2194,26 @@ function ks({
|
|
|
2194
2194
|
return Xe(m, "NO_I18NEXT_INSTANCE", "Trans: You need to pass in an i18next instance using initReactI18next or by passing it via props or context. In monorepo setups, make sure there is only one instance of react-i18next.", {
|
|
2195
2195
|
i18nKey: n
|
|
2196
2196
|
}), t;
|
|
2197
|
-
const b = h || m.t.bind(m) || ((W) => W),
|
|
2197
|
+
const b = h || m.t.bind(m) || ((W) => W), S = {
|
|
2198
2198
|
...hr(),
|
|
2199
2199
|
...m.options?.react
|
|
2200
2200
|
};
|
|
2201
2201
|
let k = d || b.ns || m.options?.defaultNS;
|
|
2202
2202
|
k = pe(k) ? [k] : k || ["translation"];
|
|
2203
2203
|
const {
|
|
2204
|
-
transDefaultProps:
|
|
2205
|
-
} =
|
|
2206
|
-
...
|
|
2204
|
+
transDefaultProps: x
|
|
2205
|
+
} = S, y = x?.tOptions ? {
|
|
2206
|
+
...x.tOptions,
|
|
2207
2207
|
...i
|
|
2208
|
-
} : i, O = f ??
|
|
2209
|
-
...
|
|
2208
|
+
} : i, O = f ?? x?.shouldUnescape, E = x?.values ? {
|
|
2209
|
+
...x.values,
|
|
2210
2210
|
...l
|
|
2211
|
-
} : l, P =
|
|
2212
|
-
...
|
|
2211
|
+
} : l, P = x?.components ? {
|
|
2212
|
+
...x.components,
|
|
2213
2213
|
...c
|
|
2214
|
-
} : c, v = rr(t,
|
|
2214
|
+
} : c, v = rr(t, S, m, n), L = a || y?.defaultValue || v || S.transEmptyNodeValue || (typeof n == "function" ? Fe(n) : n), {
|
|
2215
2215
|
hashTransKey: I
|
|
2216
|
-
} =
|
|
2216
|
+
} = S, C = n || (I ? I(v || L) : v || L);
|
|
2217
2217
|
m.options?.interpolation?.defaultVariables ? l = E && Object.keys(E).length > 0 ? {
|
|
2218
2218
|
...E,
|
|
2219
2219
|
...m.options.interpolation.defaultVariables
|
|
@@ -2222,27 +2222,27 @@ function ks({
|
|
|
2222
2222
|
} : l = E;
|
|
2223
2223
|
const A = ys(t);
|
|
2224
2224
|
A && typeof A.count == "number" && e === void 0 && (e = A.count);
|
|
2225
|
-
const T = l || e !== void 0 && !m.options?.interpolation?.alwaysFormat || !t ?
|
|
2225
|
+
const T = l || e !== void 0 && !m.options?.interpolation?.alwaysFormat || !t ? y.interpolation : {
|
|
2226
2226
|
interpolation: {
|
|
2227
|
-
...
|
|
2227
|
+
...y.interpolation,
|
|
2228
2228
|
prefix: "#$?",
|
|
2229
2229
|
suffix: "?$#"
|
|
2230
2230
|
}
|
|
2231
2231
|
}, M = {
|
|
2232
|
-
...
|
|
2233
|
-
context: o ||
|
|
2232
|
+
...y,
|
|
2233
|
+
context: o || y.context,
|
|
2234
2234
|
count: e,
|
|
2235
2235
|
...l,
|
|
2236
2236
|
...T,
|
|
2237
2237
|
defaultValue: L,
|
|
2238
2238
|
ns: k
|
|
2239
2239
|
};
|
|
2240
|
-
let D =
|
|
2241
|
-
D ===
|
|
2240
|
+
let D = C ? b(C, M) : L;
|
|
2241
|
+
D === C && L && (D = L);
|
|
2242
2242
|
const V = vs(P, D, m, n);
|
|
2243
2243
|
let z = V || t, U = null;
|
|
2244
2244
|
ws(V) && (U = V, z = t);
|
|
2245
|
-
const G = Cs(z, U, D, m,
|
|
2245
|
+
const G = Cs(z, U, D, m, S, M, O), X = r ?? S.defaultTransParent;
|
|
2246
2246
|
return X ? He(X, g, G) : G;
|
|
2247
2247
|
}
|
|
2248
2248
|
const Is = {
|
|
@@ -2283,7 +2283,7 @@ function Ls({
|
|
|
2283
2283
|
const {
|
|
2284
2284
|
i18n: m,
|
|
2285
2285
|
defaultNS: b
|
|
2286
|
-
} = lr(Vn) || {},
|
|
2286
|
+
} = lr(Vn) || {}, S = p || m || fr(), k = h || S?.t.bind(S);
|
|
2287
2287
|
return ks({
|
|
2288
2288
|
children: t,
|
|
2289
2289
|
count: e,
|
|
@@ -2294,8 +2294,8 @@ function Ls({
|
|
|
2294
2294
|
values: l,
|
|
2295
2295
|
defaults: a,
|
|
2296
2296
|
components: c,
|
|
2297
|
-
ns: d || k?.ns || b ||
|
|
2298
|
-
i18n:
|
|
2297
|
+
ns: d || k?.ns || b || S?.options?.defaultNS,
|
|
2298
|
+
i18n: S,
|
|
2299
2299
|
t: h,
|
|
2300
2300
|
shouldUnescape: f,
|
|
2301
2301
|
...g
|
|
@@ -2312,16 +2312,16 @@ function Es() {
|
|
|
2312
2312
|
}
|
|
2313
2313
|
var r = typeof Object.is == "function" ? Object.is : e, n = t.useState, o = t.useEffect, i = t.useLayoutEffect, l = t.useDebugValue;
|
|
2314
2314
|
function a(h, f) {
|
|
2315
|
-
var g = f(), m = n({ inst: { value: g, getSnapshot: f } }), b = m[0].inst,
|
|
2315
|
+
var g = f(), m = n({ inst: { value: g, getSnapshot: f } }), b = m[0].inst, S = m[1];
|
|
2316
2316
|
return i(
|
|
2317
2317
|
function() {
|
|
2318
|
-
b.value = g, b.getSnapshot = f, c(b) &&
|
|
2318
|
+
b.value = g, b.getSnapshot = f, c(b) && S({ inst: b });
|
|
2319
2319
|
},
|
|
2320
2320
|
[h, g, f]
|
|
2321
2321
|
), o(
|
|
2322
2322
|
function() {
|
|
2323
|
-
return c(b) &&
|
|
2324
|
-
c(b) &&
|
|
2323
|
+
return c(b) && S({ inst: b }), h(function() {
|
|
2324
|
+
c(b) && S({ inst: b });
|
|
2325
2325
|
});
|
|
2326
2326
|
},
|
|
2327
2327
|
[h]
|
|
@@ -2356,24 +2356,24 @@ function Ps() {
|
|
|
2356
2356
|
));
|
|
2357
2357
|
var b = m();
|
|
2358
2358
|
if (!h) {
|
|
2359
|
-
var
|
|
2360
|
-
i(b,
|
|
2359
|
+
var S = m();
|
|
2360
|
+
i(b, S) || (console.error(
|
|
2361
2361
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
2362
2362
|
), h = !0);
|
|
2363
2363
|
}
|
|
2364
|
-
|
|
2364
|
+
S = l({
|
|
2365
2365
|
inst: { value: b, getSnapshot: m }
|
|
2366
2366
|
});
|
|
2367
|
-
var k =
|
|
2367
|
+
var k = S[0].inst, x = S[1];
|
|
2368
2368
|
return c(
|
|
2369
2369
|
function() {
|
|
2370
|
-
k.value = b, k.getSnapshot = m, r(k) &&
|
|
2370
|
+
k.value = b, k.getSnapshot = m, r(k) && x({ inst: k });
|
|
2371
2371
|
},
|
|
2372
2372
|
[g, b, m]
|
|
2373
2373
|
), a(
|
|
2374
2374
|
function() {
|
|
2375
|
-
return r(k) &&
|
|
2376
|
-
r(k) &&
|
|
2375
|
+
return r(k) && x({ inst: k }), g(function() {
|
|
2376
|
+
r(k) && x({ inst: k });
|
|
2377
2377
|
});
|
|
2378
2378
|
},
|
|
2379
2379
|
[g]
|
|
@@ -2432,44 +2432,44 @@ const As = (t, e) => {
|
|
|
2432
2432
|
const f = ae(0), g = ee((I) => {
|
|
2433
2433
|
if (!i) return Ns;
|
|
2434
2434
|
const {
|
|
2435
|
-
bindI18n:
|
|
2435
|
+
bindI18n: C,
|
|
2436
2436
|
bindI18nStore: A
|
|
2437
2437
|
} = l, T = () => {
|
|
2438
2438
|
f.current += 1, I();
|
|
2439
2439
|
};
|
|
2440
|
-
return
|
|
2441
|
-
|
|
2440
|
+
return C && i.on(C, T), A && i.store.on(A, T), () => {
|
|
2441
|
+
C && C.split(" ").forEach((M) => i.off(M, T)), A && A.split(" ").forEach((M) => i.store.off(M, T));
|
|
2442
2442
|
};
|
|
2443
2443
|
}, [i, l]), m = ae(), b = ee(() => {
|
|
2444
2444
|
if (!i)
|
|
2445
2445
|
return Ms;
|
|
2446
|
-
const I = !!(i.isInitialized || i.initializedStoreOnce) && h.every((V) => ds(V, i, l)),
|
|
2447
|
-
if (T && T.ready === I && T.lng ===
|
|
2446
|
+
const I = !!(i.isInitialized || i.initializedStoreOnce) && h.every((V) => ds(V, i, l)), C = e.lng || i.language, A = f.current, T = m.current;
|
|
2447
|
+
if (T && T.ready === I && T.lng === C && T.keyPrefix === c && T.revision === A)
|
|
2448
2448
|
return T;
|
|
2449
2449
|
const D = {
|
|
2450
|
-
t: i.getFixedT(
|
|
2450
|
+
t: i.getFixedT(C, l.nsMode === "fallback" ? h : h[0], c, {
|
|
2451
2451
|
scopeNs: h
|
|
2452
2452
|
}),
|
|
2453
2453
|
ready: I,
|
|
2454
|
-
lng:
|
|
2454
|
+
lng: C,
|
|
2455
2455
|
keyPrefix: c,
|
|
2456
2456
|
revision: A
|
|
2457
2457
|
};
|
|
2458
2458
|
return m.current = D, D;
|
|
2459
|
-
}, [i, h, c, l, e.lng]), [
|
|
2460
|
-
t:
|
|
2461
|
-
ready:
|
|
2459
|
+
}, [i, h, c, l, e.lng]), [S, k] = ye(0), {
|
|
2460
|
+
t: x,
|
|
2461
|
+
ready: y
|
|
2462
2462
|
} = Os.useSyncExternalStore(g, b, b);
|
|
2463
2463
|
Ne(() => {
|
|
2464
|
-
if (i && !
|
|
2465
|
-
const I = () => k((
|
|
2464
|
+
if (i && !y && !a) {
|
|
2465
|
+
const I = () => k((C) => C + 1);
|
|
2466
2466
|
e.lng ? zr(i, e.lng, h, I) : er(i, h, I);
|
|
2467
2467
|
}
|
|
2468
|
-
}, [i, e.lng, h,
|
|
2468
|
+
}, [i, e.lng, h, y, a, S]);
|
|
2469
2469
|
const O = i || {}, E = ae(null), P = ae(), v = (I) => {
|
|
2470
|
-
const
|
|
2471
|
-
|
|
2472
|
-
const A = Object.create(Object.getPrototypeOf(I),
|
|
2470
|
+
const C = Object.getOwnPropertyDescriptors(I);
|
|
2471
|
+
C.__original && delete C.__original;
|
|
2472
|
+
const A = Object.create(Object.getPrototypeOf(I), C);
|
|
2473
2473
|
if (!Object.prototype.hasOwnProperty.call(A, "__original"))
|
|
2474
2474
|
try {
|
|
2475
2475
|
Object.defineProperty(A, "__original", {
|
|
@@ -2482,20 +2482,20 @@ const As = (t, e) => {
|
|
|
2482
2482
|
}
|
|
2483
2483
|
return A;
|
|
2484
2484
|
}, L = F(() => {
|
|
2485
|
-
const I = O,
|
|
2485
|
+
const I = O, C = I?.language;
|
|
2486
2486
|
let A = I;
|
|
2487
|
-
I && (E.current && E.current.__original === I ? P.current !==
|
|
2488
|
-
const T = !
|
|
2489
|
-
return M.t = T, M.i18n = A, M.ready =
|
|
2490
|
-
}, [
|
|
2491
|
-
if (i && a && !
|
|
2487
|
+
I && (E.current && E.current.__original === I ? P.current !== C ? (A = v(I), E.current = A, P.current = C) : A = E.current : (A = v(I), E.current = A, P.current = C));
|
|
2488
|
+
const T = !y && !a ? (...D) => (Xe(i, "USE_T_BEFORE_READY", "useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t."), x(...D)) : x, M = [T, A, y];
|
|
2489
|
+
return M.t = T, M.i18n = A, M.ready = y, M;
|
|
2490
|
+
}, [x, O, y, O.resolvedLanguage, O.language, O.languages]);
|
|
2491
|
+
if (i && a && !y) {
|
|
2492
2492
|
let I = !1;
|
|
2493
2493
|
try {
|
|
2494
2494
|
I = process.env.NODE_ENV !== "production";
|
|
2495
2495
|
} catch {
|
|
2496
2496
|
}
|
|
2497
|
-
throw I && Xe(i, "SUSPENDED_WHILE_LOADING", "useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"), new Promise((
|
|
2498
|
-
const A = () =>
|
|
2497
|
+
throw I && Xe(i, "SUSPENDED_WHILE_LOADING", "useTranslation: suspended while translations are loading (useSuspense is true by default). Add a <Suspense> boundary above this component, or set react.useSuspense: false in the i18next init options. https://react.i18next.com/latest/usetranslation-hook"), new Promise((C) => {
|
|
2498
|
+
const A = () => C();
|
|
2499
2499
|
e.lng ? zr(i, e.lng, h, A) : er(i, h, A);
|
|
2500
2500
|
});
|
|
2501
2501
|
}
|
|
@@ -3071,12 +3071,12 @@ function Ys(t) {
|
|
|
3071
3071
|
sx: l,
|
|
3072
3072
|
variant: a,
|
|
3073
3073
|
...c
|
|
3074
|
-
} = t, d = a ?? Kr.variant, p = !!n && (d === "contained" || d === "outlined"), h = o && !p && !c.startIcon && !c.endIcon, f = o && p, g = qs(c.color), m = /* @__PURE__ */ s(jn, { color: g, size: i }), b = (
|
|
3074
|
+
} = t, d = a ?? Kr.variant, p = !!n && (d === "contained" || d === "outlined"), h = o && !p && !c.startIcon && !c.endIcon, f = o && p, g = qs(c.color), m = /* @__PURE__ */ s(jn, { color: g, size: i }), b = (y) => {
|
|
3075
3075
|
if (!f)
|
|
3076
|
-
return o && !p &&
|
|
3077
|
-
},
|
|
3078
|
-
let
|
|
3079
|
-
return (h || f) && (
|
|
3076
|
+
return o && !p && y ? m : y;
|
|
3077
|
+
}, S = b(c.startIcon), k = b(c.endIcon);
|
|
3078
|
+
let x = r;
|
|
3079
|
+
return (h || f) && (x = m), /* @__PURE__ */ s(
|
|
3080
3080
|
Ce,
|
|
3081
3081
|
{
|
|
3082
3082
|
...Kr,
|
|
@@ -3086,7 +3086,7 @@ function Ys(t) {
|
|
|
3086
3086
|
variant: d,
|
|
3087
3087
|
"aria-busy": o || void 0,
|
|
3088
3088
|
"aria-label": o && c["aria-label"] ? `${c["aria-label"]} – ${e("components.Button.loading")}` : c["aria-label"],
|
|
3089
|
-
startIcon:
|
|
3089
|
+
startIcon: S,
|
|
3090
3090
|
endIcon: k,
|
|
3091
3091
|
sx: [
|
|
3092
3092
|
...Array.isArray(l) ? l : [l],
|
|
@@ -3100,7 +3100,7 @@ function Ys(t) {
|
|
|
3100
3100
|
}
|
|
3101
3101
|
} : void 0
|
|
3102
3102
|
],
|
|
3103
|
-
children:
|
|
3103
|
+
children: x
|
|
3104
3104
|
}
|
|
3105
3105
|
);
|
|
3106
3106
|
}
|
|
@@ -3395,20 +3395,20 @@ const Se = { flexShrink: 0 }, qr = {
|
|
|
3395
3395
|
state: p = "rest",
|
|
3396
3396
|
onClick: h
|
|
3397
3397
|
}) => {
|
|
3398
|
-
const f = p === "disabled", g = c.type === "checkbox" || c.type === "radio", m = (!!h || g) && !f, b = p === "rest" && "checked" in c && c.checked ? "selected" : p,
|
|
3398
|
+
const f = p === "disabled", g = c.type === "checkbox" || c.type === "radio", m = (!!h || g) && !f, b = p === "rest" && "checked" in c && c.checked ? "selected" : p, S = aa.has(c.type) || la.has(d.type) || d.type === "price" && !!d.onDelete, k = m && !S, x = !!i, y = x && (c.type === "radio" || c.type === "checkbox"), O = x && !y && !k;
|
|
3399
3399
|
let E;
|
|
3400
3400
|
k ? E = 0 : O && (E = -1);
|
|
3401
|
-
const P = wt(), v = wt(), L = ae(null), I = ae(null),
|
|
3401
|
+
const P = wt(), v = wt(), L = ae(null), I = ae(null), C = ae(null), A = ra(), T = ia[b], M = b === "selected" ? u.primary[50] : void 0, D = `0 0 0 ${oa} ${u.primary.main}`, V = `${gt.duration.standard}ms ${gt.easing.standard}`, z = F(() => !y || c.type !== "radio" && c.type !== "checkbox" ? c : {
|
|
3402
3402
|
...c,
|
|
3403
3403
|
onChange: (B) => {
|
|
3404
3404
|
c.onChange(B), a?.(B);
|
|
3405
3405
|
}
|
|
3406
|
-
}, [
|
|
3406
|
+
}, [y, c, a]);
|
|
3407
3407
|
Ne(() => {
|
|
3408
|
-
!l &&
|
|
3408
|
+
!l && C.current?.contains(document.activeElement) && (L.current ? L.current.focus() : I.current?.focus());
|
|
3409
3409
|
}, [l]);
|
|
3410
3410
|
const U = ee(
|
|
3411
|
-
(B) => !!
|
|
3411
|
+
(B) => !!C.current?.contains(B),
|
|
3412
3412
|
[]
|
|
3413
3413
|
), G = ee(
|
|
3414
3414
|
(B) => {
|
|
@@ -3474,9 +3474,9 @@ const Se = { flexShrink: 0 }, qr = {
|
|
|
3474
3474
|
{
|
|
3475
3475
|
leading: z,
|
|
3476
3476
|
disabled: f,
|
|
3477
|
-
inputRef:
|
|
3478
|
-
expandableId:
|
|
3479
|
-
expanded:
|
|
3477
|
+
inputRef: y ? L : void 0,
|
|
3478
|
+
expandableId: y ? P : void 0,
|
|
3479
|
+
expanded: y ? l : void 0,
|
|
3480
3480
|
titleId: v
|
|
3481
3481
|
}
|
|
3482
3482
|
) }),
|
|
@@ -3571,7 +3571,7 @@ const Se = { flexShrink: 0 }, qr = {
|
|
|
3571
3571
|
]
|
|
3572
3572
|
}
|
|
3573
3573
|
),
|
|
3574
|
-
|
|
3574
|
+
x && /* @__PURE__ */ s(
|
|
3575
3575
|
go,
|
|
3576
3576
|
{
|
|
3577
3577
|
in: l,
|
|
@@ -3580,7 +3580,7 @@ const Se = { flexShrink: 0 }, qr = {
|
|
|
3580
3580
|
children: /* @__PURE__ */ s(
|
|
3581
3581
|
R,
|
|
3582
3582
|
{
|
|
3583
|
-
ref:
|
|
3583
|
+
ref: C,
|
|
3584
3584
|
id: P,
|
|
3585
3585
|
sx: {
|
|
3586
3586
|
marginTop: "0.5rem",
|
|
@@ -3673,7 +3673,7 @@ function fd({
|
|
|
3673
3673
|
sx: g,
|
|
3674
3674
|
...m
|
|
3675
3675
|
}) {
|
|
3676
|
-
const { t: b } = Z("input", { keyPrefix: "components.RcSesAlert" }),
|
|
3676
|
+
const { t: b } = Z("input", { keyPrefix: "components.RcSesAlert" }), S = o && !!a && !!l, k = i && !!c, x = k ? /* @__PURE__ */ s(
|
|
3677
3677
|
R,
|
|
3678
3678
|
{
|
|
3679
3679
|
component: "button",
|
|
@@ -3684,14 +3684,14 @@ function fd({
|
|
|
3684
3684
|
children: /* @__PURE__ */ s(Nt, { size: 22, fillColor: "currentColor", focusable: !1, "aria-hidden": !0 })
|
|
3685
3685
|
}
|
|
3686
3686
|
) : null;
|
|
3687
|
-
let
|
|
3688
|
-
k && (
|
|
3687
|
+
let y = d;
|
|
3688
|
+
k && (y = d ? /* @__PURE__ */ w(R, { sx: pa, children: [
|
|
3689
3689
|
d,
|
|
3690
|
-
|
|
3691
|
-
] }) :
|
|
3690
|
+
x
|
|
3691
|
+
] }) : x);
|
|
3692
3692
|
const O = h ?? (ma.includes(p) ? "alert" : "status"), E = f ?? (O === "alert" ? "assertive" : "polite"), P = !!t, v = typeof t == "object" ? t : {}, L = v.maxWidth === void 0 ? "lg" : v.maxWidth, I = v.disableGutters || !1;
|
|
3693
|
-
let
|
|
3694
|
-
return g && (
|
|
3693
|
+
let C = [];
|
|
3694
|
+
return g && (C = Array.isArray(g) ? g : [g]), /* @__PURE__ */ s(
|
|
3695
3695
|
mo,
|
|
3696
3696
|
{
|
|
3697
3697
|
...da,
|
|
@@ -3700,7 +3700,7 @@ function fd({
|
|
|
3700
3700
|
role: O,
|
|
3701
3701
|
"aria-live": E,
|
|
3702
3702
|
icon: n ? r : !1,
|
|
3703
|
-
action:
|
|
3703
|
+
action: y,
|
|
3704
3704
|
sx: [
|
|
3705
3705
|
P && ((A) => {
|
|
3706
3706
|
let T = "none";
|
|
@@ -3718,9 +3718,9 @@ function fd({
|
|
|
3718
3718
|
return M;
|
|
3719
3719
|
}),
|
|
3720
3720
|
k && !d && fa,
|
|
3721
|
-
...
|
|
3721
|
+
...C
|
|
3722
3722
|
],
|
|
3723
|
-
children:
|
|
3723
|
+
children: S ? /* @__PURE__ */ w(R, { sx: ha, children: [
|
|
3724
3724
|
/* @__PURE__ */ s(R, { sx: { minWidth: 0 }, children: e }),
|
|
3725
3725
|
/* @__PURE__ */ s(
|
|
3726
3726
|
Ce,
|
|
@@ -3840,7 +3840,7 @@ function br({
|
|
|
3840
3840
|
sx: h,
|
|
3841
3841
|
...f
|
|
3842
3842
|
}) {
|
|
3843
|
-
const g = p?.actions, m = p?.content, b = p?.description,
|
|
3843
|
+
const g = p?.actions, m = p?.content, b = p?.description, S = p?.header, k = p?.headerAction, x = p?.image, y = p?.leadingActions, O = p?.title, E = p?.trailingActions, P = ge(h), v = ge(O?.sx), L = ge(b?.sx), I = ge(k?.sx), C = ge(m?.sx), A = ge(g?.sx), T = ge(x?.sx), M = ge(y?.sx), D = ge(E?.sx), V = !!(a || c);
|
|
3844
3844
|
return /* @__PURE__ */ w(
|
|
3845
3845
|
pn,
|
|
3846
3846
|
{
|
|
@@ -3859,7 +3859,7 @@ function br({
|
|
|
3859
3859
|
r ? /* @__PURE__ */ s(
|
|
3860
3860
|
R,
|
|
3861
3861
|
{
|
|
3862
|
-
...
|
|
3862
|
+
...x,
|
|
3863
3863
|
"data-testid": d?.image,
|
|
3864
3864
|
sx: [
|
|
3865
3865
|
{
|
|
@@ -3885,7 +3885,7 @@ function br({
|
|
|
3885
3885
|
/* @__PURE__ */ w(
|
|
3886
3886
|
K,
|
|
3887
3887
|
{
|
|
3888
|
-
...
|
|
3888
|
+
...S,
|
|
3889
3889
|
"data-testid": d?.header,
|
|
3890
3890
|
spacing: 0.5,
|
|
3891
3891
|
sx: [
|
|
@@ -3894,7 +3894,7 @@ function br({
|
|
|
3894
3894
|
minWidth: 0
|
|
3895
3895
|
},
|
|
3896
3896
|
o ? { alignItems: "center" } : {},
|
|
3897
|
-
...ge(
|
|
3897
|
+
...ge(S?.sx)
|
|
3898
3898
|
],
|
|
3899
3899
|
children: [
|
|
3900
3900
|
/* @__PURE__ */ s(
|
|
@@ -3970,7 +3970,7 @@ function br({
|
|
|
3970
3970
|
gap: "1.5rem",
|
|
3971
3971
|
justifyContent: "center"
|
|
3972
3972
|
},
|
|
3973
|
-
...
|
|
3973
|
+
...C
|
|
3974
3974
|
],
|
|
3975
3975
|
children: l
|
|
3976
3976
|
}
|
|
@@ -3998,7 +3998,7 @@ function br({
|
|
|
3998
3998
|
!!a && /* @__PURE__ */ s(
|
|
3999
3999
|
K,
|
|
4000
4000
|
{
|
|
4001
|
-
...
|
|
4001
|
+
...y,
|
|
4002
4002
|
"data-testid": d?.leadingActions,
|
|
4003
4003
|
direction: { xs: "column", md: "row" },
|
|
4004
4004
|
sx: [
|
|
@@ -4371,19 +4371,19 @@ const Oa = {
|
|
|
4371
4371
|
p(v), f.current[v]?.focus();
|
|
4372
4372
|
}, []), b = ee(
|
|
4373
4373
|
(v, L) => {
|
|
4374
|
-
const I = g(),
|
|
4374
|
+
const I = g(), C = I.indexOf(L);
|
|
4375
4375
|
switch (v.key) {
|
|
4376
4376
|
case "ArrowLeft":
|
|
4377
4377
|
case "ArrowUp": {
|
|
4378
4378
|
v.preventDefault();
|
|
4379
|
-
const A =
|
|
4379
|
+
const A = C > 0 ? I[C - 1] : I[I.length - 1];
|
|
4380
4380
|
m(A), r(t[A].id);
|
|
4381
4381
|
break;
|
|
4382
4382
|
}
|
|
4383
4383
|
case "ArrowRight":
|
|
4384
4384
|
case "ArrowDown": {
|
|
4385
4385
|
v.preventDefault();
|
|
4386
|
-
const A =
|
|
4386
|
+
const A = C < I.length - 1 ? I[C + 1] : I[0];
|
|
4387
4387
|
m(A), r(t[A].id);
|
|
4388
4388
|
break;
|
|
4389
4389
|
}
|
|
@@ -4406,14 +4406,14 @@ const Oa = {
|
|
|
4406
4406
|
}
|
|
4407
4407
|
},
|
|
4408
4408
|
[m, g, r, t]
|
|
4409
|
-
),
|
|
4409
|
+
), S = ee(
|
|
4410
4410
|
(v, L) => {
|
|
4411
4411
|
r(v), p(L);
|
|
4412
4412
|
},
|
|
4413
4413
|
[r]
|
|
4414
4414
|
), k = ee((v) => {
|
|
4415
4415
|
p(v);
|
|
4416
|
-
}, []),
|
|
4416
|
+
}, []), x = ee((v) => e === v, [e]), y = o === "tablist" ? "tab" : "radio", E = l || c(
|
|
4417
4417
|
o === "tablist" ? "components.SegmentedControl.tabs" : "components.SegmentedControl.options"
|
|
4418
4418
|
), P = F(
|
|
4419
4419
|
() => ({
|
|
@@ -4441,11 +4441,11 @@ const Oa = {
|
|
|
4441
4441
|
f.current[L] = I;
|
|
4442
4442
|
},
|
|
4443
4443
|
option: v,
|
|
4444
|
-
isSelected:
|
|
4444
|
+
isSelected: x(v.id),
|
|
4445
4445
|
isFocused: d === L && !v.disabled,
|
|
4446
4446
|
size: n,
|
|
4447
|
-
ariaRole:
|
|
4448
|
-
onClick: (I) =>
|
|
4447
|
+
ariaRole: y,
|
|
4448
|
+
onClick: (I) => S(I, L),
|
|
4449
4449
|
onKeyDown: (I) => b(I, L),
|
|
4450
4450
|
onFocus: () => k(L)
|
|
4451
4451
|
},
|
|
@@ -4965,22 +4965,22 @@ function Ba({ itemIds: t, offset: e = 0, scope: r }) {
|
|
|
4965
4965
|
const { scrollY: m } = window, b = Math.max(
|
|
4966
4966
|
0,
|
|
4967
4967
|
document.documentElement.scrollHeight - window.innerHeight
|
|
4968
|
-
),
|
|
4968
|
+
), S = g.map(
|
|
4969
4969
|
({ element: P }) => P.getBoundingClientRect().top + m
|
|
4970
|
-
), k =
|
|
4971
|
-
let
|
|
4972
|
-
for (;
|
|
4973
|
-
|
|
4974
|
-
const
|
|
4975
|
-
if (
|
|
4976
|
-
const P = x
|
|
4977
|
-
for (let L =
|
|
4978
|
-
const I = v > 0 ? (
|
|
4979
|
-
|
|
4970
|
+
), k = S.map((P) => P - e);
|
|
4971
|
+
let x = k.length - 1;
|
|
4972
|
+
for (; x > 0 && k[x] > b; )
|
|
4973
|
+
x -= 1;
|
|
4974
|
+
const y = [...k], O = k[x];
|
|
4975
|
+
if (x < k.length - 1 && O < b) {
|
|
4976
|
+
const P = S[x], v = S[S.length - 1] - P;
|
|
4977
|
+
for (let L = x + 1; L < k.length; L += 1) {
|
|
4978
|
+
const I = v > 0 ? (S[L] - P) / v : 1;
|
|
4979
|
+
y[L] = O + I * (b - O);
|
|
4980
4980
|
}
|
|
4981
4981
|
}
|
|
4982
4982
|
let E = 0;
|
|
4983
|
-
|
|
4983
|
+
y.forEach((P, v) => {
|
|
4984
4984
|
P <= m + Da && (E = v);
|
|
4985
4985
|
}), o(g[E].id);
|
|
4986
4986
|
}, h = () => {
|
|
@@ -5702,32 +5702,32 @@ function tl({
|
|
|
5702
5702
|
persist: d,
|
|
5703
5703
|
showClose: p = !0
|
|
5704
5704
|
}) {
|
|
5705
|
-
const h = lt(), { t: f } = Z("input"), [g, m] = ye(a ?? !0), [b,
|
|
5705
|
+
const h = lt(), { t: f } = Z("input"), [g, m] = ye(a ?? !0), [b, S] = ye(!1), k = d ?? t === "action-needed";
|
|
5706
5706
|
Ne(() => {
|
|
5707
5707
|
a !== void 0 && m(a);
|
|
5708
5708
|
}, [a]);
|
|
5709
|
-
const
|
|
5709
|
+
const x = el[t], y = x.icon, O = e === "standard", E = Qa[e], P = r.length > E ? `${r.slice(0, E)}...` : r, v = ae(null), [L, I] = ye(!1);
|
|
5710
5710
|
yi(() => {
|
|
5711
5711
|
const M = v.current;
|
|
5712
5712
|
if (!M) return;
|
|
5713
5713
|
const D = parseFloat(getComputedStyle(M).lineHeight);
|
|
5714
5714
|
I(M.clientHeight > D + 4);
|
|
5715
5715
|
}, [P]);
|
|
5716
|
-
const
|
|
5716
|
+
const C = () => {
|
|
5717
5717
|
m(!1), n?.();
|
|
5718
5718
|
}, A = () => {
|
|
5719
|
-
o?.(), i &&
|
|
5719
|
+
o?.(), i && C();
|
|
5720
5720
|
}, T = Ke("(prefers-reduced-motion: reduce)");
|
|
5721
5721
|
return /* @__PURE__ */ s(
|
|
5722
5722
|
xo,
|
|
5723
5723
|
{
|
|
5724
5724
|
open: g,
|
|
5725
5725
|
autoHideDuration: k || b ? null : c,
|
|
5726
|
-
onClose:
|
|
5726
|
+
onClose: C,
|
|
5727
5727
|
anchorOrigin: { vertical: "bottom", horizontal: "center" },
|
|
5728
|
-
onMouseEnter: () =>
|
|
5729
|
-
onMouseLeave: () =>
|
|
5730
|
-
onKeyDown: (M) => M.key === "Escape" &&
|
|
5728
|
+
onMouseEnter: () => S(!0),
|
|
5729
|
+
onMouseLeave: () => S(!1),
|
|
5730
|
+
onKeyDown: (M) => M.key === "Escape" && C(),
|
|
5731
5731
|
transitionDuration: T ? { enter: 0, exit: 0 } : void 0,
|
|
5732
5732
|
sx: {
|
|
5733
5733
|
transition: T ? "none" : "bottom 150ms ease-in-out !important"
|
|
@@ -5738,8 +5738,8 @@ function tl({
|
|
|
5738
5738
|
children: /* @__PURE__ */ w(
|
|
5739
5739
|
R,
|
|
5740
5740
|
{
|
|
5741
|
-
role:
|
|
5742
|
-
"aria-live":
|
|
5741
|
+
role: x.ariaLive === "assertive" ? "alert" : "status",
|
|
5742
|
+
"aria-live": x.ariaLive,
|
|
5743
5743
|
"aria-atomic": "true",
|
|
5744
5744
|
sx: {
|
|
5745
5745
|
display: "flex",
|
|
@@ -5769,7 +5769,7 @@ function tl({
|
|
|
5769
5769
|
height: `${on.height}px !important`
|
|
5770
5770
|
}
|
|
5771
5771
|
},
|
|
5772
|
-
children: /* @__PURE__ */ s(
|
|
5772
|
+
children: /* @__PURE__ */ s(y, { fillColor: x.color, "aria-hidden": !0 })
|
|
5773
5773
|
}
|
|
5774
5774
|
),
|
|
5775
5775
|
/* @__PURE__ */ s(
|
|
@@ -5805,7 +5805,7 @@ function tl({
|
|
|
5805
5805
|
{
|
|
5806
5806
|
variant: "outlined",
|
|
5807
5807
|
color: "ghost",
|
|
5808
|
-
onClick:
|
|
5808
|
+
onClick: C,
|
|
5809
5809
|
sx: {
|
|
5810
5810
|
minWidth: "auto",
|
|
5811
5811
|
padding: h.spacing(0.625),
|
|
@@ -5927,7 +5927,7 @@ function jd({
|
|
|
5927
5927
|
className: p,
|
|
5928
5928
|
testIds: h
|
|
5929
5929
|
}) {
|
|
5930
|
-
const f = `h${e}`, g = l != null, m = a != null, b = o === "vertical",
|
|
5930
|
+
const f = `h${e}`, g = l != null, m = a != null, b = o === "vertical", S = r !== "body1", k = i ? /* @__PURE__ */ s(R, { "aria-hidden": !0, "data-testid": h?.icon, sx: { display: "flex", flexShrink: 0 }, children: i }) : null, x = /* @__PURE__ */ w(K, { spacing: ue.header.gap, sx: { flex: 1, minWidth: 0, width: "100%" }, children: [
|
|
5931
5931
|
/* @__PURE__ */ w(f, { id: d, "data-testid": h?.heading, style: { margin: 0 }, children: [
|
|
5932
5932
|
/* @__PURE__ */ s(
|
|
5933
5933
|
j,
|
|
@@ -5938,7 +5938,7 @@ function jd({
|
|
|
5938
5938
|
color: n === "brand" ? u.primary[700] : u.grey[900],
|
|
5939
5939
|
// inline only when the badge has to sit on the heading's last line
|
|
5940
5940
|
display: g ? "inline" : "block",
|
|
5941
|
-
fontWeight: ue.header.titleFontWeight,
|
|
5941
|
+
fontWeight: S ? ue.header.titleFontWeight : void 0,
|
|
5942
5942
|
overflowWrap: "anywhere"
|
|
5943
5943
|
},
|
|
5944
5944
|
children: t
|
|
@@ -5978,7 +5978,7 @@ function jd({
|
|
|
5978
5978
|
children: a
|
|
5979
5979
|
}
|
|
5980
5980
|
) : null
|
|
5981
|
-
] }),
|
|
5981
|
+
] }), y = c ? /* @__PURE__ */ s(
|
|
5982
5982
|
K,
|
|
5983
5983
|
{
|
|
5984
5984
|
"data-testid": h?.actions,
|
|
@@ -6004,8 +6004,8 @@ function jd({
|
|
|
6004
6004
|
},
|
|
6005
6005
|
children: [
|
|
6006
6006
|
b ? /* @__PURE__ */ w(he, { children: [
|
|
6007
|
-
|
|
6008
|
-
|
|
6007
|
+
k,
|
|
6008
|
+
x
|
|
6009
6009
|
] }) : (
|
|
6010
6010
|
// Icon + text stay glued together as one horizontal group so a mobile
|
|
6011
6011
|
// layout only breaks between the group and the actions slot, never
|
|
@@ -6022,13 +6022,13 @@ function jd({
|
|
|
6022
6022
|
width: "100%"
|
|
6023
6023
|
},
|
|
6024
6024
|
children: [
|
|
6025
|
-
|
|
6026
|
-
|
|
6025
|
+
k,
|
|
6026
|
+
x
|
|
6027
6027
|
]
|
|
6028
6028
|
}
|
|
6029
6029
|
)
|
|
6030
6030
|
),
|
|
6031
|
-
|
|
6031
|
+
y
|
|
6032
6032
|
]
|
|
6033
6033
|
}
|
|
6034
6034
|
);
|
|
@@ -6059,8 +6059,8 @@ function Ud({
|
|
|
6059
6059
|
H.useEffect(() => {
|
|
6060
6060
|
if (!i)
|
|
6061
6061
|
return;
|
|
6062
|
-
const b = ({ target:
|
|
6063
|
-
const k =
|
|
6062
|
+
const b = ({ target: S }) => {
|
|
6063
|
+
const k = S instanceof Element ? S : null;
|
|
6064
6064
|
a.current?.contains(k) || k?.closest(".MuiTooltip-popper") || p();
|
|
6065
6065
|
};
|
|
6066
6066
|
return document.addEventListener("pointerdown", b), () => document.removeEventListener("pointerdown", b);
|
|
@@ -8288,18 +8288,18 @@ function ac(t) {
|
|
|
8288
8288
|
control: r,
|
|
8289
8289
|
name: l,
|
|
8290
8290
|
rules: a
|
|
8291
|
-
}), b = F(() => p.filter(Boolean).length, [p]),
|
|
8291
|
+
}), b = F(() => p.filter(Boolean).length, [p]), S = F(
|
|
8292
8292
|
() => b > 0 && b < p.length,
|
|
8293
8293
|
[b, p.length]
|
|
8294
8294
|
);
|
|
8295
8295
|
Ne(() => {
|
|
8296
8296
|
if (!p.length) return;
|
|
8297
|
-
const
|
|
8298
|
-
|
|
8297
|
+
const x = b === p.length;
|
|
8298
|
+
x !== f && g(x);
|
|
8299
8299
|
}, [b, p.length, f, g]);
|
|
8300
|
-
const k = (
|
|
8301
|
-
const
|
|
8302
|
-
g(
|
|
8300
|
+
const k = (x) => {
|
|
8301
|
+
const y = x.target.checked;
|
|
8302
|
+
g(y), h && p.length > 0 && h(p.map(() => y));
|
|
8303
8303
|
};
|
|
8304
8304
|
return /* @__PURE__ */ s(
|
|
8305
8305
|
sc,
|
|
@@ -8309,7 +8309,7 @@ function ac(t) {
|
|
|
8309
8309
|
{
|
|
8310
8310
|
id: o,
|
|
8311
8311
|
checked: f === !0,
|
|
8312
|
-
indeterminate:
|
|
8312
|
+
indeterminate: S,
|
|
8313
8313
|
checkedIcon: Pt(/* @__PURE__ */ s(Lt, {}), i),
|
|
8314
8314
|
disabled: n,
|
|
8315
8315
|
icon: Pt(/* @__PURE__ */ s(Et, {}), i),
|
|
@@ -8432,17 +8432,17 @@ function dc(t) {
|
|
|
8432
8432
|
const Gd = H.forwardRef((t, e) => {
|
|
8433
8433
|
const { t: r } = Z("input", { keyPrefix: "components.RcSesDatepicker" }), n = Ke(Ue.breakpoints.up("md")), { id: o, clearable: i, errors: l, label: a, slotProps: c, ...d } = t, p = Ln(), {
|
|
8434
8434
|
field: { onChange: h, value: f, disabled: g }
|
|
8435
|
-
} = Pe(d), m = F(() => o ?? Ie(), [o]), [b,
|
|
8435
|
+
} = Pe(d), m = F(() => o ?? Ie(), [o]), [b, S] = H.useState(
|
|
8436
8436
|
f ? kr(f) : null
|
|
8437
|
-
), k = (
|
|
8437
|
+
), k = (x) => {
|
|
8438
8438
|
try {
|
|
8439
|
-
h((
|
|
8439
|
+
h((x && wi(x, "UTC").toISOString()) ?? "");
|
|
8440
8440
|
} catch {
|
|
8441
8441
|
h(null);
|
|
8442
8442
|
}
|
|
8443
8443
|
};
|
|
8444
8444
|
return Ne(() => {
|
|
8445
|
-
f !== b &&
|
|
8445
|
+
f !== b && S(f ? kr(f) : null);
|
|
8446
8446
|
}, [f]), /* @__PURE__ */ s(
|
|
8447
8447
|
Re,
|
|
8448
8448
|
{
|
|
@@ -8456,7 +8456,7 @@ const Gd = H.forwardRef((t, e) => {
|
|
|
8456
8456
|
{
|
|
8457
8457
|
inputRef: e,
|
|
8458
8458
|
closeOnSelect: !0,
|
|
8459
|
-
dayOfWeekFormatter: (
|
|
8459
|
+
dayOfWeekFormatter: (x) => p.format(x, "weekdayShort").substring(0, 2),
|
|
8460
8460
|
disabled: g,
|
|
8461
8461
|
onChange: k,
|
|
8462
8462
|
openTo: "day",
|
|
@@ -8533,10 +8533,10 @@ function qd(t) {
|
|
|
8533
8533
|
...l?.controller
|
|
8534
8534
|
}), b = ee((E) => {
|
|
8535
8535
|
g(E);
|
|
8536
|
-
}, []), { getRootProps:
|
|
8536
|
+
}, []), { getRootProps: S, getInputProps: k, isDragActive: x } = Ii({
|
|
8537
8537
|
onDrop: b,
|
|
8538
8538
|
...l?.dropzone
|
|
8539
|
-
}),
|
|
8539
|
+
}), y = f && Array.isArray(f) && f.length > 0, O = (E, P) => {
|
|
8540
8540
|
E.preventDefault(), E.stopPropagation();
|
|
8541
8541
|
const v = [...f];
|
|
8542
8542
|
v.splice(P, 1), g(v);
|
|
@@ -8552,10 +8552,10 @@ function qd(t) {
|
|
|
8552
8552
|
children: /* @__PURE__ */ w(
|
|
8553
8553
|
R,
|
|
8554
8554
|
{
|
|
8555
|
-
...
|
|
8555
|
+
...S(),
|
|
8556
8556
|
sx: {
|
|
8557
|
-
backgroundColor: () => a.disabled ? "white" :
|
|
8558
|
-
borderColor: () => n ? u.error[600] : a.disabled ? u.grey[300] :
|
|
8557
|
+
backgroundColor: () => a.disabled ? "white" : x ? u.primary[50] : "white",
|
|
8558
|
+
borderColor: () => n ? u.error[600] : a.disabled ? u.grey[300] : x ? u.primary[500] : u.grey[500],
|
|
8559
8559
|
borderRadius: ".5rem",
|
|
8560
8560
|
borderStyle: "dashed",
|
|
8561
8561
|
borderWidth: 1,
|
|
@@ -8572,8 +8572,8 @@ function qd(t) {
|
|
|
8572
8572
|
/* @__PURE__ */ s(
|
|
8573
8573
|
La,
|
|
8574
8574
|
{
|
|
8575
|
-
color: !a.disabled &&
|
|
8576
|
-
bgShade: !a.disabled &&
|
|
8575
|
+
color: !a.disabled && x ? "primary" : "grey",
|
|
8576
|
+
bgShade: !a.disabled && x ? "100" : "50",
|
|
8577
8577
|
iconShade: a.disabled ? "500" : "900",
|
|
8578
8578
|
Icon: Zn
|
|
8579
8579
|
}
|
|
@@ -8586,7 +8586,7 @@ function qd(t) {
|
|
|
8586
8586
|
flexGrow: 1
|
|
8587
8587
|
},
|
|
8588
8588
|
children: [
|
|
8589
|
-
|
|
8589
|
+
y && /* @__PURE__ */ s(K, { children: f.map((E, P) => /* @__PURE__ */ w(
|
|
8590
8590
|
K,
|
|
8591
8591
|
{
|
|
8592
8592
|
direction: "row",
|
|
@@ -8623,7 +8623,7 @@ function qd(t) {
|
|
|
8623
8623
|
},
|
|
8624
8624
|
P
|
|
8625
8625
|
)) }),
|
|
8626
|
-
!
|
|
8626
|
+
!y && /* @__PURE__ */ w(he, { children: [
|
|
8627
8627
|
/* @__PURE__ */ s(
|
|
8628
8628
|
j,
|
|
8629
8629
|
{
|
|
@@ -8849,8 +8849,8 @@ function Zd(t) {
|
|
|
8849
8849
|
slotProps: h,
|
|
8850
8850
|
step: f,
|
|
8851
8851
|
...g
|
|
8852
|
-
} = t, { disabled: m, name: b } = g,
|
|
8853
|
-
field: { onChange: k, value:
|
|
8852
|
+
} = t, { disabled: m, name: b } = g, S = F(() => t.id ?? Ie(), [t.id]), {
|
|
8853
|
+
field: { onChange: k, value: x }
|
|
8854
8854
|
} = Pe({
|
|
8855
8855
|
control: o,
|
|
8856
8856
|
name: b,
|
|
@@ -8863,15 +8863,15 @@ function Zd(t) {
|
|
|
8863
8863
|
return;
|
|
8864
8864
|
}
|
|
8865
8865
|
n([
|
|
8866
|
-
Number.isInteger(p?.min) ? parseInt(p?.min, 10) >= parseInt(
|
|
8867
|
-
Number.isInteger(p?.max) ? parseInt(p?.max, 10) <= parseInt(
|
|
8866
|
+
Number.isInteger(p?.min) ? parseInt(p?.min, 10) >= parseInt(x ?? 0, 10) : !1,
|
|
8867
|
+
Number.isInteger(p?.max) ? parseInt(p?.max, 10) <= parseInt(x ?? 0, 10) : !1
|
|
8868
8868
|
]);
|
|
8869
|
-
}, [m, p?.max, p?.min,
|
|
8870
|
-
const
|
|
8869
|
+
}, [m, p?.max, p?.min, x]);
|
|
8870
|
+
const y = (P) => k && k(P.target.value), O = () => k(parseInt(x ?? 0, 10) + (parseInt(f, 10) || 1)), E = () => k(parseInt(x ?? 0, 10) - (parseInt(f, 10) || 1));
|
|
8871
8871
|
return /* @__PURE__ */ s(
|
|
8872
8872
|
Re,
|
|
8873
8873
|
{
|
|
8874
|
-
id:
|
|
8874
|
+
id: S,
|
|
8875
8875
|
errors: l,
|
|
8876
8876
|
label: a,
|
|
8877
8877
|
required: !!p?.required,
|
|
@@ -8909,10 +8909,10 @@ function Zd(t) {
|
|
|
8909
8909
|
input: {
|
|
8910
8910
|
disabled: m,
|
|
8911
8911
|
step: f,
|
|
8912
|
-
value:
|
|
8912
|
+
value: x
|
|
8913
8913
|
}
|
|
8914
8914
|
},
|
|
8915
|
-
onChange:
|
|
8915
|
+
onChange: y,
|
|
8916
8916
|
type: "number",
|
|
8917
8917
|
...g
|
|
8918
8918
|
}
|
|
@@ -9038,24 +9038,24 @@ function Cc(t) {
|
|
|
9038
9038
|
const { t: e } = Z("input", {
|
|
9039
9039
|
keyPrefix: "components.RcSesPhoneInputFormControl"
|
|
9040
9040
|
}), { id: r, control: n, name: o, rules: i, slotProps: l } = t, [a, c] = H.useState(yc), d = F(() => {
|
|
9041
|
-
const
|
|
9042
|
-
return new Li({ mask:
|
|
9041
|
+
const y = Array.isArray(a?.mask) ? a.mask.toReversed() : a?.mask ?? "";
|
|
9042
|
+
return new Li({ mask: y });
|
|
9043
9043
|
}, [a]), { field: p } = Pe({
|
|
9044
9044
|
control: n,
|
|
9045
9045
|
name: o,
|
|
9046
9046
|
rules: {
|
|
9047
9047
|
...i,
|
|
9048
9048
|
validate: {
|
|
9049
|
-
phoneNoFormat: (
|
|
9049
|
+
phoneNoFormat: (y) => typeof y != "string" ? e("invalid") : d.completed(y.replace(a.code ?? "", "")) || e("invalid"),
|
|
9050
9050
|
...i?.validate
|
|
9051
9051
|
}
|
|
9052
9052
|
}
|
|
9053
|
-
}), h = typeof p.value == "string" ? p.value : "", [f, g] = H.useState(null), m = (
|
|
9053
|
+
}), h = typeof p.value == "string" ? p.value : "", [f, g] = H.useState(null), m = (y) => g(y.currentTarget), b = () => {
|
|
9054
9054
|
f && f.focus(), g(null);
|
|
9055
|
-
},
|
|
9056
|
-
() => Jn.map((
|
|
9057
|
-
...
|
|
9058
|
-
searchable: `${
|
|
9055
|
+
}, S = !!f, k = S ? "phoneNumberAutocomplete" : void 0, x = H.useMemo(
|
|
9056
|
+
() => Jn.map((y) => ({
|
|
9057
|
+
...y,
|
|
9058
|
+
searchable: `${y.code} ${y.name.toUpperCase()} ${y.iso.toUpperCase()}`
|
|
9059
9059
|
})),
|
|
9060
9060
|
[]
|
|
9061
9061
|
);
|
|
@@ -9130,9 +9130,9 @@ function Cc(t) {
|
|
|
9130
9130
|
},
|
|
9131
9131
|
placeholder: d.opts.mask?.toString(),
|
|
9132
9132
|
value: d.masked(h.replace(a.code ?? "", "")),
|
|
9133
|
-
onChange: (
|
|
9134
|
-
...
|
|
9135
|
-
target: { value: `${a.code}${d.unmasked(
|
|
9133
|
+
onChange: (y) => p.onChange({
|
|
9134
|
+
...y,
|
|
9135
|
+
target: { value: `${a.code}${d.unmasked(y.target.value)}` }
|
|
9136
9136
|
})
|
|
9137
9137
|
}
|
|
9138
9138
|
),
|
|
@@ -9141,7 +9141,7 @@ function Cc(t) {
|
|
|
9141
9141
|
{
|
|
9142
9142
|
anchorEl: f,
|
|
9143
9143
|
id: k,
|
|
9144
|
-
open:
|
|
9144
|
+
open: S,
|
|
9145
9145
|
placement: "bottom-start",
|
|
9146
9146
|
role: "menu",
|
|
9147
9147
|
sx: {
|
|
@@ -9158,16 +9158,16 @@ function Cc(t) {
|
|
|
9158
9158
|
{
|
|
9159
9159
|
disableClearable: !0,
|
|
9160
9160
|
disableListWrap: !0,
|
|
9161
|
-
filterOptions: (
|
|
9162
|
-
getOptionLabel: (
|
|
9163
|
-
isOptionEqualToValue: (
|
|
9164
|
-
onChange: (
|
|
9165
|
-
|
|
9161
|
+
filterOptions: (y, { inputValue: O }) => y.filter((E) => E.searchable.includes(O.toUpperCase())),
|
|
9162
|
+
getOptionLabel: (y) => y.name,
|
|
9163
|
+
isOptionEqualToValue: (y, O) => y.code === O.code,
|
|
9164
|
+
onChange: (y, O) => {
|
|
9165
|
+
y.preventDefault(), g(null), c(O), p.onChange("");
|
|
9166
9166
|
},
|
|
9167
9167
|
open: !0,
|
|
9168
|
-
options:
|
|
9168
|
+
options: x,
|
|
9169
9169
|
renderInput: fc,
|
|
9170
|
-
renderOption: (
|
|
9170
|
+
renderOption: (y, O) => [y, O],
|
|
9171
9171
|
sx: { width: 300 },
|
|
9172
9172
|
...l?.autocomplete,
|
|
9173
9173
|
slots: {
|
|
@@ -9274,14 +9274,14 @@ const Jd = Ge(xc)((t) => ({
|
|
|
9274
9274
|
onlyNumbers: g = !1,
|
|
9275
9275
|
placeholder: m,
|
|
9276
9276
|
rules: b,
|
|
9277
|
-
sideLabel:
|
|
9277
|
+
sideLabel: S = !1,
|
|
9278
9278
|
showSearchButton: k = !0,
|
|
9279
|
-
searchButtonLabel:
|
|
9280
|
-
slotProps:
|
|
9279
|
+
searchButtonLabel: x,
|
|
9280
|
+
slotProps: y,
|
|
9281
9281
|
disabled: O,
|
|
9282
9282
|
name: E,
|
|
9283
9283
|
id: P
|
|
9284
|
-
} = t, { slotProps: v, ...L } =
|
|
9284
|
+
} = t, { slotProps: v, ...L } = y?.field ?? {}, I = v?.input, C = v?.htmlInput, A = F(() => P ?? Ie(), [P]), T = b?.required !== void 0, M = T ? !!b?.required : f === !0, D = T || !M ? b : { ...b ?? {}, required: !0 }, {
|
|
9285
9285
|
field: { onBlur: V, onChange: z, value: U }
|
|
9286
9286
|
} = Pe({
|
|
9287
9287
|
control: a,
|
|
@@ -9289,27 +9289,27 @@ const Jd = Ge(xc)((t) => ({
|
|
|
9289
9289
|
rules: D,
|
|
9290
9290
|
disabled: O,
|
|
9291
9291
|
shouldUnregister: !0,
|
|
9292
|
-
...
|
|
9293
|
-
}), G = lt(), X = Ke(G.breakpoints.up("md")), W =
|
|
9294
|
-
...
|
|
9292
|
+
...y?.controller
|
|
9293
|
+
}), G = lt(), X = Ke(G.breakpoints.up("md")), W = y?.searchButton ?? {}, B = k !== !1 && X, ie = {
|
|
9294
|
+
...y?.wrapper,
|
|
9295
9295
|
labelSubtitle: c,
|
|
9296
|
-
hideLabel:
|
|
9297
|
-
labelOnTop:
|
|
9296
|
+
hideLabel: y?.wrapper?.hideLabel ?? !p,
|
|
9297
|
+
labelOnTop: y?.wrapper?.labelOnTop ?? !S
|
|
9298
9298
|
}, se = `${U ?? ""}`.trim().length > 0, fe = r ? d : void 0, Te = (oe) => {
|
|
9299
9299
|
oe.preventDefault(), oe.stopPropagation(), n(!0), se ? h(U ?? "") : V();
|
|
9300
9300
|
}, We = (oe) => {
|
|
9301
|
-
if (
|
|
9301
|
+
if (y?.field?.onKeyDown?.(oe), !oe.defaultPrevented && oe.key === "Enter") {
|
|
9302
9302
|
oe.preventDefault();
|
|
9303
9303
|
const $e = o.current?.form;
|
|
9304
9304
|
$e?.requestSubmit ? $e.requestSubmit() : $e?.dispatchEvent(new Event("submit", { cancelable: !0, bubbles: !0 }));
|
|
9305
9305
|
}
|
|
9306
9306
|
}, ut = (oe) => {
|
|
9307
|
-
if (
|
|
9307
|
+
if (y?.field?.onChange?.(oe), oe.defaultPrevented)
|
|
9308
9308
|
return;
|
|
9309
9309
|
const $e = oe.target.value ?? "", Dt = g ? $e.replace(/\D+/g, "") : $e;
|
|
9310
9310
|
z(Dt);
|
|
9311
9311
|
}, _t = {
|
|
9312
|
-
...typeof
|
|
9312
|
+
...typeof C == "function" ? {} : C ?? {},
|
|
9313
9313
|
...g ? {
|
|
9314
9314
|
inputMode: "numeric",
|
|
9315
9315
|
pattern: "[0-9]*"
|
|
@@ -9410,7 +9410,7 @@ const Jd = Ge(xc)((t) => ({
|
|
|
9410
9410
|
...Array.isArray(W.sx) ? W.sx : [W.sx]
|
|
9411
9411
|
],
|
|
9412
9412
|
...W,
|
|
9413
|
-
children:
|
|
9413
|
+
children: x ?? W.children ?? l("searchButtonLabel")
|
|
9414
9414
|
}
|
|
9415
9415
|
)
|
|
9416
9416
|
]
|
|
@@ -9485,7 +9485,7 @@ const Jd = Ge(xc)((t) => ({
|
|
|
9485
9485
|
{
|
|
9486
9486
|
open: h,
|
|
9487
9487
|
onClose: () => f(!1),
|
|
9488
|
-
onSubmit: (
|
|
9488
|
+
onSubmit: (S) => m(S)
|
|
9489
9489
|
}
|
|
9490
9490
|
)
|
|
9491
9491
|
] });
|
|
@@ -9514,18 +9514,18 @@ function tu(t) {
|
|
|
9514
9514
|
errors: g,
|
|
9515
9515
|
label: m,
|
|
9516
9516
|
limitTags: b,
|
|
9517
|
-
loading:
|
|
9517
|
+
loading: S,
|
|
9518
9518
|
onInputChange: k,
|
|
9519
|
-
options:
|
|
9520
|
-
placeholder:
|
|
9519
|
+
options: x,
|
|
9520
|
+
placeholder: y,
|
|
9521
9521
|
rules: O,
|
|
9522
9522
|
slotProps: E,
|
|
9523
9523
|
dropdownLabel: P,
|
|
9524
9524
|
dropdownSearch: v = !1,
|
|
9525
9525
|
dropdownSearchPlaceholder: L = "Ieškoti",
|
|
9526
9526
|
selectAll: I = !1,
|
|
9527
|
-
...
|
|
9528
|
-
} = t, { disabled: A, name: T } =
|
|
9527
|
+
...C
|
|
9528
|
+
} = t, { disabled: A, name: T } = C, M = F(() => C.id ?? Ie(), [C.id]), D = F(() => `rc-ses-select-single-value-${M}`, [M]), {
|
|
9529
9529
|
field: { onChange: V, value: z }
|
|
9530
9530
|
} = Pe({
|
|
9531
9531
|
control: f,
|
|
@@ -9533,12 +9533,12 @@ function tu(t) {
|
|
|
9533
9533
|
rules: O,
|
|
9534
9534
|
shouldUnregister: !0,
|
|
9535
9535
|
...E?.controller
|
|
9536
|
-
}), U = !!g, G = typeof E?.field?.groupBy == "function", X = F(() => p ? Array.isArray(z) ?
|
|
9536
|
+
}), U = !!g, G = typeof E?.field?.groupBy == "function", X = F(() => p ? Array.isArray(z) ? x.filter((_) => z.includes(_.value)) : [] : x.find((_) => _.value === z) ?? null, [z, x, p]), W = !p && X && !Array.isArray(X) ? X.label : "", B = p && Array.isArray(X) ? X.length : 0, se = p && (b ?? -1) > -1 && B > (b ?? -1) ? c : a, [fe, Te] = H.useState(""), We = v ? "" : fe, ut = F(
|
|
9537
9537
|
() => ({ label: "", value: i }),
|
|
9538
9538
|
[i]
|
|
9539
9539
|
), Cr = F(
|
|
9540
|
-
() => v && !G ? [ut, ...
|
|
9541
|
-
[v, G,
|
|
9540
|
+
() => v && !G ? [ut, ...x] : x,
|
|
9541
|
+
[v, G, x, ut]
|
|
9542
9542
|
), _t = (_, J) => {
|
|
9543
9543
|
if (p) {
|
|
9544
9544
|
const te = J.filter((de) => de.value !== i).map((de) => de.value);
|
|
@@ -9549,7 +9549,7 @@ function tu(t) {
|
|
|
9549
9549
|
V(te?.value ?? null);
|
|
9550
9550
|
}
|
|
9551
9551
|
}, Je = Sc(
|
|
9552
|
-
|
|
9552
|
+
x,
|
|
9553
9553
|
v ? e : fe
|
|
9554
9554
|
), oe = Array.isArray(z) ? z : [], { allSelected: $e, toggle: Dt } = vc(
|
|
9555
9555
|
Je,
|
|
@@ -9603,7 +9603,7 @@ function tu(t) {
|
|
|
9603
9603
|
blurOnSelect: !1,
|
|
9604
9604
|
clearOnBlur: !1,
|
|
9605
9605
|
handleHomeEndKeys: !1,
|
|
9606
|
-
loading:
|
|
9606
|
+
loading: S,
|
|
9607
9607
|
value: X,
|
|
9608
9608
|
inputValue: We,
|
|
9609
9609
|
onChange: _t,
|
|
@@ -9641,7 +9641,7 @@ function tu(t) {
|
|
|
9641
9641
|
..._,
|
|
9642
9642
|
disabled: A,
|
|
9643
9643
|
error: U,
|
|
9644
|
-
placeholder: !p && W ? void 0 :
|
|
9644
|
+
placeholder: !p && W ? void 0 : y,
|
|
9645
9645
|
sx: {
|
|
9646
9646
|
...v || !p && W ? {
|
|
9647
9647
|
"& .MuiInputBase-input": {
|