@snmt-react-ui/async-select 1.8.22 → 1.8.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/async-select.js +258 -252
  2. package/package.json +3 -3
@@ -1,8 +1,8 @@
1
1
  import "./index.css";
2
2
  import { jsx as t, Fragment as U, jsxs as c } from "react/jsx-runtime";
3
- import { createContext as n1, forwardRef as g1, useRef as Y, useImperativeHandle as u1, useState as _, useEffect as Z, useCallback as W, useContext as r1, useMemo as A1 } from "react";
4
- import { Select as G1, Flex as B1, Avatar as W1, Checkbox as y1, Tooltip as R1, Typography as x1, Tag as T1, Popover as D1 } from "antd";
5
- var b1 = Object.defineProperty, K1 = (i, o, e) => o in i ? b1(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e, j1 = (i, o, e) => K1(i, o + "", e), Y1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
3
+ import { createContext as n1, forwardRef as g1, useRef as Y, useImperativeHandle as u1, useState as _, useEffect as A, useCallback as W, useContext as r1, useMemo as A1 } from "react";
4
+ import { Select as G1, Flex as B1, Avatar as W1, Checkbox as y1, Tooltip as _1, Typography as x1, Tag as T1, Popover as b1 } from "antd";
5
+ var D1 = Object.defineProperty, K1 = (i, o, e) => o in i ? D1(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e, j1 = (i, o, e) => K1(i, o + "", e), Y1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function O1() {
7
7
  if (console && console.warn) {
8
8
  for (var i = arguments.length, o = new Array(i), e = 0; e < i; e++)
@@ -38,8 +38,8 @@ const H1 = (i, o) => () => {
38
38
  const l = o.languages[0], n = o.options ? o.options.fallbackLng : !1, a = o.languages[o.languages.length - 1];
39
39
  if (l.toLowerCase() === "cimode") return !0;
40
40
  const p = (r, m) => {
41
- const d = o.services.backendConnector.state[`${r}|${m}`];
42
- return d === -1 || d === 2;
41
+ const C = o.services.backendConnector.state[`${r}|${m}`];
42
+ return C === -1 || C === 2;
43
43
  };
44
44
  return e.bindI18n && e.bindI18n.indexOf("languageChanging") > -1 && o.services.backendConnector.backend && o.isLanguageChangingTo && !p(o.isLanguageChangingTo, i) ? !1 : !!(o.hasResourceBundle(l, i) || !o.services.backendConnector.backend || o.options.resources && !o.options.partialBundledLanguages || p(l, i) && (!n || p(a, i)));
45
45
  }, S1 = function(i, o) {
@@ -97,7 +97,7 @@ class i2 {
97
97
  }
98
98
  const t2 = (i, o) => {
99
99
  const e = Y();
100
- return Z(() => {
100
+ return A(() => {
101
101
  e.current = i;
102
102
  }, [i, o]), e.current;
103
103
  }, E1 = (i, o, e, l) => i.getFixedT(o, e, l), l2 = (i, o, e, l) => W(E1(i, o, e, l), [i, o, e, l]), n2 = function(i) {
@@ -110,8 +110,8 @@ const t2 = (i, o) => {
110
110
  } = r1(o2) || {}, a = e || l || e2();
111
111
  if (a && !a.reportNamespaces && (a.reportNamespaces = new i2()), !a) {
112
112
  p1("You will need to pass in an i18next instance by using initReactI18next");
113
- const u = (R, x) => P(x) ? x : U1(x) && P(x.defaultValue) ? x.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, H = [u, {}, !1];
114
- return H.t = u, H.i18n = {}, H.ready = !1, H;
113
+ const u = (x, H) => P(H) ? H : U1(H) && P(H.defaultValue) ? H.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, E = [u, {}, !1];
114
+ return E.t = u, E.i18n = {}, E.ready = !1, E;
115
115
  }
116
116
  a.options.react && a.options.react.wait !== void 0 && p1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
117
117
  const p = {
@@ -122,35 +122,35 @@ const t2 = (i, o) => {
122
122
  useSuspense: r,
123
123
  keyPrefix: m
124
124
  } = p;
125
- let d = i;
126
- d = P(d) ? [d] : d || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(d);
127
- const h = (a.isInitialized || a.initializedStoreOnce) && d.every((u) => S1(u, a, p)), s = l2(a, o.lng || null, p.nsMode === "fallback" ? d : d[0], m), N = () => s, v = () => E1(a, o.lng || null, p.nsMode === "fallback" ? d : d[0], m), [I, V] = _(N);
128
- let f = d.join();
129
- o.lng && (f = `${o.lng}${f}`);
130
- const A = t2(f), B = Y(!0);
131
- Z(() => {
125
+ let C = i;
126
+ C = P(C) ? [C] : C || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(C);
127
+ const h = (a.isInitialized || a.initializedStoreOnce) && C.every((u) => S1(u, a, p)), s = l2(a, o.lng || null, p.nsMode === "fallback" ? C : C[0], m), f = () => s, N = () => E1(a, o.lng || null, p.nsMode === "fallback" ? C : C[0], m), [V, Z] = _(f);
128
+ let L = C.join();
129
+ o.lng && (L = `${o.lng}${L}`);
130
+ const G = t2(L), M = Y(!0);
131
+ A(() => {
132
132
  const {
133
133
  bindI18n: u,
134
- bindI18nStore: H
134
+ bindI18nStore: E
135
135
  } = p;
136
- B.current = !0, !h && !r && (o.lng ? N1(a, o.lng, d, () => {
137
- B.current && V(v);
138
- }) : v1(a, d, () => {
139
- B.current && V(v);
140
- })), h && A && A !== f && B.current && V(v);
141
- const R = () => {
142
- B.current && V(v);
136
+ M.current = !0, !h && !r && (o.lng ? N1(a, o.lng, C, () => {
137
+ M.current && Z(N);
138
+ }) : v1(a, C, () => {
139
+ M.current && Z(N);
140
+ })), h && G && G !== L && M.current && Z(N);
141
+ const x = () => {
142
+ M.current && Z(N);
143
143
  };
144
- return u && a && a.on(u, R), H && a && a.store.on(H, R), () => {
145
- B.current = !1, u && a && u.split(" ").forEach((x) => a.off(x, R)), H && a && H.split(" ").forEach((x) => a.store.off(x, R));
144
+ return u && a && a.on(u, x), E && a && a.store.on(E, x), () => {
145
+ M.current = !1, u && a && u.split(" ").forEach((H) => a.off(H, x)), E && a && E.split(" ").forEach((H) => a.store.off(H, x));
146
146
  };
147
- }, [a, f]), Z(() => {
148
- B.current && h && V(N);
147
+ }, [a, L]), A(() => {
148
+ M.current && h && Z(f);
149
149
  }, [a, m, h]);
150
- const y = [I, a, h];
151
- if (y.t = I, y.i18n = a, y.ready = h, h || !h && !r) return y;
150
+ const y = [V, a, h];
151
+ if (y.t = V, y.i18n = a, y.ready = h, h || !h && !r) return y;
152
152
  throw new Promise((u) => {
153
- o.lng ? N1(a, o.lng, d, () => u()) : v1(a, d, () => u());
153
+ o.lng ? N1(a, o.lng, C, () => u()) : v1(a, C, () => u());
154
154
  });
155
155
  }, t1 = ({
156
156
  children: i,
@@ -188,7 +188,7 @@ const t2 = (i, o) => {
188
188
  }
189
189
  );
190
190
  };
191
- var b = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(b || {});
191
+ var D = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(D || {});
192
192
  const m1 = n1({
193
193
  locale: "en",
194
194
  theme: "light"
@@ -202,9 +202,9 @@ const s2 = ({
202
202
  disabled: n = !1,
203
203
  disableUncheck: a = !1
204
204
  }) => {
205
- const [p, r] = _(i), [m, d] = _(o);
206
- Z(() => {
207
- r(i), d(o);
205
+ const [p, r] = _(i), [m, C] = _(o);
206
+ A(() => {
207
+ r(i), C(o);
208
208
  }, [i, o]);
209
209
  const { theme: h } = r1(m1);
210
210
  return /* @__PURE__ */ t(
@@ -214,7 +214,7 @@ const s2 = ({
214
214
  checked: p,
215
215
  indeterminate: m,
216
216
  onChange: (s) => {
217
- a && p || (d(!1), r(s.target.checked), l && l(s));
217
+ a && p || (C(!1), r(s.target.checked), l && l(s));
218
218
  },
219
219
  disabled: n,
220
220
  children: e
@@ -828,7 +828,7 @@ const h2 = ({
828
828
  )
829
829
  ]
830
830
  }
831
- ), _2 = ({
831
+ ), R2 = ({
832
832
  width: i = 20,
833
833
  height: o = 20,
834
834
  color: e = "#001E52",
@@ -861,7 +861,7 @@ const h2 = ({
861
861
  )
862
862
  ]
863
863
  }
864
- ), R2 = ({
864
+ ), _2 = ({
865
865
  width: i = 20,
866
866
  height: o = 20,
867
867
  color: e = "#001E52",
@@ -1322,7 +1322,7 @@ const h2 = ({
1322
1322
  )
1323
1323
  ]
1324
1324
  }
1325
- ), D2 = ({
1325
+ ), b2 = ({
1326
1326
  width: i = 20,
1327
1327
  height: o = 20,
1328
1328
  color: e = "#004ED7",
@@ -1351,7 +1351,7 @@ const h2 = ({
1351
1351
  )
1352
1352
  ]
1353
1353
  }
1354
- ), b2 = ({
1354
+ ), D2 = ({
1355
1355
  width: i = 10,
1356
1356
  height: o = 10,
1357
1357
  color: e = "#001E52",
@@ -2702,8 +2702,8 @@ const h2 = ({
2702
2702
  disabled: a = !1,
2703
2703
  onClick: p
2704
2704
  }) => {
2705
- const [r, m] = _(n), { theme: d } = r1(I1), h = a ? d && d === "dark" ? g.GREY_LIGHT_4 : g.GREY_DARK_1 : l, s = a ? void 0 : p;
2706
- return Z(() => {
2705
+ const [r, m] = _(n), { theme: C } = r1(I1), h = a ? C && C === "dark" ? g.GREY_LIGHT_4 : g.GREY_DARK_1 : l, s = a ? void 0 : p;
2706
+ return A(() => {
2707
2707
  if (n) {
2708
2708
  s && !a && m(`${n} clickable`);
2709
2709
  return;
@@ -2760,9 +2760,9 @@ const h2 = ({
2760
2760
  case "history":
2761
2761
  return M2({ width: o, height: e, color: h, className: r, onClick: s });
2762
2762
  case "logOut":
2763
- return _2({ width: o, height: e, color: h, className: r, onClick: s });
2764
- case "settings":
2765
2763
  return R2({ width: o, height: e, color: h, className: r, onClick: s });
2764
+ case "settings":
2765
+ return _2({ width: o, height: e, color: h, className: r, onClick: s });
2766
2766
  case "trash":
2767
2767
  return x2({ width: o, height: e, color: h, className: r, onClick: s });
2768
2768
  case "settings4":
@@ -2818,7 +2818,7 @@ const h2 = ({
2818
2818
  onClick: s
2819
2819
  });
2820
2820
  case "expandActiveArrowIcon":
2821
- return D2({
2821
+ return b2({
2822
2822
  width: o,
2823
2823
  height: e,
2824
2824
  color: h,
@@ -2826,7 +2826,7 @@ const h2 = ({
2826
2826
  onClick: s
2827
2827
  });
2828
2828
  case "sortUp":
2829
- return b2({ width: o, height: e, color: h, className: r, onClick: s });
2829
+ return D2({ width: o, height: e, color: h, className: r, onClick: s });
2830
2830
  case "sortDown":
2831
2831
  return K2({ width: o, height: e, color: h, className: r, onClick: s });
2832
2832
  case "search":
@@ -2900,7 +2900,7 @@ const h2 = ({
2900
2900
  }
2901
2901
  })() });
2902
2902
  }, f5 = ({ children: i, title: o, arrow: e = !0, open: l, placement: n = "top" }) => /* @__PURE__ */ t(
2903
- R1,
2903
+ _1,
2904
2904
  {
2905
2905
  overlayClassName: "snmt-tooltip",
2906
2906
  title: o,
@@ -2909,7 +2909,7 @@ const h2 = ({
2909
2909
  placement: n,
2910
2910
  children: i
2911
2911
  }
2912
- ), { Title: M5, Text: _5 } = x1, R5 = {
2912
+ ), { Title: M5, Text: R5 } = x1, _5 = {
2913
2913
  h1: 1,
2914
2914
  h2: 2,
2915
2915
  h3: 3,
@@ -2926,28 +2926,31 @@ const h2 = ({
2926
2926
  /** This prop allows you to enable tooltip if text size is too big */
2927
2927
  trim: r = !1
2928
2928
  }, m) => {
2929
- const d = Y(null);
2930
- u1(m, () => d.current);
2929
+ const C = Y(null);
2930
+ u1(m, () => C.current);
2931
2931
  const [h, s] = _(!1);
2932
- Z(() => {
2932
+ A(() => {
2933
+ var L;
2933
2934
  if (!r) return;
2934
- const f = () => {
2935
- d.current && s(d.current.scrollWidth > d.current.clientWidth);
2936
- }, A = new ResizeObserver(f);
2937
- return d.current && A.observe(d.current), () => {
2938
- A.disconnect();
2935
+ const G = () => {
2936
+ C.current && s(C.current.scrollWidth > C.current.clientWidth);
2937
+ };
2938
+ G();
2939
+ const M = new ResizeObserver(G);
2940
+ return C.current && M.observe(C.current), (L = C.current) != null && L.parentElement && M.observe(C.current.parentElement), () => {
2941
+ M.disconnect();
2939
2942
  };
2940
- }, [r, h]);
2941
- const N = o === "h1" || o === "h2" || o === "h3" || o === "h4";
2942
- let v = `snmt-typography snmt-typography-${o}`;
2943
- i && i !== "inherit" && (v += ` snmt-typography-align-${i}`), a && (v += " collapsed"), r && (v += " collapsed");
2944
- const I = {
2945
- className: v,
2943
+ }, [r]);
2944
+ const f = o === "h1" || o === "h2" || o === "h3" || o === "h4";
2945
+ let N = `snmt-typography snmt-typography-${o}`;
2946
+ i && i !== "inherit" && (N += ` snmt-typography-align-${i}`), a && (N += " collapsed"), r && (N += " collapsed");
2947
+ const V = {
2948
+ className: N,
2946
2949
  style: { color: e, whiteSpace: r ? "nowrap" : p, display: r ? "block" : "" },
2947
2950
  onClick: n,
2948
- ref: d
2949
- }, V = N ? /* @__PURE__ */ t(M5, { level: R5[o], ...I, children: l }) : /* @__PURE__ */ t(_5, { ...I, children: l });
2950
- return r && h ? /* @__PURE__ */ t(f5, { placement: "top", title: l, children: V }) : V;
2951
+ ref: C
2952
+ }, Z = f ? /* @__PURE__ */ t(M5, { level: _5[o], ...V, children: l }) : /* @__PURE__ */ t(R5, { ...V, children: l });
2953
+ return r && h ? /* @__PURE__ */ t(f5, { placement: "top", title: l, children: Z }) : Z;
2951
2954
  }
2952
2955
  );
2953
2956
  var k = /* @__PURE__ */ ((i) => (i.GREY_LIGHT_0 = "var(--grey-light-0)", i.GREY_LIGHT_1 = "var(--grey-light-1)", i.GREY_LIGHT_2 = "var(--grey-light-2)", i.GREY_LIGHT_3 = "var(--grey-light-3)", i.GREY_LIGHT_4 = "var(--grey-light-4)", i.GREY_DARK_1 = "var(--grey-dark-1)", i.GREY_DARK_2 = "var(--grey-dark-2)", i.GREY_DARK_3 = "var(--grey-dark-3)", i.GREY_DARK_4 = "var(--grey-dark-4)", i.GREY_DARK_5 = "var(--grey-dark-5)", i.BLUE_PRIMARY = "var(--blue-primary)", i.BLUE_HOVER = "var(--blue-hover)", i.BLUE_LIGHT_1 = "var(--blue-light-1)", i.BLUE_LIGHT_2 = "var(--blue-light-2)", i.BLUE_LIGHT_3 = "var(--blue-light-3)", i.BLUE_LIGHT_4 = "var(--blue-light-4)", i.BLUE_DARK_1 = "var(--blue-dark-1)", i.BLUE_DARK_3 = "var(--blue-dark-3)", i.PURPLE_LIGHT = "var(--purple-light)", i.PURPLE_DARK = "var(--purple-dark)", i.NOTIFICATION_WARNING_LIGHT = "var(--notification-warning-light)", i.NOTIFICATION_WARNING_DARK = "var(--notification-warning-dark)", i.NOTIFICATION_SUCCESS_LIGHT = "var(--notification-success-light)", i.NOTIFICATION_SUCCESS_DARK = "var(--notification-success-dark)", i.NOTIFICATION_ERROR_LIGHT = "var(--notification-error-light)", i.NOTIFICATION_ERROR_DARK = "var(--notification-error-dark)", i.NOTIFICATION_ERROR_DARK_MODE = "var(--notification-error-dark-mode)", i))(k || {});
@@ -3358,7 +3361,7 @@ const H5 = ({
3358
3361
  )
3359
3362
  ]
3360
3363
  }
3361
- ), D5 = ({
3364
+ ), b5 = ({
3362
3365
  width: i = 20,
3363
3366
  height: o = 20,
3364
3367
  color: e = "#001E52",
@@ -3405,7 +3408,7 @@ const H5 = ({
3405
3408
  )
3406
3409
  ]
3407
3410
  }
3408
- ), b5 = ({
3411
+ ), D5 = ({
3409
3412
  width: i = 20,
3410
3413
  height: o = 20,
3411
3414
  color: e = "#001E52",
@@ -4785,7 +4788,7 @@ const H5 = ({
4785
4788
  )
4786
4789
  ]
4787
4790
  }
4788
- ), _3 = ({
4791
+ ), R3 = ({
4789
4792
  className: i,
4790
4793
  color: o = k.GREY_DARK_5,
4791
4794
  height: e = 24,
@@ -4854,7 +4857,7 @@ const H5 = ({
4854
4857
  )
4855
4858
  ]
4856
4859
  }
4857
- ), R3 = ({
4860
+ ), _3 = ({
4858
4861
  className: i,
4859
4862
  color: o = k.GREY_DARK_5,
4860
4863
  height: e = 24,
@@ -5342,7 +5345,7 @@ const H5 = ({
5342
5345
  )
5343
5346
  ]
5344
5347
  }
5345
- ), D3 = ({
5348
+ ), b3 = ({
5346
5349
  width: i = 24,
5347
5350
  height: o = 24,
5348
5351
  color: e = k.GREY_DARK_2,
@@ -5369,7 +5372,7 @@ const H5 = ({
5369
5372
  }
5370
5373
  )
5371
5374
  }
5372
- ), b3 = ({
5375
+ ), D3 = ({
5373
5376
  width: i = 24,
5374
5377
  height: o = 24,
5375
5378
  color: e = k.GREY_DARK_2,
@@ -5431,8 +5434,8 @@ const H5 = ({
5431
5434
  disabled: a = !1,
5432
5435
  onClick: p
5433
5436
  }) => {
5434
- const [r, m] = _(n), { theme: d } = r1(V1), h = a ? d && d === "dark" ? k.GREY_LIGHT_4 : k.GREY_DARK_1 : l, s = a ? void 0 : p;
5435
- return Z(() => {
5437
+ const [r, m] = _(n), { theme: C } = r1(V1), h = a ? C && C === "dark" ? k.GREY_LIGHT_4 : k.GREY_DARK_1 : l, s = a ? void 0 : p;
5438
+ return A(() => {
5436
5439
  if (n) {
5437
5440
  s && !a && m(`${n} clickable`);
5438
5441
  return;
@@ -5467,9 +5470,9 @@ const H5 = ({
5467
5470
  case "attention":
5468
5471
  return T5({ width: o, height: e, color: h, className: r, onClick: s });
5469
5472
  case "users":
5470
- return D5({ width: o, height: e, color: h, className: r, onClick: s });
5473
+ return b5({ width: o, height: e, color: h, className: r, onClick: s });
5471
5474
  case "mySkillsMatrix":
5472
- return b5({
5475
+ return D5({
5473
5476
  width: o,
5474
5477
  height: e,
5475
5478
  color: h,
@@ -5589,11 +5592,11 @@ const H5 = ({
5589
5592
  case "bell":
5590
5593
  return f3({ width: o, height: e, color: h, className: r, onClick: s });
5591
5594
  case "contract":
5592
- return _3({ width: o, height: e, color: h, className: r, onClick: s });
5595
+ return R3({ width: o, height: e, color: h, className: r, onClick: s });
5593
5596
  case "trash2":
5594
5597
  return M3({ width: o, height: e, color: h, className: r, onClick: s });
5595
5598
  case "resourceManager":
5596
- return R3({ width: o, height: e, color: h, className: r, onClick: s });
5599
+ return _3({ width: o, height: e, color: h, className: r, onClick: s });
5597
5600
  case "settings2":
5598
5601
  return x3({ width: o, height: e, color: h, className: r, onClick: s });
5599
5602
  case "image":
@@ -5621,9 +5624,9 @@ const H5 = ({
5621
5624
  case "openPointCircle":
5622
5625
  return T3({ width: o, height: e, color: h, className: r, onClick: s });
5623
5626
  case "community":
5624
- return D3({ width: o, height: e, color: h, className: r, onClick: s });
5625
- case "docs":
5626
5627
  return b3({ width: o, height: e, color: h, className: r, onClick: s });
5628
+ case "docs":
5629
+ return D3({ width: o, height: e, color: h, className: r, onClick: s });
5627
5630
  default:
5628
5631
  return /* @__PURE__ */ t(U, { children: "No Icon provided" });
5629
5632
  }
@@ -5674,7 +5677,7 @@ const Z1 = ({
5674
5677
  }
5675
5678
  );
5676
5679
  }, O3 = ({ children: i, title: o, arrow: e = !0, open: l, placement: n = "top" }) => /* @__PURE__ */ t(
5677
- R1,
5680
+ _1,
5678
5681
  {
5679
5682
  overlayClassName: "snmt-tooltip",
5680
5683
  title: o,
@@ -5700,28 +5703,31 @@ const Z1 = ({
5700
5703
  /** This prop allows you to enable tooltip if text size is too big */
5701
5704
  trim: r = !1
5702
5705
  }, m) => {
5703
- const d = Y(null);
5704
- u1(m, () => d.current);
5706
+ const C = Y(null);
5707
+ u1(m, () => C.current);
5705
5708
  const [h, s] = _(!1);
5706
- Z(() => {
5709
+ A(() => {
5710
+ var L;
5707
5711
  if (!r) return;
5708
- const f = () => {
5709
- d.current && s(d.current.scrollWidth > d.current.clientWidth);
5710
- }, A = new ResizeObserver(f);
5711
- return d.current && A.observe(d.current), () => {
5712
- A.disconnect();
5712
+ const G = () => {
5713
+ C.current && s(C.current.scrollWidth > C.current.clientWidth);
5714
+ };
5715
+ G();
5716
+ const M = new ResizeObserver(G);
5717
+ return C.current && M.observe(C.current), (L = C.current) != null && L.parentElement && M.observe(C.current.parentElement), () => {
5718
+ M.disconnect();
5713
5719
  };
5714
- }, [r, h]);
5715
- const N = o === "h1" || o === "h2" || o === "h3" || o === "h4";
5716
- let v = `snmt-typography snmt-typography-${o}`;
5717
- i && i !== "inherit" && (v += ` snmt-typography-align-${i}`), a && (v += " collapsed"), r && (v += " collapsed");
5718
- const I = {
5719
- className: v,
5720
+ }, [r]);
5721
+ const f = o === "h1" || o === "h2" || o === "h3" || o === "h4";
5722
+ let N = `snmt-typography snmt-typography-${o}`;
5723
+ i && i !== "inherit" && (N += ` snmt-typography-align-${i}`), a && (N += " collapsed"), r && (N += " collapsed");
5724
+ const V = {
5725
+ className: N,
5720
5726
  style: { color: e, whiteSpace: r ? "nowrap" : p, display: r ? "block" : "" },
5721
5727
  onClick: n,
5722
- ref: d
5723
- }, V = N ? /* @__PURE__ */ t(F3, { level: U3[o], ...I, children: l }) : /* @__PURE__ */ t(S3, { ...I, children: l });
5724
- return r && h ? /* @__PURE__ */ t(O3, { placement: "top", title: l, children: V }) : V;
5728
+ ref: C
5729
+ }, Z = f ? /* @__PURE__ */ t(F3, { level: U3[o], ...V, children: l }) : /* @__PURE__ */ t(S3, { ...V, children: l });
5730
+ return r && h ? /* @__PURE__ */ t(O3, { placement: "top", title: l, children: Z }) : Z;
5725
5731
  }
5726
5732
  ), $3 = ({
5727
5733
  children: i,
@@ -5733,7 +5739,7 @@ const Z1 = ({
5733
5739
  }) => {
5734
5740
  const [p, r] = _(!1);
5735
5741
  return /* @__PURE__ */ t(
5736
- D1,
5742
+ b1,
5737
5743
  {
5738
5744
  content: o,
5739
5745
  arrow: !1,
@@ -5768,33 +5774,33 @@ const J3 = ({
5768
5774
  options: a,
5769
5775
  extraOptions: p
5770
5776
  }) => {
5771
- const { locale: r } = r1(m1), { t: m } = n2("common", { lng: r }), [d, h] = _(!1);
5772
- if (Z(() => {
5777
+ const { locale: r } = r1(m1), { t: m } = n2("common", { lng: r }), [C, h] = _(!1);
5778
+ if (A(() => {
5773
5779
  i.length || h(!1);
5774
5780
  }, [i]), !i.length)
5775
5781
  return null;
5776
- const s = (N) => {
5777
- var v, I;
5778
- return ((v = a == null ? void 0 : a.find((f) => f.value === N)) == null ? void 0 : v.label) || ((I = p == null ? void 0 : p.find((f) => f.value === N)) == null ? void 0 : I.label) || N;
5782
+ const s = (f) => {
5783
+ var N, V;
5784
+ return ((N = a == null ? void 0 : a.find((L) => L.value === f)) == null ? void 0 : N.label) || ((V = p == null ? void 0 : p.find((L) => L.value === f)) == null ? void 0 : V.label) || f;
5779
5785
  };
5780
5786
  return /* @__PURE__ */ c(
5781
5787
  $3,
5782
5788
  {
5783
5789
  content: (
5784
5790
  // 90: paddings + margins + gaps and so on
5785
- /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(t1, { gap: 6, flexWrap: "wrap", children: i.map(({ value: N }) => /* @__PURE__ */ t(
5791
+ /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(t1, { gap: 6, flexWrap: "wrap", children: i.map(({ value: f }) => /* @__PURE__ */ t(
5786
5792
  Z1,
5787
5793
  {
5788
- onClose: () => o(N),
5794
+ onClose: () => o(f),
5789
5795
  closable: l,
5790
5796
  disabled: n,
5791
- children: s(N)
5797
+ children: s(f)
5792
5798
  },
5793
- N
5799
+ f
5794
5800
  )) }) })
5795
5801
  ),
5796
5802
  placement: "bottomRight",
5797
- isOpen: d,
5803
+ isOpen: C,
5798
5804
  setIsOpen: h,
5799
5805
  children: [
5800
5806
  i.length,
@@ -5822,41 +5828,41 @@ const J3 = ({
5822
5828
  width: p,
5823
5829
  disabled: r = !1,
5824
5830
  required: m = !1,
5825
- clearable: d = !1,
5831
+ clearable: C = !1,
5826
5832
  scrollThresholdValue: h = 50,
5827
5833
  onSearchChange: s,
5828
- onDropdownVisibleChange: N,
5829
- onScrollToEnd: v,
5830
- onPopupScroll: I,
5831
- id: V,
5832
- extraOptions: f,
5833
- dropdownRender: A,
5834
- optionRender: B,
5834
+ onDropdownVisibleChange: f,
5835
+ onScrollToEnd: N,
5836
+ onPopupScroll: V,
5837
+ id: Z,
5838
+ extraOptions: L,
5839
+ dropdownRender: G,
5840
+ optionRender: M,
5835
5841
  isLoading: y,
5836
5842
  readOnly: u,
5837
- error: H
5838
- }, R) => {
5839
- const [x, K] = _(!1), [O, T] = _(!1), [F, $] = _(!0), [E, D] = _(i), Q = Y(null);
5840
- Z(() => {
5841
- D(i);
5843
+ error: E
5844
+ }, x) => {
5845
+ const [H, K] = _(!1), [O, T] = _(!1), [F, $] = _(!0), [I, b] = _(i), Q = Y(null);
5846
+ A(() => {
5847
+ b(i);
5842
5848
  }, [i]);
5843
- const s1 = (C) => {
5844
- K(C), N && N(C);
5845
- }, h1 = (C, w) => {
5846
- var M;
5847
- return !!((M = w == null ? void 0 : w.label) != null && M.toString().toLowerCase().includes(C.toLowerCase()));
5849
+ const s1 = (d) => {
5850
+ K(d), f && f(d);
5851
+ }, h1 = (d, w) => {
5852
+ var R;
5853
+ return !!((R = w == null ? void 0 : w.label) != null && R.toString().toLowerCase().includes(d.toLowerCase()));
5848
5854
  }, X = () => {
5849
5855
  T(!0);
5850
5856
  }, z = () => {
5851
5857
  T(!1);
5852
5858
  }, j = W(
5853
- (C) => {
5854
- if (D(C), l) {
5855
- const M = C;
5856
- o == null || o(M);
5859
+ (d) => {
5860
+ if (b(d), l) {
5861
+ const R = d;
5862
+ o == null || o(R);
5857
5863
  return;
5858
5864
  }
5859
- const w = C;
5865
+ const w = d;
5860
5866
  o == null || o(w);
5861
5867
  },
5862
5868
  [l, o]
@@ -5869,52 +5875,52 @@ const J3 = ({
5869
5875
  j("");
5870
5876
  }
5871
5877
  }, [r, j, l, u]), S = W(
5872
- (C) => {
5873
- const w = E.filter((M) => M !== C);
5874
- j(w), D(w);
5878
+ (d) => {
5879
+ const w = I.filter((R) => R !== d);
5880
+ j(w), b(w);
5875
5881
  },
5876
- [j, E]
5882
+ [j, I]
5877
5883
  ), e1 = W(
5878
- (C) => (E == null ? void 0 : E.indexOf(C)) === 0 ? (
5884
+ (d) => (I == null ? void 0 : I.indexOf(d)) === 0 ? (
5879
5885
  // if the search input is empty
5880
5886
  // then display the placeholder, else do not display it
5881
5887
  /* @__PURE__ */ t("span", { className: "custom-placeholder", children: F ? e : "" })
5882
5888
  ) : /* @__PURE__ */ t(U, {}),
5883
- [F, E, e]
5884
- ), a1 = (C) => {
5885
- C.preventDefault(), C.stopPropagation();
5886
- }, C1 = async (C) => {
5887
- const { target: w } = C;
5888
- w.scrollTop + w.offsetHeight >= w.scrollHeight - h && (v == null || v(!0)), I && await I(C);
5889
+ [F, I, e]
5890
+ ), a1 = (d) => {
5891
+ d.preventDefault(), d.stopPropagation();
5892
+ }, C1 = async (d) => {
5893
+ const { target: w } = d;
5894
+ w.scrollTop + w.offsetHeight >= w.scrollHeight - h && (N == null || N(!0)), V && await V(d);
5889
5895
  }, J = W(
5890
- (C) => {
5891
- var w, M;
5892
- return ((w = a.find((o1) => o1.value === C)) == null ? void 0 : w.label) || ((M = f == null ? void 0 : f.find(
5893
- (o1) => o1.value === C
5894
- )) == null ? void 0 : M.label) || C;
5896
+ (d) => {
5897
+ var w, R;
5898
+ return ((w = a.find((o1) => o1.value === d)) == null ? void 0 : w.label) || ((R = L == null ? void 0 : L.find(
5899
+ (o1) => o1.value === d
5900
+ )) == null ? void 0 : R.label) || d;
5895
5901
  },
5896
- [f, a]
5902
+ [L, a]
5897
5903
  ), d1 = W(
5898
- (C) => {
5904
+ (d) => {
5899
5905
  var w;
5900
5906
  return /* @__PURE__ */ t(
5901
5907
  J3,
5902
5908
  {
5903
- values: C,
5909
+ values: d,
5904
5910
  onTagClose: S,
5905
5911
  maxWidth: ((w = Q.current) == null ? void 0 : w.clientWidth) || 0,
5906
5912
  disabled: r,
5907
5913
  closable: !u,
5908
5914
  options: a,
5909
- extraOptions: f
5915
+ extraOptions: L
5910
5916
  }
5911
5917
  );
5912
5918
  },
5913
- [r, f, S, a, u]
5914
- ), L = W(
5915
- ({ label: C, value: w, mode: M }) => M === "filter" ? e1(w) : /* @__PURE__ */ t("div", { onMouseDown: a1, className: "tag-wrapper", children: /* @__PURE__ */ t(Z1, { onClose: () => S(w), disabled: r, children: typeof C == "object" ? C : J(w) }) }),
5919
+ [r, L, S, a, u]
5920
+ ), v = W(
5921
+ ({ label: d, value: w, mode: R }) => R === "filter" ? e1(w) : /* @__PURE__ */ t("div", { onMouseDown: a1, className: "tag-wrapper", children: /* @__PURE__ */ t(Z1, { onClose: () => S(w), disabled: r, children: typeof d == "object" ? d : J(w) }) }),
5916
5922
  [r, J, S, e1]
5917
- ), G = Array.isArray(E) && E.length > 0 || !!E && typeof E == "string" && E.trim() !== "";
5923
+ ), B = Array.isArray(I) && I.length > 0 || !!I && typeof I == "string" && I.trim() !== "";
5918
5924
  return /* @__PURE__ */ c("div", { className: "snmt-select-container", children: [
5919
5925
  /* @__PURE__ */ c(
5920
5926
  "div",
@@ -5929,33 +5935,33 @@ const J3 = ({
5929
5935
  {
5930
5936
  className: "snmt-select-blank",
5931
5937
  popupClassName: u ? "dropdown-read-only" : "",
5932
- id: V,
5933
- ref: R,
5938
+ id: Z,
5939
+ ref: x,
5934
5940
  showSearch: !!n,
5935
5941
  filterOption: n && h1,
5936
5942
  onDropdownVisibleChange: s1,
5937
5943
  disabled: r,
5938
- value: E || void 0,
5939
- labelRender: (C) => {
5940
- const w = J(C.value);
5941
- return r ? /* @__PURE__ */ t("span", { style: { color: b.GREY_DARK_1 }, children: w }) : w;
5944
+ value: I || void 0,
5945
+ labelRender: (d) => {
5946
+ const w = J(d.value);
5947
+ return r ? /* @__PURE__ */ t("span", { style: { color: D.GREY_DARK_1 }, children: w }) : w;
5942
5948
  },
5943
5949
  mode: l === "filter" ? "multiple" : l,
5944
5950
  onChange: j,
5945
5951
  onFocus: X,
5946
5952
  onBlur: z,
5947
- onSearch: (C) => {
5948
- $(!C), s && s(C);
5953
+ onSearch: (d) => {
5954
+ $(!d), s && s(d);
5949
5955
  },
5950
5956
  onSelect: () => $(!0),
5951
5957
  onDeselect: () => $(!0),
5952
- tagRender: (C) => L({ ...C, mode: l }),
5958
+ tagRender: (d) => v({ ...d, mode: l }),
5953
5959
  maxTagCount: "responsive",
5954
5960
  maxTagPlaceholder: d1,
5955
5961
  onPopupScroll: C1,
5956
5962
  prefix: y && /* @__PURE__ */ t(f1, { size: 15 }),
5957
5963
  suffixIcon: /* @__PURE__ */ t("div", { className: "wrapper-suffix-icon", children: l !== "filter" && /* @__PURE__ */ c(U, { children: [
5958
- E && !!E.length && (l || d) && /* @__PURE__ */ t(
5964
+ I && !!I.length && (l || C) && /* @__PURE__ */ t(
5959
5965
  "div",
5960
5966
  {
5961
5967
  onClick: c1,
@@ -5966,7 +5972,7 @@ const J3 = ({
5966
5972
  i1,
5967
5973
  {
5968
5974
  name: "cancel",
5969
- color: r ? b.GREY_DARK_1 : b.GREY_DARK_5
5975
+ color: r ? D.GREY_DARK_1 : D.GREY_DARK_5
5970
5976
  }
5971
5977
  )
5972
5978
  }
@@ -5975,39 +5981,39 @@ const J3 = ({
5975
5981
  i1,
5976
5982
  {
5977
5983
  name: "selectArrowIcon",
5978
- color: r ? b.GREY_DARK_1 : b.GREY_DARK_5,
5979
- className: x ? "select-arrow-rotated" : "select-arrow",
5980
- onClick: () => K(!x)
5984
+ color: r ? D.GREY_DARK_1 : D.GREY_DARK_5,
5985
+ className: H ? "select-arrow-rotated" : "select-arrow",
5986
+ onClick: () => K(!H)
5981
5987
  }
5982
5988
  )
5983
5989
  ] }) }),
5984
- removeIcon: /* @__PURE__ */ t(i1, { name: "errorSmall", color: b.GREY_DARK_1 }),
5990
+ removeIcon: /* @__PURE__ */ t(i1, { name: "errorSmall", color: D.GREY_DARK_1 }),
5985
5991
  options: a,
5986
- optionRender: (C) => B ? B(C.data) : /* @__PURE__ */ c(t1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5992
+ optionRender: (d) => M ? M(d.data) : /* @__PURE__ */ c(t1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
5987
5993
  /* @__PURE__ */ c(t1, { alignItems: "center", gap: 12, children: [
5988
5994
  l && /* @__PURE__ */ t(
5989
5995
  s2,
5990
5996
  {
5991
- checked: !!(E != null && E.includes(C.value))
5997
+ checked: !!(I != null && I.includes(d.value))
5992
5998
  }
5993
5999
  ),
5994
6000
  /* @__PURE__ */ c(t1, { alignItems: "center", gap: 8, children: [
5995
- C.data.image && /* @__PURE__ */ t(r2, { src: C.data.image, size: 20 }),
5996
- /* @__PURE__ */ t("span", { children: C.label })
6001
+ d.data.image && /* @__PURE__ */ t(r2, { src: d.data.image, size: 20 }),
6002
+ /* @__PURE__ */ t("span", { children: d.label })
5997
6003
  ] })
5998
6004
  ] }),
5999
- !l && E === C.value && /* @__PURE__ */ t(
6005
+ !l && I === d.value && /* @__PURE__ */ t(
6000
6006
  i1,
6001
6007
  {
6002
6008
  name: "ok",
6003
- color: b.BLUE_PRIMARY,
6009
+ color: D.BLUE_PRIMARY,
6004
6010
  width: 16,
6005
6011
  height: 16
6006
6012
  }
6007
6013
  )
6008
6014
  ] }),
6009
- dropdownRender: (C) => /* @__PURE__ */ c("div", { className: "dropdown-container", children: [
6010
- /* @__PURE__ */ t("div", { className: "dropdown-menu", children: A ? A(C) : C }),
6015
+ dropdownRender: (d) => /* @__PURE__ */ c("div", { className: "dropdown-container", children: [
6016
+ /* @__PURE__ */ t("div", { className: "dropdown-menu", children: G ? G(d) : d }),
6011
6017
  y && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(f1, { size: 28 }) })
6012
6018
  ] })
6013
6019
  }
@@ -6016,14 +6022,14 @@ const J3 = ({
6016
6022
  /* @__PURE__ */ t(
6017
6023
  "label",
6018
6024
  {
6019
- className: `${O || G ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${O ? "label-focused" : ""} ${y ? "label-loading" : ""} ${H ? "label-error" : ""}`,
6025
+ className: `${O || B ? "label-floating" : ""} ${r ? "label-disabled" : ""} ${O ? "label-focused" : ""} ${y ? "label-loading" : ""} ${E ? "label-error" : ""}`,
6020
6026
  children: m ? `${e}*` : e
6021
6027
  }
6022
6028
  ),
6023
6029
  /* @__PURE__ */ t(
6024
6030
  "fieldset",
6025
6031
  {
6026
- className: `${O ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${G ? "fieldset-filled" : ""} ${H ? "fieldset-error" : ""}`,
6032
+ className: `${O ? "fieldset-focused" : ""} ${r ? "fieldset-disabled" : ""} ${B ? "fieldset-filled" : ""} ${E ? "fieldset-error" : ""}`,
6027
6033
  children: /* @__PURE__ */ t("legend", { children: /* @__PURE__ */ t("span", { children: m ? `${e}*` : e }) })
6028
6034
  }
6029
6035
  )
@@ -6031,24 +6037,24 @@ const J3 = ({
6031
6037
  ]
6032
6038
  }
6033
6039
  ),
6034
- H && /* @__PURE__ */ c(t1, { justifyContent: "flex-start", gap: 6, children: [
6040
+ E && /* @__PURE__ */ c(t1, { justifyContent: "flex-start", gap: 6, children: [
6035
6041
  /* @__PURE__ */ t(
6036
6042
  i1,
6037
6043
  {
6038
6044
  name: "attention",
6039
- color: b.NOTIFICATION_ERROR_DARK,
6045
+ color: D.NOTIFICATION_ERROR_DARK,
6040
6046
  height: 16,
6041
6047
  width: 16
6042
6048
  }
6043
6049
  ),
6044
- typeof H == "string" ? /* @__PURE__ */ t(P3, { color: b.NOTIFICATION_ERROR_DARK, variant: "body4", children: H }) : H
6050
+ typeof E == "string" ? /* @__PURE__ */ t(P3, { color: D.NOTIFICATION_ERROR_DARK, variant: "body4", children: E }) : E
6045
6051
  ] })
6046
6052
  ] });
6047
6053
  }
6048
6054
  );
6049
6055
  function q3(i, o = 500) {
6050
6056
  const e = Y();
6051
- return Z(() => () => {
6057
+ return A(() => () => {
6052
6058
  e.current && clearTimeout(e.current);
6053
6059
  }, []), (...n) => {
6054
6060
  const a = setTimeout(() => {
@@ -6057,9 +6063,9 @@ function q3(i, o = 500) {
6057
6063
  clearTimeout(e.current), e.current = a;
6058
6064
  };
6059
6065
  }
6060
- function _1(i) {
6066
+ function R1(i) {
6061
6067
  const o = Y(i);
6062
- return Z(() => {
6068
+ return A(() => {
6063
6069
  o.current = i;
6064
6070
  }, [i]), o.current;
6065
6071
  }
@@ -6076,36 +6082,36 @@ const k1 = 100, q = {
6076
6082
  scrollThresholdValue: p,
6077
6083
  placeholder: r,
6078
6084
  mode: m,
6079
- loadOnClosedState: d,
6085
+ loadOnClosedState: C,
6080
6086
  preloadOptions: h,
6081
6087
  extraOptions: s,
6082
- onDropdownVisibleChange: N,
6083
- optionRender: v,
6084
- dropdownRender: I,
6085
- readOnly: V,
6086
- clearable: f = !1,
6087
- required: A = !1,
6088
- error: B
6088
+ onDropdownVisibleChange: f,
6089
+ optionRender: N,
6090
+ dropdownRender: V,
6091
+ readOnly: Z,
6092
+ clearable: L = !1,
6093
+ required: G = !1,
6094
+ error: M
6089
6095
  }, y) => {
6090
- const [u, H] = _(), [R, x] = _(q), [K, O] = _(!1), [T, F] = _(), [$, E] = _(!1), [D, Q] = _(
6096
+ const [u, E] = _(), [x, H] = _(q), [K, O] = _(!1), [T, F] = _(), [$, I] = _(!1), [b, Q] = _(
6091
6097
  s ?? []
6092
- ), s1 = _1(R.offset), h1 = _1(T), [X, z] = _(!1), j = Y(!1), c1 = W(
6098
+ ), s1 = R1(x.offset), h1 = R1(T), [X, z] = _(!1), j = Y(!1), c1 = W(
6093
6099
  async ({
6094
- limit: L = k1,
6095
- offset: G,
6096
- search: C
6100
+ limit: v = k1,
6101
+ offset: B,
6102
+ search: d
6097
6103
  }) => {
6098
6104
  O(!0);
6099
6105
  try {
6100
6106
  const w = await i({
6101
- limit: L,
6102
- offset: G,
6103
- search: C
6107
+ limit: v,
6108
+ offset: B,
6109
+ search: d
6104
6110
  });
6105
- H(
6106
- (M) => G === 0 ? w.options : [...M ?? [], ...w.options]
6107
- ), x((M) => ({
6108
- ...M,
6111
+ E(
6112
+ (R) => B === 0 ? w.options : [...R ?? [], ...w.options]
6113
+ ), H((R) => ({
6114
+ ...R,
6109
6115
  count: w.count
6110
6116
  }));
6111
6117
  } catch (w) {
@@ -6115,59 +6121,59 @@ const k1 = 100, q = {
6115
6121
  }
6116
6122
  },
6117
6123
  [i]
6118
- ), S = q3((L) => {
6119
- F(L), L || x(q);
6124
+ ), S = q3((v) => {
6125
+ F(v), v || H(q);
6120
6126
  }), e1 = W(
6121
- (L) => S(L),
6127
+ (v) => S(v),
6122
6128
  [S]
6123
6129
  ), a1 = W(
6124
- async (L) => {
6125
- K || L && R.count && R.count > ((u == null ? void 0 : u.length) ?? 0) && x((G) => ({
6126
- ...G,
6127
- offset: G.offset + k1
6130
+ async (v) => {
6131
+ K || v && x.count && x.count > ((u == null ? void 0 : u.length) ?? 0) && H((B) => ({
6132
+ ...B,
6133
+ offset: B.offset + k1
6128
6134
  }));
6129
6135
  },
6130
- [K, u == null ? void 0 : u.length, R.count]
6136
+ [K, u == null ? void 0 : u.length, x.count]
6131
6137
  ), C1 = W(
6132
- (L) => {
6133
- E(L), !L && T && (F(void 0), x(q), z(!0)), N == null || N(L);
6138
+ (v) => {
6139
+ I(v), !v && T && (F(void 0), H(q), z(!0)), f == null || f(v);
6134
6140
  },
6135
- [N, T]
6141
+ [f, T]
6136
6142
  );
6137
- Z(() => {
6143
+ A(() => {
6138
6144
  if (!j.current || K) return;
6139
- (X || $ && (s1 !== R.offset || h1 !== T || !u)) && (c1({ offset: R.offset, limit: k1, search: T }), X && z(!1));
6140
- }, [X, $, R.offset, T, s1, h1, u, K]), Z(() => {
6141
- (d || h) && c1(q), j.current = !0;
6142
- }, []), Z(() => {
6143
- s && Q((L) => {
6144
- const G = s.filter(
6145
- (C) => !L.some((w) => w.value === C.value)
6145
+ (X || $ && (s1 !== x.offset || h1 !== T || !u)) && (c1({ offset: x.offset, limit: k1, search: T }), X && z(!1));
6146
+ }, [X, $, x.offset, T, s1, h1, u, K]), A(() => {
6147
+ (C || h) && c1(q), j.current = !0;
6148
+ }, []), A(() => {
6149
+ s && Q((v) => {
6150
+ const B = s.filter(
6151
+ (d) => !v.some((w) => w.value === d.value)
6146
6152
  );
6147
- return [...L, ...G];
6153
+ return [...v, ...B];
6148
6154
  });
6149
6155
  }, [s]);
6150
6156
  const J = W(
6151
- (L) => {
6152
- e && e(L);
6153
- let G = [];
6154
- if (m ? G = Array.isArray(L) ? L : [] : G = L ? [L] : [], T) {
6155
- const C = G.filter(
6156
- (w) => !(D != null && D.some((M) => M.value === w))
6157
+ (v) => {
6158
+ e && e(v);
6159
+ let B = [];
6160
+ if (m ? B = Array.isArray(v) ? v : [] : B = v ? [v] : [], T) {
6161
+ const d = B.filter(
6162
+ (w) => !(b != null && b.some((R) => R.value === w))
6157
6163
  );
6158
- C.length > 0 && Q((w = []) => [
6164
+ d.length > 0 && Q((w = []) => [
6159
6165
  ...w,
6160
- ...C.map((M) => {
6161
- const w1 = u == null ? void 0 : u.find((o1) => o1.value === M);
6166
+ ...d.map((R) => {
6167
+ const w1 = u == null ? void 0 : u.find((o1) => o1.value === R);
6162
6168
  return {
6163
- value: M,
6164
- label: (w1 == null ? void 0 : w1.label) ?? M
6169
+ value: R,
6170
+ label: (w1 == null ? void 0 : w1.label) ?? R
6165
6171
  };
6166
6172
  })
6167
- ]), F(void 0), x(q), z(!0);
6173
+ ]), F(void 0), H(q), z(!0);
6168
6174
  }
6169
6175
  },
6170
- [e, T, m, u, D]
6176
+ [e, T, m, u, b]
6171
6177
  ), d1 = A1(
6172
6178
  () => ({
6173
6179
  id: n,
@@ -6183,14 +6189,14 @@ const k1 = 100, q = {
6183
6189
  scrollThresholdValue: p,
6184
6190
  onScrollToEnd: a1,
6185
6191
  disabled: a,
6186
- extraOptions: D,
6192
+ extraOptions: b,
6187
6193
  isLoading: K,
6188
- optionRender: v,
6189
- dropdownRender: I,
6190
- readOnly: V,
6191
- clearable: f,
6192
- required: A,
6193
- error: B
6194
+ optionRender: N,
6195
+ dropdownRender: V,
6196
+ readOnly: Z,
6197
+ clearable: L,
6198
+ required: G,
6199
+ error: M
6194
6200
  }),
6195
6201
  [
6196
6202
  n,
@@ -6205,19 +6211,19 @@ const k1 = 100, q = {
6205
6211
  p,
6206
6212
  a1,
6207
6213
  a,
6208
- D,
6214
+ b,
6209
6215
  K,
6210
- v,
6211
- I,
6216
+ N,
6212
6217
  V,
6213
- f,
6214
- A,
6215
- B
6218
+ Z,
6219
+ L,
6220
+ G,
6221
+ M
6216
6222
  ]
6217
6223
  );
6218
6224
  return u1(y, () => ({
6219
6225
  refetchOptions: async () => {
6220
- x(q), F(void 0), z(!0);
6226
+ H(q), F(void 0), z(!0);
6221
6227
  }
6222
6228
  })), m ? /* @__PURE__ */ t(M1, { ...d1, value: l, mode: m }) : /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(M1, { ...d1, value: l }) });
6223
6229
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/async-select",
3
3
  "private": false,
4
- "version": "1.8.22",
4
+ "version": "1.8.23",
5
5
  "type": "module",
6
6
  "main": "dist/async-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,10 +18,10 @@
18
18
  "build": "tsc && vite build"
19
19
  },
20
20
  "dependencies": {
21
- "@snmt-react-ui/select": "^1.18.0"
21
+ "@snmt-react-ui/select": "^1.18.1"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "antd": "^5.18.3"
25
25
  },
26
- "gitHead": "f5de9c8d5c401e3f6a75c2ad1a4c89bef998e47a"
26
+ "gitHead": "17d865b0e12710b8f2abbe30a08abfa5f245144d"
27
27
  }