@snmt-react-ui/city-select 2.9.0 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/city-select.js +377 -379
- package/package.json +3 -3
package/dist/city-select.js
CHANGED
|
@@ -3,22 +3,22 @@ var R2 = (s, e, t) => e in s ? M2(s, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var $1 = (s, e, t) => R2(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { jsx as o, Fragment as t1, jsxs as g } from "react/jsx-runtime";
|
|
6
|
-
import { COLORS as c, SNMTUiContext as
|
|
7
|
-
import { forwardRef as
|
|
8
|
-
import { Select as V2, Tag as
|
|
6
|
+
import { COLORS as c, SNMTUiContext as C1 } from "@snmt-react-ui/core";
|
|
7
|
+
import { forwardRef as r1, useState as A, useRef as O, useCallback as I, useEffect as K, useMemo as T1, useImperativeHandle as d1, useContext as n1, createContext as d2 } from "react";
|
|
8
|
+
import { Select as V2, Tag as W1, Flex as Z2, Checkbox as H2, Avatar as _2, Typography as v1, Popover as b2 } from "antd";
|
|
9
9
|
var y2 = Object.defineProperty, E2 = (s, e, t) => e in s ? y2(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, A2 = (s, e, t) => E2(s, e + "", t), D2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
10
|
-
function
|
|
10
|
+
function K2() {
|
|
11
11
|
if (console && console.warn) {
|
|
12
12
|
for (var s = arguments.length, e = new Array(s), t = 0; t < s; t++)
|
|
13
13
|
e[t] = arguments[t];
|
|
14
|
-
|
|
14
|
+
h1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
const P1 = {};
|
|
18
|
-
function
|
|
18
|
+
function O1() {
|
|
19
19
|
for (var s = arguments.length, e = new Array(s), t = 0; t < s; t++)
|
|
20
20
|
e[t] = arguments[t];
|
|
21
|
-
|
|
21
|
+
h1(e[0]) && P1[e[0]] || (h1(e[0]) && (P1[e[0]] = /* @__PURE__ */ new Date()), K2(...e));
|
|
22
22
|
}
|
|
23
23
|
const g2 = (s, e) => () => {
|
|
24
24
|
if (s.isInitialized)
|
|
@@ -34,10 +34,10 @@ const g2 = (s, e) => () => {
|
|
|
34
34
|
}, F1 = (s, e, t) => {
|
|
35
35
|
s.loadNamespaces(e, g2(s, t));
|
|
36
36
|
}, U1 = (s, e, t, i) => {
|
|
37
|
-
|
|
37
|
+
h1(t) && (t = [t]), t.forEach((n) => {
|
|
38
38
|
s.options.ns.indexOf(n) < 0 && s.options.ns.push(n);
|
|
39
39
|
}), s.loadLanguages(e, g2(s, i));
|
|
40
|
-
},
|
|
40
|
+
}, B2 = function(s, e) {
|
|
41
41
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
42
42
|
const i = e.languages[0], n = e.options ? e.options.fallbackLng : !1, h = e.languages[e.languages.length - 1];
|
|
43
43
|
if (i.toLowerCase() === "cimode") return !0;
|
|
@@ -48,13 +48,13 @@ const g2 = (s, e) => () => {
|
|
|
48
48
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !C(e.isLanguageChangingTo, s) ? !1 : !!(e.hasResourceBundle(i, s) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || C(i, s) && (!n || C(h, s)));
|
|
49
49
|
}, S2 = function(s, e) {
|
|
50
50
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
51
|
-
return !e.languages || !e.languages.length ? (
|
|
51
|
+
return !e.languages || !e.languages.length ? (O1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(s, {
|
|
52
52
|
lng: t.lng,
|
|
53
53
|
precheck: (i, n) => {
|
|
54
54
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && i.services.backendConnector.backend && i.isLanguageChangingTo && !n(i.isLanguageChangingTo, s)) return !1;
|
|
55
55
|
}
|
|
56
|
-
}) :
|
|
57
|
-
},
|
|
56
|
+
}) : B2(s, e, t);
|
|
57
|
+
}, h1 = (s) => typeof s == "string", G2 = (s) => typeof s == "object" && s !== null, O2 = /&(?: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
|
"&": "&",
|
|
60
60
|
"<": "<",
|
|
@@ -100,24 +100,24 @@ class U2 {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
const z2 = (s, e) => {
|
|
103
|
-
const t =
|
|
104
|
-
return
|
|
103
|
+
const t = O();
|
|
104
|
+
return K(() => {
|
|
105
105
|
t.current = s;
|
|
106
106
|
}, [s, e]), t.current;
|
|
107
|
-
}, u2 = (s, e, t, i) => s.getFixedT(e, t, i), J2 = (s, e, t, i) =>
|
|
107
|
+
}, u2 = (s, e, t, i) => s.getFixedT(e, t, i), J2 = (s, e, t, i) => I(u2(s, e, t, i), [s, e, t, i]), q2 = function(s) {
|
|
108
108
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
109
109
|
const {
|
|
110
110
|
i18n: t
|
|
111
111
|
} = e, {
|
|
112
112
|
i18n: i,
|
|
113
113
|
defaultNS: n
|
|
114
|
-
} =
|
|
114
|
+
} = n1(F2) || {}, h = t || i || P2();
|
|
115
115
|
if (h && !h.reportNamespaces && (h.reportNamespaces = new U2()), !h) {
|
|
116
|
-
|
|
117
|
-
const
|
|
118
|
-
return k.t =
|
|
116
|
+
O1("You will need to pass in an i18next instance by using initReactI18next");
|
|
117
|
+
const x = (R, v) => h1(v) ? v : G2(v) && h1(v.defaultValue) ? v.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, k = [x, {}, !1];
|
|
118
|
+
return k.t = x, k.i18n = {}, k.ready = !1, k;
|
|
119
119
|
}
|
|
120
|
-
h.options.react && h.options.react.wait !== void 0 &&
|
|
120
|
+
h.options.react && h.options.react.wait !== void 0 && O1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
121
121
|
const C = {
|
|
122
122
|
...$2(),
|
|
123
123
|
...h.options.react,
|
|
@@ -127,14 +127,14 @@ const z2 = (s, e) => {
|
|
|
127
127
|
keyPrefix: r
|
|
128
128
|
} = C;
|
|
129
129
|
let l = s;
|
|
130
|
-
l =
|
|
131
|
-
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((
|
|
130
|
+
l = h1(l) ? [l] : l || ["translation"], h.reportNamespaces.addUsedNamespaces && h.reportNamespaces.addUsedNamespaces(l);
|
|
131
|
+
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((x) => S2(x, h, C)), p = J2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => u2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [f, m] = A(u);
|
|
132
132
|
let L = l.join();
|
|
133
133
|
e.lng && (L = `${e.lng}${L}`);
|
|
134
|
-
const M = z2(L), Z =
|
|
135
|
-
|
|
134
|
+
const M = z2(L), Z = O(!0);
|
|
135
|
+
K(() => {
|
|
136
136
|
const {
|
|
137
|
-
bindI18n:
|
|
137
|
+
bindI18n: x,
|
|
138
138
|
bindI18nStore: k
|
|
139
139
|
} = C;
|
|
140
140
|
Z.current = !0, !a && !d && (e.lng ? U1(h, e.lng, l, () => {
|
|
@@ -145,16 +145,16 @@ const z2 = (s, e) => {
|
|
|
145
145
|
const R = () => {
|
|
146
146
|
Z.current && m(w);
|
|
147
147
|
};
|
|
148
|
-
return
|
|
149
|
-
Z.current = !1,
|
|
148
|
+
return x && h && h.on(x, R), k && h && h.store.on(k, R), () => {
|
|
149
|
+
Z.current = !1, x && h && x.split(" ").forEach((v) => h.off(v, R)), k && h && k.split(" ").forEach((v) => h.store.off(v, R));
|
|
150
150
|
};
|
|
151
|
-
}, [h, L]),
|
|
151
|
+
}, [h, L]), K(() => {
|
|
152
152
|
Z.current && a && m(u);
|
|
153
153
|
}, [h, r, a]);
|
|
154
154
|
const D = [f, h, a];
|
|
155
155
|
if (D.t = f, D.i18n = h, D.ready = a, a || !a && !d) return D;
|
|
156
|
-
throw new Promise((
|
|
157
|
-
e.lng ? U1(h, e.lng, l, () =>
|
|
156
|
+
throw new Promise((x) => {
|
|
157
|
+
e.lng ? U1(h, e.lng, l, () => x()) : F1(h, l, () => x());
|
|
158
158
|
});
|
|
159
159
|
}, L1 = ({
|
|
160
160
|
children: s,
|
|
@@ -183,7 +183,7 @@ const z2 = (s, e) => {
|
|
|
183
183
|
h2: 2,
|
|
184
184
|
h3: 3,
|
|
185
185
|
h4: 4
|
|
186
|
-
}, z1 =
|
|
186
|
+
}, z1 = r1(
|
|
187
187
|
({
|
|
188
188
|
align: s = "inherit",
|
|
189
189
|
variant: e = "body1",
|
|
@@ -195,10 +195,10 @@ const z2 = (s, e) => {
|
|
|
195
195
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
196
196
|
trim: d = !1
|
|
197
197
|
}, r) => {
|
|
198
|
-
const l =
|
|
199
|
-
|
|
198
|
+
const l = O(null);
|
|
199
|
+
d1(r, () => l.current);
|
|
200
200
|
const [a, p] = A(!1);
|
|
201
|
-
|
|
201
|
+
K(() => {
|
|
202
202
|
var m;
|
|
203
203
|
if (!d) return;
|
|
204
204
|
const L = () => {
|
|
@@ -275,7 +275,7 @@ const z2 = (s, e) => {
|
|
|
275
275
|
h2: 2,
|
|
276
276
|
h3: 3,
|
|
277
277
|
h4: 4
|
|
278
|
-
}, o5 =
|
|
278
|
+
}, o5 = r1(
|
|
279
279
|
({
|
|
280
280
|
align: s = "inherit",
|
|
281
281
|
variant: e = "body1",
|
|
@@ -287,10 +287,10 @@ const z2 = (s, e) => {
|
|
|
287
287
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
288
288
|
trim: d = !1
|
|
289
289
|
}, r) => {
|
|
290
|
-
const l =
|
|
291
|
-
|
|
290
|
+
const l = O(null);
|
|
291
|
+
d1(r, () => l.current);
|
|
292
292
|
const [a, p] = A(!1);
|
|
293
|
-
|
|
293
|
+
K(() => {
|
|
294
294
|
var m;
|
|
295
295
|
if (!d) return;
|
|
296
296
|
const L = () => {
|
|
@@ -328,10 +328,10 @@ const z2 = (s, e) => {
|
|
|
328
328
|
disableUncheck: h = !1
|
|
329
329
|
}) => {
|
|
330
330
|
const [C, d] = A(s), [r, l] = A(e);
|
|
331
|
-
|
|
331
|
+
K(() => {
|
|
332
332
|
d(s), l(e);
|
|
333
333
|
}, [s, e]);
|
|
334
|
-
const { theme: a } =
|
|
334
|
+
const { theme: a } = n1(C1);
|
|
335
335
|
return /* @__PURE__ */ o(
|
|
336
336
|
H2,
|
|
337
337
|
{
|
|
@@ -1350,7 +1350,7 @@ const z2 = (s, e) => {
|
|
|
1350
1350
|
)
|
|
1351
1351
|
]
|
|
1352
1352
|
}
|
|
1353
|
-
),
|
|
1353
|
+
), K5 = ({
|
|
1354
1354
|
width: s = 9,
|
|
1355
1355
|
height: e = 5,
|
|
1356
1356
|
color: t = "#001E52",
|
|
@@ -1376,7 +1376,7 @@ const z2 = (s, e) => {
|
|
|
1376
1376
|
}
|
|
1377
1377
|
)
|
|
1378
1378
|
}
|
|
1379
|
-
),
|
|
1379
|
+
), B5 = ({
|
|
1380
1380
|
width: s = 20,
|
|
1381
1381
|
height: e = 20,
|
|
1382
1382
|
color: t = "#F2F2F7",
|
|
@@ -2609,7 +2609,7 @@ const z2 = (s, e) => {
|
|
|
2609
2609
|
disabled: h = !1,
|
|
2610
2610
|
onClick: C
|
|
2611
2611
|
}) => {
|
|
2612
|
-
const { theme: d } =
|
|
2612
|
+
const { theme: d } = n1(C1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
2613
2613
|
return /* @__PURE__ */ o(t1, { children: (() => {
|
|
2614
2614
|
switch (s) {
|
|
2615
2615
|
case "nextIcon":
|
|
@@ -2689,7 +2689,7 @@ const z2 = (s, e) => {
|
|
|
2689
2689
|
onClick: l
|
|
2690
2690
|
});
|
|
2691
2691
|
case "selectArrowIcon":
|
|
2692
|
-
return
|
|
2692
|
+
return K5({
|
|
2693
2693
|
width: e,
|
|
2694
2694
|
height: t,
|
|
2695
2695
|
color: r,
|
|
@@ -2697,7 +2697,7 @@ const z2 = (s, e) => {
|
|
|
2697
2697
|
onClick: l
|
|
2698
2698
|
});
|
|
2699
2699
|
case "expandArrowIcon":
|
|
2700
|
-
return
|
|
2700
|
+
return B5({
|
|
2701
2701
|
width: e,
|
|
2702
2702
|
height: t,
|
|
2703
2703
|
color: r,
|
|
@@ -2791,7 +2791,7 @@ const z2 = (s, e) => {
|
|
|
2791
2791
|
h2: 2,
|
|
2792
2792
|
h3: 3,
|
|
2793
2793
|
h4: 4
|
|
2794
|
-
}, k7 =
|
|
2794
|
+
}, k7 = r1(
|
|
2795
2795
|
({
|
|
2796
2796
|
align: s = "inherit",
|
|
2797
2797
|
variant: e = "body1",
|
|
@@ -2803,10 +2803,10 @@ const z2 = (s, e) => {
|
|
|
2803
2803
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
2804
2804
|
trim: d = !1
|
|
2805
2805
|
}, r) => {
|
|
2806
|
-
const l =
|
|
2807
|
-
|
|
2806
|
+
const l = O(null);
|
|
2807
|
+
d1(r, () => l.current);
|
|
2808
2808
|
const [a, p] = A(!1);
|
|
2809
|
-
|
|
2809
|
+
K(() => {
|
|
2810
2810
|
var m;
|
|
2811
2811
|
if (!d) return;
|
|
2812
2812
|
const L = () => {
|
|
@@ -3306,7 +3306,7 @@ const z2 = (s, e) => {
|
|
|
3306
3306
|
)
|
|
3307
3307
|
]
|
|
3308
3308
|
}
|
|
3309
|
-
),
|
|
3309
|
+
), K7 = ({
|
|
3310
3310
|
width: s = 20,
|
|
3311
3311
|
height: e = 20,
|
|
3312
3312
|
color: t = c.GREY_DARK_5,
|
|
@@ -3346,7 +3346,7 @@ const z2 = (s, e) => {
|
|
|
3346
3346
|
)
|
|
3347
3347
|
]
|
|
3348
3348
|
}
|
|
3349
|
-
),
|
|
3349
|
+
), B7 = ({
|
|
3350
3350
|
width: s = 20,
|
|
3351
3351
|
height: e = 20,
|
|
3352
3352
|
color: t = c.GREY_DARK_5,
|
|
@@ -5092,7 +5092,7 @@ const z2 = (s, e) => {
|
|
|
5092
5092
|
disabled: h = !1,
|
|
5093
5093
|
onClick: C
|
|
5094
5094
|
}) => {
|
|
5095
|
-
const { theme: d } =
|
|
5095
|
+
const { theme: d } = n1(C1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
5096
5096
|
return /* @__PURE__ */ o(t1, { children: (() => {
|
|
5097
5097
|
switch (s) {
|
|
5098
5098
|
case "nextIcon":
|
|
@@ -5120,9 +5120,9 @@ const z2 = (s, e) => {
|
|
|
5120
5120
|
case "filter":
|
|
5121
5121
|
return D7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5122
5122
|
case "attention":
|
|
5123
|
-
return B7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5124
|
-
case "users":
|
|
5125
5123
|
return K7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5124
|
+
case "users":
|
|
5125
|
+
return B7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5126
5126
|
case "mySkillsMatrix":
|
|
5127
5127
|
return S7({
|
|
5128
5128
|
width: e,
|
|
@@ -5281,7 +5281,7 @@ const z2 = (s, e) => {
|
|
|
5281
5281
|
h || i == null || i();
|
|
5282
5282
|
};
|
|
5283
5283
|
return /* @__PURE__ */ o(
|
|
5284
|
-
|
|
5284
|
+
W1,
|
|
5285
5285
|
{
|
|
5286
5286
|
className: `snmt-tag ${t} ${h ? "disabled" : ""}`,
|
|
5287
5287
|
closeIcon: /* @__PURE__ */ o(
|
|
@@ -5312,7 +5312,7 @@ const z2 = (s, e) => {
|
|
|
5312
5312
|
h2: 2,
|
|
5313
5313
|
h3: 3,
|
|
5314
5314
|
h4: 4
|
|
5315
|
-
},
|
|
5315
|
+
}, K0 = r1(
|
|
5316
5316
|
({
|
|
5317
5317
|
align: s = "inherit",
|
|
5318
5318
|
variant: e = "body1",
|
|
@@ -5324,10 +5324,10 @@ const z2 = (s, e) => {
|
|
|
5324
5324
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
5325
5325
|
trim: d = !1
|
|
5326
5326
|
}, r) => {
|
|
5327
|
-
const l =
|
|
5328
|
-
|
|
5327
|
+
const l = O(null);
|
|
5328
|
+
d1(r, () => l.current);
|
|
5329
5329
|
const [a, p] = A(!1);
|
|
5330
|
-
|
|
5330
|
+
K(() => {
|
|
5331
5331
|
var m;
|
|
5332
5332
|
if (!d) return;
|
|
5333
5333
|
const L = () => {
|
|
@@ -5356,7 +5356,7 @@ const z2 = (s, e) => {
|
|
|
5356
5356
|
};
|
|
5357
5357
|
return u ? /* @__PURE__ */ o(E0, { level: D0[e], ...f, children: i }) : /* @__PURE__ */ o(A0, { ...f, children: i });
|
|
5358
5358
|
}
|
|
5359
|
-
),
|
|
5359
|
+
), B0 = ({
|
|
5360
5360
|
children: s,
|
|
5361
5361
|
content: e,
|
|
5362
5362
|
isOpen: t,
|
|
@@ -5386,7 +5386,7 @@ const z2 = (s, e) => {
|
|
|
5386
5386
|
h2: 2,
|
|
5387
5387
|
h3: 3,
|
|
5388
5388
|
h4: 4
|
|
5389
|
-
}, p2 =
|
|
5389
|
+
}, p2 = r1(
|
|
5390
5390
|
({
|
|
5391
5391
|
align: s = "inherit",
|
|
5392
5392
|
variant: e = "body1",
|
|
@@ -5398,10 +5398,10 @@ const z2 = (s, e) => {
|
|
|
5398
5398
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
5399
5399
|
trim: d = !1
|
|
5400
5400
|
}, r) => {
|
|
5401
|
-
const l =
|
|
5402
|
-
|
|
5401
|
+
const l = O(null);
|
|
5402
|
+
d1(r, () => l.current);
|
|
5403
5403
|
const [a, p] = A(!1);
|
|
5404
|
-
|
|
5404
|
+
K(() => {
|
|
5405
5405
|
var m;
|
|
5406
5406
|
if (!d) return;
|
|
5407
5407
|
const L = () => {
|
|
@@ -7127,7 +7127,7 @@ const z2 = (s, e) => {
|
|
|
7127
7127
|
}
|
|
7128
7128
|
)
|
|
7129
7129
|
}
|
|
7130
|
-
),
|
|
7130
|
+
), K9 = ({
|
|
7131
7131
|
className: s,
|
|
7132
7132
|
color: e = c.GREY_DARK_5,
|
|
7133
7133
|
height: t = 24,
|
|
@@ -7166,7 +7166,7 @@ const z2 = (s, e) => {
|
|
|
7166
7166
|
)
|
|
7167
7167
|
]
|
|
7168
7168
|
}
|
|
7169
|
-
),
|
|
7169
|
+
), B9 = ({
|
|
7170
7170
|
className: s,
|
|
7171
7171
|
color: e = c.GREY_DARK_5,
|
|
7172
7172
|
height: t = 20,
|
|
@@ -7678,7 +7678,7 @@ const z2 = (s, e) => {
|
|
|
7678
7678
|
}
|
|
7679
7679
|
)
|
|
7680
7680
|
}
|
|
7681
|
-
),
|
|
7681
|
+
), _1 = ({
|
|
7682
7682
|
name: s,
|
|
7683
7683
|
width: e,
|
|
7684
7684
|
height: t,
|
|
@@ -7687,7 +7687,7 @@ const z2 = (s, e) => {
|
|
|
7687
7687
|
disabled: h = !1,
|
|
7688
7688
|
onClick: C
|
|
7689
7689
|
}) => {
|
|
7690
|
-
const { theme: d } =
|
|
7690
|
+
const { theme: d } = n1(C1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
7691
7691
|
return /* @__PURE__ */ o(t1, { children: (() => {
|
|
7692
7692
|
switch (s) {
|
|
7693
7693
|
case "nextIcon":
|
|
@@ -7831,9 +7831,9 @@ const z2 = (s, e) => {
|
|
|
7831
7831
|
case "back":
|
|
7832
7832
|
return D9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7833
7833
|
case "bell":
|
|
7834
|
-
return B9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7835
|
-
case "copy":
|
|
7836
7834
|
return K9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7835
|
+
case "copy":
|
|
7836
|
+
return B9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7837
7837
|
case "contract":
|
|
7838
7838
|
return S9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7839
7839
|
case "resourceManager":
|
|
@@ -7880,7 +7880,7 @@ const z2 = (s, e) => {
|
|
|
7880
7880
|
purple: c.PURPLE_LIGHT
|
|
7881
7881
|
};
|
|
7882
7882
|
return /* @__PURE__ */ o(
|
|
7883
|
-
|
|
7883
|
+
W1,
|
|
7884
7884
|
{
|
|
7885
7885
|
className: `snmt-regular-badge snmt-regular-badge--${t}`,
|
|
7886
7886
|
style: {
|
|
@@ -7898,7 +7898,7 @@ const z2 = (s, e) => {
|
|
|
7898
7898
|
}) => {
|
|
7899
7899
|
const n = {
|
|
7900
7900
|
approved: /* @__PURE__ */ o(
|
|
7901
|
-
|
|
7901
|
+
_1,
|
|
7902
7902
|
{
|
|
7903
7903
|
name: "checkCircle",
|
|
7904
7904
|
width: 14,
|
|
@@ -7906,9 +7906,9 @@ const z2 = (s, e) => {
|
|
|
7906
7906
|
color: c.NOTIFICATION_SUCCESS_DARK
|
|
7907
7907
|
}
|
|
7908
7908
|
),
|
|
7909
|
-
pending: /* @__PURE__ */ o(
|
|
7909
|
+
pending: /* @__PURE__ */ o(_1, { name: "history", width: 14, height: 14, color: c.NOTIFICATION_WARNING_DARK }),
|
|
7910
7910
|
rejected: /* @__PURE__ */ o(
|
|
7911
|
-
|
|
7911
|
+
_1,
|
|
7912
7912
|
{
|
|
7913
7913
|
name: "cancelCircle",
|
|
7914
7914
|
width: 14,
|
|
@@ -7916,7 +7916,7 @@ const z2 = (s, e) => {
|
|
|
7916
7916
|
color: c.NOTIFICATION_ERROR_DARK
|
|
7917
7917
|
}
|
|
7918
7918
|
),
|
|
7919
|
-
canceled: /* @__PURE__ */ o(
|
|
7919
|
+
canceled: /* @__PURE__ */ o(_1, { name: "cancelCircle", width: 14, height: 14, color: c.GREY_DARK_2 })
|
|
7920
7920
|
}, h = {
|
|
7921
7921
|
approved: c.NOTIFICATION_SUCCESS_LIGHT,
|
|
7922
7922
|
pending: c.NOTIFICATION_WARNING_LIGHT,
|
|
@@ -7929,7 +7929,7 @@ const z2 = (s, e) => {
|
|
|
7929
7929
|
canceled: c.GREY_DARK_3
|
|
7930
7930
|
};
|
|
7931
7931
|
return /* @__PURE__ */ g(
|
|
7932
|
-
|
|
7932
|
+
W1,
|
|
7933
7933
|
{
|
|
7934
7934
|
className: `snmt-status-badge snmt-status-badge--${t ? "with-icon" : "without-icon"}`,
|
|
7935
7935
|
style: { background: h[e], width: i ?? "fit-content" },
|
|
@@ -7961,8 +7961,8 @@ const X9 = ({
|
|
|
7961
7961
|
extraOptions: C,
|
|
7962
7962
|
selectedItemVariant: d = "default"
|
|
7963
7963
|
}) => {
|
|
7964
|
-
const { locale: r } =
|
|
7965
|
-
if (
|
|
7964
|
+
const { locale: r } = n1(C1), { t: l } = q2("common", { lng: r }), [a, p] = A(!1);
|
|
7965
|
+
if (K(() => {
|
|
7966
7966
|
s.length || p(!1);
|
|
7967
7967
|
}, [s]), !s.length)
|
|
7968
7968
|
return null;
|
|
@@ -7971,7 +7971,7 @@ const X9 = ({
|
|
|
7971
7971
|
return ((f = h == null ? void 0 : h.find((L) => L.value === w)) == null ? void 0 : f.label) || ((m = C == null ? void 0 : C.find((L) => L.value === w)) == null ? void 0 : m.label) || w;
|
|
7972
7972
|
};
|
|
7973
7973
|
return /* @__PURE__ */ g(
|
|
7974
|
-
|
|
7974
|
+
B0,
|
|
7975
7975
|
{
|
|
7976
7976
|
content: (
|
|
7977
7977
|
// 90: paddings + margins + gaps and so on
|
|
@@ -9203,7 +9203,7 @@ const X9 = ({
|
|
|
9203
9203
|
)
|
|
9204
9204
|
]
|
|
9205
9205
|
}
|
|
9206
|
-
),
|
|
9206
|
+
), K4 = ({
|
|
9207
9207
|
className: s,
|
|
9208
9208
|
color: e = c.GREY_DARK_5,
|
|
9209
9209
|
height: t = 20,
|
|
@@ -9230,7 +9230,7 @@ const X9 = ({
|
|
|
9230
9230
|
}
|
|
9231
9231
|
)
|
|
9232
9232
|
}
|
|
9233
|
-
),
|
|
9233
|
+
), B4 = ({
|
|
9234
9234
|
className: s,
|
|
9235
9235
|
color: e = c.GREY_DARK_5,
|
|
9236
9236
|
height: t = 20,
|
|
@@ -10279,13 +10279,13 @@ const X9 = ({
|
|
|
10279
10279
|
disabled: h = !1,
|
|
10280
10280
|
onClick: C
|
|
10281
10281
|
}) => {
|
|
10282
|
-
const { theme: d } =
|
|
10282
|
+
const { theme: d } = n1(C1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
10283
10283
|
return /* @__PURE__ */ o(t1, { children: (() => {
|
|
10284
10284
|
switch (s) {
|
|
10285
10285
|
case "nextIcon":
|
|
10286
|
-
return B4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10287
|
-
case "prevIcon":
|
|
10288
10286
|
return K4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10287
|
+
case "prevIcon":
|
|
10288
|
+
return B4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10289
10289
|
case "arrowDown":
|
|
10290
10290
|
return t4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10291
10291
|
case "info":
|
|
@@ -10487,7 +10487,7 @@ function g3(s, e) {
|
|
|
10487
10487
|
function u3(s, e) {
|
|
10488
10488
|
return e ? c.GREY_DARK_2 : s ? c.GREY_LIGHT_0 : c.GREY_DARK_4;
|
|
10489
10489
|
}
|
|
10490
|
-
const w3 =
|
|
10490
|
+
const w3 = r1((s, e) => {
|
|
10491
10491
|
const {
|
|
10492
10492
|
value: t,
|
|
10493
10493
|
onChange: i,
|
|
@@ -10507,40 +10507,40 @@ const w3 = l1((s, e) => {
|
|
|
10507
10507
|
id: M,
|
|
10508
10508
|
extraOptions: Z,
|
|
10509
10509
|
dropdownRender: D,
|
|
10510
|
-
optionRender:
|
|
10510
|
+
optionRender: x,
|
|
10511
10511
|
isLoading: k,
|
|
10512
10512
|
readOnly: R,
|
|
10513
10513
|
error: v,
|
|
10514
10514
|
selectedItemVariant: H = "default",
|
|
10515
|
-
variant:
|
|
10515
|
+
variant: y = "outlined"
|
|
10516
10516
|
} = s;
|
|
10517
10517
|
let z;
|
|
10518
10518
|
h && h !== "single" && (z = s.overflowBehaviour ?? "responsive");
|
|
10519
|
-
const [
|
|
10520
|
-
|
|
10521
|
-
|
|
10519
|
+
const [B, q] = A(!1), [F, Q] = A(!1), [$, X] = A(!1), [o1, S] = A(!0), [_, T] = A(t), l1 = O(null);
|
|
10520
|
+
K(() => {
|
|
10521
|
+
T(t);
|
|
10522
10522
|
}, [t]);
|
|
10523
|
-
const N1 = (
|
|
10524
|
-
q(
|
|
10525
|
-
}, x1 = (
|
|
10526
|
-
var
|
|
10527
|
-
return !!((
|
|
10523
|
+
const N1 = (N) => {
|
|
10524
|
+
q(N), f && f(N);
|
|
10525
|
+
}, x1 = (N, b) => {
|
|
10526
|
+
var G;
|
|
10527
|
+
return !!((G = b == null ? void 0 : b.label) != null && G.toString().toLowerCase().includes(N.toLowerCase()));
|
|
10528
10528
|
}, M1 = () => {
|
|
10529
10529
|
Q(!0);
|
|
10530
10530
|
}, R1 = () => {
|
|
10531
10531
|
Q(!1);
|
|
10532
|
-
}, i1 =
|
|
10533
|
-
(
|
|
10534
|
-
if (
|
|
10535
|
-
const
|
|
10536
|
-
i == null || i(
|
|
10532
|
+
}, i1 = I(
|
|
10533
|
+
(N) => {
|
|
10534
|
+
if (T(N), h && h !== "single") {
|
|
10535
|
+
const G = N;
|
|
10536
|
+
i == null || i(G);
|
|
10537
10537
|
return;
|
|
10538
10538
|
}
|
|
10539
|
-
let
|
|
10540
|
-
Array.isArray(
|
|
10539
|
+
let b = null;
|
|
10540
|
+
Array.isArray(N) && H === "badge" ? b = N.length > 0 ? N[0] : null : Array.isArray(N) || (b = N || null), i == null || i(b);
|
|
10541
10541
|
},
|
|
10542
10542
|
[h, i, H]
|
|
10543
|
-
), V1 =
|
|
10543
|
+
), V1 = I(() => {
|
|
10544
10544
|
if (!(R || l)) {
|
|
10545
10545
|
if (h) {
|
|
10546
10546
|
i1([]);
|
|
@@ -10548,71 +10548,71 @@ const w3 = l1((s, e) => {
|
|
|
10548
10548
|
}
|
|
10549
10549
|
i1("");
|
|
10550
10550
|
}
|
|
10551
|
-
}, [l, i1, h, R]),
|
|
10552
|
-
(
|
|
10553
|
-
const
|
|
10554
|
-
i1(
|
|
10551
|
+
}, [l, i1, h, R]), a1 = I(
|
|
10552
|
+
(N) => {
|
|
10553
|
+
const b = _.filter((G) => G !== N);
|
|
10554
|
+
i1(b), T(b);
|
|
10555
10555
|
},
|
|
10556
10556
|
[i1, _]
|
|
10557
|
-
), Z1 =
|
|
10558
|
-
(
|
|
10557
|
+
), Z1 = I(
|
|
10558
|
+
(N) => (_ == null ? void 0 : _.indexOf(N)) === 0 ? (
|
|
10559
10559
|
// if the search input is empty
|
|
10560
10560
|
// then display the placeholder, else do not display it
|
|
10561
|
-
/* @__PURE__ */ o("span", { className: "custom-placeholder", children:
|
|
10561
|
+
/* @__PURE__ */ o("span", { className: "custom-placeholder", children: o1 ? n : "" })
|
|
10562
10562
|
) : /* @__PURE__ */ o(t1, {}),
|
|
10563
|
-
[
|
|
10564
|
-
),
|
|
10565
|
-
|
|
10566
|
-
},
|
|
10567
|
-
const { target:
|
|
10568
|
-
|
|
10569
|
-
}, U =
|
|
10570
|
-
(
|
|
10571
|
-
var
|
|
10572
|
-
return ((
|
|
10563
|
+
[o1, _, n]
|
|
10564
|
+
), E = (N) => {
|
|
10565
|
+
N.preventDefault(), N.stopPropagation();
|
|
10566
|
+
}, j = async (N) => {
|
|
10567
|
+
const { target: b } = N;
|
|
10568
|
+
b.scrollTop + b.offsetHeight >= b.scrollHeight - u && (m == null || m(!0)), L && await L(N);
|
|
10569
|
+
}, U = I(
|
|
10570
|
+
(N) => {
|
|
10571
|
+
var b, G;
|
|
10572
|
+
return ((b = d.find((s1) => s1.value === N)) == null ? void 0 : b.label) || ((G = Z == null ? void 0 : Z.find((s1) => s1.value === N)) == null ? void 0 : G.label) || N;
|
|
10573
10573
|
},
|
|
10574
10574
|
[Z, d]
|
|
10575
|
-
),
|
|
10576
|
-
(
|
|
10577
|
-
var
|
|
10575
|
+
), W = I(
|
|
10576
|
+
(N, b = "default") => {
|
|
10577
|
+
var G;
|
|
10578
10578
|
return /* @__PURE__ */ o(
|
|
10579
10579
|
X9,
|
|
10580
10580
|
{
|
|
10581
|
-
values:
|
|
10582
|
-
onTagClose:
|
|
10583
|
-
maxWidth: ((
|
|
10581
|
+
values: N,
|
|
10582
|
+
onTagClose: a1,
|
|
10583
|
+
maxWidth: ((G = l1.current) == null ? void 0 : G.clientWidth) || 0,
|
|
10584
10584
|
disabled: l,
|
|
10585
10585
|
closable: !R,
|
|
10586
10586
|
options: d,
|
|
10587
10587
|
extraOptions: Z,
|
|
10588
|
-
selectedItemVariant:
|
|
10588
|
+
selectedItemVariant: b
|
|
10589
10589
|
}
|
|
10590
10590
|
);
|
|
10591
10591
|
},
|
|
10592
|
-
[l, Z,
|
|
10593
|
-
),
|
|
10594
|
-
({ label:
|
|
10595
|
-
if (
|
|
10596
|
-
return Z1(
|
|
10592
|
+
[l, Z, a1, d, R]
|
|
10593
|
+
), P = I(
|
|
10594
|
+
({ label: N, value: b, mode: G }) => {
|
|
10595
|
+
if (G === "filter")
|
|
10596
|
+
return Z1(b);
|
|
10597
10597
|
{
|
|
10598
|
-
const
|
|
10599
|
-
return /* @__PURE__ */ o("div", { onMouseDown:
|
|
10598
|
+
const s1 = H === "badge" && d.find((x2) => x2.label === N), H1 = typeof N == "object" ? N : U(b);
|
|
10599
|
+
return /* @__PURE__ */ o("div", { onMouseDown: E, className: "tag-wrapper", children: H === "badge" ? /* @__PURE__ */ o(
|
|
10600
10600
|
f2,
|
|
10601
10601
|
{
|
|
10602
10602
|
variant: "regular",
|
|
10603
10603
|
size: "small",
|
|
10604
|
-
color:
|
|
10605
|
-
text:
|
|
10604
|
+
color: s1 ? s1.color : "cyan",
|
|
10605
|
+
text: H1
|
|
10606
10606
|
}
|
|
10607
|
-
) : /* @__PURE__ */ o(w2, { onClose: () =>
|
|
10607
|
+
) : /* @__PURE__ */ o(w2, { onClose: () => a1(b), disabled: l, children: H1 }) });
|
|
10608
10608
|
}
|
|
10609
10609
|
},
|
|
10610
|
-
[l, U,
|
|
10610
|
+
[l, U, a1, Z1, H, d]
|
|
10611
10611
|
), J = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
|
|
10612
10612
|
return /* @__PURE__ */ g(
|
|
10613
10613
|
"div",
|
|
10614
10614
|
{
|
|
10615
|
-
className: `snmt-select-container ${
|
|
10615
|
+
className: `snmt-select-container ${y === "borderless" ? "snmt-select-container-borderless" : ""}`,
|
|
10616
10616
|
children: [
|
|
10617
10617
|
/* @__PURE__ */ g(
|
|
10618
10618
|
"div",
|
|
@@ -10621,8 +10621,8 @@ const w3 = l1((s, e) => {
|
|
|
10621
10621
|
${h ? "" : "snmt-select-single"}
|
|
10622
10622
|
${R ? "snmt-select-read-only" : ""}
|
|
10623
10623
|
${z === "static" ? "snmt-select-static" : ""}
|
|
10624
|
-
${
|
|
10625
|
-
ref:
|
|
10624
|
+
${y === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10625
|
+
ref: l1,
|
|
10626
10626
|
style: { width: r },
|
|
10627
10627
|
children: [
|
|
10628
10628
|
/* @__PURE__ */ o(
|
|
@@ -10637,27 +10637,27 @@ const w3 = l1((s, e) => {
|
|
|
10637
10637
|
onDropdownVisibleChange: N1,
|
|
10638
10638
|
disabled: l,
|
|
10639
10639
|
value: _ || void 0,
|
|
10640
|
-
labelRender: (
|
|
10641
|
-
const
|
|
10642
|
-
return l ? /* @__PURE__ */ o("span", { style: { color: c.GREY_DARK_1 }, children:
|
|
10640
|
+
labelRender: (N) => {
|
|
10641
|
+
const b = U(N.value);
|
|
10642
|
+
return l ? /* @__PURE__ */ o("span", { style: { color: c.GREY_DARK_1 }, children: b }) : b;
|
|
10643
10643
|
},
|
|
10644
10644
|
mode: p3(h, H),
|
|
10645
|
-
variant:
|
|
10645
|
+
variant: y,
|
|
10646
10646
|
onChange: i1,
|
|
10647
10647
|
onFocus: M1,
|
|
10648
10648
|
onBlur: R1,
|
|
10649
10649
|
onMouseEnter: () => X(!0),
|
|
10650
10650
|
onMouseLeave: () => X(!1),
|
|
10651
|
-
onSearch: (
|
|
10652
|
-
S(!
|
|
10651
|
+
onSearch: (N) => {
|
|
10652
|
+
S(!N), w && w(N);
|
|
10653
10653
|
},
|
|
10654
10654
|
onSelect: () => S(!0),
|
|
10655
10655
|
onDeselect: () => S(!0),
|
|
10656
|
-
tagRender: (
|
|
10656
|
+
tagRender: (N) => P({ ...N, mode: h }),
|
|
10657
10657
|
maxTagCount: z === "responsive" ? "responsive" : void 0,
|
|
10658
10658
|
maxCount: h === "single" && H === "badge" ? 1 : void 0,
|
|
10659
|
-
maxTagPlaceholder: (
|
|
10660
|
-
onPopupScroll:
|
|
10659
|
+
maxTagPlaceholder: (N) => W(N, H),
|
|
10660
|
+
onPopupScroll: j,
|
|
10661
10661
|
prefix: k && /* @__PURE__ */ o(J1, { size: "small" }),
|
|
10662
10662
|
suffixIcon: /* @__PURE__ */ o("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ g(t1, { children: [
|
|
10663
10663
|
_ && !!_.length && p && /* @__PURE__ */ o(
|
|
@@ -10676,54 +10676,52 @@ const w3 = l1((s, e) => {
|
|
|
10676
10676
|
)
|
|
10677
10677
|
}
|
|
10678
10678
|
),
|
|
10679
|
-
|
|
10679
|
+
y === "borderless" && ($ || F) && /* @__PURE__ */ o(
|
|
10680
10680
|
d3,
|
|
10681
10681
|
{
|
|
10682
|
-
isActive:
|
|
10683
|
-
onClick: () => q(!
|
|
10682
|
+
isActive: B,
|
|
10683
|
+
onClick: () => q(!B)
|
|
10684
10684
|
}
|
|
10685
10685
|
),
|
|
10686
|
-
|
|
10686
|
+
y === "outlined" && /* @__PURE__ */ o(
|
|
10687
10687
|
p1,
|
|
10688
10688
|
{
|
|
10689
10689
|
name: "selectArrowIcon",
|
|
10690
10690
|
color: l ? c.GREY_DARK_1 : c.GREY_DARK_5,
|
|
10691
|
-
className:
|
|
10692
|
-
onClick: () => q(!
|
|
10691
|
+
className: B ? "select-arrow-rotated" : "select-arrow",
|
|
10692
|
+
onClick: () => q(!B)
|
|
10693
10693
|
}
|
|
10694
10694
|
)
|
|
10695
10695
|
] }) }),
|
|
10696
10696
|
removeIcon: /* @__PURE__ */ o(p1, { name: "cancelCircle", color: c.GREY_DARK_1 }),
|
|
10697
10697
|
options: d,
|
|
10698
|
-
optionRender: (
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
{
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
|
|
10719
|
-
|
|
10720
|
-
dropdownRender: (x) => /* @__PURE__ */ g("div", { className: "dropdown-container", children: [
|
|
10721
|
-
/* @__PURE__ */ o("div", { className: "dropdown-menu", children: D ? D(x) : x }),
|
|
10698
|
+
optionRender: (N) => {
|
|
10699
|
+
const b = h === "single" && H === "badge", G = Array.isArray(_) ? !!(_ != null && _.includes(N.value)) : _ === N.value, s1 = b ? _ : void 0, H1 = b ? ((s1 == null ? void 0 : s1.length) || 0) > 0 : !1;
|
|
10700
|
+
return x ? x(N.data) : /* @__PURE__ */ g(L1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
10701
|
+
/* @__PURE__ */ g(L1, { alignItems: "center", gap: 12, children: [
|
|
10702
|
+
h && h !== "single" || b ? /* @__PURE__ */ o(l5, { checked: G, disabled: b && H1 && !G }) : null,
|
|
10703
|
+
/* @__PURE__ */ g(L1, { alignItems: "center", gap: 8, children: [
|
|
10704
|
+
N.data.image !== void 0 && /* @__PURE__ */ o(
|
|
10705
|
+
t5,
|
|
10706
|
+
{
|
|
10707
|
+
src: N.data.image,
|
|
10708
|
+
variant: "xsmall",
|
|
10709
|
+
fallbackText: N.data.imageFallbackText ? N.data.imageFallbackText : ""
|
|
10710
|
+
}
|
|
10711
|
+
),
|
|
10712
|
+
/* @__PURE__ */ o("span", { children: N.label })
|
|
10713
|
+
] })
|
|
10714
|
+
] }),
|
|
10715
|
+
!h && _ === N.value && /* @__PURE__ */ o(p1, { name: "check", color: c.BLUE_DARK_1 })
|
|
10716
|
+
] });
|
|
10717
|
+
},
|
|
10718
|
+
dropdownRender: (N) => /* @__PURE__ */ g("div", { className: "dropdown-container", children: [
|
|
10719
|
+
/* @__PURE__ */ o("div", { className: "dropdown-menu", children: D ? D(N) : N }),
|
|
10722
10720
|
k && /* @__PURE__ */ o("div", { className: "loading-overlay", children: /* @__PURE__ */ o(J1, {}) })
|
|
10723
10721
|
] })
|
|
10724
10722
|
}
|
|
10725
10723
|
),
|
|
10726
|
-
n &&
|
|
10724
|
+
n && y !== "borderless" && /* @__PURE__ */ o(
|
|
10727
10725
|
"label",
|
|
10728
10726
|
{
|
|
10729
10727
|
className: `${F || J ? "label-floating" : ""} ${l ? "label-disabled" : ""} ${F ? "label-focused" : ""} ${k ? "label-loading" : ""} ${v ? "label-error" : ""}`,
|
|
@@ -10734,8 +10732,8 @@ const w3 = l1((s, e) => {
|
|
|
10734
10732
|
"fieldset",
|
|
10735
10733
|
{
|
|
10736
10734
|
className: `${F ? "fieldset-focused" : ""} ${l ? "fieldset-disabled" : ""} ${J ? "fieldset-filled" : ""} ${v ? "fieldset-error" : ""}
|
|
10737
|
-
${
|
|
10738
|
-
children: /* @__PURE__ */ o("legend", { children: n &&
|
|
10735
|
+
${$ ? "fieldset-hovered" : ""}`,
|
|
10736
|
+
children: /* @__PURE__ */ o("legend", { children: n && y !== "borderless" && /* @__PURE__ */ o("span", { children: a ? `${n}*` : n }) })
|
|
10739
10737
|
}
|
|
10740
10738
|
)
|
|
10741
10739
|
]
|
|
@@ -10751,7 +10749,7 @@ const w3 = l1((s, e) => {
|
|
|
10751
10749
|
width: 16
|
|
10752
10750
|
}
|
|
10753
10751
|
),
|
|
10754
|
-
typeof v == "string" ? /* @__PURE__ */ o(
|
|
10752
|
+
typeof v == "string" ? /* @__PURE__ */ o(K0, { color: c.NOTIFICATION_ERROR_DARK, variant: "body4", children: v }) : v
|
|
10755
10753
|
] })
|
|
10756
10754
|
]
|
|
10757
10755
|
}
|
|
@@ -10761,8 +10759,8 @@ function p3(s, e) {
|
|
|
10761
10759
|
return s === "filter" || s === "single" && e === "badge" ? "multiple" : s === "single" ? void 0 : s;
|
|
10762
10760
|
}
|
|
10763
10761
|
function f3(s, e = 500) {
|
|
10764
|
-
const t =
|
|
10765
|
-
return
|
|
10762
|
+
const t = O();
|
|
10763
|
+
return K(() => () => {
|
|
10766
10764
|
t.current && clearTimeout(t.current);
|
|
10767
10765
|
}, []), (...i) => {
|
|
10768
10766
|
const n = setTimeout(() => {
|
|
@@ -10772,14 +10770,14 @@ function f3(s, e = 500) {
|
|
|
10772
10770
|
};
|
|
10773
10771
|
}
|
|
10774
10772
|
function q1(s) {
|
|
10775
|
-
const e =
|
|
10776
|
-
return
|
|
10773
|
+
const e = O(s);
|
|
10774
|
+
return K(() => {
|
|
10777
10775
|
e.current = s;
|
|
10778
10776
|
}, [s]), e.current;
|
|
10779
10777
|
}
|
|
10780
10778
|
const B1 = 100, g1 = {
|
|
10781
10779
|
offset: 0
|
|
10782
|
-
}, L3 =
|
|
10780
|
+
}, L3 = r1((s, e) => {
|
|
10783
10781
|
const {
|
|
10784
10782
|
loadOptions: t,
|
|
10785
10783
|
width: i,
|
|
@@ -10799,90 +10797,90 @@ const B1 = 100, g1 = {
|
|
|
10799
10797
|
clearable: M = !0,
|
|
10800
10798
|
required: Z = !1,
|
|
10801
10799
|
error: D,
|
|
10802
|
-
variant:
|
|
10803
|
-
} = s, [k, R] = A(), [v, H] = A(g1), [
|
|
10800
|
+
variant: x = "outlined"
|
|
10801
|
+
} = s, [k, R] = A(), [v, H] = A(g1), [y, z] = A(!1), [B, q] = A(), [F, Q] = A(!1), [$, X] = A(
|
|
10804
10802
|
u ?? []
|
|
10805
|
-
),
|
|
10803
|
+
), o1 = q1(v.offset), S = q1(B), [_, T] = A(!1), l1 = O(!1), N1 = I(
|
|
10806
10804
|
async ({
|
|
10807
|
-
limit:
|
|
10808
|
-
offset:
|
|
10805
|
+
limit: E = B1,
|
|
10806
|
+
offset: j,
|
|
10809
10807
|
search: U
|
|
10810
10808
|
}) => {
|
|
10811
10809
|
z(!0);
|
|
10812
10810
|
try {
|
|
10813
|
-
const
|
|
10814
|
-
limit:
|
|
10815
|
-
offset:
|
|
10811
|
+
const W = await t({
|
|
10812
|
+
limit: E,
|
|
10813
|
+
offset: j,
|
|
10816
10814
|
search: U
|
|
10817
10815
|
});
|
|
10818
10816
|
R(
|
|
10819
|
-
(
|
|
10820
|
-
), H((
|
|
10821
|
-
...
|
|
10822
|
-
count:
|
|
10817
|
+
(P) => j === 0 ? W.options : [...P ?? [], ...W.options]
|
|
10818
|
+
), H((P) => ({
|
|
10819
|
+
...P,
|
|
10820
|
+
count: W.count
|
|
10823
10821
|
}));
|
|
10824
|
-
} catch (
|
|
10825
|
-
return console.error("AsyncSelect. fetchOptions error",
|
|
10822
|
+
} catch (W) {
|
|
10823
|
+
return console.error("AsyncSelect. fetchOptions error", W), [];
|
|
10826
10824
|
} finally {
|
|
10827
10825
|
z(!1);
|
|
10828
10826
|
}
|
|
10829
10827
|
},
|
|
10830
10828
|
[t]
|
|
10831
|
-
), x1 = f3((
|
|
10832
|
-
q(
|
|
10833
|
-
}), M1 =
|
|
10834
|
-
(
|
|
10829
|
+
), x1 = f3((E) => {
|
|
10830
|
+
q(E), E || H(g1);
|
|
10831
|
+
}), M1 = I(
|
|
10832
|
+
(E) => x1(E),
|
|
10835
10833
|
[x1]
|
|
10836
|
-
), R1 =
|
|
10837
|
-
async (
|
|
10838
|
-
|
|
10839
|
-
...
|
|
10840
|
-
offset:
|
|
10834
|
+
), R1 = I(
|
|
10835
|
+
async (E) => {
|
|
10836
|
+
y || E && v.count && v.count > ((k == null ? void 0 : k.length) ?? 0) && H((j) => ({
|
|
10837
|
+
...j,
|
|
10838
|
+
offset: j.offset + B1
|
|
10841
10839
|
}));
|
|
10842
10840
|
},
|
|
10843
|
-
[
|
|
10844
|
-
), i1 =
|
|
10845
|
-
(
|
|
10846
|
-
Q(
|
|
10841
|
+
[y, k == null ? void 0 : k.length, v.count]
|
|
10842
|
+
), i1 = I(
|
|
10843
|
+
(E) => {
|
|
10844
|
+
Q(E), !E && B && (q(void 0), H(g1), T(!0)), w == null || w(E);
|
|
10847
10845
|
},
|
|
10848
|
-
[w,
|
|
10846
|
+
[w, B]
|
|
10849
10847
|
);
|
|
10850
|
-
|
|
10851
|
-
!
|
|
10852
|
-
}, [_, F, v.offset,
|
|
10853
|
-
(a || p) && N1(g1),
|
|
10854
|
-
}, []),
|
|
10855
|
-
u && X((
|
|
10856
|
-
const
|
|
10857
|
-
(U) => !
|
|
10848
|
+
K(() => {
|
|
10849
|
+
!l1.current || y || (_ || F && (o1 !== v.offset || S !== B || !k)) && (N1({ offset: v.offset, limit: B1, search: B }), _ && T(!1));
|
|
10850
|
+
}, [_, F, v.offset, B, o1, S, k, y]), K(() => {
|
|
10851
|
+
(a || p) && N1(g1), l1.current = !0;
|
|
10852
|
+
}, []), K(() => {
|
|
10853
|
+
u && X((E) => {
|
|
10854
|
+
const j = u.filter(
|
|
10855
|
+
(U) => !E.some((W) => W.value === U.value)
|
|
10858
10856
|
);
|
|
10859
|
-
return [...
|
|
10857
|
+
return [...E, ...j];
|
|
10860
10858
|
});
|
|
10861
10859
|
}, [u]);
|
|
10862
|
-
const V1 =
|
|
10863
|
-
(
|
|
10864
|
-
n && n(
|
|
10865
|
-
let
|
|
10866
|
-
if (l ?
|
|
10867
|
-
const U =
|
|
10868
|
-
(
|
|
10860
|
+
const V1 = I(
|
|
10861
|
+
(E) => {
|
|
10862
|
+
n && n(E);
|
|
10863
|
+
let j = [];
|
|
10864
|
+
if (l ? j = Array.isArray(E) ? E : [] : j = E ? [E] : [], B) {
|
|
10865
|
+
const U = j.filter(
|
|
10866
|
+
(W) => !($ != null && $.some((P) => P.value === W))
|
|
10869
10867
|
);
|
|
10870
|
-
U.length > 0 && X((
|
|
10871
|
-
...
|
|
10872
|
-
...U.map((
|
|
10873
|
-
const J = k == null ? void 0 : k.find((
|
|
10868
|
+
U.length > 0 && X((W = []) => [
|
|
10869
|
+
...W,
|
|
10870
|
+
...U.map((P) => {
|
|
10871
|
+
const J = k == null ? void 0 : k.find((N) => N.value === P);
|
|
10874
10872
|
return {
|
|
10875
|
-
value:
|
|
10876
|
-
label: (J == null ? void 0 : J.label) ??
|
|
10873
|
+
value: P,
|
|
10874
|
+
label: (J == null ? void 0 : J.label) ?? P,
|
|
10877
10875
|
imageFallbackText: (J == null ? void 0 : J.imageFallbackText) ?? "",
|
|
10878
10876
|
image: (J == null ? void 0 : J.image) ?? void 0
|
|
10879
10877
|
};
|
|
10880
10878
|
})
|
|
10881
|
-
]), q(void 0), H(g1),
|
|
10879
|
+
]), q(void 0), H(g1), T(!0);
|
|
10882
10880
|
}
|
|
10883
10881
|
},
|
|
10884
|
-
[n,
|
|
10885
|
-
),
|
|
10882
|
+
[n, B, l, k, $]
|
|
10883
|
+
), a1 = T1(
|
|
10886
10884
|
() => ({
|
|
10887
10885
|
id: h,
|
|
10888
10886
|
width: i,
|
|
@@ -10895,14 +10893,14 @@ const B1 = 100, g1 = {
|
|
|
10895
10893
|
scrollThresholdValue: d,
|
|
10896
10894
|
onScrollToEnd: R1,
|
|
10897
10895
|
disabled: C,
|
|
10898
|
-
isLoading:
|
|
10896
|
+
isLoading: y,
|
|
10899
10897
|
optionRender: f,
|
|
10900
10898
|
dropdownRender: m,
|
|
10901
10899
|
readOnly: L,
|
|
10902
10900
|
clearable: M,
|
|
10903
10901
|
required: Z,
|
|
10904
10902
|
error: D,
|
|
10905
|
-
variant:
|
|
10903
|
+
variant: x
|
|
10906
10904
|
}),
|
|
10907
10905
|
[
|
|
10908
10906
|
h,
|
|
@@ -10915,38 +10913,38 @@ const B1 = 100, g1 = {
|
|
|
10915
10913
|
d,
|
|
10916
10914
|
R1,
|
|
10917
10915
|
C,
|
|
10918
|
-
|
|
10916
|
+
y,
|
|
10919
10917
|
f,
|
|
10920
10918
|
m,
|
|
10921
10919
|
L,
|
|
10922
10920
|
M,
|
|
10923
10921
|
Z,
|
|
10924
10922
|
D,
|
|
10925
|
-
|
|
10923
|
+
x
|
|
10926
10924
|
]
|
|
10927
10925
|
);
|
|
10928
|
-
|
|
10926
|
+
d1(e, () => ({
|
|
10929
10927
|
refetchOptions: async () => {
|
|
10930
|
-
H(g1), q(void 0),
|
|
10928
|
+
H(g1), q(void 0), T(!0);
|
|
10931
10929
|
}
|
|
10932
10930
|
}));
|
|
10933
10931
|
const Z1 = T1(() => {
|
|
10934
|
-
const
|
|
10932
|
+
const E = l && l !== "single", j = s.selectedItemVariant === "badge", U = j ? k || [] : k || [], W = $, P = s, J = E ? {
|
|
10935
10933
|
mode: l,
|
|
10936
|
-
overflowBehaviour:
|
|
10937
|
-
value:
|
|
10934
|
+
overflowBehaviour: P.overflowBehaviour,
|
|
10935
|
+
value: P.value
|
|
10938
10936
|
} : {
|
|
10939
10937
|
mode: l,
|
|
10940
10938
|
value: s.value
|
|
10941
10939
|
};
|
|
10942
10940
|
return {
|
|
10943
|
-
...
|
|
10941
|
+
...a1,
|
|
10944
10942
|
...J,
|
|
10945
10943
|
selectedItemVariant: s.selectedItemVariant,
|
|
10946
10944
|
options: U,
|
|
10947
|
-
extraOptions:
|
|
10945
|
+
extraOptions: W
|
|
10948
10946
|
};
|
|
10949
|
-
}, [l, s,
|
|
10947
|
+
}, [l, s, a1, $, k]);
|
|
10950
10948
|
return /* @__PURE__ */ o("div", { className: "snmt-async-select", children: /* @__PURE__ */ o(w3, { ...Z1 }) });
|
|
10951
10949
|
}), V = (s) => typeof s == "string", f1 = () => {
|
|
10952
10950
|
let s, e;
|
|
@@ -10989,7 +10987,7 @@ const B1 = 100, g1 = {
|
|
|
10989
10987
|
k: h
|
|
10990
10988
|
} = m1(s, e, Object);
|
|
10991
10989
|
n[h] = n[h] || [], n[h].push(t);
|
|
10992
|
-
},
|
|
10990
|
+
}, y1 = (s, e) => {
|
|
10993
10991
|
const {
|
|
10994
10992
|
obj: t,
|
|
10995
10993
|
k: i
|
|
@@ -10997,8 +10995,8 @@ const B1 = 100, g1 = {
|
|
|
10997
10995
|
if (t)
|
|
10998
10996
|
return t[i];
|
|
10999
10997
|
}, N3 = (s, e, t) => {
|
|
11000
|
-
const i =
|
|
11001
|
-
return i !== void 0 ? i :
|
|
10998
|
+
const i = y1(s, t);
|
|
10999
|
+
return i !== void 0 ? i : y1(e, t);
|
|
11002
11000
|
}, L2 = (s, e, t) => {
|
|
11003
11001
|
for (const i in e)
|
|
11004
11002
|
i !== "__proto__" && i !== "constructor" && (i in s ? V(s[i]) || s[i] instanceof String || V(e[i]) || e[i] instanceof String ? t && (s[i] = e[i]) : L2(s[i], e[i], t) : s[i] = e[i]);
|
|
@@ -11036,7 +11034,7 @@ const V3 = [" ", ",", "?", "!", ";"], Z3 = new R3(20), H3 = (s, e, t) => {
|
|
|
11036
11034
|
C > 0 && !n.test(s.substring(0, C)) && (h = !0);
|
|
11037
11035
|
}
|
|
11038
11036
|
return h;
|
|
11039
|
-
},
|
|
11037
|
+
}, I1 = function(s, e) {
|
|
11040
11038
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
11041
11039
|
if (!s) return;
|
|
11042
11040
|
if (s[e]) return s[e];
|
|
@@ -11056,7 +11054,7 @@ const V3 = [" ", ",", "?", "!", ";"], Z3 = new R3(20), H3 = (s, e, t) => {
|
|
|
11056
11054
|
n = C;
|
|
11057
11055
|
}
|
|
11058
11056
|
return n;
|
|
11059
|
-
},
|
|
11057
|
+
}, E1 = (s) => s && s.replace("_", "-"), _3 = {
|
|
11060
11058
|
type: "logger",
|
|
11061
11059
|
log(s) {
|
|
11062
11060
|
this.output("log", s);
|
|
@@ -11071,7 +11069,7 @@ const V3 = [" ", ",", "?", "!", ";"], Z3 = new R3(20), H3 = (s, e, t) => {
|
|
|
11071
11069
|
console && console[s] && console[s].apply(console, e);
|
|
11072
11070
|
}
|
|
11073
11071
|
};
|
|
11074
|
-
class
|
|
11072
|
+
class A1 {
|
|
11075
11073
|
constructor(e) {
|
|
11076
11074
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11077
11075
|
this.init(e, t);
|
|
@@ -11104,17 +11102,17 @@ class E1 {
|
|
|
11104
11102
|
return n && !this.debug ? null : (V(e[0]) && (e[0] = `${i}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
11105
11103
|
}
|
|
11106
11104
|
create(e) {
|
|
11107
|
-
return new
|
|
11105
|
+
return new A1(this.logger, {
|
|
11108
11106
|
prefix: `${this.prefix}:${e}:`,
|
|
11109
11107
|
...this.options
|
|
11110
11108
|
});
|
|
11111
11109
|
}
|
|
11112
11110
|
clone(e) {
|
|
11113
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
11111
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new A1(this.logger, e);
|
|
11114
11112
|
}
|
|
11115
11113
|
}
|
|
11116
|
-
var e1 = new
|
|
11117
|
-
class
|
|
11114
|
+
var e1 = new A1();
|
|
11115
|
+
class K1 {
|
|
11118
11116
|
constructor() {
|
|
11119
11117
|
this.observers = {};
|
|
11120
11118
|
}
|
|
@@ -11148,7 +11146,7 @@ class D1 {
|
|
|
11148
11146
|
});
|
|
11149
11147
|
}
|
|
11150
11148
|
}
|
|
11151
|
-
class i2 extends
|
|
11149
|
+
class i2 extends K1 {
|
|
11152
11150
|
constructor(e) {
|
|
11153
11151
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {
|
|
11154
11152
|
ns: ["translation"],
|
|
@@ -11168,8 +11166,8 @@ class i2 extends D1 {
|
|
|
11168
11166
|
const h = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, C = n.ignoreJSONStructure !== void 0 ? n.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
11169
11167
|
let d;
|
|
11170
11168
|
e.indexOf(".") > -1 ? d = e.split(".") : (d = [e, t], i && (Array.isArray(i) ? d.push(...i) : V(i) && h ? d.push(...i.split(h)) : d.push(i)));
|
|
11171
|
-
const r =
|
|
11172
|
-
return !r && !t && !i && e.indexOf(".") > -1 && (e = d[0], t = d[1], i = d.slice(2).join(".")), r || !C || !V(i) ? r :
|
|
11169
|
+
const r = y1(this.data, d);
|
|
11170
|
+
return !r && !t && !i && e.indexOf(".") > -1 && (e = d[0], t = d[1], i = d.slice(2).join(".")), r || !C || !V(i) ? r : I1(this.data && this.data[e] && this.data[e][t], i, h);
|
|
11173
11171
|
}
|
|
11174
11172
|
addResource(e, t, i, n) {
|
|
11175
11173
|
let h = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -11195,7 +11193,7 @@ class i2 extends D1 {
|
|
|
11195
11193
|
skipCopy: !1
|
|
11196
11194
|
}, d = [e, t];
|
|
11197
11195
|
e.indexOf(".") > -1 && (d = e.split("."), n = i, i = t, t = d[1]), this.addNamespaces(t);
|
|
11198
|
-
let r =
|
|
11196
|
+
let r = y1(this.data, d) || {};
|
|
11199
11197
|
C.skipCopy || (i = JSON.parse(JSON.stringify(i))), n ? L2(r, i, h) : r = {
|
|
11200
11198
|
...r,
|
|
11201
11199
|
...i
|
|
@@ -11235,7 +11233,7 @@ var m2 = {
|
|
|
11235
11233
|
}
|
|
11236
11234
|
};
|
|
11237
11235
|
const s2 = {};
|
|
11238
|
-
class
|
|
11236
|
+
class D1 extends K1 {
|
|
11239
11237
|
constructor(e) {
|
|
11240
11238
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11241
11239
|
super(), m3(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = e1.create("translator");
|
|
@@ -11284,15 +11282,15 @@ class A1 extends D1 {
|
|
|
11284
11282
|
} = this.extractFromKey(e[e.length - 1], t), r = d[d.length - 1], l = t.lng || this.language, a = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
11285
11283
|
if (l && l.toLowerCase() === "cimode") {
|
|
11286
11284
|
if (a) {
|
|
11287
|
-
const
|
|
11285
|
+
const x = t.nsSeparator || this.options.nsSeparator;
|
|
11288
11286
|
return n ? {
|
|
11289
|
-
res: `${r}${
|
|
11287
|
+
res: `${r}${x}${C}`,
|
|
11290
11288
|
usedKey: C,
|
|
11291
11289
|
exactUsedKey: C,
|
|
11292
11290
|
usedLng: l,
|
|
11293
11291
|
usedNS: r,
|
|
11294
11292
|
usedParams: this.getUsedParamsDetails(t)
|
|
11295
|
-
} : `${r}${
|
|
11293
|
+
} : `${r}${x}${C}`;
|
|
11296
11294
|
}
|
|
11297
11295
|
return n ? {
|
|
11298
11296
|
res: C,
|
|
@@ -11309,14 +11307,14 @@ class A1 extends D1 {
|
|
|
11309
11307
|
if (Z && u && D && L.indexOf(m) < 0 && !(V(M) && Array.isArray(u))) {
|
|
11310
11308
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
11311
11309
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
11312
|
-
const
|
|
11310
|
+
const x = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(w, u, {
|
|
11313
11311
|
...t,
|
|
11314
11312
|
ns: d
|
|
11315
11313
|
}) : `key '${C} (${this.language})' returned an object instead of string.`;
|
|
11316
|
-
return n ? (p.res =
|
|
11314
|
+
return n ? (p.res = x, p.usedParams = this.getUsedParamsDetails(t), p) : x;
|
|
11317
11315
|
}
|
|
11318
11316
|
if (h) {
|
|
11319
|
-
const
|
|
11317
|
+
const x = Array.isArray(u), k = x ? [] : {}, R = x ? f : w;
|
|
11320
11318
|
for (const v in u)
|
|
11321
11319
|
if (Object.prototype.hasOwnProperty.call(u, v)) {
|
|
11322
11320
|
const H = `${R}${h}${v}`;
|
|
@@ -11331,38 +11329,38 @@ class A1 extends D1 {
|
|
|
11331
11329
|
} else if (Z && V(M) && Array.isArray(u))
|
|
11332
11330
|
u = u.join(M), u && (u = this.extendTranslation(u, e, t, i));
|
|
11333
11331
|
else {
|
|
11334
|
-
let
|
|
11335
|
-
const R = t.count !== void 0 && !V(t.count), v =
|
|
11332
|
+
let x = !1, k = !1;
|
|
11333
|
+
const R = t.count !== void 0 && !V(t.count), v = D1.hasDefaultValue(t), H = R ? this.pluralResolver.getSuffix(l, t.count, t) : "", y = t.ordinal && R ? this.pluralResolver.getSuffix(l, t.count, {
|
|
11336
11334
|
ordinal: !1
|
|
11337
|
-
}) : "", z = R && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(),
|
|
11338
|
-
!this.isValidLookup(u) && v && (
|
|
11339
|
-
const F = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && k ? void 0 : u, Q = v &&
|
|
11340
|
-
if (k ||
|
|
11341
|
-
if (this.logger.log(Q ? "updateKey" : "missingKey", l, r, C, Q ?
|
|
11335
|
+
}) : "", z = R && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), B = z && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${H}`] || t[`defaultValue${y}`] || t.defaultValue;
|
|
11336
|
+
!this.isValidLookup(u) && v && (x = !0, u = B), this.isValidLookup(u) || (k = !0, u = C);
|
|
11337
|
+
const F = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && k ? void 0 : u, Q = v && B !== u && this.options.updateMissing;
|
|
11338
|
+
if (k || x || Q) {
|
|
11339
|
+
if (this.logger.log(Q ? "updateKey" : "missingKey", l, r, C, Q ? B : u), h) {
|
|
11342
11340
|
const S = this.resolve(C, {
|
|
11343
11341
|
...t,
|
|
11344
11342
|
keySeparator: !1
|
|
11345
11343
|
});
|
|
11346
11344
|
S && S.res && this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.");
|
|
11347
11345
|
}
|
|
11348
|
-
let
|
|
11346
|
+
let $ = [];
|
|
11349
11347
|
const X = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
11350
11348
|
if (this.options.saveMissingTo === "fallback" && X && X[0])
|
|
11351
11349
|
for (let S = 0; S < X.length; S++)
|
|
11352
|
-
|
|
11353
|
-
else this.options.saveMissingTo === "all" ?
|
|
11354
|
-
const
|
|
11355
|
-
const
|
|
11356
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(S, r, _,
|
|
11350
|
+
$.push(X[S]);
|
|
11351
|
+
else this.options.saveMissingTo === "all" ? $ = this.languageUtils.toResolveHierarchy(t.lng || this.language) : $.push(t.lng || this.language);
|
|
11352
|
+
const o1 = (S, _, T) => {
|
|
11353
|
+
const l1 = v && T !== u ? T : F;
|
|
11354
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(S, r, _, l1, Q, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(S, r, _, l1, Q, t), this.emit("missingKey", S, r, _, u);
|
|
11357
11355
|
};
|
|
11358
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && R ?
|
|
11356
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && R ? $.forEach((S) => {
|
|
11359
11357
|
const _ = this.pluralResolver.getSuffixes(S, t);
|
|
11360
|
-
z && t[`defaultValue${this.options.pluralSeparator}zero`] && _.indexOf(`${this.options.pluralSeparator}zero`) < 0 && _.push(`${this.options.pluralSeparator}zero`), _.forEach((
|
|
11361
|
-
|
|
11358
|
+
z && t[`defaultValue${this.options.pluralSeparator}zero`] && _.indexOf(`${this.options.pluralSeparator}zero`) < 0 && _.push(`${this.options.pluralSeparator}zero`), _.forEach((T) => {
|
|
11359
|
+
o1([S], C + T, t[`defaultValue${T}`] || B);
|
|
11362
11360
|
});
|
|
11363
|
-
}) :
|
|
11361
|
+
}) : o1($, C, B));
|
|
11364
11362
|
}
|
|
11365
|
-
u = this.extendTranslation(u, e, t, p, i), k && u === C && this.options.appendNamespaceToMissingKey && (u = `${r}:${C}`), (k ||
|
|
11363
|
+
u = this.extendTranslation(u, e, t, p, i), k && u === C && this.options.appendNamespaceToMissingKey && (u = `${r}:${C}`), (k || x) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${r}:${C}` : C, x ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
|
|
11366
11364
|
}
|
|
11367
11365
|
return n ? (p.res = u, p.usedParams = this.getUsedParamsDetails(t), p) : u;
|
|
11368
11366
|
}
|
|
@@ -11429,12 +11427,12 @@ class A1 extends D1 {
|
|
|
11429
11427
|
if (this.i18nFormat && this.i18nFormat.addLookupKeys)
|
|
11430
11428
|
this.i18nFormat.addLookupKeys(Z, a, M, L, t);
|
|
11431
11429
|
else {
|
|
11432
|
-
let
|
|
11433
|
-
u && (
|
|
11430
|
+
let x;
|
|
11431
|
+
u && (x = this.pluralResolver.getSuffix(M, t.count, t));
|
|
11434
11432
|
const k = `${this.options.pluralSeparator}zero`, R = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
11435
|
-
if (u && (Z.push(a +
|
|
11433
|
+
if (u && (Z.push(a + x), t.ordinal && x.indexOf(R) === 0 && Z.push(a + x.replace(R, this.options.pluralSeparator)), w && Z.push(a + k)), f) {
|
|
11436
11434
|
const v = `${a}${this.options.contextSeparator}${t.context}`;
|
|
11437
|
-
Z.push(v), u && (Z.push(v +
|
|
11435
|
+
Z.push(v), u && (Z.push(v + x), t.ordinal && x.indexOf(R) === 0 && Z.push(v + x.replace(R, this.options.pluralSeparator)), w && Z.push(v + k));
|
|
11438
11436
|
}
|
|
11439
11437
|
}
|
|
11440
11438
|
let D;
|
|
@@ -11481,18 +11479,18 @@ class A1 extends D1 {
|
|
|
11481
11479
|
return !1;
|
|
11482
11480
|
}
|
|
11483
11481
|
}
|
|
11484
|
-
const
|
|
11482
|
+
const S1 = (s) => s.charAt(0).toUpperCase() + s.slice(1);
|
|
11485
11483
|
class n2 {
|
|
11486
11484
|
constructor(e) {
|
|
11487
11485
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = e1.create("languageUtils");
|
|
11488
11486
|
}
|
|
11489
11487
|
getScriptPartFromCode(e) {
|
|
11490
|
-
if (e =
|
|
11488
|
+
if (e = E1(e), !e || e.indexOf("-") < 0) return null;
|
|
11491
11489
|
const t = e.split("-");
|
|
11492
11490
|
return t.length === 2 || (t.pop(), t[t.length - 1].toLowerCase() === "x") ? null : this.formatLanguageCode(t.join("-"));
|
|
11493
11491
|
}
|
|
11494
11492
|
getLanguagePartFromCode(e) {
|
|
11495
|
-
if (e =
|
|
11493
|
+
if (e = E1(e), !e || e.indexOf("-") < 0) return e;
|
|
11496
11494
|
const t = e.split("-");
|
|
11497
11495
|
return this.formatLanguageCode(t[0]);
|
|
11498
11496
|
}
|
|
@@ -11506,7 +11504,7 @@ class n2 {
|
|
|
11506
11504
|
}
|
|
11507
11505
|
const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
|
|
11508
11506
|
let i = e.split("-");
|
|
11509
|
-
return this.options.lowerCaseLng ? i = i.map((n) => n.toLowerCase()) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] =
|
|
11507
|
+
return this.options.lowerCaseLng ? i = i.map((n) => n.toLowerCase()) : i.length === 2 ? (i[0] = i[0].toLowerCase(), i[1] = i[1].toUpperCase(), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = S1(i[1].toLowerCase()))) : i.length === 3 && (i[0] = i[0].toLowerCase(), i[1].length === 2 && (i[1] = i[1].toUpperCase()), i[0] !== "sgn" && i[2].length === 2 && (i[2] = i[2].toUpperCase()), t.indexOf(i[1].toLowerCase()) > -1 && (i[1] = S1(i[1].toLowerCase())), t.indexOf(i[2].toLowerCase()) > -1 && (i[2] = S1(i[2].toLowerCase()))), i.join("-");
|
|
11510
11508
|
}
|
|
11511
11509
|
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
11512
11510
|
}
|
|
@@ -11681,7 +11679,7 @@ const E3 = ["v1", "v2", "v3"], A3 = ["v4"], o2 = {
|
|
|
11681
11679
|
});
|
|
11682
11680
|
}), s;
|
|
11683
11681
|
};
|
|
11684
|
-
class
|
|
11682
|
+
class K3 {
|
|
11685
11683
|
constructor(e) {
|
|
11686
11684
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11687
11685
|
this.languageUtils = e, this.options = t, this.logger = e1.create("pluralResolver"), (!this.options.compatibilityJSON || A3.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = D3(), this.pluralRulesCache = {};
|
|
@@ -11695,7 +11693,7 @@ class B3 {
|
|
|
11695
11693
|
getRule(e) {
|
|
11696
11694
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11697
11695
|
if (this.shouldUseIntlApi()) {
|
|
11698
|
-
const i =
|
|
11696
|
+
const i = E1(e === "dev" ? "en" : e), n = t.ordinal ? "ordinal" : "cardinal", h = JSON.stringify({
|
|
11699
11697
|
cleanedCode: i,
|
|
11700
11698
|
type: n
|
|
11701
11699
|
});
|
|
@@ -11747,9 +11745,9 @@ class B3 {
|
|
|
11747
11745
|
}
|
|
11748
11746
|
const l2 = function(s, e, t) {
|
|
11749
11747
|
let i = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, h = N3(s, e, t);
|
|
11750
|
-
return !h && n && V(t) && (h =
|
|
11751
|
-
},
|
|
11752
|
-
class
|
|
11748
|
+
return !h && n && V(t) && (h = I1(s, t, i), h === void 0 && (h = I1(e, t, i))), h;
|
|
11749
|
+
}, G1 = (s) => s.replace(/\$/g, "$$$$");
|
|
11750
|
+
class B3 {
|
|
11753
11751
|
constructor() {
|
|
11754
11752
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11755
11753
|
this.logger = e1.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
|
|
@@ -11809,10 +11807,10 @@ class K3 {
|
|
|
11809
11807
|
const a = n && n.missingInterpolationHandler || this.options.missingInterpolationHandler, p = n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
11810
11808
|
return [{
|
|
11811
11809
|
regex: this.regexpUnescape,
|
|
11812
|
-
safeValue: (w) =>
|
|
11810
|
+
safeValue: (w) => G1(w)
|
|
11813
11811
|
}, {
|
|
11814
11812
|
regex: this.regexp,
|
|
11815
|
-
safeValue: (w) => this.escapeValue ?
|
|
11813
|
+
safeValue: (w) => this.escapeValue ? G1(this.escape(w)) : G1(w)
|
|
11816
11814
|
}].forEach((w) => {
|
|
11817
11815
|
for (d = 0; h = w.regex.exec(e); ) {
|
|
11818
11816
|
const f = h[1].trim();
|
|
@@ -11901,7 +11899,7 @@ const S3 = (s) => {
|
|
|
11901
11899
|
});
|
|
11902
11900
|
const C = i + JSON.stringify(h);
|
|
11903
11901
|
let d = e[C];
|
|
11904
|
-
return d || (d = s(
|
|
11902
|
+
return d || (d = s(E1(i), n), e[C] = d), d(t);
|
|
11905
11903
|
};
|
|
11906
11904
|
};
|
|
11907
11905
|
class G3 {
|
|
@@ -11987,7 +11985,7 @@ class G3 {
|
|
|
11987
11985
|
const O3 = (s, e) => {
|
|
11988
11986
|
s.pending[e] !== void 0 && (delete s.pending[e], s.pendingCount--);
|
|
11989
11987
|
};
|
|
11990
|
-
class I3 extends
|
|
11988
|
+
class I3 extends K1 {
|
|
11991
11989
|
constructor(e, t, i) {
|
|
11992
11990
|
let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
11993
11991
|
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = n, this.logger = e1.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(i, n.backend, n);
|
|
@@ -12178,13 +12176,13 @@ const r2 = () => ({
|
|
|
12178
12176
|
maxReplaces: 1e3,
|
|
12179
12177
|
skipOnVariables: !0
|
|
12180
12178
|
}
|
|
12181
|
-
}), a2 = (s) => (V(s.ns) && (s.ns = [s.ns]), V(s.fallbackLng) && (s.fallbackLng = [s.fallbackLng]), V(s.fallbackNS) && (s.fallbackNS = [s.fallbackNS]), s.supportedLngs && s.supportedLngs.indexOf("cimode") < 0 && (s.supportedLngs = s.supportedLngs.concat(["cimode"])), s),
|
|
12179
|
+
}), a2 = (s) => (V(s.ns) && (s.ns = [s.ns]), V(s.fallbackLng) && (s.fallbackLng = [s.fallbackLng]), V(s.fallbackNS) && (s.fallbackNS = [s.fallbackNS]), s.supportedLngs && s.supportedLngs.indexOf("cimode") < 0 && (s.supportedLngs = s.supportedLngs.concat(["cimode"])), s), b1 = () => {
|
|
12182
12180
|
}, Y3 = (s) => {
|
|
12183
12181
|
Object.getOwnPropertyNames(Object.getPrototypeOf(s)).forEach((t) => {
|
|
12184
12182
|
typeof s[t] == "function" && (s[t] = s[t].bind(s));
|
|
12185
12183
|
});
|
|
12186
12184
|
};
|
|
12187
|
-
class k1 extends
|
|
12185
|
+
class k1 extends K1 {
|
|
12188
12186
|
constructor() {
|
|
12189
12187
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
|
|
12190
12188
|
if (super(), this.options = a2(e), this.services = {}, this.logger = e1, this.modules = {
|
|
@@ -12218,17 +12216,17 @@ class k1 extends D1 {
|
|
|
12218
12216
|
const p = new n2(this.options);
|
|
12219
12217
|
this.store = new i2(this.options.resources, this.options);
|
|
12220
12218
|
const u = this.services;
|
|
12221
|
-
u.logger = e1, u.resourceStore = this.store, u.languageUtils = p, u.pluralResolver = new
|
|
12219
|
+
u.logger = e1, u.resourceStore = this.store, u.languageUtils = p, u.pluralResolver = new K3(p, {
|
|
12222
12220
|
prepend: this.options.pluralSeparator,
|
|
12223
12221
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
12224
12222
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
12225
|
-
}), a && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = h(a), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new
|
|
12223
|
+
}), a && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = h(a), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new B3(this.options), u.utils = {
|
|
12226
12224
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
12227
12225
|
}, u.backendConnector = new I3(h(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(w) {
|
|
12228
12226
|
for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0), L = 1; L < f; L++)
|
|
12229
12227
|
m[L - 1] = arguments[L];
|
|
12230
12228
|
e.emit(w, ...m);
|
|
12231
|
-
}), this.modules.languageDetector && (u.languageDetector = h(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = h(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new
|
|
12229
|
+
}), this.modules.languageDetector && (u.languageDetector = h(this.modules.languageDetector), u.languageDetector.init && u.languageDetector.init(u, this.options.detection, this.options)), this.modules.i18nFormat && (u.i18nFormat = h(this.modules.i18nFormat), u.i18nFormat.init && u.i18nFormat.init(this)), this.translator = new D1(this.services, this.options), this.translator.on("*", function(w) {
|
|
12232
12230
|
for (var f = arguments.length, m = new Array(f > 1 ? f - 1 : 0), L = 1; L < f; L++)
|
|
12233
12231
|
m[L - 1] = arguments[L];
|
|
12234
12232
|
e.emit(w, ...m);
|
|
@@ -12236,7 +12234,7 @@ class k1 extends D1 {
|
|
|
12236
12234
|
w.init && w.init(this);
|
|
12237
12235
|
});
|
|
12238
12236
|
}
|
|
12239
|
-
if (this.format = this.options.interpolation.format, i || (i =
|
|
12237
|
+
if (this.format = this.options.interpolation.format, i || (i = b1), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
12240
12238
|
const a = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
12241
12239
|
a.length > 0 && a[0] !== "dev" && (this.options.lng = a[0]);
|
|
12242
12240
|
}
|
|
@@ -12259,7 +12257,7 @@ class k1 extends D1 {
|
|
|
12259
12257
|
return this.options.resources || !this.options.initImmediate ? l() : setTimeout(l, 0), r;
|
|
12260
12258
|
}
|
|
12261
12259
|
loadResources(e) {
|
|
12262
|
-
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12260
|
+
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b1;
|
|
12263
12261
|
const n = V(e) ? e : this.language;
|
|
12264
12262
|
if (typeof e == "function" && (i = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
12265
12263
|
if (n && n.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
|
|
@@ -12277,7 +12275,7 @@ class k1 extends D1 {
|
|
|
12277
12275
|
}
|
|
12278
12276
|
reloadResources(e, t, i) {
|
|
12279
12277
|
const n = f1();
|
|
12280
|
-
return typeof e == "function" && (i = e, e = void 0), typeof t == "function" && (i = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), i || (i =
|
|
12278
|
+
return typeof e == "function" && (i = e, e = void 0), typeof t == "function" && (i = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), i || (i = b1), this.services.backendConnector.reload(e, t, (h) => {
|
|
12281
12279
|
n.resolve(), i(h);
|
|
12282
12280
|
}), n;
|
|
12283
12281
|
}
|
|
@@ -12390,7 +12388,7 @@ class k1 extends D1 {
|
|
|
12390
12388
|
return new k1(e, t);
|
|
12391
12389
|
}
|
|
12392
12390
|
cloneInstance() {
|
|
12393
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12391
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b1;
|
|
12394
12392
|
const i = e.forkResourceStore;
|
|
12395
12393
|
i && delete e.forkResourceStore;
|
|
12396
12394
|
const n = {
|
|
@@ -12404,7 +12402,7 @@ class k1 extends D1 {
|
|
|
12404
12402
|
...this.services
|
|
12405
12403
|
}, h.services.utils = {
|
|
12406
12404
|
hasLoadedNamespace: h.hasLoadedNamespace.bind(h)
|
|
12407
|
-
}, i && (h.store = new i2(this.store.data, n), h.services.resourceStore = h.store), h.translator = new
|
|
12405
|
+
}, i && (h.store = new i2(this.store.data, n), h.services.resourceStore = h.store), h.translator = new D1(h.services, n), h.translator.on("*", function(d) {
|
|
12408
12406
|
for (var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
12409
12407
|
l[a - 1] = arguments[a];
|
|
12410
12408
|
h.emit(d, ...l);
|
|
@@ -12422,34 +12420,34 @@ class k1 extends D1 {
|
|
|
12422
12420
|
};
|
|
12423
12421
|
}
|
|
12424
12422
|
}
|
|
12425
|
-
const
|
|
12426
|
-
|
|
12427
|
-
|
|
12428
|
-
|
|
12429
|
-
|
|
12430
|
-
|
|
12431
|
-
|
|
12432
|
-
|
|
12433
|
-
|
|
12434
|
-
|
|
12435
|
-
|
|
12436
|
-
|
|
12437
|
-
|
|
12438
|
-
|
|
12439
|
-
|
|
12440
|
-
|
|
12423
|
+
const Y = k1.createInstance();
|
|
12424
|
+
Y.createInstance = k1.createInstance;
|
|
12425
|
+
Y.createInstance;
|
|
12426
|
+
Y.dir;
|
|
12427
|
+
Y.init;
|
|
12428
|
+
Y.loadResources;
|
|
12429
|
+
Y.reloadResources;
|
|
12430
|
+
Y.use;
|
|
12431
|
+
Y.changeLanguage;
|
|
12432
|
+
Y.getFixedT;
|
|
12433
|
+
Y.t;
|
|
12434
|
+
Y.exists;
|
|
12435
|
+
Y.setDefaultNamespace;
|
|
12436
|
+
Y.hasLoadedNamespace;
|
|
12437
|
+
Y.loadNamespaces;
|
|
12438
|
+
Y.loadLanguages;
|
|
12441
12439
|
function j3() {
|
|
12442
12440
|
if (console && console.warn) {
|
|
12443
12441
|
for (var s = arguments.length, e = new Array(s), t = 0; t < s; t++)
|
|
12444
12442
|
e[t] = arguments[t];
|
|
12445
|
-
|
|
12443
|
+
c1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
|
|
12446
12444
|
}
|
|
12447
12445
|
}
|
|
12448
12446
|
const h2 = {};
|
|
12449
|
-
function
|
|
12447
|
+
function Y1() {
|
|
12450
12448
|
for (var s = arguments.length, e = new Array(s), t = 0; t < s; t++)
|
|
12451
12449
|
e[t] = arguments[t];
|
|
12452
|
-
|
|
12450
|
+
c1(e[0]) && h2[e[0]] || (c1(e[0]) && (h2[e[0]] = /* @__PURE__ */ new Date()), j3(...e));
|
|
12453
12451
|
}
|
|
12454
12452
|
const k2 = (s, e) => () => {
|
|
12455
12453
|
if (s.isInitialized)
|
|
@@ -12465,7 +12463,7 @@ const k2 = (s, e) => () => {
|
|
|
12465
12463
|
}, c2 = (s, e, t) => {
|
|
12466
12464
|
s.loadNamespaces(e, k2(s, t));
|
|
12467
12465
|
}, C2 = (s, e, t, i) => {
|
|
12468
|
-
|
|
12466
|
+
c1(t) && (t = [t]), t.forEach((n) => {
|
|
12469
12467
|
s.options.ns.indexOf(n) < 0 && s.options.ns.push(n);
|
|
12470
12468
|
}), s.loadLanguages(e, k2(s, i));
|
|
12471
12469
|
}, W3 = function(s, e) {
|
|
@@ -12479,13 +12477,13 @@ const k2 = (s, e) => () => {
|
|
|
12479
12477
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !C(e.isLanguageChangingTo, s) ? !1 : !!(e.hasResourceBundle(i, s) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || C(i, s) && (!n || C(h, s)));
|
|
12480
12478
|
}, $3 = function(s, e) {
|
|
12481
12479
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
12482
|
-
return !e.languages || !e.languages.length ? (
|
|
12480
|
+
return !e.languages || !e.languages.length ? (Y1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(s, {
|
|
12483
12481
|
lng: t.lng,
|
|
12484
12482
|
precheck: (n, h) => {
|
|
12485
12483
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !h(n.isLanguageChangingTo, s)) return !1;
|
|
12486
12484
|
}
|
|
12487
12485
|
}) : W3(s, e, t);
|
|
12488
|
-
},
|
|
12486
|
+
}, c1 = (s) => typeof s == "string", T3 = (s) => typeof s == "object" && s !== null, P3 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, F3 = {
|
|
12489
12487
|
"&": "&",
|
|
12490
12488
|
"&": "&",
|
|
12491
12489
|
"<": "<",
|
|
@@ -12507,7 +12505,7 @@ const k2 = (s, e) => () => {
|
|
|
12507
12505
|
"/": "/",
|
|
12508
12506
|
"/": "/"
|
|
12509
12507
|
}, U3 = (s) => F3[s], z3 = (s) => s.replace(P3, U3);
|
|
12510
|
-
let
|
|
12508
|
+
let j1 = {
|
|
12511
12509
|
bindI18n: "languageChanged",
|
|
12512
12510
|
bindI18nStore: "",
|
|
12513
12511
|
transEmptyNodeValue: "",
|
|
@@ -12519,11 +12517,11 @@ let Y1 = {
|
|
|
12519
12517
|
};
|
|
12520
12518
|
const J3 = function() {
|
|
12521
12519
|
let s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
12522
|
-
|
|
12523
|
-
...
|
|
12520
|
+
j1 = {
|
|
12521
|
+
...j1,
|
|
12524
12522
|
...s
|
|
12525
12523
|
};
|
|
12526
|
-
}, q3 = () =>
|
|
12524
|
+
}, q3 = () => j1;
|
|
12527
12525
|
let v2;
|
|
12528
12526
|
const Q3 = (s) => {
|
|
12529
12527
|
v2 = s;
|
|
@@ -12545,24 +12543,24 @@ class i6 {
|
|
|
12545
12543
|
}
|
|
12546
12544
|
}
|
|
12547
12545
|
const s6 = (s, e) => {
|
|
12548
|
-
const t =
|
|
12549
|
-
return
|
|
12546
|
+
const t = O();
|
|
12547
|
+
return K(() => {
|
|
12550
12548
|
t.current = s;
|
|
12551
12549
|
}, [s, e]), t.current;
|
|
12552
|
-
}, N2 = (s, e, t, i) => s.getFixedT(e, t, i), n6 = (s, e, t, i) =>
|
|
12550
|
+
}, N2 = (s, e, t, i) => s.getFixedT(e, t, i), n6 = (s, e, t, i) => I(N2(s, e, t, i), [s, e, t, i]), o6 = function(s) {
|
|
12553
12551
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
12554
12552
|
const {
|
|
12555
12553
|
i18n: t
|
|
12556
12554
|
} = e, {
|
|
12557
12555
|
i18n: i,
|
|
12558
12556
|
defaultNS: n
|
|
12559
|
-
} =
|
|
12557
|
+
} = n1(t6) || {}, h = t || i || X3();
|
|
12560
12558
|
if (h && !h.reportNamespaces && (h.reportNamespaces = new i6()), !h) {
|
|
12561
|
-
|
|
12562
|
-
const
|
|
12563
|
-
return k.t =
|
|
12559
|
+
Y1("You will need to pass in an i18next instance by using initReactI18next");
|
|
12560
|
+
const x = (R, v) => c1(v) ? v : T3(v) && c1(v.defaultValue) ? v.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, k = [x, {}, !1];
|
|
12561
|
+
return k.t = x, k.i18n = {}, k.ready = !1, k;
|
|
12564
12562
|
}
|
|
12565
|
-
h.options.react && h.options.react.wait !== void 0 &&
|
|
12563
|
+
h.options.react && h.options.react.wait !== void 0 && Y1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
12566
12564
|
const C = {
|
|
12567
12565
|
...q3(),
|
|
12568
12566
|
...h.options.react,
|
|
@@ -12572,14 +12570,14 @@ const s6 = (s, e) => {
|
|
|
12572
12570
|
keyPrefix: r
|
|
12573
12571
|
} = C;
|
|
12574
12572
|
let l = s;
|
|
12575
|
-
l =
|
|
12576
|
-
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((
|
|
12573
|
+
l = c1(l) ? [l] : l || ["translation"], h.reportNamespaces.addUsedNamespaces && h.reportNamespaces.addUsedNamespaces(l);
|
|
12574
|
+
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((x) => $3(x, h, C)), p = n6(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => N2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [f, m] = A(u);
|
|
12577
12575
|
let L = l.join();
|
|
12578
12576
|
e.lng && (L = `${e.lng}${L}`);
|
|
12579
|
-
const M = s6(L), Z =
|
|
12580
|
-
|
|
12577
|
+
const M = s6(L), Z = O(!0);
|
|
12578
|
+
K(() => {
|
|
12581
12579
|
const {
|
|
12582
|
-
bindI18n:
|
|
12580
|
+
bindI18n: x,
|
|
12583
12581
|
bindI18nStore: k
|
|
12584
12582
|
} = C;
|
|
12585
12583
|
Z.current = !0, !a && !d && (e.lng ? C2(h, e.lng, l, () => {
|
|
@@ -12590,16 +12588,16 @@ const s6 = (s, e) => {
|
|
|
12590
12588
|
const R = () => {
|
|
12591
12589
|
Z.current && m(w);
|
|
12592
12590
|
};
|
|
12593
|
-
return
|
|
12594
|
-
Z.current = !1,
|
|
12591
|
+
return x && h && h.on(x, R), k && h && h.store.on(k, R), () => {
|
|
12592
|
+
Z.current = !1, x && h && x.split(" ").forEach((v) => h.off(v, R)), k && h && k.split(" ").forEach((v) => h.store.off(v, R));
|
|
12595
12593
|
};
|
|
12596
|
-
}, [h, L]),
|
|
12594
|
+
}, [h, L]), K(() => {
|
|
12597
12595
|
Z.current && a && m(u);
|
|
12598
12596
|
}, [h, r, a]);
|
|
12599
12597
|
const D = [f, h, a];
|
|
12600
12598
|
if (D.t = f, D.i18n = h, D.ready = a, a || !a && !d) return D;
|
|
12601
|
-
throw new Promise((
|
|
12602
|
-
e.lng ? C2(h, e.lng, l, () =>
|
|
12599
|
+
throw new Promise((x) => {
|
|
12600
|
+
e.lng ? C2(h, e.lng, l, () => x()) : c2(h, l, () => x());
|
|
12603
12601
|
});
|
|
12604
12602
|
}, l6 = "City", r6 = {
|
|
12605
12603
|
placeholder: l6
|
|
@@ -12607,12 +12605,12 @@ const s6 = (s, e) => {
|
|
|
12607
12605
|
placeholder: a6
|
|
12608
12606
|
};
|
|
12609
12607
|
function c6(s) {
|
|
12610
|
-
const e =
|
|
12611
|
-
return
|
|
12608
|
+
const e = O(s);
|
|
12609
|
+
return K(() => {
|
|
12612
12610
|
e.current = s;
|
|
12613
12611
|
}, [s]), e.current;
|
|
12614
12612
|
}
|
|
12615
|
-
|
|
12613
|
+
Y.use(e6).init({
|
|
12616
12614
|
defaultNS: "common",
|
|
12617
12615
|
lng: "en",
|
|
12618
12616
|
resources: {
|
|
@@ -12624,17 +12622,17 @@ I.use(e6).init({
|
|
|
12624
12622
|
}
|
|
12625
12623
|
}
|
|
12626
12624
|
});
|
|
12627
|
-
const f6 =
|
|
12625
|
+
const f6 = r1(
|
|
12628
12626
|
({ width: s, selectedCountry: e, onChange: t, value: i, id: n, disabled: h, clearable: C }, d) => {
|
|
12629
12627
|
const [r, l] = A(
|
|
12630
12628
|
[]
|
|
12631
|
-
), [a, p] = A(!1), { locale: u, axiosPeople: w } =
|
|
12629
|
+
), [a, p] = A(!1), { locale: u, axiosPeople: w } = n1(C1), f = O(!1), m = O(null), L = O(r), M = c6(e);
|
|
12632
12630
|
if (!w)
|
|
12633
12631
|
throw new Error(
|
|
12634
12632
|
`CitySelect requires "axiosPeople" to fetch cities.
|
|
12635
12633
|
Please provide it via SNMTUiContext.`
|
|
12636
12634
|
);
|
|
12637
|
-
const { t: Z } = o6("common", { lng: u }), D =
|
|
12635
|
+
const { t: Z } = o6("common", { lng: u }), D = I(
|
|
12638
12636
|
async (k) => {
|
|
12639
12637
|
const R = L.current.find((v) => v.value === k);
|
|
12640
12638
|
if (R)
|
|
@@ -12648,28 +12646,28 @@ const f6 = l1(
|
|
|
12648
12646
|
})).data.data;
|
|
12649
12647
|
if (!H.length)
|
|
12650
12648
|
return t(null), [];
|
|
12651
|
-
const
|
|
12649
|
+
const y = {
|
|
12652
12650
|
value: H[0].geoNameId,
|
|
12653
12651
|
label: H[0].name
|
|
12654
12652
|
};
|
|
12655
|
-
return L.current = [...L.current,
|
|
12653
|
+
return L.current = [...L.current, y], [y];
|
|
12656
12654
|
} catch (v) {
|
|
12657
12655
|
return console.error("CitySelect. fetchSelectedItems error", v), [];
|
|
12658
12656
|
}
|
|
12659
12657
|
},
|
|
12660
12658
|
[w, e, t]
|
|
12661
12659
|
);
|
|
12662
|
-
|
|
12660
|
+
K(() => {
|
|
12663
12661
|
(async () => {
|
|
12664
12662
|
if (!i) return;
|
|
12665
12663
|
const R = await D(i);
|
|
12666
12664
|
l(R);
|
|
12667
12665
|
})();
|
|
12668
|
-
}, []),
|
|
12666
|
+
}, []), K(() => {
|
|
12669
12667
|
var k;
|
|
12670
12668
|
M !== e ? f.current && (t(null), l([]), L.current = [], (k = m.current) == null || k.refetchOptions()) : f.current = !0;
|
|
12671
12669
|
}, [e, t, M]);
|
|
12672
|
-
const
|
|
12670
|
+
const x = I(
|
|
12673
12671
|
async ({
|
|
12674
12672
|
limit: k,
|
|
12675
12673
|
offset: R,
|
|
@@ -12683,13 +12681,13 @@ const f6 = l1(
|
|
|
12683
12681
|
includeCount: !0
|
|
12684
12682
|
};
|
|
12685
12683
|
H.filters = {}, e && e.length > 0 && (H.filters.countryId = [e]), v && (H.search = v);
|
|
12686
|
-
const
|
|
12684
|
+
const y = await w.post("v1/cities/search", H), z = (y == null ? void 0 : y.data.data) || [], B = y == null ? void 0 : y.data.metadata.count;
|
|
12687
12685
|
return {
|
|
12688
12686
|
options: z.map((F) => ({
|
|
12689
12687
|
value: F.geoNameId,
|
|
12690
12688
|
label: F.name
|
|
12691
12689
|
})),
|
|
12692
|
-
count:
|
|
12690
|
+
count: B,
|
|
12693
12691
|
limit: k
|
|
12694
12692
|
};
|
|
12695
12693
|
} catch (H) {
|
|
@@ -12704,7 +12702,7 @@ const f6 = l1(
|
|
|
12704
12702
|
},
|
|
12705
12703
|
[w, e]
|
|
12706
12704
|
);
|
|
12707
|
-
return
|
|
12705
|
+
return d1(d, () => m.current), /* @__PURE__ */ o("div", { className: "snmt-city-select", children: /* @__PURE__ */ o(
|
|
12708
12706
|
L3,
|
|
12709
12707
|
{
|
|
12710
12708
|
id: n,
|
|
@@ -12716,7 +12714,7 @@ const f6 = l1(
|
|
|
12716
12714
|
placeholder: Z("placeholder"),
|
|
12717
12715
|
disabled: h,
|
|
12718
12716
|
clearable: C,
|
|
12719
|
-
loadOptions:
|
|
12717
|
+
loadOptions: x,
|
|
12720
12718
|
preloadOptions: !0,
|
|
12721
12719
|
extraOptions: r,
|
|
12722
12720
|
isLoading: a
|