@snmt-react-ui/user-select 2.12.0 → 2.12.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/user-select.js +346 -348
- package/package.json +4 -4
package/dist/user-select.js
CHANGED
|
@@ -3,22 +3,22 @@ var H2 = (i, e, t) => e in i ? Z2(i, e, { enumerable: !0, configurable: !0, writ
|
|
|
3
3
|
var T1 = (i, e, t) => H2(i, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import "./index.css";
|
|
5
5
|
import { jsx as o, Fragment as i1, jsxs as g } from "react/jsx-runtime";
|
|
6
|
-
import { forwardRef as
|
|
7
|
-
import { Select as _2, Tag as
|
|
8
|
-
import { COLORS as c, SNMTUiContext as
|
|
9
|
-
var D2 = Object.defineProperty,
|
|
6
|
+
import { forwardRef as r1, useState as K, useRef as J, useCallback as $, useEffect as G, useMemo as P1, useImperativeHandle as C1, useContext as o1, createContext as w2 } from "react";
|
|
7
|
+
import { Select as _2, Tag as $1, Flex as b2, Checkbox as y2, Avatar as A2, Typography as v1, Popover as E2 } from "antd";
|
|
8
|
+
import { COLORS as c, SNMTUiContext as d1 } from "@snmt-react-ui/core";
|
|
9
|
+
var D2 = Object.defineProperty, K2 = (i, e, t) => e in i ? D2(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t, B2 = (i, e, t) => K2(i, e + "", t), S2 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
10
10
|
function G2() {
|
|
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];
|
|
14
|
-
|
|
14
|
+
h1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
const F1 = {};
|
|
18
|
-
function
|
|
18
|
+
function I1() {
|
|
19
19
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
20
20
|
e[t] = arguments[t];
|
|
21
|
-
|
|
21
|
+
h1(e[0]) && F1[e[0]] || (h1(e[0]) && (F1[e[0]] = /* @__PURE__ */ new Date()), G2(...e));
|
|
22
22
|
}
|
|
23
23
|
const p2 = (i, e) => () => {
|
|
24
24
|
if (i.isInitialized)
|
|
@@ -34,7 +34,7 @@ const p2 = (i, e) => () => {
|
|
|
34
34
|
}, U1 = (i, e, t) => {
|
|
35
35
|
i.loadNamespaces(e, p2(i, t));
|
|
36
36
|
}, z1 = (i, e, t, s) => {
|
|
37
|
-
|
|
37
|
+
h1(t) && (t = [t]), t.forEach((n) => {
|
|
38
38
|
i.options.ns.indexOf(n) < 0 && i.options.ns.push(n);
|
|
39
39
|
}), i.loadLanguages(e, p2(i, s));
|
|
40
40
|
}, O2 = function(i, e) {
|
|
@@ -48,13 +48,13 @@ const p2 = (i, e) => () => {
|
|
|
48
48
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !C(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || C(s, i) && (!n || C(h, i)));
|
|
49
49
|
}, I2 = function(i, 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 ? (I1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
|
|
52
52
|
lng: t.lng,
|
|
53
53
|
precheck: (s, n) => {
|
|
54
54
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && s.services.backendConnector.backend && s.isLanguageChangingTo && !n(s.isLanguageChangingTo, i)) return !1;
|
|
55
55
|
}
|
|
56
56
|
}) : O2(i, e, t);
|
|
57
|
-
},
|
|
57
|
+
}, h1 = (i) => typeof i == "string", Y2 = (i) => typeof i == "object" && i !== null, j2 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, W2 = {
|
|
58
58
|
"&": "&",
|
|
59
59
|
"&": "&",
|
|
60
60
|
"<": "<",
|
|
@@ -91,7 +91,7 @@ let U2;
|
|
|
91
91
|
const z2 = () => U2, J2 = w2();
|
|
92
92
|
class q2 {
|
|
93
93
|
constructor() {
|
|
94
|
-
|
|
94
|
+
B2(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces)), this.usedNamespaces = {};
|
|
95
95
|
}
|
|
96
96
|
addUsedNamespaces(e) {
|
|
97
97
|
e.forEach((t) => {
|
|
@@ -100,7 +100,7 @@ class q2 {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
const Q2 = (i, e) => {
|
|
103
|
-
const t =
|
|
103
|
+
const t = J();
|
|
104
104
|
return G(() => {
|
|
105
105
|
t.current = i;
|
|
106
106
|
}, [i, e]), t.current;
|
|
@@ -111,13 +111,13 @@ const Q2 = (i, e) => {
|
|
|
111
111
|
} = e, {
|
|
112
112
|
i18n: s,
|
|
113
113
|
defaultNS: n
|
|
114
|
-
} =
|
|
114
|
+
} = o1(J2) || {}, h = t || s || z2();
|
|
115
115
|
if (h && !h.reportNamespaces && (h.reportNamespaces = new q2()), !h) {
|
|
116
|
-
|
|
117
|
-
const k = (R, x) =>
|
|
116
|
+
I1("You will need to pass in an i18next instance by using initReactI18next");
|
|
117
|
+
const k = (R, x) => h1(x) ? x : Y2(x) && h1(x.defaultValue) ? x.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, N = [k, {}, !1];
|
|
118
118
|
return N.t = k, N.i18n = {}, N.ready = !1, N;
|
|
119
119
|
}
|
|
120
|
-
h.options.react && h.options.react.wait !== void 0 &&
|
|
120
|
+
h.options.react && h.options.react.wait !== void 0 && I1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
121
121
|
const C = {
|
|
122
122
|
...F2(),
|
|
123
123
|
...h.options.react,
|
|
@@ -127,11 +127,11 @@ const Q2 = (i, e) => {
|
|
|
127
127
|
keyPrefix: r
|
|
128
128
|
} = C;
|
|
129
129
|
let l = i;
|
|
130
|
-
l =
|
|
131
|
-
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((k) => I2(k, h, C)), p = X2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => f2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [L, m] =
|
|
130
|
+
l = h1(l) ? [l] : l || ["translation"], h.reportNamespaces.addUsedNamespaces && h.reportNamespaces.addUsedNamespaces(l);
|
|
131
|
+
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((k) => I2(k, h, C)), p = X2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => f2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [L, m] = K(u);
|
|
132
132
|
let f = l.join();
|
|
133
133
|
e.lng && (f = `${e.lng}${f}`);
|
|
134
|
-
const M = Q2(f), Z =
|
|
134
|
+
const M = Q2(f), Z = J(!0);
|
|
135
135
|
G(() => {
|
|
136
136
|
const {
|
|
137
137
|
bindI18n: k,
|
|
@@ -151,8 +151,8 @@ const Q2 = (i, e) => {
|
|
|
151
151
|
}, [h, f]), G(() => {
|
|
152
152
|
Z.current && a && m(u);
|
|
153
153
|
}, [h, r, a]);
|
|
154
|
-
const
|
|
155
|
-
if (
|
|
154
|
+
const A = [L, h, a];
|
|
155
|
+
if (A.t = L, A.i18n = h, A.ready = a, a || !a && !d) return A;
|
|
156
156
|
throw new Promise((k) => {
|
|
157
157
|
e.lng ? z1(h, e.lng, l, () => k()) : U1(h, l, () => k());
|
|
158
158
|
});
|
|
@@ -183,7 +183,7 @@ const Q2 = (i, e) => {
|
|
|
183
183
|
h2: 2,
|
|
184
184
|
h3: 3,
|
|
185
185
|
h4: 4
|
|
186
|
-
}, J1 =
|
|
186
|
+
}, J1 = r1(
|
|
187
187
|
({
|
|
188
188
|
align: i = "inherit",
|
|
189
189
|
variant: e = "body1",
|
|
@@ -195,9 +195,9 @@ const Q2 = (i, 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
|
-
|
|
200
|
-
const [a, p] =
|
|
198
|
+
const l = J(null);
|
|
199
|
+
C1(r, () => l.current);
|
|
200
|
+
const [a, p] = K(!1);
|
|
201
201
|
G(() => {
|
|
202
202
|
var m;
|
|
203
203
|
if (!d) return;
|
|
@@ -251,7 +251,7 @@ const Q2 = (i, e) => {
|
|
|
251
251
|
style: { gap: i ? e === "large" || e === "medium" ? 12 : 8 : 0 },
|
|
252
252
|
children: [
|
|
253
253
|
/* @__PURE__ */ o(
|
|
254
|
-
|
|
254
|
+
A2,
|
|
255
255
|
{
|
|
256
256
|
className: `snmt-avatar ${n ? "image" : ""}`,
|
|
257
257
|
src: n,
|
|
@@ -275,7 +275,7 @@ const Q2 = (i, e) => {
|
|
|
275
275
|
h2: 2,
|
|
276
276
|
h3: 3,
|
|
277
277
|
h4: 4
|
|
278
|
-
}, a5 =
|
|
278
|
+
}, a5 = r1(
|
|
279
279
|
({
|
|
280
280
|
align: i = "inherit",
|
|
281
281
|
variant: e = "body1",
|
|
@@ -287,9 +287,9 @@ const Q2 = (i, 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
|
-
|
|
292
|
-
const [a, p] =
|
|
290
|
+
const l = J(null);
|
|
291
|
+
C1(r, () => l.current);
|
|
292
|
+
const [a, p] = K(!1);
|
|
293
293
|
G(() => {
|
|
294
294
|
var m;
|
|
295
295
|
if (!d) return;
|
|
@@ -327,11 +327,11 @@ const Q2 = (i, e) => {
|
|
|
327
327
|
disabled: n = !1,
|
|
328
328
|
disableUncheck: h = !1
|
|
329
329
|
}) => {
|
|
330
|
-
const [C, d] =
|
|
330
|
+
const [C, d] = K(i), [r, l] = K(e);
|
|
331
331
|
G(() => {
|
|
332
332
|
d(i), l(e);
|
|
333
333
|
}, [i, e]);
|
|
334
|
-
const { theme: a } =
|
|
334
|
+
const { theme: a } = o1(d1);
|
|
335
335
|
return /* @__PURE__ */ o(
|
|
336
336
|
y2,
|
|
337
337
|
{
|
|
@@ -1143,7 +1143,7 @@ const Q2 = (i, e) => {
|
|
|
1143
1143
|
)
|
|
1144
1144
|
]
|
|
1145
1145
|
}
|
|
1146
|
-
),
|
|
1146
|
+
), A5 = ({
|
|
1147
1147
|
width: i = 20,
|
|
1148
1148
|
height: e = 20,
|
|
1149
1149
|
color: t = c.GREY_DARK_5,
|
|
@@ -1176,7 +1176,7 @@ const Q2 = (i, e) => {
|
|
|
1176
1176
|
)
|
|
1177
1177
|
]
|
|
1178
1178
|
}
|
|
1179
|
-
),
|
|
1179
|
+
), E5 = ({
|
|
1180
1180
|
width: i = 20,
|
|
1181
1181
|
height: e = 20,
|
|
1182
1182
|
color: t = c.GREY_DARK_5,
|
|
@@ -1249,7 +1249,7 @@ const Q2 = (i, e) => {
|
|
|
1249
1249
|
)
|
|
1250
1250
|
]
|
|
1251
1251
|
}
|
|
1252
|
-
),
|
|
1252
|
+
), K5 = ({
|
|
1253
1253
|
width: i = 20,
|
|
1254
1254
|
height: e = 20,
|
|
1255
1255
|
color: t = c.GREY_DARK_5,
|
|
@@ -1282,7 +1282,7 @@ const Q2 = (i, e) => {
|
|
|
1282
1282
|
)
|
|
1283
1283
|
]
|
|
1284
1284
|
}
|
|
1285
|
-
),
|
|
1285
|
+
), B5 = ({
|
|
1286
1286
|
width: i = 20,
|
|
1287
1287
|
height: e = 20,
|
|
1288
1288
|
color: t = "#070739",
|
|
@@ -2609,7 +2609,7 @@ const Q2 = (i, e) => {
|
|
|
2609
2609
|
disabled: h = !1,
|
|
2610
2610
|
onClick: C
|
|
2611
2611
|
}) => {
|
|
2612
|
-
const { theme: d } =
|
|
2612
|
+
const { theme: d } = o1(d1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : s, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
2613
2613
|
return /* @__PURE__ */ o(i1, { children: (() => {
|
|
2614
2614
|
switch (i) {
|
|
2615
2615
|
case "nextIcon":
|
|
@@ -2665,15 +2665,15 @@ const Q2 = (i, e) => {
|
|
|
2665
2665
|
case "settings":
|
|
2666
2666
|
return y5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2667
2667
|
case "trash":
|
|
2668
|
-
return E5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2669
|
-
case "settings2":
|
|
2670
2668
|
return A5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2669
|
+
case "settings2":
|
|
2670
|
+
return E5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2671
2671
|
case "checkCircle":
|
|
2672
2672
|
return D5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2673
2673
|
case "cancelCircle":
|
|
2674
|
-
return
|
|
2674
|
+
return K5({ width: e, height: t, color: r, className: a, onClick: l });
|
|
2675
2675
|
case "visibilityIcon":
|
|
2676
|
-
return
|
|
2676
|
+
return B5({
|
|
2677
2677
|
width: e,
|
|
2678
2678
|
height: t,
|
|
2679
2679
|
color: r,
|
|
@@ -2791,7 +2791,7 @@ const Q2 = (i, e) => {
|
|
|
2791
2791
|
h2: 2,
|
|
2792
2792
|
h3: 3,
|
|
2793
2793
|
h4: 4
|
|
2794
|
-
}, x7 =
|
|
2794
|
+
}, x7 = r1(
|
|
2795
2795
|
({
|
|
2796
2796
|
align: i = "inherit",
|
|
2797
2797
|
variant: e = "body1",
|
|
@@ -2803,9 +2803,9 @@ const Q2 = (i, 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
|
-
|
|
2808
|
-
const [a, p] =
|
|
2806
|
+
const l = J(null);
|
|
2807
|
+
C1(r, () => l.current);
|
|
2808
|
+
const [a, p] = K(!1);
|
|
2809
2809
|
G(() => {
|
|
2810
2810
|
var m;
|
|
2811
2811
|
if (!d) return;
|
|
@@ -3086,7 +3086,7 @@ const Q2 = (i, e) => {
|
|
|
3086
3086
|
)
|
|
3087
3087
|
]
|
|
3088
3088
|
}
|
|
3089
|
-
),
|
|
3089
|
+
), A7 = ({
|
|
3090
3090
|
width: i = 20,
|
|
3091
3091
|
height: e = 20,
|
|
3092
3092
|
color: t = c.GREY_DARK_5,
|
|
@@ -3110,7 +3110,7 @@ const Q2 = (i, e) => {
|
|
|
3110
3110
|
}
|
|
3111
3111
|
)
|
|
3112
3112
|
}
|
|
3113
|
-
),
|
|
3113
|
+
), E7 = ({
|
|
3114
3114
|
width: i = 20,
|
|
3115
3115
|
height: e = 20,
|
|
3116
3116
|
color: t = c.GREY_DARK_5,
|
|
@@ -3158,7 +3158,7 @@ const Q2 = (i, e) => {
|
|
|
3158
3158
|
}
|
|
3159
3159
|
)
|
|
3160
3160
|
}
|
|
3161
|
-
),
|
|
3161
|
+
), K7 = ({
|
|
3162
3162
|
width: i = 20,
|
|
3163
3163
|
height: e = 20,
|
|
3164
3164
|
color: t = c.GREY_DARK_5,
|
|
@@ -3219,7 +3219,7 @@ const Q2 = (i, e) => {
|
|
|
3219
3219
|
)
|
|
3220
3220
|
]
|
|
3221
3221
|
}
|
|
3222
|
-
),
|
|
3222
|
+
), B7 = ({
|
|
3223
3223
|
width: i = 20,
|
|
3224
3224
|
height: e = 20,
|
|
3225
3225
|
color: t = c.GREY_DARK_5,
|
|
@@ -5029,7 +5029,7 @@ const Q2 = (i, e) => {
|
|
|
5029
5029
|
)
|
|
5030
5030
|
]
|
|
5031
5031
|
}
|
|
5032
|
-
),
|
|
5032
|
+
), A0 = ({
|
|
5033
5033
|
width: i = 24,
|
|
5034
5034
|
height: e = 24,
|
|
5035
5035
|
color: t = c.GREY_DARK_2,
|
|
@@ -5056,7 +5056,7 @@ const Q2 = (i, e) => {
|
|
|
5056
5056
|
}
|
|
5057
5057
|
)
|
|
5058
5058
|
}
|
|
5059
|
-
),
|
|
5059
|
+
), E0 = ({
|
|
5060
5060
|
width: i = 24,
|
|
5061
5061
|
height: e = 24,
|
|
5062
5062
|
color: t = c.GREY_DARK_2,
|
|
@@ -5092,7 +5092,7 @@ const Q2 = (i, e) => {
|
|
|
5092
5092
|
disabled: h = !1,
|
|
5093
5093
|
onClick: C
|
|
5094
5094
|
}) => {
|
|
5095
|
-
const { theme: d } =
|
|
5095
|
+
const { theme: d } = o1(d1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : s, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
5096
5096
|
return /* @__PURE__ */ o(i1, { children: (() => {
|
|
5097
5097
|
switch (i) {
|
|
5098
5098
|
case "nextIcon":
|
|
@@ -5108,15 +5108,15 @@ const Q2 = (i, e) => {
|
|
|
5108
5108
|
case "calendar":
|
|
5109
5109
|
return y7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5110
5110
|
case "check":
|
|
5111
|
-
return E7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5112
|
-
case "cancel":
|
|
5113
5111
|
return A7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5112
|
+
case "cancel":
|
|
5113
|
+
return E7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5114
5114
|
case "add":
|
|
5115
5115
|
return D7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5116
5116
|
case "list":
|
|
5117
|
-
return B7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5118
|
-
case "dragAndDrop":
|
|
5119
5117
|
return K7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5118
|
+
case "dragAndDrop":
|
|
5119
|
+
return B7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5120
5120
|
case "filter":
|
|
5121
5121
|
return S7({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5122
5122
|
case "attention":
|
|
@@ -5262,9 +5262,9 @@ const Q2 = (i, e) => {
|
|
|
5262
5262
|
case "openPointCircle":
|
|
5263
5263
|
return y0({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5264
5264
|
case "community":
|
|
5265
|
-
return E0({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5266
|
-
case "docs":
|
|
5267
5265
|
return A0({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5266
|
+
case "docs":
|
|
5267
|
+
return E0({ width: e, height: t, color: r, className: a, onClick: l });
|
|
5268
5268
|
default:
|
|
5269
5269
|
return /* @__PURE__ */ o(i1, { children: "No Icon provided" });
|
|
5270
5270
|
}
|
|
@@ -5281,7 +5281,7 @@ const Q2 = (i, e) => {
|
|
|
5281
5281
|
h || s == null || s();
|
|
5282
5282
|
};
|
|
5283
5283
|
return /* @__PURE__ */ o(
|
|
5284
|
-
|
|
5284
|
+
$1,
|
|
5285
5285
|
{
|
|
5286
5286
|
className: `snmt-tag ${t} ${h ? "disabled" : ""}`,
|
|
5287
5287
|
closeIcon: /* @__PURE__ */ o(
|
|
@@ -5307,12 +5307,12 @@ const Q2 = (i, e) => {
|
|
|
5307
5307
|
) : i
|
|
5308
5308
|
}
|
|
5309
5309
|
);
|
|
5310
|
-
}, { Title:
|
|
5310
|
+
}, { Title: K0, Text: B0 } = v1, S0 = {
|
|
5311
5311
|
h1: 1,
|
|
5312
5312
|
h2: 2,
|
|
5313
5313
|
h3: 3,
|
|
5314
5314
|
h4: 4
|
|
5315
|
-
}, G0 =
|
|
5315
|
+
}, G0 = r1(
|
|
5316
5316
|
({
|
|
5317
5317
|
align: i = "inherit",
|
|
5318
5318
|
variant: e = "body1",
|
|
@@ -5324,9 +5324,9 @@ const Q2 = (i, 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
|
-
|
|
5329
|
-
const [a, p] =
|
|
5327
|
+
const l = J(null);
|
|
5328
|
+
C1(r, () => l.current);
|
|
5329
|
+
const [a, p] = K(!1);
|
|
5330
5330
|
G(() => {
|
|
5331
5331
|
var m;
|
|
5332
5332
|
if (!d) return;
|
|
@@ -5354,7 +5354,7 @@ const Q2 = (i, e) => {
|
|
|
5354
5354
|
}
|
|
5355
5355
|
} : void 0
|
|
5356
5356
|
};
|
|
5357
|
-
return u ? /* @__PURE__ */ o(
|
|
5357
|
+
return u ? /* @__PURE__ */ o(K0, { level: S0[e], ...L, children: s }) : /* @__PURE__ */ o(B0, { ...L, children: s });
|
|
5358
5358
|
}
|
|
5359
5359
|
), O0 = ({
|
|
5360
5360
|
children: i,
|
|
@@ -5365,9 +5365,9 @@ const Q2 = (i, e) => {
|
|
|
5365
5365
|
noPadding: h = !1,
|
|
5366
5366
|
trigger: C = "click"
|
|
5367
5367
|
}) => {
|
|
5368
|
-
const [d, r] =
|
|
5368
|
+
const [d, r] = K(!1);
|
|
5369
5369
|
return /* @__PURE__ */ o(
|
|
5370
|
-
|
|
5370
|
+
E2,
|
|
5371
5371
|
{
|
|
5372
5372
|
content: e,
|
|
5373
5373
|
arrow: !1,
|
|
@@ -5386,7 +5386,7 @@ const Q2 = (i, e) => {
|
|
|
5386
5386
|
h2: 2,
|
|
5387
5387
|
h3: 3,
|
|
5388
5388
|
h4: 4
|
|
5389
|
-
}, m2 =
|
|
5389
|
+
}, m2 = r1(
|
|
5390
5390
|
({
|
|
5391
5391
|
align: i = "inherit",
|
|
5392
5392
|
variant: e = "body1",
|
|
@@ -5398,9 +5398,9 @@ const Q2 = (i, 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
|
-
|
|
5403
|
-
const [a, p] =
|
|
5401
|
+
const l = J(null);
|
|
5402
|
+
C1(r, () => l.current);
|
|
5403
|
+
const [a, p] = K(!1);
|
|
5404
5404
|
G(() => {
|
|
5405
5405
|
var m;
|
|
5406
5406
|
if (!d) return;
|
|
@@ -6909,7 +6909,7 @@ const Q2 = (i, e) => {
|
|
|
6909
6909
|
)
|
|
6910
6910
|
]
|
|
6911
6911
|
}
|
|
6912
|
-
),
|
|
6912
|
+
), A9 = ({
|
|
6913
6913
|
className: i,
|
|
6914
6914
|
color: e = c.GREY_DARK_3,
|
|
6915
6915
|
height: t = 14,
|
|
@@ -6946,7 +6946,7 @@ const Q2 = (i, e) => {
|
|
|
6946
6946
|
)
|
|
6947
6947
|
]
|
|
6948
6948
|
}
|
|
6949
|
-
),
|
|
6949
|
+
), E9 = ({
|
|
6950
6950
|
className: i,
|
|
6951
6951
|
color: e = c.GREY_DARK_5,
|
|
6952
6952
|
height: t = 18,
|
|
@@ -7025,7 +7025,7 @@ const Q2 = (i, e) => {
|
|
|
7025
7025
|
)
|
|
7026
7026
|
]
|
|
7027
7027
|
}
|
|
7028
|
-
),
|
|
7028
|
+
), K9 = ({
|
|
7029
7029
|
className: i,
|
|
7030
7030
|
color: e = c.GREY_DARK_5,
|
|
7031
7031
|
height: t = 24,
|
|
@@ -7062,7 +7062,7 @@ const Q2 = (i, e) => {
|
|
|
7062
7062
|
)
|
|
7063
7063
|
]
|
|
7064
7064
|
}
|
|
7065
|
-
),
|
|
7065
|
+
), B9 = ({
|
|
7066
7066
|
className: i,
|
|
7067
7067
|
color: e = c.NOTIFICATION_WARNING_DARK,
|
|
7068
7068
|
height: t = 37,
|
|
@@ -7678,7 +7678,7 @@ const Q2 = (i, e) => {
|
|
|
7678
7678
|
}
|
|
7679
7679
|
)
|
|
7680
7680
|
}
|
|
7681
|
-
),
|
|
7681
|
+
), _1 = ({
|
|
7682
7682
|
name: i,
|
|
7683
7683
|
width: e,
|
|
7684
7684
|
height: t,
|
|
@@ -7687,7 +7687,7 @@ const Q2 = (i, e) => {
|
|
|
7687
7687
|
disabled: h = !1,
|
|
7688
7688
|
onClick: C
|
|
7689
7689
|
}) => {
|
|
7690
|
-
const { theme: d } =
|
|
7690
|
+
const { theme: d } = o1(d1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : s, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
7691
7691
|
return /* @__PURE__ */ o(i1, { children: (() => {
|
|
7692
7692
|
switch (i) {
|
|
7693
7693
|
case "nextIcon":
|
|
@@ -7819,15 +7819,15 @@ const Q2 = (i, e) => {
|
|
|
7819
7819
|
case "linkedIn":
|
|
7820
7820
|
return b9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7821
7821
|
case "emptyStateIcon":
|
|
7822
|
-
return E9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7823
|
-
case "filtersIcon":
|
|
7824
7822
|
return A9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7823
|
+
case "filtersIcon":
|
|
7824
|
+
return E9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7825
7825
|
case "dotMenuIcon":
|
|
7826
7826
|
return D9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7827
7827
|
case "plusCircle":
|
|
7828
|
-
return B9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7829
|
-
case "warning":
|
|
7830
7828
|
return K9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7829
|
+
case "warning":
|
|
7830
|
+
return B9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7831
7831
|
case "back":
|
|
7832
7832
|
return S9({ width: e, height: t, color: r, className: a, onClick: l });
|
|
7833
7833
|
case "bell":
|
|
@@ -7880,7 +7880,7 @@ const Q2 = (i, e) => {
|
|
|
7880
7880
|
purple: c.PURPLE_LIGHT
|
|
7881
7881
|
};
|
|
7882
7882
|
return /* @__PURE__ */ o(
|
|
7883
|
-
|
|
7883
|
+
$1,
|
|
7884
7884
|
{
|
|
7885
7885
|
className: `snmt-regular-badge snmt-regular-badge--${t}`,
|
|
7886
7886
|
style: {
|
|
@@ -7898,7 +7898,7 @@ const Q2 = (i, 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 Q2 = (i, 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 Q2 = (i, 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 Q2 = (i, e) => {
|
|
|
7929
7929
|
canceled: c.GREY_DARK_3
|
|
7930
7930
|
};
|
|
7931
7931
|
return /* @__PURE__ */ g(
|
|
7932
|
-
|
|
7932
|
+
$1,
|
|
7933
7933
|
{
|
|
7934
7934
|
className: `snmt-status-badge snmt-status-badge--${t ? "with-icon" : "without-icon"}`,
|
|
7935
7935
|
style: { background: h[e], width: s ?? "fit-content" },
|
|
@@ -7961,7 +7961,7 @@ const i4 = ({
|
|
|
7961
7961
|
extraOptions: C,
|
|
7962
7962
|
selectedItemVariant: d = "default"
|
|
7963
7963
|
}) => {
|
|
7964
|
-
const { locale: r } =
|
|
7964
|
+
const { locale: r } = o1(d1), { t: l } = e5("common", { lng: r }), [a, p] = K(!1);
|
|
7965
7965
|
if (G(() => {
|
|
7966
7966
|
i.length || p(!1);
|
|
7967
7967
|
}, [i]), !i.length)
|
|
@@ -9020,7 +9020,7 @@ const i4 = ({
|
|
|
9020
9020
|
)
|
|
9021
9021
|
]
|
|
9022
9022
|
}
|
|
9023
|
-
),
|
|
9023
|
+
), A4 = ({
|
|
9024
9024
|
width: i = 9,
|
|
9025
9025
|
height: e = 5,
|
|
9026
9026
|
color: t = "#001E52",
|
|
@@ -9046,7 +9046,7 @@ const i4 = ({
|
|
|
9046
9046
|
}
|
|
9047
9047
|
)
|
|
9048
9048
|
}
|
|
9049
|
-
),
|
|
9049
|
+
), E4 = ({
|
|
9050
9050
|
width: i = 20,
|
|
9051
9051
|
height: e = 20,
|
|
9052
9052
|
color: t = "#F2F2F7",
|
|
@@ -9104,7 +9104,7 @@ const i4 = ({
|
|
|
9104
9104
|
)
|
|
9105
9105
|
]
|
|
9106
9106
|
}
|
|
9107
|
-
),
|
|
9107
|
+
), K4 = ({
|
|
9108
9108
|
width: i = 10,
|
|
9109
9109
|
height: e = 10,
|
|
9110
9110
|
color: t = "#001E52",
|
|
@@ -9133,7 +9133,7 @@ const i4 = ({
|
|
|
9133
9133
|
)
|
|
9134
9134
|
]
|
|
9135
9135
|
}
|
|
9136
|
-
),
|
|
9136
|
+
), B4 = ({
|
|
9137
9137
|
width: i = 10,
|
|
9138
9138
|
height: e = 10,
|
|
9139
9139
|
color: t = "#001E52",
|
|
@@ -10279,7 +10279,7 @@ const i4 = ({
|
|
|
10279
10279
|
disabled: h = !1,
|
|
10280
10280
|
onClick: C
|
|
10281
10281
|
}) => {
|
|
10282
|
-
const { theme: d } =
|
|
10282
|
+
const { theme: d } = o1(d1), r = h ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : s, l = h ? void 0 : C, a = C && !h ? `${n || ""} clickable` : n;
|
|
10283
10283
|
return /* @__PURE__ */ o(i1, { children: (() => {
|
|
10284
10284
|
switch (i) {
|
|
10285
10285
|
case "nextIcon":
|
|
@@ -10359,7 +10359,7 @@ const i4 = ({
|
|
|
10359
10359
|
onClick: l
|
|
10360
10360
|
});
|
|
10361
10361
|
case "selectArrowIcon":
|
|
10362
|
-
return
|
|
10362
|
+
return A4({
|
|
10363
10363
|
width: e,
|
|
10364
10364
|
height: t,
|
|
10365
10365
|
color: r,
|
|
@@ -10367,7 +10367,7 @@ const i4 = ({
|
|
|
10367
10367
|
onClick: l
|
|
10368
10368
|
});
|
|
10369
10369
|
case "expandArrowIcon":
|
|
10370
|
-
return
|
|
10370
|
+
return E4({
|
|
10371
10371
|
width: e,
|
|
10372
10372
|
height: t,
|
|
10373
10373
|
color: r,
|
|
@@ -10383,9 +10383,9 @@ const i4 = ({
|
|
|
10383
10383
|
onClick: l
|
|
10384
10384
|
});
|
|
10385
10385
|
case "sortUp":
|
|
10386
|
-
return B4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10387
|
-
case "sortDown":
|
|
10388
10386
|
return K4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10387
|
+
case "sortDown":
|
|
10388
|
+
return B4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10389
10389
|
case "search":
|
|
10390
10390
|
return S4({ width: e, height: t, color: r, className: a, onClick: l });
|
|
10391
10391
|
case "arrowUpFilled":
|
|
@@ -10487,7 +10487,7 @@ function p3(i, e) {
|
|
|
10487
10487
|
function f3(i, e) {
|
|
10488
10488
|
return e ? c.GREY_DARK_2 : i ? c.GREY_LIGHT_0 : c.GREY_DARK_4;
|
|
10489
10489
|
}
|
|
10490
|
-
const L3 =
|
|
10490
|
+
const L3 = r1((i, e) => {
|
|
10491
10491
|
const {
|
|
10492
10492
|
value: t,
|
|
10493
10493
|
onChange: s,
|
|
@@ -10506,25 +10506,25 @@ const L3 = l1((i, e) => {
|
|
|
10506
10506
|
onPopupScroll: f,
|
|
10507
10507
|
id: M,
|
|
10508
10508
|
extraOptions: Z,
|
|
10509
|
-
dropdownRender:
|
|
10509
|
+
dropdownRender: A,
|
|
10510
10510
|
optionRender: k,
|
|
10511
10511
|
isLoading: N,
|
|
10512
10512
|
readOnly: R,
|
|
10513
10513
|
error: x,
|
|
10514
|
-
selectedItemVariant:
|
|
10514
|
+
selectedItemVariant: B = "default",
|
|
10515
10515
|
variant: Y = "outlined"
|
|
10516
10516
|
} = i;
|
|
10517
10517
|
let Q;
|
|
10518
10518
|
h && h !== "single" && (Q = i.overflowBehaviour ?? "responsive");
|
|
10519
|
-
const [H, S] =
|
|
10519
|
+
const [H, S] = K(!1), [j, W] = K(!1), [E, I] = K(!1), [F, b] = K(!0), [_, O] = K(t), l1 = J(null);
|
|
10520
10520
|
G(() => {
|
|
10521
10521
|
O(t);
|
|
10522
10522
|
}, [t]);
|
|
10523
10523
|
const N1 = (v) => {
|
|
10524
10524
|
S(v), L && L(v);
|
|
10525
|
-
}, x1 = (v,
|
|
10526
|
-
var
|
|
10527
|
-
return !!((
|
|
10525
|
+
}, x1 = (v, y) => {
|
|
10526
|
+
var T;
|
|
10527
|
+
return !!((T = y == null ? void 0 : y.label) != null && T.toString().toLowerCase().includes(v.toLowerCase()));
|
|
10528
10528
|
}, M1 = () => {
|
|
10529
10529
|
W(!0);
|
|
10530
10530
|
}, R1 = () => {
|
|
@@ -10532,14 +10532,14 @@ const L3 = l1((i, e) => {
|
|
|
10532
10532
|
}, s1 = $(
|
|
10533
10533
|
(v) => {
|
|
10534
10534
|
if (O(v), h && h !== "single") {
|
|
10535
|
-
const
|
|
10536
|
-
s == null || s(
|
|
10535
|
+
const T = v;
|
|
10536
|
+
s == null || s(T);
|
|
10537
10537
|
return;
|
|
10538
10538
|
}
|
|
10539
|
-
let
|
|
10540
|
-
Array.isArray(v) &&
|
|
10539
|
+
let y = null;
|
|
10540
|
+
Array.isArray(v) && B === "badge" ? y = v.length > 0 ? v[0] : null : Array.isArray(v) || (y = v || null), s == null || s(y);
|
|
10541
10541
|
},
|
|
10542
|
-
[h, s,
|
|
10542
|
+
[h, s, B]
|
|
10543
10543
|
), V1 = $(() => {
|
|
10544
10544
|
if (!(R || l)) {
|
|
10545
10545
|
if (h) {
|
|
@@ -10548,67 +10548,67 @@ const L3 = l1((i, e) => {
|
|
|
10548
10548
|
}
|
|
10549
10549
|
s1("");
|
|
10550
10550
|
}
|
|
10551
|
-
}, [l, s1, h, R]),
|
|
10551
|
+
}, [l, s1, h, R]), a1 = $(
|
|
10552
10552
|
(v) => {
|
|
10553
|
-
const
|
|
10554
|
-
s1(
|
|
10553
|
+
const y = _.filter((T) => T !== v);
|
|
10554
|
+
s1(y), O(y);
|
|
10555
10555
|
},
|
|
10556
|
-
[s1,
|
|
10556
|
+
[s1, _]
|
|
10557
10557
|
), Z1 = $(
|
|
10558
|
-
(v) => (
|
|
10558
|
+
(v) => (_ == null ? void 0 : _.indexOf(v)) === 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: F ? n : "" })
|
|
10562
10562
|
) : /* @__PURE__ */ o(i1, {}),
|
|
10563
|
-
[
|
|
10564
|
-
),
|
|
10563
|
+
[F, _, n]
|
|
10564
|
+
), D = (v) => {
|
|
10565
10565
|
v.preventDefault(), v.stopPropagation();
|
|
10566
|
-
},
|
|
10567
|
-
const { target:
|
|
10568
|
-
|
|
10566
|
+
}, U = async (v) => {
|
|
10567
|
+
const { target: y } = v;
|
|
10568
|
+
y.scrollTop + y.offsetHeight >= y.scrollHeight - u && (m == null || m(!0)), f && await f(v);
|
|
10569
10569
|
}, X = $(
|
|
10570
10570
|
(v) => {
|
|
10571
|
-
var
|
|
10572
|
-
return ((
|
|
10571
|
+
var y, T;
|
|
10572
|
+
return ((y = d.find((n1) => n1.value === v)) == null ? void 0 : y.label) || ((T = Z == null ? void 0 : Z.find((n1) => n1.value === v)) == null ? void 0 : T.label) || v;
|
|
10573
10573
|
},
|
|
10574
10574
|
[Z, d]
|
|
10575
|
-
),
|
|
10576
|
-
(v,
|
|
10577
|
-
var
|
|
10575
|
+
), z = $(
|
|
10576
|
+
(v, y = "default") => {
|
|
10577
|
+
var T;
|
|
10578
10578
|
return /* @__PURE__ */ o(
|
|
10579
10579
|
i4,
|
|
10580
10580
|
{
|
|
10581
10581
|
values: v,
|
|
10582
|
-
onTagClose:
|
|
10583
|
-
maxWidth: ((
|
|
10582
|
+
onTagClose: a1,
|
|
10583
|
+
maxWidth: ((T = l1.current) == null ? void 0 : T.clientWidth) || 0,
|
|
10584
10584
|
disabled: l,
|
|
10585
10585
|
closable: !R,
|
|
10586
10586
|
options: d,
|
|
10587
10587
|
extraOptions: Z,
|
|
10588
|
-
selectedItemVariant:
|
|
10588
|
+
selectedItemVariant: y
|
|
10589
10589
|
}
|
|
10590
10590
|
);
|
|
10591
10591
|
},
|
|
10592
|
-
[l, Z,
|
|
10593
|
-
),
|
|
10594
|
-
({ label: v, value:
|
|
10595
|
-
if (
|
|
10596
|
-
return Z1(
|
|
10592
|
+
[l, Z, a1, d, R]
|
|
10593
|
+
), q = $(
|
|
10594
|
+
({ label: v, value: y, mode: T }) => {
|
|
10595
|
+
if (T === "filter")
|
|
10596
|
+
return Z1(y);
|
|
10597
10597
|
{
|
|
10598
|
-
const
|
|
10599
|
-
return /* @__PURE__ */ o("div", { onMouseDown:
|
|
10598
|
+
const n1 = B === "badge" && d.find((V2) => V2.label === v), H1 = typeof v == "object" ? v : X(y);
|
|
10599
|
+
return /* @__PURE__ */ o("div", { onMouseDown: D, className: "tag-wrapper", children: B === "badge" ? /* @__PURE__ */ o(
|
|
10600
10600
|
k2,
|
|
10601
10601
|
{
|
|
10602
10602
|
variant: "regular",
|
|
10603
10603
|
size: "small",
|
|
10604
|
-
color:
|
|
10605
|
-
text:
|
|
10604
|
+
color: n1 ? n1.color : "cyan",
|
|
10605
|
+
text: H1
|
|
10606
10606
|
}
|
|
10607
|
-
) : /* @__PURE__ */ o(L2, { onClose: () =>
|
|
10607
|
+
) : /* @__PURE__ */ o(L2, { onClose: () => a1(y), disabled: l, children: H1 }) });
|
|
10608
10608
|
}
|
|
10609
10609
|
},
|
|
10610
|
-
[l, X,
|
|
10611
|
-
), e1 = Array.isArray(
|
|
10610
|
+
[l, X, a1, Z1, B, d]
|
|
10611
|
+
), e1 = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
|
|
10612
10612
|
return /* @__PURE__ */ g(
|
|
10613
10613
|
"div",
|
|
10614
10614
|
{
|
|
@@ -10622,7 +10622,7 @@ const L3 = l1((i, e) => {
|
|
|
10622
10622
|
${R ? "snmt-select-read-only" : ""}
|
|
10623
10623
|
${Q === "static" ? "snmt-select-static" : ""}
|
|
10624
10624
|
${Y === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10625
|
-
ref:
|
|
10625
|
+
ref: l1,
|
|
10626
10626
|
style: { width: r },
|
|
10627
10627
|
children: [
|
|
10628
10628
|
/* @__PURE__ */ o(
|
|
@@ -10636,12 +10636,12 @@ const L3 = l1((i, e) => {
|
|
|
10636
10636
|
filterOption: C && x1,
|
|
10637
10637
|
onDropdownVisibleChange: N1,
|
|
10638
10638
|
disabled: l,
|
|
10639
|
-
value:
|
|
10639
|
+
value: _ || void 0,
|
|
10640
10640
|
labelRender: (v) => {
|
|
10641
|
-
const
|
|
10642
|
-
return l ? /* @__PURE__ */ o("span", { style: { color: c.GREY_DARK_1 }, children:
|
|
10641
|
+
const y = X(v.value);
|
|
10642
|
+
return l ? /* @__PURE__ */ o("span", { style: { color: c.GREY_DARK_1 }, children: y }) : y;
|
|
10643
10643
|
},
|
|
10644
|
-
mode: m3(h,
|
|
10644
|
+
mode: m3(h, B),
|
|
10645
10645
|
variant: Y,
|
|
10646
10646
|
onChange: s1,
|
|
10647
10647
|
onFocus: M1,
|
|
@@ -10649,18 +10649,18 @@ const L3 = l1((i, e) => {
|
|
|
10649
10649
|
onMouseEnter: () => I(!0),
|
|
10650
10650
|
onMouseLeave: () => I(!1),
|
|
10651
10651
|
onSearch: (v) => {
|
|
10652
|
-
|
|
10652
|
+
b(!v), w && w(v);
|
|
10653
10653
|
},
|
|
10654
|
-
onSelect: () =>
|
|
10655
|
-
onDeselect: () =>
|
|
10656
|
-
tagRender: (v) =>
|
|
10654
|
+
onSelect: () => b(!0),
|
|
10655
|
+
onDeselect: () => b(!0),
|
|
10656
|
+
tagRender: (v) => q({ ...v, mode: h }),
|
|
10657
10657
|
maxTagCount: Q === "responsive" ? "responsive" : void 0,
|
|
10658
|
-
maxCount: h === "single" &&
|
|
10659
|
-
maxTagPlaceholder: (v) =>
|
|
10660
|
-
onPopupScroll:
|
|
10658
|
+
maxCount: h === "single" && B === "badge" ? 1 : void 0,
|
|
10659
|
+
maxTagPlaceholder: (v) => z(v, B),
|
|
10660
|
+
onPopupScroll: U,
|
|
10661
10661
|
prefix: N && /* @__PURE__ */ o(q1, { size: "small" }),
|
|
10662
10662
|
suffixIcon: /* @__PURE__ */ o("div", { className: "wrapper-suffix-icon", children: h !== "filter" && /* @__PURE__ */ g(i1, { children: [
|
|
10663
|
-
|
|
10663
|
+
_ && !!_.length && p && /* @__PURE__ */ o(
|
|
10664
10664
|
"div",
|
|
10665
10665
|
{
|
|
10666
10666
|
onClick: V1,
|
|
@@ -10695,30 +10695,28 @@ const L3 = l1((i, e) => {
|
|
|
10695
10695
|
] }) }),
|
|
10696
10696
|
removeIcon: /* @__PURE__ */ o(p1, { name: "cancelCircle", color: c.GREY_DARK_1 }),
|
|
10697
10697
|
options: d,
|
|
10698
|
-
optionRender: (v) =>
|
|
10699
|
-
|
|
10700
|
-
|
|
10701
|
-
|
|
10702
|
-
{
|
|
10703
|
-
|
|
10704
|
-
|
|
10705
|
-
|
|
10706
|
-
|
|
10707
|
-
|
|
10708
|
-
|
|
10709
|
-
|
|
10710
|
-
|
|
10711
|
-
|
|
10712
|
-
|
|
10713
|
-
|
|
10714
|
-
|
|
10715
|
-
|
|
10716
|
-
|
|
10717
|
-
|
|
10718
|
-
!h && b === v.value && /* @__PURE__ */ o(p1, { name: "check", color: c.BLUE_DARK_1 })
|
|
10719
|
-
] }),
|
|
10698
|
+
optionRender: (v) => {
|
|
10699
|
+
const y = h === "single" && B === "badge", T = Array.isArray(_) ? !!(_ != null && _.includes(v.value)) : _ === v.value, n1 = y ? _ : void 0, H1 = y ? ((n1 == null ? void 0 : n1.length) || 0) > 0 : !1;
|
|
10700
|
+
return k ? k(v.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" || y ? /* @__PURE__ */ o(h5, { checked: T, disabled: y && H1 && !T }) : null,
|
|
10703
|
+
/* @__PURE__ */ g(L1, { alignItems: "center", gap: 8, children: [
|
|
10704
|
+
v.data.image !== void 0 && /* @__PURE__ */ o(
|
|
10705
|
+
n5,
|
|
10706
|
+
{
|
|
10707
|
+
src: v.data.image,
|
|
10708
|
+
variant: "xsmall",
|
|
10709
|
+
fallbackText: v.data.imageFallbackText ? v.data.imageFallbackText : ""
|
|
10710
|
+
}
|
|
10711
|
+
),
|
|
10712
|
+
/* @__PURE__ */ o("span", { children: v.label })
|
|
10713
|
+
] })
|
|
10714
|
+
] }),
|
|
10715
|
+
!h && _ === v.value && /* @__PURE__ */ o(p1, { name: "check", color: c.BLUE_DARK_1 })
|
|
10716
|
+
] });
|
|
10717
|
+
},
|
|
10720
10718
|
dropdownRender: (v) => /* @__PURE__ */ g("div", { className: "dropdown-container", children: [
|
|
10721
|
-
/* @__PURE__ */ o("div", { className: "dropdown-menu", children:
|
|
10719
|
+
/* @__PURE__ */ o("div", { className: "dropdown-menu", children: A ? A(v) : v }),
|
|
10722
10720
|
N && /* @__PURE__ */ o("div", { className: "loading-overlay", children: /* @__PURE__ */ o(q1, {}) })
|
|
10723
10721
|
] })
|
|
10724
10722
|
}
|
|
@@ -10761,7 +10759,7 @@ function m3(i, e) {
|
|
|
10761
10759
|
return i === "filter" || i === "single" && e === "badge" ? "multiple" : i === "single" ? void 0 : i;
|
|
10762
10760
|
}
|
|
10763
10761
|
function k3(i, e = 500) {
|
|
10764
|
-
const t =
|
|
10762
|
+
const t = J();
|
|
10765
10763
|
return G(() => () => {
|
|
10766
10764
|
t.current && clearTimeout(t.current);
|
|
10767
10765
|
}, []), (...s) => {
|
|
@@ -10772,14 +10770,14 @@ function k3(i, e = 500) {
|
|
|
10772
10770
|
};
|
|
10773
10771
|
}
|
|
10774
10772
|
function Q1(i) {
|
|
10775
|
-
const e =
|
|
10773
|
+
const e = J(i);
|
|
10776
10774
|
return G(() => {
|
|
10777
10775
|
e.current = i;
|
|
10778
10776
|
}, [i]), e.current;
|
|
10779
10777
|
}
|
|
10780
|
-
const
|
|
10778
|
+
const S1 = 100, g1 = {
|
|
10781
10779
|
offset: 0
|
|
10782
|
-
}, X1 =
|
|
10780
|
+
}, X1 = r1((i, e) => {
|
|
10783
10781
|
const {
|
|
10784
10782
|
loadOptions: t,
|
|
10785
10783
|
width: s,
|
|
@@ -10798,91 +10796,91 @@ const K1 = 100, g1 = {
|
|
|
10798
10796
|
readOnly: f,
|
|
10799
10797
|
clearable: M = !0,
|
|
10800
10798
|
required: Z = !1,
|
|
10801
|
-
error:
|
|
10799
|
+
error: A,
|
|
10802
10800
|
variant: k = "outlined"
|
|
10803
|
-
} = i, [N, R] =
|
|
10801
|
+
} = i, [N, R] = K(), [x, B] = K(g1), [Y, Q] = K(!1), [H, S] = K(), [j, W] = K(!1), [E, I] = K(
|
|
10804
10802
|
u ?? []
|
|
10805
|
-
),
|
|
10803
|
+
), F = Q1(x.offset), b = Q1(H), [_, O] = K(!1), l1 = J(!1), N1 = $(
|
|
10806
10804
|
async ({
|
|
10807
|
-
limit:
|
|
10808
|
-
offset:
|
|
10805
|
+
limit: D = S1,
|
|
10806
|
+
offset: U,
|
|
10809
10807
|
search: X
|
|
10810
10808
|
}) => {
|
|
10811
10809
|
Q(!0);
|
|
10812
10810
|
try {
|
|
10813
|
-
const
|
|
10814
|
-
limit:
|
|
10815
|
-
offset:
|
|
10811
|
+
const z = await t({
|
|
10812
|
+
limit: D,
|
|
10813
|
+
offset: U,
|
|
10816
10814
|
search: X
|
|
10817
10815
|
});
|
|
10818
10816
|
R(
|
|
10819
|
-
(
|
|
10820
|
-
),
|
|
10821
|
-
...
|
|
10822
|
-
count:
|
|
10817
|
+
(q) => U === 0 ? z.options : [...q ?? [], ...z.options]
|
|
10818
|
+
), B((q) => ({
|
|
10819
|
+
...q,
|
|
10820
|
+
count: z.count
|
|
10823
10821
|
}));
|
|
10824
|
-
} catch (
|
|
10825
|
-
return console.error("AsyncSelect. fetchOptions error",
|
|
10822
|
+
} catch (z) {
|
|
10823
|
+
return console.error("AsyncSelect. fetchOptions error", z), [];
|
|
10826
10824
|
} finally {
|
|
10827
10825
|
Q(!1);
|
|
10828
10826
|
}
|
|
10829
10827
|
},
|
|
10830
10828
|
[t]
|
|
10831
|
-
), x1 = k3((
|
|
10832
|
-
S(
|
|
10829
|
+
), x1 = k3((D) => {
|
|
10830
|
+
S(D), D || B(g1);
|
|
10833
10831
|
}), M1 = $(
|
|
10834
|
-
(
|
|
10832
|
+
(D) => x1(D),
|
|
10835
10833
|
[x1]
|
|
10836
10834
|
), R1 = $(
|
|
10837
|
-
async (
|
|
10838
|
-
Y ||
|
|
10839
|
-
...
|
|
10840
|
-
offset:
|
|
10835
|
+
async (D) => {
|
|
10836
|
+
Y || D && x.count && x.count > ((N == null ? void 0 : N.length) ?? 0) && B((U) => ({
|
|
10837
|
+
...U,
|
|
10838
|
+
offset: U.offset + S1
|
|
10841
10839
|
}));
|
|
10842
10840
|
},
|
|
10843
10841
|
[Y, N == null ? void 0 : N.length, x.count]
|
|
10844
10842
|
), s1 = $(
|
|
10845
|
-
(
|
|
10846
|
-
W(
|
|
10843
|
+
(D) => {
|
|
10844
|
+
W(D), !D && H && (S(void 0), B(g1), O(!0)), w == null || w(D);
|
|
10847
10845
|
},
|
|
10848
10846
|
[w, H]
|
|
10849
10847
|
);
|
|
10850
10848
|
G(() => {
|
|
10851
|
-
!
|
|
10852
|
-
}, [
|
|
10853
|
-
(a || p) && N1(g1),
|
|
10849
|
+
!l1.current || Y || (_ || j && (F !== x.offset || b !== H || !N)) && (N1({ offset: x.offset, limit: S1, search: H }), _ && O(!1));
|
|
10850
|
+
}, [_, j, x.offset, H, F, b, N, Y]), G(() => {
|
|
10851
|
+
(a || p) && N1(g1), l1.current = !0;
|
|
10854
10852
|
}, []), G(() => {
|
|
10855
|
-
u && I((
|
|
10856
|
-
const
|
|
10857
|
-
(X) => !
|
|
10853
|
+
u && I((D) => {
|
|
10854
|
+
const U = u.filter(
|
|
10855
|
+
(X) => !D.some((z) => z.value === X.value)
|
|
10858
10856
|
);
|
|
10859
|
-
return [...
|
|
10857
|
+
return [...D, ...U];
|
|
10860
10858
|
});
|
|
10861
10859
|
}, [u]);
|
|
10862
10860
|
const V1 = $(
|
|
10863
|
-
(
|
|
10864
|
-
n && n(
|
|
10865
|
-
let
|
|
10866
|
-
if (l ?
|
|
10867
|
-
const X =
|
|
10868
|
-
(
|
|
10861
|
+
(D) => {
|
|
10862
|
+
n && n(D);
|
|
10863
|
+
let U = [];
|
|
10864
|
+
if (l ? U = Array.isArray(D) ? D : [] : U = D ? [D] : [], H) {
|
|
10865
|
+
const X = U.filter(
|
|
10866
|
+
(z) => !(E != null && E.some((q) => q.value === z))
|
|
10869
10867
|
);
|
|
10870
|
-
X.length > 0 && I((
|
|
10871
|
-
...
|
|
10872
|
-
...X.map((
|
|
10873
|
-
const e1 = N == null ? void 0 : N.find((v) => v.value ===
|
|
10868
|
+
X.length > 0 && I((z = []) => [
|
|
10869
|
+
...z,
|
|
10870
|
+
...X.map((q) => {
|
|
10871
|
+
const e1 = N == null ? void 0 : N.find((v) => v.value === q);
|
|
10874
10872
|
return {
|
|
10875
|
-
value:
|
|
10876
|
-
label: (e1 == null ? void 0 : e1.label) ??
|
|
10873
|
+
value: q,
|
|
10874
|
+
label: (e1 == null ? void 0 : e1.label) ?? q,
|
|
10877
10875
|
imageFallbackText: (e1 == null ? void 0 : e1.imageFallbackText) ?? "",
|
|
10878
10876
|
image: (e1 == null ? void 0 : e1.image) ?? void 0
|
|
10879
10877
|
};
|
|
10880
10878
|
})
|
|
10881
|
-
]), S(void 0),
|
|
10879
|
+
]), S(void 0), B(g1), O(!0);
|
|
10882
10880
|
}
|
|
10883
10881
|
},
|
|
10884
10882
|
[n, H, l, N, E]
|
|
10885
|
-
),
|
|
10883
|
+
), a1 = P1(
|
|
10886
10884
|
() => ({
|
|
10887
10885
|
id: h,
|
|
10888
10886
|
width: s,
|
|
@@ -10901,7 +10899,7 @@ const K1 = 100, g1 = {
|
|
|
10901
10899
|
readOnly: f,
|
|
10902
10900
|
clearable: M,
|
|
10903
10901
|
required: Z,
|
|
10904
|
-
error:
|
|
10902
|
+
error: A,
|
|
10905
10903
|
variant: k
|
|
10906
10904
|
}),
|
|
10907
10905
|
[
|
|
@@ -10921,35 +10919,35 @@ const K1 = 100, g1 = {
|
|
|
10921
10919
|
f,
|
|
10922
10920
|
M,
|
|
10923
10921
|
Z,
|
|
10924
|
-
|
|
10922
|
+
A,
|
|
10925
10923
|
k
|
|
10926
10924
|
]
|
|
10927
10925
|
);
|
|
10928
|
-
|
|
10926
|
+
C1(e, () => ({
|
|
10929
10927
|
refetchOptions: async () => {
|
|
10930
|
-
|
|
10928
|
+
B(g1), S(void 0), O(!0);
|
|
10931
10929
|
}
|
|
10932
10930
|
}));
|
|
10933
10931
|
const Z1 = P1(() => {
|
|
10934
|
-
const
|
|
10932
|
+
const D = l && l !== "single", U = i.selectedItemVariant === "badge", X = U ? N || [] : N || [], z = E, q = i, e1 = D ? {
|
|
10935
10933
|
mode: l,
|
|
10936
|
-
overflowBehaviour:
|
|
10937
|
-
value:
|
|
10934
|
+
overflowBehaviour: q.overflowBehaviour,
|
|
10935
|
+
value: q.value
|
|
10938
10936
|
} : {
|
|
10939
10937
|
mode: l,
|
|
10940
10938
|
value: i.value
|
|
10941
10939
|
};
|
|
10942
10940
|
return {
|
|
10943
|
-
...
|
|
10941
|
+
...a1,
|
|
10944
10942
|
...e1,
|
|
10945
10943
|
selectedItemVariant: i.selectedItemVariant,
|
|
10946
10944
|
options: X,
|
|
10947
|
-
extraOptions:
|
|
10945
|
+
extraOptions: z
|
|
10948
10946
|
};
|
|
10949
|
-
}, [l, i,
|
|
10947
|
+
}, [l, i, a1, E, N]);
|
|
10950
10948
|
return /* @__PURE__ */ o("div", { className: "snmt-async-select", children: /* @__PURE__ */ o(L3, { ...Z1 }) });
|
|
10951
10949
|
});
|
|
10952
|
-
var
|
|
10950
|
+
var y1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(y1 || {});
|
|
10953
10951
|
const v3 = {
|
|
10954
10952
|
small: 20,
|
|
10955
10953
|
medium: 28,
|
|
@@ -10967,14 +10965,14 @@ function x3() {
|
|
|
10967
10965
|
if (console && console.warn) {
|
|
10968
10966
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
10969
10967
|
e[t] = arguments[t];
|
|
10970
|
-
|
|
10968
|
+
c1(e[0]) && (e[0] = `react-i18next:: ${e[0]}`), console.warn(...e);
|
|
10971
10969
|
}
|
|
10972
10970
|
}
|
|
10973
10971
|
const e2 = {};
|
|
10974
|
-
function
|
|
10972
|
+
function Y1() {
|
|
10975
10973
|
for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
|
|
10976
10974
|
e[t] = arguments[t];
|
|
10977
|
-
|
|
10975
|
+
c1(e[0]) && e2[e[0]] || (c1(e[0]) && (e2[e[0]] = /* @__PURE__ */ new Date()), x3(...e));
|
|
10978
10976
|
}
|
|
10979
10977
|
const v2 = (i, e) => () => {
|
|
10980
10978
|
if (i.isInitialized)
|
|
@@ -10990,7 +10988,7 @@ const v2 = (i, e) => () => {
|
|
|
10990
10988
|
}, t2 = (i, e, t) => {
|
|
10991
10989
|
i.loadNamespaces(e, v2(i, t));
|
|
10992
10990
|
}, i2 = (i, e, t, s) => {
|
|
10993
|
-
|
|
10991
|
+
c1(t) && (t = [t]), t.forEach((n) => {
|
|
10994
10992
|
i.options.ns.indexOf(n) < 0 && i.options.ns.push(n);
|
|
10995
10993
|
}), i.loadLanguages(e, v2(i, s));
|
|
10996
10994
|
}, M3 = function(i, e) {
|
|
@@ -11004,13 +11002,13 @@ const v2 = (i, e) => () => {
|
|
|
11004
11002
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !C(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || C(s, i) && (!n || C(h, i)));
|
|
11005
11003
|
}, R3 = function(i, e) {
|
|
11006
11004
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
11007
|
-
return !e.languages || !e.languages.length ? (
|
|
11005
|
+
return !e.languages || !e.languages.length ? (Y1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
|
|
11008
11006
|
lng: t.lng,
|
|
11009
11007
|
precheck: (n, h) => {
|
|
11010
11008
|
if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !h(n.isLanguageChangingTo, i)) return !1;
|
|
11011
11009
|
}
|
|
11012
11010
|
}) : M3(i, e, t);
|
|
11013
|
-
},
|
|
11011
|
+
}, c1 = (i) => typeof i == "string", V3 = (i) => typeof i == "object" && i !== null, Z3 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, H3 = {
|
|
11014
11012
|
"&": "&",
|
|
11015
11013
|
"&": "&",
|
|
11016
11014
|
"<": "<",
|
|
@@ -11032,7 +11030,7 @@ const v2 = (i, e) => () => {
|
|
|
11032
11030
|
"/": "/",
|
|
11033
11031
|
"/": "/"
|
|
11034
11032
|
}, _3 = (i) => H3[i], b3 = (i) => i.replace(Z3, _3);
|
|
11035
|
-
let
|
|
11033
|
+
let j1 = {
|
|
11036
11034
|
bindI18n: "languageChanged",
|
|
11037
11035
|
bindI18nStore: "",
|
|
11038
11036
|
transEmptyNodeValue: "",
|
|
@@ -11044,20 +11042,20 @@ let Y1 = {
|
|
|
11044
11042
|
};
|
|
11045
11043
|
const y3 = function() {
|
|
11046
11044
|
let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11047
|
-
|
|
11048
|
-
...
|
|
11045
|
+
j1 = {
|
|
11046
|
+
...j1,
|
|
11049
11047
|
...i
|
|
11050
11048
|
};
|
|
11051
|
-
},
|
|
11049
|
+
}, A3 = () => j1;
|
|
11052
11050
|
let N2;
|
|
11053
|
-
const
|
|
11051
|
+
const E3 = (i) => {
|
|
11054
11052
|
N2 = i;
|
|
11055
|
-
}, D3 = () => N2,
|
|
11053
|
+
}, D3 = () => N2, K3 = {
|
|
11056
11054
|
type: "3rdParty",
|
|
11057
11055
|
init(i) {
|
|
11058
|
-
y3(i.options.react),
|
|
11056
|
+
y3(i.options.react), E3(i);
|
|
11059
11057
|
}
|
|
11060
|
-
},
|
|
11058
|
+
}, B3 = w2();
|
|
11061
11059
|
class S3 {
|
|
11062
11060
|
constructor() {
|
|
11063
11061
|
T1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
|
|
@@ -11070,7 +11068,7 @@ class S3 {
|
|
|
11070
11068
|
}
|
|
11071
11069
|
}
|
|
11072
11070
|
const G3 = (i, e) => {
|
|
11073
|
-
const t =
|
|
11071
|
+
const t = J();
|
|
11074
11072
|
return G(() => {
|
|
11075
11073
|
t.current = i;
|
|
11076
11074
|
}, [i, e]), t.current;
|
|
@@ -11081,15 +11079,15 @@ const G3 = (i, e) => {
|
|
|
11081
11079
|
} = e, {
|
|
11082
11080
|
i18n: s,
|
|
11083
11081
|
defaultNS: n
|
|
11084
|
-
} =
|
|
11082
|
+
} = o1(B3) || {}, h = t || s || D3();
|
|
11085
11083
|
if (h && !h.reportNamespaces && (h.reportNamespaces = new S3()), !h) {
|
|
11086
|
-
|
|
11087
|
-
const k = (R, x) =>
|
|
11084
|
+
Y1("You will need to pass in an i18next instance by using initReactI18next");
|
|
11085
|
+
const k = (R, x) => c1(x) ? x : V3(x) && c1(x.defaultValue) ? x.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, N = [k, {}, !1];
|
|
11088
11086
|
return N.t = k, N.i18n = {}, N.ready = !1, N;
|
|
11089
11087
|
}
|
|
11090
|
-
h.options.react && h.options.react.wait !== void 0 &&
|
|
11088
|
+
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.");
|
|
11091
11089
|
const C = {
|
|
11092
|
-
...
|
|
11090
|
+
...A3(),
|
|
11093
11091
|
...h.options.react,
|
|
11094
11092
|
...e
|
|
11095
11093
|
}, {
|
|
@@ -11097,11 +11095,11 @@ const G3 = (i, e) => {
|
|
|
11097
11095
|
keyPrefix: r
|
|
11098
11096
|
} = C;
|
|
11099
11097
|
let l = i;
|
|
11100
|
-
l =
|
|
11101
|
-
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((k) => R3(k, h, C)), p = O3(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => x2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [L, m] =
|
|
11098
|
+
l = c1(l) ? [l] : l || ["translation"], h.reportNamespaces.addUsedNamespaces && h.reportNamespaces.addUsedNamespaces(l);
|
|
11099
|
+
const a = (h.isInitialized || h.initializedStoreOnce) && l.every((k) => R3(k, h, C)), p = O3(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), u = () => p, w = () => x2(h, e.lng || null, C.nsMode === "fallback" ? l : l[0], r), [L, m] = K(u);
|
|
11102
11100
|
let f = l.join();
|
|
11103
11101
|
e.lng && (f = `${e.lng}${f}`);
|
|
11104
|
-
const M = G3(f), Z =
|
|
11102
|
+
const M = G3(f), Z = J(!0);
|
|
11105
11103
|
G(() => {
|
|
11106
11104
|
const {
|
|
11107
11105
|
bindI18n: k,
|
|
@@ -11121,8 +11119,8 @@ const G3 = (i, e) => {
|
|
|
11121
11119
|
}, [h, f]), G(() => {
|
|
11122
11120
|
Z.current && a && m(u);
|
|
11123
11121
|
}, [h, r, a]);
|
|
11124
|
-
const
|
|
11125
|
-
if (
|
|
11122
|
+
const A = [L, h, a];
|
|
11123
|
+
if (A.t = L, A.i18n = h, A.ready = a, a || !a && !d) return A;
|
|
11126
11124
|
throw new Promise((k) => {
|
|
11127
11125
|
e.lng ? i2(h, e.lng, l, () => k()) : t2(h, l, () => k());
|
|
11128
11126
|
});
|
|
@@ -11167,7 +11165,7 @@ const G3 = (i, e) => {
|
|
|
11167
11165
|
k: h
|
|
11168
11166
|
} = m1(i, e, Object);
|
|
11169
11167
|
n[h] = n[h] || [], n[h].push(t);
|
|
11170
|
-
},
|
|
11168
|
+
}, A1 = (i, e) => {
|
|
11171
11169
|
const {
|
|
11172
11170
|
obj: t,
|
|
11173
11171
|
k: s
|
|
@@ -11175,8 +11173,8 @@ const G3 = (i, e) => {
|
|
|
11175
11173
|
if (t)
|
|
11176
11174
|
return t[s];
|
|
11177
11175
|
}, $3 = (i, e, t) => {
|
|
11178
|
-
const s =
|
|
11179
|
-
return s !== void 0 ? s :
|
|
11176
|
+
const s = A1(i, t);
|
|
11177
|
+
return s !== void 0 ? s : A1(e, t);
|
|
11180
11178
|
}, M2 = (i, e, t) => {
|
|
11181
11179
|
for (const s in e)
|
|
11182
11180
|
s !== "__proto__" && s !== "constructor" && (s in i ? V(i[s]) || i[s] instanceof String || V(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : M2(i[s], e[s], t) : i[s] = e[s]);
|
|
@@ -11214,7 +11212,7 @@ const U3 = [" ", ",", "?", "!", ";"], z3 = new F3(20), J3 = (i, e, t) => {
|
|
|
11214
11212
|
C > 0 && !n.test(i.substring(0, C)) && (h = !0);
|
|
11215
11213
|
}
|
|
11216
11214
|
return h;
|
|
11217
|
-
},
|
|
11215
|
+
}, W1 = function(i, e) {
|
|
11218
11216
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ".";
|
|
11219
11217
|
if (!i) return;
|
|
11220
11218
|
if (i[e]) return i[e];
|
|
@@ -11249,7 +11247,7 @@ const U3 = [" ", ",", "?", "!", ";"], z3 = new F3(20), J3 = (i, e, t) => {
|
|
|
11249
11247
|
console && console[i] && console[i].apply(console, e);
|
|
11250
11248
|
}
|
|
11251
11249
|
};
|
|
11252
|
-
class
|
|
11250
|
+
class D1 {
|
|
11253
11251
|
constructor(e) {
|
|
11254
11252
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11255
11253
|
this.init(e, t);
|
|
@@ -11282,16 +11280,16 @@ class A1 {
|
|
|
11282
11280
|
return n && !this.debug ? null : (V(e[0]) && (e[0] = `${s}${this.prefix} ${e[0]}`), this.logger[t](e));
|
|
11283
11281
|
}
|
|
11284
11282
|
create(e) {
|
|
11285
|
-
return new
|
|
11283
|
+
return new D1(this.logger, {
|
|
11286
11284
|
prefix: `${this.prefix}:${e}:`,
|
|
11287
11285
|
...this.options
|
|
11288
11286
|
});
|
|
11289
11287
|
}
|
|
11290
11288
|
clone(e) {
|
|
11291
|
-
return e = e || this.options, e.prefix = e.prefix || this.prefix, new
|
|
11289
|
+
return e = e || this.options, e.prefix = e.prefix || this.prefix, new D1(this.logger, e);
|
|
11292
11290
|
}
|
|
11293
11291
|
}
|
|
11294
|
-
var t1 = new
|
|
11292
|
+
var t1 = new D1();
|
|
11295
11293
|
class B1 {
|
|
11296
11294
|
constructor() {
|
|
11297
11295
|
this.observers = {};
|
|
@@ -11346,8 +11344,8 @@ class r2 extends B1 {
|
|
|
11346
11344
|
const h = n.keySeparator !== void 0 ? n.keySeparator : this.options.keySeparator, C = n.ignoreJSONStructure !== void 0 ? n.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
11347
11345
|
let d;
|
|
11348
11346
|
e.indexOf(".") > -1 ? d = e.split(".") : (d = [e, t], s && (Array.isArray(s) ? d.push(...s) : V(s) && h ? d.push(...s.split(h)) : d.push(s)));
|
|
11349
|
-
const r =
|
|
11350
|
-
return !r && !t && !s && e.indexOf(".") > -1 && (e = d[0], t = d[1], s = d.slice(2).join(".")), r || !C || !V(s) ? r :
|
|
11347
|
+
const r = A1(this.data, d);
|
|
11348
|
+
return !r && !t && !s && e.indexOf(".") > -1 && (e = d[0], t = d[1], s = d.slice(2).join(".")), r || !C || !V(s) ? r : W1(this.data && this.data[e] && this.data[e][t], s, h);
|
|
11351
11349
|
}
|
|
11352
11350
|
addResource(e, t, s, n) {
|
|
11353
11351
|
let h = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -11373,7 +11371,7 @@ class r2 extends B1 {
|
|
|
11373
11371
|
skipCopy: !1
|
|
11374
11372
|
}, d = [e, t];
|
|
11375
11373
|
e.indexOf(".") > -1 && (d = e.split("."), n = s, s = t, t = d[1]), this.addNamespaces(t);
|
|
11376
|
-
let r =
|
|
11374
|
+
let r = A1(this.data, d) || {};
|
|
11377
11375
|
C.skipCopy || (s = JSON.parse(JSON.stringify(s))), n ? M2(r, s, h) : r = {
|
|
11378
11376
|
...r,
|
|
11379
11377
|
...s
|
|
@@ -11413,7 +11411,7 @@ var R2 = {
|
|
|
11413
11411
|
}
|
|
11414
11412
|
};
|
|
11415
11413
|
const a2 = {};
|
|
11416
|
-
class
|
|
11414
|
+
class K1 extends B1 {
|
|
11417
11415
|
constructor(e) {
|
|
11418
11416
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
11419
11417
|
super(), Y3(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = t1.create("translator");
|
|
@@ -11483,8 +11481,8 @@ class D1 extends B1 {
|
|
|
11483
11481
|
}
|
|
11484
11482
|
const p = this.resolve(e, t);
|
|
11485
11483
|
let u = p && p.res;
|
|
11486
|
-
const w = p && p.usedKey || C, L = p && p.exactUsedKey || C, m = Object.prototype.toString.apply(u), f = ["[object Number]", "[object Function]", "[object RegExp]"], M = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, Z = !this.i18nFormat || this.i18nFormat.handleAsObject,
|
|
11487
|
-
if (Z && u &&
|
|
11484
|
+
const w = p && p.usedKey || C, L = p && p.exactUsedKey || C, m = Object.prototype.toString.apply(u), f = ["[object Number]", "[object Function]", "[object RegExp]"], M = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, Z = !this.i18nFormat || this.i18nFormat.handleAsObject, A = !V(u) && typeof u != "boolean" && typeof u != "number";
|
|
11485
|
+
if (Z && u && A && f.indexOf(m) < 0 && !(V(M) && Array.isArray(u))) {
|
|
11488
11486
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
11489
11487
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
11490
11488
|
const k = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(w, u, {
|
|
@@ -11497,12 +11495,12 @@ class D1 extends B1 {
|
|
|
11497
11495
|
const k = Array.isArray(u), N = k ? [] : {}, R = k ? L : w;
|
|
11498
11496
|
for (const x in u)
|
|
11499
11497
|
if (Object.prototype.hasOwnProperty.call(u, x)) {
|
|
11500
|
-
const
|
|
11501
|
-
N[x] = this.translate(
|
|
11498
|
+
const B = `${R}${h}${x}`;
|
|
11499
|
+
N[x] = this.translate(B, {
|
|
11502
11500
|
...t,
|
|
11503
11501
|
joinArrays: !1,
|
|
11504
11502
|
ns: d
|
|
11505
|
-
}), N[x] ===
|
|
11503
|
+
}), N[x] === B && (N[x] = u[x]);
|
|
11506
11504
|
}
|
|
11507
11505
|
u = N;
|
|
11508
11506
|
}
|
|
@@ -11510,35 +11508,35 @@ class D1 extends B1 {
|
|
|
11510
11508
|
u = u.join(M), u && (u = this.extendTranslation(u, e, t, s));
|
|
11511
11509
|
else {
|
|
11512
11510
|
let k = !1, N = !1;
|
|
11513
|
-
const R = t.count !== void 0 && !V(t.count), x =
|
|
11511
|
+
const R = t.count !== void 0 && !V(t.count), x = K1.hasDefaultValue(t), B = R ? this.pluralResolver.getSuffix(l, t.count, t) : "", Y = t.ordinal && R ? this.pluralResolver.getSuffix(l, t.count, {
|
|
11514
11512
|
ordinal: !1
|
|
11515
|
-
}) : "", Q = R && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), H = Q && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${
|
|
11513
|
+
}) : "", Q = R && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), H = Q && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${B}`] || t[`defaultValue${Y}`] || t.defaultValue;
|
|
11516
11514
|
!this.isValidLookup(u) && x && (k = !0, u = H), this.isValidLookup(u) || (N = !0, u = C);
|
|
11517
11515
|
const j = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && N ? void 0 : u, W = x && H !== u && this.options.updateMissing;
|
|
11518
11516
|
if (N || k || W) {
|
|
11519
11517
|
if (this.logger.log(W ? "updateKey" : "missingKey", l, r, C, W ? H : u), h) {
|
|
11520
|
-
const
|
|
11518
|
+
const b = this.resolve(C, {
|
|
11521
11519
|
...t,
|
|
11522
11520
|
keySeparator: !1
|
|
11523
11521
|
});
|
|
11524
|
-
|
|
11522
|
+
b && b.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.");
|
|
11525
11523
|
}
|
|
11526
11524
|
let E = [];
|
|
11527
11525
|
const I = this.languageUtils.getFallbackCodes(this.options.fallbackLng, t.lng || this.language);
|
|
11528
11526
|
if (this.options.saveMissingTo === "fallback" && I && I[0])
|
|
11529
|
-
for (let
|
|
11530
|
-
E.push(I[
|
|
11527
|
+
for (let b = 0; b < I.length; b++)
|
|
11528
|
+
E.push(I[b]);
|
|
11531
11529
|
else this.options.saveMissingTo === "all" ? E = this.languageUtils.toResolveHierarchy(t.lng || this.language) : E.push(t.lng || this.language);
|
|
11532
|
-
const
|
|
11533
|
-
const
|
|
11534
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(
|
|
11530
|
+
const F = (b, _, O) => {
|
|
11531
|
+
const l1 = x && O !== u ? O : j;
|
|
11532
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(b, r, _, l1, W, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(b, r, _, l1, W, t), this.emit("missingKey", b, r, _, u);
|
|
11535
11533
|
};
|
|
11536
|
-
this.options.saveMissing && (this.options.saveMissingPlurals && R ? E.forEach((
|
|
11537
|
-
const
|
|
11538
|
-
Q && t[`defaultValue${this.options.pluralSeparator}zero`] &&
|
|
11539
|
-
|
|
11534
|
+
this.options.saveMissing && (this.options.saveMissingPlurals && R ? E.forEach((b) => {
|
|
11535
|
+
const _ = this.pluralResolver.getSuffixes(b, t);
|
|
11536
|
+
Q && t[`defaultValue${this.options.pluralSeparator}zero`] && _.indexOf(`${this.options.pluralSeparator}zero`) < 0 && _.push(`${this.options.pluralSeparator}zero`), _.forEach((O) => {
|
|
11537
|
+
F([b], C + O, t[`defaultValue${O}`] || H);
|
|
11540
11538
|
});
|
|
11541
|
-
}) :
|
|
11539
|
+
}) : F(E, C, H));
|
|
11542
11540
|
}
|
|
11543
11541
|
u = this.extendTranslation(u, e, t, p, s), N && u === C && this.options.appendNamespaceToMissingKey && (u = `${r}:${C}`), (N || k) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? u = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${r}:${C}` : C, k ? u : void 0) : u = this.options.parseMissingKeyHandler(u));
|
|
11544
11542
|
}
|
|
@@ -11615,9 +11613,9 @@ class D1 extends B1 {
|
|
|
11615
11613
|
Z.push(x), u && (Z.push(x + k), t.ordinal && k.indexOf(R) === 0 && Z.push(x + k.replace(R, this.options.pluralSeparator)), w && Z.push(x + N));
|
|
11616
11614
|
}
|
|
11617
11615
|
}
|
|
11618
|
-
let
|
|
11619
|
-
for (;
|
|
11620
|
-
this.isValidLookup(s) || (h =
|
|
11616
|
+
let A;
|
|
11617
|
+
for (; A = Z.pop(); )
|
|
11618
|
+
this.isValidLookup(s) || (h = A, s = this.getResource(M, f, A, t));
|
|
11621
11619
|
}));
|
|
11622
11620
|
});
|
|
11623
11621
|
}), {
|
|
@@ -11659,7 +11657,7 @@ class D1 extends B1 {
|
|
|
11659
11657
|
return !1;
|
|
11660
11658
|
}
|
|
11661
11659
|
}
|
|
11662
|
-
const
|
|
11660
|
+
const G1 = (i) => i.charAt(0).toUpperCase() + i.slice(1);
|
|
11663
11661
|
class h2 {
|
|
11664
11662
|
constructor(e) {
|
|
11665
11663
|
this.options = e, this.supportedLngs = this.options.supportedLngs || !1, this.logger = t1.create("languageUtils");
|
|
@@ -11684,7 +11682,7 @@ class h2 {
|
|
|
11684
11682
|
}
|
|
11685
11683
|
const t = ["hans", "hant", "latn", "cyrl", "cans", "mong", "arab"];
|
|
11686
11684
|
let s = e.split("-");
|
|
11687
|
-
return this.options.lowerCaseLng ? s = s.map((n) => n.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] =
|
|
11685
|
+
return this.options.lowerCaseLng ? s = s.map((n) => n.toLowerCase()) : s.length === 2 ? (s[0] = s[0].toLowerCase(), s[1] = s[1].toUpperCase(), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = G1(s[1].toLowerCase()))) : s.length === 3 && (s[0] = s[0].toLowerCase(), s[1].length === 2 && (s[1] = s[1].toUpperCase()), s[0] !== "sgn" && s[2].length === 2 && (s[2] = s[2].toUpperCase()), t.indexOf(s[1].toLowerCase()) > -1 && (s[1] = G1(s[1].toLowerCase())), t.indexOf(s[2].toLowerCase()) > -1 && (s[2] = G1(s[2].toLowerCase()))), s.join("-");
|
|
11688
11686
|
}
|
|
11689
11687
|
return this.options.cleanCode || this.options.lowerCaseLng ? e.toLowerCase() : e;
|
|
11690
11688
|
}
|
|
@@ -11925,8 +11923,8 @@ class s6 {
|
|
|
11925
11923
|
}
|
|
11926
11924
|
const C2 = function(i, e, t) {
|
|
11927
11925
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, h = $3(i, e, t);
|
|
11928
|
-
return !h && n && V(t) && (h =
|
|
11929
|
-
},
|
|
11926
|
+
return !h && n && V(t) && (h = W1(i, t, s), h === void 0 && (h = W1(e, t, s))), h;
|
|
11927
|
+
}, O1 = (i) => i.replace(/\$/g, "$$$$");
|
|
11930
11928
|
class n6 {
|
|
11931
11929
|
constructor() {
|
|
11932
11930
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
@@ -11987,10 +11985,10 @@ class n6 {
|
|
|
11987
11985
|
const a = n && n.missingInterpolationHandler || this.options.missingInterpolationHandler, p = n && n.interpolation && n.interpolation.skipOnVariables !== void 0 ? n.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
11988
11986
|
return [{
|
|
11989
11987
|
regex: this.regexpUnescape,
|
|
11990
|
-
safeValue: (w) =>
|
|
11988
|
+
safeValue: (w) => O1(w)
|
|
11991
11989
|
}, {
|
|
11992
11990
|
regex: this.regexp,
|
|
11993
|
-
safeValue: (w) => this.escapeValue ?
|
|
11991
|
+
safeValue: (w) => this.escapeValue ? O1(this.escape(w)) : O1(w)
|
|
11994
11992
|
}].forEach((w) => {
|
|
11995
11993
|
for (d = 0; h = w.regex.exec(e); ) {
|
|
11996
11994
|
const L = h[1].trim();
|
|
@@ -12356,7 +12354,7 @@ const d2 = () => ({
|
|
|
12356
12354
|
maxReplaces: 1e3,
|
|
12357
12355
|
skipOnVariables: !0
|
|
12358
12356
|
}
|
|
12359
|
-
}), g2 = (i) => (V(i.ns) && (i.ns = [i.ns]), V(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), V(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i),
|
|
12357
|
+
}), g2 = (i) => (V(i.ns) && (i.ns = [i.ns]), V(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), V(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), b1 = () => {
|
|
12360
12358
|
}, h6 = (i) => {
|
|
12361
12359
|
Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
|
|
12362
12360
|
typeof i[t] == "function" && (i[t] = i[t].bind(i));
|
|
@@ -12406,7 +12404,7 @@ class k1 extends B1 {
|
|
|
12406
12404
|
for (var L = arguments.length, m = new Array(L > 1 ? L - 1 : 0), f = 1; f < L; f++)
|
|
12407
12405
|
m[f - 1] = arguments[f];
|
|
12408
12406
|
e.emit(w, ...m);
|
|
12409
|
-
}), 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
|
|
12407
|
+
}), 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 K1(this.services, this.options), this.translator.on("*", function(w) {
|
|
12410
12408
|
for (var L = arguments.length, m = new Array(L > 1 ? L - 1 : 0), f = 1; f < L; f++)
|
|
12411
12409
|
m[f - 1] = arguments[f];
|
|
12412
12410
|
e.emit(w, ...m);
|
|
@@ -12414,7 +12412,7 @@ class k1 extends B1 {
|
|
|
12414
12412
|
w.init && w.init(this);
|
|
12415
12413
|
});
|
|
12416
12414
|
}
|
|
12417
|
-
if (this.format = this.options.interpolation.format, s || (s =
|
|
12415
|
+
if (this.format = this.options.interpolation.format, s || (s = b1), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
12418
12416
|
const a = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
|
|
12419
12417
|
a.length > 0 && a[0] !== "dev" && (this.options.lng = a[0]);
|
|
12420
12418
|
}
|
|
@@ -12437,7 +12435,7 @@ class k1 extends B1 {
|
|
|
12437
12435
|
return this.options.resources || !this.options.initImmediate ? l() : setTimeout(l, 0), r;
|
|
12438
12436
|
}
|
|
12439
12437
|
loadResources(e) {
|
|
12440
|
-
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12438
|
+
let s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b1;
|
|
12441
12439
|
const n = V(e) ? e : this.language;
|
|
12442
12440
|
if (typeof e == "function" && (s = e), !this.options.resources || this.options.partialBundledLanguages) {
|
|
12443
12441
|
if (n && n.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return s();
|
|
@@ -12455,7 +12453,7 @@ class k1 extends B1 {
|
|
|
12455
12453
|
}
|
|
12456
12454
|
reloadResources(e, t, s) {
|
|
12457
12455
|
const n = f1();
|
|
12458
|
-
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s =
|
|
12456
|
+
return typeof e == "function" && (s = e, e = void 0), typeof t == "function" && (s = t, t = void 0), e || (e = this.languages), t || (t = this.options.ns), s || (s = b1), this.services.backendConnector.reload(e, t, (h) => {
|
|
12459
12457
|
n.resolve(), s(h);
|
|
12460
12458
|
}), n;
|
|
12461
12459
|
}
|
|
@@ -12568,7 +12566,7 @@ class k1 extends B1 {
|
|
|
12568
12566
|
return new k1(e, t);
|
|
12569
12567
|
}
|
|
12570
12568
|
cloneInstance() {
|
|
12571
|
-
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] :
|
|
12569
|
+
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : b1;
|
|
12572
12570
|
const s = e.forkResourceStore;
|
|
12573
12571
|
s && delete e.forkResourceStore;
|
|
12574
12572
|
const n = {
|
|
@@ -12582,7 +12580,7 @@ class k1 extends B1 {
|
|
|
12582
12580
|
...this.services
|
|
12583
12581
|
}, h.services.utils = {
|
|
12584
12582
|
hasLoadedNamespace: h.hasLoadedNamespace.bind(h)
|
|
12585
|
-
}, s && (h.store = new r2(this.store.data, n), h.services.resourceStore = h.store), h.translator = new
|
|
12583
|
+
}, s && (h.store = new r2(this.store.data, n), h.services.resourceStore = h.store), h.translator = new K1(h.services, n), h.translator.on("*", function(d) {
|
|
12586
12584
|
for (var r = arguments.length, l = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
12587
12585
|
l[a - 1] = arguments[a];
|
|
12588
12586
|
h.emit(d, ...l);
|
|
@@ -12600,22 +12598,22 @@ class k1 extends B1 {
|
|
|
12600
12598
|
};
|
|
12601
12599
|
}
|
|
12602
12600
|
}
|
|
12603
|
-
const
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12610
|
-
|
|
12611
|
-
|
|
12612
|
-
|
|
12613
|
-
|
|
12614
|
-
|
|
12615
|
-
|
|
12616
|
-
|
|
12617
|
-
|
|
12618
|
-
|
|
12601
|
+
const P = k1.createInstance();
|
|
12602
|
+
P.createInstance = k1.createInstance;
|
|
12603
|
+
P.createInstance;
|
|
12604
|
+
P.dir;
|
|
12605
|
+
P.init;
|
|
12606
|
+
P.loadResources;
|
|
12607
|
+
P.reloadResources;
|
|
12608
|
+
P.use;
|
|
12609
|
+
P.changeLanguage;
|
|
12610
|
+
P.getFixedT;
|
|
12611
|
+
P.t;
|
|
12612
|
+
P.exists;
|
|
12613
|
+
P.setDefaultNamespace;
|
|
12614
|
+
P.hasLoadedNamespace;
|
|
12615
|
+
P.loadNamespaces;
|
|
12616
|
+
P.loadLanguages;
|
|
12619
12617
|
const c6 = "Archived", C6 = "Deleted", d6 = {
|
|
12620
12618
|
archived: c6,
|
|
12621
12619
|
deleted: C6
|
|
@@ -12623,7 +12621,7 @@ const c6 = "Archived", C6 = "Deleted", d6 = {
|
|
|
12623
12621
|
archived: g6,
|
|
12624
12622
|
deleted: u6
|
|
12625
12623
|
};
|
|
12626
|
-
|
|
12624
|
+
P.use(K3).init({
|
|
12627
12625
|
defaultNS: "common",
|
|
12628
12626
|
lng: "en",
|
|
12629
12627
|
resources: {
|
|
@@ -12635,7 +12633,7 @@ T.use(B3).init({
|
|
|
12635
12633
|
}
|
|
12636
12634
|
}
|
|
12637
12635
|
});
|
|
12638
|
-
const N6 =
|
|
12636
|
+
const N6 = r1(
|
|
12639
12637
|
({
|
|
12640
12638
|
fetchParams: i,
|
|
12641
12639
|
mode: e = void 0,
|
|
@@ -12650,8 +12648,8 @@ const N6 = l1(
|
|
|
12650
12648
|
required: a,
|
|
12651
12649
|
error: p
|
|
12652
12650
|
}, u) => {
|
|
12653
|
-
const { axiosPeople: w, locale: L } =
|
|
12654
|
-
if (
|
|
12651
|
+
const { axiosPeople: w, locale: L } = o1(d1), { t: m } = I3("common", { lng: L }), [f, M] = K([]), [Z, A] = K(!0), k = J(f), N = J(null);
|
|
12652
|
+
if (C1(u, () => N.current), !w)
|
|
12655
12653
|
throw new Error(
|
|
12656
12654
|
`UserSelect requires "axiosPeople" to fetch users.
|
|
12657
12655
|
Please provide it via SNMTUiContext.`
|
|
@@ -12659,7 +12657,7 @@ const N6 = l1(
|
|
|
12659
12657
|
const R = $(
|
|
12660
12658
|
(H) => {
|
|
12661
12659
|
let S = "";
|
|
12662
|
-
return H.deletedAt && (S += `[${m("deleted")}] `), H.status ===
|
|
12660
|
+
return H.deletedAt && (S += `[${m("deleted")}] `), H.status === y1.ARCHIVED && (S += `[${m("archived")}] `), `${S}${H.firstName} ${H.lastName}`;
|
|
12663
12661
|
},
|
|
12664
12662
|
[m]
|
|
12665
12663
|
), x = $(
|
|
@@ -12670,26 +12668,26 @@ const N6 = l1(
|
|
|
12670
12668
|
}) => {
|
|
12671
12669
|
var W, E, I;
|
|
12672
12670
|
try {
|
|
12673
|
-
const
|
|
12671
|
+
const F = await w.post("v1/users/search", {
|
|
12674
12672
|
offset: H,
|
|
12675
12673
|
limit: S,
|
|
12676
12674
|
search: j,
|
|
12677
12675
|
...i,
|
|
12678
12676
|
includeCount: !0
|
|
12679
|
-
}), { data:
|
|
12677
|
+
}), { data: b, metadata: _ } = F.data;
|
|
12680
12678
|
return {
|
|
12681
|
-
options:
|
|
12679
|
+
options: b.map((O) => ({
|
|
12682
12680
|
value: O.id,
|
|
12683
12681
|
label: R(O),
|
|
12684
12682
|
image: r ? O.avatarUrl : void 0,
|
|
12685
12683
|
imageFallbackText: O.avatarUrl ? "" : u2(`${O.firstName} ${O.lastName}`)
|
|
12686
12684
|
})),
|
|
12687
|
-
count:
|
|
12685
|
+
count: _.count
|
|
12688
12686
|
};
|
|
12689
|
-
} catch (
|
|
12687
|
+
} catch (F) {
|
|
12690
12688
|
return C && C({
|
|
12691
|
-
status: ((W =
|
|
12692
|
-
message: ((I = (E =
|
|
12689
|
+
status: ((W = F.response) == null ? void 0 : W.status) ?? 500,
|
|
12690
|
+
message: ((I = (E = F.response) == null ? void 0 : E.data) == null ? void 0 : I.message) ?? "Error while fetching options"
|
|
12693
12691
|
}), {
|
|
12694
12692
|
options: [],
|
|
12695
12693
|
count: 0
|
|
@@ -12697,27 +12695,27 @@ const N6 = l1(
|
|
|
12697
12695
|
}
|
|
12698
12696
|
},
|
|
12699
12697
|
[w, i, R, r, C]
|
|
12700
|
-
),
|
|
12698
|
+
), B = $(
|
|
12701
12699
|
async (H) => {
|
|
12702
12700
|
var S, j, W;
|
|
12703
12701
|
try {
|
|
12704
12702
|
const E = H.filter(
|
|
12705
|
-
(
|
|
12703
|
+
(b) => !k.current.some((_) => _.value === b)
|
|
12706
12704
|
);
|
|
12707
12705
|
let I = [];
|
|
12708
12706
|
E.length && (I = (await w.post("v1/users/search", {
|
|
12709
12707
|
filters: {
|
|
12710
12708
|
id: E,
|
|
12711
|
-
status: [
|
|
12709
|
+
status: [y1.ACTIVE, y1.ARCHIVED]
|
|
12712
12710
|
}
|
|
12713
12711
|
})).data.data);
|
|
12714
|
-
const
|
|
12715
|
-
value:
|
|
12716
|
-
label: R(
|
|
12717
|
-
image: r ?
|
|
12718
|
-
imageFallbackText:
|
|
12712
|
+
const F = I.map((b) => ({
|
|
12713
|
+
value: b.id,
|
|
12714
|
+
label: R(b),
|
|
12715
|
+
image: r ? b.avatarUrl : void 0,
|
|
12716
|
+
imageFallbackText: b.avatarUrl ? "" : u2(`${b.firstName} ${b.lastName}`)
|
|
12719
12717
|
}));
|
|
12720
|
-
return [...k.current, ...
|
|
12718
|
+
return [...k.current, ...F];
|
|
12721
12719
|
} catch (E) {
|
|
12722
12720
|
return C && C({
|
|
12723
12721
|
status: ((S = E.response) == null ? void 0 : S.status) ?? 500,
|
|
@@ -12734,14 +12732,14 @@ const N6 = l1(
|
|
|
12734
12732
|
(H = N.current) == null || H.refetchOptions();
|
|
12735
12733
|
}, [i]), G(() => {
|
|
12736
12734
|
if (!n) {
|
|
12737
|
-
|
|
12735
|
+
A(!1);
|
|
12738
12736
|
return;
|
|
12739
12737
|
}
|
|
12740
12738
|
(async () => {
|
|
12741
|
-
const S = Array.isArray(n) ? n : [n], j = await
|
|
12742
|
-
M(j),
|
|
12739
|
+
const S = Array.isArray(n) ? n : [n], j = await B(S);
|
|
12740
|
+
M(j), A(!1);
|
|
12743
12741
|
})();
|
|
12744
|
-
}, [
|
|
12742
|
+
}, [B, n]);
|
|
12745
12743
|
const Y = $(
|
|
12746
12744
|
async ({
|
|
12747
12745
|
limit: H,
|