@snmt-react-ui/city-select 2.9.12 → 2.9.13
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 +700 -690
- package/dist/index.css +1 -1
- package/package.json +3 -3
package/dist/city-select.js
CHANGED
|
@@ -41,9 +41,9 @@ const f2 = (l, e) => () => {
|
|
|
41
41
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
42
42
|
const i = e.languages[0], s = e.options ? e.options.fallbackLng : !1, C = e.languages[e.languages.length - 1];
|
|
43
43
|
if (i.toLowerCase() === "cimode") return !0;
|
|
44
|
-
const h = (d,
|
|
45
|
-
const
|
|
46
|
-
return
|
|
44
|
+
const h = (d, o) => {
|
|
45
|
+
const a = e.services.backendConnector.state[`${d}|${o}`];
|
|
46
|
+
return a === -1 || a === 2;
|
|
47
47
|
};
|
|
48
48
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !h(e.isLanguageChangingTo, l) ? !1 : !!(e.hasResourceBundle(i, l) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || h(i, l) && (!s || h(C, l)));
|
|
49
49
|
}, Y2 = function(l, e) {
|
|
@@ -104,7 +104,7 @@ const q2 = (l, e) => {
|
|
|
104
104
|
return I(() => {
|
|
105
105
|
t.current = l;
|
|
106
106
|
}, [l, e]), t.current;
|
|
107
|
-
},
|
|
107
|
+
}, u2 = (l, e, t, i) => l.getFixedT(e, t, i), Q2 = (l, e, t, i) => E(u2(l, e, t, i), [l, e, t, i]), X2 = function(l) {
|
|
108
108
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
109
109
|
const {
|
|
110
110
|
i18n: t
|
|
@@ -114,8 +114,8 @@ const q2 = (l, e) => {
|
|
|
114
114
|
} = l1(z2) || {}, C = t || i || W2();
|
|
115
115
|
if (C && !C.reportNamespaces && (C.reportNamespaces = new J2()), !C) {
|
|
116
116
|
O1("You will need to pass in an i18next instance by using initReactI18next");
|
|
117
|
-
const m = (x, L) => r1(L) ? L : O2(L) && r1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x,
|
|
118
|
-
return
|
|
117
|
+
const m = (x, L) => r1(L) ? L : O2(L) && r1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, p = [m, {}, !1];
|
|
118
|
+
return p.t = m, p.i18n = {}, p.ready = !1, p;
|
|
119
119
|
}
|
|
120
120
|
C.options.react && C.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 h = {
|
|
@@ -124,37 +124,37 @@ const q2 = (l, e) => {
|
|
|
124
124
|
...e
|
|
125
125
|
}, {
|
|
126
126
|
useSuspense: d,
|
|
127
|
-
keyPrefix:
|
|
127
|
+
keyPrefix: o
|
|
128
128
|
} = h;
|
|
129
|
-
let
|
|
130
|
-
|
|
131
|
-
const r = (C.isInitialized || C.initializedStoreOnce) &&
|
|
132
|
-
let k =
|
|
129
|
+
let a = l;
|
|
130
|
+
a = r1(a) ? [a] : a || ["translation"], C.reportNamespaces.addUsedNamespaces && C.reportNamespaces.addUsedNamespaces(a);
|
|
131
|
+
const r = (C.isInitialized || C.initializedStoreOnce) && a.every((m) => Y2(m, C, h)), f = Q2(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), w = () => f, u = () => u2(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), [v, M] = D(w);
|
|
132
|
+
let k = a.join();
|
|
133
133
|
e.lng && (k = `${e.lng}${k}`);
|
|
134
134
|
const b = q2(k), V = O(!0);
|
|
135
135
|
I(() => {
|
|
136
136
|
const {
|
|
137
137
|
bindI18n: m,
|
|
138
|
-
bindI18nStore:
|
|
138
|
+
bindI18nStore: p
|
|
139
139
|
} = h;
|
|
140
|
-
V.current = !0, !r && !d && (e.lng ? J1(C, e.lng,
|
|
141
|
-
V.current && M(
|
|
142
|
-
}) : z1(C,
|
|
143
|
-
V.current && M(
|
|
144
|
-
})), r && b && b !== k && V.current && M(
|
|
140
|
+
V.current = !0, !r && !d && (e.lng ? J1(C, e.lng, a, () => {
|
|
141
|
+
V.current && M(u);
|
|
142
|
+
}) : z1(C, a, () => {
|
|
143
|
+
V.current && M(u);
|
|
144
|
+
})), r && b && b !== k && V.current && M(u);
|
|
145
145
|
const x = () => {
|
|
146
|
-
V.current && M(
|
|
146
|
+
V.current && M(u);
|
|
147
147
|
};
|
|
148
|
-
return m && C && C.on(m, x),
|
|
149
|
-
V.current = !1, m && C && m.split(" ").forEach((L) => C.off(L, x)),
|
|
148
|
+
return m && C && C.on(m, x), p && C && C.store.on(p, x), () => {
|
|
149
|
+
V.current = !1, m && C && m.split(" ").forEach((L) => C.off(L, x)), p && C && p.split(" ").forEach((L) => C.store.off(L, x));
|
|
150
150
|
};
|
|
151
151
|
}, [C, k]), I(() => {
|
|
152
152
|
V.current && r && M(w);
|
|
153
|
-
}, [C,
|
|
153
|
+
}, [C, o, r]);
|
|
154
154
|
const K = [v, C, r];
|
|
155
155
|
if (K.t = v, K.i18n = C, K.ready = r, r || !r && !d) return K;
|
|
156
156
|
throw new Promise((m) => {
|
|
157
|
-
e.lng ? J1(C, e.lng,
|
|
157
|
+
e.lng ? J1(C, e.lng, a, () => m()) : z1(C, a, () => m());
|
|
158
158
|
});
|
|
159
159
|
}, m1 = ({
|
|
160
160
|
children: l,
|
|
@@ -195,8 +195,8 @@ const q2 = (l, e) => {
|
|
|
195
195
|
overflow: "hidden",
|
|
196
196
|
textOverflow: "clip"
|
|
197
197
|
});
|
|
198
|
-
const
|
|
199
|
-
Object.assign(h.style, d), i(
|
|
198
|
+
const o = h.scrollWidth > h.offsetWidth + 1;
|
|
199
|
+
Object.assign(h.style, d), i(o);
|
|
200
200
|
}, [s]);
|
|
201
201
|
return N1(() => {
|
|
202
202
|
const h = s();
|
|
@@ -220,29 +220,31 @@ const q2 = (l, e) => {
|
|
|
220
220
|
color: t,
|
|
221
221
|
children: i,
|
|
222
222
|
onClick: s,
|
|
223
|
-
|
|
224
|
-
whiteSpace: h = "normal",
|
|
223
|
+
whiteSpace: C,
|
|
225
224
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
226
|
-
trim:
|
|
227
|
-
},
|
|
225
|
+
trim: h = !1
|
|
226
|
+
}, d) => {
|
|
228
227
|
const o = O(null);
|
|
229
|
-
c1(
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
l && l !== "inherit" && (
|
|
233
|
-
const
|
|
234
|
-
className:
|
|
235
|
-
style: {
|
|
228
|
+
c1(d, () => o.current);
|
|
229
|
+
const a = e5(o, { enabled: h }), r = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
230
|
+
let f = `snmt-typography snmt-typography-${e}`;
|
|
231
|
+
l && l !== "inherit" && (f += ` snmt-typography-align-${l}`);
|
|
232
|
+
const w = {
|
|
233
|
+
className: f,
|
|
234
|
+
style: {
|
|
235
|
+
color: t,
|
|
236
|
+
whiteSpace: C
|
|
237
|
+
},
|
|
236
238
|
onClick: s,
|
|
237
239
|
ref: o,
|
|
238
|
-
ellipsis:
|
|
240
|
+
ellipsis: h && a ? {
|
|
239
241
|
tooltip: {
|
|
240
242
|
title: i,
|
|
241
243
|
overlayClassName: "snmt-tooltip"
|
|
242
244
|
}
|
|
243
245
|
} : void 0
|
|
244
246
|
};
|
|
245
|
-
return
|
|
247
|
+
return r ? /* @__PURE__ */ n(t5, { level: l5[e], ...w, children: i }) : /* @__PURE__ */ n(i5, { ...w, children: i });
|
|
246
248
|
}
|
|
247
249
|
), s5 = ({ label: l, variant: e = "small", src: t, fallbackText: i }) => {
|
|
248
250
|
const s = t != null && t.trim() ? t : void 0, C = {
|
|
@@ -304,8 +306,8 @@ const q2 = (l, e) => {
|
|
|
304
306
|
overflow: "hidden",
|
|
305
307
|
textOverflow: "clip"
|
|
306
308
|
});
|
|
307
|
-
const
|
|
308
|
-
Object.assign(h.style, d), i(
|
|
309
|
+
const o = h.scrollWidth > h.offsetWidth + 1;
|
|
310
|
+
Object.assign(h.style, d), i(o);
|
|
309
311
|
}, [s]);
|
|
310
312
|
return N1(() => {
|
|
311
313
|
const h = s();
|
|
@@ -329,29 +331,31 @@ const q2 = (l, e) => {
|
|
|
329
331
|
color: t,
|
|
330
332
|
children: i,
|
|
331
333
|
onClick: s,
|
|
332
|
-
|
|
333
|
-
whiteSpace: h = "normal",
|
|
334
|
+
whiteSpace: C,
|
|
334
335
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
335
|
-
trim:
|
|
336
|
-
},
|
|
336
|
+
trim: h = !1
|
|
337
|
+
}, d) => {
|
|
337
338
|
const o = O(null);
|
|
338
|
-
c1(
|
|
339
|
-
const
|
|
340
|
-
let
|
|
341
|
-
l && l !== "inherit" && (
|
|
342
|
-
const
|
|
343
|
-
className:
|
|
344
|
-
style: {
|
|
339
|
+
c1(d, () => o.current);
|
|
340
|
+
const a = n5(o, { enabled: h }), r = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
341
|
+
let f = `snmt-typography snmt-typography-${e}`;
|
|
342
|
+
l && l !== "inherit" && (f += ` snmt-typography-align-${l}`);
|
|
343
|
+
const w = {
|
|
344
|
+
className: f,
|
|
345
|
+
style: {
|
|
346
|
+
color: t,
|
|
347
|
+
whiteSpace: C
|
|
348
|
+
},
|
|
345
349
|
onClick: s,
|
|
346
350
|
ref: o,
|
|
347
|
-
ellipsis:
|
|
351
|
+
ellipsis: h && a ? {
|
|
348
352
|
tooltip: {
|
|
349
353
|
title: i,
|
|
350
354
|
overlayClassName: "snmt-tooltip"
|
|
351
355
|
}
|
|
352
356
|
} : void 0
|
|
353
357
|
};
|
|
354
|
-
return
|
|
358
|
+
return r ? /* @__PURE__ */ n(o5, { level: r5[e], ...w, children: i }) : /* @__PURE__ */ n(a5, { ...w, children: i });
|
|
355
359
|
}
|
|
356
360
|
), h5 = ({
|
|
357
361
|
checked: l = !0,
|
|
@@ -361,9 +365,9 @@ const q2 = (l, e) => {
|
|
|
361
365
|
disabled: s = !1,
|
|
362
366
|
disableUncheck: C = !1
|
|
363
367
|
}) => {
|
|
364
|
-
const [h, d] = D(l), [
|
|
368
|
+
const [h, d] = D(l), [o, a] = D(e);
|
|
365
369
|
I(() => {
|
|
366
|
-
d(l),
|
|
370
|
+
d(l), a(e);
|
|
367
371
|
}, [l, e]);
|
|
368
372
|
const { theme: r } = l1(h1);
|
|
369
373
|
return /* @__PURE__ */ n(
|
|
@@ -371,9 +375,9 @@ const q2 = (l, e) => {
|
|
|
371
375
|
{
|
|
372
376
|
className: `snmt-checkbox snmt-checkbox-${r}`,
|
|
373
377
|
checked: h,
|
|
374
|
-
indeterminate:
|
|
375
|
-
onChange: (
|
|
376
|
-
C && h || (
|
|
378
|
+
indeterminate: o,
|
|
379
|
+
onChange: (f) => {
|
|
380
|
+
C && h || (a(!1), d(f.target.checked), i && i(f));
|
|
377
381
|
},
|
|
378
382
|
disabled: s,
|
|
379
383
|
children: t && /* @__PURE__ */ n(
|
|
@@ -523,7 +527,7 @@ const q2 = (l, e) => {
|
|
|
523
527
|
)
|
|
524
528
|
]
|
|
525
529
|
}
|
|
526
|
-
),
|
|
530
|
+
), u5 = ({
|
|
527
531
|
width: l = 20,
|
|
528
532
|
height: e = 20,
|
|
529
533
|
color: t = c.GREY_DARK_5,
|
|
@@ -550,7 +554,7 @@ const q2 = (l, e) => {
|
|
|
550
554
|
/* @__PURE__ */ n("defs", { children: /* @__PURE__ */ n("clipPath", { id: "clip0_1_2043", children: /* @__PURE__ */ n("rect", { width: "24", height: "24", fill: "white", transform: "translate(0.5 0.5)" }) }) })
|
|
551
555
|
]
|
|
552
556
|
}
|
|
553
|
-
),
|
|
557
|
+
), p5 = ({
|
|
554
558
|
width: l = 20,
|
|
555
559
|
height: e = 20,
|
|
556
560
|
color: t = c.GREY_DARK_5,
|
|
@@ -2476,7 +2480,7 @@ const q2 = (l, e) => {
|
|
|
2476
2480
|
)
|
|
2477
2481
|
]
|
|
2478
2482
|
}
|
|
2479
|
-
),
|
|
2483
|
+
), u7 = ({
|
|
2480
2484
|
width: l = 20,
|
|
2481
2485
|
height: e = 20,
|
|
2482
2486
|
color: t = c.GREY_DARK_5,
|
|
@@ -2516,7 +2520,7 @@ const q2 = (l, e) => {
|
|
|
2516
2520
|
)
|
|
2517
2521
|
]
|
|
2518
2522
|
}
|
|
2519
|
-
),
|
|
2523
|
+
), p7 = ({
|
|
2520
2524
|
width: l = 20,
|
|
2521
2525
|
height: e = 20,
|
|
2522
2526
|
color: t = c.GREY_DARK_5,
|
|
@@ -2641,7 +2645,7 @@ const q2 = (l, e) => {
|
|
|
2641
2645
|
}
|
|
2642
2646
|
)
|
|
2643
2647
|
}
|
|
2644
|
-
),
|
|
2648
|
+
), p1 = ({
|
|
2645
2649
|
name: l,
|
|
2646
2650
|
width: e,
|
|
2647
2651
|
height: t,
|
|
@@ -2650,159 +2654,159 @@ const q2 = (l, e) => {
|
|
|
2650
2654
|
disabled: C = !1,
|
|
2651
2655
|
onClick: h
|
|
2652
2656
|
}) => {
|
|
2653
|
-
const { theme: d } = l1(h1),
|
|
2657
|
+
const { theme: d } = l1(h1), o = C ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, a = C ? void 0 : h, r = h && !C ? `${s || ""} clickable` : s;
|
|
2654
2658
|
return /* @__PURE__ */ n(t1, { children: (() => {
|
|
2655
2659
|
switch (l) {
|
|
2656
2660
|
case "arrow1Down":
|
|
2657
|
-
return c5({ width: e, height: t, color:
|
|
2661
|
+
return c5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2658
2662
|
case "arrow1Up":
|
|
2659
|
-
return d5({ width: e, height: t, color:
|
|
2663
|
+
return d5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2660
2664
|
case "arrow1Right":
|
|
2661
|
-
return g5({ width: e, height: t, color:
|
|
2665
|
+
return g5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2662
2666
|
case "arrow1Left":
|
|
2663
|
-
return w5({ width: e, height: t, color:
|
|
2667
|
+
return w5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2664
2668
|
case "info":
|
|
2665
|
-
return f5({ width: e, height: t, color:
|
|
2669
|
+
return f5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2666
2670
|
case "archive":
|
|
2667
|
-
return v5({ width: e, height: t, color:
|
|
2671
|
+
return v5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2668
2672
|
case "unarchive":
|
|
2669
|
-
return k5({ width: e, height: t, color:
|
|
2673
|
+
return k5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2670
2674
|
case "calendar":
|
|
2671
|
-
return N5({ width: e, height: t, color:
|
|
2675
|
+
return N5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2672
2676
|
case "check":
|
|
2673
|
-
return M5({ width: e, height: t, color:
|
|
2677
|
+
return M5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2674
2678
|
case "cancel":
|
|
2675
|
-
return x5({ width: e, height: t, color:
|
|
2679
|
+
return x5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2676
2680
|
case "add":
|
|
2677
|
-
return Z5({ width: e, height: t, color:
|
|
2681
|
+
return Z5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2678
2682
|
case "list":
|
|
2679
|
-
return V5({ width: e, height: t, color:
|
|
2683
|
+
return V5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2680
2684
|
case "dragAndDrop":
|
|
2681
|
-
return R5({ width: e, height: t, color:
|
|
2685
|
+
return R5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2682
2686
|
case "filter1":
|
|
2683
|
-
return H5({ width: e, height: t, color:
|
|
2687
|
+
return H5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2684
2688
|
case "filter2":
|
|
2685
|
-
return t7({ width: e, height: t, color:
|
|
2689
|
+
return t7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2686
2690
|
case "attention":
|
|
2687
|
-
return _5({ width: e, height: t, color:
|
|
2691
|
+
return _5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2688
2692
|
case "users":
|
|
2689
|
-
return b5({ width: e, height: t, color:
|
|
2693
|
+
return b5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2690
2694
|
case "mySkillsMatrix":
|
|
2691
2695
|
return y5({
|
|
2692
2696
|
width: e,
|
|
2693
2697
|
height: t,
|
|
2694
|
-
color:
|
|
2698
|
+
color: o,
|
|
2695
2699
|
className: r,
|
|
2696
|
-
onClick:
|
|
2700
|
+
onClick: a
|
|
2697
2701
|
});
|
|
2698
2702
|
case "skills":
|
|
2699
|
-
return A5({ width: e, height: t, color:
|
|
2703
|
+
return A5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2700
2704
|
case "skillsMatrices":
|
|
2701
2705
|
return E5({
|
|
2702
2706
|
width: e,
|
|
2703
2707
|
height: t,
|
|
2704
|
-
color:
|
|
2708
|
+
color: o,
|
|
2705
2709
|
className: r,
|
|
2706
|
-
onClick:
|
|
2710
|
+
onClick: a
|
|
2707
2711
|
});
|
|
2708
2712
|
case "history":
|
|
2709
|
-
return D5({ width: e, height: t, color:
|
|
2713
|
+
return D5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2710
2714
|
case "logOut":
|
|
2711
|
-
return K5({ width: e, height: t, color:
|
|
2715
|
+
return K5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2712
2716
|
case "settings":
|
|
2713
|
-
return S5({ width: e, height: t, color:
|
|
2717
|
+
return S5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2714
2718
|
case "trash":
|
|
2715
|
-
return G5({ width: e, height: t, color:
|
|
2719
|
+
return G5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2716
2720
|
case "settings2":
|
|
2717
|
-
return B5({ width: e, height: t, color:
|
|
2721
|
+
return B5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2718
2722
|
case "checkCircle":
|
|
2719
|
-
return Y5({ width: e, height: t, color:
|
|
2723
|
+
return Y5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2720
2724
|
case "cancelCircle":
|
|
2721
|
-
return O5({ width: e, height: t, color:
|
|
2725
|
+
return O5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2722
2726
|
case "visibilityIcon":
|
|
2723
2727
|
return I5({
|
|
2724
2728
|
width: e,
|
|
2725
2729
|
height: t,
|
|
2726
|
-
color:
|
|
2730
|
+
color: o,
|
|
2727
2731
|
className: r,
|
|
2728
|
-
onClick:
|
|
2732
|
+
onClick: a
|
|
2729
2733
|
});
|
|
2730
2734
|
case "visibilityOffIcon":
|
|
2731
2735
|
return $5({
|
|
2732
2736
|
width: e,
|
|
2733
2737
|
height: t,
|
|
2734
|
-
color:
|
|
2738
|
+
color: o,
|
|
2735
2739
|
className: r,
|
|
2736
|
-
onClick:
|
|
2740
|
+
onClick: a
|
|
2737
2741
|
});
|
|
2738
2742
|
case "sortUp":
|
|
2739
|
-
return T5({ width: e, height: t, color:
|
|
2743
|
+
return T5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2740
2744
|
case "sortDown":
|
|
2741
|
-
return P5({ width: e, height: t, color:
|
|
2745
|
+
return P5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2742
2746
|
case "sortDouble":
|
|
2743
|
-
return j5({ width: e, height: t, color:
|
|
2747
|
+
return j5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2744
2748
|
case "search":
|
|
2745
|
-
return F5({ width: e, height: t, color:
|
|
2749
|
+
return F5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2746
2750
|
case "arrowUpFilled":
|
|
2747
|
-
return W5({ width: e, height: t, color:
|
|
2751
|
+
return W5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2748
2752
|
case "arrowDownFilled":
|
|
2749
|
-
return U5({ width: e, height: t, color:
|
|
2753
|
+
return U5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2750
2754
|
case "arrow2Up":
|
|
2751
|
-
return
|
|
2755
|
+
return u5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2752
2756
|
case "arrow2Right":
|
|
2753
|
-
return
|
|
2757
|
+
return p5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2754
2758
|
case "arrow2Down":
|
|
2755
|
-
return L5({ width: e, height: t, color:
|
|
2759
|
+
return L5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2756
2760
|
case "arrow2Left":
|
|
2757
|
-
return m5({ width: e, height: t, color:
|
|
2761
|
+
return m5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2758
2762
|
case "link":
|
|
2759
|
-
return z5({ width: e, height: t, color:
|
|
2763
|
+
return z5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2760
2764
|
case "telegram":
|
|
2761
|
-
return q5({ width: e, height: t, color:
|
|
2765
|
+
return q5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2762
2766
|
case "mail":
|
|
2763
|
-
return X5({ width: e, height: t, color:
|
|
2767
|
+
return X5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2764
2768
|
case "github":
|
|
2765
|
-
return J5({ width: e, height: t, color:
|
|
2769
|
+
return J5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2766
2770
|
case "linkedIn":
|
|
2767
|
-
return Q5({ width: e, height: t, color:
|
|
2771
|
+
return Q5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2768
2772
|
case "emptyStateIcon":
|
|
2769
|
-
return e7({ width: e, height: t, color:
|
|
2773
|
+
return e7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2770
2774
|
case "dotMenuIcon":
|
|
2771
|
-
return i7({ width: e, height: t, color:
|
|
2775
|
+
return i7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2772
2776
|
case "plusCircle":
|
|
2773
|
-
return l7({ width: e, height: t, color:
|
|
2777
|
+
return l7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2774
2778
|
case "warning":
|
|
2775
|
-
return s7({ width: e, height: t, color:
|
|
2779
|
+
return s7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2776
2780
|
case "bell":
|
|
2777
|
-
return n7({ width: e, height: t, color:
|
|
2781
|
+
return n7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2778
2782
|
case "copy":
|
|
2779
|
-
return o7({ width: e, height: t, color:
|
|
2783
|
+
return o7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2780
2784
|
case "contract":
|
|
2781
|
-
return a7({ width: e, height: t, color:
|
|
2785
|
+
return a7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2782
2786
|
case "resourceManager":
|
|
2783
|
-
return r7({ width: e, height: t, color:
|
|
2787
|
+
return r7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2784
2788
|
case "image":
|
|
2785
|
-
return C7({ width: e, height: t, color:
|
|
2789
|
+
return C7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2786
2790
|
case "edit":
|
|
2787
|
-
return h7({ width: e, height: t, color:
|
|
2791
|
+
return h7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2788
2792
|
case "burgerMenu":
|
|
2789
|
-
return c7({ width: e, height: t, color:
|
|
2793
|
+
return c7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2790
2794
|
case "refresh":
|
|
2791
|
-
return d7({ width: e, height: t, color:
|
|
2795
|
+
return d7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2792
2796
|
case "projects":
|
|
2793
|
-
return g7({ width: e, height: t, color:
|
|
2797
|
+
return g7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2794
2798
|
case "user":
|
|
2795
|
-
return f7({ width: e, height: t, color:
|
|
2799
|
+
return f7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2796
2800
|
case "exit":
|
|
2797
|
-
return w7({ width: e, height: t, color:
|
|
2801
|
+
return w7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2798
2802
|
case "status":
|
|
2799
|
-
return
|
|
2803
|
+
return u7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2800
2804
|
case "community":
|
|
2801
|
-
return
|
|
2805
|
+
return p7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2802
2806
|
case "docs":
|
|
2803
|
-
return L7({ width: e, height: t, color:
|
|
2807
|
+
return L7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2804
2808
|
case "unpaidLeave":
|
|
2805
|
-
return m7({ width: e, height: t, color:
|
|
2809
|
+
return m7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2806
2810
|
default:
|
|
2807
2811
|
return /* @__PURE__ */ n(t1, { children: "No Icon provided" });
|
|
2808
2812
|
}
|
|
@@ -2824,8 +2828,8 @@ const q2 = (l, e) => {
|
|
|
2824
2828
|
overflow: "hidden",
|
|
2825
2829
|
textOverflow: "clip"
|
|
2826
2830
|
});
|
|
2827
|
-
const
|
|
2828
|
-
Object.assign(h.style, d), i(
|
|
2831
|
+
const o = h.scrollWidth > h.offsetWidth + 1;
|
|
2832
|
+
Object.assign(h.style, d), i(o);
|
|
2829
2833
|
}, [s]);
|
|
2830
2834
|
return N1(() => {
|
|
2831
2835
|
const h = s();
|
|
@@ -2849,29 +2853,31 @@ const q2 = (l, e) => {
|
|
|
2849
2853
|
color: t,
|
|
2850
2854
|
children: i,
|
|
2851
2855
|
onClick: s,
|
|
2852
|
-
|
|
2853
|
-
whiteSpace: h = "normal",
|
|
2856
|
+
whiteSpace: C,
|
|
2854
2857
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
2855
|
-
trim:
|
|
2856
|
-
},
|
|
2858
|
+
trim: h = !1
|
|
2859
|
+
}, d) => {
|
|
2857
2860
|
const o = O(null);
|
|
2858
|
-
c1(
|
|
2859
|
-
const
|
|
2860
|
-
let
|
|
2861
|
-
l && l !== "inherit" && (
|
|
2862
|
-
const
|
|
2863
|
-
className:
|
|
2864
|
-
style: {
|
|
2861
|
+
c1(d, () => o.current);
|
|
2862
|
+
const a = v7(o, { enabled: h }), r = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
2863
|
+
let f = `snmt-typography snmt-typography-${e}`;
|
|
2864
|
+
l && l !== "inherit" && (f += ` snmt-typography-align-${l}`);
|
|
2865
|
+
const w = {
|
|
2866
|
+
className: f,
|
|
2867
|
+
style: {
|
|
2868
|
+
color: t,
|
|
2869
|
+
whiteSpace: C
|
|
2870
|
+
},
|
|
2865
2871
|
onClick: s,
|
|
2866
2872
|
ref: o,
|
|
2867
|
-
ellipsis:
|
|
2873
|
+
ellipsis: h && a ? {
|
|
2868
2874
|
tooltip: {
|
|
2869
2875
|
title: i,
|
|
2870
2876
|
overlayClassName: "snmt-tooltip"
|
|
2871
2877
|
}
|
|
2872
2878
|
} : void 0
|
|
2873
2879
|
};
|
|
2874
|
-
return
|
|
2880
|
+
return r ? /* @__PURE__ */ n(k7, { level: M7[e], ...w, children: i }) : /* @__PURE__ */ n(N7, { ...w, children: i });
|
|
2875
2881
|
}
|
|
2876
2882
|
), Z7 = ({
|
|
2877
2883
|
width: l = 20,
|
|
@@ -4424,7 +4430,7 @@ const q2 = (l, e) => {
|
|
|
4424
4430
|
}
|
|
4425
4431
|
)
|
|
4426
4432
|
}
|
|
4427
|
-
),
|
|
4433
|
+
), u9 = ({
|
|
4428
4434
|
className: l,
|
|
4429
4435
|
color: e = c.GREY_DARK_5,
|
|
4430
4436
|
height: t = 20,
|
|
@@ -4485,7 +4491,7 @@ const q2 = (l, e) => {
|
|
|
4485
4491
|
)
|
|
4486
4492
|
]
|
|
4487
4493
|
}
|
|
4488
|
-
),
|
|
4494
|
+
), p9 = ({
|
|
4489
4495
|
className: l,
|
|
4490
4496
|
color: e = c.GREY_DARK_5,
|
|
4491
4497
|
height: t = 20,
|
|
@@ -5137,164 +5143,164 @@ const q2 = (l, e) => {
|
|
|
5137
5143
|
disabled: C = !1,
|
|
5138
5144
|
onClick: h
|
|
5139
5145
|
}) => {
|
|
5140
|
-
const { theme: d } = l1(h1),
|
|
5146
|
+
const { theme: d } = l1(h1), o = C ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, a = C ? void 0 : h, r = h && !C ? `${s || ""} clickable` : s;
|
|
5141
5147
|
return /* @__PURE__ */ n(t1, { children: (() => {
|
|
5142
5148
|
switch (l) {
|
|
5143
5149
|
case "arrow1Down":
|
|
5144
|
-
return Z7({ width: e, height: t, color:
|
|
5150
|
+
return Z7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5145
5151
|
case "arrow1Up":
|
|
5146
|
-
return V7({ width: e, height: t, color:
|
|
5152
|
+
return V7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5147
5153
|
case "arrow1Right":
|
|
5148
|
-
return R7({ width: e, height: t, color:
|
|
5154
|
+
return R7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5149
5155
|
case "arrow1Left":
|
|
5150
|
-
return H7({ width: e, height: t, color:
|
|
5156
|
+
return H7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5151
5157
|
case "info":
|
|
5152
|
-
return _7({ width: e, height: t, color:
|
|
5158
|
+
return _7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5153
5159
|
case "archive":
|
|
5154
|
-
return D7({ width: e, height: t, color:
|
|
5160
|
+
return D7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5155
5161
|
case "unarchive":
|
|
5156
|
-
return K7({ width: e, height: t, color:
|
|
5162
|
+
return K7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5157
5163
|
case "calendar":
|
|
5158
|
-
return S7({ width: e, height: t, color:
|
|
5164
|
+
return S7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5159
5165
|
case "check":
|
|
5160
|
-
return G7({ width: e, height: t, color:
|
|
5166
|
+
return G7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5161
5167
|
case "cancel":
|
|
5162
|
-
return B7({ width: e, height: t, color:
|
|
5168
|
+
return B7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5163
5169
|
case "add":
|
|
5164
|
-
return Y7({ width: e, height: t, color:
|
|
5170
|
+
return Y7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5165
5171
|
case "list":
|
|
5166
|
-
return O7({ width: e, height: t, color:
|
|
5172
|
+
return O7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5167
5173
|
case "dragAndDrop":
|
|
5168
|
-
return I7({ width: e, height: t, color:
|
|
5174
|
+
return I7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5169
5175
|
case "filter1":
|
|
5170
|
-
return $7({ width: e, height: t, color:
|
|
5176
|
+
return $7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5171
5177
|
case "filter2":
|
|
5172
|
-
return f9({ width: e, height: t, color:
|
|
5178
|
+
return f9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5173
5179
|
case "attention":
|
|
5174
|
-
return T7({ width: e, height: t, color:
|
|
5180
|
+
return T7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5175
5181
|
case "users":
|
|
5176
|
-
return P7({ width: e, height: t, color:
|
|
5182
|
+
return P7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5177
5183
|
case "mySkillsMatrix":
|
|
5178
5184
|
return j7({
|
|
5179
5185
|
width: e,
|
|
5180
5186
|
height: t,
|
|
5181
|
-
color:
|
|
5187
|
+
color: o,
|
|
5182
5188
|
className: r,
|
|
5183
|
-
onClick:
|
|
5189
|
+
onClick: a
|
|
5184
5190
|
});
|
|
5185
5191
|
case "skills":
|
|
5186
|
-
return F7({ width: e, height: t, color:
|
|
5192
|
+
return F7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5187
5193
|
case "skillsMatrices":
|
|
5188
5194
|
return U7({
|
|
5189
5195
|
width: e,
|
|
5190
5196
|
height: t,
|
|
5191
|
-
color:
|
|
5197
|
+
color: o,
|
|
5192
5198
|
className: r,
|
|
5193
|
-
onClick:
|
|
5199
|
+
onClick: a
|
|
5194
5200
|
});
|
|
5195
5201
|
case "history":
|
|
5196
|
-
return W7({ width: e, height: t, color:
|
|
5202
|
+
return W7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5197
5203
|
case "logOut":
|
|
5198
|
-
return z7({ width: e, height: t, color:
|
|
5204
|
+
return z7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5199
5205
|
case "settings":
|
|
5200
|
-
return J7({ width: e, height: t, color:
|
|
5206
|
+
return J7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5201
5207
|
case "trash":
|
|
5202
|
-
return q7({ width: e, height: t, color:
|
|
5208
|
+
return q7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5203
5209
|
case "settings2":
|
|
5204
|
-
return Q7({ width: e, height: t, color:
|
|
5210
|
+
return Q7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5205
5211
|
case "checkCircle":
|
|
5206
|
-
return X7({ width: e, height: t, color:
|
|
5212
|
+
return X7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5207
5213
|
case "cancelCircle":
|
|
5208
|
-
return e9({ width: e, height: t, color:
|
|
5214
|
+
return e9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5209
5215
|
case "visibilityIcon":
|
|
5210
5216
|
return t9({
|
|
5211
5217
|
width: e,
|
|
5212
5218
|
height: t,
|
|
5213
|
-
color:
|
|
5219
|
+
color: o,
|
|
5214
5220
|
className: r,
|
|
5215
|
-
onClick:
|
|
5221
|
+
onClick: a
|
|
5216
5222
|
});
|
|
5217
5223
|
case "visibilityOffIcon":
|
|
5218
5224
|
return i9({
|
|
5219
5225
|
width: e,
|
|
5220
5226
|
height: t,
|
|
5221
|
-
color:
|
|
5227
|
+
color: o,
|
|
5222
5228
|
className: r,
|
|
5223
|
-
onClick:
|
|
5229
|
+
onClick: a
|
|
5224
5230
|
});
|
|
5225
5231
|
case "sortUp":
|
|
5226
|
-
return l9({ width: e, height: t, color:
|
|
5232
|
+
return l9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5227
5233
|
case "sortDown":
|
|
5228
|
-
return s9({ width: e, height: t, color:
|
|
5234
|
+
return s9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5229
5235
|
case "sortDouble":
|
|
5230
|
-
return n9({ width: e, height: t, color:
|
|
5236
|
+
return n9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5231
5237
|
case "search":
|
|
5232
|
-
return o9({ width: e, height: t, color:
|
|
5238
|
+
return o9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5233
5239
|
case "arrowUpFilled":
|
|
5234
|
-
return r9({ width: e, height: t, color:
|
|
5240
|
+
return r9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5235
5241
|
case "arrowDownFilled":
|
|
5236
|
-
return a9({ width: e, height: t, color:
|
|
5242
|
+
return a9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5237
5243
|
case "arrow2Up":
|
|
5238
|
-
return b7({ width: e, height: t, color:
|
|
5244
|
+
return b7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5239
5245
|
case "arrow2Right":
|
|
5240
|
-
return y7({ width: e, height: t, color:
|
|
5246
|
+
return y7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5241
5247
|
case "arrow2Down":
|
|
5242
|
-
return A7({ width: e, height: t, color:
|
|
5248
|
+
return A7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5243
5249
|
case "arrow2Left":
|
|
5244
|
-
return E7({ width: e, height: t, color:
|
|
5250
|
+
return E7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5245
5251
|
case "link":
|
|
5246
|
-
return C9({ width: e, height: t, color:
|
|
5252
|
+
return C9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5247
5253
|
case "telegram":
|
|
5248
|
-
return c9({ width: e, height: t, color:
|
|
5254
|
+
return c9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5249
5255
|
case "mail":
|
|
5250
|
-
return g9({ width: e, height: t, color:
|
|
5256
|
+
return g9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5251
5257
|
case "github":
|
|
5252
|
-
return h9({ width: e, height: t, color:
|
|
5258
|
+
return h9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5253
5259
|
case "linkedIn":
|
|
5254
|
-
return d9({ width: e, height: t, color:
|
|
5260
|
+
return d9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5255
5261
|
case "emptyStateIcon":
|
|
5256
|
-
return w9({ width: e, height: t, color:
|
|
5262
|
+
return w9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5257
5263
|
case "dotMenuIcon":
|
|
5258
|
-
return
|
|
5264
|
+
return u9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5259
5265
|
case "plusCircle":
|
|
5260
|
-
return
|
|
5266
|
+
return p9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5261
5267
|
case "warning":
|
|
5262
|
-
return L9({ width: e, height: t, color:
|
|
5268
|
+
return L9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5263
5269
|
case "bell":
|
|
5264
|
-
return m9({ width: e, height: t, color:
|
|
5270
|
+
return m9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5265
5271
|
case "copy":
|
|
5266
|
-
return v9({ width: e, height: t, color:
|
|
5272
|
+
return v9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5267
5273
|
case "contract":
|
|
5268
|
-
return k9({ width: e, height: t, color:
|
|
5274
|
+
return k9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5269
5275
|
case "resourceManager":
|
|
5270
|
-
return N9({ width: e, height: t, color:
|
|
5276
|
+
return N9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5271
5277
|
case "image":
|
|
5272
|
-
return M9({ width: e, height: t, color:
|
|
5278
|
+
return M9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5273
5279
|
case "edit":
|
|
5274
|
-
return x9({ width: e, height: t, color:
|
|
5280
|
+
return x9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5275
5281
|
case "burgerMenu":
|
|
5276
|
-
return Z9({ width: e, height: t, color:
|
|
5282
|
+
return Z9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5277
5283
|
case "refresh":
|
|
5278
|
-
return V9({ width: e, height: t, color:
|
|
5284
|
+
return V9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5279
5285
|
case "projects":
|
|
5280
|
-
return R9({ width: e, height: t, color:
|
|
5286
|
+
return R9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5281
5287
|
case "user":
|
|
5282
|
-
return _9({ width: e, height: t, color:
|
|
5288
|
+
return _9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5283
5289
|
case "exit":
|
|
5284
|
-
return H9({ width: e, height: t, color:
|
|
5290
|
+
return H9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5285
5291
|
case "status":
|
|
5286
|
-
return b9({ width: e, height: t, color:
|
|
5292
|
+
return b9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5287
5293
|
case "community":
|
|
5288
|
-
return y9({ width: e, height: t, color:
|
|
5294
|
+
return y9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5289
5295
|
case "docs":
|
|
5290
|
-
return A9({ width: e, height: t, color:
|
|
5296
|
+
return A9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5291
5297
|
case "unpaidLeave":
|
|
5292
|
-
return E9({ width: e, height: t, color:
|
|
5298
|
+
return E9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5293
5299
|
default:
|
|
5294
5300
|
return /* @__PURE__ */ n(t1, { children: "No Icon provided" });
|
|
5295
5301
|
}
|
|
5296
5302
|
})() });
|
|
5297
|
-
},
|
|
5303
|
+
}, p2 = ({
|
|
5298
5304
|
children: l,
|
|
5299
5305
|
width: e,
|
|
5300
5306
|
size: t = "small",
|
|
@@ -5349,8 +5355,8 @@ const q2 = (l, e) => {
|
|
|
5349
5355
|
overflow: "hidden",
|
|
5350
5356
|
textOverflow: "clip"
|
|
5351
5357
|
});
|
|
5352
|
-
const
|
|
5353
|
-
Object.assign(h.style, d), i(
|
|
5358
|
+
const o = h.scrollWidth > h.offsetWidth + 1;
|
|
5359
|
+
Object.assign(h.style, d), i(o);
|
|
5354
5360
|
}, [s]);
|
|
5355
5361
|
return N1(() => {
|
|
5356
5362
|
const h = s();
|
|
@@ -5374,29 +5380,31 @@ const q2 = (l, e) => {
|
|
|
5374
5380
|
color: t,
|
|
5375
5381
|
children: i,
|
|
5376
5382
|
onClick: s,
|
|
5377
|
-
|
|
5378
|
-
whiteSpace: h = "normal",
|
|
5383
|
+
whiteSpace: C,
|
|
5379
5384
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
5380
|
-
trim:
|
|
5381
|
-
},
|
|
5385
|
+
trim: h = !1
|
|
5386
|
+
}, d) => {
|
|
5382
5387
|
const o = O(null);
|
|
5383
|
-
c1(
|
|
5384
|
-
const
|
|
5385
|
-
let
|
|
5386
|
-
l && l !== "inherit" && (
|
|
5387
|
-
const
|
|
5388
|
-
className:
|
|
5389
|
-
style: {
|
|
5388
|
+
c1(d, () => o.current);
|
|
5389
|
+
const a = K9(o, { enabled: h }), r = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
5390
|
+
let f = `snmt-typography snmt-typography-${e}`;
|
|
5391
|
+
l && l !== "inherit" && (f += ` snmt-typography-align-${l}`);
|
|
5392
|
+
const w = {
|
|
5393
|
+
className: f,
|
|
5394
|
+
style: {
|
|
5395
|
+
color: t,
|
|
5396
|
+
whiteSpace: C
|
|
5397
|
+
},
|
|
5390
5398
|
onClick: s,
|
|
5391
5399
|
ref: o,
|
|
5392
|
-
ellipsis:
|
|
5400
|
+
ellipsis: h && a ? {
|
|
5393
5401
|
tooltip: {
|
|
5394
5402
|
title: i,
|
|
5395
5403
|
overlayClassName: "snmt-tooltip"
|
|
5396
5404
|
}
|
|
5397
5405
|
} : void 0
|
|
5398
5406
|
};
|
|
5399
|
-
return
|
|
5407
|
+
return r ? /* @__PURE__ */ n(S9, { level: B9[e], ...w, children: i }) : /* @__PURE__ */ n(G9, { ...w, children: i });
|
|
5400
5408
|
}
|
|
5401
5409
|
), O9 = ({
|
|
5402
5410
|
children: l,
|
|
@@ -5407,7 +5415,7 @@ const q2 = (l, e) => {
|
|
|
5407
5415
|
noPadding: C = !1,
|
|
5408
5416
|
trigger: h = "click"
|
|
5409
5417
|
}) => {
|
|
5410
|
-
const [d,
|
|
5418
|
+
const [d, o] = D(!1);
|
|
5411
5419
|
return /* @__PURE__ */ n(
|
|
5412
5420
|
A2,
|
|
5413
5421
|
{
|
|
@@ -5417,8 +5425,8 @@ const q2 = (l, e) => {
|
|
|
5417
5425
|
trigger: h,
|
|
5418
5426
|
overlayClassName: `snmt-popover ${C ? "" : "padding"}`,
|
|
5419
5427
|
open: t ?? d,
|
|
5420
|
-
onOpenChange: (
|
|
5421
|
-
a
|
|
5428
|
+
onOpenChange: (a) => {
|
|
5429
|
+
o(a), i == null || i(a);
|
|
5422
5430
|
},
|
|
5423
5431
|
children: /* @__PURE__ */ n("div", { className: "wrapper", children: l })
|
|
5424
5432
|
}
|
|
@@ -5440,8 +5448,8 @@ const q2 = (l, e) => {
|
|
|
5440
5448
|
overflow: "hidden",
|
|
5441
5449
|
textOverflow: "clip"
|
|
5442
5450
|
});
|
|
5443
|
-
const
|
|
5444
|
-
Object.assign(h.style, d), i(
|
|
5451
|
+
const o = h.scrollWidth > h.offsetWidth + 1;
|
|
5452
|
+
Object.assign(h.style, d), i(o);
|
|
5445
5453
|
}, [s]);
|
|
5446
5454
|
return N1(() => {
|
|
5447
5455
|
const h = s();
|
|
@@ -5465,29 +5473,31 @@ const q2 = (l, e) => {
|
|
|
5465
5473
|
color: t,
|
|
5466
5474
|
children: i,
|
|
5467
5475
|
onClick: s,
|
|
5468
|
-
|
|
5469
|
-
whiteSpace: h = "normal",
|
|
5476
|
+
whiteSpace: C,
|
|
5470
5477
|
/** This prop allows you to enable tooltip if text size is too big */
|
|
5471
|
-
trim:
|
|
5472
|
-
},
|
|
5478
|
+
trim: h = !1
|
|
5479
|
+
}, d) => {
|
|
5473
5480
|
const o = O(null);
|
|
5474
|
-
c1(
|
|
5475
|
-
const
|
|
5476
|
-
let
|
|
5477
|
-
l && l !== "inherit" && (
|
|
5478
|
-
const
|
|
5479
|
-
className:
|
|
5480
|
-
style: {
|
|
5481
|
+
c1(d, () => o.current);
|
|
5482
|
+
const a = I9(o, { enabled: h }), r = e === "h1" || e === "h2" || e === "h3" || e === "h4";
|
|
5483
|
+
let f = `snmt-typography snmt-typography-${e}`;
|
|
5484
|
+
l && l !== "inherit" && (f += ` snmt-typography-align-${l}`);
|
|
5485
|
+
const w = {
|
|
5486
|
+
className: f,
|
|
5487
|
+
style: {
|
|
5488
|
+
color: t,
|
|
5489
|
+
whiteSpace: C
|
|
5490
|
+
},
|
|
5481
5491
|
onClick: s,
|
|
5482
5492
|
ref: o,
|
|
5483
|
-
ellipsis:
|
|
5493
|
+
ellipsis: h && a ? {
|
|
5484
5494
|
tooltip: {
|
|
5485
5495
|
title: i,
|
|
5486
5496
|
overlayClassName: "snmt-tooltip"
|
|
5487
5497
|
}
|
|
5488
5498
|
} : void 0
|
|
5489
5499
|
};
|
|
5490
|
-
return
|
|
5500
|
+
return r ? /* @__PURE__ */ n($9, { level: P9[e], ...w, children: i }) : /* @__PURE__ */ n(T9, { ...w, children: i });
|
|
5491
5501
|
}
|
|
5492
5502
|
), j9 = ({
|
|
5493
5503
|
width: l = 20,
|
|
@@ -6368,7 +6378,7 @@ const q2 = (l, e) => {
|
|
|
6368
6378
|
)
|
|
6369
6379
|
]
|
|
6370
6380
|
}
|
|
6371
|
-
),
|
|
6381
|
+
), u0 = ({
|
|
6372
6382
|
width: l = 20,
|
|
6373
6383
|
height: e = 20,
|
|
6374
6384
|
color: t = c.GREY_DARK_5,
|
|
@@ -6401,7 +6411,7 @@ const q2 = (l, e) => {
|
|
|
6401
6411
|
)
|
|
6402
6412
|
]
|
|
6403
6413
|
}
|
|
6404
|
-
),
|
|
6414
|
+
), p0 = ({
|
|
6405
6415
|
width: l = 20,
|
|
6406
6416
|
height: e = 20,
|
|
6407
6417
|
color: t = c.GREY_DARK_5,
|
|
@@ -7753,159 +7763,159 @@ const q2 = (l, e) => {
|
|
|
7753
7763
|
disabled: C = !1,
|
|
7754
7764
|
onClick: h
|
|
7755
7765
|
}) => {
|
|
7756
|
-
const { theme: d } = l1(h1),
|
|
7766
|
+
const { theme: d } = l1(h1), o = C ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, a = C ? void 0 : h, r = h && !C ? `${s || ""} clickable` : s;
|
|
7757
7767
|
return /* @__PURE__ */ n(t1, { children: (() => {
|
|
7758
7768
|
switch (l) {
|
|
7759
7769
|
case "arrow1Down":
|
|
7760
|
-
return j9({ width: e, height: t, color:
|
|
7770
|
+
return j9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7761
7771
|
case "arrow1Up":
|
|
7762
|
-
return F9({ width: e, height: t, color:
|
|
7772
|
+
return F9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7763
7773
|
case "arrow1Right":
|
|
7764
|
-
return U9({ width: e, height: t, color:
|
|
7774
|
+
return U9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7765
7775
|
case "arrow1Left":
|
|
7766
|
-
return W9({ width: e, height: t, color:
|
|
7776
|
+
return W9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7767
7777
|
case "info":
|
|
7768
|
-
return z9({ width: e, height: t, color:
|
|
7778
|
+
return z9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7769
7779
|
case "archive":
|
|
7770
|
-
return e0({ width: e, height: t, color:
|
|
7780
|
+
return e0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7771
7781
|
case "unarchive":
|
|
7772
|
-
return t0({ width: e, height: t, color:
|
|
7782
|
+
return t0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7773
7783
|
case "calendar":
|
|
7774
|
-
return i0({ width: e, height: t, color:
|
|
7784
|
+
return i0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7775
7785
|
case "check":
|
|
7776
|
-
return l0({ width: e, height: t, color:
|
|
7786
|
+
return l0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7777
7787
|
case "cancel":
|
|
7778
|
-
return s0({ width: e, height: t, color:
|
|
7788
|
+
return s0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7779
7789
|
case "add":
|
|
7780
|
-
return n0({ width: e, height: t, color:
|
|
7790
|
+
return n0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7781
7791
|
case "list":
|
|
7782
|
-
return o0({ width: e, height: t, color:
|
|
7792
|
+
return o0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7783
7793
|
case "dragAndDrop":
|
|
7784
|
-
return a0({ width: e, height: t, color:
|
|
7794
|
+
return a0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7785
7795
|
case "filter1":
|
|
7786
|
-
return r0({ width: e, height: t, color:
|
|
7796
|
+
return r0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7787
7797
|
case "filter2":
|
|
7788
|
-
return K0({ width: e, height: t, color:
|
|
7798
|
+
return K0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7789
7799
|
case "attention":
|
|
7790
|
-
return C0({ width: e, height: t, color:
|
|
7800
|
+
return C0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7791
7801
|
case "users":
|
|
7792
|
-
return h0({ width: e, height: t, color:
|
|
7802
|
+
return h0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7793
7803
|
case "mySkillsMatrix":
|
|
7794
7804
|
return c0({
|
|
7795
7805
|
width: e,
|
|
7796
7806
|
height: t,
|
|
7797
|
-
color:
|
|
7807
|
+
color: o,
|
|
7798
7808
|
className: r,
|
|
7799
|
-
onClick:
|
|
7809
|
+
onClick: a
|
|
7800
7810
|
});
|
|
7801
7811
|
case "skills":
|
|
7802
|
-
return d0({ width: e, height: t, color:
|
|
7812
|
+
return d0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7803
7813
|
case "skillsMatrices":
|
|
7804
7814
|
return g0({
|
|
7805
7815
|
width: e,
|
|
7806
7816
|
height: t,
|
|
7807
|
-
color:
|
|
7817
|
+
color: o,
|
|
7808
7818
|
className: r,
|
|
7809
|
-
onClick:
|
|
7819
|
+
onClick: a
|
|
7810
7820
|
});
|
|
7811
7821
|
case "history":
|
|
7812
|
-
return w0({ width: e, height: t, color:
|
|
7822
|
+
return w0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7813
7823
|
case "logOut":
|
|
7814
|
-
return f0({ width: e, height: t, color:
|
|
7824
|
+
return f0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7815
7825
|
case "settings":
|
|
7816
|
-
return
|
|
7826
|
+
return u0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7817
7827
|
case "trash":
|
|
7818
|
-
return
|
|
7828
|
+
return p0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7819
7829
|
case "settings2":
|
|
7820
|
-
return L0({ width: e, height: t, color:
|
|
7830
|
+
return L0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7821
7831
|
case "checkCircle":
|
|
7822
|
-
return m0({ width: e, height: t, color:
|
|
7832
|
+
return m0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7823
7833
|
case "cancelCircle":
|
|
7824
|
-
return v0({ width: e, height: t, color:
|
|
7834
|
+
return v0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7825
7835
|
case "visibilityIcon":
|
|
7826
7836
|
return k0({
|
|
7827
7837
|
width: e,
|
|
7828
7838
|
height: t,
|
|
7829
|
-
color:
|
|
7839
|
+
color: o,
|
|
7830
7840
|
className: r,
|
|
7831
|
-
onClick:
|
|
7841
|
+
onClick: a
|
|
7832
7842
|
});
|
|
7833
7843
|
case "visibilityOffIcon":
|
|
7834
7844
|
return N0({
|
|
7835
7845
|
width: e,
|
|
7836
7846
|
height: t,
|
|
7837
|
-
color:
|
|
7847
|
+
color: o,
|
|
7838
7848
|
className: r,
|
|
7839
|
-
onClick:
|
|
7849
|
+
onClick: a
|
|
7840
7850
|
});
|
|
7841
7851
|
case "sortUp":
|
|
7842
|
-
return M0({ width: e, height: t, color:
|
|
7852
|
+
return M0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7843
7853
|
case "sortDown":
|
|
7844
|
-
return x0({ width: e, height: t, color:
|
|
7854
|
+
return x0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7845
7855
|
case "sortDouble":
|
|
7846
|
-
return Z0({ width: e, height: t, color:
|
|
7856
|
+
return Z0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7847
7857
|
case "search":
|
|
7848
|
-
return V0({ width: e, height: t, color:
|
|
7858
|
+
return V0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7849
7859
|
case "arrowUpFilled":
|
|
7850
|
-
return H0({ width: e, height: t, color:
|
|
7860
|
+
return H0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7851
7861
|
case "arrowDownFilled":
|
|
7852
|
-
return R0({ width: e, height: t, color:
|
|
7862
|
+
return R0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7853
7863
|
case "arrow2Up":
|
|
7854
|
-
return J9({ width: e, height: t, color:
|
|
7864
|
+
return J9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7855
7865
|
case "arrow2Right":
|
|
7856
|
-
return q9({ width: e, height: t, color:
|
|
7866
|
+
return q9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7857
7867
|
case "arrow2Down":
|
|
7858
|
-
return Q9({ width: e, height: t, color:
|
|
7868
|
+
return Q9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7859
7869
|
case "arrow2Left":
|
|
7860
|
-
return X9({ width: e, height: t, color:
|
|
7870
|
+
return X9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7861
7871
|
case "link":
|
|
7862
|
-
return _0({ width: e, height: t, color:
|
|
7872
|
+
return _0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7863
7873
|
case "telegram":
|
|
7864
|
-
return y0({ width: e, height: t, color:
|
|
7874
|
+
return y0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7865
7875
|
case "mail":
|
|
7866
|
-
return E0({ width: e, height: t, color:
|
|
7876
|
+
return E0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7867
7877
|
case "github":
|
|
7868
|
-
return b0({ width: e, height: t, color:
|
|
7878
|
+
return b0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7869
7879
|
case "linkedIn":
|
|
7870
|
-
return A0({ width: e, height: t, color:
|
|
7880
|
+
return A0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7871
7881
|
case "emptyStateIcon":
|
|
7872
|
-
return D0({ width: e, height: t, color:
|
|
7882
|
+
return D0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7873
7883
|
case "dotMenuIcon":
|
|
7874
|
-
return S0({ width: e, height: t, color:
|
|
7884
|
+
return S0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7875
7885
|
case "plusCircle":
|
|
7876
|
-
return G0({ width: e, height: t, color:
|
|
7886
|
+
return G0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7877
7887
|
case "warning":
|
|
7878
|
-
return B0({ width: e, height: t, color:
|
|
7888
|
+
return B0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7879
7889
|
case "bell":
|
|
7880
|
-
return Y0({ width: e, height: t, color:
|
|
7890
|
+
return Y0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7881
7891
|
case "copy":
|
|
7882
|
-
return O0({ width: e, height: t, color:
|
|
7892
|
+
return O0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7883
7893
|
case "contract":
|
|
7884
|
-
return I0({ width: e, height: t, color:
|
|
7894
|
+
return I0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7885
7895
|
case "resourceManager":
|
|
7886
|
-
return $0({ width: e, height: t, color:
|
|
7896
|
+
return $0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7887
7897
|
case "image":
|
|
7888
|
-
return T0({ width: e, height: t, color:
|
|
7898
|
+
return T0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7889
7899
|
case "edit":
|
|
7890
|
-
return P0({ width: e, height: t, color:
|
|
7900
|
+
return P0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7891
7901
|
case "burgerMenu":
|
|
7892
|
-
return j0({ width: e, height: t, color:
|
|
7902
|
+
return j0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7893
7903
|
case "refresh":
|
|
7894
|
-
return F0({ width: e, height: t, color:
|
|
7904
|
+
return F0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7895
7905
|
case "projects":
|
|
7896
|
-
return U0({ width: e, height: t, color:
|
|
7906
|
+
return U0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7897
7907
|
case "user":
|
|
7898
|
-
return z0({ width: e, height: t, color:
|
|
7908
|
+
return z0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7899
7909
|
case "exit":
|
|
7900
|
-
return W0({ width: e, height: t, color:
|
|
7910
|
+
return W0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7901
7911
|
case "status":
|
|
7902
|
-
return J0({ width: e, height: t, color:
|
|
7912
|
+
return J0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7903
7913
|
case "community":
|
|
7904
|
-
return q0({ width: e, height: t, color:
|
|
7914
|
+
return q0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7905
7915
|
case "docs":
|
|
7906
|
-
return Q0({ width: e, height: t, color:
|
|
7916
|
+
return Q0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7907
7917
|
case "unpaidLeave":
|
|
7908
|
-
return X0({ width: e, height: t, color:
|
|
7918
|
+
return X0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7909
7919
|
default:
|
|
7910
7920
|
return /* @__PURE__ */ n(t1, { children: "No Icon provided" });
|
|
7911
7921
|
}
|
|
@@ -8007,23 +8017,23 @@ const l4 = ({
|
|
|
8007
8017
|
extraOptions: h,
|
|
8008
8018
|
selectedItemVariant: d = "default"
|
|
8009
8019
|
}) => {
|
|
8010
|
-
const { locale:
|
|
8020
|
+
const { locale: o } = l1(h1), { t: a } = X2("common", { lng: o }), [r, f] = D(!1);
|
|
8011
8021
|
if (I(() => {
|
|
8012
|
-
l.length ||
|
|
8022
|
+
l.length || f(!1);
|
|
8013
8023
|
}, [l]), !l.length)
|
|
8014
8024
|
return null;
|
|
8015
|
-
const w = (
|
|
8025
|
+
const w = (u) => {
|
|
8016
8026
|
var v, M;
|
|
8017
|
-
return ((v = C == null ? void 0 : C.find((k) => k.value ===
|
|
8027
|
+
return ((v = C == null ? void 0 : C.find((k) => k.value === u)) == null ? void 0 : v.label) || ((M = h == null ? void 0 : h.find((k) => k.value === u)) == null ? void 0 : M.label) || u;
|
|
8018
8028
|
};
|
|
8019
8029
|
return /* @__PURE__ */ g(
|
|
8020
8030
|
O9,
|
|
8021
8031
|
{
|
|
8022
8032
|
content: (
|
|
8023
8033
|
// 90: paddings + margins + gaps and so on
|
|
8024
|
-
/* @__PURE__ */ n("div", { style: { maxWidth: t - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ n(m1, { gap: 6, flexWrap: "wrap", children: l.map(({ value:
|
|
8034
|
+
/* @__PURE__ */ n("div", { style: { maxWidth: t - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ n(m1, { gap: 6, flexWrap: "wrap", children: l.map(({ value: u }) => {
|
|
8025
8035
|
const v = d === "badge" && C.find(
|
|
8026
|
-
(M) => M.label === w(
|
|
8036
|
+
(M) => M.label === w(u)
|
|
8027
8037
|
);
|
|
8028
8038
|
return d === "badge" ? /* @__PURE__ */ n(
|
|
8029
8039
|
m2,
|
|
@@ -8031,28 +8041,28 @@ const l4 = ({
|
|
|
8031
8041
|
variant: "regular",
|
|
8032
8042
|
size: "small",
|
|
8033
8043
|
color: v ? v.color : void 0,
|
|
8034
|
-
text: w(
|
|
8044
|
+
text: w(u)
|
|
8035
8045
|
},
|
|
8036
|
-
|
|
8046
|
+
u
|
|
8037
8047
|
) : /* @__PURE__ */ n(
|
|
8038
|
-
|
|
8048
|
+
p2,
|
|
8039
8049
|
{
|
|
8040
|
-
onClose: () => e(
|
|
8050
|
+
onClose: () => e(u),
|
|
8041
8051
|
closable: i,
|
|
8042
8052
|
disabled: s,
|
|
8043
|
-
children: w(
|
|
8053
|
+
children: w(u)
|
|
8044
8054
|
},
|
|
8045
|
-
|
|
8055
|
+
u
|
|
8046
8056
|
);
|
|
8047
8057
|
}) }) })
|
|
8048
8058
|
),
|
|
8049
8059
|
placement: "bottomRight",
|
|
8050
8060
|
isOpen: r,
|
|
8051
|
-
setIsOpen:
|
|
8061
|
+
setIsOpen: f,
|
|
8052
8062
|
children: [
|
|
8053
8063
|
l.length,
|
|
8054
8064
|
" ",
|
|
8055
|
-
|
|
8065
|
+
a("more")
|
|
8056
8066
|
]
|
|
8057
8067
|
}
|
|
8058
8068
|
);
|
|
@@ -8393,7 +8403,7 @@ const l4 = ({
|
|
|
8393
8403
|
)
|
|
8394
8404
|
]
|
|
8395
8405
|
}
|
|
8396
|
-
),
|
|
8406
|
+
), u4 = ({
|
|
8397
8407
|
width: l = 20,
|
|
8398
8408
|
height: e = 20,
|
|
8399
8409
|
color: t = c.GREY_DARK_5,
|
|
@@ -8440,7 +8450,7 @@ const l4 = ({
|
|
|
8440
8450
|
)
|
|
8441
8451
|
]
|
|
8442
8452
|
}
|
|
8443
|
-
),
|
|
8453
|
+
), p4 = ({
|
|
8444
8454
|
width: l = 20,
|
|
8445
8455
|
height: e = 20,
|
|
8446
8456
|
color: t = c.GREY_DARK_5,
|
|
@@ -10332,159 +10342,159 @@ const l4 = ({
|
|
|
10332
10342
|
disabled: C = !1,
|
|
10333
10343
|
onClick: h
|
|
10334
10344
|
}) => {
|
|
10335
|
-
const { theme: d } = l1(h1),
|
|
10345
|
+
const { theme: d } = l1(h1), o = C ? d && d === "dark" ? c.GREY_LIGHT_4 : c.GREY_DARK_1 : i, a = C ? void 0 : h, r = h && !C ? `${s || ""} clickable` : s;
|
|
10336
10346
|
return /* @__PURE__ */ n(t1, { children: (() => {
|
|
10337
10347
|
switch (l) {
|
|
10338
10348
|
case "arrow1Down":
|
|
10339
|
-
return n4({ width: e, height: t, color:
|
|
10349
|
+
return n4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10340
10350
|
case "arrow1Up":
|
|
10341
|
-
return o4({ width: e, height: t, color:
|
|
10351
|
+
return o4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10342
10352
|
case "arrow1Right":
|
|
10343
|
-
return a4({ width: e, height: t, color:
|
|
10353
|
+
return a4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10344
10354
|
case "arrow1Left":
|
|
10345
|
-
return r4({ width: e, height: t, color:
|
|
10355
|
+
return r4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10346
10356
|
case "info":
|
|
10347
|
-
return C4({ width: e, height: t, color:
|
|
10357
|
+
return C4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10348
10358
|
case "archive":
|
|
10349
|
-
return w4({ width: e, height: t, color:
|
|
10359
|
+
return w4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10350
10360
|
case "unarchive":
|
|
10351
|
-
return f4({ width: e, height: t, color:
|
|
10361
|
+
return f4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10352
10362
|
case "calendar":
|
|
10353
|
-
return
|
|
10363
|
+
return u4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10354
10364
|
case "check":
|
|
10355
|
-
return
|
|
10365
|
+
return p4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10356
10366
|
case "cancel":
|
|
10357
|
-
return L4({ width: e, height: t, color:
|
|
10367
|
+
return L4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10358
10368
|
case "add":
|
|
10359
|
-
return m4({ width: e, height: t, color:
|
|
10369
|
+
return m4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10360
10370
|
case "list":
|
|
10361
|
-
return v4({ width: e, height: t, color:
|
|
10371
|
+
return v4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10362
10372
|
case "dragAndDrop":
|
|
10363
|
-
return k4({ width: e, height: t, color:
|
|
10373
|
+
return k4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10364
10374
|
case "filter1":
|
|
10365
|
-
return N4({ width: e, height: t, color:
|
|
10375
|
+
return N4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10366
10376
|
case "filter2":
|
|
10367
|
-
return z4({ width: e, height: t, color:
|
|
10377
|
+
return z4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10368
10378
|
case "attention":
|
|
10369
|
-
return M4({ width: e, height: t, color:
|
|
10379
|
+
return M4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10370
10380
|
case "users":
|
|
10371
|
-
return x4({ width: e, height: t, color:
|
|
10381
|
+
return x4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10372
10382
|
case "mySkillsMatrix":
|
|
10373
10383
|
return Z4({
|
|
10374
10384
|
width: e,
|
|
10375
10385
|
height: t,
|
|
10376
|
-
color:
|
|
10386
|
+
color: o,
|
|
10377
10387
|
className: r,
|
|
10378
|
-
onClick:
|
|
10388
|
+
onClick: a
|
|
10379
10389
|
});
|
|
10380
10390
|
case "skills":
|
|
10381
|
-
return V4({ width: e, height: t, color:
|
|
10391
|
+
return V4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10382
10392
|
case "skillsMatrices":
|
|
10383
10393
|
return R4({
|
|
10384
10394
|
width: e,
|
|
10385
10395
|
height: t,
|
|
10386
|
-
color:
|
|
10396
|
+
color: o,
|
|
10387
10397
|
className: r,
|
|
10388
|
-
onClick:
|
|
10398
|
+
onClick: a
|
|
10389
10399
|
});
|
|
10390
10400
|
case "history":
|
|
10391
|
-
return H4({ width: e, height: t, color:
|
|
10401
|
+
return H4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10392
10402
|
case "logOut":
|
|
10393
|
-
return _4({ width: e, height: t, color:
|
|
10403
|
+
return _4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10394
10404
|
case "settings":
|
|
10395
|
-
return b4({ width: e, height: t, color:
|
|
10405
|
+
return b4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10396
10406
|
case "trash":
|
|
10397
|
-
return y4({ width: e, height: t, color:
|
|
10407
|
+
return y4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10398
10408
|
case "settings2":
|
|
10399
|
-
return A4({ width: e, height: t, color:
|
|
10409
|
+
return A4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10400
10410
|
case "checkCircle":
|
|
10401
|
-
return E4({ width: e, height: t, color:
|
|
10411
|
+
return E4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10402
10412
|
case "cancelCircle":
|
|
10403
|
-
return D4({ width: e, height: t, color:
|
|
10413
|
+
return D4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10404
10414
|
case "visibilityIcon":
|
|
10405
10415
|
return K4({
|
|
10406
10416
|
width: e,
|
|
10407
10417
|
height: t,
|
|
10408
|
-
color:
|
|
10418
|
+
color: o,
|
|
10409
10419
|
className: r,
|
|
10410
|
-
onClick:
|
|
10420
|
+
onClick: a
|
|
10411
10421
|
});
|
|
10412
10422
|
case "visibilityOffIcon":
|
|
10413
10423
|
return S4({
|
|
10414
10424
|
width: e,
|
|
10415
10425
|
height: t,
|
|
10416
|
-
color:
|
|
10426
|
+
color: o,
|
|
10417
10427
|
className: r,
|
|
10418
|
-
onClick:
|
|
10428
|
+
onClick: a
|
|
10419
10429
|
});
|
|
10420
10430
|
case "sortUp":
|
|
10421
|
-
return G4({ width: e, height: t, color:
|
|
10431
|
+
return G4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10422
10432
|
case "sortDown":
|
|
10423
|
-
return B4({ width: e, height: t, color:
|
|
10433
|
+
return B4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10424
10434
|
case "sortDouble":
|
|
10425
|
-
return Y4({ width: e, height: t, color:
|
|
10435
|
+
return Y4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10426
10436
|
case "search":
|
|
10427
|
-
return O4({ width: e, height: t, color:
|
|
10437
|
+
return O4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10428
10438
|
case "arrowUpFilled":
|
|
10429
|
-
return $4({ width: e, height: t, color:
|
|
10439
|
+
return $4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10430
10440
|
case "arrowDownFilled":
|
|
10431
|
-
return I4({ width: e, height: t, color:
|
|
10441
|
+
return I4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10432
10442
|
case "arrow2Up":
|
|
10433
|
-
return h4({ width: e, height: t, color:
|
|
10443
|
+
return h4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10434
10444
|
case "arrow2Right":
|
|
10435
|
-
return c4({ width: e, height: t, color:
|
|
10445
|
+
return c4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10436
10446
|
case "arrow2Down":
|
|
10437
|
-
return d4({ width: e, height: t, color:
|
|
10447
|
+
return d4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10438
10448
|
case "arrow2Left":
|
|
10439
|
-
return g4({ width: e, height: t, color:
|
|
10449
|
+
return g4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10440
10450
|
case "link":
|
|
10441
|
-
return T4({ width: e, height: t, color:
|
|
10451
|
+
return T4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10442
10452
|
case "telegram":
|
|
10443
|
-
return j4({ width: e, height: t, color:
|
|
10453
|
+
return j4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10444
10454
|
case "mail":
|
|
10445
|
-
return U4({ width: e, height: t, color:
|
|
10455
|
+
return U4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10446
10456
|
case "github":
|
|
10447
|
-
return P4({ width: e, height: t, color:
|
|
10457
|
+
return P4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10448
10458
|
case "linkedIn":
|
|
10449
|
-
return F4({ width: e, height: t, color:
|
|
10459
|
+
return F4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10450
10460
|
case "emptyStateIcon":
|
|
10451
|
-
return W4({ width: e, height: t, color:
|
|
10461
|
+
return W4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10452
10462
|
case "dotMenuIcon":
|
|
10453
|
-
return J4({ width: e, height: t, color:
|
|
10463
|
+
return J4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10454
10464
|
case "plusCircle":
|
|
10455
|
-
return q4({ width: e, height: t, color:
|
|
10465
|
+
return q4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10456
10466
|
case "warning":
|
|
10457
|
-
return Q4({ width: e, height: t, color:
|
|
10467
|
+
return Q4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10458
10468
|
case "bell":
|
|
10459
|
-
return X4({ width: e, height: t, color:
|
|
10469
|
+
return X4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10460
10470
|
case "copy":
|
|
10461
|
-
return e6({ width: e, height: t, color:
|
|
10471
|
+
return e6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10462
10472
|
case "contract":
|
|
10463
|
-
return t6({ width: e, height: t, color:
|
|
10473
|
+
return t6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10464
10474
|
case "resourceManager":
|
|
10465
|
-
return i6({ width: e, height: t, color:
|
|
10475
|
+
return i6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10466
10476
|
case "image":
|
|
10467
|
-
return l6({ width: e, height: t, color:
|
|
10477
|
+
return l6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10468
10478
|
case "edit":
|
|
10469
|
-
return s6({ width: e, height: t, color:
|
|
10479
|
+
return s6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10470
10480
|
case "burgerMenu":
|
|
10471
|
-
return n6({ width: e, height: t, color:
|
|
10481
|
+
return n6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10472
10482
|
case "refresh":
|
|
10473
|
-
return o6({ width: e, height: t, color:
|
|
10483
|
+
return o6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10474
10484
|
case "projects":
|
|
10475
|
-
return a6({ width: e, height: t, color:
|
|
10485
|
+
return a6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10476
10486
|
case "user":
|
|
10477
|
-
return C6({ width: e, height: t, color:
|
|
10487
|
+
return C6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10478
10488
|
case "exit":
|
|
10479
|
-
return r6({ width: e, height: t, color:
|
|
10489
|
+
return r6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10480
10490
|
case "status":
|
|
10481
|
-
return h6({ width: e, height: t, color:
|
|
10491
|
+
return h6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10482
10492
|
case "community":
|
|
10483
|
-
return c6({ width: e, height: t, color:
|
|
10493
|
+
return c6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10484
10494
|
case "docs":
|
|
10485
|
-
return d6({ width: e, height: t, color:
|
|
10495
|
+
return d6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10486
10496
|
case "unpaidLeave":
|
|
10487
|
-
return g6({ width: e, height: t, color:
|
|
10497
|
+
return g6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10488
10498
|
default:
|
|
10489
10499
|
return /* @__PURE__ */ n(t1, { children: "No Icon provided" });
|
|
10490
10500
|
}
|
|
@@ -10496,7 +10506,7 @@ const l4 = ({
|
|
|
10496
10506
|
disabled: i = !1,
|
|
10497
10507
|
onClick: s
|
|
10498
10508
|
}) => {
|
|
10499
|
-
const C =
|
|
10509
|
+
const C = p6(e, i), h = u6(e, i);
|
|
10500
10510
|
return /* @__PURE__ */ n(
|
|
10501
10511
|
"button",
|
|
10502
10512
|
{
|
|
@@ -10514,10 +10524,10 @@ const l4 = ({
|
|
|
10514
10524
|
}
|
|
10515
10525
|
);
|
|
10516
10526
|
};
|
|
10517
|
-
function
|
|
10527
|
+
function u6(l, e) {
|
|
10518
10528
|
return l && !e ? "-active" : e ? "-disabled" : "";
|
|
10519
10529
|
}
|
|
10520
|
-
function
|
|
10530
|
+
function p6(l, e) {
|
|
10521
10531
|
return e ? c.GREY_DARK_2 : l ? c.GREY_LIGHT_0 : c.GREY_DARK_4;
|
|
10522
10532
|
}
|
|
10523
10533
|
const L6 = a1((l, e) => {
|
|
@@ -10528,12 +10538,12 @@ const L6 = a1((l, e) => {
|
|
|
10528
10538
|
mode: C,
|
|
10529
10539
|
search: h = !1,
|
|
10530
10540
|
options: d,
|
|
10531
|
-
width:
|
|
10532
|
-
disabled:
|
|
10541
|
+
width: o,
|
|
10542
|
+
disabled: a = !1,
|
|
10533
10543
|
required: r = !1,
|
|
10534
|
-
clearable:
|
|
10544
|
+
clearable: f = !0,
|
|
10535
10545
|
scrollThresholdValue: w = 50,
|
|
10536
|
-
onSearchChange:
|
|
10546
|
+
onSearchChange: u,
|
|
10537
10547
|
onDropdownVisibleChange: v,
|
|
10538
10548
|
onScrollToEnd: M,
|
|
10539
10549
|
onPopupScroll: k,
|
|
@@ -10541,7 +10551,7 @@ const L6 = a1((l, e) => {
|
|
|
10541
10551
|
extraOptions: V,
|
|
10542
10552
|
dropdownRender: K,
|
|
10543
10553
|
optionRender: m,
|
|
10544
|
-
isLoading:
|
|
10554
|
+
isLoading: p,
|
|
10545
10555
|
readOnly: x,
|
|
10546
10556
|
error: L,
|
|
10547
10557
|
selectedItemVariant: H = "default",
|
|
@@ -10581,14 +10591,14 @@ const L6 = a1((l, e) => {
|
|
|
10581
10591
|
},
|
|
10582
10592
|
[C, i, d1]
|
|
10583
10593
|
), H1 = E(() => {
|
|
10584
|
-
if (!(x ||
|
|
10594
|
+
if (!(x || a)) {
|
|
10585
10595
|
if (C) {
|
|
10586
10596
|
i1([]);
|
|
10587
10597
|
return;
|
|
10588
10598
|
}
|
|
10589
10599
|
i1("");
|
|
10590
10600
|
}
|
|
10591
|
-
}, [
|
|
10601
|
+
}, [a, i1, C, x]), g1 = E(
|
|
10592
10602
|
(N) => {
|
|
10593
10603
|
const R = _.filter((B) => B !== N);
|
|
10594
10604
|
i1(R), $(R);
|
|
@@ -10621,7 +10631,7 @@ const L6 = a1((l, e) => {
|
|
|
10621
10631
|
values: N,
|
|
10622
10632
|
onTagClose: g1,
|
|
10623
10633
|
maxWidth: ((B = n1.current) == null ? void 0 : B.clientWidth) || 0,
|
|
10624
|
-
disabled:
|
|
10634
|
+
disabled: a,
|
|
10625
10635
|
closable: !x,
|
|
10626
10636
|
options: d,
|
|
10627
10637
|
extraOptions: V,
|
|
@@ -10629,7 +10639,7 @@ const L6 = a1((l, e) => {
|
|
|
10629
10639
|
}
|
|
10630
10640
|
);
|
|
10631
10641
|
},
|
|
10632
|
-
[
|
|
10642
|
+
[a, V, g1, d, x]
|
|
10633
10643
|
), X = E(
|
|
10634
10644
|
({ label: N, value: R, mode: B }) => {
|
|
10635
10645
|
if (B === "filter")
|
|
@@ -10644,10 +10654,10 @@ const L6 = a1((l, e) => {
|
|
|
10644
10654
|
color: o1 ? o1.color : "cyan",
|
|
10645
10655
|
text: j1
|
|
10646
10656
|
}
|
|
10647
|
-
) : /* @__PURE__ */ n(
|
|
10657
|
+
) : /* @__PURE__ */ n(p2, { onClose: () => g1(R), disabled: a, children: j1 }) });
|
|
10648
10658
|
}
|
|
10649
10659
|
},
|
|
10650
|
-
[
|
|
10660
|
+
[a, Y, g1, A, H, d]
|
|
10651
10661
|
), _1 = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
|
|
10652
10662
|
return /* @__PURE__ */ g(
|
|
10653
10663
|
"div",
|
|
@@ -10663,7 +10673,7 @@ const L6 = a1((l, e) => {
|
|
|
10663
10673
|
${W === "static" ? "snmt-select-static" : ""}
|
|
10664
10674
|
${y === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10665
10675
|
ref: n1,
|
|
10666
|
-
style: { width:
|
|
10676
|
+
style: { width: o },
|
|
10667
10677
|
children: [
|
|
10668
10678
|
/* @__PURE__ */ n(
|
|
10669
10679
|
H2,
|
|
@@ -10675,11 +10685,11 @@ const L6 = a1((l, e) => {
|
|
|
10675
10685
|
showSearch: !!h,
|
|
10676
10686
|
filterOption: h && Z1,
|
|
10677
10687
|
onDropdownVisibleChange: x1,
|
|
10678
|
-
disabled:
|
|
10688
|
+
disabled: a,
|
|
10679
10689
|
value: _ || void 0,
|
|
10680
10690
|
labelRender: (N) => {
|
|
10681
10691
|
const R = Y(N.value);
|
|
10682
|
-
return
|
|
10692
|
+
return a ? /* @__PURE__ */ n("span", { style: { color: c.GREY_DARK_1 }, children: R }) : R;
|
|
10683
10693
|
},
|
|
10684
10694
|
mode: m6(C, d1),
|
|
10685
10695
|
variant: y,
|
|
@@ -10689,7 +10699,7 @@ const L6 = a1((l, e) => {
|
|
|
10689
10699
|
onMouseEnter: () => q(!0),
|
|
10690
10700
|
onMouseLeave: () => q(!1),
|
|
10691
10701
|
onSearch: (N) => {
|
|
10692
|
-
G(!N),
|
|
10702
|
+
G(!N), u && u(N);
|
|
10693
10703
|
},
|
|
10694
10704
|
onSelect: () => G(!0),
|
|
10695
10705
|
onDeselect: () => G(!0),
|
|
@@ -10697,20 +10707,20 @@ const L6 = a1((l, e) => {
|
|
|
10697
10707
|
maxTagCount: W === "responsive" ? "responsive" : void 0,
|
|
10698
10708
|
maxTagPlaceholder: (N) => F(N, H),
|
|
10699
10709
|
onPopupScroll: Q,
|
|
10700
|
-
prefix:
|
|
10710
|
+
prefix: p && /* @__PURE__ */ n(Q1, { size: "small" }),
|
|
10701
10711
|
suffixIcon: /* @__PURE__ */ n("div", { className: "wrapper-suffix-icon", children: C !== "filter" && /* @__PURE__ */ g(t1, { children: [
|
|
10702
|
-
_ && !!_.length &&
|
|
10712
|
+
_ && !!_.length && f && /* @__PURE__ */ n(
|
|
10703
10713
|
"div",
|
|
10704
10714
|
{
|
|
10705
10715
|
onClick: H1,
|
|
10706
10716
|
style: {
|
|
10707
|
-
cursor:
|
|
10717
|
+
cursor: a ? "not-allowed" : "pointer"
|
|
10708
10718
|
},
|
|
10709
10719
|
children: /* @__PURE__ */ n(
|
|
10710
|
-
|
|
10720
|
+
p1,
|
|
10711
10721
|
{
|
|
10712
10722
|
name: "cancel",
|
|
10713
|
-
color:
|
|
10723
|
+
color: a ? c.GREY_DARK_1 : c.GREY_DARK_2
|
|
10714
10724
|
}
|
|
10715
10725
|
)
|
|
10716
10726
|
}
|
|
@@ -10723,16 +10733,16 @@ const L6 = a1((l, e) => {
|
|
|
10723
10733
|
}
|
|
10724
10734
|
),
|
|
10725
10735
|
y === "outlined" && /* @__PURE__ */ n(
|
|
10726
|
-
|
|
10736
|
+
p1,
|
|
10727
10737
|
{
|
|
10728
10738
|
name: "arrow2Down",
|
|
10729
|
-
color:
|
|
10739
|
+
color: a ? c.GREY_DARK_1 : c.GREY_DARK_2,
|
|
10730
10740
|
className: S ? "select-arrow-rotated" : "select-arrow",
|
|
10731
10741
|
onClick: () => z(!S)
|
|
10732
10742
|
}
|
|
10733
10743
|
)
|
|
10734
10744
|
] }) }),
|
|
10735
|
-
removeIcon: /* @__PURE__ */ n(
|
|
10745
|
+
removeIcon: /* @__PURE__ */ n(p1, { name: "cancelCircle", color: c.GREY_DARK_1 }),
|
|
10736
10746
|
options: d,
|
|
10737
10747
|
optionRender: (N) => m ? m(N.data) : /* @__PURE__ */ g(m1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
|
|
10738
10748
|
/* @__PURE__ */ g(m1, { alignItems: "center", gap: 12, children: [
|
|
@@ -10754,25 +10764,25 @@ const L6 = a1((l, e) => {
|
|
|
10754
10764
|
/* @__PURE__ */ n("span", { children: N.label })
|
|
10755
10765
|
] })
|
|
10756
10766
|
] }),
|
|
10757
|
-
!C && _ === N.value && /* @__PURE__ */ n(
|
|
10767
|
+
!C && _ === N.value && /* @__PURE__ */ n(p1, { name: "check", color: c.BLUE_DARK_1 })
|
|
10758
10768
|
] }),
|
|
10759
10769
|
dropdownRender: (N) => /* @__PURE__ */ g("div", { className: "dropdown-container", children: [
|
|
10760
10770
|
/* @__PURE__ */ n("div", { className: "dropdown-menu", children: K ? K(N) : N }),
|
|
10761
|
-
|
|
10771
|
+
p && /* @__PURE__ */ n("div", { className: "loading-overlay", children: /* @__PURE__ */ n(Q1, {}) })
|
|
10762
10772
|
] })
|
|
10763
10773
|
}
|
|
10764
10774
|
),
|
|
10765
10775
|
s && y !== "borderless" && /* @__PURE__ */ n(
|
|
10766
10776
|
"label",
|
|
10767
10777
|
{
|
|
10768
|
-
className: `${U || _1 ? "label-floating" : ""} ${
|
|
10778
|
+
className: `${U || _1 ? "label-floating" : ""} ${a ? "label-disabled" : ""} ${U ? "label-focused" : ""} ${p ? "label-loading" : ""} ${L ? "label-error" : ""}`,
|
|
10769
10779
|
children: r ? `${s}*` : s
|
|
10770
10780
|
}
|
|
10771
10781
|
),
|
|
10772
10782
|
/* @__PURE__ */ n(
|
|
10773
10783
|
"fieldset",
|
|
10774
10784
|
{
|
|
10775
|
-
className: `${U ? "fieldset-focused" : ""} ${
|
|
10785
|
+
className: `${U ? "fieldset-focused" : ""} ${a ? "fieldset-disabled" : ""} ${_1 ? "fieldset-filled" : ""} ${L ? "fieldset-error" : ""}
|
|
10776
10786
|
${j ? "fieldset-hovered" : ""}`,
|
|
10777
10787
|
children: /* @__PURE__ */ n("legend", { children: s && y !== "borderless" && /* @__PURE__ */ n("span", { children: r ? `${s}*` : s }) })
|
|
10778
10788
|
}
|
|
@@ -10782,7 +10792,7 @@ const L6 = a1((l, e) => {
|
|
|
10782
10792
|
),
|
|
10783
10793
|
L && /* @__PURE__ */ g(m1, { justifyContent: "flex-start", gap: 6, children: [
|
|
10784
10794
|
/* @__PURE__ */ n(
|
|
10785
|
-
|
|
10795
|
+
p1,
|
|
10786
10796
|
{
|
|
10787
10797
|
name: "attention",
|
|
10788
10798
|
color: c.NOTIFICATION_ERROR_DARK,
|
|
@@ -10826,12 +10836,12 @@ const G1 = 100, w1 = {
|
|
|
10826
10836
|
id: C,
|
|
10827
10837
|
disabled: h,
|
|
10828
10838
|
scrollThresholdValue: d,
|
|
10829
|
-
placeholder:
|
|
10830
|
-
mode:
|
|
10839
|
+
placeholder: o,
|
|
10840
|
+
mode: a,
|
|
10831
10841
|
loadOnClosedState: r,
|
|
10832
|
-
preloadOptions:
|
|
10842
|
+
preloadOptions: f,
|
|
10833
10843
|
extraOptions: w,
|
|
10834
|
-
onDropdownVisibleChange:
|
|
10844
|
+
onDropdownVisibleChange: u,
|
|
10835
10845
|
optionRender: v,
|
|
10836
10846
|
dropdownRender: M,
|
|
10837
10847
|
readOnly: k,
|
|
@@ -10839,7 +10849,7 @@ const G1 = 100, w1 = {
|
|
|
10839
10849
|
required: V = !1,
|
|
10840
10850
|
error: K,
|
|
10841
10851
|
variant: m = "outlined"
|
|
10842
|
-
} = l, [
|
|
10852
|
+
} = l, [p, x] = D(), [L, H] = D(w1), [y, W] = D(!1), [S, z] = D(), [U, J] = D(!1), [j, q] = D(
|
|
10843
10853
|
w ?? []
|
|
10844
10854
|
), s1 = X1(L.offset), G = X1(S), [_, $] = D(!1), n1 = O(!1), d1 = E(
|
|
10845
10855
|
async ({
|
|
@@ -10874,22 +10884,22 @@ const G1 = 100, w1 = {
|
|
|
10874
10884
|
[x1]
|
|
10875
10885
|
), V1 = E(
|
|
10876
10886
|
async (A) => {
|
|
10877
|
-
y || A && L.count && L.count > ((
|
|
10887
|
+
y || A && L.count && L.count > ((p == null ? void 0 : p.length) ?? 0) && H((P) => ({
|
|
10878
10888
|
...P,
|
|
10879
10889
|
offset: P.offset + G1
|
|
10880
10890
|
}));
|
|
10881
10891
|
},
|
|
10882
|
-
[y,
|
|
10892
|
+
[y, p == null ? void 0 : p.length, L.count]
|
|
10883
10893
|
), R1 = E(
|
|
10884
10894
|
(A) => {
|
|
10885
|
-
J(A), !A && S && (z(void 0), H(w1), $(!0)),
|
|
10895
|
+
J(A), !A && S && (z(void 0), H(w1), $(!0)), u == null || u(A);
|
|
10886
10896
|
},
|
|
10887
|
-
[
|
|
10897
|
+
[u, S]
|
|
10888
10898
|
);
|
|
10889
10899
|
I(() => {
|
|
10890
|
-
!n1.current || y || (_ || U && (s1 !== L.offset || G !== S || !
|
|
10891
|
-
}, [_, U, L.offset, S, s1, G,
|
|
10892
|
-
(r ||
|
|
10900
|
+
!n1.current || y || (_ || U && (s1 !== L.offset || G !== S || !p)) && (d1({ offset: L.offset, limit: G1, search: S }), _ && $(!1));
|
|
10901
|
+
}, [_, U, L.offset, S, s1, G, p, y]), I(() => {
|
|
10902
|
+
(r || f) && d1(w1), n1.current = !0;
|
|
10893
10903
|
}, []), I(() => {
|
|
10894
10904
|
w && q((A) => {
|
|
10895
10905
|
const P = w.filter(
|
|
@@ -10902,14 +10912,14 @@ const G1 = 100, w1 = {
|
|
|
10902
10912
|
(A) => {
|
|
10903
10913
|
s && s(A);
|
|
10904
10914
|
let P = [];
|
|
10905
|
-
if (
|
|
10915
|
+
if (a ? P = Array.isArray(A) ? A : [] : P = A ? [A] : [], S) {
|
|
10906
10916
|
const Q = P.filter(
|
|
10907
10917
|
(Y) => !(j != null && j.some((F) => F.value === Y))
|
|
10908
10918
|
);
|
|
10909
10919
|
Q.length > 0 && q((Y = []) => [
|
|
10910
10920
|
...Y,
|
|
10911
10921
|
...Q.map((F) => {
|
|
10912
|
-
const X =
|
|
10922
|
+
const X = p == null ? void 0 : p.find((_1) => _1.value === F);
|
|
10913
10923
|
return {
|
|
10914
10924
|
value: F,
|
|
10915
10925
|
label: (X == null ? void 0 : X.label) ?? F,
|
|
@@ -10920,14 +10930,14 @@ const G1 = 100, w1 = {
|
|
|
10920
10930
|
]), z(void 0), H(w1), $(!0);
|
|
10921
10931
|
}
|
|
10922
10932
|
},
|
|
10923
|
-
[s, S,
|
|
10933
|
+
[s, S, a, p, j]
|
|
10924
10934
|
), H1 = U1(
|
|
10925
10935
|
() => ({
|
|
10926
10936
|
id: C,
|
|
10927
10937
|
width: i,
|
|
10928
10938
|
onChange: i1,
|
|
10929
10939
|
ref: e,
|
|
10930
|
-
placeholder:
|
|
10940
|
+
placeholder: o,
|
|
10931
10941
|
search: !0,
|
|
10932
10942
|
onSearchChange: Z1,
|
|
10933
10943
|
onDropdownVisibleChange: R1,
|
|
@@ -10948,7 +10958,7 @@ const G1 = 100, w1 = {
|
|
|
10948
10958
|
i,
|
|
10949
10959
|
i1,
|
|
10950
10960
|
e,
|
|
10951
|
-
|
|
10961
|
+
o,
|
|
10952
10962
|
Z1,
|
|
10953
10963
|
R1,
|
|
10954
10964
|
d,
|
|
@@ -10970,12 +10980,12 @@ const G1 = 100, w1 = {
|
|
|
10970
10980
|
}
|
|
10971
10981
|
}));
|
|
10972
10982
|
const g1 = U1(() => {
|
|
10973
|
-
const A =
|
|
10974
|
-
mode:
|
|
10983
|
+
const A = a && a !== "single", P = l.selectedItemVariant === "badge", Q = P ? p || [] : p || [], Y = j, F = l, X = A ? {
|
|
10984
|
+
mode: a,
|
|
10975
10985
|
overflowBehaviour: F.overflowBehaviour,
|
|
10976
10986
|
value: F.value
|
|
10977
10987
|
} : {
|
|
10978
|
-
mode:
|
|
10988
|
+
mode: a,
|
|
10979
10989
|
value: l.value
|
|
10980
10990
|
};
|
|
10981
10991
|
return {
|
|
@@ -10985,7 +10995,7 @@ const G1 = 100, w1 = {
|
|
|
10985
10995
|
options: Q,
|
|
10986
10996
|
extraOptions: Y
|
|
10987
10997
|
};
|
|
10988
|
-
}, [
|
|
10998
|
+
}, [a, l, H1, j, p]);
|
|
10989
10999
|
return /* @__PURE__ */ n("div", { className: "snmt-async-select", children: /* @__PURE__ */ n(L6, { ...g1 }) });
|
|
10990
11000
|
}), Z = (l) => typeof l == "string", L1 = () => {
|
|
10991
11001
|
let l, e;
|
|
@@ -11085,11 +11095,11 @@ const _6 = [" ", ",", "?", "!", ";"], b6 = new H6(20), y6 = (l, e, t) => {
|
|
|
11085
11095
|
if (!s || typeof s != "object")
|
|
11086
11096
|
return;
|
|
11087
11097
|
let h, d = "";
|
|
11088
|
-
for (let
|
|
11089
|
-
if (
|
|
11090
|
-
if (["string", "number", "boolean"].indexOf(typeof h) > -1 &&
|
|
11098
|
+
for (let o = C; o < i.length; ++o)
|
|
11099
|
+
if (o !== C && (d += t), d += i[o], h = s[d], h !== void 0) {
|
|
11100
|
+
if (["string", "number", "boolean"].indexOf(typeof h) > -1 && o < i.length - 1)
|
|
11091
11101
|
continue;
|
|
11092
|
-
C +=
|
|
11102
|
+
C += o - C + 1;
|
|
11093
11103
|
break;
|
|
11094
11104
|
}
|
|
11095
11105
|
s = h;
|
|
@@ -11177,12 +11187,12 @@ class S1 {
|
|
|
11177
11187
|
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
11178
11188
|
i[s - 1] = arguments[s];
|
|
11179
11189
|
this.observers[e] && Array.from(this.observers[e].entries()).forEach((h) => {
|
|
11180
|
-
let [d,
|
|
11181
|
-
for (let
|
|
11190
|
+
let [d, o] = h;
|
|
11191
|
+
for (let a = 0; a < o; a++)
|
|
11182
11192
|
d(...i);
|
|
11183
11193
|
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((h) => {
|
|
11184
|
-
let [d,
|
|
11185
|
-
for (let
|
|
11194
|
+
let [d, o] = h;
|
|
11195
|
+
for (let a = 0; a < o; a++)
|
|
11186
11196
|
d.apply(d, [e, ...i]);
|
|
11187
11197
|
});
|
|
11188
11198
|
}
|
|
@@ -11207,8 +11217,8 @@ class s2 extends S1 {
|
|
|
11207
11217
|
const C = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, h = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
11208
11218
|
let d;
|
|
11209
11219
|
e.indexOf(".") > -1 ? d = e.split(".") : (d = [e, t], i && (Array.isArray(i) ? d.push(...i) : Z(i) && C ? d.push(...i.split(C)) : d.push(i)));
|
|
11210
|
-
const
|
|
11211
|
-
return !
|
|
11220
|
+
const o = A1(this.data, d);
|
|
11221
|
+
return !o && !t && !i && e.indexOf(".") > -1 && (e = d[0], t = d[1], i = d.slice(2).join(".")), o || !h || !Z(i) ? o : I1(this.data && this.data[e] && this.data[e][t], i, C);
|
|
11212
11222
|
}
|
|
11213
11223
|
addResource(e, t, i, s) {
|
|
11214
11224
|
let C = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -11234,11 +11244,11 @@ class s2 extends S1 {
|
|
|
11234
11244
|
skipCopy: !1
|
|
11235
11245
|
}, d = [e, t];
|
|
11236
11246
|
e.indexOf(".") > -1 && (d = e.split("."), s = i, i = t, t = d[1]), this.addNamespaces(t);
|
|
11237
|
-
let
|
|
11238
|
-
h.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? v2(
|
|
11239
|
-
...
|
|
11247
|
+
let o = A1(this.data, d) || {};
|
|
11248
|
+
h.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? v2(o, i, C) : o = {
|
|
11249
|
+
...o,
|
|
11240
11250
|
...i
|
|
11241
|
-
}, l2(this.data, d,
|
|
11251
|
+
}, l2(this.data, d, o), h.silent || this.emit("added", e, t, i);
|
|
11242
11252
|
}
|
|
11243
11253
|
removeResourceBundle(e, t) {
|
|
11244
11254
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -11298,14 +11308,14 @@ class K1 extends S1 {
|
|
|
11298
11308
|
let C = t.ns || this.options.defaultNS || [];
|
|
11299
11309
|
const h = i && e.indexOf(i) > -1, d = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !y6(e, i, s);
|
|
11300
11310
|
if (h && !d) {
|
|
11301
|
-
const
|
|
11302
|
-
if (
|
|
11311
|
+
const o = e.match(this.interpolator.nestingRegexp);
|
|
11312
|
+
if (o && o.length > 0)
|
|
11303
11313
|
return {
|
|
11304
11314
|
key: e,
|
|
11305
11315
|
namespaces: Z(C) ? [C] : C
|
|
11306
11316
|
};
|
|
11307
|
-
const
|
|
11308
|
-
(i !== s || i === s && this.options.ns.indexOf(
|
|
11317
|
+
const a = e.split(i);
|
|
11318
|
+
(i !== s || i === s && this.options.ns.indexOf(a[0]) > -1) && (C = a.shift()), e = a.join(s);
|
|
11309
11319
|
}
|
|
11310
11320
|
return {
|
|
11311
11321
|
key: e,
|
|
@@ -11320,64 +11330,64 @@ class K1 extends S1 {
|
|
|
11320
11330
|
const s = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, C = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
|
|
11321
11331
|
key: h,
|
|
11322
11332
|
namespaces: d
|
|
11323
|
-
} = this.extractFromKey(e[e.length - 1], t),
|
|
11324
|
-
if (
|
|
11333
|
+
} = this.extractFromKey(e[e.length - 1], t), o = d[d.length - 1], a = t.lng || this.language, r = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
11334
|
+
if (a && a.toLowerCase() === "cimode") {
|
|
11325
11335
|
if (r) {
|
|
11326
11336
|
const m = t.nsSeparator || this.options.nsSeparator;
|
|
11327
11337
|
return s ? {
|
|
11328
|
-
res: `${
|
|
11338
|
+
res: `${o}${m}${h}`,
|
|
11329
11339
|
usedKey: h,
|
|
11330
11340
|
exactUsedKey: h,
|
|
11331
|
-
usedLng:
|
|
11332
|
-
usedNS:
|
|
11341
|
+
usedLng: a,
|
|
11342
|
+
usedNS: o,
|
|
11333
11343
|
usedParams: this.getUsedParamsDetails(t)
|
|
11334
|
-
} : `${
|
|
11344
|
+
} : `${o}${m}${h}`;
|
|
11335
11345
|
}
|
|
11336
11346
|
return s ? {
|
|
11337
11347
|
res: h,
|
|
11338
11348
|
usedKey: h,
|
|
11339
11349
|
exactUsedKey: h,
|
|
11340
|
-
usedLng:
|
|
11341
|
-
usedNS:
|
|
11350
|
+
usedLng: a,
|
|
11351
|
+
usedNS: o,
|
|
11342
11352
|
usedParams: this.getUsedParamsDetails(t)
|
|
11343
11353
|
} : h;
|
|
11344
11354
|
}
|
|
11345
|
-
const
|
|
11346
|
-
let w =
|
|
11347
|
-
const
|
|
11355
|
+
const f = this.resolve(e, t);
|
|
11356
|
+
let w = f && f.res;
|
|
11357
|
+
const u = f && f.usedKey || h, v = f && f.exactUsedKey || h, M = Object.prototype.toString.apply(w), k = ["[object Number]", "[object Function]", "[object RegExp]"], b = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, V = !this.i18nFormat || this.i18nFormat.handleAsObject, K = !Z(w) && typeof w != "boolean" && typeof w != "number";
|
|
11348
11358
|
if (V && w && K && k.indexOf(M) < 0 && !(Z(b) && Array.isArray(w))) {
|
|
11349
11359
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
11350
11360
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
11351
|
-
const m = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(
|
|
11361
|
+
const m = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(u, w, {
|
|
11352
11362
|
...t,
|
|
11353
11363
|
ns: d
|
|
11354
11364
|
}) : `key '${h} (${this.language})' returned an object instead of string.`;
|
|
11355
|
-
return s ? (
|
|
11365
|
+
return s ? (f.res = m, f.usedParams = this.getUsedParamsDetails(t), f) : m;
|
|
11356
11366
|
}
|
|
11357
11367
|
if (C) {
|
|
11358
|
-
const m = Array.isArray(w),
|
|
11368
|
+
const m = Array.isArray(w), p = m ? [] : {}, x = m ? v : u;
|
|
11359
11369
|
for (const L in w)
|
|
11360
11370
|
if (Object.prototype.hasOwnProperty.call(w, L)) {
|
|
11361
11371
|
const H = `${x}${C}${L}`;
|
|
11362
|
-
|
|
11372
|
+
p[L] = this.translate(H, {
|
|
11363
11373
|
...t,
|
|
11364
11374
|
joinArrays: !1,
|
|
11365
11375
|
ns: d
|
|
11366
|
-
}),
|
|
11376
|
+
}), p[L] === H && (p[L] = w[L]);
|
|
11367
11377
|
}
|
|
11368
|
-
w =
|
|
11378
|
+
w = p;
|
|
11369
11379
|
}
|
|
11370
11380
|
} else if (V && Z(b) && Array.isArray(w))
|
|
11371
11381
|
w = w.join(b), w && (w = this.extendTranslation(w, e, t, i));
|
|
11372
11382
|
else {
|
|
11373
|
-
let m = !1,
|
|
11374
|
-
const x = t.count !== void 0 && !Z(t.count), L = K1.hasDefaultValue(t), H = x ? this.pluralResolver.getSuffix(
|
|
11383
|
+
let m = !1, p = !1;
|
|
11384
|
+
const x = t.count !== void 0 && !Z(t.count), L = K1.hasDefaultValue(t), H = x ? this.pluralResolver.getSuffix(a, t.count, t) : "", y = t.ordinal && x ? this.pluralResolver.getSuffix(a, t.count, {
|
|
11375
11385
|
ordinal: !1
|
|
11376
11386
|
}) : "", W = x && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), S = W && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${H}`] || t[`defaultValue${y}`] || t.defaultValue;
|
|
11377
|
-
!this.isValidLookup(w) && L && (m = !0, w = S), this.isValidLookup(w) || (
|
|
11378
|
-
const U = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) &&
|
|
11379
|
-
if (
|
|
11380
|
-
if (this.logger.log(J ? "updateKey" : "missingKey",
|
|
11387
|
+
!this.isValidLookup(w) && L && (m = !0, w = S), this.isValidLookup(w) || (p = !0, w = h);
|
|
11388
|
+
const U = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && p ? void 0 : w, J = L && S !== w && this.options.updateMissing;
|
|
11389
|
+
if (p || m || J) {
|
|
11390
|
+
if (this.logger.log(J ? "updateKey" : "missingKey", a, o, h, J ? S : w), C) {
|
|
11381
11391
|
const G = this.resolve(h, {
|
|
11382
11392
|
...t,
|
|
11383
11393
|
keySeparator: !1
|
|
@@ -11392,7 +11402,7 @@ class K1 extends S1 {
|
|
|
11392
11402
|
else this.options.saveMissingTo === "all" ? j = this.languageUtils.toResolveHierarchy(t.lng || this.language) : j.push(t.lng || this.language);
|
|
11393
11403
|
const s1 = (G, _, $) => {
|
|
11394
11404
|
const n1 = L && $ !== w ? $ : U;
|
|
11395
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(G,
|
|
11405
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(G, o, _, n1, J, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(G, o, _, n1, J, t), this.emit("missingKey", G, o, _, w);
|
|
11396
11406
|
};
|
|
11397
11407
|
this.options.saveMissing && (this.options.saveMissingPlurals && x ? j.forEach((G) => {
|
|
11398
11408
|
const _ = this.pluralResolver.getSuffixes(G, t);
|
|
@@ -11401,9 +11411,9 @@ class K1 extends S1 {
|
|
|
11401
11411
|
});
|
|
11402
11412
|
}) : s1(j, h, S));
|
|
11403
11413
|
}
|
|
11404
|
-
w = this.extendTranslation(w, e, t,
|
|
11414
|
+
w = this.extendTranslation(w, e, t, f, i), p && w === h && this.options.appendNamespaceToMissingKey && (w = `${o}:${h}`), (p || m) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? w = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${o}:${h}` : h, m ? w : void 0) : w = this.options.parseMissingKeyHandler(w));
|
|
11405
11415
|
}
|
|
11406
|
-
return s ? (
|
|
11416
|
+
return s ? (f.res = w, f.usedParams = this.getUsedParamsDetails(t), f) : w;
|
|
11407
11417
|
}
|
|
11408
11418
|
extendTranslation(e, t, i, s, C) {
|
|
11409
11419
|
var h = this;
|
|
@@ -11422,28 +11432,28 @@ class K1 extends S1 {
|
|
|
11422
11432
|
...i.interpolation
|
|
11423
11433
|
}
|
|
11424
11434
|
});
|
|
11425
|
-
const
|
|
11435
|
+
const a = Z(e) && (i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
11426
11436
|
let r;
|
|
11427
|
-
if (
|
|
11437
|
+
if (a) {
|
|
11428
11438
|
const w = e.match(this.interpolator.nestingRegexp);
|
|
11429
11439
|
r = w && w.length;
|
|
11430
11440
|
}
|
|
11431
|
-
let
|
|
11432
|
-
if (this.options.interpolation.defaultVariables && (
|
|
11441
|
+
let f = i.replace && !Z(i.replace) ? i.replace : i;
|
|
11442
|
+
if (this.options.interpolation.defaultVariables && (f = {
|
|
11433
11443
|
...this.options.interpolation.defaultVariables,
|
|
11434
|
-
...
|
|
11435
|
-
}), e = this.interpolator.interpolate(e,
|
|
11436
|
-
const w = e.match(this.interpolator.nestingRegexp),
|
|
11437
|
-
r <
|
|
11444
|
+
...f
|
|
11445
|
+
}), e = this.interpolator.interpolate(e, f, i.lng || this.language || s.usedLng, i), a) {
|
|
11446
|
+
const w = e.match(this.interpolator.nestingRegexp), u = w && w.length;
|
|
11447
|
+
r < u && (i.nest = !1);
|
|
11438
11448
|
}
|
|
11439
11449
|
!i.lng && this.options.compatibilityAPI !== "v1" && s && s.res && (i.lng = this.language || s.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
11440
|
-
for (var w = arguments.length,
|
|
11441
|
-
|
|
11442
|
-
return C && C[0] ===
|
|
11450
|
+
for (var w = arguments.length, u = new Array(w), v = 0; v < w; v++)
|
|
11451
|
+
u[v] = arguments[v];
|
|
11452
|
+
return C && C[0] === u[0] && !i.context ? (h.logger.warn(`It seems you are nesting recursively key: ${u[0]} in key: ${t[0]}`), null) : h.translate(...u, t);
|
|
11443
11453
|
}, i)), i.interpolation && this.interpolator.reset();
|
|
11444
11454
|
}
|
|
11445
|
-
const d = i.postProcess || this.options.postProcess,
|
|
11446
|
-
return e != null &&
|
|
11455
|
+
const d = i.postProcess || this.options.postProcess, o = Z(d) ? [d] : d;
|
|
11456
|
+
return e != null && o && o.length && i.applyPostProcessor !== !1 && (e = k2.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
11447
11457
|
i18nResolved: {
|
|
11448
11458
|
...s,
|
|
11449
11459
|
usedParams: this.getUsedParamsDetails(i)
|
|
@@ -11453,14 +11463,14 @@ class K1 extends S1 {
|
|
|
11453
11463
|
}
|
|
11454
11464
|
resolve(e) {
|
|
11455
11465
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i, s, C, h, d;
|
|
11456
|
-
return Z(e) && (e = [e]), e.forEach((
|
|
11466
|
+
return Z(e) && (e = [e]), e.forEach((o) => {
|
|
11457
11467
|
if (this.isValidLookup(i)) return;
|
|
11458
|
-
const
|
|
11468
|
+
const a = this.extractFromKey(o, t), r = a.key;
|
|
11459
11469
|
s = r;
|
|
11460
|
-
let
|
|
11461
|
-
this.options.fallbackNS && (
|
|
11462
|
-
const w = t.count !== void 0 && !Z(t.count),
|
|
11463
|
-
|
|
11470
|
+
let f = a.namespaces;
|
|
11471
|
+
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
11472
|
+
const w = t.count !== void 0 && !Z(t.count), u = w && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), v = t.context !== void 0 && (Z(t.context) || typeof t.context == "number") && t.context !== "", M = t.lngs ? t.lngs : this.languageUtils.toResolveHierarchy(t.lng || this.language, t.fallbackLng);
|
|
11473
|
+
f.forEach((k) => {
|
|
11464
11474
|
this.isValidLookup(i) || (d = k, !n2[`${M[0]}-${k}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(d) && (n2[`${M[0]}-${k}`] = !0, this.logger.warn(`key "${s}" for languages "${M.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), M.forEach((b) => {
|
|
11465
11475
|
if (this.isValidLookup(i)) return;
|
|
11466
11476
|
h = b;
|
|
@@ -11470,10 +11480,10 @@ class K1 extends S1 {
|
|
|
11470
11480
|
else {
|
|
11471
11481
|
let m;
|
|
11472
11482
|
w && (m = this.pluralResolver.getSuffix(b, t.count, t));
|
|
11473
|
-
const
|
|
11474
|
-
if (w && (V.push(r + m), t.ordinal && m.indexOf(x) === 0 && V.push(r + m.replace(x, this.options.pluralSeparator)),
|
|
11483
|
+
const p = `${this.options.pluralSeparator}zero`, x = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
11484
|
+
if (w && (V.push(r + m), t.ordinal && m.indexOf(x) === 0 && V.push(r + m.replace(x, this.options.pluralSeparator)), u && V.push(r + p)), v) {
|
|
11475
11485
|
const L = `${r}${this.options.contextSeparator}${t.context}`;
|
|
11476
|
-
V.push(L), w && (V.push(L + m), t.ordinal && m.indexOf(x) === 0 && V.push(L + m.replace(x, this.options.pluralSeparator)),
|
|
11486
|
+
V.push(L), w && (V.push(L + m), t.ordinal && m.indexOf(x) === 0 && V.push(L + m.replace(x, this.options.pluralSeparator)), u && V.push(L + p));
|
|
11477
11487
|
}
|
|
11478
11488
|
}
|
|
11479
11489
|
let K;
|
|
@@ -11747,8 +11757,8 @@ class B6 {
|
|
|
11747
11757
|
});
|
|
11748
11758
|
} catch {
|
|
11749
11759
|
if (!e.match(/-|_/)) return;
|
|
11750
|
-
const
|
|
11751
|
-
h = this.getRule(
|
|
11760
|
+
const o = this.languageUtils.getLanguagePartFromCode(e);
|
|
11761
|
+
h = this.getRule(o, t);
|
|
11752
11762
|
}
|
|
11753
11763
|
return this.pluralRulesCache[C] = h, h;
|
|
11754
11764
|
}
|
|
@@ -11805,19 +11815,19 @@ class Y6 {
|
|
|
11805
11815
|
prefix: C,
|
|
11806
11816
|
prefixEscaped: h,
|
|
11807
11817
|
suffix: d,
|
|
11808
|
-
suffixEscaped:
|
|
11809
|
-
formatSeparator:
|
|
11818
|
+
suffixEscaped: o,
|
|
11819
|
+
formatSeparator: a,
|
|
11810
11820
|
unescapeSuffix: r,
|
|
11811
|
-
unescapePrefix:
|
|
11821
|
+
unescapePrefix: f,
|
|
11812
11822
|
nestingPrefix: w,
|
|
11813
|
-
nestingPrefixEscaped:
|
|
11823
|
+
nestingPrefixEscaped: u,
|
|
11814
11824
|
nestingSuffix: v,
|
|
11815
11825
|
nestingSuffixEscaped: M,
|
|
11816
11826
|
nestingOptionsSeparator: k,
|
|
11817
11827
|
maxReplaces: b,
|
|
11818
11828
|
alwaysFormat: V
|
|
11819
11829
|
} = e.interpolation;
|
|
11820
|
-
this.escape = t !== void 0 ? t : R6, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = C ? f1(C) : h || "{{", this.suffix = d ? f1(d) :
|
|
11830
|
+
this.escape = t !== void 0 ? t : R6, this.escapeValue = i !== void 0 ? i : !0, this.useRawValueToEscape = s !== void 0 ? s : !1, this.prefix = C ? f1(C) : h || "{{", this.suffix = d ? f1(d) : o || "}}", this.formatSeparator = a || ",", this.unescapePrefix = r ? "" : f || "-", this.unescapeSuffix = this.unescapePrefix ? "" : r || "", this.nestingPrefix = w ? f1(w) : u || f1("$t("), this.nestingSuffix = v ? f1(v) : M || f1(")"), this.nestingOptionsSeparator = k || ",", this.maxReplaces = b || 1e3, this.alwaysFormat = V !== void 0 ? V : !1, this.resetRegExp();
|
|
11821
11831
|
}
|
|
11822
11832
|
reset() {
|
|
11823
11833
|
this.options && this.init(this.options);
|
|
@@ -11828,83 +11838,83 @@ class Y6 {
|
|
|
11828
11838
|
}
|
|
11829
11839
|
interpolate(e, t, i, s) {
|
|
11830
11840
|
let C, h, d;
|
|
11831
|
-
const
|
|
11832
|
-
if (
|
|
11833
|
-
const b = r2(t,
|
|
11841
|
+
const o = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, a = (u) => {
|
|
11842
|
+
if (u.indexOf(this.formatSeparator) < 0) {
|
|
11843
|
+
const b = r2(t, o, u, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
11834
11844
|
return this.alwaysFormat ? this.format(b, void 0, i, {
|
|
11835
11845
|
...s,
|
|
11836
11846
|
...t,
|
|
11837
|
-
interpolationkey:
|
|
11847
|
+
interpolationkey: u
|
|
11838
11848
|
}) : b;
|
|
11839
11849
|
}
|
|
11840
|
-
const v =
|
|
11841
|
-
return this.format(r2(t,
|
|
11850
|
+
const v = u.split(this.formatSeparator), M = v.shift().trim(), k = v.join(this.formatSeparator).trim();
|
|
11851
|
+
return this.format(r2(t, o, M, this.options.keySeparator, this.options.ignoreJSONStructure), k, i, {
|
|
11842
11852
|
...s,
|
|
11843
11853
|
...t,
|
|
11844
11854
|
interpolationkey: M
|
|
11845
11855
|
});
|
|
11846
11856
|
};
|
|
11847
11857
|
this.resetRegExp();
|
|
11848
|
-
const r = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler,
|
|
11858
|
+
const r = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler, f = s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
11849
11859
|
return [{
|
|
11850
11860
|
regex: this.regexpUnescape,
|
|
11851
|
-
safeValue: (
|
|
11861
|
+
safeValue: (u) => Y1(u)
|
|
11852
11862
|
}, {
|
|
11853
11863
|
regex: this.regexp,
|
|
11854
|
-
safeValue: (
|
|
11855
|
-
}].forEach((
|
|
11856
|
-
for (d = 0; C =
|
|
11864
|
+
safeValue: (u) => this.escapeValue ? Y1(this.escape(u)) : Y1(u)
|
|
11865
|
+
}].forEach((u) => {
|
|
11866
|
+
for (d = 0; C = u.regex.exec(e); ) {
|
|
11857
11867
|
const v = C[1].trim();
|
|
11858
|
-
if (h =
|
|
11868
|
+
if (h = a(v), h === void 0)
|
|
11859
11869
|
if (typeof r == "function") {
|
|
11860
11870
|
const k = r(e, C, s);
|
|
11861
11871
|
h = Z(k) ? k : "";
|
|
11862
11872
|
} else if (s && Object.prototype.hasOwnProperty.call(s, v))
|
|
11863
11873
|
h = "";
|
|
11864
|
-
else if (
|
|
11874
|
+
else if (f) {
|
|
11865
11875
|
h = C[0];
|
|
11866
11876
|
continue;
|
|
11867
11877
|
} else
|
|
11868
11878
|
this.logger.warn(`missed to pass in variable ${v} for interpolating ${e}`), h = "";
|
|
11869
11879
|
else !Z(h) && !this.useRawValueToEscape && (h = e2(h));
|
|
11870
|
-
const M =
|
|
11871
|
-
if (e = e.replace(C[0], M),
|
|
11880
|
+
const M = u.safeValue(h);
|
|
11881
|
+
if (e = e.replace(C[0], M), f ? (u.regex.lastIndex += h.length, u.regex.lastIndex -= C[0].length) : u.regex.lastIndex = 0, d++, d >= this.maxReplaces)
|
|
11872
11882
|
break;
|
|
11873
11883
|
}
|
|
11874
11884
|
}), e;
|
|
11875
11885
|
}
|
|
11876
11886
|
nest(e, t) {
|
|
11877
11887
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, C, h;
|
|
11878
|
-
const d = (
|
|
11888
|
+
const d = (o, a) => {
|
|
11879
11889
|
const r = this.nestingOptionsSeparator;
|
|
11880
|
-
if (
|
|
11881
|
-
const
|
|
11882
|
-
let w = `{${
|
|
11883
|
-
|
|
11884
|
-
const
|
|
11885
|
-
(
|
|
11890
|
+
if (o.indexOf(r) < 0) return o;
|
|
11891
|
+
const f = o.split(new RegExp(`${r}[ ]*{`));
|
|
11892
|
+
let w = `{${f[1]}`;
|
|
11893
|
+
o = f[0], w = this.interpolate(w, h);
|
|
11894
|
+
const u = w.match(/'/g), v = w.match(/"/g);
|
|
11895
|
+
(u && u.length % 2 === 0 && !v || v.length % 2 !== 0) && (w = w.replace(/'/g, '"'));
|
|
11886
11896
|
try {
|
|
11887
|
-
h = JSON.parse(w),
|
|
11888
|
-
...
|
|
11897
|
+
h = JSON.parse(w), a && (h = {
|
|
11898
|
+
...a,
|
|
11889
11899
|
...h
|
|
11890
11900
|
});
|
|
11891
11901
|
} catch (M) {
|
|
11892
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${
|
|
11902
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${o}`, M), `${o}${r}${w}`;
|
|
11893
11903
|
}
|
|
11894
|
-
return h.defaultValue && h.defaultValue.indexOf(this.prefix) > -1 && delete h.defaultValue,
|
|
11904
|
+
return h.defaultValue && h.defaultValue.indexOf(this.prefix) > -1 && delete h.defaultValue, o;
|
|
11895
11905
|
};
|
|
11896
11906
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
11897
|
-
let
|
|
11907
|
+
let o = [];
|
|
11898
11908
|
h = {
|
|
11899
11909
|
...i
|
|
11900
11910
|
}, h = h.replace && !Z(h.replace) ? h.replace : h, h.applyPostProcessor = !1, delete h.defaultValue;
|
|
11901
|
-
let
|
|
11911
|
+
let a = !1;
|
|
11902
11912
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
11903
|
-
const r = s[1].split(this.formatSeparator).map((
|
|
11904
|
-
s[1] = r.shift(),
|
|
11913
|
+
const r = s[1].split(this.formatSeparator).map((f) => f.trim());
|
|
11914
|
+
s[1] = r.shift(), o = r, a = !0;
|
|
11905
11915
|
}
|
|
11906
11916
|
if (C = t(d.call(this, s[1].trim(), h), h), C && s[0] === e && !Z(C)) return C;
|
|
11907
|
-
Z(C) || (C = e2(C)), C || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), C = ""),
|
|
11917
|
+
Z(C) || (C = e2(C)), C || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), C = ""), a && (C = o.reduce((r, f) => this.format(r, f, i.lng, {
|
|
11908
11918
|
...i,
|
|
11909
11919
|
interpolationkey: s[1].trim()
|
|
11910
11920
|
}), C.trim())), e = e.replace(s[0], C), this.regexp.lastIndex = 0;
|
|
@@ -11921,8 +11931,8 @@ const O6 = (l) => {
|
|
|
11921
11931
|
const s = i[1].substring(0, i[1].length - 1);
|
|
11922
11932
|
e === "currency" && s.indexOf(":") < 0 ? t.currency || (t.currency = s.trim()) : e === "relativetime" && s.indexOf(":") < 0 ? t.range || (t.range = s.trim()) : s.split(";").forEach((h) => {
|
|
11923
11933
|
if (h) {
|
|
11924
|
-
const [d, ...
|
|
11925
|
-
t[r] || (t[r] =
|
|
11934
|
+
const [d, ...o] = h.split(":"), a = o.join(":").trim().replace(/^'+|'+$/g, ""), r = d.trim();
|
|
11935
|
+
t[r] || (t[r] = a), a === "false" && (t[r] = !1), a === "true" && (t[r] = !0), isNaN(a) || (t[r] = parseInt(a, 10));
|
|
11926
11936
|
}
|
|
11927
11937
|
});
|
|
11928
11938
|
}
|
|
@@ -11930,7 +11940,7 @@ const O6 = (l) => {
|
|
|
11930
11940
|
formatName: e,
|
|
11931
11941
|
formatOptions: t
|
|
11932
11942
|
};
|
|
11933
|
-
},
|
|
11943
|
+
}, u1 = (l) => {
|
|
11934
11944
|
const e = {};
|
|
11935
11945
|
return (t, i, s) => {
|
|
11936
11946
|
let C = s;
|
|
@@ -11947,32 +11957,32 @@ class I6 {
|
|
|
11947
11957
|
constructor() {
|
|
11948
11958
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
11949
11959
|
this.logger = e1.create("formatter"), this.options = e, this.formats = {
|
|
11950
|
-
number:
|
|
11960
|
+
number: u1((t, i) => {
|
|
11951
11961
|
const s = new Intl.NumberFormat(t, {
|
|
11952
11962
|
...i
|
|
11953
11963
|
});
|
|
11954
11964
|
return (C) => s.format(C);
|
|
11955
11965
|
}),
|
|
11956
|
-
currency:
|
|
11966
|
+
currency: u1((t, i) => {
|
|
11957
11967
|
const s = new Intl.NumberFormat(t, {
|
|
11958
11968
|
...i,
|
|
11959
11969
|
style: "currency"
|
|
11960
11970
|
});
|
|
11961
11971
|
return (C) => s.format(C);
|
|
11962
11972
|
}),
|
|
11963
|
-
datetime:
|
|
11973
|
+
datetime: u1((t, i) => {
|
|
11964
11974
|
const s = new Intl.DateTimeFormat(t, {
|
|
11965
11975
|
...i
|
|
11966
11976
|
});
|
|
11967
11977
|
return (C) => s.format(C);
|
|
11968
11978
|
}),
|
|
11969
|
-
relativetime:
|
|
11979
|
+
relativetime: u1((t, i) => {
|
|
11970
11980
|
const s = new Intl.RelativeTimeFormat(t, {
|
|
11971
11981
|
...i
|
|
11972
11982
|
});
|
|
11973
11983
|
return (C) => s.format(C, i.range || "day");
|
|
11974
11984
|
}),
|
|
11975
|
-
list:
|
|
11985
|
+
list: u1((t, i) => {
|
|
11976
11986
|
const s = new Intl.ListFormat(t, {
|
|
11977
11987
|
...i
|
|
11978
11988
|
});
|
|
@@ -11990,25 +12000,25 @@ class I6 {
|
|
|
11990
12000
|
this.formats[e.toLowerCase().trim()] = t;
|
|
11991
12001
|
}
|
|
11992
12002
|
addCached(e, t) {
|
|
11993
|
-
this.formats[e.toLowerCase().trim()] =
|
|
12003
|
+
this.formats[e.toLowerCase().trim()] = u1(t);
|
|
11994
12004
|
}
|
|
11995
12005
|
format(e, t, i) {
|
|
11996
12006
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
11997
12007
|
const C = t.split(this.formatSeparator);
|
|
11998
12008
|
if (C.length > 1 && C[0].indexOf("(") > 1 && C[0].indexOf(")") < 0 && C.find((d) => d.indexOf(")") > -1)) {
|
|
11999
|
-
const d = C.findIndex((
|
|
12009
|
+
const d = C.findIndex((o) => o.indexOf(")") > -1);
|
|
12000
12010
|
C[0] = [C[0], ...C.splice(1, d)].join(this.formatSeparator);
|
|
12001
12011
|
}
|
|
12002
|
-
return C.reduce((d,
|
|
12012
|
+
return C.reduce((d, o) => {
|
|
12003
12013
|
const {
|
|
12004
|
-
formatName:
|
|
12014
|
+
formatName: a,
|
|
12005
12015
|
formatOptions: r
|
|
12006
|
-
} = O6(
|
|
12007
|
-
if (this.formats[
|
|
12008
|
-
let
|
|
12016
|
+
} = O6(o);
|
|
12017
|
+
if (this.formats[a]) {
|
|
12018
|
+
let f = d;
|
|
12009
12019
|
try {
|
|
12010
|
-
const w = s && s.formatParams && s.formatParams[s.interpolationkey] || {},
|
|
12011
|
-
|
|
12020
|
+
const w = s && s.formatParams && s.formatParams[s.interpolationkey] || {}, u = w.locale || w.lng || s.locale || s.lng || i;
|
|
12021
|
+
f = this.formats[a](d, u, {
|
|
12012
12022
|
...r,
|
|
12013
12023
|
...s,
|
|
12014
12024
|
...w
|
|
@@ -12016,9 +12026,9 @@ class I6 {
|
|
|
12016
12026
|
} catch (w) {
|
|
12017
12027
|
this.logger.warn(w);
|
|
12018
12028
|
}
|
|
12019
|
-
return
|
|
12029
|
+
return f;
|
|
12020
12030
|
} else
|
|
12021
|
-
this.logger.warn(`there was no format function for ${
|
|
12031
|
+
this.logger.warn(`there was no format function for ${a}`);
|
|
12022
12032
|
return d;
|
|
12023
12033
|
}, e);
|
|
12024
12034
|
}
|
|
@@ -12032,13 +12042,13 @@ class T6 extends S1 {
|
|
|
12032
12042
|
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger = e1.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = s.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = s.maxRetries >= 0 ? s.maxRetries : 5, this.retryTimeout = s.retryTimeout >= 1 ? s.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(i, s.backend, s);
|
|
12033
12043
|
}
|
|
12034
12044
|
queueLoad(e, t, i, s) {
|
|
12035
|
-
const C = {}, h = {}, d = {},
|
|
12036
|
-
return e.forEach((
|
|
12045
|
+
const C = {}, h = {}, d = {}, o = {};
|
|
12046
|
+
return e.forEach((a) => {
|
|
12037
12047
|
let r = !0;
|
|
12038
|
-
t.forEach((
|
|
12039
|
-
const w = `${
|
|
12040
|
-
!i.reload && this.store.hasResourceBundle(
|
|
12041
|
-
}), r || (d[
|
|
12048
|
+
t.forEach((f) => {
|
|
12049
|
+
const w = `${a}|${f}`;
|
|
12050
|
+
!i.reload && this.store.hasResourceBundle(a, f) ? this.state[w] = 2 : this.state[w] < 0 || (this.state[w] === 1 ? h[w] === void 0 && (h[w] = !0) : (this.state[w] = 1, r = !1, h[w] === void 0 && (h[w] = !0), C[w] === void 0 && (C[w] = !0), o[f] === void 0 && (o[f] = !0)));
|
|
12051
|
+
}), r || (d[a] = !0);
|
|
12042
12052
|
}), (Object.keys(C).length || Object.keys(h).length) && this.queue.push({
|
|
12043
12053
|
pending: h,
|
|
12044
12054
|
pendingCount: Object.keys(h).length,
|
|
@@ -12049,7 +12059,7 @@ class T6 extends S1 {
|
|
|
12049
12059
|
toLoad: Object.keys(C),
|
|
12050
12060
|
pending: Object.keys(h),
|
|
12051
12061
|
toLoadLanguages: Object.keys(d),
|
|
12052
|
-
toLoadNamespaces: Object.keys(
|
|
12062
|
+
toLoadNamespaces: Object.keys(o)
|
|
12053
12063
|
};
|
|
12054
12064
|
}
|
|
12055
12065
|
loaded(e, t, i) {
|
|
@@ -12058,15 +12068,15 @@ class T6 extends S1 {
|
|
|
12058
12068
|
skipCopy: !0
|
|
12059
12069
|
}), this.state[e] = t ? -1 : 2, t && i && (this.state[e] = 0);
|
|
12060
12070
|
const d = {};
|
|
12061
|
-
this.queue.forEach((
|
|
12062
|
-
x6(
|
|
12063
|
-
d[
|
|
12064
|
-
const r =
|
|
12065
|
-
r.length && r.forEach((
|
|
12066
|
-
d[
|
|
12071
|
+
this.queue.forEach((o) => {
|
|
12072
|
+
x6(o.loaded, [C], h), $6(o, e), t && o.errors.push(t), o.pendingCount === 0 && !o.done && (Object.keys(o.loaded).forEach((a) => {
|
|
12073
|
+
d[a] || (d[a] = {});
|
|
12074
|
+
const r = o.loaded[a];
|
|
12075
|
+
r.length && r.forEach((f) => {
|
|
12076
|
+
d[a][f] === void 0 && (d[a][f] = !0);
|
|
12067
12077
|
});
|
|
12068
|
-
}),
|
|
12069
|
-
}), this.emit("loaded", d), this.queue = this.queue.filter((
|
|
12078
|
+
}), o.done = !0, o.errors.length ? o.callback(o.errors) : o.callback());
|
|
12079
|
+
}), this.emit("loaded", d), this.queue = this.queue.filter((o) => !o.done);
|
|
12070
12080
|
}
|
|
12071
12081
|
read(e, t, i) {
|
|
12072
12082
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 0, C = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : this.retryTimeout, h = arguments.length > 5 ? arguments[5] : void 0;
|
|
@@ -12083,29 +12093,29 @@ class T6 extends S1 {
|
|
|
12083
12093
|
return;
|
|
12084
12094
|
}
|
|
12085
12095
|
this.readingCalls++;
|
|
12086
|
-
const d = (
|
|
12096
|
+
const d = (a, r) => {
|
|
12087
12097
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
12088
|
-
const
|
|
12089
|
-
this.read(
|
|
12098
|
+
const f = this.waitingReads.shift();
|
|
12099
|
+
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
12090
12100
|
}
|
|
12091
|
-
if (
|
|
12101
|
+
if (a && r && s < this.maxRetries) {
|
|
12092
12102
|
setTimeout(() => {
|
|
12093
12103
|
this.read.call(this, e, t, i, s + 1, C * 2, h);
|
|
12094
12104
|
}, C);
|
|
12095
12105
|
return;
|
|
12096
12106
|
}
|
|
12097
|
-
h(
|
|
12098
|
-
},
|
|
12099
|
-
if (
|
|
12107
|
+
h(a, r);
|
|
12108
|
+
}, o = this.backend[i].bind(this.backend);
|
|
12109
|
+
if (o.length === 2) {
|
|
12100
12110
|
try {
|
|
12101
|
-
const
|
|
12102
|
-
|
|
12103
|
-
} catch (
|
|
12104
|
-
d(
|
|
12111
|
+
const a = o(e, t);
|
|
12112
|
+
a && typeof a.then == "function" ? a.then((r) => d(null, r)).catch(d) : d(null, a);
|
|
12113
|
+
} catch (a) {
|
|
12114
|
+
d(a);
|
|
12105
12115
|
}
|
|
12106
12116
|
return;
|
|
12107
12117
|
}
|
|
12108
|
-
return
|
|
12118
|
+
return o(e, t, d);
|
|
12109
12119
|
}
|
|
12110
12120
|
prepareLoading(e, t) {
|
|
12111
12121
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
@@ -12143,19 +12153,19 @@ class T6 extends S1 {
|
|
|
12143
12153
|
}
|
|
12144
12154
|
if (!(i == null || i === "")) {
|
|
12145
12155
|
if (this.backend && this.backend.create) {
|
|
12146
|
-
const
|
|
12156
|
+
const o = {
|
|
12147
12157
|
...h,
|
|
12148
12158
|
isUpdate: C
|
|
12149
|
-
},
|
|
12150
|
-
if (
|
|
12159
|
+
}, a = this.backend.create.bind(this.backend);
|
|
12160
|
+
if (a.length < 6)
|
|
12151
12161
|
try {
|
|
12152
12162
|
let r;
|
|
12153
|
-
|
|
12163
|
+
a.length === 5 ? r = a(e, t, i, s, o) : r = a(e, t, i, s), r && typeof r.then == "function" ? r.then((f) => d(null, f)).catch(d) : d(null, r);
|
|
12154
12164
|
} catch (r) {
|
|
12155
12165
|
d(r);
|
|
12156
12166
|
}
|
|
12157
12167
|
else
|
|
12158
|
-
|
|
12168
|
+
a(e, t, i, s, d, o);
|
|
12159
12169
|
}
|
|
12160
12170
|
!e || !e[0] || this.store.addResource(e[0], t, i, s);
|
|
12161
12171
|
}
|
|
@@ -12254,25 +12264,25 @@ class k1 extends S1 {
|
|
|
12254
12264
|
this.modules.logger ? e1.init(C(this.modules.logger), this.options) : e1.init(null, this.options);
|
|
12255
12265
|
let r;
|
|
12256
12266
|
this.modules.formatter ? r = this.modules.formatter : typeof Intl < "u" && (r = I6);
|
|
12257
|
-
const
|
|
12267
|
+
const f = new o2(this.options);
|
|
12258
12268
|
this.store = new s2(this.options.resources, this.options);
|
|
12259
12269
|
const w = this.services;
|
|
12260
|
-
w.logger = e1, w.resourceStore = this.store, w.languageUtils =
|
|
12270
|
+
w.logger = e1, w.resourceStore = this.store, w.languageUtils = f, w.pluralResolver = new B6(f, {
|
|
12261
12271
|
prepend: this.options.pluralSeparator,
|
|
12262
12272
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
12263
12273
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
12264
12274
|
}), r && (!this.options.interpolation.format || this.options.interpolation.format === s.interpolation.format) && (w.formatter = C(r), w.formatter.init(w, this.options), this.options.interpolation.format = w.formatter.format.bind(w.formatter)), w.interpolator = new Y6(this.options), w.utils = {
|
|
12265
12275
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
12266
|
-
}, w.backendConnector = new T6(C(this.modules.backend), w.resourceStore, w, this.options), w.backendConnector.on("*", function(
|
|
12276
|
+
}, w.backendConnector = new T6(C(this.modules.backend), w.resourceStore, w, this.options), w.backendConnector.on("*", function(u) {
|
|
12267
12277
|
for (var v = arguments.length, M = new Array(v > 1 ? v - 1 : 0), k = 1; k < v; k++)
|
|
12268
12278
|
M[k - 1] = arguments[k];
|
|
12269
|
-
e.emit(
|
|
12270
|
-
}), this.modules.languageDetector && (w.languageDetector = C(this.modules.languageDetector), w.languageDetector.init && w.languageDetector.init(w, this.options.detection, this.options)), this.modules.i18nFormat && (w.i18nFormat = C(this.modules.i18nFormat), w.i18nFormat.init && w.i18nFormat.init(this)), this.translator = new K1(this.services, this.options), this.translator.on("*", function(
|
|
12279
|
+
e.emit(u, ...M);
|
|
12280
|
+
}), this.modules.languageDetector && (w.languageDetector = C(this.modules.languageDetector), w.languageDetector.init && w.languageDetector.init(w, this.options.detection, this.options)), this.modules.i18nFormat && (w.i18nFormat = C(this.modules.i18nFormat), w.i18nFormat.init && w.i18nFormat.init(this)), this.translator = new K1(this.services, this.options), this.translator.on("*", function(u) {
|
|
12271
12281
|
for (var v = arguments.length, M = new Array(v > 1 ? v - 1 : 0), k = 1; k < v; k++)
|
|
12272
12282
|
M[k - 1] = arguments[k];
|
|
12273
|
-
e.emit(
|
|
12274
|
-
}), this.modules.external.forEach((
|
|
12275
|
-
|
|
12283
|
+
e.emit(u, ...M);
|
|
12284
|
+
}), this.modules.external.forEach((u) => {
|
|
12285
|
+
u.init && u.init(this);
|
|
12276
12286
|
});
|
|
12277
12287
|
}
|
|
12278
12288
|
if (this.format = this.options.interpolation.format, i || (i = y1), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -12288,14 +12298,14 @@ class k1 extends S1 {
|
|
|
12288
12298
|
return e.store[r](...arguments), e;
|
|
12289
12299
|
};
|
|
12290
12300
|
});
|
|
12291
|
-
const
|
|
12292
|
-
const r = (
|
|
12293
|
-
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options),
|
|
12301
|
+
const o = L1(), a = () => {
|
|
12302
|
+
const r = (f, w) => {
|
|
12303
|
+
this.isInitializing = !1, this.isInitialized && !this.initializedStoreOnce && this.logger.warn("init: i18next is already initialized. You should call init just once!"), this.isInitialized = !0, this.options.isClone || this.logger.log("initialized", this.options), this.emit("initialized", this.options), o.resolve(w), i(f, w);
|
|
12294
12304
|
};
|
|
12295
12305
|
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return r(null, this.t.bind(this));
|
|
12296
12306
|
this.changeLanguage(this.options.lng, r);
|
|
12297
12307
|
};
|
|
12298
|
-
return this.options.resources || !this.options.initImmediate ?
|
|
12308
|
+
return this.options.resources || !this.options.initImmediate ? a() : setTimeout(a, 0), o;
|
|
12299
12309
|
}
|
|
12300
12310
|
loadResources(e) {
|
|
12301
12311
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : y1;
|
|
@@ -12304,11 +12314,11 @@ class k1 extends S1 {
|
|
|
12304
12314
|
if (s && s.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
|
|
12305
12315
|
const C = [], h = (d) => {
|
|
12306
12316
|
if (!d || d === "cimode") return;
|
|
12307
|
-
this.services.languageUtils.toResolveHierarchy(d).forEach((
|
|
12308
|
-
|
|
12317
|
+
this.services.languageUtils.toResolveHierarchy(d).forEach((a) => {
|
|
12318
|
+
a !== "cimode" && C.indexOf(a) < 0 && C.push(a);
|
|
12309
12319
|
});
|
|
12310
12320
|
};
|
|
12311
|
-
s ? h(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((
|
|
12321
|
+
s ? h(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((o) => h(o)), this.options.preload && this.options.preload.forEach((d) => h(d)), this.services.backendConnector.load(C, this.options.ns, (d) => {
|
|
12312
12322
|
!d && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(d);
|
|
12313
12323
|
});
|
|
12314
12324
|
} else
|
|
@@ -12340,19 +12350,19 @@ class k1 extends S1 {
|
|
|
12340
12350
|
this.isLanguageChangingTo = e;
|
|
12341
12351
|
const s = L1();
|
|
12342
12352
|
this.emit("languageChanging", e);
|
|
12343
|
-
const C = (
|
|
12344
|
-
this.language =
|
|
12345
|
-
}, h = (
|
|
12346
|
-
|
|
12353
|
+
const C = (o) => {
|
|
12354
|
+
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
12355
|
+
}, h = (o, a) => {
|
|
12356
|
+
a ? (C(a), this.translator.changeLanguage(a), this.isLanguageChangingTo = void 0, this.emit("languageChanged", a), this.logger.log("languageChanged", a)) : this.isLanguageChangingTo = void 0, s.resolve(function() {
|
|
12347
12357
|
return i.t(...arguments);
|
|
12348
|
-
}), t && t(
|
|
12358
|
+
}), t && t(o, function() {
|
|
12349
12359
|
return i.t(...arguments);
|
|
12350
12360
|
});
|
|
12351
|
-
}, d = (
|
|
12352
|
-
!e && !
|
|
12353
|
-
const
|
|
12354
|
-
|
|
12355
|
-
h(r,
|
|
12361
|
+
}, d = (o) => {
|
|
12362
|
+
!e && !o && this.services.languageDetector && (o = []);
|
|
12363
|
+
const a = Z(o) ? o : this.services.languageUtils.getBestMatchFromCodes(o);
|
|
12364
|
+
a && (this.language || C(a), this.translator.language || this.translator.changeLanguage(a), this.services.languageDetector && this.services.languageDetector.cacheUserLanguage && this.services.languageDetector.cacheUserLanguage(a)), this.loadResources(a, (r) => {
|
|
12365
|
+
h(r, a);
|
|
12356
12366
|
});
|
|
12357
12367
|
};
|
|
12358
12368
|
return !e && this.services.languageDetector && !this.services.languageDetector.async ? d(this.services.languageDetector.detect()) : !e && this.services.languageDetector && this.services.languageDetector.async ? this.services.languageDetector.detect.length === 0 ? this.services.languageDetector.detect().then(d) : this.services.languageDetector.detect(d) : d(e), s;
|
|
@@ -12360,19 +12370,19 @@ class k1 extends S1 {
|
|
|
12360
12370
|
getFixedT(e, t, i) {
|
|
12361
12371
|
var s = this;
|
|
12362
12372
|
const C = function(h, d) {
|
|
12363
|
-
let
|
|
12373
|
+
let o;
|
|
12364
12374
|
if (typeof d != "object") {
|
|
12365
|
-
for (var
|
|
12366
|
-
r[
|
|
12367
|
-
|
|
12375
|
+
for (var a = arguments.length, r = new Array(a > 2 ? a - 2 : 0), f = 2; f < a; f++)
|
|
12376
|
+
r[f - 2] = arguments[f];
|
|
12377
|
+
o = s.options.overloadTranslationOptionHandler([h, d].concat(r));
|
|
12368
12378
|
} else
|
|
12369
|
-
|
|
12379
|
+
o = {
|
|
12370
12380
|
...d
|
|
12371
12381
|
};
|
|
12372
|
-
|
|
12382
|
+
o.lng = o.lng || C.lng, o.lngs = o.lngs || C.lngs, o.ns = o.ns || C.ns, o.keyPrefix !== "" && (o.keyPrefix = o.keyPrefix || i || C.keyPrefix);
|
|
12373
12383
|
const w = s.options.keySeparator || ".";
|
|
12374
|
-
let
|
|
12375
|
-
return
|
|
12384
|
+
let u;
|
|
12385
|
+
return o.keyPrefix && Array.isArray(h) ? u = h.map((v) => `${o.keyPrefix}${w}${v}`) : u = o.keyPrefix ? `${o.keyPrefix}${w}${h}` : h, s.t(u, o);
|
|
12376
12386
|
};
|
|
12377
12387
|
return Z(e) ? C.lng = e : C.lngs = e, C.ns = t, C.keyPrefix = i, C;
|
|
12378
12388
|
}
|
|
@@ -12393,9 +12403,9 @@ class k1 extends S1 {
|
|
|
12393
12403
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
12394
12404
|
const i = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, C = this.languages[this.languages.length - 1];
|
|
12395
12405
|
if (i.toLowerCase() === "cimode") return !0;
|
|
12396
|
-
const h = (d,
|
|
12397
|
-
const
|
|
12398
|
-
return
|
|
12406
|
+
const h = (d, o) => {
|
|
12407
|
+
const a = this.services.backendConnector.state[`${d}|${o}`];
|
|
12408
|
+
return a === -1 || a === 0 || a === 2;
|
|
12399
12409
|
};
|
|
12400
12410
|
if (t.precheck) {
|
|
12401
12411
|
const d = t.precheck(this, h);
|
|
@@ -12444,9 +12454,9 @@ class k1 extends S1 {
|
|
|
12444
12454
|
}, C.services.utils = {
|
|
12445
12455
|
hasLoadedNamespace: C.hasLoadedNamespace.bind(C)
|
|
12446
12456
|
}, i && (C.store = new s2(this.store.data, s), C.services.resourceStore = C.store), C.translator = new K1(C.services, s), C.translator.on("*", function(d) {
|
|
12447
|
-
for (var
|
|
12448
|
-
|
|
12449
|
-
C.emit(d, ...
|
|
12457
|
+
for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), r = 1; r < o; r++)
|
|
12458
|
+
a[r - 1] = arguments[r];
|
|
12459
|
+
C.emit(d, ...a);
|
|
12450
12460
|
}), C.init(s, t), C.translator.options = s, C.translator.backendConnector.services.utils = {
|
|
12451
12461
|
hasLoadedNamespace: C.hasLoadedNamespace.bind(C)
|
|
12452
12462
|
}, C;
|
|
@@ -12511,9 +12521,9 @@ const N2 = (l, e) => () => {
|
|
|
12511
12521
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
12512
12522
|
const i = e.languages[0], s = e.options ? e.options.fallbackLng : !1, C = e.languages[e.languages.length - 1];
|
|
12513
12523
|
if (i.toLowerCase() === "cimode") return !0;
|
|
12514
|
-
const h = (d,
|
|
12515
|
-
const
|
|
12516
|
-
return
|
|
12524
|
+
const h = (d, o) => {
|
|
12525
|
+
const a = e.services.backendConnector.state[`${d}|${o}`];
|
|
12526
|
+
return a === -1 || a === 2;
|
|
12517
12527
|
};
|
|
12518
12528
|
return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !h(e.isLanguageChangingTo, l) ? !1 : !!(e.hasResourceBundle(i, l) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || h(i, l) && (!s || h(C, l)));
|
|
12519
12529
|
}, U6 = function(l, e) {
|
|
@@ -12598,8 +12608,8 @@ const o8 = (l, e) => {
|
|
|
12598
12608
|
} = l1(s8) || {}, C = t || i || i8();
|
|
12599
12609
|
if (C && !C.reportNamespaces && (C.reportNamespaces = new n8()), !C) {
|
|
12600
12610
|
$1("You will need to pass in an i18next instance by using initReactI18next");
|
|
12601
|
-
const m = (x, L) => C1(L) ? L : W6(L) && C1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x,
|
|
12602
|
-
return
|
|
12611
|
+
const m = (x, L) => C1(L) ? L : W6(L) && C1(L.defaultValue) ? L.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, p = [m, {}, !1];
|
|
12612
|
+
return p.t = m, p.i18n = {}, p.ready = !1, p;
|
|
12603
12613
|
}
|
|
12604
12614
|
C.options.react && C.options.react.wait !== void 0 && $1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
|
|
12605
12615
|
const h = {
|
|
@@ -12608,37 +12618,37 @@ const o8 = (l, e) => {
|
|
|
12608
12618
|
...e
|
|
12609
12619
|
}, {
|
|
12610
12620
|
useSuspense: d,
|
|
12611
|
-
keyPrefix:
|
|
12621
|
+
keyPrefix: o
|
|
12612
12622
|
} = h;
|
|
12613
|
-
let
|
|
12614
|
-
|
|
12615
|
-
const r = (C.isInitialized || C.initializedStoreOnce) &&
|
|
12616
|
-
let k =
|
|
12623
|
+
let a = l;
|
|
12624
|
+
a = C1(a) ? [a] : a || ["translation"], C.reportNamespaces.addUsedNamespaces && C.reportNamespaces.addUsedNamespaces(a);
|
|
12625
|
+
const r = (C.isInitialized || C.initializedStoreOnce) && a.every((m) => U6(m, C, h)), f = a8(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), w = () => f, u = () => x2(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), [v, M] = D(w);
|
|
12626
|
+
let k = a.join();
|
|
12617
12627
|
e.lng && (k = `${e.lng}${k}`);
|
|
12618
12628
|
const b = o8(k), V = O(!0);
|
|
12619
12629
|
I(() => {
|
|
12620
12630
|
const {
|
|
12621
12631
|
bindI18n: m,
|
|
12622
|
-
bindI18nStore:
|
|
12632
|
+
bindI18nStore: p
|
|
12623
12633
|
} = h;
|
|
12624
|
-
V.current = !0, !r && !d && (e.lng ? g2(C, e.lng,
|
|
12625
|
-
V.current && M(
|
|
12626
|
-
}) : d2(C,
|
|
12627
|
-
V.current && M(
|
|
12628
|
-
})), r && b && b !== k && V.current && M(
|
|
12634
|
+
V.current = !0, !r && !d && (e.lng ? g2(C, e.lng, a, () => {
|
|
12635
|
+
V.current && M(u);
|
|
12636
|
+
}) : d2(C, a, () => {
|
|
12637
|
+
V.current && M(u);
|
|
12638
|
+
})), r && b && b !== k && V.current && M(u);
|
|
12629
12639
|
const x = () => {
|
|
12630
|
-
V.current && M(
|
|
12640
|
+
V.current && M(u);
|
|
12631
12641
|
};
|
|
12632
|
-
return m && C && C.on(m, x),
|
|
12633
|
-
V.current = !1, m && C && m.split(" ").forEach((L) => C.off(L, x)),
|
|
12642
|
+
return m && C && C.on(m, x), p && C && C.store.on(p, x), () => {
|
|
12643
|
+
V.current = !1, m && C && m.split(" ").forEach((L) => C.off(L, x)), p && C && p.split(" ").forEach((L) => C.store.off(L, x));
|
|
12634
12644
|
};
|
|
12635
12645
|
}, [C, k]), I(() => {
|
|
12636
12646
|
V.current && r && M(w);
|
|
12637
|
-
}, [C,
|
|
12647
|
+
}, [C, o, r]);
|
|
12638
12648
|
const K = [v, C, r];
|
|
12639
12649
|
if (K.t = v, K.i18n = C, K.ready = r, r || !r && !d) return K;
|
|
12640
12650
|
throw new Promise((m) => {
|
|
12641
|
-
e.lng ? g2(C, e.lng,
|
|
12651
|
+
e.lng ? g2(C, e.lng, a, () => m()) : d2(C, a, () => m());
|
|
12642
12652
|
});
|
|
12643
12653
|
}, C8 = "City", h8 = {
|
|
12644
12654
|
placeholder: C8
|
|
@@ -12665,23 +12675,23 @@ T.use(l8).init({
|
|
|
12665
12675
|
});
|
|
12666
12676
|
const v8 = a1(
|
|
12667
12677
|
({ width: l, selectedCountry: e, onChange: t, value: i, id: s, disabled: C, clearable: h }, d) => {
|
|
12668
|
-
const [
|
|
12678
|
+
const [o, a] = D(
|
|
12669
12679
|
[]
|
|
12670
|
-
), [r,
|
|
12671
|
-
if (!
|
|
12680
|
+
), [r, f] = D(!1), { locale: w, axiosPeople: u } = l1(h1), v = O(!1), M = O(null), k = O(o), b = g8(e);
|
|
12681
|
+
if (!u)
|
|
12672
12682
|
throw new Error(
|
|
12673
12683
|
`CitySelect requires "axiosPeople" to fetch cities.
|
|
12674
12684
|
Please provide it via SNMTUiContext.`
|
|
12675
12685
|
);
|
|
12676
12686
|
const { t: V } = r8("common", { lng: w }), K = E(
|
|
12677
|
-
async (
|
|
12678
|
-
const x = k.current.find((L) => L.value ===
|
|
12687
|
+
async (p) => {
|
|
12688
|
+
const x = k.current.find((L) => L.value === p);
|
|
12679
12689
|
if (x)
|
|
12680
12690
|
return [x];
|
|
12681
12691
|
try {
|
|
12682
|
-
const H = (await
|
|
12692
|
+
const H = (await u.post("v1/cities/search", {
|
|
12683
12693
|
filters: {
|
|
12684
|
-
geoNameId: [
|
|
12694
|
+
geoNameId: [p],
|
|
12685
12695
|
countryId: [e]
|
|
12686
12696
|
}
|
|
12687
12697
|
})).data.data;
|
|
@@ -12696,52 +12706,52 @@ const v8 = a1(
|
|
|
12696
12706
|
return console.error("CitySelect. fetchSelectedItems error", L), [];
|
|
12697
12707
|
}
|
|
12698
12708
|
},
|
|
12699
|
-
[
|
|
12709
|
+
[u, e, t]
|
|
12700
12710
|
);
|
|
12701
12711
|
I(() => {
|
|
12702
12712
|
(async () => {
|
|
12703
12713
|
if (!i) return;
|
|
12704
12714
|
const x = await K(i);
|
|
12705
|
-
|
|
12715
|
+
a(x);
|
|
12706
12716
|
})();
|
|
12707
12717
|
}, []), I(() => {
|
|
12708
|
-
var
|
|
12709
|
-
b !== e ? v.current && (t(null),
|
|
12718
|
+
var p;
|
|
12719
|
+
b !== e ? v.current && (t(null), a([]), k.current = [], (p = M.current) == null || p.refetchOptions()) : v.current = !0;
|
|
12710
12720
|
}, [e, t, b]);
|
|
12711
12721
|
const m = E(
|
|
12712
12722
|
async ({
|
|
12713
|
-
limit:
|
|
12723
|
+
limit: p,
|
|
12714
12724
|
offset: x,
|
|
12715
12725
|
search: L
|
|
12716
12726
|
}) => {
|
|
12717
12727
|
try {
|
|
12718
|
-
|
|
12728
|
+
f(!0);
|
|
12719
12729
|
const H = {
|
|
12720
12730
|
offset: x,
|
|
12721
|
-
limit:
|
|
12731
|
+
limit: p,
|
|
12722
12732
|
includeCount: !0
|
|
12723
12733
|
};
|
|
12724
12734
|
H.filters = {}, e && e.length > 0 && (H.filters.countryId = [e]), L && (H.search = L);
|
|
12725
|
-
const y = await
|
|
12735
|
+
const y = await u.post("v1/cities/search", H), W = (y == null ? void 0 : y.data.data) || [], S = y == null ? void 0 : y.data.metadata.count;
|
|
12726
12736
|
return {
|
|
12727
12737
|
options: W.map((U) => ({
|
|
12728
12738
|
value: U.geoNameId,
|
|
12729
12739
|
label: U.name
|
|
12730
12740
|
})),
|
|
12731
12741
|
count: S,
|
|
12732
|
-
limit:
|
|
12742
|
+
limit: p
|
|
12733
12743
|
};
|
|
12734
12744
|
} catch (H) {
|
|
12735
12745
|
return console.error("CitySelect. loadOptions error", H), {
|
|
12736
12746
|
options: [],
|
|
12737
12747
|
count: 0,
|
|
12738
|
-
limit:
|
|
12748
|
+
limit: p
|
|
12739
12749
|
};
|
|
12740
12750
|
} finally {
|
|
12741
|
-
|
|
12751
|
+
f(!1);
|
|
12742
12752
|
}
|
|
12743
12753
|
},
|
|
12744
|
-
[
|
|
12754
|
+
[u, e]
|
|
12745
12755
|
);
|
|
12746
12756
|
return c1(d, () => M.current), /* @__PURE__ */ n("div", { className: "snmt-city-select", children: /* @__PURE__ */ n(
|
|
12747
12757
|
k6,
|
|
@@ -12757,7 +12767,7 @@ const v8 = a1(
|
|
|
12757
12767
|
clearable: h,
|
|
12758
12768
|
loadOptions: m,
|
|
12759
12769
|
preloadOptions: !0,
|
|
12760
|
-
extraOptions:
|
|
12770
|
+
extraOptions: o,
|
|
12761
12771
|
isLoading: r
|
|
12762
12772
|
}
|
|
12763
12773
|
) });
|