@snmt-react-ui/country-select 2.8.21 → 2.8.23
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/country-select.js +215 -209
- package/dist/index.css +1 -1
- package/package.json +3 -3
package/dist/country-select.js
CHANGED
|
@@ -7,7 +7,7 @@ import { SNMTUiContext as f2 } from "@snmt-react-ui/core";
|
|
|
7
7
|
import { Select as m2, Tag as w2, Flex as L2, Checkbox as k2, Avatar as v2, Typography as L1, Popover as N2 } from "antd";
|
|
8
8
|
import { forwardRef as i1, useState as I, useRef as $, useEffect as V, useCallback as K, useContext as Q, createContext as q, useImperativeHandle as k1 } from "react";
|
|
9
9
|
var R2 = Object.defineProperty, x2 = (i, e, t) => e in i ? R2(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, _2 = (i, e, t) => x2(i, e + "", t), M2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
10
|
-
function
|
|
10
|
+
function b2() {
|
|
11
11
|
if (console && console.warn) {
|
|
12
12
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
13
13
|
e[t] = arguments[t];
|
|
@@ -18,7 +18,7 @@ const G1 = {};
|
|
|
18
18
|
function M1() {
|
|
19
19
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
20
20
|
e[t] = arguments[t];
|
|
21
|
-
z(e[0]) && G1[e[0]] || (z(e[0]) && (G1[e[0]] = /* @__PURE__ */ new Date()),
|
|
21
|
+
z(e[0]) && G1[e[0]] || (z(e[0]) && (G1[e[0]] = /* @__PURE__ */ new Date()), b2(...e));
|
|
22
22
|
}
|
|
23
23
|
const e2 = (i, e) => () => {
|
|
24
24
|
if (i.isInitialized)
|
|
@@ -37,7 +37,7 @@ const e2 = (i, e) => () => {
|
|
|
37
37
|
z(t) && (t = [t]), t.forEach((s) => {
|
|
38
38
|
i.options.ns.indexOf(s) < 0 && i.options.ns.push(s);
|
|
39
39
|
}), i.loadLanguages(e, e2(i, n));
|
|
40
|
-
},
|
|
40
|
+
}, y2 = function(i, e) {
|
|
41
41
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
42
42
|
const n = e.languages[0], s = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
|
|
43
43
|
if (n.toLowerCase() === "cimode") return !0;
|
|
@@ -53,7 +53,7 @@ const e2 = (i, e) => () => {
|
|
|
53
53
|
precheck: (n, s) => {
|
|
54
54
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !s(n.isLanguageChangingTo, i)) return !1;
|
|
55
55
|
}
|
|
56
|
-
}) :
|
|
56
|
+
}) : y2(i, e, t);
|
|
57
57
|
}, z = (i) => typeof i == "string", H2 = (i) => typeof i == "object" && i !== null, A2 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, I2 = {
|
|
58
58
|
"&": "&",
|
|
59
59
|
"&": "&",
|
|
@@ -88,7 +88,7 @@ let G2 = {
|
|
|
88
88
|
};
|
|
89
89
|
const Z2 = () => G2;
|
|
90
90
|
let S2;
|
|
91
|
-
const
|
|
91
|
+
const T2 = () => S2, D2 = q();
|
|
92
92
|
class K2 {
|
|
93
93
|
constructor() {
|
|
94
94
|
_2(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces)), this.usedNamespaces = {};
|
|
@@ -111,10 +111,10 @@ const B2 = (i, e) => {
|
|
|
111
111
|
} = e, {
|
|
112
112
|
i18n: n,
|
|
113
113
|
defaultNS: s
|
|
114
|
-
} = Q(
|
|
114
|
+
} = Q(D2) || {}, o = t || n || T2();
|
|
115
115
|
if (o && !o.reportNamespaces && (o.reportNamespaces = new K2()), !o) {
|
|
116
116
|
M1("You will need to pass in an i18next instance by using initReactI18next");
|
|
117
|
-
const w = (
|
|
117
|
+
const w = (x, _) => z(_) ? _ : H2(_) && z(_.defaultValue) ? _.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, M = [w, {}, !1];
|
|
118
118
|
return M.t = w, M.i18n = {}, M.ready = !1, M;
|
|
119
119
|
}
|
|
120
120
|
o.options.react && o.options.react.wait !== void 0 && M1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
@@ -131,25 +131,25 @@ const B2 = (i, e) => {
|
|
|
131
131
|
const h = (o.isInitialized || o.initializedStoreOnce) && a.every((w) => E2(w, o, c)), u = Y2(o, e.lng || null, c.nsMode === "fallback" ? a : a[0], l), g = () => u, p = () => t2(o, e.lng || null, c.nsMode === "fallback" ? a : a[0], l), [m, v] = I(g);
|
|
132
132
|
let f = a.join();
|
|
133
133
|
e.lng && (f = `${e.lng}${f}`);
|
|
134
|
-
const
|
|
134
|
+
const b = B2(f), y = $(!0);
|
|
135
135
|
V(() => {
|
|
136
136
|
const {
|
|
137
137
|
bindI18n: w,
|
|
138
138
|
bindI18nStore: M
|
|
139
139
|
} = c;
|
|
140
|
-
|
|
141
|
-
|
|
140
|
+
y.current = !0, !h && !d && (e.lng ? S1(o, e.lng, a, () => {
|
|
141
|
+
y.current && v(p);
|
|
142
142
|
}) : Z1(o, a, () => {
|
|
143
|
-
|
|
144
|
-
})), h &&
|
|
145
|
-
const
|
|
146
|
-
|
|
143
|
+
y.current && v(p);
|
|
144
|
+
})), h && b && b !== f && y.current && v(p);
|
|
145
|
+
const x = () => {
|
|
146
|
+
y.current && v(p);
|
|
147
147
|
};
|
|
148
|
-
return w && o && o.on(w,
|
|
149
|
-
|
|
148
|
+
return w && o && o.on(w, x), M && o && o.store.on(M, x), () => {
|
|
149
|
+
y.current = !1, w && o && w.split(" ").forEach((_) => o.off(_, x)), M && o && M.split(" ").forEach((_) => o.store.off(_, x));
|
|
150
150
|
};
|
|
151
151
|
}, [o, f]), V(() => {
|
|
152
|
-
|
|
152
|
+
y.current && h && v(g);
|
|
153
153
|
}, [o, l, h]);
|
|
154
154
|
const H = [m, o, h];
|
|
155
155
|
if (H.t = m, H.i18n = o, H.ready = h, h || !h && !d) return H;
|
|
@@ -183,7 +183,7 @@ const B2 = (i, e) => {
|
|
|
183
183
|
h2: 2,
|
|
184
184
|
h3: 3,
|
|
185
185
|
h4: 4
|
|
186
|
-
},
|
|
186
|
+
}, T1 = i1(
|
|
187
187
|
({
|
|
188
188
|
align: i = "inherit",
|
|
189
189
|
variant: e = "body1",
|
|
@@ -205,9 +205,9 @@ const B2 = (i, e) => {
|
|
|
205
205
|
a.current && u(a.current.scrollWidth > a.current.clientWidth);
|
|
206
206
|
};
|
|
207
207
|
f();
|
|
208
|
-
const
|
|
209
|
-
return a.current &&
|
|
210
|
-
|
|
208
|
+
const b = new ResizeObserver(f);
|
|
209
|
+
return a.current && b.observe(a.current), (v = a.current) != null && v.parentElement && b.observe(a.current.parentElement), () => {
|
|
210
|
+
b.disconnect();
|
|
211
211
|
};
|
|
212
212
|
}, [d]);
|
|
213
213
|
const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
@@ -228,14 +228,14 @@ const B2 = (i, e) => {
|
|
|
228
228
|
return g ? /* @__PURE__ */ r(j2, { level: F2[e], ...m, children: n }) : /* @__PURE__ */ r($2, { ...m, children: n });
|
|
229
229
|
}
|
|
230
230
|
);
|
|
231
|
-
var
|
|
231
|
+
var b1 = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_0_5 = "var(--grey-light-0-5)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_0_5 = "var(--blue-light-0-5)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.CYAN_LIGHT = "var(--cyan-light)", i.CYAN_DARK = "var(--cyan-dark)", i.MAGENTA_LIGHT = "var(--magenta-light)", i.MAGENTA_DARK = "var(--magenta-dark)", i.GOLD_LIGHT = "var(--gold-light)", i.GOLD_DARK = "var(--gold-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(b1 || {});
|
|
232
232
|
const W2 = q({
|
|
233
233
|
locale: "en",
|
|
234
234
|
theme: "light"
|
|
235
235
|
});
|
|
236
236
|
W2.Provider;
|
|
237
|
-
const U2 = ({
|
|
238
|
-
const s =
|
|
237
|
+
const U2 = ({ label: i, variant: e = "small", src: t, fallbackText: n }) => {
|
|
238
|
+
const s = t != null && t.trim() ? t : void 0, o = {
|
|
239
239
|
large: 80,
|
|
240
240
|
medium: 48,
|
|
241
241
|
small: 32,
|
|
@@ -255,24 +255,23 @@ const U2 = ({ children: i, label: e, variant: t = "small", src: n }) => {
|
|
|
255
255
|
"div",
|
|
256
256
|
{
|
|
257
257
|
className: "snmt-avatar-with-label-wrapper",
|
|
258
|
-
style: { gap:
|
|
258
|
+
style: { gap: i ? e === "large" || e === "medium" ? 12 : 8 : 0 },
|
|
259
259
|
children: [
|
|
260
260
|
/* @__PURE__ */ r(
|
|
261
261
|
v2,
|
|
262
262
|
{
|
|
263
263
|
className: `snmt-avatar ${s ? "image" : ""}`,
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
children: /* @__PURE__ */ r(D1, { color: y1.GREY_LIGHT_0, variant: c[t], children: i })
|
|
264
|
+
src: s,
|
|
265
|
+
size: o[e],
|
|
266
|
+
children: /* @__PURE__ */ r(T1, { color: b1.GREY_LIGHT_0, variant: c[e], children: !s && n })
|
|
268
267
|
}
|
|
269
268
|
),
|
|
270
|
-
|
|
271
|
-
|
|
269
|
+
i && /* @__PURE__ */ r(
|
|
270
|
+
T1,
|
|
272
271
|
{
|
|
273
|
-
color:
|
|
274
|
-
variant:
|
|
275
|
-
children:
|
|
272
|
+
color: b1.GREY_DARK_5,
|
|
273
|
+
variant: e ? d[e] : "body2",
|
|
274
|
+
children: i
|
|
276
275
|
}
|
|
277
276
|
)
|
|
278
277
|
]
|
|
@@ -312,9 +311,9 @@ const { Title: z2, Text: J2 } = L1, Q2 = {
|
|
|
312
311
|
a.current && u(a.current.scrollWidth > a.current.clientWidth);
|
|
313
312
|
};
|
|
314
313
|
f();
|
|
315
|
-
const
|
|
316
|
-
return a.current &&
|
|
317
|
-
|
|
314
|
+
const b = new ResizeObserver(f);
|
|
315
|
+
return a.current && b.observe(a.current), (v = a.current) != null && v.parentElement && b.observe(a.current.parentElement), () => {
|
|
316
|
+
b.disconnect();
|
|
318
317
|
};
|
|
319
318
|
}, [d]);
|
|
320
319
|
const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
@@ -1334,7 +1333,7 @@ const e5 = ({
|
|
|
1334
1333
|
/* @__PURE__ */ r("circle", { cx: "10", cy: "10", r: "2.375", stroke: t, strokeWidth: "1.25" })
|
|
1335
1334
|
]
|
|
1336
1335
|
}
|
|
1337
|
-
),
|
|
1336
|
+
), b5 = ({
|
|
1338
1337
|
width: i = 20,
|
|
1339
1338
|
height: e = 20,
|
|
1340
1339
|
color: t = "#070739",
|
|
@@ -1372,7 +1371,7 @@ const e5 = ({
|
|
|
1372
1371
|
)
|
|
1373
1372
|
]
|
|
1374
1373
|
}
|
|
1375
|
-
),
|
|
1374
|
+
), y5 = ({
|
|
1376
1375
|
width: i = 9,
|
|
1377
1376
|
height: e = 5,
|
|
1378
1377
|
color: t = "#001E52",
|
|
@@ -1658,7 +1657,7 @@ const e5 = ({
|
|
|
1658
1657
|
}
|
|
1659
1658
|
)
|
|
1660
1659
|
}
|
|
1661
|
-
),
|
|
1660
|
+
), T5 = ({
|
|
1662
1661
|
className: i,
|
|
1663
1662
|
color: e = L.GREY_DARK_5,
|
|
1664
1663
|
height: t = 20,
|
|
@@ -1691,7 +1690,7 @@ const e5 = ({
|
|
|
1691
1690
|
)
|
|
1692
1691
|
]
|
|
1693
1692
|
}
|
|
1694
|
-
),
|
|
1693
|
+
), D5 = ({
|
|
1695
1694
|
className: i,
|
|
1696
1695
|
color: e = L.GREY_DARK_5,
|
|
1697
1696
|
height: t = 24,
|
|
@@ -2703,7 +2702,7 @@ const e5 = ({
|
|
|
2703
2702
|
onClick: a
|
|
2704
2703
|
});
|
|
2705
2704
|
case "visibilityOffIcon":
|
|
2706
|
-
return
|
|
2705
|
+
return b5({
|
|
2707
2706
|
width: e,
|
|
2708
2707
|
height: t,
|
|
2709
2708
|
color: l,
|
|
@@ -2711,7 +2710,7 @@ const e5 = ({
|
|
|
2711
2710
|
onClick: a
|
|
2712
2711
|
});
|
|
2713
2712
|
case "selectArrowIcon":
|
|
2714
|
-
return
|
|
2713
|
+
return y5({
|
|
2715
2714
|
width: e,
|
|
2716
2715
|
height: t,
|
|
2717
2716
|
color: l,
|
|
@@ -2753,13 +2752,13 @@ const e5 = ({
|
|
|
2753
2752
|
case "arrow2Left":
|
|
2754
2753
|
return o5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2755
2754
|
case "link":
|
|
2756
|
-
return
|
|
2755
|
+
return T5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2757
2756
|
case "telegram":
|
|
2758
2757
|
return K5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2759
2758
|
case "mail":
|
|
2760
2759
|
return Y5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2761
2760
|
case "github":
|
|
2762
|
-
return
|
|
2761
|
+
return D5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2763
2762
|
case "linkedIn":
|
|
2764
2763
|
return B5({ width: e, height: t, color: l, className: h, onClick: a });
|
|
2765
2764
|
case "emptyStateIcon":
|
|
@@ -2835,9 +2834,9 @@ const e5 = ({
|
|
|
2835
2834
|
a.current && u(a.current.scrollWidth > a.current.clientWidth);
|
|
2836
2835
|
};
|
|
2837
2836
|
f();
|
|
2838
|
-
const
|
|
2839
|
-
return a.current &&
|
|
2840
|
-
|
|
2837
|
+
const b = new ResizeObserver(f);
|
|
2838
|
+
return a.current && b.observe(a.current), (v = a.current) != null && v.parentElement && b.observe(a.current.parentElement), () => {
|
|
2839
|
+
b.disconnect();
|
|
2841
2840
|
};
|
|
2842
2841
|
}, [d]);
|
|
2843
2842
|
const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
@@ -3295,7 +3294,7 @@ const ue = ({
|
|
|
3295
3294
|
)
|
|
3296
3295
|
]
|
|
3297
3296
|
}
|
|
3298
|
-
),
|
|
3297
|
+
), be = ({
|
|
3299
3298
|
width: i = 20,
|
|
3300
3299
|
height: e = 20,
|
|
3301
3300
|
color: t = k.GREY_DARK_5,
|
|
@@ -3335,7 +3334,7 @@ const ue = ({
|
|
|
3335
3334
|
)
|
|
3336
3335
|
]
|
|
3337
3336
|
}
|
|
3338
|
-
),
|
|
3337
|
+
), ye = ({
|
|
3339
3338
|
width: i = 20,
|
|
3340
3339
|
height: e = 20,
|
|
3341
3340
|
color: t = k.GREY_DARK_5,
|
|
@@ -3728,7 +3727,7 @@ const ue = ({
|
|
|
3728
3727
|
)
|
|
3729
3728
|
]
|
|
3730
3729
|
}
|
|
3731
|
-
),
|
|
3730
|
+
), Te = ({
|
|
3732
3731
|
width: i = 20,
|
|
3733
3732
|
height: e = 20,
|
|
3734
3733
|
color: t = k.GREY_DARK_5,
|
|
@@ -3761,7 +3760,7 @@ const ue = ({
|
|
|
3761
3760
|
)
|
|
3762
3761
|
]
|
|
3763
3762
|
}
|
|
3764
|
-
),
|
|
3763
|
+
), De = ({
|
|
3765
3764
|
width: i = 20,
|
|
3766
3765
|
height: e = 20,
|
|
3767
3766
|
color: t = k.GREY_DARK_5,
|
|
@@ -5147,9 +5146,9 @@ const ue = ({
|
|
|
5147
5146
|
case "dragAndDrop":
|
|
5148
5147
|
return Me({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5149
5148
|
case "filter":
|
|
5150
|
-
return ye({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5151
|
-
case "attention":
|
|
5152
5149
|
return be({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5150
|
+
case "attention":
|
|
5151
|
+
return ye({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5153
5152
|
case "users":
|
|
5154
5153
|
return Ee({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5155
5154
|
case "mySkillsMatrix":
|
|
@@ -5181,9 +5180,9 @@ const ue = ({
|
|
|
5181
5180
|
case "settings2":
|
|
5182
5181
|
return Se({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5183
5182
|
case "checkCircle":
|
|
5184
|
-
return De({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5185
|
-
case "cancelCircle":
|
|
5186
5183
|
return Te({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5184
|
+
case "cancelCircle":
|
|
5185
|
+
return De({ width: e, height: t, color: l, className: h, onClick: a });
|
|
5187
5186
|
case "visibilityIcon":
|
|
5188
5187
|
return Ke({
|
|
5189
5188
|
width: e,
|
|
@@ -5343,7 +5342,7 @@ const s2 = ({
|
|
|
5343
5342
|
) : i
|
|
5344
5343
|
}
|
|
5345
5344
|
);
|
|
5346
|
-
}, { Title: M7, Text:
|
|
5345
|
+
}, { Title: M7, Text: b7 } = L1, y7 = {
|
|
5347
5346
|
h1: 1,
|
|
5348
5347
|
h2: 2,
|
|
5349
5348
|
h3: 3,
|
|
@@ -5370,9 +5369,9 @@ const s2 = ({
|
|
|
5370
5369
|
a.current && u(a.current.scrollWidth > a.current.clientWidth);
|
|
5371
5370
|
};
|
|
5372
5371
|
f();
|
|
5373
|
-
const
|
|
5374
|
-
return a.current &&
|
|
5375
|
-
|
|
5372
|
+
const b = new ResizeObserver(f);
|
|
5373
|
+
return a.current && b.observe(a.current), (v = a.current) != null && v.parentElement && b.observe(a.current.parentElement), () => {
|
|
5374
|
+
b.disconnect();
|
|
5376
5375
|
};
|
|
5377
5376
|
}, [d]);
|
|
5378
5377
|
const g = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
@@ -5390,7 +5389,7 @@ const s2 = ({
|
|
|
5390
5389
|
}
|
|
5391
5390
|
} : void 0
|
|
5392
5391
|
};
|
|
5393
|
-
return g ? /* @__PURE__ */ r(M7, { level:
|
|
5392
|
+
return g ? /* @__PURE__ */ r(M7, { level: y7[e], ...m, children: n }) : /* @__PURE__ */ r(b7, { ...m, children: n });
|
|
5394
5393
|
}
|
|
5395
5394
|
), H7 = ({
|
|
5396
5395
|
children: i,
|
|
@@ -5477,7 +5476,7 @@ const I7 = ({
|
|
|
5477
5476
|
small: 20,
|
|
5478
5477
|
medium: 28,
|
|
5479
5478
|
large: 48
|
|
5480
|
-
},
|
|
5479
|
+
}, D1 = ({ size: i = "medium", color: e = "#004ed7" }) => {
|
|
5481
5480
|
const t = V7[i], n = `no-repeat linear-gradient(${e}
|
|
5482
5481
|
calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
|
|
5483
5482
|
width: t,
|
|
@@ -5504,33 +5503,33 @@ const I7 = ({
|
|
|
5504
5503
|
onPopupScroll: m,
|
|
5505
5504
|
id: v,
|
|
5506
5505
|
extraOptions: f,
|
|
5507
|
-
dropdownRender:
|
|
5508
|
-
optionRender:
|
|
5506
|
+
dropdownRender: b,
|
|
5507
|
+
optionRender: y,
|
|
5509
5508
|
isLoading: H,
|
|
5510
5509
|
readOnly: w,
|
|
5511
5510
|
error: M
|
|
5512
|
-
},
|
|
5513
|
-
const [
|
|
5511
|
+
}, x) => {
|
|
5512
|
+
const [_, T] = I(!1), [Y, n1] = I(!1), [F, c1] = I(!0), [A, P] = I(i), W = $(null);
|
|
5514
5513
|
V(() => {
|
|
5515
5514
|
P(i);
|
|
5516
5515
|
}, [i]);
|
|
5517
|
-
const X = (
|
|
5518
|
-
|
|
5519
|
-
}, d1 = (
|
|
5520
|
-
var
|
|
5521
|
-
return !!((
|
|
5516
|
+
const X = (N) => {
|
|
5517
|
+
T(N), g && g(N);
|
|
5518
|
+
}, d1 = (N, E) => {
|
|
5519
|
+
var D;
|
|
5520
|
+
return !!((D = E == null ? void 0 : E.label) != null && D.toString().toLowerCase().includes(N.toLowerCase()));
|
|
5522
5521
|
}, G = () => {
|
|
5523
5522
|
n1(!0);
|
|
5524
5523
|
}, j = () => {
|
|
5525
5524
|
n1(!1);
|
|
5526
5525
|
}, Z = K(
|
|
5527
|
-
(
|
|
5528
|
-
if (P(
|
|
5529
|
-
const
|
|
5530
|
-
e == null || e(
|
|
5526
|
+
(N) => {
|
|
5527
|
+
if (P(N), n) {
|
|
5528
|
+
const D = N;
|
|
5529
|
+
e == null || e(D);
|
|
5531
5530
|
return;
|
|
5532
5531
|
}
|
|
5533
|
-
const E =
|
|
5532
|
+
const E = N;
|
|
5534
5533
|
e == null || e(E);
|
|
5535
5534
|
},
|
|
5536
5535
|
[n, e]
|
|
@@ -5543,38 +5542,38 @@ const I7 = ({
|
|
|
5543
5542
|
Z("");
|
|
5544
5543
|
}
|
|
5545
5544
|
}, [d, Z, n, w]), C1 = K(
|
|
5546
|
-
(
|
|
5547
|
-
const E = A.filter((
|
|
5545
|
+
(N) => {
|
|
5546
|
+
const E = A.filter((D) => D !== N);
|
|
5548
5547
|
Z(E), P(E);
|
|
5549
5548
|
},
|
|
5550
5549
|
[Z, A]
|
|
5551
5550
|
), I1 = K(
|
|
5552
|
-
(
|
|
5551
|
+
(N) => (A == null ? void 0 : A.indexOf(N)) === 0 ? (
|
|
5553
5552
|
// if the search input is empty
|
|
5554
5553
|
// then display the placeholder, else do not display it
|
|
5555
5554
|
/* @__PURE__ */ r("span", { className: "custom-placeholder", children: F ? t : "" })
|
|
5556
5555
|
) : /* @__PURE__ */ r(U, {}),
|
|
5557
5556
|
[F, A, t]
|
|
5558
|
-
), c2 = (
|
|
5559
|
-
|
|
5560
|
-
}, d2 = async (
|
|
5561
|
-
const { target: E } =
|
|
5562
|
-
E.scrollTop + E.offsetHeight >= E.scrollHeight - h && (p == null || p(!0)), m && await m(
|
|
5557
|
+
), c2 = (N) => {
|
|
5558
|
+
N.preventDefault(), N.stopPropagation();
|
|
5559
|
+
}, d2 = async (N) => {
|
|
5560
|
+
const { target: E } = N;
|
|
5561
|
+
E.scrollTop + E.offsetHeight >= E.scrollHeight - h && (p == null || p(!0)), m && await m(N);
|
|
5563
5562
|
}, N1 = K(
|
|
5564
|
-
(
|
|
5565
|
-
var E,
|
|
5566
|
-
return ((E = o.find((R1) => R1.value ===
|
|
5567
|
-
(R1) => R1.value ===
|
|
5568
|
-
)) == null ? void 0 :
|
|
5563
|
+
(N) => {
|
|
5564
|
+
var E, D;
|
|
5565
|
+
return ((E = o.find((R1) => R1.value === N)) == null ? void 0 : E.label) || ((D = f == null ? void 0 : f.find(
|
|
5566
|
+
(R1) => R1.value === N
|
|
5567
|
+
)) == null ? void 0 : D.label) || N;
|
|
5569
5568
|
},
|
|
5570
5569
|
[f, o]
|
|
5571
5570
|
), g2 = K(
|
|
5572
|
-
(
|
|
5571
|
+
(N) => {
|
|
5573
5572
|
var E;
|
|
5574
5573
|
return /* @__PURE__ */ r(
|
|
5575
5574
|
I7,
|
|
5576
5575
|
{
|
|
5577
|
-
values:
|
|
5576
|
+
values: N,
|
|
5578
5577
|
onTagClose: C1,
|
|
5579
5578
|
maxWidth: ((E = W.current) == null ? void 0 : E.clientWidth) || 0,
|
|
5580
5579
|
disabled: d,
|
|
@@ -5586,7 +5585,7 @@ const I7 = ({
|
|
|
5586
5585
|
},
|
|
5587
5586
|
[d, f, C1, o, w]
|
|
5588
5587
|
), C2 = K(
|
|
5589
|
-
({ label:
|
|
5588
|
+
({ label: N, value: E, mode: D }) => D === "filter" ? I1(E) : /* @__PURE__ */ r("div", { onMouseDown: c2, className: "tag-wrapper", children: /* @__PURE__ */ r(s2, { onClose: () => C1(E), disabled: d, children: typeof N == "object" ? N : N1(E) }) }),
|
|
5590
5589
|
[d, N1, C1, I1]
|
|
5591
5590
|
), V1 = Array.isArray(A) && A.length > 0 || !!A && typeof A == "string" && A.trim() !== "";
|
|
5592
5591
|
return /* @__PURE__ */ C("div", { className: "snmt-select-container", children: [
|
|
@@ -5604,30 +5603,30 @@ const I7 = ({
|
|
|
5604
5603
|
className: "snmt-select-blank",
|
|
5605
5604
|
popupClassName: w ? "dropdown-read-only" : "",
|
|
5606
5605
|
id: v,
|
|
5607
|
-
ref:
|
|
5606
|
+
ref: x,
|
|
5608
5607
|
showSearch: !!s,
|
|
5609
5608
|
filterOption: s && d1,
|
|
5610
5609
|
onDropdownVisibleChange: X,
|
|
5611
5610
|
disabled: d,
|
|
5612
5611
|
value: A || void 0,
|
|
5613
|
-
labelRender: (
|
|
5614
|
-
const E = N1(
|
|
5612
|
+
labelRender: (N) => {
|
|
5613
|
+
const E = N1(N.value);
|
|
5615
5614
|
return d ? /* @__PURE__ */ r("span", { style: { color: S.GREY_DARK_1 }, children: E }) : E;
|
|
5616
5615
|
},
|
|
5617
5616
|
mode: n === "filter" ? "multiple" : n,
|
|
5618
5617
|
onChange: Z,
|
|
5619
5618
|
onFocus: G,
|
|
5620
5619
|
onBlur: j,
|
|
5621
|
-
onSearch: (
|
|
5622
|
-
c1(!
|
|
5620
|
+
onSearch: (N) => {
|
|
5621
|
+
c1(!N), u && u(N);
|
|
5623
5622
|
},
|
|
5624
5623
|
onSelect: () => c1(!0),
|
|
5625
5624
|
onDeselect: () => c1(!0),
|
|
5626
|
-
tagRender: (
|
|
5625
|
+
tagRender: (N) => C2({ ...N, mode: n }),
|
|
5627
5626
|
maxTagCount: "responsive",
|
|
5628
5627
|
maxTagPlaceholder: g2,
|
|
5629
5628
|
onPopupScroll: d2,
|
|
5630
|
-
prefix: H && /* @__PURE__ */ r(
|
|
5629
|
+
prefix: H && /* @__PURE__ */ r(D1, { size: "small" }),
|
|
5631
5630
|
suffixIcon: /* @__PURE__ */ r("div", { className: "wrapper-suffix-icon", children: n !== "filter" && /* @__PURE__ */ C(U, { children: [
|
|
5632
5631
|
A && !!A.length && (n || a) && /* @__PURE__ */ r(
|
|
5633
5632
|
"div",
|
|
@@ -5650,31 +5649,38 @@ const I7 = ({
|
|
|
5650
5649
|
{
|
|
5651
5650
|
name: "selectArrowIcon",
|
|
5652
5651
|
color: d ? S.GREY_DARK_1 : S.GREY_DARK_5,
|
|
5653
|
-
className:
|
|
5654
|
-
onClick: () =>
|
|
5652
|
+
className: _ ? "select-arrow-rotated" : "select-arrow",
|
|
5653
|
+
onClick: () => T(!_)
|
|
5655
5654
|
}
|
|
5656
5655
|
)
|
|
5657
5656
|
] }) }),
|
|
5658
5657
|
removeIcon: /* @__PURE__ */ r(s1, { name: "cancelCircle", color: S.GREY_DARK_1 }),
|
|
5659
5658
|
options: o,
|
|
5660
|
-
optionRender: (
|
|
5659
|
+
optionRender: (N) => y ? y(N.data) : /* @__PURE__ */ C(o1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
5661
5660
|
/* @__PURE__ */ C(o1, { alignItems: "center", gap: 12, children: [
|
|
5662
5661
|
n && /* @__PURE__ */ r(
|
|
5663
5662
|
X2,
|
|
5664
5663
|
{
|
|
5665
|
-
checked: !!(A != null && A.includes(
|
|
5664
|
+
checked: !!(A != null && A.includes(N.value))
|
|
5666
5665
|
}
|
|
5667
5666
|
),
|
|
5668
5667
|
/* @__PURE__ */ C(o1, { alignItems: "center", gap: 8, children: [
|
|
5669
|
-
|
|
5670
|
-
|
|
5668
|
+
N.data.image !== void 0 && /* @__PURE__ */ r(
|
|
5669
|
+
U2,
|
|
5670
|
+
{
|
|
5671
|
+
src: N.data.image,
|
|
5672
|
+
variant: "xsmall",
|
|
5673
|
+
fallbackText: N.data.imageFallbackText ? N.data.imageFallbackText : ""
|
|
5674
|
+
}
|
|
5675
|
+
),
|
|
5676
|
+
/* @__PURE__ */ r("span", { children: N.label })
|
|
5671
5677
|
] })
|
|
5672
5678
|
] }),
|
|
5673
|
-
!n && A ===
|
|
5679
|
+
!n && A === N.value && /* @__PURE__ */ r(s1, { name: "check", color: S.BLUE_DARK_1 })
|
|
5674
5680
|
] }),
|
|
5675
|
-
dropdownRender: (
|
|
5676
|
-
/* @__PURE__ */ r("div", { className: "dropdown-menu", children:
|
|
5677
|
-
H && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(
|
|
5681
|
+
dropdownRender: (N) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
|
|
5682
|
+
/* @__PURE__ */ r("div", { className: "dropdown-menu", children: b ? b(N) : N }),
|
|
5683
|
+
H && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(D1, {}) })
|
|
5678
5684
|
] })
|
|
5679
5685
|
}
|
|
5680
5686
|
),
|
|
@@ -5711,7 +5717,7 @@ const I7 = ({
|
|
|
5711
5717
|
] })
|
|
5712
5718
|
] });
|
|
5713
5719
|
}
|
|
5714
|
-
),
|
|
5720
|
+
), R = (i) => typeof i == "string", r1 = () => {
|
|
5715
5721
|
let i, e;
|
|
5716
5722
|
const t = new Promise((n, s) => {
|
|
5717
5723
|
i = n, e = s;
|
|
@@ -5721,8 +5727,8 @@ const I7 = ({
|
|
|
5721
5727
|
i.forEach((n) => {
|
|
5722
5728
|
e[n] && (t[n] = e[n]);
|
|
5723
5729
|
});
|
|
5724
|
-
}, Z7 = /###/g, B1 = (i) => i && i.indexOf("###") > -1 ? i.replace(Z7, ".") : i, Y1 = (i) => !i ||
|
|
5725
|
-
const n =
|
|
5730
|
+
}, Z7 = /###/g, B1 = (i) => i && i.indexOf("###") > -1 ? i.replace(Z7, ".") : i, Y1 = (i) => !i || R(i), l1 = (i, e, t) => {
|
|
5731
|
+
const n = R(e) ? e.split(".") : e;
|
|
5726
5732
|
let s = 0;
|
|
5727
5733
|
for (; s < n.length - 1; ) {
|
|
5728
5734
|
if (Y1(i)) return {};
|
|
@@ -5759,15 +5765,15 @@ const I7 = ({
|
|
|
5759
5765
|
} = l1(i, e);
|
|
5760
5766
|
if (t)
|
|
5761
5767
|
return t[n];
|
|
5762
|
-
},
|
|
5768
|
+
}, T7 = (i, e, t) => {
|
|
5763
5769
|
const n = p1(i, t);
|
|
5764
5770
|
return n !== void 0 ? n : p1(e, t);
|
|
5765
5771
|
}, r2 = (i, e, t) => {
|
|
5766
5772
|
for (const n in e)
|
|
5767
|
-
n !== "__proto__" && n !== "constructor" && (n in i ?
|
|
5773
|
+
n !== "__proto__" && n !== "constructor" && (n in i ? R(i[n]) || i[n] instanceof String || R(e[n]) || e[n] instanceof String ? t && (i[n] = e[n]) : r2(i[n], e[n], t) : i[n] = e[n]);
|
|
5768
5774
|
return i;
|
|
5769
5775
|
}, e1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
5770
|
-
var
|
|
5776
|
+
var D7 = {
|
|
5771
5777
|
"&": "&",
|
|
5772
5778
|
"<": "<",
|
|
5773
5779
|
">": ">",
|
|
@@ -5775,7 +5781,7 @@ var T7 = {
|
|
|
5775
5781
|
"'": "'",
|
|
5776
5782
|
"/": "/"
|
|
5777
5783
|
};
|
|
5778
|
-
const K7 = (i) =>
|
|
5784
|
+
const K7 = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => D7[e]) : i;
|
|
5779
5785
|
class B7 {
|
|
5780
5786
|
constructor(e) {
|
|
5781
5787
|
this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -5799,7 +5805,7 @@ const Y7 = [" ", ",", "?", "!", ";"], P7 = new B7(20), j7 = (i, e, t) => {
|
|
|
5799
5805
|
c > 0 && !s.test(i.substring(0, c)) && (o = !0);
|
|
5800
5806
|
}
|
|
5801
5807
|
return o;
|
|
5802
|
-
},
|
|
5808
|
+
}, y1 = function(i, e) {
|
|
5803
5809
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
5804
5810
|
if (!i) return;
|
|
5805
5811
|
if (i[e]) return i[e];
|
|
@@ -5864,7 +5870,7 @@ class m1 {
|
|
|
5864
5870
|
return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
|
|
5865
5871
|
}
|
|
5866
5872
|
forward(e, t, n, s) {
|
|
5867
|
-
return s && !this.debug ? null : (
|
|
5873
|
+
return s && !this.debug ? null : (R(e[0]) && (e[0] = `${n}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
5868
5874
|
}
|
|
5869
5875
|
create(e) {
|
|
5870
5876
|
return new m1(this.logger, {
|
|
@@ -5930,9 +5936,9 @@ class j1 extends v1 {
|
|
|
5930
5936
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
5931
5937
|
const o = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, c = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
5932
5938
|
let d;
|
|
5933
|
-
e.indexOf(".") > -1 ? d = e.split(".") : (d = [e, t], n && (Array.isArray(n) ? d.push(...n) :
|
|
5939
|
+
e.indexOf(".") > -1 ? d = e.split(".") : (d = [e, t], n && (Array.isArray(n) ? d.push(...n) : R(n) && o ? d.push(...n.split(o)) : d.push(n)));
|
|
5934
5940
|
const l = p1(this.data, d);
|
|
5935
|
-
return !l && !t && !n && e.indexOf(".") > -1 && (e = d[0], t = d[1], n = d.slice(2).join(".")), l || !c || !
|
|
5941
|
+
return !l && !t && !n && e.indexOf(".") > -1 && (e = d[0], t = d[1], n = d.slice(2).join(".")), l || !c || !R(n) ? l : y1(this.data && this.data[e] && this.data[e][t], n, o);
|
|
5936
5942
|
}
|
|
5937
5943
|
addResource(e, t, n, s) {
|
|
5938
5944
|
let o = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -5947,7 +5953,7 @@ class j1 extends v1 {
|
|
|
5947
5953
|
silent: !1
|
|
5948
5954
|
};
|
|
5949
5955
|
for (const o in n)
|
|
5950
|
-
(
|
|
5956
|
+
(R(n[o]) || Array.isArray(n[o])) && this.addResource(e, t, o, n[o], {
|
|
5951
5957
|
silent: !0
|
|
5952
5958
|
});
|
|
5953
5959
|
s.silent || this.emit("added", e, t, n);
|
|
@@ -6026,14 +6032,14 @@ class w1 extends v1 {
|
|
|
6026
6032
|
if (l && l.length > 0)
|
|
6027
6033
|
return {
|
|
6028
6034
|
key: e,
|
|
6029
|
-
namespaces:
|
|
6035
|
+
namespaces: R(o) ? [o] : o
|
|
6030
6036
|
};
|
|
6031
6037
|
const a = e.split(n);
|
|
6032
6038
|
(n !== s || n === s && this.options.ns.indexOf(a[0]) > -1) && (o = a.shift()), e = a.join(s);
|
|
6033
6039
|
}
|
|
6034
6040
|
return {
|
|
6035
6041
|
key: e,
|
|
6036
|
-
namespaces:
|
|
6042
|
+
namespaces: R(o) ? [o] : o
|
|
6037
6043
|
};
|
|
6038
6044
|
}
|
|
6039
6045
|
translate(e, t, n) {
|
|
@@ -6068,8 +6074,8 @@ class w1 extends v1 {
|
|
|
6068
6074
|
}
|
|
6069
6075
|
const u = this.resolve(e, t);
|
|
6070
6076
|
let g = u && u.res;
|
|
6071
|
-
const p = u && u.usedKey || c, m = u && u.exactUsedKey || c, v = Object.prototype.toString.apply(g), f = ["[object Number]", "[object Function]", "[object RegExp]"],
|
|
6072
|
-
if (
|
|
6077
|
+
const p = u && u.usedKey || c, m = u && u.exactUsedKey || c, v = Object.prototype.toString.apply(g), f = ["[object Number]", "[object Function]", "[object RegExp]"], b = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, y = !this.i18nFormat || this.i18nFormat.handleAsObject, H = !R(g) && typeof g != "boolean" && typeof g != "number";
|
|
6078
|
+
if (y && g && H && f.indexOf(v) < 0 && !(R(b) && Array.isArray(g))) {
|
|
6073
6079
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
6074
6080
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
6075
6081
|
const w = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, g, {
|
|
@@ -6079,27 +6085,27 @@ class w1 extends v1 {
|
|
|
6079
6085
|
return s ? (u.res = w, u.usedParams = this.getUsedParamsDetails(t), u) : w;
|
|
6080
6086
|
}
|
|
6081
6087
|
if (o) {
|
|
6082
|
-
const w = Array.isArray(g), M = w ? [] : {},
|
|
6083
|
-
for (const
|
|
6084
|
-
if (Object.prototype.hasOwnProperty.call(g,
|
|
6085
|
-
const
|
|
6086
|
-
M[
|
|
6088
|
+
const w = Array.isArray(g), M = w ? [] : {}, x = w ? m : p;
|
|
6089
|
+
for (const _ in g)
|
|
6090
|
+
if (Object.prototype.hasOwnProperty.call(g, _)) {
|
|
6091
|
+
const T = `${x}${o}${_}`;
|
|
6092
|
+
M[_] = this.translate(T, {
|
|
6087
6093
|
...t,
|
|
6088
6094
|
joinArrays: !1,
|
|
6089
6095
|
ns: d
|
|
6090
|
-
}), M[
|
|
6096
|
+
}), M[_] === T && (M[_] = g[_]);
|
|
6091
6097
|
}
|
|
6092
6098
|
g = M;
|
|
6093
6099
|
}
|
|
6094
|
-
} else if (
|
|
6095
|
-
g = g.join(
|
|
6100
|
+
} else if (y && R(b) && Array.isArray(g))
|
|
6101
|
+
g = g.join(b), g && (g = this.extendTranslation(g, e, t, n));
|
|
6096
6102
|
else {
|
|
6097
6103
|
let w = !1, M = !1;
|
|
6098
|
-
const
|
|
6104
|
+
const x = t.count !== void 0 && !R(t.count), _ = w1.hasDefaultValue(t), T = x ? this.pluralResolver.getSuffix(a, t.count, t) : "", Y = t.ordinal && x ? this.pluralResolver.getSuffix(a, t.count, {
|
|
6099
6105
|
ordinal: !1
|
|
6100
|
-
}) : "", n1 =
|
|
6101
|
-
!this.isValidLookup(g) &&
|
|
6102
|
-
const A = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : g, P =
|
|
6106
|
+
}) : "", n1 = x && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), F = n1 && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${T}`] || t[`defaultValue${Y}`] || t.defaultValue;
|
|
6107
|
+
!this.isValidLookup(g) && _ && (w = !0, g = F), this.isValidLookup(g) || (M = !0, g = c);
|
|
6108
|
+
const A = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && M ? void 0 : g, P = _ && F !== g && this.options.updateMissing;
|
|
6103
6109
|
if (M || w || P) {
|
|
6104
6110
|
if (this.logger.log(P ? "updateKey" : "missingKey", a, l, c, P ? F : g), o) {
|
|
6105
6111
|
const G = this.resolve(c, {
|
|
@@ -6115,10 +6121,10 @@ class w1 extends v1 {
|
|
|
6115
6121
|
W.push(X[G]);
|
|
6116
6122
|
else this.options.saveMissingTo === "all" ? W = this.languageUtils.toResolveHierarchy(t.lng || this.language) : W.push(t.lng || this.language);
|
|
6117
6123
|
const d1 = (G, j, Z) => {
|
|
6118
|
-
const g1 =
|
|
6124
|
+
const g1 = _ && Z !== g ? Z : A;
|
|
6119
6125
|
this.options.missingKeyHandler ? this.options.missingKeyHandler(G, l, j, g1, P, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(G, l, j, g1, P, t), this.emit("missingKey", G, l, j, g);
|
|
6120
6126
|
};
|
|
6121
|
-
this.options.saveMissing && (this.options.saveMissingPlurals &&
|
|
6127
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && x ? W.forEach((G) => {
|
|
6122
6128
|
const j = this.pluralResolver.getSuffixes(G, t);
|
|
6123
6129
|
n1 && t[`defaultValue${this.options.pluralSeparator}zero`] && j.indexOf(`${this.options.pluralSeparator}zero`) < 0 && j.push(`${this.options.pluralSeparator}zero`), j.forEach((Z) => {
|
|
6124
6130
|
d1([G], c + Z, t[`defaultValue${Z}`] || F);
|
|
@@ -6146,13 +6152,13 @@ class w1 extends v1 {
|
|
|
6146
6152
|
...n.interpolation
|
|
6147
6153
|
}
|
|
6148
6154
|
});
|
|
6149
|
-
const a =
|
|
6155
|
+
const a = R(e) && (n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
6150
6156
|
let h;
|
|
6151
6157
|
if (a) {
|
|
6152
6158
|
const g = e.match(this.interpolator.nestingRegexp);
|
|
6153
6159
|
h = g && g.length;
|
|
6154
6160
|
}
|
|
6155
|
-
let u = n.replace && !
|
|
6161
|
+
let u = n.replace && !R(n.replace) ? n.replace : n;
|
|
6156
6162
|
if (this.options.interpolation.defaultVariables && (u = {
|
|
6157
6163
|
...this.options.interpolation.defaultVariables,
|
|
6158
6164
|
...u
|
|
@@ -6166,7 +6172,7 @@ class w1 extends v1 {
|
|
|
6166
6172
|
return o && o[0] === p[0] && !n.context ? (c.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : c.translate(...p, t);
|
|
6167
6173
|
}, n)), n.interpolation && this.interpolator.reset();
|
|
6168
6174
|
}
|
|
6169
|
-
const d = n.postProcess || this.options.postProcess, l =
|
|
6175
|
+
const d = n.postProcess || this.options.postProcess, l = R(d) ? [d] : d;
|
|
6170
6176
|
return e != null && l && l.length && n.applyPostProcessor !== !1 && (e = o2.handle(l, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
6171
6177
|
i18nResolved: {
|
|
6172
6178
|
...s,
|
|
@@ -6177,32 +6183,32 @@ class w1 extends v1 {
|
|
|
6177
6183
|
}
|
|
6178
6184
|
resolve(e) {
|
|
6179
6185
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, n, s, o, c, d;
|
|
6180
|
-
return
|
|
6186
|
+
return R(e) && (e = [e]), e.forEach((l) => {
|
|
6181
6187
|
if (this.isValidLookup(n)) return;
|
|
6182
6188
|
const a = this.extractFromKey(l, t), h = a.key;
|
|
6183
6189
|
s = h;
|
|
6184
6190
|
let u = a.namespaces;
|
|
6185
6191
|
this.options.fallbackNS && (u = u.concat(this.options.fallbackNS));
|
|
6186
|
-
const g = t.count !== void 0 && !
|
|
6192
|
+
const g = t.count !== void 0 && !R(t.count), p = g && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), m = t.context !== void 0 && (R(t.context) || typeof t.context == "number") && t.context !== "", v = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
6187
6193
|
u.forEach((f) => {
|
|
6188
|
-
this.isValidLookup(n) || (d = f, !$1[`${v[0]}-${f}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(d) && ($1[`${v[0]}-${f}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${d}" 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!!!")), v.forEach((
|
|
6194
|
+
this.isValidLookup(n) || (d = f, !$1[`${v[0]}-${f}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(d) && ($1[`${v[0]}-${f}`] = !0, this.logger.warn(`key "${s}" for languages "${v.join(", ")}" won't get resolved as namespace "${d}" 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!!!")), v.forEach((b) => {
|
|
6189
6195
|
if (this.isValidLookup(n)) return;
|
|
6190
|
-
c =
|
|
6191
|
-
const
|
|
6196
|
+
c = b;
|
|
6197
|
+
const y = [h];
|
|
6192
6198
|
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
|
|
6193
|
-
this.i18nFormat.addLookupKeys(
|
|
6199
|
+
this.i18nFormat.addLookupKeys(y, h, b, f, t);
|
|
6194
6200
|
else {
|
|
6195
6201
|
let w;
|
|
6196
|
-
g && (w = this.pluralResolver.getSuffix(
|
|
6197
|
-
const M = `${this.options.pluralSeparator}zero`,
|
|
6198
|
-
if (g && (
|
|
6199
|
-
const
|
|
6200
|
-
|
|
6202
|
+
g && (w = this.pluralResolver.getSuffix(b, t.count, t));
|
|
6203
|
+
const M = `${this.options.pluralSeparator}zero`, x = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
6204
|
+
if (g && (y.push(h + w), t.ordinal && w.indexOf(x) === 0 && y.push(h + w.replace(x, this.options.pluralSeparator)), p && y.push(h + M)), m) {
|
|
6205
|
+
const _ = `${h}${this.options.contextSeparator}${t.context}`;
|
|
6206
|
+
y.push(_), g && (y.push(_ + w), t.ordinal && w.indexOf(x) === 0 && y.push(_ + w.replace(x, this.options.pluralSeparator)), p && y.push(_ + M));
|
|
6201
6207
|
}
|
|
6202
6208
|
}
|
|
6203
6209
|
let H;
|
|
6204
|
-
for (; H =
|
|
6205
|
-
this.isValidLookup(n) || (o = H, n = this.getResource(
|
|
6210
|
+
for (; H = y.pop(); )
|
|
6211
|
+
this.isValidLookup(n) || (o = H, n = this.getResource(b, f, H, t));
|
|
6206
6212
|
}));
|
|
6207
6213
|
});
|
|
6208
6214
|
}), {
|
|
@@ -6222,7 +6228,7 @@ class w1 extends v1 {
|
|
|
6222
6228
|
}
|
|
6223
6229
|
getUsedParamsDetails() {
|
|
6224
6230
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
6225
|
-
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !
|
|
6231
|
+
const t = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], n = e.replace && !R(e.replace);
|
|
6226
6232
|
let s = n ? e.replace : e;
|
|
6227
6233
|
if (n && typeof e.count < "u" && (s.count = e.count), this.options.interpolation.defaultVariables && (s = {
|
|
6228
6234
|
...this.options.interpolation.defaultVariables,
|
|
@@ -6260,7 +6266,7 @@ class F1 {
|
|
|
6260
6266
|
return this.formatLanguageCode(t[0]);
|
|
6261
6267
|
}
|
|
6262
6268
|
formatLanguageCode(e) {
|
|
6263
|
-
if (
|
|
6269
|
+
if (R(e) && e.indexOf("-") > -1) {
|
|
6264
6270
|
if (typeof Intl < "u" && typeof Intl.getCanonicalLocales < "u")
|
|
6265
6271
|
try {
|
|
6266
6272
|
let s = Intl.getCanonicalLocales(e)[0];
|
|
@@ -6296,7 +6302,7 @@ class F1 {
|
|
|
6296
6302
|
}
|
|
6297
6303
|
getFallbackCodes(e, t) {
|
|
6298
6304
|
if (!e) return [];
|
|
6299
|
-
if (typeof e == "function" && (e = e(t)),
|
|
6305
|
+
if (typeof e == "function" && (e = e(t)), R(e) && (e = [e]), Array.isArray(e)) return e;
|
|
6300
6306
|
if (!t) return e.default || [];
|
|
6301
6307
|
let n = e[t];
|
|
6302
6308
|
return n || (n = e[this.getScriptPartFromCode(t)]), n || (n = e[this.formatLanguageCode(t)]), n || (n = e[this.getLanguagePartFromCode(t)]), n || (n = e.default), n || [];
|
|
@@ -6305,7 +6311,7 @@ class F1 {
|
|
|
6305
6311
|
const n = this.getFallbackCodes(t || this.options.fallbackLng || [], e), s = [], o = (c) => {
|
|
6306
6312
|
c && (this.isSupportedCode(c) ? s.push(c) : this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`));
|
|
6307
6313
|
};
|
|
6308
|
-
return
|
|
6314
|
+
return R(e) && (e.indexOf("-") > -1 || e.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(e)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(e)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(e))) : R(e) && o(this.formatLanguageCode(e)), n.forEach((c) => {
|
|
6309
6315
|
s.indexOf(c) < 0 && o(this.formatLanguageCode(c));
|
|
6310
6316
|
}), s;
|
|
6311
6317
|
}
|
|
@@ -6509,8 +6515,8 @@ class Q7 {
|
|
|
6509
6515
|
}
|
|
6510
6516
|
}
|
|
6511
6517
|
const U1 = function(i, e, t) {
|
|
6512
|
-
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o =
|
|
6513
|
-
return !o && s &&
|
|
6518
|
+
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", s = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = T7(i, e, t);
|
|
6519
|
+
return !o && s && R(t) && (o = y1(i, t, n), o === void 0 && (o = y1(e, t, n))), o;
|
|
6514
6520
|
}, _1 = (i) => i.replace(/\$/g, "$$$$");
|
|
6515
6521
|
class q7 {
|
|
6516
6522
|
constructor() {
|
|
@@ -6538,10 +6544,10 @@ class q7 {
|
|
|
6538
6544
|
nestingSuffix: m,
|
|
6539
6545
|
nestingSuffixEscaped: v,
|
|
6540
6546
|
nestingOptionsSeparator: f,
|
|
6541
|
-
maxReplaces:
|
|
6542
|
-
alwaysFormat:
|
|
6547
|
+
maxReplaces: b,
|
|
6548
|
+
alwaysFormat: y
|
|
6543
6549
|
} = e.interpolation;
|
|
6544
|
-
this.escape = t !== void 0 ? t : K7, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? e1(o) : c || "{{", this.suffix = d ? e1(d) : l || "}}", this.formatSeparator = a || ",", this.unescapePrefix = h ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = g ? e1(g) : p || e1("$t("), this.nestingSuffix = m ? e1(m) : v || e1(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces =
|
|
6550
|
+
this.escape = t !== void 0 ? t : K7, this.escapeValue = n !== void 0 ? n : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = o ? e1(o) : c || "{{", this.suffix = d ? e1(d) : l || "}}", this.formatSeparator = a || ",", this.unescapePrefix = h ? "" : u || "-", this.unescapeSuffix = this.unescapePrefix ? "" : h || "", this.nestingPrefix = g ? e1(g) : p || e1("$t("), this.nestingSuffix = m ? e1(m) : v || e1(")"), this.nestingOptionsSeparator = f || ",", this.maxReplaces = b || 1e3, this.alwaysFormat = y !== void 0 ? y : !1, this.resetRegExp();
|
|
6545
6551
|
}
|
|
6546
6552
|
reset() {
|
|
6547
6553
|
this.options && this.init(this.options);
|
|
@@ -6554,12 +6560,12 @@ class q7 {
|
|
|
6554
6560
|
let o, c, d;
|
|
6555
6561
|
const l = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, a = (p) => {
|
|
6556
6562
|
if (p.indexOf(this.formatSeparator) < 0) {
|
|
6557
|
-
const
|
|
6558
|
-
return this.alwaysFormat ? this.format(
|
|
6563
|
+
const b = U1(t, l, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
6564
|
+
return this.alwaysFormat ? this.format(b, void 0, n, {
|
|
6559
6565
|
...s,
|
|
6560
6566
|
...t,
|
|
6561
6567
|
interpolationkey: p
|
|
6562
|
-
}) :
|
|
6568
|
+
}) : b;
|
|
6563
6569
|
}
|
|
6564
6570
|
const m = p.split(this.formatSeparator), v = m.shift().trim(), f = m.join(this.formatSeparator).trim();
|
|
6565
6571
|
return this.format(U1(t, l, v, this.options.keySeparator, this.options.ignoreJSONStructure), f, n, {
|
|
@@ -6582,7 +6588,7 @@ class q7 {
|
|
|
6582
6588
|
if (c = a(m), c === void 0)
|
|
6583
6589
|
if (typeof h == "function") {
|
|
6584
6590
|
const f = h(e, o, s);
|
|
6585
|
-
c =
|
|
6591
|
+
c = R(f) ? f : "";
|
|
6586
6592
|
} else if (s && Object.prototype.hasOwnProperty.call(s, m))
|
|
6587
6593
|
c = "";
|
|
6588
6594
|
else if (u) {
|
|
@@ -6590,7 +6596,7 @@ class q7 {
|
|
|
6590
6596
|
continue;
|
|
6591
6597
|
} else
|
|
6592
6598
|
this.logger.warn(`missed to pass in variable ${m} for interpolating ${e}`), c = "";
|
|
6593
|
-
else !
|
|
6599
|
+
else !R(c) && !this.useRawValueToEscape && (c = K1(c));
|
|
6594
6600
|
const v = p.safeValue(c);
|
|
6595
6601
|
if (e = e.replace(o[0], v), u ? (p.regex.lastIndex += c.length, p.regex.lastIndex -= o[0].length) : p.regex.lastIndex = 0, d++, d >= this.maxReplaces)
|
|
6596
6602
|
break;
|
|
@@ -6621,14 +6627,14 @@ class q7 {
|
|
|
6621
6627
|
let l = [];
|
|
6622
6628
|
c = {
|
|
6623
6629
|
...n
|
|
6624
|
-
}, c = c.replace && !
|
|
6630
|
+
}, c = c.replace && !R(c.replace) ? c.replace : c, c.applyPostProcessor = !1, delete c.defaultValue;
|
|
6625
6631
|
let a = !1;
|
|
6626
6632
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
6627
6633
|
const h = s[1].split(this.formatSeparator).map((u) => u.trim());
|
|
6628
6634
|
s[1] = h.shift(), l = h, a = !0;
|
|
6629
6635
|
}
|
|
6630
|
-
if (o = t(d.call(this, s[1].trim(), c), c), o && s[0] === e && !
|
|
6631
|
-
|
|
6636
|
+
if (o = t(d.call(this, s[1].trim(), c), c), o && s[0] === e && !R(o)) return o;
|
|
6637
|
+
R(o) || (o = K1(o)), o || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), o = ""), a && (o = l.reduce((h, u) => this.format(h, u, n.lng, {
|
|
6632
6638
|
...n,
|
|
6633
6639
|
interpolationkey: s[1].trim()
|
|
6634
6640
|
}), o.trim())), e = e.replace(s[0], o), this.regexp.lastIndex = 0;
|
|
@@ -6835,7 +6841,7 @@ class it extends v1 {
|
|
|
6835
6841
|
let n = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
6836
6842
|
if (!this.backend)
|
|
6837
6843
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), s && s();
|
|
6838
|
-
|
|
6844
|
+
R(e) && (e = this.languageUtils.toResolveHierarchy(e)), R(t) && (t = [t]);
|
|
6839
6845
|
const o = this.queueLoad(e, t, n, s);
|
|
6840
6846
|
if (!o.toLoad.length)
|
|
6841
6847
|
return o.pending.length || s(), null;
|
|
@@ -6920,7 +6926,7 @@ const z1 = () => ({
|
|
|
6920
6926
|
appendNamespaceToCIMode: !1,
|
|
6921
6927
|
overloadTranslationOptionHandler: (i) => {
|
|
6922
6928
|
let e = {};
|
|
6923
|
-
if (typeof i[1] == "object" && (e = i[1]),
|
|
6929
|
+
if (typeof i[1] == "object" && (e = i[1]), R(i[1]) && (e.defaultValue = i[1]), R(i[2]) && (e.tDescription = i[2]), typeof i[2] == "object" || typeof i[3] == "object") {
|
|
6924
6930
|
const t = i[3] || i[2];
|
|
6925
6931
|
Object.keys(t).forEach((n) => {
|
|
6926
6932
|
e[n] = t[n];
|
|
@@ -6941,7 +6947,7 @@ const z1 = () => ({
|
|
|
6941
6947
|
maxReplaces: 1e3,
|
|
6942
6948
|
skipOnVariables: !0
|
|
6943
6949
|
}
|
|
6944
|
-
}), J1 = (i) => (
|
|
6950
|
+
}), J1 = (i) => (R(i.ns) && (i.ns = [i.ns]), R(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), R(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), u1 = () => {
|
|
6945
6951
|
}, nt = (i) => {
|
|
6946
6952
|
Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
|
|
6947
6953
|
typeof i[t] == "function" && (i[t] = i[t].bind(i));
|
|
@@ -6963,7 +6969,7 @@ class h1 extends v1 {
|
|
|
6963
6969
|
init() {
|
|
6964
6970
|
var e = this;
|
|
6965
6971
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, n = arguments.length > 1 ? arguments[1] : void 0;
|
|
6966
|
-
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (
|
|
6972
|
+
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), !t.defaultNS && t.defaultNS !== !1 && t.ns && (R(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
|
|
6967
6973
|
const s = z1();
|
|
6968
6974
|
this.options = {
|
|
6969
6975
|
...s,
|
|
@@ -7023,7 +7029,7 @@ class h1 extends v1 {
|
|
|
7023
7029
|
}
|
|
7024
7030
|
loadResources(e) {
|
|
7025
7031
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : u1;
|
|
7026
|
-
const s =
|
|
7032
|
+
const s = R(e) ? e : this.language;
|
|
7027
7033
|
if (typeof e == "function" && (n = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
7028
7034
|
if (s && s.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return n();
|
|
7029
7035
|
const o = [], c = (d) => {
|
|
@@ -7074,7 +7080,7 @@ class h1 extends v1 {
|
|
|
7074
7080
|
});
|
|
7075
7081
|
}, d = (l) => {
|
|
7076
7082
|
!e && !l && this.services.languageDetector && (l = []);
|
|
7077
|
-
const a =
|
|
7083
|
+
const a = R(l) ? l : this.services.languageUtils.getBestMatchFromCodes(l);
|
|
7078
7084
|
a && (this.language || o(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(a)), this.loadResources(a, (h) => {
|
|
7079
7085
|
c(h, a);
|
|
7080
7086
|
});
|
|
@@ -7098,7 +7104,7 @@ class h1 extends v1 {
|
|
|
7098
7104
|
let p;
|
|
7099
7105
|
return l.keyPrefix && Array.isArray(c) ? p = c.map((m) => `${l.keyPrefix}${g}${m}`) : p = l.keyPrefix ? `${l.keyPrefix}${g}${c}` : c, s.t(p, l);
|
|
7100
7106
|
};
|
|
7101
|
-
return
|
|
7107
|
+
return R(e) ? o.lng = e : o.lngs = e, o.ns = t, o.keyPrefix = n, o;
|
|
7102
7108
|
}
|
|
7103
7109
|
t() {
|
|
7104
7110
|
return this.translator && this.translator.translate(...arguments);
|
|
@@ -7129,7 +7135,7 @@ class h1 extends v1 {
|
|
|
7129
7135
|
}
|
|
7130
7136
|
loadNamespaces(e, t) {
|
|
7131
7137
|
const n = r1();
|
|
7132
|
-
return this.options.ns ? (
|
|
7138
|
+
return this.options.ns ? (R(e) && (e = [e]), e.forEach((s) => {
|
|
7133
7139
|
this.options.ns.indexOf(s) < 0 && this.options.ns.push(s);
|
|
7134
7140
|
}), this.loadResources((s) => {
|
|
7135
7141
|
n.resolve(), t && t(s);
|
|
@@ -7137,7 +7143,7 @@ class h1 extends v1 {
|
|
|
7137
7143
|
}
|
|
7138
7144
|
loadLanguages(e, t) {
|
|
7139
7145
|
const n = r1();
|
|
7140
|
-
|
|
7146
|
+
R(e) && (e = [e]);
|
|
7141
7147
|
const s = this.options.preload || [], o = e.filter((c) => s.indexOf(c) < 0 && this.services.languageUtils.isSupportedCode(c));
|
|
7142
7148
|
return o.length ? (this.options.preload = s.concat(o), this.loadResources((c) => {
|
|
7143
7149
|
n.resolve(), t && t(c);
|
|
@@ -7322,7 +7328,7 @@ const Lt = (i, e) => {
|
|
|
7322
7328
|
} = Q(mt) || {}, o = t || n || pt();
|
|
7323
7329
|
if (o && !o.reportNamespaces && (o.reportNamespaces = new wt()), !o) {
|
|
7324
7330
|
E1("You will need to pass in an i18next instance by using initReactI18next");
|
|
7325
|
-
const w = (
|
|
7331
|
+
const w = (x, _) => J(_) ? _ : at(_) && J(_.defaultValue) ? _.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, M = [w, {}, !1];
|
|
7326
7332
|
return M.t = w, M.i18n = {}, M.ready = !1, M;
|
|
7327
7333
|
}
|
|
7328
7334
|
o.options.react && o.options.react.wait !== void 0 && E1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
@@ -7339,25 +7345,25 @@ const Lt = (i, e) => {
|
|
|
7339
7345
|
const h = (o.isInitialized || o.initializedStoreOnce) && a.every((w) => ot(w, o, c)), u = kt(o, e.lng || null, c.nsMode === "fallback" ? a : a[0], l), g = () => u, p = () => h2(o, e.lng || null, c.nsMode === "fallback" ? a : a[0], l), [m, v] = I(g);
|
|
7340
7346
|
let f = a.join();
|
|
7341
7347
|
e.lng && (f = `${e.lng}${f}`);
|
|
7342
|
-
const
|
|
7348
|
+
const b = Lt(f), y = $(!0);
|
|
7343
7349
|
V(() => {
|
|
7344
7350
|
const {
|
|
7345
7351
|
bindI18n: w,
|
|
7346
7352
|
bindI18nStore: M
|
|
7347
7353
|
} = c;
|
|
7348
|
-
|
|
7349
|
-
|
|
7354
|
+
y.current = !0, !h && !d && (e.lng ? X1(o, e.lng, a, () => {
|
|
7355
|
+
y.current && v(p);
|
|
7350
7356
|
}) : q1(o, a, () => {
|
|
7351
|
-
|
|
7352
|
-
})), h &&
|
|
7353
|
-
const
|
|
7354
|
-
|
|
7357
|
+
y.current && v(p);
|
|
7358
|
+
})), h && b && b !== f && y.current && v(p);
|
|
7359
|
+
const x = () => {
|
|
7360
|
+
y.current && v(p);
|
|
7355
7361
|
};
|
|
7356
|
-
return w && o && o.on(w,
|
|
7357
|
-
|
|
7362
|
+
return w && o && o.on(w, x), M && o && o.store.on(M, x), () => {
|
|
7363
|
+
y.current = !1, w && o && w.split(" ").forEach((_) => o.off(_, x)), M && o && M.split(" ").forEach((_) => o.store.off(_, x));
|
|
7358
7364
|
};
|
|
7359
7365
|
}, [o, f]), V(() => {
|
|
7360
|
-
|
|
7366
|
+
y.current && h && v(g);
|
|
7361
7367
|
}, [o, l, h]);
|
|
7362
7368
|
const H = [m, o, h];
|
|
7363
7369
|
if (H.t = m, H.i18n = o, H.ready = h, h || !h && !d) return H;
|
|
@@ -7394,47 +7400,47 @@ const Vt = i1(
|
|
|
7394
7400
|
clearable: l,
|
|
7395
7401
|
error: a
|
|
7396
7402
|
}, h) => {
|
|
7397
|
-
const [u, g] = I([]), [p, m] = I([]), [v, f] = I(!1), { locale:
|
|
7398
|
-
if (!
|
|
7403
|
+
const [u, g] = I([]), [p, m] = I([]), [v, f] = I(!1), { locale: b, axiosPeople: y } = Q(f2);
|
|
7404
|
+
if (!y)
|
|
7399
7405
|
throw new Error(
|
|
7400
7406
|
`CountrySelect requires "axiosPeople" to fetch counties.
|
|
7401
7407
|
Please provide it via SNMTUiContext.`
|
|
7402
7408
|
);
|
|
7403
|
-
const { t: H } = vt("common", { lng:
|
|
7409
|
+
const { t: H } = vt("common", { lng: b }), w = K(async () => {
|
|
7404
7410
|
f(!0);
|
|
7405
7411
|
try {
|
|
7406
|
-
const
|
|
7407
|
-
m(
|
|
7412
|
+
const x = await y.post("v1/countries/search");
|
|
7413
|
+
m(x == null ? void 0 : x.data.data);
|
|
7408
7414
|
} catch {
|
|
7409
7415
|
g([]);
|
|
7410
7416
|
} finally {
|
|
7411
7417
|
f(!1);
|
|
7412
7418
|
}
|
|
7413
|
-
}, [
|
|
7419
|
+
}, [y]);
|
|
7414
7420
|
V(() => {
|
|
7415
7421
|
w();
|
|
7416
7422
|
}, []), V(() => {
|
|
7417
7423
|
if (e) {
|
|
7418
|
-
const
|
|
7419
|
-
(
|
|
7424
|
+
const x = e.split("-")[1], _ = p.filter(
|
|
7425
|
+
(T) => T.name.includes(x)
|
|
7420
7426
|
);
|
|
7421
|
-
if (
|
|
7422
|
-
const
|
|
7427
|
+
if (_.length) {
|
|
7428
|
+
const T = _.map((Y) => ({
|
|
7423
7429
|
label: Y.name,
|
|
7424
7430
|
value: Y.name
|
|
7425
7431
|
}));
|
|
7426
|
-
n(
|
|
7432
|
+
n(T[0].value);
|
|
7427
7433
|
}
|
|
7428
7434
|
}
|
|
7429
7435
|
}, [e, p, n]), V(() => {
|
|
7430
|
-
const
|
|
7431
|
-
label:
|
|
7432
|
-
value:
|
|
7436
|
+
const x = p.map((_) => ({
|
|
7437
|
+
label: _.name,
|
|
7438
|
+
value: _.name
|
|
7433
7439
|
}));
|
|
7434
|
-
g(
|
|
7440
|
+
g(x);
|
|
7435
7441
|
}, [p]);
|
|
7436
|
-
const M = (
|
|
7437
|
-
|
|
7442
|
+
const M = (x) => {
|
|
7443
|
+
x === null ? (n(""), t && t("")) : (n(x), t && t(""));
|
|
7438
7444
|
};
|
|
7439
7445
|
return /* @__PURE__ */ r("div", { className: "snmt-country-select", children: /* @__PURE__ */ r(
|
|
7440
7446
|
O7,
|
package/dist/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@import"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap";.snmt-flex.inherit{flex-wrap:inherit}.snmt-avatar.ant-avatar{display:grid;border:none;background-color:var(--grey-dark-4);place-items:center}.snmt-avatar.ant-avatar .ant-avatar-string{position:static;display:grid;place-items:center}.snmt-avatar.image.ant-avatar{background-color:transparent}.snmt-avatar-with-label-wrapper{display:grid;grid-template-columns:auto auto;place-items:center}.snmt-checkbox .ant-checkbox+span{padding-inline-start:12px}.ant-checkbox-checked .ant-checkbox-inner:after{transform:rotate(45deg) scale(1) translate(-40%,-60%)}.ant-checkbox-inner{width:20px!important;height:20px!important}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox .ant-checkbox-inner{border-color:var(--grey-light-4);border-radius:5px}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--blue-primary);border-color:var(--blue-primary)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-disabled .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:var(--grey-dark-2)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:var(--blue-primary);border-color:var(--blue-primary)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner:after{background-color:var(--grey-light-0);border:1.5px solid var(--grey-light-0);transform:none;content:"";position:absolute;left:50%;top:50%;width:9px;height:1px;transform:translate(-50%,-50%)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox:not(.ant-checkbox-checked) .ant-checkbox-inner{border-color:var(--blue-dark-1)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--blue-hover);border-color:var(--blue-hover)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox-disabled:not(.ant-checkbox-checked) .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:var(--blue-hover)!important;border-color:var(--blue-hover)!important}.snmt-checkbox-dark .ant-checkbox:not(.ant-checkbox-checked) .ant-checkbox-inner{background-color:var(--grey-dark-4);border:1px solid var(--grey-dark-4)}.snmt-checkbox-dark .ant-checkbox:not(.ant-checkbox-checked):hover .ant-checkbox-inner{background-color:var(--grey-dark-3);border:1px solid var(--grey-dark-3)}.snmt-checkbox-dark .ant-checkbox+span{color:var(--grey-light-2)}.snmt-tag{display:flex;align-items:center;justify-content:center;border-radius:4px;border:none;margin-inline-end:0;padding:2px 6px;height:20px;background:var(--grey-light-2)}.snmt-tag .ant-tag-close-icon{display:flex;align-items:center;margin-inline-start:6px}.snmt-tag:not(.disabled) .ant-tag-close-icon:hover>path{fill:var(--blue-primary);transition:fill .2s ease-in-out}.snmt-tag.medium{padding:4px 8px;height:28px}.snmt-tag.medium .ant-tag-close-icon{margin-inline-start:7.75px}.snmt-tag.disabled{background:var(--grey-light-3)}.clickable{cursor:pointer}:root{--grey-light-0: #ffffff;--grey-light-0-5: #fcfcfd;--grey-light-1: #f7f7f8;--grey-light-2: #f4f4f5;--grey-light-3: #e6e6e9;--grey-light-4: #d0d0d7;--grey-dark-1: #babac4;--grey-dark-2: #8b8b9d;--grey-dark-3: #6f6f83;--grey-dark-4: #35353f;--grey-dark-5: #131314;--blue-primary: #004ed7;--blue-hover: #003899;--blue-light-0-5: #f5f8ff;--blue-light-1: #ebf2ff;--blue-light-2: #deeaff;--blue-light-3: #c3d9ff;--blue-light-4: #a5c6ff;--blue-dark-1: #498bff;--purple-light: #f9f0ff;--purple-dark: #531dab;--cyan-light: #e6fffb;--cyan-dark: #08979c;--magenta-light: #fff0f6;--magenta-dark: #c41d7f;--gold-light: #fefed2;--gold-dark: #faad14;--notification-warning-light: #fff4e8;--notification-warning-dark: #d17100;--notification-success-light: #e0ffdb;--notification-success-dark: #0f6e00;--notification-error-light: #ffecec;--notification-error-dark: #d20000;--notification-error-dark-mode: #e50f00}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.snmt-typography.ant-typography{color:var(--grey-dark-5);font-family:Montserrat,sans-serif;font-style:normal;font-feature-settings:"clig" off,"liga" off;line-height:normal;margin:0!important}.snmt-typography.ant-typography.snmt-typography-h1{font-size:25px;font-weight:700;line-height:128%}.snmt-typography.ant-typography.snmt-typography-h2{font-size:21px;font-weight:600;line-height:132%}.snmt-typography.ant-typography.snmt-typography-h3{font-size:19px;font-weight:600;line-height:124%}.snmt-typography.ant-typography.snmt-typography-h4,.snmt-typography.ant-typography.snmt-typography-h5{font-size:16px;font-weight:600;line-height:124%}.snmt-typography.ant-typography.snmt-typography-body1{font-size:16px;font-weight:500;line-height:150%}.snmt-typography.ant-typography.snmt-typography-body2{font-size:14px;font-weight:500;line-height:144%}.snmt-typography.ant-typography.snmt-typography-body3{font-size:12px;font-weight:600;line-height:120%}.snmt-typography.ant-typography.snmt-typography-body4{font-size:12px;font-weight:500;line-height:120%}.snmt-typography.ant-typography.snmt-typography-button{font-size:14px;font-weight:600;line-height:116%}.snmt-typography.ant-typography.snmt-typography-caption{font-size:10px;font-weight:500;line-height:120%}.snmt-typography.ant-typography.snmt-typography-tag{font-size:9px;font-weight:500;line-height:116%}.snmt-typography.ant-typography.snmt-typography-link{font-size:16px;font-weight:500;line-height:120%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-link1{font-size:16px;font-weight:500;line-height:124%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-link2{font-size:14px;font-weight:500;line-height:124%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-align-center{text-align:center}.snmt-typography.ant-typography.snmt-typography-align-justify{text-align:justify}.snmt-typography.ant-typography.snmt-typography-align-left{text-align:left}.snmt-typography.ant-typography.snmt-typography-align-right{text-align:right}.snmt-typography.collapsed{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snmt-tooltip.ant-tooltip>.ant-tooltip-arrow:before{background-color:var(--grey-dark-4);bottom:-1px}.snmt-tooltip.ant-tooltip>.ant-tooltip-content>.ant-tooltip-inner{background-color:var(--grey-dark-4);padding:12.5px 12px;border-radius:8px;color:var(--grey-light-0);font-family:Montserrat,sans-serif;font-size:10px;font-weight:500;line-height:12px}.snmt-popover:has(.snmt-popover-from-select){z-index:1050!important}.ant-select-selection-overflow>:nth-last-child(2) .snmt-tag{font-family:Montserrat,sans-serif}.ant-select-selection-overflow>:nth-last-child(2):hover .snmt-tag{background:var(--blue-light-1)}.ant-select-selection-overflow>:nth-last-child(2) .snmt-tag:has(.ant-popover-open){color:var(--blue-primary);background:var(--blue-light-2)}.snmt-popover .ant-popover-inner{padding:0}.snmt-popover.padding .ant-popover-inner{padding:16px}.wrapper{cursor:pointer}.snmt-select-1-15-6{width:100%;position:relative;height:48px;font-family:Montserrat,sans-serif;font-weight:500}.snmt-select-1-15-6 .snmt-select-blank .ant-select-selector{border:none!important}.snmt-select-1-15-6 .ant-select{height:100%;pointer-events:none;width:100%;border-radius:8px}.snmt-select-1-15-6 .ant-select .wrapper-suffix-icon{pointer-events:none;display:flex;align-items:center;gap:10px}.snmt-select-1-15-6 .ant-select-focused .ant-select-selector{box-shadow:none!important}.snmt-select-1-15-6 .ant-select-selector{pointer-events:all;border:1px solid var(--grey-light-4)!important;border-radius:8px!important;height:100%!important;padding:8px 16px!important}.snmt-select-1-15-6 .ant-select-selector:hover{border-color:var(--blue-dark-1)!important}.snmt-select-1-15-6 .ant-select-selection-search{margin-inline-start:0px!important;font-size:16px;font-weight:500}.snmt-select-1-15-6 .ant-select-selection-search input{font-size:16px!important;font-weight:500!important;color:var(--grey-dark-5)!important}.snmt-select-1-15-6 .ant-select-arrow div{pointer-events:all;position:relative;z-index:10}.snmt-select-1-15-6 .ant-select-selection-overflow-item-rest .ant-tag-close-icon{display:none}.snmt-select-1-15-6 .ant-select-disabled .snmt-select-1-15-6 .ant-select-arrow div{pointer-events:none!important;cursor:not-allowed!important}.snmt-select-1-15-6.snmt-select-single .ant-select-selection-item{font-family:Montserrat,sans-serif;font-weight:500;color:var(--grey-dark-5);font-size:16px}.snmt-select-1-15-6.snmt-select-single .ant-select-selection-item img{display:none}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selector{padding:9px 48px 9px 16px!important}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item{background-color:var(--grey-light-2)}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item-content{font-family:Montserrat,sans-serif;color:var(--grey-dark-5);font-weight:500;font-size:12px;margin-inline-end:6px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item-content img{display:none}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item .tag-wrapper{margin:0 3px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item-rest .ant-select-selection-item{margin-inline-start:3px;margin-inline-end:0;margin-block:0;padding-inline-start:0;padding-inline-end:0;height:22px;background:transparent}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item-rest .ant-select-selection-item-content{margin:0}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item:first-of-type .tag-wrapper{margin-left:0;margin-right:3px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow .custom-placeholder{position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;font-size:16px;font-weight:500;color:var(--grey-dark-2);font-family:Montserrat,sans-serif;text-align:left}.snmt-select-1-15-6 .ant-select-open .ant-select-selector{box-shadow:none!important;border-color:var(--blue-primary)!important}.snmt-select-1-15-6 .select-arrow{transition:transform .3s ease;position:relative;z-index:2}.snmt-select-1-15-6 .select-arrow-rotated{transition:transform .3s ease;transform:rotate(180deg)}.snmt-select-1-15-6>label{position:absolute;top:calc(50% - 10px);left:18px;width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:16px;font-style:normal;font-weight:500;line-height:normal;-webkit-user-select:none;user-select:none;pointer-events:none;color:var(--grey-dark-2);transition:top .2s cubic-bezier(0,0,.2,1) 0ms,font-size .2s cubic-bezier(0,0,.2,1) 0ms}.snmt-select-1-15-6>label.label-floating{top:-7px;font-size:12px}.snmt-select-1-15-6>label.label-disabled{color:var(--grey-dark-1)}.snmt-select-1-15-6>label.label-loading{padding-left:30px}.snmt-select-1-15-6>label.label-loading.label-floating{padding-left:0}.snmt-select-1-15-6 fieldset{position:absolute;min-width:0;margin:0;padding:0 11px;top:-6px;right:0;bottom:0;left:0;border:1px solid var(--grey-light-4);border-radius:8px;text-align:left;pointer-events:none}.snmt-select-1-15-6 fieldset>legend{max-width:0;height:14px;padding:0;font-size:12px}.snmt-select-1-15-6 fieldset>legend>span{opacity:0!important;padding:0 5px;pointer-events:none;-webkit-user-select:none;user-select:none}.snmt-select-1-15-6 fieldset.fieldset-focused>legend,.snmt-select-1-15-6 fieldset.fieldset-filled>legend,.snmt-select-1-15-6 fieldset.fieldset-disabled>legend{max-width:100%}.snmt-select-1-15-6 fieldset.fieldset-focused{border-color:var(--blue-primary);border-width:2px;color:var(--blue-primary)}.snmt-select-1-15-6 fieldset.fieldset-disabled{border:none;color:var(--grey-dark-1)}.snmt-select-1-15-6 fieldset.fieldset-disabled:not(.fieldset-filled){display:none}.snmt-select-1-15-6 fieldset.fieldset-filled{border-color:var(--grey-light-4);color:var(--grey-dark-2)}.snmt-select-1-15-6 fieldset.fieldset-filled.fieldset-disabled{color:var(--grey-dark-1)}.snmt-select-1-15-6 fieldset.fieldset-error,.snmt-select-1-15-6 fieldset.fieldset-focused.fieldset-error{border-color:var(--notification-error-dark)}.snmt-select-1-15-6:hover:not(.snmt-select-read-only) fieldset:not(.fieldset-disabled):not(.fieldset-error):not(.fieldset-focused){border-color:var(--blue-dark-1)}.snmt-select-1-15-6:hover:not(.snmt-select-read-only)>label.label-floating:not(.label-disabled):not(.label-focused):not(.label-error){color:var(--blue-dark-1)}.snmt-select-1-15-6.snmt-select-read-only .ant-select-selector{background-color:var(--grey-light-2);cursor:not-allowed;pointer-events:none!important}.snmt-select-1-15-6.snmt-select-read-only .ant-select-arrow{pointer-events:all!important;cursor:pointer}.snmt-select-1-15-6.snmt-select-read-only .ant-select{pointer-events:auto!important}.snmt-select-1-15-6.snmt-select-focused fieldset.fieldset-focused:not(.fieldset-disabled):not(.fieldset-error){border-color:var(--blue-primary);border-width:2px}.snmt-select-1-15-6.snmt-select-focused>label.label-floating:not(.label-disabled){color:var(--blue-primary)}.snmt-select-1-15-6>label.label-floating.label-error:not(.label-disabled){color:var(--notification-error-dark)}.ant-select-dropdown{padding:0}.ant-select-dropdown .ant-select-item{border-radius:0}.ant-select-dropdown .ant-select-item-option{padding:14px 16px}.ant-select-dropdown .ant-select-item-option-state{display:none}.ant-select-dropdown .ant-select-item-option-active{background-color:var(--blue-light-1)!important}.ant-select-dropdown .ant-select-item-option-disabled .ant-select-item-option-content span{color:var(--grey-light-4)!important}.ant-select-dropdown .ant-select-item-option-disabled .ant-select-item-option-content img{filter:opacity(.5)}.ant-select-dropdown .ant-select-item-option-content span{font-family:Montserrat,sans-serif;color:var(--grey-dark-5);font-weight:500}.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled){background-color:transparent}.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-content span{font-weight:500!important}.ant-select-dropdown .ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector{background:var(--grey-light-2);border:none!important}.ant-select-dropdown .ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item{color:var(--grey-dark-1)!important}.ant-select-dropdown .rc-virtual-list-holder{overflow-y:auto!important}.ant-select-dropdown .rc-virtual-list-holder::-webkit-scrollbar{width:6px}.ant-select-dropdown .rc-virtual-list-holder::-webkit-scrollbar-thumb{background:var(--grey-light-4);border-radius:10px}.ant-select-dropdown .rc-virtual-list-scrollbar-vertical{visibility:hidden!important}.dropdown-read-only .rc-virtual-list{pointer-events:none}.dropdown-container{position:relative;display:block}.dropdown-container .dropdown-menu{position:relative;z-index:0}.dropdown-container .loading-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;background:var(--grey-light-1);opacity:.9;display:flex;align-items:center;justify-content:center;pointer-events:none}.snmt-select-container .snmt-flex{margin-top:6px}.snmt-loader{display:inline-block;aspect-ratio:1;animation:loader 1s infinite linear}@keyframes loader{33%{background-position:0% 50%,50% 100%,100% 100%}50%{background-position:0% 0%,50% 50%,100% 100%}66%{background-position:0% 0%,50% 0%,100% 50%}to{background-position:0% 0%,50% 0%,100% 0%}}
|
|
1
|
+
@import"https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap";.snmt-flex.inherit{flex-wrap:inherit}.snmt-avatar.ant-avatar{display:grid;border:none;background-color:var(--grey-dark-4);place-items:center;color:var(--grey-light-0)}.snmt-avatar.ant-avatar .ant-avatar-string{position:static;display:grid;place-items:center}.snmt-avatar.image.ant-avatar{background-color:transparent}.snmt-avatar-with-label-wrapper{display:grid;grid-template-columns:auto auto;place-items:center}.snmt-checkbox .ant-checkbox+span{padding-inline-start:12px}.ant-checkbox-checked .ant-checkbox-inner:after{transform:rotate(45deg) scale(1) translate(-40%,-60%)}.ant-checkbox-inner{width:20px!important;height:20px!important}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox .ant-checkbox-inner{border-color:var(--grey-light-4);border-radius:5px}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--blue-primary);border-color:var(--blue-primary)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-disabled .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-disabled .ant-checkbox-inner:after{border-color:var(--grey-dark-2)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:var(--blue-primary);border-color:var(--blue-primary)}.snmt-checkbox-light.ant-checkbox-wrapper .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner:after{background-color:var(--grey-light-0);border:1.5px solid var(--grey-light-0);transform:none;content:"";position:absolute;left:50%;top:50%;width:9px;height:1px;transform:translate(-50%,-50%)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox:not(.ant-checkbox-checked) .ant-checkbox-inner{border-color:var(--blue-dark-1)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--blue-hover);border-color:var(--blue-hover)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox-disabled.ant-checkbox-checked .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox-disabled:not(.ant-checkbox-checked) .ant-checkbox-inner{background-color:var(--grey-light-3);border-color:var(--grey-light-3)}.snmt-checkbox-light.ant-checkbox-wrapper:hover .ant-checkbox.ant-checkbox-indeterminate .ant-checkbox-inner{background-color:var(--blue-hover)!important;border-color:var(--blue-hover)!important}.snmt-checkbox-dark .ant-checkbox:not(.ant-checkbox-checked) .ant-checkbox-inner{background-color:var(--grey-dark-4);border:1px solid var(--grey-dark-4)}.snmt-checkbox-dark .ant-checkbox:not(.ant-checkbox-checked):hover .ant-checkbox-inner{background-color:var(--grey-dark-3);border:1px solid var(--grey-dark-3)}.snmt-checkbox-dark .ant-checkbox+span{color:var(--grey-light-2)}.snmt-tag{display:flex;align-items:center;justify-content:center;border-radius:4px;border:none;margin-inline-end:0;padding:2px 6px;height:20px;background:var(--grey-light-2)}.snmt-tag .ant-tag-close-icon{display:flex;align-items:center;margin-inline-start:6px}.snmt-tag:not(.disabled) .ant-tag-close-icon:hover>path{fill:var(--blue-primary);transition:fill .2s ease-in-out}.snmt-tag.medium{padding:4px 8px;height:28px}.snmt-tag.medium .ant-tag-close-icon{margin-inline-start:7.75px}.snmt-tag.disabled{background:var(--grey-light-3)}.clickable{cursor:pointer}:root{--grey-light-0: #ffffff;--grey-light-0-5: #fcfcfd;--grey-light-1: #f7f7f8;--grey-light-2: #f4f4f5;--grey-light-3: #e6e6e9;--grey-light-4: #d0d0d7;--grey-dark-1: #babac4;--grey-dark-2: #8b8b9d;--grey-dark-3: #6f6f83;--grey-dark-4: #35353f;--grey-dark-5: #131314;--blue-primary: #004ed7;--blue-hover: #003899;--blue-light-0-5: #f5f8ff;--blue-light-1: #ebf2ff;--blue-light-2: #deeaff;--blue-light-3: #c3d9ff;--blue-light-4: #a5c6ff;--blue-dark-1: #498bff;--purple-light: #f9f0ff;--purple-dark: #531dab;--cyan-light: #e6fffb;--cyan-dark: #08979c;--magenta-light: #fff0f6;--magenta-dark: #c41d7f;--gold-light: #fefed2;--gold-dark: #faad14;--notification-warning-light: #fff4e8;--notification-warning-dark: #d17100;--notification-success-light: #e0ffdb;--notification-success-dark: #0f6e00;--notification-error-light: #ffecec;--notification-error-dark: #d20000;--notification-error-dark-mode: #e50f00}html{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.snmt-typography.ant-typography{color:var(--grey-dark-5);font-family:Montserrat,sans-serif;font-style:normal;font-feature-settings:"clig" off,"liga" off;line-height:normal;margin:0!important}.snmt-typography.ant-typography.snmt-typography-h1{font-size:25px;font-weight:700;line-height:128%}.snmt-typography.ant-typography.snmt-typography-h2{font-size:21px;font-weight:600;line-height:132%}.snmt-typography.ant-typography.snmt-typography-h3{font-size:19px;font-weight:600;line-height:124%}.snmt-typography.ant-typography.snmt-typography-h4,.snmt-typography.ant-typography.snmt-typography-h5{font-size:16px;font-weight:600;line-height:124%}.snmt-typography.ant-typography.snmt-typography-body1{font-size:16px;font-weight:500;line-height:150%}.snmt-typography.ant-typography.snmt-typography-body2{font-size:14px;font-weight:500;line-height:144%}.snmt-typography.ant-typography.snmt-typography-body3{font-size:12px;font-weight:600;line-height:120%}.snmt-typography.ant-typography.snmt-typography-body4{font-size:12px;font-weight:500;line-height:120%}.snmt-typography.ant-typography.snmt-typography-button{font-size:14px;font-weight:600;line-height:116%}.snmt-typography.ant-typography.snmt-typography-caption{font-size:10px;font-weight:500;line-height:120%}.snmt-typography.ant-typography.snmt-typography-tag{font-size:9px;font-weight:500;line-height:116%}.snmt-typography.ant-typography.snmt-typography-link{font-size:16px;font-weight:500;line-height:120%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-link1{font-size:16px;font-weight:500;line-height:124%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-link2{font-size:14px;font-weight:500;line-height:124%;text-decoration:underline;cursor:pointer}.snmt-typography.ant-typography.snmt-typography-align-center{text-align:center}.snmt-typography.ant-typography.snmt-typography-align-justify{text-align:justify}.snmt-typography.ant-typography.snmt-typography-align-left{text-align:left}.snmt-typography.ant-typography.snmt-typography-align-right{text-align:right}.snmt-typography.collapsed{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.snmt-tooltip.ant-tooltip>.ant-tooltip-arrow:before{background-color:var(--grey-dark-4);bottom:-1px}.snmt-tooltip.ant-tooltip>.ant-tooltip-content>.ant-tooltip-inner{background-color:var(--grey-dark-4);padding:12.5px 12px;border-radius:8px;color:var(--grey-light-0);font-family:Montserrat,sans-serif;font-size:10px;font-weight:500;line-height:12px}.snmt-popover:has(.snmt-popover-from-select){z-index:1050!important}.ant-select-selection-overflow>:nth-last-child(2) .snmt-tag{font-family:Montserrat,sans-serif}.ant-select-selection-overflow>:nth-last-child(2):hover .snmt-tag{background:var(--blue-light-1)}.ant-select-selection-overflow>:nth-last-child(2) .snmt-tag:has(.ant-popover-open){color:var(--blue-primary);background:var(--blue-light-2)}.snmt-popover .ant-popover-inner{padding:0}.snmt-popover.padding .ant-popover-inner{padding:16px}.wrapper{cursor:pointer}.snmt-select-1-15-6{width:100%;position:relative;height:48px;font-family:Montserrat,sans-serif;font-weight:500}.snmt-select-1-15-6 .snmt-select-blank .ant-select-selector{border:none!important}.snmt-select-1-15-6 .ant-select{height:100%;pointer-events:none;width:100%;border-radius:8px}.snmt-select-1-15-6 .ant-select .wrapper-suffix-icon{pointer-events:none;display:flex;align-items:center;gap:10px}.snmt-select-1-15-6 .ant-select-focused .ant-select-selector{box-shadow:none!important}.snmt-select-1-15-6 .ant-select-selector{pointer-events:all;border:1px solid var(--grey-light-4)!important;border-radius:8px!important;height:100%!important;padding:8px 16px!important}.snmt-select-1-15-6 .ant-select-selector:hover{border-color:var(--blue-dark-1)!important}.snmt-select-1-15-6 .ant-select-selection-search{margin-inline-start:0px!important;font-size:16px;font-weight:500}.snmt-select-1-15-6 .ant-select-selection-search input{font-size:16px!important;font-weight:500!important;color:var(--grey-dark-5)!important}.snmt-select-1-15-6 .ant-select-arrow div{pointer-events:all;position:relative;z-index:10}.snmt-select-1-15-6 .ant-select-selection-overflow-item-rest .ant-tag-close-icon{display:none}.snmt-select-1-15-6 .ant-select-disabled .snmt-select-1-15-6 .ant-select-arrow div{pointer-events:none!important;cursor:not-allowed!important}.snmt-select-1-15-6.snmt-select-single .ant-select-selection-item{font-family:Montserrat,sans-serif;font-weight:500;color:var(--grey-dark-5);font-size:16px}.snmt-select-1-15-6.snmt-select-single .ant-select-selection-item img{display:none}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selector{padding:9px 48px 9px 16px!important}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item{background-color:var(--grey-light-2)}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item-content{font-family:Montserrat,sans-serif;color:var(--grey-dark-5);font-weight:500;font-size:12px;margin-inline-end:6px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-item-content img{display:none}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item .tag-wrapper{margin:0 3px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item-rest .ant-select-selection-item{margin-inline-start:3px;margin-inline-end:0;margin-block:0;padding-inline-start:0;padding-inline-end:0;height:22px;background:transparent}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item-rest .ant-select-selection-item-content{margin:0}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow-item:first-of-type .tag-wrapper{margin-left:0;margin-right:3px}.snmt-select-1-15-6 .ant-select-multiple .ant-select-selection-overflow .custom-placeholder{position:absolute;top:50%;transform:translateY(-50%);transition:all .3s;font-size:16px;font-weight:500;color:var(--grey-dark-2);font-family:Montserrat,sans-serif;text-align:left}.snmt-select-1-15-6 .ant-select-open .ant-select-selector{box-shadow:none!important;border-color:var(--blue-primary)!important}.snmt-select-1-15-6 .select-arrow{transition:transform .3s ease;position:relative;z-index:2}.snmt-select-1-15-6 .select-arrow-rotated{transition:transform .3s ease;transform:rotate(180deg)}.snmt-select-1-15-6>label{position:absolute;top:calc(50% - 10px);left:18px;width:calc(100% - 32px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;font-size:16px;font-style:normal;font-weight:500;line-height:normal;-webkit-user-select:none;user-select:none;pointer-events:none;color:var(--grey-dark-2);transition:top .2s cubic-bezier(0,0,.2,1) 0ms,font-size .2s cubic-bezier(0,0,.2,1) 0ms}.snmt-select-1-15-6>label.label-floating{top:-7px;font-size:12px}.snmt-select-1-15-6>label.label-disabled{color:var(--grey-dark-1)}.snmt-select-1-15-6>label.label-loading{padding-left:30px}.snmt-select-1-15-6>label.label-loading.label-floating{padding-left:0}.snmt-select-1-15-6 fieldset{position:absolute;min-width:0;margin:0;padding:0 11px;top:-6px;right:0;bottom:0;left:0;border:1px solid var(--grey-light-4);border-radius:8px;text-align:left;pointer-events:none}.snmt-select-1-15-6 fieldset>legend{max-width:0;height:14px;padding:0;font-size:12px}.snmt-select-1-15-6 fieldset>legend>span{opacity:0!important;padding:0 5px;pointer-events:none;-webkit-user-select:none;user-select:none}.snmt-select-1-15-6 fieldset.fieldset-focused>legend,.snmt-select-1-15-6 fieldset.fieldset-filled>legend,.snmt-select-1-15-6 fieldset.fieldset-disabled>legend{max-width:100%}.snmt-select-1-15-6 fieldset.fieldset-focused{border-color:var(--blue-primary);border-width:2px;color:var(--blue-primary)}.snmt-select-1-15-6 fieldset.fieldset-disabled{border:none;color:var(--grey-dark-1)}.snmt-select-1-15-6 fieldset.fieldset-disabled:not(.fieldset-filled){display:none}.snmt-select-1-15-6 fieldset.fieldset-filled{border-color:var(--grey-light-4);color:var(--grey-dark-2)}.snmt-select-1-15-6 fieldset.fieldset-filled.fieldset-disabled{color:var(--grey-dark-1)}.snmt-select-1-15-6 fieldset.fieldset-error,.snmt-select-1-15-6 fieldset.fieldset-focused.fieldset-error{border-color:var(--notification-error-dark)}.snmt-select-1-15-6:hover:not(.snmt-select-read-only) fieldset:not(.fieldset-disabled):not(.fieldset-error):not(.fieldset-focused){border-color:var(--blue-dark-1)}.snmt-select-1-15-6:hover:not(.snmt-select-read-only)>label.label-floating:not(.label-disabled):not(.label-focused):not(.label-error){color:var(--blue-dark-1)}.snmt-select-1-15-6.snmt-select-read-only .ant-select-selector{background-color:var(--grey-light-2);cursor:not-allowed;pointer-events:none!important}.snmt-select-1-15-6.snmt-select-read-only .ant-select-arrow{pointer-events:all!important;cursor:pointer}.snmt-select-1-15-6.snmt-select-read-only .ant-select{pointer-events:auto!important}.snmt-select-1-15-6.snmt-select-focused fieldset.fieldset-focused:not(.fieldset-disabled):not(.fieldset-error){border-color:var(--blue-primary);border-width:2px}.snmt-select-1-15-6.snmt-select-focused>label.label-floating:not(.label-disabled){color:var(--blue-primary)}.snmt-select-1-15-6>label.label-floating.label-error:not(.label-disabled){color:var(--notification-error-dark)}.ant-select-dropdown{padding:0}.ant-select-dropdown .ant-select-item{border-radius:0}.ant-select-dropdown .ant-select-item-option{padding:14px 16px}.ant-select-dropdown .ant-select-item-option-state{display:none}.ant-select-dropdown .ant-select-item-option-active{background-color:var(--blue-light-1)!important}.ant-select-dropdown .ant-select-item-option-disabled .ant-select-item-option-content span{color:var(--grey-light-4)!important}.ant-select-dropdown .ant-select-item-option-disabled .ant-select-item-option-content img{filter:opacity(.5)}.ant-select-dropdown .ant-select-item-option-content span{font-family:Montserrat,sans-serif;color:var(--grey-dark-5);font-weight:500}.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled){background-color:transparent}.ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) .ant-select-item-option-content span{font-weight:500!important}.ant-select-dropdown .ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector{background:var(--grey-light-2);border:none!important}.ant-select-dropdown .ant-select-outlined.ant-select-disabled:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-item{color:var(--grey-dark-1)!important}.ant-select-dropdown .rc-virtual-list-holder{overflow-y:auto!important}.ant-select-dropdown .rc-virtual-list-holder::-webkit-scrollbar{width:6px}.ant-select-dropdown .rc-virtual-list-holder::-webkit-scrollbar-thumb{background:var(--grey-light-4);border-radius:10px}.ant-select-dropdown .rc-virtual-list-scrollbar-vertical{visibility:hidden!important}.dropdown-read-only .rc-virtual-list{pointer-events:none}.dropdown-container{position:relative;display:block}.dropdown-container .dropdown-menu{position:relative;z-index:0}.dropdown-container .loading-overlay{position:absolute;top:0;right:0;bottom:0;left:0;z-index:10;background:var(--grey-light-1);opacity:.9;display:flex;align-items:center;justify-content:center;pointer-events:none}.snmt-select-container .snmt-flex{margin-top:6px}.snmt-loader{display:inline-block;aspect-ratio:1;animation:loader 1s infinite linear}@keyframes loader{33%{background-position:0% 50%,50% 100%,100% 100%}50%{background-position:0% 0%,50% 50%,100% 100%}66%{background-position:0% 0%,50% 0%,100% 50%}to{background-position:0% 0%,50% 0%,100% 0%}}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snmt-react-ui/country-select",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.8.
|
|
4
|
+
"version": "2.8.23",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/country-select.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"build": "tsc && vite build"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@snmt-react-ui/city-select": "^2.8.
|
|
21
|
+
"@snmt-react-ui/city-select": "^2.8.23",
|
|
22
22
|
"@snmt-react-ui/core": "^2.8.1",
|
|
23
23
|
"@snmt-react-ui/flex": "^1.7.5",
|
|
24
24
|
"i18next": "^23.11.5",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"antd": "^5.18.3"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "a2a23ce7f77bfdcf9aa395ab8c43b465ad7e73ff"
|
|
31
31
|
}
|