@snmt-react-ui/user-select 2.13.0 → 2.13.2
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/index.css +1 -1
- package/dist/user-select.js +639 -629
- package/package.json +4 -4
package/dist/user-select.js
CHANGED
|
@@ -41,9 +41,9 @@ const L2 = (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
|
}, $2 = function(l, e) {
|
|
@@ -124,12 +124,12 @@ const e5 = (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 v =
|
|
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((u) => $2(u, C, h)), f = t5(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), w = () => f, p = () => m2(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), [k, M] = S(w);
|
|
132
|
+
let v = a.join();
|
|
133
133
|
e.lng && (v = `${e.lng}${v}`);
|
|
134
134
|
const A = e5(v), V = J(!0);
|
|
135
135
|
F(() => {
|
|
@@ -137,24 +137,24 @@ const e5 = (l, e) => {
|
|
|
137
137
|
bindI18n: u,
|
|
138
138
|
bindI18nStore: L
|
|
139
139
|
} = h;
|
|
140
|
-
V.current = !0, !r && !d && (e.lng ? q1(C, e.lng,
|
|
141
|
-
V.current && M(
|
|
142
|
-
}) : J1(C,
|
|
143
|
-
V.current && M(
|
|
144
|
-
})), r && A && A !== v && V.current && M(
|
|
140
|
+
V.current = !0, !r && !d && (e.lng ? q1(C, e.lng, a, () => {
|
|
141
|
+
V.current && M(p);
|
|
142
|
+
}) : J1(C, a, () => {
|
|
143
|
+
V.current && M(p);
|
|
144
|
+
})), r && A && A !== v && V.current && M(p);
|
|
145
145
|
const x = () => {
|
|
146
|
-
V.current && M(
|
|
146
|
+
V.current && M(p);
|
|
147
147
|
};
|
|
148
148
|
return u && C && C.on(u, x), L && C && C.store.on(L, x), () => {
|
|
149
149
|
V.current = !1, u && C && u.split(" ").forEach((m) => C.off(m, x)), L && C && L.split(" ").forEach((m) => C.store.off(m, x));
|
|
150
150
|
};
|
|
151
151
|
}, [C, v]), F(() => {
|
|
152
152
|
V.current && r && M(w);
|
|
153
|
-
}, [C,
|
|
153
|
+
}, [C, o, r]);
|
|
154
154
|
const D = [k, C, r];
|
|
155
155
|
if (D.t = k, D.i18n = C, D.ready = r, r || !r && !d) return D;
|
|
156
156
|
throw new Promise((u) => {
|
|
157
|
-
e.lng ? q1(C, e.lng,
|
|
157
|
+
e.lng ? q1(C, e.lng, a, () => u()) : J1(C, a, () => u());
|
|
158
158
|
});
|
|
159
159
|
}, m1 = ({
|
|
160
160
|
children: l,
|
|
@@ -195,8 +195,8 @@ const e5 = (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 e5 = (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 = J(null);
|
|
229
|
-
h1(
|
|
230
|
-
const
|
|
231
|
-
let
|
|
232
|
-
l && l !== "inherit" && (
|
|
233
|
-
const
|
|
234
|
-
className:
|
|
235
|
-
style: {
|
|
228
|
+
h1(d, () => o.current);
|
|
229
|
+
const a = l5(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(s5, { level: o5[e], ...w, children: i }) : /* @__PURE__ */ n(n5, { ...w, children: i });
|
|
246
248
|
}
|
|
247
249
|
), a5 = ({ 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 e5 = (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 e5 = (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 = J(null);
|
|
338
|
-
h1(
|
|
339
|
-
const
|
|
340
|
-
let
|
|
341
|
-
l && l !== "inherit" && (
|
|
342
|
-
const
|
|
343
|
-
className:
|
|
344
|
-
style: {
|
|
339
|
+
h1(d, () => o.current);
|
|
340
|
+
const a = r5(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(C5, { level: c5[e], ...w, children: i }) : /* @__PURE__ */ n(h5, { ...w, children: i });
|
|
355
359
|
}
|
|
356
360
|
), g5 = ({
|
|
357
361
|
checked: l = !0,
|
|
@@ -361,9 +365,9 @@ const e5 = (l, e) => {
|
|
|
361
365
|
disabled: s = !1,
|
|
362
366
|
disableUncheck: C = !1
|
|
363
367
|
}) => {
|
|
364
|
-
const [h, d] = S(l), [
|
|
368
|
+
const [h, d] = S(l), [o, a] = S(e);
|
|
365
369
|
F(() => {
|
|
366
|
-
d(l),
|
|
370
|
+
d(l), a(e);
|
|
367
371
|
}, [l, e]);
|
|
368
372
|
const { theme: r } = s1(c1);
|
|
369
373
|
return /* @__PURE__ */ n(
|
|
@@ -371,9 +375,9 @@ const e5 = (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(
|
|
@@ -2650,159 +2654,159 @@ const e5 = (l, e) => {
|
|
|
2650
2654
|
disabled: C = !1,
|
|
2651
2655
|
onClick: h
|
|
2652
2656
|
}) => {
|
|
2653
|
-
const { theme: d } = s1(c1),
|
|
2657
|
+
const { theme: d } = s1(c1), 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(i1, { children: (() => {
|
|
2655
2659
|
switch (l) {
|
|
2656
2660
|
case "arrow1Down":
|
|
2657
|
-
return w5({ width: e, height: t, color:
|
|
2661
|
+
return w5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2658
2662
|
case "arrow1Up":
|
|
2659
|
-
return f5({ width: e, height: t, color:
|
|
2663
|
+
return f5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2660
2664
|
case "arrow1Right":
|
|
2661
|
-
return p5({ width: e, height: t, color:
|
|
2665
|
+
return p5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2662
2666
|
case "arrow1Left":
|
|
2663
|
-
return u5({ width: e, height: t, color:
|
|
2667
|
+
return u5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2664
2668
|
case "info":
|
|
2665
|
-
return L5({ width: e, height: t, color:
|
|
2669
|
+
return L5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2666
2670
|
case "archive":
|
|
2667
|
-
return M5({ width: e, height: t, color:
|
|
2671
|
+
return M5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2668
2672
|
case "unarchive":
|
|
2669
|
-
return x5({ width: e, height: t, color:
|
|
2673
|
+
return x5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2670
2674
|
case "calendar":
|
|
2671
|
-
return Z5({ width: e, height: t, color:
|
|
2675
|
+
return Z5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2672
2676
|
case "check":
|
|
2673
|
-
return V5({ width: e, height: t, color:
|
|
2677
|
+
return V5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2674
2678
|
case "cancel":
|
|
2675
|
-
return R5({ width: e, height: t, color:
|
|
2679
|
+
return R5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2676
2680
|
case "add":
|
|
2677
|
-
return H5({ width: e, height: t, color:
|
|
2681
|
+
return H5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2678
2682
|
case "list":
|
|
2679
|
-
return _5({ width: e, height: t, color:
|
|
2683
|
+
return _5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2680
2684
|
case "dragAndDrop":
|
|
2681
|
-
return b5({ width: e, height: t, color:
|
|
2685
|
+
return b5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2682
2686
|
case "filter1":
|
|
2683
|
-
return y5({ width: e, height: t, color:
|
|
2687
|
+
return y5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2684
2688
|
case "filter2":
|
|
2685
|
-
return s7({ width: e, height: t, color:
|
|
2689
|
+
return s7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2686
2690
|
case "attention":
|
|
2687
|
-
return A5({ width: e, height: t, color:
|
|
2691
|
+
return A5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2688
2692
|
case "users":
|
|
2689
|
-
return E5({ width: e, height: t, color:
|
|
2693
|
+
return E5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2690
2694
|
case "mySkillsMatrix":
|
|
2691
2695
|
return D5({
|
|
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 K5({ width: e, height: t, color:
|
|
2703
|
+
return K5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2700
2704
|
case "skillsMatrices":
|
|
2701
2705
|
return S5({
|
|
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 G5({ width: e, height: t, color:
|
|
2713
|
+
return G5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2710
2714
|
case "logOut":
|
|
2711
|
-
return B5({ width: e, height: t, color:
|
|
2715
|
+
return B5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2712
2716
|
case "settings":
|
|
2713
|
-
return Y5({ width: e, height: t, color:
|
|
2717
|
+
return Y5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2714
2718
|
case "trash":
|
|
2715
|
-
return O5({ width: e, height: t, color:
|
|
2719
|
+
return O5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2716
2720
|
case "settings2":
|
|
2717
|
-
return I5({ width: e, height: t, color:
|
|
2721
|
+
return I5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2718
2722
|
case "checkCircle":
|
|
2719
|
-
return $5({ width: e, height: t, color:
|
|
2723
|
+
return $5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2720
2724
|
case "cancelCircle":
|
|
2721
|
-
return T5({ width: e, height: t, color:
|
|
2725
|
+
return T5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2722
2726
|
case "visibilityIcon":
|
|
2723
2727
|
return P5({
|
|
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 j5({
|
|
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 F5({ width: e, height: t, color:
|
|
2743
|
+
return F5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2740
2744
|
case "sortDown":
|
|
2741
|
-
return U5({ width: e, height: t, color:
|
|
2745
|
+
return U5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2742
2746
|
case "sortDouble":
|
|
2743
|
-
return W5({ width: e, height: t, color:
|
|
2747
|
+
return W5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2744
2748
|
case "search":
|
|
2745
|
-
return z5({ width: e, height: t, color:
|
|
2749
|
+
return z5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2746
2750
|
case "arrowUpFilled":
|
|
2747
|
-
return q5({ width: e, height: t, color:
|
|
2751
|
+
return q5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2748
2752
|
case "arrowDownFilled":
|
|
2749
|
-
return J5({ width: e, height: t, color:
|
|
2753
|
+
return J5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2750
2754
|
case "arrow2Up":
|
|
2751
|
-
return m5({ width: e, height: t, color:
|
|
2755
|
+
return m5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2752
2756
|
case "arrow2Right":
|
|
2753
|
-
return v5({ width: e, height: t, color:
|
|
2757
|
+
return v5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2754
2758
|
case "arrow2Down":
|
|
2755
|
-
return k5({ width: e, height: t, color:
|
|
2759
|
+
return k5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2756
2760
|
case "arrow2Left":
|
|
2757
|
-
return N5({ width: e, height: t, color:
|
|
2761
|
+
return N5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2758
2762
|
case "link":
|
|
2759
|
-
return Q5({ width: e, height: t, color:
|
|
2763
|
+
return Q5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2760
2764
|
case "telegram":
|
|
2761
|
-
return e7({ width: e, height: t, color:
|
|
2765
|
+
return e7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2762
2766
|
case "mail":
|
|
2763
|
-
return i7({ width: e, height: t, color:
|
|
2767
|
+
return i7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2764
2768
|
case "github":
|
|
2765
|
-
return X5({ width: e, height: t, color:
|
|
2769
|
+
return X5({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2766
2770
|
case "linkedIn":
|
|
2767
|
-
return t7({ width: e, height: t, color:
|
|
2771
|
+
return t7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2768
2772
|
case "emptyStateIcon":
|
|
2769
|
-
return l7({ width: e, height: t, color:
|
|
2773
|
+
return l7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2770
2774
|
case "dotMenuIcon":
|
|
2771
|
-
return n7({ width: e, height: t, color:
|
|
2775
|
+
return n7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2772
2776
|
case "plusCircle":
|
|
2773
|
-
return o7({ width: e, height: t, color:
|
|
2777
|
+
return o7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2774
2778
|
case "warning":
|
|
2775
|
-
return a7({ width: e, height: t, color:
|
|
2779
|
+
return a7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2776
2780
|
case "bell":
|
|
2777
|
-
return r7({ width: e, height: t, color:
|
|
2781
|
+
return r7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2778
2782
|
case "copy":
|
|
2779
|
-
return C7({ width: e, height: t, color:
|
|
2783
|
+
return C7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2780
2784
|
case "contract":
|
|
2781
|
-
return h7({ width: e, height: t, color:
|
|
2785
|
+
return h7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2782
2786
|
case "resourceManager":
|
|
2783
|
-
return c7({ width: e, height: t, color:
|
|
2787
|
+
return c7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2784
2788
|
case "image":
|
|
2785
|
-
return d7({ width: e, height: t, color:
|
|
2789
|
+
return d7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2786
2790
|
case "edit":
|
|
2787
|
-
return g7({ width: e, height: t, color:
|
|
2791
|
+
return g7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2788
2792
|
case "burgerMenu":
|
|
2789
|
-
return w7({ width: e, height: t, color:
|
|
2793
|
+
return w7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2790
2794
|
case "refresh":
|
|
2791
|
-
return f7({ width: e, height: t, color:
|
|
2795
|
+
return f7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2792
2796
|
case "projects":
|
|
2793
|
-
return p7({ width: e, height: t, color:
|
|
2797
|
+
return p7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2794
2798
|
case "user":
|
|
2795
|
-
return L7({ width: e, height: t, color:
|
|
2799
|
+
return L7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2796
2800
|
case "exit":
|
|
2797
|
-
return u7({ width: e, height: t, color:
|
|
2801
|
+
return u7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2798
2802
|
case "status":
|
|
2799
|
-
return m7({ width: e, height: t, color:
|
|
2803
|
+
return m7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2800
2804
|
case "community":
|
|
2801
|
-
return v7({ width: e, height: t, color:
|
|
2805
|
+
return v7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2802
2806
|
case "docs":
|
|
2803
|
-
return k7({ width: e, height: t, color:
|
|
2807
|
+
return k7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2804
2808
|
case "unpaidLeave":
|
|
2805
|
-
return N7({ width: e, height: t, color:
|
|
2809
|
+
return N7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
2806
2810
|
default:
|
|
2807
2811
|
return /* @__PURE__ */ n(i1, { children: "No Icon provided" });
|
|
2808
2812
|
}
|
|
@@ -2824,8 +2828,8 @@ const e5 = (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 e5 = (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 = J(null);
|
|
2858
|
-
h1(
|
|
2859
|
-
const
|
|
2860
|
-
let
|
|
2861
|
-
l && l !== "inherit" && (
|
|
2862
|
-
const
|
|
2863
|
-
className:
|
|
2864
|
-
style: {
|
|
2861
|
+
h1(d, () => o.current);
|
|
2862
|
+
const a = M7(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(x7, { level: V7[e], ...w, children: i }) : /* @__PURE__ */ n(Z7, { ...w, children: i });
|
|
2875
2881
|
}
|
|
2876
2882
|
), H7 = ({
|
|
2877
2883
|
width: l = 20,
|
|
@@ -5137,159 +5143,159 @@ const e5 = (l, e) => {
|
|
|
5137
5143
|
disabled: C = !1,
|
|
5138
5144
|
onClick: h
|
|
5139
5145
|
}) => {
|
|
5140
|
-
const { theme: d } = s1(c1),
|
|
5146
|
+
const { theme: d } = s1(c1), 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(i1, { children: (() => {
|
|
5142
5148
|
switch (l) {
|
|
5143
5149
|
case "arrow1Down":
|
|
5144
|
-
return H7({ width: e, height: t, color:
|
|
5150
|
+
return H7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5145
5151
|
case "arrow1Up":
|
|
5146
|
-
return _7({ width: e, height: t, color:
|
|
5152
|
+
return _7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5147
5153
|
case "arrow1Right":
|
|
5148
|
-
return b7({ width: e, height: t, color:
|
|
5154
|
+
return b7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5149
5155
|
case "arrow1Left":
|
|
5150
|
-
return y7({ width: e, height: t, color:
|
|
5156
|
+
return y7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5151
5157
|
case "info":
|
|
5152
|
-
return A7({ width: e, height: t, color:
|
|
5158
|
+
return A7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5153
5159
|
case "archive":
|
|
5154
|
-
return G7({ width: e, height: t, color:
|
|
5160
|
+
return G7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5155
5161
|
case "unarchive":
|
|
5156
|
-
return B7({ width: e, height: t, color:
|
|
5162
|
+
return B7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5157
5163
|
case "calendar":
|
|
5158
|
-
return Y7({ width: e, height: t, color:
|
|
5164
|
+
return Y7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5159
5165
|
case "check":
|
|
5160
|
-
return O7({ width: e, height: t, color:
|
|
5166
|
+
return O7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5161
5167
|
case "cancel":
|
|
5162
|
-
return I7({ width: e, height: t, color:
|
|
5168
|
+
return I7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5163
5169
|
case "add":
|
|
5164
|
-
return $7({ width: e, height: t, color:
|
|
5170
|
+
return $7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5165
5171
|
case "list":
|
|
5166
|
-
return T7({ width: e, height: t, color:
|
|
5172
|
+
return T7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5167
5173
|
case "dragAndDrop":
|
|
5168
|
-
return P7({ width: e, height: t, color:
|
|
5174
|
+
return P7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5169
5175
|
case "filter1":
|
|
5170
|
-
return j7({ width: e, height: t, color:
|
|
5176
|
+
return j7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5171
5177
|
case "filter2":
|
|
5172
|
-
return L9({ width: e, height: t, color:
|
|
5178
|
+
return L9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5173
5179
|
case "attention":
|
|
5174
|
-
return F7({ width: e, height: t, color:
|
|
5180
|
+
return F7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5175
5181
|
case "users":
|
|
5176
|
-
return U7({ width: e, height: t, color:
|
|
5182
|
+
return U7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5177
5183
|
case "mySkillsMatrix":
|
|
5178
5184
|
return W7({
|
|
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 z7({ width: e, height: t, color:
|
|
5192
|
+
return z7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5187
5193
|
case "skillsMatrices":
|
|
5188
5194
|
return J7({
|
|
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 q7({ width: e, height: t, color:
|
|
5202
|
+
return q7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5197
5203
|
case "logOut":
|
|
5198
|
-
return Q7({ width: e, height: t, color:
|
|
5204
|
+
return Q7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5199
5205
|
case "settings":
|
|
5200
|
-
return X7({ width: e, height: t, color:
|
|
5206
|
+
return X7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5201
5207
|
case "trash":
|
|
5202
|
-
return e9({ width: e, height: t, color:
|
|
5208
|
+
return e9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5203
5209
|
case "settings2":
|
|
5204
|
-
return t9({ width: e, height: t, color:
|
|
5210
|
+
return t9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5205
5211
|
case "checkCircle":
|
|
5206
|
-
return i9({ width: e, height: t, color:
|
|
5212
|
+
return i9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5207
5213
|
case "cancelCircle":
|
|
5208
|
-
return l9({ width: e, height: t, color:
|
|
5214
|
+
return l9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5209
5215
|
case "visibilityIcon":
|
|
5210
5216
|
return s9({
|
|
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 n9({
|
|
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 o9({ width: e, height: t, color:
|
|
5232
|
+
return o9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5227
5233
|
case "sortDown":
|
|
5228
|
-
return a9({ width: e, height: t, color:
|
|
5234
|
+
return a9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5229
5235
|
case "sortDouble":
|
|
5230
|
-
return r9({ width: e, height: t, color:
|
|
5236
|
+
return r9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5231
5237
|
case "search":
|
|
5232
|
-
return C9({ width: e, height: t, color:
|
|
5238
|
+
return C9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5233
5239
|
case "arrowUpFilled":
|
|
5234
|
-
return c9({ width: e, height: t, color:
|
|
5240
|
+
return c9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5235
5241
|
case "arrowDownFilled":
|
|
5236
|
-
return h9({ width: e, height: t, color:
|
|
5242
|
+
return h9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5237
5243
|
case "arrow2Up":
|
|
5238
|
-
return E7({ width: e, height: t, color:
|
|
5244
|
+
return E7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5239
5245
|
case "arrow2Right":
|
|
5240
|
-
return D7({ width: e, height: t, color:
|
|
5246
|
+
return D7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5241
5247
|
case "arrow2Down":
|
|
5242
|
-
return K7({ width: e, height: t, color:
|
|
5248
|
+
return K7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5243
5249
|
case "arrow2Left":
|
|
5244
|
-
return S7({ width: e, height: t, color:
|
|
5250
|
+
return S7({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5245
5251
|
case "link":
|
|
5246
|
-
return d9({ width: e, height: t, color:
|
|
5252
|
+
return d9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5247
5253
|
case "telegram":
|
|
5248
|
-
return w9({ width: e, height: t, color:
|
|
5254
|
+
return w9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5249
5255
|
case "mail":
|
|
5250
|
-
return p9({ width: e, height: t, color:
|
|
5256
|
+
return p9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5251
5257
|
case "github":
|
|
5252
|
-
return g9({ width: e, height: t, color:
|
|
5258
|
+
return g9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5253
5259
|
case "linkedIn":
|
|
5254
|
-
return f9({ width: e, height: t, color:
|
|
5260
|
+
return f9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5255
5261
|
case "emptyStateIcon":
|
|
5256
|
-
return u9({ width: e, height: t, color:
|
|
5262
|
+
return u9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5257
5263
|
case "dotMenuIcon":
|
|
5258
|
-
return m9({ width: e, height: t, color:
|
|
5264
|
+
return m9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5259
5265
|
case "plusCircle":
|
|
5260
|
-
return v9({ width: e, height: t, color:
|
|
5266
|
+
return v9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5261
5267
|
case "warning":
|
|
5262
|
-
return k9({ width: e, height: t, color:
|
|
5268
|
+
return k9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5263
5269
|
case "bell":
|
|
5264
|
-
return N9({ width: e, height: t, color:
|
|
5270
|
+
return N9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5265
5271
|
case "copy":
|
|
5266
|
-
return M9({ width: e, height: t, color:
|
|
5272
|
+
return M9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5267
5273
|
case "contract":
|
|
5268
|
-
return x9({ width: e, height: t, color:
|
|
5274
|
+
return x9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5269
5275
|
case "resourceManager":
|
|
5270
|
-
return Z9({ width: e, height: t, color:
|
|
5276
|
+
return Z9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5271
5277
|
case "image":
|
|
5272
|
-
return V9({ width: e, height: t, color:
|
|
5278
|
+
return V9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5273
5279
|
case "edit":
|
|
5274
|
-
return R9({ width: e, height: t, color:
|
|
5280
|
+
return R9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5275
5281
|
case "burgerMenu":
|
|
5276
|
-
return H9({ width: e, height: t, color:
|
|
5282
|
+
return H9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5277
5283
|
case "refresh":
|
|
5278
|
-
return _9({ width: e, height: t, color:
|
|
5284
|
+
return _9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5279
5285
|
case "projects":
|
|
5280
|
-
return b9({ width: e, height: t, color:
|
|
5286
|
+
return b9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5281
5287
|
case "user":
|
|
5282
|
-
return A9({ width: e, height: t, color:
|
|
5288
|
+
return A9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5283
5289
|
case "exit":
|
|
5284
|
-
return y9({ width: e, height: t, color:
|
|
5290
|
+
return y9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5285
5291
|
case "status":
|
|
5286
|
-
return E9({ width: e, height: t, color:
|
|
5292
|
+
return E9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5287
5293
|
case "community":
|
|
5288
|
-
return D9({ width: e, height: t, color:
|
|
5294
|
+
return D9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5289
5295
|
case "docs":
|
|
5290
|
-
return K9({ width: e, height: t, color:
|
|
5296
|
+
return K9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5291
5297
|
case "unpaidLeave":
|
|
5292
|
-
return S9({ width: e, height: t, color:
|
|
5298
|
+
return S9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
5293
5299
|
default:
|
|
5294
5300
|
return /* @__PURE__ */ n(i1, { children: "No Icon provided" });
|
|
5295
5301
|
}
|
|
@@ -5349,8 +5355,8 @@ const e5 = (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 e5 = (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 = J(null);
|
|
5383
|
-
h1(
|
|
5384
|
-
const
|
|
5385
|
-
let
|
|
5386
|
-
l && l !== "inherit" && (
|
|
5387
|
-
const
|
|
5388
|
-
className:
|
|
5389
|
-
style: {
|
|
5388
|
+
h1(d, () => o.current);
|
|
5389
|
+
const a = B9(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(Y9, { level: I9[e], ...w, children: i }) : /* @__PURE__ */ n(O9, { ...w, children: i });
|
|
5400
5408
|
}
|
|
5401
5409
|
), T9 = ({
|
|
5402
5410
|
children: l,
|
|
@@ -5407,7 +5415,7 @@ const e5 = (l, e) => {
|
|
|
5407
5415
|
noPadding: C = !1,
|
|
5408
5416
|
trigger: h = "click"
|
|
5409
5417
|
}) => {
|
|
5410
|
-
const [d,
|
|
5418
|
+
const [d, o] = S(!1);
|
|
5411
5419
|
return /* @__PURE__ */ n(
|
|
5412
5420
|
K2,
|
|
5413
5421
|
{
|
|
@@ -5417,8 +5425,8 @@ const e5 = (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 e5 = (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 e5 = (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 = J(null);
|
|
5474
|
-
h1(
|
|
5475
|
-
const
|
|
5476
|
-
let
|
|
5477
|
-
l && l !== "inherit" && (
|
|
5478
|
-
const
|
|
5479
|
-
className:
|
|
5480
|
-
style: {
|
|
5481
|
+
h1(d, () => o.current);
|
|
5482
|
+
const a = P9(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(j9, { level: U9[e], ...w, children: i }) : /* @__PURE__ */ n(F9, { ...w, children: i });
|
|
5491
5501
|
}
|
|
5492
5502
|
), W9 = ({
|
|
5493
5503
|
width: l = 20,
|
|
@@ -7753,159 +7763,159 @@ const e5 = (l, e) => {
|
|
|
7753
7763
|
disabled: C = !1,
|
|
7754
7764
|
onClick: h
|
|
7755
7765
|
}) => {
|
|
7756
|
-
const { theme: d } = s1(c1),
|
|
7766
|
+
const { theme: d } = s1(c1), 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(i1, { children: (() => {
|
|
7758
7768
|
switch (l) {
|
|
7759
7769
|
case "arrow1Down":
|
|
7760
|
-
return W9({ width: e, height: t, color:
|
|
7770
|
+
return W9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7761
7771
|
case "arrow1Up":
|
|
7762
|
-
return z9({ width: e, height: t, color:
|
|
7772
|
+
return z9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7763
7773
|
case "arrow1Right":
|
|
7764
|
-
return J9({ width: e, height: t, color:
|
|
7774
|
+
return J9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7765
7775
|
case "arrow1Left":
|
|
7766
|
-
return q9({ width: e, height: t, color:
|
|
7776
|
+
return q9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7767
7777
|
case "info":
|
|
7768
|
-
return Q9({ width: e, height: t, color:
|
|
7778
|
+
return Q9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7769
7779
|
case "archive":
|
|
7770
|
-
return l0({ width: e, height: t, color:
|
|
7780
|
+
return l0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7771
7781
|
case "unarchive":
|
|
7772
|
-
return s0({ width: e, height: t, color:
|
|
7782
|
+
return s0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7773
7783
|
case "calendar":
|
|
7774
|
-
return n0({ width: e, height: t, color:
|
|
7784
|
+
return n0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7775
7785
|
case "check":
|
|
7776
|
-
return o0({ width: e, height: t, color:
|
|
7786
|
+
return o0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7777
7787
|
case "cancel":
|
|
7778
|
-
return a0({ width: e, height: t, color:
|
|
7788
|
+
return a0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7779
7789
|
case "add":
|
|
7780
|
-
return r0({ width: e, height: t, color:
|
|
7790
|
+
return r0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7781
7791
|
case "list":
|
|
7782
|
-
return C0({ width: e, height: t, color:
|
|
7792
|
+
return C0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7783
7793
|
case "dragAndDrop":
|
|
7784
|
-
return h0({ width: e, height: t, color:
|
|
7794
|
+
return h0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7785
7795
|
case "filter1":
|
|
7786
|
-
return c0({ width: e, height: t, color:
|
|
7796
|
+
return c0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7787
7797
|
case "filter2":
|
|
7788
|
-
return B0({ width: e, height: t, color:
|
|
7798
|
+
return B0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7789
7799
|
case "attention":
|
|
7790
|
-
return d0({ width: e, height: t, color:
|
|
7800
|
+
return d0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7791
7801
|
case "users":
|
|
7792
|
-
return g0({ width: e, height: t, color:
|
|
7802
|
+
return g0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7793
7803
|
case "mySkillsMatrix":
|
|
7794
7804
|
return w0({
|
|
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 f0({ width: e, height: t, color:
|
|
7812
|
+
return f0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7803
7813
|
case "skillsMatrices":
|
|
7804
7814
|
return p0({
|
|
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 u0({ width: e, height: t, color:
|
|
7822
|
+
return u0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7813
7823
|
case "logOut":
|
|
7814
|
-
return L0({ width: e, height: t, color:
|
|
7824
|
+
return L0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7815
7825
|
case "settings":
|
|
7816
|
-
return m0({ width: e, height: t, color:
|
|
7826
|
+
return m0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7817
7827
|
case "trash":
|
|
7818
|
-
return v0({ width: e, height: t, color:
|
|
7828
|
+
return v0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7819
7829
|
case "settings2":
|
|
7820
|
-
return k0({ width: e, height: t, color:
|
|
7830
|
+
return k0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7821
7831
|
case "checkCircle":
|
|
7822
|
-
return N0({ width: e, height: t, color:
|
|
7832
|
+
return N0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7823
7833
|
case "cancelCircle":
|
|
7824
|
-
return M0({ width: e, height: t, color:
|
|
7834
|
+
return M0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7825
7835
|
case "visibilityIcon":
|
|
7826
7836
|
return x0({
|
|
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 Z0({
|
|
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 V0({ width: e, height: t, color:
|
|
7852
|
+
return V0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7843
7853
|
case "sortDown":
|
|
7844
|
-
return R0({ width: e, height: t, color:
|
|
7854
|
+
return R0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7845
7855
|
case "sortDouble":
|
|
7846
|
-
return H0({ width: e, height: t, color:
|
|
7856
|
+
return H0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7847
7857
|
case "search":
|
|
7848
|
-
return _0({ width: e, height: t, color:
|
|
7858
|
+
return _0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7849
7859
|
case "arrowUpFilled":
|
|
7850
|
-
return y0({ width: e, height: t, color:
|
|
7860
|
+
return y0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7851
7861
|
case "arrowDownFilled":
|
|
7852
|
-
return b0({ width: e, height: t, color:
|
|
7862
|
+
return b0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7853
7863
|
case "arrow2Up":
|
|
7854
|
-
return X9({ width: e, height: t, color:
|
|
7864
|
+
return X9({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7855
7865
|
case "arrow2Right":
|
|
7856
|
-
return e0({ width: e, height: t, color:
|
|
7866
|
+
return e0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7857
7867
|
case "arrow2Down":
|
|
7858
|
-
return t0({ width: e, height: t, color:
|
|
7868
|
+
return t0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7859
7869
|
case "arrow2Left":
|
|
7860
|
-
return i0({ width: e, height: t, color:
|
|
7870
|
+
return i0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7861
7871
|
case "link":
|
|
7862
|
-
return A0({ width: e, height: t, color:
|
|
7872
|
+
return A0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7863
7873
|
case "telegram":
|
|
7864
|
-
return D0({ width: e, height: t, color:
|
|
7874
|
+
return D0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7865
7875
|
case "mail":
|
|
7866
|
-
return S0({ width: e, height: t, color:
|
|
7876
|
+
return S0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7867
7877
|
case "github":
|
|
7868
|
-
return E0({ width: e, height: t, color:
|
|
7878
|
+
return E0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7869
7879
|
case "linkedIn":
|
|
7870
|
-
return K0({ width: e, height: t, color:
|
|
7880
|
+
return K0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7871
7881
|
case "emptyStateIcon":
|
|
7872
|
-
return G0({ width: e, height: t, color:
|
|
7882
|
+
return G0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7873
7883
|
case "dotMenuIcon":
|
|
7874
|
-
return Y0({ width: e, height: t, color:
|
|
7884
|
+
return Y0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7875
7885
|
case "plusCircle":
|
|
7876
|
-
return O0({ width: e, height: t, color:
|
|
7886
|
+
return O0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7877
7887
|
case "warning":
|
|
7878
|
-
return I0({ width: e, height: t, color:
|
|
7888
|
+
return I0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7879
7889
|
case "bell":
|
|
7880
|
-
return $0({ width: e, height: t, color:
|
|
7890
|
+
return $0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7881
7891
|
case "copy":
|
|
7882
|
-
return T0({ width: e, height: t, color:
|
|
7892
|
+
return T0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7883
7893
|
case "contract":
|
|
7884
|
-
return P0({ width: e, height: t, color:
|
|
7894
|
+
return P0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7885
7895
|
case "resourceManager":
|
|
7886
|
-
return j0({ width: e, height: t, color:
|
|
7896
|
+
return j0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7887
7897
|
case "image":
|
|
7888
|
-
return F0({ width: e, height: t, color:
|
|
7898
|
+
return F0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7889
7899
|
case "edit":
|
|
7890
|
-
return U0({ width: e, height: t, color:
|
|
7900
|
+
return U0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7891
7901
|
case "burgerMenu":
|
|
7892
|
-
return W0({ width: e, height: t, color:
|
|
7902
|
+
return W0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7893
7903
|
case "refresh":
|
|
7894
|
-
return z0({ width: e, height: t, color:
|
|
7904
|
+
return z0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7895
7905
|
case "projects":
|
|
7896
|
-
return J0({ width: e, height: t, color:
|
|
7906
|
+
return J0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7897
7907
|
case "user":
|
|
7898
|
-
return Q0({ width: e, height: t, color:
|
|
7908
|
+
return Q0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7899
7909
|
case "exit":
|
|
7900
|
-
return q0({ width: e, height: t, color:
|
|
7910
|
+
return q0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7901
7911
|
case "status":
|
|
7902
|
-
return X0({ width: e, height: t, color:
|
|
7912
|
+
return X0({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7903
7913
|
case "community":
|
|
7904
|
-
return e4({ width: e, height: t, color:
|
|
7914
|
+
return e4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7905
7915
|
case "docs":
|
|
7906
|
-
return t4({ width: e, height: t, color:
|
|
7916
|
+
return t4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7907
7917
|
case "unpaidLeave":
|
|
7908
|
-
return i4({ width: e, height: t, color:
|
|
7918
|
+
return i4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
7909
7919
|
default:
|
|
7910
7920
|
return /* @__PURE__ */ n(i1, { children: "No Icon provided" });
|
|
7911
7921
|
}
|
|
@@ -8007,23 +8017,23 @@ const o4 = ({
|
|
|
8007
8017
|
extraOptions: h,
|
|
8008
8018
|
selectedItemVariant: d = "default"
|
|
8009
8019
|
}) => {
|
|
8010
|
-
const { locale:
|
|
8020
|
+
const { locale: o } = s1(c1), { t: a } = i5("common", { lng: o }), [r, f] = S(!1);
|
|
8011
8021
|
if (F(() => {
|
|
8012
|
-
l.length ||
|
|
8022
|
+
l.length || f(!1);
|
|
8013
8023
|
}, [l]), !l.length)
|
|
8014
8024
|
return null;
|
|
8015
|
-
const w = (
|
|
8025
|
+
const w = (p) => {
|
|
8016
8026
|
var k, M;
|
|
8017
|
-
return ((k = C == null ? void 0 : C.find((v) => v.value ===
|
|
8027
|
+
return ((k = C == null ? void 0 : C.find((v) => v.value === p)) == null ? void 0 : k.label) || ((M = h == null ? void 0 : h.find((v) => v.value === p)) == null ? void 0 : M.label) || p;
|
|
8018
8028
|
};
|
|
8019
8029
|
return /* @__PURE__ */ g(
|
|
8020
8030
|
T9,
|
|
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: p }) => {
|
|
8025
8035
|
const k = d === "badge" && C.find(
|
|
8026
|
-
(M) => M.label === w(
|
|
8036
|
+
(M) => M.label === w(p)
|
|
8027
8037
|
);
|
|
8028
8038
|
return d === "badge" ? /* @__PURE__ */ n(
|
|
8029
8039
|
N2,
|
|
@@ -8031,28 +8041,28 @@ const o4 = ({
|
|
|
8031
8041
|
variant: "regular",
|
|
8032
8042
|
size: "small",
|
|
8033
8043
|
color: k ? k.color : void 0,
|
|
8034
|
-
text: w(
|
|
8044
|
+
text: w(p)
|
|
8035
8045
|
},
|
|
8036
|
-
|
|
8046
|
+
p
|
|
8037
8047
|
) : /* @__PURE__ */ n(
|
|
8038
8048
|
v2,
|
|
8039
8049
|
{
|
|
8040
|
-
onClose: () => e(
|
|
8050
|
+
onClose: () => e(p),
|
|
8041
8051
|
closable: i,
|
|
8042
8052
|
disabled: s,
|
|
8043
|
-
children: w(
|
|
8053
|
+
children: w(p)
|
|
8044
8054
|
},
|
|
8045
|
-
|
|
8055
|
+
p
|
|
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
|
);
|
|
@@ -10332,159 +10342,159 @@ const o4 = ({
|
|
|
10332
10342
|
disabled: C = !1,
|
|
10333
10343
|
onClick: h
|
|
10334
10344
|
}) => {
|
|
10335
|
-
const { theme: d } = s1(c1),
|
|
10345
|
+
const { theme: d } = s1(c1), 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(i1, { children: (() => {
|
|
10337
10347
|
switch (l) {
|
|
10338
10348
|
case "arrow1Down":
|
|
10339
|
-
return r4({ width: e, height: t, color:
|
|
10349
|
+
return r4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10340
10350
|
case "arrow1Up":
|
|
10341
|
-
return C4({ width: e, height: t, color:
|
|
10351
|
+
return C4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10342
10352
|
case "arrow1Right":
|
|
10343
|
-
return h4({ width: e, height: t, color:
|
|
10353
|
+
return h4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10344
10354
|
case "arrow1Left":
|
|
10345
|
-
return c4({ width: e, height: t, color:
|
|
10355
|
+
return c4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10346
10356
|
case "info":
|
|
10347
|
-
return d4({ width: e, height: t, color:
|
|
10357
|
+
return d4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10348
10358
|
case "archive":
|
|
10349
|
-
return u4({ width: e, height: t, color:
|
|
10359
|
+
return u4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10350
10360
|
case "unarchive":
|
|
10351
|
-
return L4({ width: e, height: t, color:
|
|
10361
|
+
return L4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10352
10362
|
case "calendar":
|
|
10353
|
-
return m4({ width: e, height: t, color:
|
|
10363
|
+
return m4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10354
10364
|
case "check":
|
|
10355
|
-
return v4({ width: e, height: t, color:
|
|
10365
|
+
return v4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10356
10366
|
case "cancel":
|
|
10357
|
-
return k4({ width: e, height: t, color:
|
|
10367
|
+
return k4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10358
10368
|
case "add":
|
|
10359
|
-
return N4({ width: e, height: t, color:
|
|
10369
|
+
return N4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10360
10370
|
case "list":
|
|
10361
|
-
return M4({ width: e, height: t, color:
|
|
10371
|
+
return M4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10362
10372
|
case "dragAndDrop":
|
|
10363
|
-
return x4({ width: e, height: t, color:
|
|
10373
|
+
return x4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10364
10374
|
case "filter1":
|
|
10365
|
-
return Z4({ width: e, height: t, color:
|
|
10375
|
+
return Z4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10366
10376
|
case "filter2":
|
|
10367
|
-
return Q4({ width: e, height: t, color:
|
|
10377
|
+
return Q4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10368
10378
|
case "attention":
|
|
10369
|
-
return V4({ width: e, height: t, color:
|
|
10379
|
+
return V4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10370
10380
|
case "users":
|
|
10371
|
-
return R4({ width: e, height: t, color:
|
|
10381
|
+
return R4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10372
10382
|
case "mySkillsMatrix":
|
|
10373
10383
|
return H4({
|
|
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 _4({ width: e, height: t, color:
|
|
10391
|
+
return _4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10382
10392
|
case "skillsMatrices":
|
|
10383
10393
|
return b4({
|
|
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 y4({ width: e, height: t, color:
|
|
10401
|
+
return y4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10392
10402
|
case "logOut":
|
|
10393
|
-
return A4({ width: e, height: t, color:
|
|
10403
|
+
return A4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10394
10404
|
case "settings":
|
|
10395
|
-
return E4({ width: e, height: t, color:
|
|
10405
|
+
return E4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10396
10406
|
case "trash":
|
|
10397
|
-
return D4({ width: e, height: t, color:
|
|
10407
|
+
return D4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10398
10408
|
case "settings2":
|
|
10399
|
-
return K4({ width: e, height: t, color:
|
|
10409
|
+
return K4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10400
10410
|
case "checkCircle":
|
|
10401
|
-
return S4({ width: e, height: t, color:
|
|
10411
|
+
return S4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10402
10412
|
case "cancelCircle":
|
|
10403
|
-
return G4({ width: e, height: t, color:
|
|
10413
|
+
return G4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10404
10414
|
case "visibilityIcon":
|
|
10405
10415
|
return B4({
|
|
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 Y4({
|
|
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 O4({ width: e, height: t, color:
|
|
10431
|
+
return O4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10422
10432
|
case "sortDown":
|
|
10423
|
-
return I4({ width: e, height: t, color:
|
|
10433
|
+
return I4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10424
10434
|
case "sortDouble":
|
|
10425
|
-
return $4({ width: e, height: t, color:
|
|
10435
|
+
return $4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10426
10436
|
case "search":
|
|
10427
|
-
return T4({ width: e, height: t, color:
|
|
10437
|
+
return T4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10428
10438
|
case "arrowUpFilled":
|
|
10429
|
-
return j4({ width: e, height: t, color:
|
|
10439
|
+
return j4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10430
10440
|
case "arrowDownFilled":
|
|
10431
|
-
return P4({ width: e, height: t, color:
|
|
10441
|
+
return P4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10432
10442
|
case "arrow2Up":
|
|
10433
|
-
return g4({ width: e, height: t, color:
|
|
10443
|
+
return g4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10434
10444
|
case "arrow2Right":
|
|
10435
|
-
return w4({ width: e, height: t, color:
|
|
10445
|
+
return w4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10436
10446
|
case "arrow2Down":
|
|
10437
|
-
return f4({ width: e, height: t, color:
|
|
10447
|
+
return f4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10438
10448
|
case "arrow2Left":
|
|
10439
|
-
return p4({ width: e, height: t, color:
|
|
10449
|
+
return p4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10440
10450
|
case "link":
|
|
10441
|
-
return F4({ width: e, height: t, color:
|
|
10451
|
+
return F4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10442
10452
|
case "telegram":
|
|
10443
|
-
return W4({ width: e, height: t, color:
|
|
10453
|
+
return W4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10444
10454
|
case "mail":
|
|
10445
|
-
return J4({ width: e, height: t, color:
|
|
10455
|
+
return J4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10446
10456
|
case "github":
|
|
10447
|
-
return U4({ width: e, height: t, color:
|
|
10457
|
+
return U4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10448
10458
|
case "linkedIn":
|
|
10449
|
-
return z4({ width: e, height: t, color:
|
|
10459
|
+
return z4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10450
10460
|
case "emptyStateIcon":
|
|
10451
|
-
return q4({ width: e, height: t, color:
|
|
10461
|
+
return q4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10452
10462
|
case "dotMenuIcon":
|
|
10453
|
-
return X4({ width: e, height: t, color:
|
|
10463
|
+
return X4({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10454
10464
|
case "plusCircle":
|
|
10455
|
-
return e6({ width: e, height: t, color:
|
|
10465
|
+
return e6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10456
10466
|
case "warning":
|
|
10457
|
-
return t6({ width: e, height: t, color:
|
|
10467
|
+
return t6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10458
10468
|
case "bell":
|
|
10459
|
-
return i6({ width: e, height: t, color:
|
|
10469
|
+
return i6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10460
10470
|
case "copy":
|
|
10461
|
-
return l6({ width: e, height: t, color:
|
|
10471
|
+
return l6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10462
10472
|
case "contract":
|
|
10463
|
-
return s6({ width: e, height: t, color:
|
|
10473
|
+
return s6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10464
10474
|
case "resourceManager":
|
|
10465
|
-
return n6({ width: e, height: t, color:
|
|
10475
|
+
return n6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10466
10476
|
case "image":
|
|
10467
|
-
return o6({ width: e, height: t, color:
|
|
10477
|
+
return o6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10468
10478
|
case "edit":
|
|
10469
|
-
return a6({ width: e, height: t, color:
|
|
10479
|
+
return a6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10470
10480
|
case "burgerMenu":
|
|
10471
|
-
return r6({ width: e, height: t, color:
|
|
10481
|
+
return r6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10472
10482
|
case "refresh":
|
|
10473
|
-
return C6({ width: e, height: t, color:
|
|
10483
|
+
return C6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10474
10484
|
case "projects":
|
|
10475
|
-
return h6({ width: e, height: t, color:
|
|
10485
|
+
return h6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10476
10486
|
case "user":
|
|
10477
|
-
return d6({ width: e, height: t, color:
|
|
10487
|
+
return d6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10478
10488
|
case "exit":
|
|
10479
|
-
return c6({ width: e, height: t, color:
|
|
10489
|
+
return c6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10480
10490
|
case "status":
|
|
10481
|
-
return g6({ width: e, height: t, color:
|
|
10491
|
+
return g6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10482
10492
|
case "community":
|
|
10483
|
-
return w6({ width: e, height: t, color:
|
|
10493
|
+
return w6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10484
10494
|
case "docs":
|
|
10485
|
-
return f6({ width: e, height: t, color:
|
|
10495
|
+
return f6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10486
10496
|
case "unpaidLeave":
|
|
10487
|
-
return p6({ width: e, height: t, color:
|
|
10497
|
+
return p6({ width: e, height: t, color: o, className: r, onClick: a });
|
|
10488
10498
|
default:
|
|
10489
10499
|
return /* @__PURE__ */ n(i1, { children: "No Icon provided" });
|
|
10490
10500
|
}
|
|
@@ -10528,12 +10538,12 @@ const k6 = 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: p,
|
|
10537
10547
|
onDropdownVisibleChange: k,
|
|
10538
10548
|
onScrollToEnd: M,
|
|
10539
10549
|
onPopupScroll: v,
|
|
@@ -10581,14 +10591,14 @@ const k6 = a1((l, e) => {
|
|
|
10581
10591
|
},
|
|
10582
10592
|
[C, i, d1]
|
|
10583
10593
|
), H1 = y(() => {
|
|
10584
|
-
if (!(x ||
|
|
10594
|
+
if (!(x || a)) {
|
|
10585
10595
|
if (C) {
|
|
10586
10596
|
l1([]);
|
|
10587
10597
|
return;
|
|
10588
10598
|
}
|
|
10589
10599
|
l1("");
|
|
10590
10600
|
}
|
|
10591
|
-
}, [
|
|
10601
|
+
}, [a, l1, C, x]), g1 = y(
|
|
10592
10602
|
(N) => {
|
|
10593
10603
|
const b = _.filter((I) => I !== N);
|
|
10594
10604
|
l1(b), B(b);
|
|
@@ -10621,7 +10631,7 @@ const k6 = a1((l, e) => {
|
|
|
10621
10631
|
values: N,
|
|
10622
10632
|
onTagClose: g1,
|
|
10623
10633
|
maxWidth: ((I = n1.current) == null ? void 0 : I.clientWidth) || 0,
|
|
10624
|
-
disabled:
|
|
10634
|
+
disabled: a,
|
|
10625
10635
|
closable: !x,
|
|
10626
10636
|
options: d,
|
|
10627
10637
|
extraOptions: V,
|
|
@@ -10629,7 +10639,7 @@ const k6 = a1((l, e) => {
|
|
|
10629
10639
|
}
|
|
10630
10640
|
);
|
|
10631
10641
|
},
|
|
10632
|
-
[
|
|
10642
|
+
[a, V, g1, d, x]
|
|
10633
10643
|
), e1 = y(
|
|
10634
10644
|
({ label: N, value: b, mode: I }) => {
|
|
10635
10645
|
if (I === "filter")
|
|
@@ -10644,10 +10654,10 @@ const k6 = a1((l, e) => {
|
|
|
10644
10654
|
color: o1 ? o1.color : "cyan",
|
|
10645
10655
|
text: F1
|
|
10646
10656
|
}
|
|
10647
|
-
) : /* @__PURE__ */ n(v2, { onClose: () => g1(b), disabled:
|
|
10657
|
+
) : /* @__PURE__ */ n(v2, { onClose: () => g1(b), disabled: a, children: F1 }) });
|
|
10648
10658
|
}
|
|
10649
10659
|
},
|
|
10650
|
-
[
|
|
10660
|
+
[a, j, g1, E, Y, d]
|
|
10651
10661
|
), _1 = Array.isArray(_) && _.length > 0 || !!_ && typeof _ == "string" && _.trim() !== "";
|
|
10652
10662
|
return /* @__PURE__ */ g(
|
|
10653
10663
|
"div",
|
|
@@ -10663,7 +10673,7 @@ const k6 = a1((l, e) => {
|
|
|
10663
10673
|
${Q === "static" ? "snmt-select-static" : ""}
|
|
10664
10674
|
${$ === "borderless" ? "snmt-select-borderless" : ""}`,
|
|
10665
10675
|
ref: n1,
|
|
10666
|
-
style: { width:
|
|
10676
|
+
style: { width: o },
|
|
10667
10677
|
children: [
|
|
10668
10678
|
/* @__PURE__ */ n(
|
|
10669
10679
|
y2,
|
|
@@ -10675,11 +10685,11 @@ const k6 = 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 b = j(N.value);
|
|
10682
|
-
return
|
|
10692
|
+
return a ? /* @__PURE__ */ n("span", { style: { color: c.GREY_DARK_1 }, children: b }) : b;
|
|
10683
10693
|
},
|
|
10684
10694
|
mode: N6(C, d1),
|
|
10685
10695
|
variant: $,
|
|
@@ -10689,7 +10699,7 @@ const k6 = a1((l, e) => {
|
|
|
10689
10699
|
onMouseEnter: () => O(!0),
|
|
10690
10700
|
onMouseLeave: () => O(!1),
|
|
10691
10701
|
onSearch: (N) => {
|
|
10692
|
-
H(!N),
|
|
10702
|
+
H(!N), p && p(N);
|
|
10693
10703
|
},
|
|
10694
10704
|
onSelect: () => H(!0),
|
|
10695
10705
|
onDeselect: () => H(!0),
|
|
@@ -10699,18 +10709,18 @@ const k6 = a1((l, e) => {
|
|
|
10699
10709
|
onPopupScroll: X,
|
|
10700
10710
|
prefix: L && /* @__PURE__ */ n(X1, { size: "small" }),
|
|
10701
10711
|
suffixIcon: /* @__PURE__ */ n("div", { className: "wrapper-suffix-icon", children: C !== "filter" && /* @__PURE__ */ g(i1, { 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
|
u1,
|
|
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
|
}
|
|
@@ -10726,7 +10736,7 @@ const k6 = a1((l, e) => {
|
|
|
10726
10736
|
u1,
|
|
10727
10737
|
{
|
|
10728
10738
|
name: "arrow2Down",
|
|
10729
|
-
color:
|
|
10739
|
+
color: a ? c.GREY_DARK_1 : c.GREY_DARK_2,
|
|
10730
10740
|
className: R ? "select-arrow-rotated" : "select-arrow",
|
|
10731
10741
|
onClick: () => G(!R)
|
|
10732
10742
|
}
|
|
@@ -10765,14 +10775,14 @@ const k6 = a1((l, e) => {
|
|
|
10765
10775
|
s && $ !== "borderless" && /* @__PURE__ */ n(
|
|
10766
10776
|
"label",
|
|
10767
10777
|
{
|
|
10768
|
-
className: `${T || _1 ? "label-floating" : ""} ${
|
|
10778
|
+
className: `${T || _1 ? "label-floating" : ""} ${a ? "label-disabled" : ""} ${T ? "label-focused" : ""} ${L ? "label-loading" : ""} ${m ? "label-error" : ""}`,
|
|
10769
10779
|
children: r ? `${s}*` : s
|
|
10770
10780
|
}
|
|
10771
10781
|
),
|
|
10772
10782
|
/* @__PURE__ */ n(
|
|
10773
10783
|
"fieldset",
|
|
10774
10784
|
{
|
|
10775
|
-
className: `${T ? "fieldset-focused" : ""} ${
|
|
10785
|
+
className: `${T ? "fieldset-focused" : ""} ${a ? "fieldset-disabled" : ""} ${_1 ? "fieldset-filled" : ""} ${m ? "fieldset-error" : ""}
|
|
10776
10786
|
${K ? "fieldset-hovered" : ""}`,
|
|
10777
10787
|
children: /* @__PURE__ */ n("legend", { children: s && $ !== "borderless" && /* @__PURE__ */ n("span", { children: r ? `${s}*` : s }) })
|
|
10778
10788
|
}
|
|
@@ -10826,12 +10836,12 @@ const B1 = 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: p,
|
|
10835
10845
|
optionRender: k,
|
|
10836
10846
|
dropdownRender: M,
|
|
10837
10847
|
readOnly: v,
|
|
@@ -10882,14 +10892,14 @@ const B1 = 100, w1 = {
|
|
|
10882
10892
|
[$, L == null ? void 0 : L.length, m.count]
|
|
10883
10893
|
), R1 = y(
|
|
10884
10894
|
(E) => {
|
|
10885
|
-
P(E), !E && R && (G(void 0), Y(w1), B(!0)),
|
|
10895
|
+
P(E), !E && R && (G(void 0), Y(w1), B(!0)), p == null || p(E);
|
|
10886
10896
|
},
|
|
10887
|
-
[
|
|
10897
|
+
[p, R]
|
|
10888
10898
|
);
|
|
10889
10899
|
F(() => {
|
|
10890
10900
|
!n1.current || $ || (_ || T && (W !== m.offset || H !== R || !L)) && (d1({ offset: m.offset, limit: B1, search: R }), _ && B(!1));
|
|
10891
10901
|
}, [_, T, m.offset, R, W, H, L, $]), F(() => {
|
|
10892
|
-
(r ||
|
|
10902
|
+
(r || f) && d1(w1), n1.current = !0;
|
|
10893
10903
|
}, []), F(() => {
|
|
10894
10904
|
w && O((E) => {
|
|
10895
10905
|
const z = w.filter(
|
|
@@ -10902,7 +10912,7 @@ const B1 = 100, w1 = {
|
|
|
10902
10912
|
(E) => {
|
|
10903
10913
|
s && s(E);
|
|
10904
10914
|
let z = [];
|
|
10905
|
-
if (
|
|
10915
|
+
if (a ? z = Array.isArray(E) ? E : [] : z = E ? [E] : [], R) {
|
|
10906
10916
|
const X = z.filter(
|
|
10907
10917
|
(j) => !(K != null && K.some((q) => q.value === j))
|
|
10908
10918
|
);
|
|
@@ -10920,14 +10930,14 @@ const B1 = 100, w1 = {
|
|
|
10920
10930
|
]), G(void 0), Y(w1), B(!0);
|
|
10921
10931
|
}
|
|
10922
10932
|
},
|
|
10923
|
-
[s, R,
|
|
10933
|
+
[s, R, a, L, K]
|
|
10924
10934
|
), H1 = W1(
|
|
10925
10935
|
() => ({
|
|
10926
10936
|
id: C,
|
|
10927
10937
|
width: i,
|
|
10928
10938
|
onChange: l1,
|
|
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 B1 = 100, w1 = {
|
|
|
10948
10958
|
i,
|
|
10949
10959
|
l1,
|
|
10950
10960
|
e,
|
|
10951
|
-
|
|
10961
|
+
o,
|
|
10952
10962
|
Z1,
|
|
10953
10963
|
R1,
|
|
10954
10964
|
d,
|
|
@@ -10970,12 +10980,12 @@ const B1 = 100, w1 = {
|
|
|
10970
10980
|
}
|
|
10971
10981
|
}));
|
|
10972
10982
|
const g1 = W1(() => {
|
|
10973
|
-
const E =
|
|
10974
|
-
mode:
|
|
10983
|
+
const E = a && a !== "single", z = l.selectedItemVariant === "badge", X = z ? L || [] : L || [], j = K, q = l, e1 = E ? {
|
|
10984
|
+
mode: a,
|
|
10975
10985
|
overflowBehaviour: q.overflowBehaviour,
|
|
10976
10986
|
value: q.value
|
|
10977
10987
|
} : {
|
|
10978
|
-
mode:
|
|
10988
|
+
mode: a,
|
|
10979
10989
|
value: l.value
|
|
10980
10990
|
};
|
|
10981
10991
|
return {
|
|
@@ -10985,7 +10995,7 @@ const B1 = 100, w1 = {
|
|
|
10985
10995
|
options: X,
|
|
10986
10996
|
extraOptions: j
|
|
10987
10997
|
};
|
|
10988
|
-
}, [
|
|
10998
|
+
}, [a, l, H1, K, L]);
|
|
10989
10999
|
return /* @__PURE__ */ n("div", { className: "snmt-async-select", children: /* @__PURE__ */ n(k6, { ...g1 }) });
|
|
10990
11000
|
});
|
|
10991
11001
|
var A1 = /* @__PURE__ */ ((l) => (l.ACTIVE = "Active", l.ARCHIVED = "Archived", l))(A1 || {});
|
|
@@ -11036,9 +11046,9 @@ const M2 = (l, e) => () => {
|
|
|
11036
11046
|
let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
11037
11047
|
const i = e.languages[0], s = e.options ? e.options.fallbackLng : !1, C = e.languages[e.languages.length - 1];
|
|
11038
11048
|
if (i.toLowerCase() === "cimode") return !0;
|
|
11039
|
-
const h = (d,
|
|
11040
|
-
const
|
|
11041
|
-
return
|
|
11049
|
+
const h = (d, o) => {
|
|
11050
|
+
const a = e.services.backendConnector.state[`${d}|${o}`];
|
|
11051
|
+
return a === -1 || a === 2;
|
|
11042
11052
|
};
|
|
11043
11053
|
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)));
|
|
11044
11054
|
}, H6 = function(l, e) {
|
|
@@ -11133,12 +11143,12 @@ const I6 = (l, e) => {
|
|
|
11133
11143
|
...e
|
|
11134
11144
|
}, {
|
|
11135
11145
|
useSuspense: d,
|
|
11136
|
-
keyPrefix:
|
|
11146
|
+
keyPrefix: o
|
|
11137
11147
|
} = h;
|
|
11138
|
-
let
|
|
11139
|
-
|
|
11140
|
-
const r = (C.isInitialized || C.initializedStoreOnce) &&
|
|
11141
|
-
let v =
|
|
11148
|
+
let a = l;
|
|
11149
|
+
a = C1(a) ? [a] : a || ["translation"], C.reportNamespaces.addUsedNamespaces && C.reportNamespaces.addUsedNamespaces(a);
|
|
11150
|
+
const r = (C.isInitialized || C.initializedStoreOnce) && a.every((u) => H6(u, C, h)), f = $6(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), w = () => f, p = () => Z2(C, e.lng || null, h.nsMode === "fallback" ? a : a[0], o), [k, M] = S(w);
|
|
11151
|
+
let v = a.join();
|
|
11142
11152
|
e.lng && (v = `${e.lng}${v}`);
|
|
11143
11153
|
const A = I6(v), V = J(!0);
|
|
11144
11154
|
F(() => {
|
|
@@ -11146,24 +11156,24 @@ const I6 = (l, e) => {
|
|
|
11146
11156
|
bindI18n: u,
|
|
11147
11157
|
bindI18nStore: L
|
|
11148
11158
|
} = h;
|
|
11149
|
-
V.current = !0, !r && !d && (e.lng ? s2(C, e.lng,
|
|
11150
|
-
V.current && M(
|
|
11151
|
-
}) : l2(C,
|
|
11152
|
-
V.current && M(
|
|
11153
|
-
})), r && A && A !== v && V.current && M(
|
|
11159
|
+
V.current = !0, !r && !d && (e.lng ? s2(C, e.lng, a, () => {
|
|
11160
|
+
V.current && M(p);
|
|
11161
|
+
}) : l2(C, a, () => {
|
|
11162
|
+
V.current && M(p);
|
|
11163
|
+
})), r && A && A !== v && V.current && M(p);
|
|
11154
11164
|
const x = () => {
|
|
11155
|
-
V.current && M(
|
|
11165
|
+
V.current && M(p);
|
|
11156
11166
|
};
|
|
11157
11167
|
return u && C && C.on(u, x), L && C && C.store.on(L, x), () => {
|
|
11158
11168
|
V.current = !1, u && C && u.split(" ").forEach((m) => C.off(m, x)), L && C && L.split(" ").forEach((m) => C.store.off(m, x));
|
|
11159
11169
|
};
|
|
11160
11170
|
}, [C, v]), F(() => {
|
|
11161
11171
|
V.current && r && M(w);
|
|
11162
|
-
}, [C,
|
|
11172
|
+
}, [C, o, r]);
|
|
11163
11173
|
const D = [k, C, r];
|
|
11164
11174
|
if (D.t = k, D.i18n = C, D.ready = r, r || !r && !d) return D;
|
|
11165
11175
|
throw new Promise((u) => {
|
|
11166
|
-
e.lng ? s2(C, e.lng,
|
|
11176
|
+
e.lng ? s2(C, e.lng, a, () => u()) : l2(C, a, () => u());
|
|
11167
11177
|
});
|
|
11168
11178
|
}, Z = (l) => typeof l == "string", L1 = () => {
|
|
11169
11179
|
let l, e;
|
|
@@ -11263,11 +11273,11 @@ const q6 = [" ", ",", "?", "!", ";"], Q6 = new J6(20), X6 = (l, e, t) => {
|
|
|
11263
11273
|
if (!s || typeof s != "object")
|
|
11264
11274
|
return;
|
|
11265
11275
|
let h, d = "";
|
|
11266
|
-
for (let
|
|
11267
|
-
if (
|
|
11268
|
-
if (["string", "number", "boolean"].indexOf(typeof h) > -1 &&
|
|
11276
|
+
for (let o = C; o < i.length; ++o)
|
|
11277
|
+
if (o !== C && (d += t), d += i[o], h = s[d], h !== void 0) {
|
|
11278
|
+
if (["string", "number", "boolean"].indexOf(typeof h) > -1 && o < i.length - 1)
|
|
11269
11279
|
continue;
|
|
11270
|
-
C +=
|
|
11280
|
+
C += o - C + 1;
|
|
11271
11281
|
break;
|
|
11272
11282
|
}
|
|
11273
11283
|
s = h;
|
|
@@ -11355,12 +11365,12 @@ class G1 {
|
|
|
11355
11365
|
for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
|
|
11356
11366
|
i[s - 1] = arguments[s];
|
|
11357
11367
|
this.observers[e] && Array.from(this.observers[e].entries()).forEach((h) => {
|
|
11358
|
-
let [d,
|
|
11359
|
-
for (let
|
|
11368
|
+
let [d, o] = h;
|
|
11369
|
+
for (let a = 0; a < o; a++)
|
|
11360
11370
|
d(...i);
|
|
11361
11371
|
}), this.observers["*"] && Array.from(this.observers["*"].entries()).forEach((h) => {
|
|
11362
|
-
let [d,
|
|
11363
|
-
for (let
|
|
11372
|
+
let [d, o] = h;
|
|
11373
|
+
for (let a = 0; a < o; a++)
|
|
11364
11374
|
d.apply(d, [e, ...i]);
|
|
11365
11375
|
});
|
|
11366
11376
|
}
|
|
@@ -11385,8 +11395,8 @@ class C2 extends G1 {
|
|
|
11385
11395
|
const C = s.keySeparator !== void 0 ? s.keySeparator : this.options.keySeparator, h = s.ignoreJSONStructure !== void 0 ? s.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
11386
11396
|
let d;
|
|
11387
11397
|
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)));
|
|
11388
|
-
const
|
|
11389
|
-
return !
|
|
11398
|
+
const o = E1(this.data, d);
|
|
11399
|
+
return !o && !t && !i && e.indexOf(".") > -1 && (e = d[0], t = d[1], i = d.slice(2).join(".")), o || !h || !Z(i) ? o : P1(this.data && this.data[e] && this.data[e][t], i, C);
|
|
11390
11400
|
}
|
|
11391
11401
|
addResource(e, t, i, s) {
|
|
11392
11402
|
let C = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {
|
|
@@ -11412,11 +11422,11 @@ class C2 extends G1 {
|
|
|
11412
11422
|
skipCopy: !1
|
|
11413
11423
|
}, d = [e, t];
|
|
11414
11424
|
e.indexOf(".") > -1 && (d = e.split("."), s = i, i = t, t = d[1]), this.addNamespaces(t);
|
|
11415
|
-
let
|
|
11416
|
-
h.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? V2(
|
|
11417
|
-
...
|
|
11425
|
+
let o = E1(this.data, d) || {};
|
|
11426
|
+
h.skipCopy || (i = JSON.parse(JSON.stringify(i))), s ? V2(o, i, C) : o = {
|
|
11427
|
+
...o,
|
|
11418
11428
|
...i
|
|
11419
|
-
}, r2(this.data, d,
|
|
11429
|
+
}, r2(this.data, d, o), h.silent || this.emit("added", e, t, i);
|
|
11420
11430
|
}
|
|
11421
11431
|
removeResourceBundle(e, t) {
|
|
11422
11432
|
this.hasResourceBundle(e, t) && delete this.data[e][t], this.removeNamespaces(t), this.emit("removed", e, t);
|
|
@@ -11476,14 +11486,14 @@ class S1 extends G1 {
|
|
|
11476
11486
|
let C = t.ns || this.options.defaultNS || [];
|
|
11477
11487
|
const h = i && e.indexOf(i) > -1, d = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !X6(e, i, s);
|
|
11478
11488
|
if (h && !d) {
|
|
11479
|
-
const
|
|
11480
|
-
if (
|
|
11489
|
+
const o = e.match(this.interpolator.nestingRegexp);
|
|
11490
|
+
if (o && o.length > 0)
|
|
11481
11491
|
return {
|
|
11482
11492
|
key: e,
|
|
11483
11493
|
namespaces: Z(C) ? [C] : C
|
|
11484
11494
|
};
|
|
11485
|
-
const
|
|
11486
|
-
(i !== s || i === s && this.options.ns.indexOf(
|
|
11495
|
+
const a = e.split(i);
|
|
11496
|
+
(i !== s || i === s && this.options.ns.indexOf(a[0]) > -1) && (C = a.shift()), e = a.join(s);
|
|
11487
11497
|
}
|
|
11488
11498
|
return {
|
|
11489
11499
|
key: e,
|
|
@@ -11498,42 +11508,42 @@ class S1 extends G1 {
|
|
|
11498
11508
|
const s = t.returnDetails !== void 0 ? t.returnDetails : this.options.returnDetails, C = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator, {
|
|
11499
11509
|
key: h,
|
|
11500
11510
|
namespaces: d
|
|
11501
|
-
} = this.extractFromKey(e[e.length - 1], t),
|
|
11502
|
-
if (
|
|
11511
|
+
} = this.extractFromKey(e[e.length - 1], t), o = d[d.length - 1], a = t.lng || this.language, r = t.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;
|
|
11512
|
+
if (a && a.toLowerCase() === "cimode") {
|
|
11503
11513
|
if (r) {
|
|
11504
11514
|
const u = t.nsSeparator || this.options.nsSeparator;
|
|
11505
11515
|
return s ? {
|
|
11506
|
-
res: `${
|
|
11516
|
+
res: `${o}${u}${h}`,
|
|
11507
11517
|
usedKey: h,
|
|
11508
11518
|
exactUsedKey: h,
|
|
11509
|
-
usedLng:
|
|
11510
|
-
usedNS:
|
|
11519
|
+
usedLng: a,
|
|
11520
|
+
usedNS: o,
|
|
11511
11521
|
usedParams: this.getUsedParamsDetails(t)
|
|
11512
|
-
} : `${
|
|
11522
|
+
} : `${o}${u}${h}`;
|
|
11513
11523
|
}
|
|
11514
11524
|
return s ? {
|
|
11515
11525
|
res: h,
|
|
11516
11526
|
usedKey: h,
|
|
11517
11527
|
exactUsedKey: h,
|
|
11518
|
-
usedLng:
|
|
11519
|
-
usedNS:
|
|
11528
|
+
usedLng: a,
|
|
11529
|
+
usedNS: o,
|
|
11520
11530
|
usedParams: this.getUsedParamsDetails(t)
|
|
11521
11531
|
} : h;
|
|
11522
11532
|
}
|
|
11523
|
-
const
|
|
11524
|
-
let w =
|
|
11525
|
-
const
|
|
11533
|
+
const f = this.resolve(e, t);
|
|
11534
|
+
let w = f && f.res;
|
|
11535
|
+
const p = f && f.usedKey || h, k = f && f.exactUsedKey || h, M = Object.prototype.toString.apply(w), v = ["[object Number]", "[object Function]", "[object RegExp]"], A = t.joinArrays !== void 0 ? t.joinArrays : this.options.joinArrays, V = !this.i18nFormat || this.i18nFormat.handleAsObject, D = !Z(w) && typeof w != "boolean" && typeof w != "number";
|
|
11526
11536
|
if (V && w && D && v.indexOf(M) < 0 && !(Z(A) && Array.isArray(w))) {
|
|
11527
11537
|
if (!t.returnObjects && !this.options.returnObjects) {
|
|
11528
11538
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
11529
|
-
const u = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(
|
|
11539
|
+
const u = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(p, w, {
|
|
11530
11540
|
...t,
|
|
11531
11541
|
ns: d
|
|
11532
11542
|
}) : `key '${h} (${this.language})' returned an object instead of string.`;
|
|
11533
|
-
return s ? (
|
|
11543
|
+
return s ? (f.res = u, f.usedParams = this.getUsedParamsDetails(t), f) : u;
|
|
11534
11544
|
}
|
|
11535
11545
|
if (C) {
|
|
11536
|
-
const u = Array.isArray(w), L = u ? [] : {}, x = u ? k :
|
|
11546
|
+
const u = Array.isArray(w), L = u ? [] : {}, x = u ? k : p;
|
|
11537
11547
|
for (const m in w)
|
|
11538
11548
|
if (Object.prototype.hasOwnProperty.call(w, m)) {
|
|
11539
11549
|
const Y = `${x}${C}${m}`;
|
|
@@ -11549,13 +11559,13 @@ class S1 extends G1 {
|
|
|
11549
11559
|
w = w.join(A), w && (w = this.extendTranslation(w, e, t, i));
|
|
11550
11560
|
else {
|
|
11551
11561
|
let u = !1, L = !1;
|
|
11552
|
-
const x = t.count !== void 0 && !Z(t.count), m = S1.hasDefaultValue(t), Y = x ? this.pluralResolver.getSuffix(
|
|
11562
|
+
const x = t.count !== void 0 && !Z(t.count), m = S1.hasDefaultValue(t), Y = x ? this.pluralResolver.getSuffix(a, t.count, t) : "", $ = t.ordinal && x ? this.pluralResolver.getSuffix(a, t.count, {
|
|
11553
11563
|
ordinal: !1
|
|
11554
11564
|
}) : "", Q = x && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), R = Q && t[`defaultValue${this.options.pluralSeparator}zero`] || t[`defaultValue${Y}`] || t[`defaultValue${$}`] || t.defaultValue;
|
|
11555
11565
|
!this.isValidLookup(w) && m && (u = !0, w = R), this.isValidLookup(w) || (L = !0, w = h);
|
|
11556
11566
|
const T = (t.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey) && L ? void 0 : w, P = m && R !== w && this.options.updateMissing;
|
|
11557
11567
|
if (L || u || P) {
|
|
11558
|
-
if (this.logger.log(P ? "updateKey" : "missingKey",
|
|
11568
|
+
if (this.logger.log(P ? "updateKey" : "missingKey", a, o, h, P ? R : w), C) {
|
|
11559
11569
|
const H = this.resolve(h, {
|
|
11560
11570
|
...t,
|
|
11561
11571
|
keySeparator: !1
|
|
@@ -11570,7 +11580,7 @@ class S1 extends G1 {
|
|
|
11570
11580
|
else this.options.saveMissingTo === "all" ? K = this.languageUtils.toResolveHierarchy(t.lng || this.language) : K.push(t.lng || this.language);
|
|
11571
11581
|
const W = (H, _, B) => {
|
|
11572
11582
|
const n1 = m && B !== w ? B : T;
|
|
11573
|
-
this.options.missingKeyHandler ? this.options.missingKeyHandler(H,
|
|
11583
|
+
this.options.missingKeyHandler ? this.options.missingKeyHandler(H, o, _, n1, P, t) : this.backendConnector && this.backendConnector.saveMissing && this.backendConnector.saveMissing(H, o, _, n1, P, t), this.emit("missingKey", H, o, _, w);
|
|
11574
11584
|
};
|
|
11575
11585
|
this.options.saveMissing && (this.options.saveMissingPlurals && x ? K.forEach((H) => {
|
|
11576
11586
|
const _ = this.pluralResolver.getSuffixes(H, t);
|
|
@@ -11579,9 +11589,9 @@ class S1 extends G1 {
|
|
|
11579
11589
|
});
|
|
11580
11590
|
}) : W(K, h, R));
|
|
11581
11591
|
}
|
|
11582
|
-
w = this.extendTranslation(w, e, t,
|
|
11592
|
+
w = this.extendTranslation(w, e, t, f, i), L && w === h && this.options.appendNamespaceToMissingKey && (w = `${o}:${h}`), (L || u) && this.options.parseMissingKeyHandler && (this.options.compatibilityAPI !== "v1" ? w = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${o}:${h}` : h, u ? w : void 0) : w = this.options.parseMissingKeyHandler(w));
|
|
11583
11593
|
}
|
|
11584
|
-
return s ? (
|
|
11594
|
+
return s ? (f.res = w, f.usedParams = this.getUsedParamsDetails(t), f) : w;
|
|
11585
11595
|
}
|
|
11586
11596
|
extendTranslation(e, t, i, s, C) {
|
|
11587
11597
|
var h = this;
|
|
@@ -11600,28 +11610,28 @@ class S1 extends G1 {
|
|
|
11600
11610
|
...i.interpolation
|
|
11601
11611
|
}
|
|
11602
11612
|
});
|
|
11603
|
-
const
|
|
11613
|
+
const a = Z(e) && (i && i.interpolation && i.interpolation.skipOnVariables !== void 0 ? i.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
11604
11614
|
let r;
|
|
11605
|
-
if (
|
|
11615
|
+
if (a) {
|
|
11606
11616
|
const w = e.match(this.interpolator.nestingRegexp);
|
|
11607
11617
|
r = w && w.length;
|
|
11608
11618
|
}
|
|
11609
|
-
let
|
|
11610
|
-
if (this.options.interpolation.defaultVariables && (
|
|
11619
|
+
let f = i.replace && !Z(i.replace) ? i.replace : i;
|
|
11620
|
+
if (this.options.interpolation.defaultVariables && (f = {
|
|
11611
11621
|
...this.options.interpolation.defaultVariables,
|
|
11612
|
-
...
|
|
11613
|
-
}), e = this.interpolator.interpolate(e,
|
|
11614
|
-
const w = e.match(this.interpolator.nestingRegexp),
|
|
11615
|
-
r <
|
|
11622
|
+
...f
|
|
11623
|
+
}), e = this.interpolator.interpolate(e, f, i.lng || this.language || s.usedLng, i), a) {
|
|
11624
|
+
const w = e.match(this.interpolator.nestingRegexp), p = w && w.length;
|
|
11625
|
+
r < p && (i.nest = !1);
|
|
11616
11626
|
}
|
|
11617
11627
|
!i.lng && this.options.compatibilityAPI !== "v1" && s && s.res && (i.lng = this.language || s.usedLng), i.nest !== !1 && (e = this.interpolator.nest(e, function() {
|
|
11618
|
-
for (var w = arguments.length,
|
|
11619
|
-
|
|
11620
|
-
return C && C[0] ===
|
|
11628
|
+
for (var w = arguments.length, p = new Array(w), k = 0; k < w; k++)
|
|
11629
|
+
p[k] = arguments[k];
|
|
11630
|
+
return C && C[0] === p[0] && !i.context ? (h.logger.warn(`It seems you are nesting recursively key: ${p[0]} in key: ${t[0]}`), null) : h.translate(...p, t);
|
|
11621
11631
|
}, i)), i.interpolation && this.interpolator.reset();
|
|
11622
11632
|
}
|
|
11623
|
-
const d = i.postProcess || this.options.postProcess,
|
|
11624
|
-
return e != null &&
|
|
11633
|
+
const d = i.postProcess || this.options.postProcess, o = Z(d) ? [d] : d;
|
|
11634
|
+
return e != null && o && o.length && i.applyPostProcessor !== !1 && (e = R2.handle(o, e, t, this.options && this.options.postProcessPassResolved ? {
|
|
11625
11635
|
i18nResolved: {
|
|
11626
11636
|
...s,
|
|
11627
11637
|
usedParams: this.getUsedParamsDetails(i)
|
|
@@ -11631,14 +11641,14 @@ class S1 extends G1 {
|
|
|
11631
11641
|
}
|
|
11632
11642
|
resolve(e) {
|
|
11633
11643
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i, s, C, h, d;
|
|
11634
|
-
return Z(e) && (e = [e]), e.forEach((
|
|
11644
|
+
return Z(e) && (e = [e]), e.forEach((o) => {
|
|
11635
11645
|
if (this.isValidLookup(i)) return;
|
|
11636
|
-
const
|
|
11646
|
+
const a = this.extractFromKey(o, t), r = a.key;
|
|
11637
11647
|
s = r;
|
|
11638
|
-
let
|
|
11639
|
-
this.options.fallbackNS && (
|
|
11640
|
-
const w = t.count !== void 0 && !Z(t.count),
|
|
11641
|
-
|
|
11648
|
+
let f = a.namespaces;
|
|
11649
|
+
this.options.fallbackNS && (f = f.concat(this.options.fallbackNS));
|
|
11650
|
+
const w = t.count !== void 0 && !Z(t.count), p = w && !t.ordinal && t.count === 0 && this.pluralResolver.shouldUseIntlApi(), k = 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);
|
|
11651
|
+
f.forEach((v) => {
|
|
11642
11652
|
this.isValidLookup(i) || (d = v, !h2[`${M[0]}-${v}`] && this.utils && this.utils.hasLoadedNamespace && !this.utils.hasLoadedNamespace(d) && (h2[`${M[0]}-${v}`] = !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((A) => {
|
|
11643
11653
|
if (this.isValidLookup(i)) return;
|
|
11644
11654
|
h = A;
|
|
@@ -11649,9 +11659,9 @@ class S1 extends G1 {
|
|
|
11649
11659
|
let u;
|
|
11650
11660
|
w && (u = this.pluralResolver.getSuffix(A, t.count, t));
|
|
11651
11661
|
const L = `${this.options.pluralSeparator}zero`, x = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;
|
|
11652
|
-
if (w && (V.push(r + u), t.ordinal && u.indexOf(x) === 0 && V.push(r + u.replace(x, this.options.pluralSeparator)),
|
|
11662
|
+
if (w && (V.push(r + u), t.ordinal && u.indexOf(x) === 0 && V.push(r + u.replace(x, this.options.pluralSeparator)), p && V.push(r + L)), k) {
|
|
11653
11663
|
const m = `${r}${this.options.contextSeparator}${t.context}`;
|
|
11654
|
-
V.push(m), w && (V.push(m + u), t.ordinal && u.indexOf(x) === 0 && V.push(m + u.replace(x, this.options.pluralSeparator)),
|
|
11664
|
+
V.push(m), w && (V.push(m + u), t.ordinal && u.indexOf(x) === 0 && V.push(m + u.replace(x, this.options.pluralSeparator)), p && V.push(m + L));
|
|
11655
11665
|
}
|
|
11656
11666
|
}
|
|
11657
11667
|
let D;
|
|
@@ -11925,8 +11935,8 @@ class o8 {
|
|
|
11925
11935
|
});
|
|
11926
11936
|
} catch {
|
|
11927
11937
|
if (!e.match(/-|_/)) return;
|
|
11928
|
-
const
|
|
11929
|
-
h = this.getRule(
|
|
11938
|
+
const o = this.languageUtils.getLanguagePartFromCode(e);
|
|
11939
|
+
h = this.getRule(o, t);
|
|
11930
11940
|
}
|
|
11931
11941
|
return this.pluralRulesCache[C] = h, h;
|
|
11932
11942
|
}
|
|
@@ -11983,19 +11993,19 @@ class a8 {
|
|
|
11983
11993
|
prefix: C,
|
|
11984
11994
|
prefixEscaped: h,
|
|
11985
11995
|
suffix: d,
|
|
11986
|
-
suffixEscaped:
|
|
11987
|
-
formatSeparator:
|
|
11996
|
+
suffixEscaped: o,
|
|
11997
|
+
formatSeparator: a,
|
|
11988
11998
|
unescapeSuffix: r,
|
|
11989
|
-
unescapePrefix:
|
|
11999
|
+
unescapePrefix: f,
|
|
11990
12000
|
nestingPrefix: w,
|
|
11991
|
-
nestingPrefixEscaped:
|
|
12001
|
+
nestingPrefixEscaped: p,
|
|
11992
12002
|
nestingSuffix: k,
|
|
11993
12003
|
nestingSuffixEscaped: M,
|
|
11994
12004
|
nestingOptionsSeparator: v,
|
|
11995
12005
|
maxReplaces: A,
|
|
11996
12006
|
alwaysFormat: V
|
|
11997
12007
|
} = e.interpolation;
|
|
11998
|
-
this.escape = t !== void 0 ? t : z6, 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) :
|
|
12008
|
+
this.escape = t !== void 0 ? t : z6, 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) : p || f1("$t("), this.nestingSuffix = k ? f1(k) : M || f1(")"), this.nestingOptionsSeparator = v || ",", this.maxReplaces = A || 1e3, this.alwaysFormat = V !== void 0 ? V : !1, this.resetRegExp();
|
|
11999
12009
|
}
|
|
12000
12010
|
reset() {
|
|
12001
12011
|
this.options && this.init(this.options);
|
|
@@ -12006,83 +12016,83 @@ class a8 {
|
|
|
12006
12016
|
}
|
|
12007
12017
|
interpolate(e, t, i, s) {
|
|
12008
12018
|
let C, h, d;
|
|
12009
|
-
const
|
|
12010
|
-
if (
|
|
12011
|
-
const A = g2(t,
|
|
12019
|
+
const o = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {}, a = (p) => {
|
|
12020
|
+
if (p.indexOf(this.formatSeparator) < 0) {
|
|
12021
|
+
const A = g2(t, o, p, this.options.keySeparator, this.options.ignoreJSONStructure);
|
|
12012
12022
|
return this.alwaysFormat ? this.format(A, void 0, i, {
|
|
12013
12023
|
...s,
|
|
12014
12024
|
...t,
|
|
12015
|
-
interpolationkey:
|
|
12025
|
+
interpolationkey: p
|
|
12016
12026
|
}) : A;
|
|
12017
12027
|
}
|
|
12018
|
-
const k =
|
|
12019
|
-
return this.format(g2(t,
|
|
12028
|
+
const k = p.split(this.formatSeparator), M = k.shift().trim(), v = k.join(this.formatSeparator).trim();
|
|
12029
|
+
return this.format(g2(t, o, M, this.options.keySeparator, this.options.ignoreJSONStructure), v, i, {
|
|
12020
12030
|
...s,
|
|
12021
12031
|
...t,
|
|
12022
12032
|
interpolationkey: M
|
|
12023
12033
|
});
|
|
12024
12034
|
};
|
|
12025
12035
|
this.resetRegExp();
|
|
12026
|
-
const r = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler,
|
|
12036
|
+
const r = s && s.missingInterpolationHandler || this.options.missingInterpolationHandler, f = s && s.interpolation && s.interpolation.skipOnVariables !== void 0 ? s.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;
|
|
12027
12037
|
return [{
|
|
12028
12038
|
regex: this.regexpUnescape,
|
|
12029
|
-
safeValue: (
|
|
12039
|
+
safeValue: (p) => O1(p)
|
|
12030
12040
|
}, {
|
|
12031
12041
|
regex: this.regexp,
|
|
12032
|
-
safeValue: (
|
|
12033
|
-
}].forEach((
|
|
12034
|
-
for (d = 0; C =
|
|
12042
|
+
safeValue: (p) => this.escapeValue ? O1(this.escape(p)) : O1(p)
|
|
12043
|
+
}].forEach((p) => {
|
|
12044
|
+
for (d = 0; C = p.regex.exec(e); ) {
|
|
12035
12045
|
const k = C[1].trim();
|
|
12036
|
-
if (h =
|
|
12046
|
+
if (h = a(k), h === void 0)
|
|
12037
12047
|
if (typeof r == "function") {
|
|
12038
12048
|
const v = r(e, C, s);
|
|
12039
12049
|
h = Z(v) ? v : "";
|
|
12040
12050
|
} else if (s && Object.prototype.hasOwnProperty.call(s, k))
|
|
12041
12051
|
h = "";
|
|
12042
|
-
else if (
|
|
12052
|
+
else if (f) {
|
|
12043
12053
|
h = C[0];
|
|
12044
12054
|
continue;
|
|
12045
12055
|
} else
|
|
12046
12056
|
this.logger.warn(`missed to pass in variable ${k} for interpolating ${e}`), h = "";
|
|
12047
12057
|
else !Z(h) && !this.useRawValueToEscape && (h = n2(h));
|
|
12048
|
-
const M =
|
|
12049
|
-
if (e = e.replace(C[0], M),
|
|
12058
|
+
const M = p.safeValue(h);
|
|
12059
|
+
if (e = e.replace(C[0], M), f ? (p.regex.lastIndex += h.length, p.regex.lastIndex -= C[0].length) : p.regex.lastIndex = 0, d++, d >= this.maxReplaces)
|
|
12050
12060
|
break;
|
|
12051
12061
|
}
|
|
12052
12062
|
}), e;
|
|
12053
12063
|
}
|
|
12054
12064
|
nest(e, t) {
|
|
12055
12065
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, C, h;
|
|
12056
|
-
const d = (
|
|
12066
|
+
const d = (o, a) => {
|
|
12057
12067
|
const r = this.nestingOptionsSeparator;
|
|
12058
|
-
if (
|
|
12059
|
-
const
|
|
12060
|
-
let w = `{${
|
|
12061
|
-
|
|
12062
|
-
const
|
|
12063
|
-
(
|
|
12068
|
+
if (o.indexOf(r) < 0) return o;
|
|
12069
|
+
const f = o.split(new RegExp(`${r}[ ]*{`));
|
|
12070
|
+
let w = `{${f[1]}`;
|
|
12071
|
+
o = f[0], w = this.interpolate(w, h);
|
|
12072
|
+
const p = w.match(/'/g), k = w.match(/"/g);
|
|
12073
|
+
(p && p.length % 2 === 0 && !k || k.length % 2 !== 0) && (w = w.replace(/'/g, '"'));
|
|
12064
12074
|
try {
|
|
12065
|
-
h = JSON.parse(w),
|
|
12066
|
-
...
|
|
12075
|
+
h = JSON.parse(w), a && (h = {
|
|
12076
|
+
...a,
|
|
12067
12077
|
...h
|
|
12068
12078
|
});
|
|
12069
12079
|
} catch (M) {
|
|
12070
|
-
return this.logger.warn(`failed parsing options string in nesting for key ${
|
|
12080
|
+
return this.logger.warn(`failed parsing options string in nesting for key ${o}`, M), `${o}${r}${w}`;
|
|
12071
12081
|
}
|
|
12072
|
-
return h.defaultValue && h.defaultValue.indexOf(this.prefix) > -1 && delete h.defaultValue,
|
|
12082
|
+
return h.defaultValue && h.defaultValue.indexOf(this.prefix) > -1 && delete h.defaultValue, o;
|
|
12073
12083
|
};
|
|
12074
12084
|
for (; s = this.nestingRegexp.exec(e); ) {
|
|
12075
|
-
let
|
|
12085
|
+
let o = [];
|
|
12076
12086
|
h = {
|
|
12077
12087
|
...i
|
|
12078
12088
|
}, h = h.replace && !Z(h.replace) ? h.replace : h, h.applyPostProcessor = !1, delete h.defaultValue;
|
|
12079
|
-
let
|
|
12089
|
+
let a = !1;
|
|
12080
12090
|
if (s[0].indexOf(this.formatSeparator) !== -1 && !/{.*}/.test(s[1])) {
|
|
12081
|
-
const r = s[1].split(this.formatSeparator).map((
|
|
12082
|
-
s[1] = r.shift(),
|
|
12091
|
+
const r = s[1].split(this.formatSeparator).map((f) => f.trim());
|
|
12092
|
+
s[1] = r.shift(), o = r, a = !0;
|
|
12083
12093
|
}
|
|
12084
12094
|
if (C = t(d.call(this, s[1].trim(), h), h), C && s[0] === e && !Z(C)) return C;
|
|
12085
|
-
Z(C) || (C = n2(C)), C || (this.logger.warn(`missed to resolve ${s[1]} for nesting ${e}`), C = ""),
|
|
12095
|
+
Z(C) || (C = n2(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, {
|
|
12086
12096
|
...i,
|
|
12087
12097
|
interpolationkey: s[1].trim()
|
|
12088
12098
|
}), C.trim())), e = e.replace(s[0], C), this.regexp.lastIndex = 0;
|
|
@@ -12099,8 +12109,8 @@ const r8 = (l) => {
|
|
|
12099
12109
|
const s = i[1].substring(0, i[1].length - 1);
|
|
12100
12110
|
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) => {
|
|
12101
12111
|
if (h) {
|
|
12102
|
-
const [d, ...
|
|
12103
|
-
t[r] || (t[r] =
|
|
12112
|
+
const [d, ...o] = h.split(":"), a = o.join(":").trim().replace(/^'+|'+$/g, ""), r = d.trim();
|
|
12113
|
+
t[r] || (t[r] = a), a === "false" && (t[r] = !1), a === "true" && (t[r] = !0), isNaN(a) || (t[r] = parseInt(a, 10));
|
|
12104
12114
|
}
|
|
12105
12115
|
});
|
|
12106
12116
|
}
|
|
@@ -12174,19 +12184,19 @@ class C8 {
|
|
|
12174
12184
|
let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
|
|
12175
12185
|
const C = t.split(this.formatSeparator);
|
|
12176
12186
|
if (C.length > 1 && C[0].indexOf("(") > 1 && C[0].indexOf(")") < 0 && C.find((d) => d.indexOf(")") > -1)) {
|
|
12177
|
-
const d = C.findIndex((
|
|
12187
|
+
const d = C.findIndex((o) => o.indexOf(")") > -1);
|
|
12178
12188
|
C[0] = [C[0], ...C.splice(1, d)].join(this.formatSeparator);
|
|
12179
12189
|
}
|
|
12180
|
-
return C.reduce((d,
|
|
12190
|
+
return C.reduce((d, o) => {
|
|
12181
12191
|
const {
|
|
12182
|
-
formatName:
|
|
12192
|
+
formatName: a,
|
|
12183
12193
|
formatOptions: r
|
|
12184
|
-
} = r8(
|
|
12185
|
-
if (this.formats[
|
|
12186
|
-
let
|
|
12194
|
+
} = r8(o);
|
|
12195
|
+
if (this.formats[a]) {
|
|
12196
|
+
let f = d;
|
|
12187
12197
|
try {
|
|
12188
|
-
const w = s && s.formatParams && s.formatParams[s.interpolationkey] || {},
|
|
12189
|
-
|
|
12198
|
+
const w = s && s.formatParams && s.formatParams[s.interpolationkey] || {}, p = w.locale || w.lng || s.locale || s.lng || i;
|
|
12199
|
+
f = this.formats[a](d, p, {
|
|
12190
12200
|
...r,
|
|
12191
12201
|
...s,
|
|
12192
12202
|
...w
|
|
@@ -12194,9 +12204,9 @@ class C8 {
|
|
|
12194
12204
|
} catch (w) {
|
|
12195
12205
|
this.logger.warn(w);
|
|
12196
12206
|
}
|
|
12197
|
-
return
|
|
12207
|
+
return f;
|
|
12198
12208
|
} else
|
|
12199
|
-
this.logger.warn(`there was no format function for ${
|
|
12209
|
+
this.logger.warn(`there was no format function for ${a}`);
|
|
12200
12210
|
return d;
|
|
12201
12211
|
}, e);
|
|
12202
12212
|
}
|
|
@@ -12210,13 +12220,13 @@ class c8 extends G1 {
|
|
|
12210
12220
|
super(), this.backend = e, this.store = t, this.services = i, this.languageUtils = i.languageUtils, this.options = s, this.logger = t1.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);
|
|
12211
12221
|
}
|
|
12212
12222
|
queueLoad(e, t, i, s) {
|
|
12213
|
-
const C = {}, h = {}, d = {},
|
|
12214
|
-
return e.forEach((
|
|
12223
|
+
const C = {}, h = {}, d = {}, o = {};
|
|
12224
|
+
return e.forEach((a) => {
|
|
12215
12225
|
let r = !0;
|
|
12216
|
-
t.forEach((
|
|
12217
|
-
const w = `${
|
|
12218
|
-
!i.reload && this.store.hasResourceBundle(
|
|
12219
|
-
}), r || (d[
|
|
12226
|
+
t.forEach((f) => {
|
|
12227
|
+
const w = `${a}|${f}`;
|
|
12228
|
+
!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)));
|
|
12229
|
+
}), r || (d[a] = !0);
|
|
12220
12230
|
}), (Object.keys(C).length || Object.keys(h).length) && this.queue.push({
|
|
12221
12231
|
pending: h,
|
|
12222
12232
|
pendingCount: Object.keys(h).length,
|
|
@@ -12227,7 +12237,7 @@ class c8 extends G1 {
|
|
|
12227
12237
|
toLoad: Object.keys(C),
|
|
12228
12238
|
pending: Object.keys(h),
|
|
12229
12239
|
toLoadLanguages: Object.keys(d),
|
|
12230
|
-
toLoadNamespaces: Object.keys(
|
|
12240
|
+
toLoadNamespaces: Object.keys(o)
|
|
12231
12241
|
};
|
|
12232
12242
|
}
|
|
12233
12243
|
loaded(e, t, i) {
|
|
@@ -12236,15 +12246,15 @@ class c8 extends G1 {
|
|
|
12236
12246
|
skipCopy: !0
|
|
12237
12247
|
}), this.state[e] = t ? -1 : 2, t && i && (this.state[e] = 0);
|
|
12238
12248
|
const d = {};
|
|
12239
|
-
this.queue.forEach((
|
|
12240
|
-
F6(
|
|
12241
|
-
d[
|
|
12242
|
-
const r =
|
|
12243
|
-
r.length && r.forEach((
|
|
12244
|
-
d[
|
|
12249
|
+
this.queue.forEach((o) => {
|
|
12250
|
+
F6(o.loaded, [C], h), h8(o, e), t && o.errors.push(t), o.pendingCount === 0 && !o.done && (Object.keys(o.loaded).forEach((a) => {
|
|
12251
|
+
d[a] || (d[a] = {});
|
|
12252
|
+
const r = o.loaded[a];
|
|
12253
|
+
r.length && r.forEach((f) => {
|
|
12254
|
+
d[a][f] === void 0 && (d[a][f] = !0);
|
|
12245
12255
|
});
|
|
12246
|
-
}),
|
|
12247
|
-
}), this.emit("loaded", d), this.queue = this.queue.filter((
|
|
12256
|
+
}), o.done = !0, o.errors.length ? o.callback(o.errors) : o.callback());
|
|
12257
|
+
}), this.emit("loaded", d), this.queue = this.queue.filter((o) => !o.done);
|
|
12248
12258
|
}
|
|
12249
12259
|
read(e, t, i) {
|
|
12250
12260
|
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;
|
|
@@ -12261,29 +12271,29 @@ class c8 extends G1 {
|
|
|
12261
12271
|
return;
|
|
12262
12272
|
}
|
|
12263
12273
|
this.readingCalls++;
|
|
12264
|
-
const d = (
|
|
12274
|
+
const d = (a, r) => {
|
|
12265
12275
|
if (this.readingCalls--, this.waitingReads.length > 0) {
|
|
12266
|
-
const
|
|
12267
|
-
this.read(
|
|
12276
|
+
const f = this.waitingReads.shift();
|
|
12277
|
+
this.read(f.lng, f.ns, f.fcName, f.tried, f.wait, f.callback);
|
|
12268
12278
|
}
|
|
12269
|
-
if (
|
|
12279
|
+
if (a && r && s < this.maxRetries) {
|
|
12270
12280
|
setTimeout(() => {
|
|
12271
12281
|
this.read.call(this, e, t, i, s + 1, C * 2, h);
|
|
12272
12282
|
}, C);
|
|
12273
12283
|
return;
|
|
12274
12284
|
}
|
|
12275
|
-
h(
|
|
12276
|
-
},
|
|
12277
|
-
if (
|
|
12285
|
+
h(a, r);
|
|
12286
|
+
}, o = this.backend[i].bind(this.backend);
|
|
12287
|
+
if (o.length === 2) {
|
|
12278
12288
|
try {
|
|
12279
|
-
const
|
|
12280
|
-
|
|
12281
|
-
} catch (
|
|
12282
|
-
d(
|
|
12289
|
+
const a = o(e, t);
|
|
12290
|
+
a && typeof a.then == "function" ? a.then((r) => d(null, r)).catch(d) : d(null, a);
|
|
12291
|
+
} catch (a) {
|
|
12292
|
+
d(a);
|
|
12283
12293
|
}
|
|
12284
12294
|
return;
|
|
12285
12295
|
}
|
|
12286
|
-
return
|
|
12296
|
+
return o(e, t, d);
|
|
12287
12297
|
}
|
|
12288
12298
|
prepareLoading(e, t) {
|
|
12289
12299
|
let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s = arguments.length > 3 ? arguments[3] : void 0;
|
|
@@ -12321,19 +12331,19 @@ class c8 extends G1 {
|
|
|
12321
12331
|
}
|
|
12322
12332
|
if (!(i == null || i === "")) {
|
|
12323
12333
|
if (this.backend && this.backend.create) {
|
|
12324
|
-
const
|
|
12334
|
+
const o = {
|
|
12325
12335
|
...h,
|
|
12326
12336
|
isUpdate: C
|
|
12327
|
-
},
|
|
12328
|
-
if (
|
|
12337
|
+
}, a = this.backend.create.bind(this.backend);
|
|
12338
|
+
if (a.length < 6)
|
|
12329
12339
|
try {
|
|
12330
12340
|
let r;
|
|
12331
|
-
|
|
12341
|
+
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);
|
|
12332
12342
|
} catch (r) {
|
|
12333
12343
|
d(r);
|
|
12334
12344
|
}
|
|
12335
12345
|
else
|
|
12336
|
-
|
|
12346
|
+
a(e, t, i, s, d, o);
|
|
12337
12347
|
}
|
|
12338
12348
|
!e || !e[0] || this.store.addResource(e[0], t, i, s);
|
|
12339
12349
|
}
|
|
@@ -12432,25 +12442,25 @@ class k1 extends G1 {
|
|
|
12432
12442
|
this.modules.logger ? t1.init(C(this.modules.logger), this.options) : t1.init(null, this.options);
|
|
12433
12443
|
let r;
|
|
12434
12444
|
this.modules.formatter ? r = this.modules.formatter : typeof Intl < "u" && (r = C8);
|
|
12435
|
-
const
|
|
12445
|
+
const f = new c2(this.options);
|
|
12436
12446
|
this.store = new C2(this.options.resources, this.options);
|
|
12437
12447
|
const w = this.services;
|
|
12438
|
-
w.logger = t1, w.resourceStore = this.store, w.languageUtils =
|
|
12448
|
+
w.logger = t1, w.resourceStore = this.store, w.languageUtils = f, w.pluralResolver = new o8(f, {
|
|
12439
12449
|
prepend: this.options.pluralSeparator,
|
|
12440
12450
|
compatibilityJSON: this.options.compatibilityJSON,
|
|
12441
12451
|
simplifyPluralSuffix: this.options.simplifyPluralSuffix
|
|
12442
12452
|
}), 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 a8(this.options), w.utils = {
|
|
12443
12453
|
hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
|
|
12444
|
-
}, w.backendConnector = new c8(C(this.modules.backend), w.resourceStore, w, this.options), w.backendConnector.on("*", function(
|
|
12454
|
+
}, w.backendConnector = new c8(C(this.modules.backend), w.resourceStore, w, this.options), w.backendConnector.on("*", function(p) {
|
|
12445
12455
|
for (var k = arguments.length, M = new Array(k > 1 ? k - 1 : 0), v = 1; v < k; v++)
|
|
12446
12456
|
M[v - 1] = arguments[v];
|
|
12447
|
-
e.emit(
|
|
12448
|
-
}), 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 S1(this.services, this.options), this.translator.on("*", function(
|
|
12457
|
+
e.emit(p, ...M);
|
|
12458
|
+
}), 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 S1(this.services, this.options), this.translator.on("*", function(p) {
|
|
12449
12459
|
for (var k = arguments.length, M = new Array(k > 1 ? k - 1 : 0), v = 1; v < k; v++)
|
|
12450
12460
|
M[v - 1] = arguments[v];
|
|
12451
|
-
e.emit(
|
|
12452
|
-
}), this.modules.external.forEach((
|
|
12453
|
-
|
|
12461
|
+
e.emit(p, ...M);
|
|
12462
|
+
}), this.modules.external.forEach((p) => {
|
|
12463
|
+
p.init && p.init(this);
|
|
12454
12464
|
});
|
|
12455
12465
|
}
|
|
12456
12466
|
if (this.format = this.options.interpolation.format, i || (i = y1), this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {
|
|
@@ -12466,14 +12476,14 @@ class k1 extends G1 {
|
|
|
12466
12476
|
return e.store[r](...arguments), e;
|
|
12467
12477
|
};
|
|
12468
12478
|
});
|
|
12469
|
-
const
|
|
12470
|
-
const r = (
|
|
12471
|
-
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),
|
|
12479
|
+
const o = L1(), a = () => {
|
|
12480
|
+
const r = (f, w) => {
|
|
12481
|
+
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);
|
|
12472
12482
|
};
|
|
12473
12483
|
if (this.languages && this.options.compatibilityAPI !== "v1" && !this.isInitialized) return r(null, this.t.bind(this));
|
|
12474
12484
|
this.changeLanguage(this.options.lng, r);
|
|
12475
12485
|
};
|
|
12476
|
-
return this.options.resources || !this.options.initImmediate ?
|
|
12486
|
+
return this.options.resources || !this.options.initImmediate ? a() : setTimeout(a, 0), o;
|
|
12477
12487
|
}
|
|
12478
12488
|
loadResources(e) {
|
|
12479
12489
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : y1;
|
|
@@ -12482,11 +12492,11 @@ class k1 extends G1 {
|
|
|
12482
12492
|
if (s && s.toLowerCase() === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return i();
|
|
12483
12493
|
const C = [], h = (d) => {
|
|
12484
12494
|
if (!d || d === "cimode") return;
|
|
12485
|
-
this.services.languageUtils.toResolveHierarchy(d).forEach((
|
|
12486
|
-
|
|
12495
|
+
this.services.languageUtils.toResolveHierarchy(d).forEach((a) => {
|
|
12496
|
+
a !== "cimode" && C.indexOf(a) < 0 && C.push(a);
|
|
12487
12497
|
});
|
|
12488
12498
|
};
|
|
12489
|
-
s ? h(s) : this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((
|
|
12499
|
+
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) => {
|
|
12490
12500
|
!d && !this.resolvedLanguage && this.language && this.setResolvedLanguage(this.language), i(d);
|
|
12491
12501
|
});
|
|
12492
12502
|
} else
|
|
@@ -12518,19 +12528,19 @@ class k1 extends G1 {
|
|
|
12518
12528
|
this.isLanguageChangingTo = e;
|
|
12519
12529
|
const s = L1();
|
|
12520
12530
|
this.emit("languageChanging", e);
|
|
12521
|
-
const C = (
|
|
12522
|
-
this.language =
|
|
12523
|
-
}, h = (
|
|
12524
|
-
|
|
12531
|
+
const C = (o) => {
|
|
12532
|
+
this.language = o, this.languages = this.services.languageUtils.toResolveHierarchy(o), this.resolvedLanguage = void 0, this.setResolvedLanguage(o);
|
|
12533
|
+
}, h = (o, a) => {
|
|
12534
|
+
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() {
|
|
12525
12535
|
return i.t(...arguments);
|
|
12526
|
-
}), t && t(
|
|
12536
|
+
}), t && t(o, function() {
|
|
12527
12537
|
return i.t(...arguments);
|
|
12528
12538
|
});
|
|
12529
|
-
}, d = (
|
|
12530
|
-
!e && !
|
|
12531
|
-
const
|
|
12532
|
-
|
|
12533
|
-
h(r,
|
|
12539
|
+
}, d = (o) => {
|
|
12540
|
+
!e && !o && this.services.languageDetector && (o = []);
|
|
12541
|
+
const a = Z(o) ? o : this.services.languageUtils.getBestMatchFromCodes(o);
|
|
12542
|
+
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) => {
|
|
12543
|
+
h(r, a);
|
|
12534
12544
|
});
|
|
12535
12545
|
};
|
|
12536
12546
|
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;
|
|
@@ -12538,19 +12548,19 @@ class k1 extends G1 {
|
|
|
12538
12548
|
getFixedT(e, t, i) {
|
|
12539
12549
|
var s = this;
|
|
12540
12550
|
const C = function(h, d) {
|
|
12541
|
-
let
|
|
12551
|
+
let o;
|
|
12542
12552
|
if (typeof d != "object") {
|
|
12543
|
-
for (var
|
|
12544
|
-
r[
|
|
12545
|
-
|
|
12553
|
+
for (var a = arguments.length, r = new Array(a > 2 ? a - 2 : 0), f = 2; f < a; f++)
|
|
12554
|
+
r[f - 2] = arguments[f];
|
|
12555
|
+
o = s.options.overloadTranslationOptionHandler([h, d].concat(r));
|
|
12546
12556
|
} else
|
|
12547
|
-
|
|
12557
|
+
o = {
|
|
12548
12558
|
...d
|
|
12549
12559
|
};
|
|
12550
|
-
|
|
12560
|
+
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);
|
|
12551
12561
|
const w = s.options.keySeparator || ".";
|
|
12552
|
-
let
|
|
12553
|
-
return
|
|
12562
|
+
let p;
|
|
12563
|
+
return o.keyPrefix && Array.isArray(h) ? p = h.map((k) => `${o.keyPrefix}${w}${k}`) : p = o.keyPrefix ? `${o.keyPrefix}${w}${h}` : h, s.t(p, o);
|
|
12554
12564
|
};
|
|
12555
12565
|
return Z(e) ? C.lng = e : C.lngs = e, C.ns = t, C.keyPrefix = i, C;
|
|
12556
12566
|
}
|
|
@@ -12571,9 +12581,9 @@ class k1 extends G1 {
|
|
|
12571
12581
|
return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty", this.languages), !1;
|
|
12572
12582
|
const i = t.lng || this.resolvedLanguage || this.languages[0], s = this.options ? this.options.fallbackLng : !1, C = this.languages[this.languages.length - 1];
|
|
12573
12583
|
if (i.toLowerCase() === "cimode") return !0;
|
|
12574
|
-
const h = (d,
|
|
12575
|
-
const
|
|
12576
|
-
return
|
|
12584
|
+
const h = (d, o) => {
|
|
12585
|
+
const a = this.services.backendConnector.state[`${d}|${o}`];
|
|
12586
|
+
return a === -1 || a === 0 || a === 2;
|
|
12577
12587
|
};
|
|
12578
12588
|
if (t.precheck) {
|
|
12579
12589
|
const d = t.precheck(this, h);
|
|
@@ -12622,9 +12632,9 @@ class k1 extends G1 {
|
|
|
12622
12632
|
}, C.services.utils = {
|
|
12623
12633
|
hasLoadedNamespace: C.hasLoadedNamespace.bind(C)
|
|
12624
12634
|
}, i && (C.store = new C2(this.store.data, s), C.services.resourceStore = C.store), C.translator = new S1(C.services, s), C.translator.on("*", function(d) {
|
|
12625
|
-
for (var
|
|
12626
|
-
|
|
12627
|
-
C.emit(d, ...
|
|
12635
|
+
for (var o = arguments.length, a = new Array(o > 1 ? o - 1 : 0), r = 1; r < o; r++)
|
|
12636
|
+
a[r - 1] = arguments[r];
|
|
12637
|
+
C.emit(d, ...a);
|
|
12628
12638
|
}), C.init(s, t), C.translator.options = s, C.translator.backendConnector.services.utils = {
|
|
12629
12639
|
hasLoadedNamespace: C.hasLoadedNamespace.bind(C)
|
|
12630
12640
|
}, C;
|
|
@@ -12684,13 +12694,13 @@ const Z8 = a1(
|
|
|
12684
12694
|
onChange: C,
|
|
12685
12695
|
onError: h,
|
|
12686
12696
|
emptyOptionLabel: d,
|
|
12687
|
-
showAvatar:
|
|
12688
|
-
clearable:
|
|
12697
|
+
showAvatar: o = !1,
|
|
12698
|
+
clearable: a,
|
|
12689
12699
|
required: r,
|
|
12690
|
-
error:
|
|
12700
|
+
error: f
|
|
12691
12701
|
}, w) => {
|
|
12692
|
-
const { axiosPeople:
|
|
12693
|
-
if (h1(w, () => L.current), !
|
|
12702
|
+
const { axiosPeople: p, locale: k } = s1(c1), { t: M } = T6("common", { lng: k }), [v, A] = S([]), [V, D] = S(!0), u = J(v), L = J(null);
|
|
12703
|
+
if (h1(w, () => L.current), !p)
|
|
12694
12704
|
throw new Error(
|
|
12695
12705
|
`UserSelect requires "axiosPeople" to fetch users.
|
|
12696
12706
|
Please provide it via SNMTUiContext.`
|
|
@@ -12709,7 +12719,7 @@ const Z8 = a1(
|
|
|
12709
12719
|
}) => {
|
|
12710
12720
|
var P, K, O;
|
|
12711
12721
|
try {
|
|
12712
|
-
const W = await
|
|
12722
|
+
const W = await p.post("v1/users/search", {
|
|
12713
12723
|
offset: R,
|
|
12714
12724
|
limit: G,
|
|
12715
12725
|
search: T,
|
|
@@ -12720,7 +12730,7 @@ const Z8 = a1(
|
|
|
12720
12730
|
options: H.map((B) => ({
|
|
12721
12731
|
value: B.id,
|
|
12722
12732
|
label: x(B),
|
|
12723
|
-
image:
|
|
12733
|
+
image: o ? B.avatarUrl : void 0,
|
|
12724
12734
|
imageFallbackText: B.avatarUrl ? "" : p2(`${B.firstName} ${B.lastName}`)
|
|
12725
12735
|
})),
|
|
12726
12736
|
count: _.count
|
|
@@ -12735,7 +12745,7 @@ const Z8 = a1(
|
|
|
12735
12745
|
};
|
|
12736
12746
|
}
|
|
12737
12747
|
},
|
|
12738
|
-
[
|
|
12748
|
+
[p, l, x, o, h]
|
|
12739
12749
|
), Y = y(
|
|
12740
12750
|
async (R) => {
|
|
12741
12751
|
var G, T, P;
|
|
@@ -12744,7 +12754,7 @@ const Z8 = a1(
|
|
|
12744
12754
|
(H) => !u.current.some((_) => _.value === H)
|
|
12745
12755
|
);
|
|
12746
12756
|
let O = [];
|
|
12747
|
-
K.length && (O = (await
|
|
12757
|
+
K.length && (O = (await p.post("v1/users/search", {
|
|
12748
12758
|
filters: {
|
|
12749
12759
|
id: K,
|
|
12750
12760
|
status: [A1.ACTIVE, A1.ARCHIVED]
|
|
@@ -12753,7 +12763,7 @@ const Z8 = a1(
|
|
|
12753
12763
|
const W = O.map((H) => ({
|
|
12754
12764
|
value: H.id,
|
|
12755
12765
|
label: x(H),
|
|
12756
|
-
image:
|
|
12766
|
+
image: o ? H.avatarUrl : void 0,
|
|
12757
12767
|
imageFallbackText: H.avatarUrl ? "" : p2(`${H.firstName} ${H.lastName}`)
|
|
12758
12768
|
}));
|
|
12759
12769
|
return [...u.current, ...W];
|
|
@@ -12764,7 +12774,7 @@ const Z8 = a1(
|
|
|
12764
12774
|
}), [];
|
|
12765
12775
|
}
|
|
12766
12776
|
},
|
|
12767
|
-
[
|
|
12777
|
+
[p, x, h, o]
|
|
12768
12778
|
);
|
|
12769
12779
|
F(() => {
|
|
12770
12780
|
u.current = v;
|
|
@@ -12807,9 +12817,9 @@ const Z8 = a1(
|
|
|
12807
12817
|
ref: L,
|
|
12808
12818
|
placeholder: t,
|
|
12809
12819
|
disabled: i,
|
|
12810
|
-
clearable:
|
|
12820
|
+
clearable: a,
|
|
12811
12821
|
required: r,
|
|
12812
|
-
error:
|
|
12822
|
+
error: f
|
|
12813
12823
|
};
|
|
12814
12824
|
return e && e !== "single" ? /* @__PURE__ */ n(
|
|
12815
12825
|
t2,
|
|
@@ -12839,8 +12849,8 @@ const Z8 = a1(
|
|
|
12839
12849
|
var t, i, s, C;
|
|
12840
12850
|
let e = "";
|
|
12841
12851
|
if (l) {
|
|
12842
|
-
const h = l.trim().split(" ").filter(Boolean), d = ((i = (t = h[0]) == null ? void 0 : t[0]) == null ? void 0 : i.toUpperCase()) ?? "",
|
|
12843
|
-
e = `${d}${
|
|
12852
|
+
const h = l.trim().split(" ").filter(Boolean), d = ((i = (t = h[0]) == null ? void 0 : t[0]) == null ? void 0 : i.toUpperCase()) ?? "", o = ((C = (s = h[1]) == null ? void 0 : s[0]) == null ? void 0 : C.toUpperCase()) ?? "";
|
|
12853
|
+
e = `${d}${o}`;
|
|
12844
12854
|
}
|
|
12845
12855
|
return e;
|
|
12846
12856
|
};
|