@snmt-react-ui/async-select 1.7.7 → 1.8.0

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 +278 -275
  2. package/package.json +2 -2
@@ -1,20 +1,20 @@
1
1
  import "./index.css";
2
- import { jsx as t, Fragment as O, jsxs as c } from "react/jsx-runtime";
3
- import { createContext as r1, forwardRef as d1, useState as H, useRef as z, useEffect as B, useCallback as A, useContext as n1, useMemo as Z1, useImperativeHandle as W1 } from "react";
2
+ import { jsx as t, Fragment as F, jsxs as c } from "react/jsx-runtime";
3
+ import { createContext as r1, forwardRef as k1, useState as H, useRef as q, useEffect as I, useCallback as W, useContext as n1, useMemo as Z1, useImperativeHandle as W1 } from "react";
4
4
  import { Select as I1, Flex as A1, Avatar as B1, Checkbox as G1, Typography as x1, Tag as y1, Popover as D1 } from "antd";
5
5
  var j1 = Object.defineProperty, T1 = (i, o, e) => o in i ? j1(i, o, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[o] = e, Y1 = (i, o, e) => T1(i, o + "", e), K1 = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
6
6
  function b1() {
7
7
  if (console && console.warn) {
8
8
  for (var i = arguments.length, o = new Array(i), e = 0; e < i; e++)
9
9
  o[e] = arguments[e];
10
- S(o[0]) && (o[0] = `react-i18next:: ${o[0]}`), console.warn(...o);
10
+ U(o[0]) && (o[0] = `react-i18next:: ${o[0]}`), console.warn(...o);
11
11
  }
12
12
  }
13
13
  const m1 = {};
14
- function g1() {
14
+ function p1() {
15
15
  for (var i = arguments.length, o = new Array(i), e = 0; e < i; e++)
16
16
  o[e] = arguments[e];
17
- S(o[0]) && m1[o[0]] || (S(o[0]) && (m1[o[0]] = /* @__PURE__ */ new Date()), b1(...o));
17
+ U(o[0]) && m1[o[0]] || (U(o[0]) && (m1[o[0]] = /* @__PURE__ */ new Date()), b1(...o));
18
18
  }
19
19
  const _1 = (i, o) => () => {
20
20
  if (i.isInitialized)
@@ -30,27 +30,27 @@ const _1 = (i, o) => () => {
30
30
  }, u1 = (i, o, e) => {
31
31
  i.loadNamespaces(o, _1(i, e));
32
32
  }, v1 = (i, o, e, l) => {
33
- S(e) && (e = [e]), e.forEach((r) => {
33
+ U(e) && (e = [e]), e.forEach((r) => {
34
34
  i.options.ns.indexOf(r) < 0 && i.options.ns.push(r);
35
35
  }), i.loadLanguages(o, _1(i, l));
36
36
  }, O1 = function(i, o) {
37
37
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
38
38
  const l = o.languages[0], r = o.options ? o.options.fallbackLng : !1, a = o.languages[o.languages.length - 1];
39
39
  if (l.toLowerCase() === "cimode") return !0;
40
- const g = (n, L) => {
41
- const k = o.services.backendConnector.state[`${n}|${L}`];
40
+ const g = (n, m) => {
41
+ const k = o.services.backendConnector.state[`${n}|${m}`];
42
42
  return k === -1 || k === 2;
43
43
  };
44
44
  return e.bindI18n && e.bindI18n.indexOf("languageChanging") > -1 && o.services.backendConnector.backend && o.isLanguageChangingTo && !g(o.isLanguageChangingTo, i) ? !1 : !!(o.hasResourceBundle(l, i) || !o.services.backendConnector.backend || o.options.resources && !o.options.partialBundledLanguages || g(l, i) && (!r || g(a, i)));
45
45
  }, S1 = function(i, o) {
46
46
  let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
47
- return !o.languages || !o.languages.length ? (g1("i18n.languages were undefined or empty", o.languages), !0) : o.options.ignoreJSONStructure !== void 0 ? o.hasLoadedNamespace(i, {
47
+ return !o.languages || !o.languages.length ? (p1("i18n.languages were undefined or empty", o.languages), !0) : o.options.ignoreJSONStructure !== void 0 ? o.hasLoadedNamespace(i, {
48
48
  lng: e.lng,
49
49
  precheck: (l, r) => {
50
50
  if (e.bindI18n && e.bindI18n.indexOf("languageChanging") > -1 && l.services.backendConnector.backend && l.isLanguageChangingTo && !r(l.isLanguageChangingTo, i)) return !1;
51
51
  }
52
52
  }) : O1(i, o, e);
53
- }, S = (i) => typeof i == "string", F1 = (i) => typeof i == "object" && i !== null, U1 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, P1 = {
53
+ }, U = (i) => typeof i == "string", F1 = (i) => typeof i == "object" && i !== null, U1 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, P1 = {
54
54
  "&amp;": "&",
55
55
  "&#38;": "&",
56
56
  "&lt;": "<",
@@ -96,11 +96,11 @@ class o2 {
96
96
  }
97
97
  }
98
98
  const i2 = (i, o) => {
99
- const e = z();
100
- return B(() => {
99
+ const e = q();
100
+ return I(() => {
101
101
  e.current = i;
102
102
  }, [i, o]), e.current;
103
- }, R1 = (i, o, e, l) => i.getFixedT(o, e, l), t2 = (i, o, e, l) => A(R1(i, o, e, l), [i, o, e, l]), l2 = function(i) {
103
+ }, R1 = (i, o, e, l) => i.getFixedT(o, e, l), t2 = (i, o, e, l) => W(R1(i, o, e, l), [i, o, e, l]), l2 = function(i) {
104
104
  let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
105
105
  const {
106
106
  i18n: e
@@ -109,48 +109,48 @@ const i2 = (i, o) => {
109
109
  defaultNS: r
110
110
  } = n1(e2) || {}, a = e || l || X1();
111
111
  if (a && !a.reportNamespaces && (a.reportNamespaces = new o2()), !a) {
112
- g1("You will need to pass in an i18next instance by using initReactI18next");
113
- const f = (R, M) => S(M) ? M : F1(M) && S(M.defaultValue) ? M.defaultValue : Array.isArray(R) ? R[R.length - 1] : R, m = [f, {}, !1];
114
- return m.t = f, m.i18n = {}, m.ready = !1, m;
112
+ p1("You will need to pass in an i18next instance by using initReactI18next");
113
+ const p = (N, f) => U(f) ? f : F1(f) && U(f.defaultValue) ? f.defaultValue : Array.isArray(N) ? N[N.length - 1] : N, _ = [p, {}, !1];
114
+ return _.t = p, _.i18n = {}, _.ready = !1, _;
115
115
  }
116
- a.options.react && a.options.react.wait !== void 0 && g1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
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 g = {
118
118
  ...q1(),
119
119
  ...a.options.react,
120
120
  ...o
121
121
  }, {
122
122
  useSuspense: n,
123
- keyPrefix: L
123
+ keyPrefix: m
124
124
  } = g;
125
125
  let k = i;
126
- k = S(k) ? [k] : k || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(k);
127
- const h = (a.isInitialized || a.initializedStoreOnce) && k.every((f) => S1(f, a, g)), s = t2(a, o.lng || null, g.nsMode === "fallback" ? k : k[0], L), x = () => s, Z = () => R1(a, o.lng || null, g.nsMode === "fallback" ? k : k[0], L), [G, y] = H(x);
128
- let _ = k.join();
129
- o.lng && (_ = `${o.lng}${_}`);
130
- const Y = i2(_), E = z(!0);
131
- B(() => {
126
+ k = U(k) ? [k] : k || ["translation"], a.reportNamespaces.addUsedNamespaces && a.reportNamespaces.addUsedNamespaces(k);
127
+ const h = (a.isInitialized || a.initializedStoreOnce) && k.every((p) => S1(p, a, g)), s = t2(a, o.lng || null, g.nsMode === "fallback" ? k : k[0], m), M = () => s, E = () => R1(a, o.lng || null, g.nsMode === "fallback" ? k : k[0], m), [B, G] = H(M);
128
+ let x = k.join();
129
+ o.lng && (x = `${o.lng}${x}`);
130
+ const K = i2(x), Z = q(!0);
131
+ I(() => {
132
132
  const {
133
- bindI18n: f,
134
- bindI18nStore: m
133
+ bindI18n: p,
134
+ bindI18nStore: _
135
135
  } = g;
136
- E.current = !0, !h && !n && (o.lng ? v1(a, o.lng, k, () => {
137
- E.current && y(Z);
136
+ Z.current = !0, !h && !n && (o.lng ? v1(a, o.lng, k, () => {
137
+ Z.current && G(E);
138
138
  }) : u1(a, k, () => {
139
- E.current && y(Z);
140
- })), h && Y && Y !== _ && E.current && y(Z);
141
- const R = () => {
142
- E.current && y(Z);
139
+ Z.current && G(E);
140
+ })), h && K && K !== x && Z.current && G(E);
141
+ const N = () => {
142
+ Z.current && G(E);
143
143
  };
144
- return f && a && a.on(f, R), m && a && a.store.on(m, R), () => {
145
- E.current = !1, f && a && f.split(" ").forEach((M) => a.off(M, R)), m && a && m.split(" ").forEach((M) => a.store.off(M, R));
144
+ return p && a && a.on(p, N), _ && a && a.store.on(_, N), () => {
145
+ Z.current = !1, p && a && p.split(" ").forEach((f) => a.off(f, N)), _ && a && _.split(" ").forEach((f) => a.store.off(f, N));
146
146
  };
147
- }, [a, _]), B(() => {
148
- E.current && h && y(x);
149
- }, [a, L, h]);
150
- const v = [G, a, h];
151
- if (v.t = G, v.i18n = a, v.ready = h, h || !h && !n) return v;
152
- throw new Promise((f) => {
153
- o.lng ? v1(a, o.lng, k, () => f()) : u1(a, k, () => f());
147
+ }, [a, x]), I(() => {
148
+ Z.current && h && G(M);
149
+ }, [a, m, h]);
150
+ const A = [B, a, h];
151
+ if (A.t = B, A.i18n = a, A.ready = h, h || !h && !n) return A;
152
+ throw new Promise((p) => {
153
+ o.lng ? v1(a, o.lng, k, () => p()) : u1(a, k, () => p());
154
154
  });
155
155
  }, t1 = ({
156
156
  children: i,
@@ -188,12 +188,12 @@ const i2 = (i, o) => {
188
188
  }
189
189
  );
190
190
  };
191
- var T = /* @__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.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))(T || {});
192
- const p1 = r1({
191
+ var Y = /* @__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.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))(Y || {});
192
+ const L1 = r1({
193
193
  locale: "en",
194
194
  theme: "light"
195
195
  });
196
- p1.Provider;
196
+ L1.Provider;
197
197
  const n2 = ({
198
198
  checked: i = !0,
199
199
  indeterminate: o = !1,
@@ -202,17 +202,17 @@ const n2 = ({
202
202
  disabled: r = !1,
203
203
  disableUncheck: a = !1
204
204
  }) => {
205
- const [g, n] = H(i), [L, k] = H(o);
206
- B(() => {
205
+ const [g, n] = H(i), [m, k] = H(o);
206
+ I(() => {
207
207
  n(i), k(o);
208
208
  }, [i, o]);
209
- const { theme: h } = n1(p1);
209
+ const { theme: h } = n1(L1);
210
210
  return /* @__PURE__ */ t(
211
211
  G1,
212
212
  {
213
213
  className: `snmt-checkbox snmt-checkbox-${h}`,
214
214
  checked: g,
215
- indeterminate: L,
215
+ indeterminate: m,
216
216
  onChange: (s) => {
217
217
  a && g || (k(!1), n(s.target.checked), l && l(s));
218
218
  },
@@ -3472,14 +3472,14 @@ const s2 = ({
3472
3472
  disabled: a = !1,
3473
3473
  onClick: g
3474
3474
  }) => {
3475
- const [n, L] = H(r), { theme: k } = n1(H1), h = a ? k && k === "dark" ? d.GREY_LIGHT_4 : d.GREY_DARK_1 : l, s = a ? void 0 : g;
3476
- return B(() => {
3475
+ const [n, m] = H(r), { theme: k } = n1(H1), h = a ? k && k === "dark" ? d.GREY_LIGHT_4 : d.GREY_DARK_1 : l, s = a ? void 0 : g;
3476
+ return I(() => {
3477
3477
  if (r) {
3478
- s && !a && L(`${r} clickable`);
3478
+ s && !a && m(`${r} clickable`);
3479
3479
  return;
3480
3480
  }
3481
- s && !a && L("clickable");
3482
- }, [s, r, a]), /* @__PURE__ */ t(O, { children: (() => {
3481
+ s && !a && m("clickable");
3482
+ }, [s, r, a]), /* @__PURE__ */ t(F, { children: (() => {
3483
3483
  switch (i) {
3484
3484
  case "nextIcon":
3485
3485
  return X2({ width: o, height: e, color: h, className: n, onClick: s });
@@ -3734,7 +3734,7 @@ const s2 = ({
3734
3734
  case "docs":
3735
3735
  return b5({ width: o, height: e, color: h, className: n, onClick: s });
3736
3736
  default:
3737
- return /* @__PURE__ */ t(O, { children: "No Icon provided" });
3737
+ return /* @__PURE__ */ t(F, { children: "No Icon provided" });
3738
3738
  }
3739
3739
  })() });
3740
3740
  }, { Title: O5, Text: S5 } = x1, F5 = {
@@ -3742,7 +3742,7 @@ const s2 = ({
3742
3742
  h2: 2,
3743
3743
  h3: 3,
3744
3744
  h4: 4
3745
- }, U5 = d1(
3745
+ }, U5 = k1(
3746
3746
  ({
3747
3747
  align: i = "inherit",
3748
3748
  variant: o = "body1",
@@ -3752,9 +3752,9 @@ const s2 = ({
3752
3752
  collapsed: a,
3753
3753
  whiteSpace: g = "normal"
3754
3754
  }, n) => {
3755
- const L = o === "h1" || o === "h2" || o === "h3" || o === "h4";
3755
+ const m = o === "h1" || o === "h2" || o === "h3" || o === "h4";
3756
3756
  let k = `snmt-typography snmt-typography-${o}`;
3757
- return i && i !== "inherit" && (k += ` snmt-typography-align-${i}`), a && (k += " collapsed"), L ? /* @__PURE__ */ t(
3757
+ return i && i !== "inherit" && (k += ` snmt-typography-align-${i}`), a && (k += " collapsed"), m ? /* @__PURE__ */ t(
3758
3758
  O5,
3759
3759
  {
3760
3760
  className: k,
@@ -7027,14 +7027,14 @@ const P5 = ({
7027
7027
  disabled: a = !1,
7028
7028
  onClick: g
7029
7029
  }) => {
7030
- const [n, L] = H(r), { theme: k } = n1(V1), h = a ? k && k === "dark" ? w.GREY_LIGHT_4 : w.GREY_DARK_1 : l, s = a ? void 0 : g;
7031
- return B(() => {
7030
+ const [n, m] = H(r), { theme: k } = n1(V1), h = a ? k && k === "dark" ? w.GREY_LIGHT_4 : w.GREY_DARK_1 : l, s = a ? void 0 : g;
7031
+ return I(() => {
7032
7032
  if (r) {
7033
- s && !a && L(`${r} clickable`);
7033
+ s && !a && m(`${r} clickable`);
7034
7034
  return;
7035
7035
  }
7036
- s && !a && L("clickable");
7037
- }, [s, r, a]), /* @__PURE__ */ t(O, { children: (() => {
7036
+ s && !a && m("clickable");
7037
+ }, [s, r, a]), /* @__PURE__ */ t(F, { children: (() => {
7038
7038
  switch (i) {
7039
7039
  case "nextIcon":
7040
7040
  return T3({ width: o, height: e, color: h, className: n, onClick: s });
@@ -7289,7 +7289,7 @@ const P5 = ({
7289
7289
  case "docs":
7290
7290
  return V0({ width: o, height: e, color: h, className: n, onClick: s });
7291
7291
  default:
7292
- return /* @__PURE__ */ t(O, { children: "No Icon provided" });
7292
+ return /* @__PURE__ */ t(F, { children: "No Icon provided" });
7293
7293
  }
7294
7294
  })() });
7295
7295
  };
@@ -7342,7 +7342,7 @@ const E1 = ({
7342
7342
  h2: 2,
7343
7343
  h3: 3,
7344
7344
  h4: 4
7345
- }, B0 = d1(
7345
+ }, B0 = k1(
7346
7346
  ({
7347
7347
  align: i = "inherit",
7348
7348
  variant: o = "body1",
@@ -7352,9 +7352,9 @@ const E1 = ({
7352
7352
  collapsed: a,
7353
7353
  whiteSpace: g = "normal"
7354
7354
  }, n) => {
7355
- const L = o === "h1" || o === "h2" || o === "h3" || o === "h4";
7355
+ const m = o === "h1" || o === "h2" || o === "h3" || o === "h4";
7356
7356
  let k = `snmt-typography snmt-typography-${o}`;
7357
- return i && i !== "inherit" && (k += ` snmt-typography-align-${i}`), a && (k += " collapsed"), L ? /* @__PURE__ */ t(
7357
+ return i && i !== "inherit" && (k += ` snmt-typography-align-${i}`), a && (k += " collapsed"), m ? /* @__PURE__ */ t(
7358
7358
  W0,
7359
7359
  {
7360
7360
  className: k,
@@ -7393,8 +7393,8 @@ const E1 = ({
7393
7393
  trigger: "click",
7394
7394
  overlayClassName: `snmt-popover ${a ? "" : "padding"}`,
7395
7395
  open: e ?? g,
7396
- onOpenChange: (L) => {
7397
- n(L), l == null || l(L);
7396
+ onOpenChange: (m) => {
7397
+ n(m), l == null || l(m);
7398
7398
  },
7399
7399
  children: /* @__PURE__ */ t("div", { className: "wrapper", children: i })
7400
7400
  }
@@ -7420,29 +7420,29 @@ const D0 = ({
7420
7420
  options: a,
7421
7421
  extraOptions: g
7422
7422
  }) => {
7423
- const { locale: n } = n1(p1), { t: L } = l2("common", { lng: n }), [k, h] = H(!1);
7424
- if (B(() => {
7423
+ const { locale: n } = n1(L1), { t: m } = l2("common", { lng: n }), [k, h] = H(!1);
7424
+ if (I(() => {
7425
7425
  i.length || h(!1);
7426
7426
  }, [i]), !i.length)
7427
7427
  return null;
7428
- const s = (x) => {
7429
- var Z, G;
7430
- return ((Z = a == null ? void 0 : a.find((_) => _.value === x)) == null ? void 0 : Z.label) || ((G = g == null ? void 0 : g.find((_) => _.value === x)) == null ? void 0 : G.label) || x;
7428
+ const s = (M) => {
7429
+ var E, B;
7430
+ return ((E = a == null ? void 0 : a.find((x) => x.value === M)) == null ? void 0 : E.label) || ((B = g == null ? void 0 : g.find((x) => x.value === M)) == null ? void 0 : B.label) || M;
7431
7431
  };
7432
7432
  return /* @__PURE__ */ c(
7433
7433
  G0,
7434
7434
  {
7435
7435
  content: (
7436
7436
  // 90: paddings + margins + gaps and so on
7437
- /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(t1, { gap: 6, flexWrap: "wrap", children: i.map(({ value: x }) => /* @__PURE__ */ t(
7437
+ /* @__PURE__ */ t("div", { style: { maxWidth: e - 90 }, className: "snmt-popover-from-select", children: /* @__PURE__ */ t(t1, { gap: 6, flexWrap: "wrap", children: i.map(({ value: M }) => /* @__PURE__ */ t(
7438
7438
  E1,
7439
7439
  {
7440
- onClose: () => o(x),
7440
+ onClose: () => o(M),
7441
7441
  closable: l,
7442
7442
  disabled: r,
7443
- children: s(x)
7443
+ children: s(M)
7444
7444
  },
7445
- x
7445
+ M
7446
7446
  )) }) })
7447
7447
  ),
7448
7448
  placement: "bottomRight",
@@ -7451,7 +7451,7 @@ const D0 = ({
7451
7451
  children: [
7452
7452
  i.length,
7453
7453
  " ",
7454
- L("more")
7454
+ m("more")
7455
7455
  ]
7456
7456
  }
7457
7457
  );
@@ -7463,7 +7463,7 @@ const D0 = ({
7463
7463
  backgroundSize: "20% calc(200% + 20px)"
7464
7464
  };
7465
7465
  return /* @__PURE__ */ t("span", { className: "snmt-loader", style: l });
7466
- }, f1 = d1(
7466
+ }, f1 = k1(
7467
7467
  ({
7468
7468
  value: i,
7469
7469
  onChange: o,
@@ -7473,161 +7473,161 @@ const D0 = ({
7473
7473
  options: a,
7474
7474
  width: g,
7475
7475
  disabled: n = !1,
7476
- required: L = !1,
7476
+ required: m = !1,
7477
7477
  clearable: k = !1,
7478
7478
  scrollThresholdValue: h = 50,
7479
7479
  onSearchChange: s,
7480
- onDropdownVisibleChange: x,
7481
- onScrollToEnd: Z,
7482
- onPopupScroll: G,
7483
- id: y,
7484
- extraOptions: _,
7485
- dropdownRender: Y,
7486
- optionRender: E,
7487
- isLoading: v,
7488
- readOnly: f,
7489
- error: m
7490
- }, R) => {
7491
- const [M, J] = H(!1), [W, K] = H(!1), [q, Q] = H(!0), [N, F] = H(i), X = z(null);
7492
- B(() => {
7493
- F(i);
7480
+ onDropdownVisibleChange: M,
7481
+ onScrollToEnd: E,
7482
+ onPopupScroll: B,
7483
+ id: G,
7484
+ extraOptions: x,
7485
+ dropdownRender: K,
7486
+ optionRender: Z,
7487
+ isLoading: A,
7488
+ readOnly: p,
7489
+ error: _
7490
+ }, N) => {
7491
+ const [f, j] = H(!1), [b, y] = H(!1), [O, P] = H(!0), [R, D] = H(i), Q = q(null);
7492
+ I(() => {
7493
+ D(i);
7494
7494
  }, [i]);
7495
7495
  const s1 = (C) => {
7496
- J(C), x && x(C);
7497
- }, e1 = (C, p) => {
7498
- var V;
7499
- return !!((V = p == null ? void 0 : p.label) != null && V.toString().toLowerCase().includes(C.toLowerCase()));
7500
- }, U = () => {
7501
- K(!0);
7502
- }, h1 = () => {
7503
- K(!1);
7504
- }, D = A(
7496
+ j(C), M && M(C);
7497
+ }, h1 = (C, L) => {
7498
+ var v;
7499
+ return !!((v = L == null ? void 0 : L.label) != null && v.toString().toLowerCase().includes(C.toLowerCase()));
7500
+ }, X = () => {
7501
+ y(!0);
7502
+ }, $ = () => {
7503
+ y(!1);
7504
+ }, T = W(
7505
7505
  (C) => {
7506
- if (F(C), l) {
7507
- const V = C;
7508
- o == null || o(V);
7506
+ if (D(C), l) {
7507
+ const v = C;
7508
+ o == null || o(v);
7509
7509
  return;
7510
7510
  }
7511
- const p = C;
7512
- o == null || o(p);
7511
+ const L = C;
7512
+ o == null || o(L);
7513
7513
  },
7514
7514
  [l, o]
7515
- ), c1 = A(() => {
7516
- if (!f) {
7515
+ ), c1 = W(() => {
7516
+ if (!p) {
7517
7517
  if (l) {
7518
- D([]);
7518
+ T([]);
7519
7519
  return;
7520
7520
  }
7521
- D("");
7521
+ T("");
7522
7522
  }
7523
- }, [D, l, f]), b = A(
7523
+ }, [T, l, p]), S = W(
7524
7524
  (C) => {
7525
- const p = N.filter((V) => V !== C);
7526
- D(p), F(p);
7525
+ const L = R.filter((v) => v !== C);
7526
+ T(L), D(L);
7527
7527
  },
7528
- [D, N]
7529
- ), o1 = A(
7530
- (C) => (N == null ? void 0 : N.indexOf(C)) === 0 ? (
7528
+ [T, R]
7529
+ ), e1 = W(
7530
+ (C) => (R == null ? void 0 : R.indexOf(C)) === 0 ? (
7531
7531
  // if the search input is empty
7532
7532
  // then display the placeholder, else do not display it
7533
- /* @__PURE__ */ t("span", { className: "custom-placeholder", children: q ? e : "" })
7534
- ) : /* @__PURE__ */ t(O, {}),
7535
- [q, N, e]
7533
+ /* @__PURE__ */ t("span", { className: "custom-placeholder", children: O ? e : "" })
7534
+ ) : /* @__PURE__ */ t(F, {}),
7535
+ [O, R, e]
7536
7536
  ), a1 = (C) => {
7537
7537
  C.preventDefault(), C.stopPropagation();
7538
7538
  }, C1 = async (C) => {
7539
- const { target: p } = C;
7540
- p.scrollTop + p.offsetHeight >= p.scrollHeight - h && (Z == null || Z(!0)), G && await G(C);
7541
- }, P = A(
7539
+ const { target: L } = C;
7540
+ L.scrollTop + L.offsetHeight >= L.scrollHeight - h && (E == null || E(!0)), B && await B(C);
7541
+ }, z = W(
7542
7542
  (C) => {
7543
- var p, V;
7544
- return ((p = a.find((w1) => w1.value === C)) == null ? void 0 : p.label) || ((V = _ == null ? void 0 : _.find(
7545
- (w1) => w1.value === C
7546
- )) == null ? void 0 : V.label) || C;
7543
+ var L, v;
7544
+ return ((L = a.find((o1) => o1.value === C)) == null ? void 0 : L.label) || ((v = x == null ? void 0 : x.find(
7545
+ (o1) => o1.value === C
7546
+ )) == null ? void 0 : v.label) || C;
7547
7547
  },
7548
- [_, a]
7549
- ), u = A(
7548
+ [x, a]
7549
+ ), d1 = W(
7550
7550
  (C) => {
7551
- var p;
7551
+ var L;
7552
7552
  return /* @__PURE__ */ t(
7553
7553
  D0,
7554
7554
  {
7555
7555
  values: C,
7556
- onTagClose: b,
7557
- maxWidth: ((p = X.current) == null ? void 0 : p.clientWidth) || 0,
7556
+ onTagClose: S,
7557
+ maxWidth: ((L = Q.current) == null ? void 0 : L.clientWidth) || 0,
7558
7558
  disabled: n,
7559
- closable: !f,
7559
+ closable: !p,
7560
7560
  options: a,
7561
- extraOptions: _
7561
+ extraOptions: x
7562
7562
  }
7563
7563
  );
7564
7564
  },
7565
- [n, _, b, a, f]
7566
- ), I = A(
7567
- ({ label: C, value: p, mode: V }) => V === "filter" ? o1(p) : /* @__PURE__ */ t("div", { onMouseDown: a1, className: "tag-wrapper", children: /* @__PURE__ */ t(E1, { onClose: () => b(p), disabled: n, children: typeof C == "object" ? C : P(p) }) }),
7568
- [n, P, b, o1]
7569
- ), j = Array.isArray(N) && N.length > 0 || !!N && typeof N == "string" && N.trim() !== "";
7565
+ [n, x, S, a, p]
7566
+ ), u = W(
7567
+ ({ label: C, value: L, mode: v }) => v === "filter" ? e1(L) : /* @__PURE__ */ t("div", { onMouseDown: a1, className: "tag-wrapper", children: /* @__PURE__ */ t(E1, { onClose: () => S(L), disabled: n, children: typeof C == "object" ? C : z(L) }) }),
7568
+ [n, z, S, e1]
7569
+ ), V = Array.isArray(R) && R.length > 0 || !!R && typeof R == "string" && R.trim() !== "";
7570
7570
  return /* @__PURE__ */ c(
7571
7571
  "div",
7572
7572
  {
7573
- className: `snmt-select-1-15-6 ${W ? "snmt-select-focused" : ""}
7574
- ${l ? "" : "snmt-select-single"} ${f ? "snmt-select-read-only" : ""}`,
7575
- ref: X,
7573
+ className: `snmt-select-1-15-6 ${b ? "snmt-select-focused" : ""}
7574
+ ${l ? "" : "snmt-select-single"} ${p ? "snmt-select-read-only" : ""}`,
7575
+ ref: Q,
7576
7576
  style: { width: g },
7577
7577
  children: [
7578
7578
  /* @__PURE__ */ t(
7579
7579
  I1,
7580
7580
  {
7581
7581
  className: "snmt-select-blank",
7582
- popupClassName: f ? "dropdown-read-only" : "",
7583
- id: y,
7584
- ref: R,
7582
+ popupClassName: p ? "dropdown-read-only" : "",
7583
+ id: G,
7584
+ ref: N,
7585
7585
  showSearch: !!r,
7586
- filterOption: r && e1,
7586
+ filterOption: r && h1,
7587
7587
  onDropdownVisibleChange: s1,
7588
7588
  disabled: n,
7589
- value: N || void 0,
7590
- labelRender: (C) => P(C.value),
7589
+ value: R || void 0,
7590
+ labelRender: (C) => z(C.value),
7591
7591
  mode: l === "filter" ? "multiple" : l,
7592
- onChange: D,
7593
- onFocus: U,
7594
- onBlur: h1,
7592
+ onChange: T,
7593
+ onFocus: X,
7594
+ onBlur: $,
7595
7595
  onSearch: (C) => {
7596
- Q(!C), s && s(C);
7596
+ P(!C), s && s(C);
7597
7597
  },
7598
- onSelect: () => Q(!0),
7599
- onDeselect: () => Q(!0),
7600
- tagRender: (C) => I({ ...C, mode: l }),
7598
+ onSelect: () => P(!0),
7599
+ onDeselect: () => P(!0),
7600
+ tagRender: (C) => u({ ...C, mode: l }),
7601
7601
  maxTagCount: "responsive",
7602
- maxTagPlaceholder: u,
7602
+ maxTagPlaceholder: d1,
7603
7603
  onPopupScroll: C1,
7604
- prefix: v && /* @__PURE__ */ t(N1, { size: 15 }),
7605
- suffixIcon: /* @__PURE__ */ t("div", { className: "wrapper-suffix-icon", children: l !== "filter" && /* @__PURE__ */ c(O, { children: [
7606
- N && !!N.length && (l || k) && /* @__PURE__ */ t("div", { onClick: c1, children: /* @__PURE__ */ t(
7604
+ prefix: A && /* @__PURE__ */ t(N1, { size: 15 }),
7605
+ suffixIcon: /* @__PURE__ */ t("div", { className: "wrapper-suffix-icon", children: l !== "filter" && /* @__PURE__ */ c(F, { children: [
7606
+ R && !!R.length && (l || k) && /* @__PURE__ */ t("div", { onClick: c1, children: /* @__PURE__ */ t(
7607
7607
  i1,
7608
7608
  {
7609
7609
  name: "cancel",
7610
- color: n ? T.GREY_DARK_1 : T.GREY_DARK_5
7610
+ color: n ? Y.GREY_DARK_1 : Y.GREY_DARK_5
7611
7611
  }
7612
7612
  ) }),
7613
7613
  /* @__PURE__ */ t(
7614
7614
  i1,
7615
7615
  {
7616
7616
  name: "selectArrowIcon",
7617
- color: n ? T.GREY_DARK_1 : T.GREY_DARK_5,
7618
- className: M ? "select-arrow-rotated" : "select-arrow",
7619
- onClick: () => J(!M)
7617
+ color: n ? Y.GREY_DARK_1 : Y.GREY_DARK_5,
7618
+ className: f ? "select-arrow-rotated" : "select-arrow",
7619
+ onClick: () => j(!f)
7620
7620
  }
7621
7621
  )
7622
7622
  ] }) }),
7623
- removeIcon: /* @__PURE__ */ t(i1, { name: "errorSmall", color: T.GREY_DARK_2 }),
7623
+ removeIcon: /* @__PURE__ */ t(i1, { name: "errorSmall", color: Y.GREY_DARK_2 }),
7624
7624
  options: a,
7625
- optionRender: (C) => E ? E(C.data) : /* @__PURE__ */ c(t1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
7625
+ optionRender: (C) => Z ? Z(C.data) : /* @__PURE__ */ c(t1, { justifyContent: "space-between", alignItems: "center", flex: "1", children: [
7626
7626
  /* @__PURE__ */ c(t1, { alignItems: "center", gap: 12, children: [
7627
7627
  l && /* @__PURE__ */ t(
7628
7628
  n2,
7629
7629
  {
7630
- checked: !!(N != null && N.includes(C.value))
7630
+ checked: !!(R != null && R.includes(C.value))
7631
7631
  }
7632
7632
  ),
7633
7633
  /* @__PURE__ */ c(t1, { alignItems: "center", gap: 8, children: [
@@ -7635,41 +7635,41 @@ const D0 = ({
7635
7635
  /* @__PURE__ */ t("span", { children: C.label })
7636
7636
  ] })
7637
7637
  ] }),
7638
- !l && N === C.value && /* @__PURE__ */ t(
7638
+ !l && R === C.value && /* @__PURE__ */ t(
7639
7639
  i1,
7640
7640
  {
7641
7641
  name: "ok",
7642
- color: T.BLUE_PRIMARY,
7642
+ color: Y.BLUE_PRIMARY,
7643
7643
  width: 16,
7644
7644
  height: 16
7645
7645
  }
7646
7646
  )
7647
7647
  ] }),
7648
7648
  dropdownRender: (C) => /* @__PURE__ */ c("div", { className: "dropdown-container", children: [
7649
- /* @__PURE__ */ t("div", { className: "dropdown-menu", children: Y ? Y(C) : C }),
7650
- v && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(N1, { size: 28 }) })
7649
+ /* @__PURE__ */ t("div", { className: "dropdown-menu", children: K ? K(C) : C }),
7650
+ A && /* @__PURE__ */ t("div", { className: "loading-overlay", children: /* @__PURE__ */ t(N1, { size: 28 }) })
7651
7651
  ] })
7652
7652
  }
7653
7653
  ),
7654
- e && /* @__PURE__ */ c(O, { children: [
7654
+ e && /* @__PURE__ */ c(F, { children: [
7655
7655
  /* @__PURE__ */ t(
7656
7656
  "label",
7657
7657
  {
7658
- className: `${W || j ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${W ? "label-focused" : ""} ${v ? "label-loading" : ""} ${m ? "label-error" : ""}`,
7659
- children: L ? `${e}*` : e
7658
+ className: `${b || V ? "label-floating" : ""} ${n ? "label-disabled" : ""} ${b ? "label-focused" : ""} ${A ? "label-loading" : ""} ${_ ? "label-error" : ""}`,
7659
+ children: m ? `${e}*` : e
7660
7660
  }
7661
7661
  ),
7662
7662
  /* @__PURE__ */ t(
7663
7663
  "fieldset",
7664
7664
  {
7665
- className: `${W ? "fieldset-focused" : ""} ${n ? "fieldset-disabled" : ""} ${j ? "fieldset-filled" : ""} ${m ? "fieldset-error" : ""}`,
7666
- children: /* @__PURE__ */ t("legend", { children: /* @__PURE__ */ t("span", { children: L ? `${e}*` : e }) })
7665
+ className: `${b ? "fieldset-focused" : ""} ${n ? "fieldset-disabled" : ""} ${V ? "fieldset-filled" : ""} ${_ ? "fieldset-error" : ""}`,
7666
+ children: /* @__PURE__ */ t("legend", { children: /* @__PURE__ */ t("span", { children: m ? `${e}*` : e }) })
7667
7667
  }
7668
7668
  )
7669
7669
  ] }),
7670
- m && /* @__PURE__ */ c(t1, { justifyContent: "flex-start", gap: 6, children: [
7671
- /* @__PURE__ */ t(i1, { name: "attention", color: T.NOTIFICATION_ERROR_DARK }),
7672
- typeof m == "string" ? /* @__PURE__ */ t(B0, { color: T.NOTIFICATION_ERROR_DARK, variant: "body4", children: m }) : m
7670
+ _ && /* @__PURE__ */ c(t1, { justifyContent: "flex-start", gap: 6, children: [
7671
+ /* @__PURE__ */ t(i1, { name: "attention", color: Y.NOTIFICATION_ERROR_DARK }),
7672
+ typeof _ == "string" ? /* @__PURE__ */ t(B0, { color: Y.NOTIFICATION_ERROR_DARK, variant: "body4", children: _ }) : _
7673
7673
  ] })
7674
7674
  ]
7675
7675
  }
@@ -7677,8 +7677,8 @@ const D0 = ({
7677
7677
  }
7678
7678
  );
7679
7679
  function j0(i, o = 500) {
7680
- const e = z();
7681
- return B(() => () => {
7680
+ const e = q();
7681
+ return I(() => () => {
7682
7682
  e.current && clearTimeout(e.current);
7683
7683
  }, []), (...r) => {
7684
7684
  const a = setTimeout(() => {
@@ -7688,14 +7688,14 @@ function j0(i, o = 500) {
7688
7688
  };
7689
7689
  }
7690
7690
  function M1(i) {
7691
- const o = z(i);
7692
- return B(() => {
7691
+ const o = q(i);
7692
+ return I(() => {
7693
7693
  o.current = i;
7694
7694
  }, [i]), o.current;
7695
7695
  }
7696
- const k1 = 100, $ = {
7696
+ const g1 = 100, J = {
7697
7697
  offset: 0
7698
- }, O0 = d1(
7698
+ }, O0 = k1(
7699
7699
  ({
7700
7700
  loadOptions: i,
7701
7701
  width: o,
@@ -7705,148 +7705,151 @@ const k1 = 100, $ = {
7705
7705
  disabled: a,
7706
7706
  scrollThresholdValue: g,
7707
7707
  placeholder: n,
7708
- mode: L,
7708
+ mode: m,
7709
7709
  loadOnClosedState: k,
7710
7710
  preloadOptions: h,
7711
7711
  extraOptions: s,
7712
- onDropdownVisibleChange: x,
7713
- optionRender: Z,
7714
- dropdownRender: G,
7715
- readOnly: y,
7716
- clearable: _,
7717
- required: Y = !1
7718
- }, E) => {
7719
- const [v, f] = H(), [m, R] = H($), [M, J] = H(!1), [W, K] = H(), [q, Q] = H(!1), [N, F] = H(
7712
+ onDropdownVisibleChange: M,
7713
+ optionRender: E,
7714
+ dropdownRender: B,
7715
+ readOnly: G,
7716
+ clearable: x = !1,
7717
+ required: K = !1,
7718
+ error: Z
7719
+ }, A) => {
7720
+ const [p, _] = H(), [N, f] = H(J), [j, b] = H(!1), [y, O] = H(), [P, R] = H(!1), [D, Q] = H(
7720
7721
  s ?? []
7721
- ), X = M1(m.offset), s1 = M1(W), [e1, U] = H(!1), h1 = z(!1), D = A(
7722
+ ), s1 = M1(N.offset), h1 = M1(y), [X, $] = H(!1), T = q(!1), c1 = W(
7722
7723
  async ({
7723
- limit: u = k1,
7724
- offset: I,
7725
- search: j
7724
+ limit: u = g1,
7725
+ offset: V,
7726
+ search: C
7726
7727
  }) => {
7727
- J(!0);
7728
+ b(!0);
7728
7729
  try {
7729
- const C = await i({
7730
+ const L = await i({
7730
7731
  limit: u,
7731
- offset: I,
7732
- search: j
7732
+ offset: V,
7733
+ search: C
7733
7734
  });
7734
- f(
7735
- (p) => I === 0 ? C.options : [...p ?? [], ...C.options]
7736
- ), R((p) => ({
7737
- ...p,
7738
- count: C.count
7735
+ _(
7736
+ (v) => V === 0 ? L.options : [...v ?? [], ...L.options]
7737
+ ), f((v) => ({
7738
+ ...v,
7739
+ count: L.count
7739
7740
  }));
7740
- } catch (C) {
7741
- return console.error("AsyncSelect. fetchOptions error", C), [];
7741
+ } catch (L) {
7742
+ return console.error("AsyncSelect. fetchOptions error", L), [];
7742
7743
  } finally {
7743
- J(!1);
7744
+ b(!1);
7744
7745
  }
7745
7746
  },
7746
7747
  [i]
7747
- ), c1 = j0((u) => {
7748
- K(u), u || R($);
7749
- }), b = A(
7750
- (u) => c1(u),
7751
- [c1]
7752
- ), o1 = A(
7748
+ ), S = j0((u) => {
7749
+ O(u), u || f(J);
7750
+ }), e1 = W(
7751
+ (u) => S(u),
7752
+ [S]
7753
+ ), a1 = W(
7753
7754
  async (u) => {
7754
- M || u && m.count && m.count > ((v == null ? void 0 : v.length) ?? 0) && R((I) => ({
7755
- ...I,
7756
- offset: I.offset + k1
7755
+ j || u && N.count && N.count > ((p == null ? void 0 : p.length) ?? 0) && f((V) => ({
7756
+ ...V,
7757
+ offset: V.offset + g1
7757
7758
  }));
7758
7759
  },
7759
- [M, v == null ? void 0 : v.length, m.count]
7760
- ), a1 = A(
7760
+ [j, p == null ? void 0 : p.length, N.count]
7761
+ ), C1 = W(
7761
7762
  (u) => {
7762
- Q(u), !u && W && (K(void 0), R($), U(!0)), x == null || x(u);
7763
+ R(u), !u && y && (O(void 0), f(J), $(!0)), M == null || M(u);
7763
7764
  },
7764
- [x, W]
7765
+ [M, y]
7765
7766
  );
7766
- B(() => {
7767
- if (!h1.current || M) return;
7768
- (e1 || q && (X !== m.offset || s1 !== W || !v)) && (D({ offset: m.offset, limit: k1, search: W }), e1 && U(!1));
7769
- }, [e1, q, m.offset, W, X, s1, v, M]), B(() => {
7770
- (k || h) && D($), h1.current = !0;
7771
- }, []), B(() => {
7772
- s && F((u) => {
7773
- const I = s.filter(
7774
- (j) => !u.some((C) => C.value === j.value)
7767
+ I(() => {
7768
+ if (!T.current || j) return;
7769
+ (X || P && (s1 !== N.offset || h1 !== y || !p)) && (c1({ offset: N.offset, limit: g1, search: y }), X && $(!1));
7770
+ }, [X, P, N.offset, y, s1, h1, p, j]), I(() => {
7771
+ (k || h) && c1(J), T.current = !0;
7772
+ }, []), I(() => {
7773
+ s && Q((u) => {
7774
+ const V = s.filter(
7775
+ (C) => !u.some((L) => L.value === C.value)
7775
7776
  );
7776
- return [...u, ...I];
7777
+ return [...u, ...V];
7777
7778
  });
7778
7779
  }, [s]);
7779
- const C1 = A(
7780
+ const z = W(
7780
7781
  (u) => {
7781
7782
  e && e(u);
7782
- let I = [];
7783
- if (L ? I = Array.isArray(u) ? u : [] : I = u ? [u] : [], W) {
7784
- const j = I.filter(
7785
- (C) => !(N != null && N.some((p) => p.value === C))
7783
+ let V = [];
7784
+ if (m ? V = Array.isArray(u) ? u : [] : V = u ? [u] : [], y) {
7785
+ const C = V.filter(
7786
+ (L) => !(D != null && D.some((v) => v.value === L))
7786
7787
  );
7787
- j.length > 0 && F((C = []) => [
7788
- ...C,
7789
- ...j.map((p) => {
7790
- const V = v == null ? void 0 : v.find((L1) => L1.value === p);
7788
+ C.length > 0 && Q((L = []) => [
7789
+ ...L,
7790
+ ...C.map((v) => {
7791
+ const w1 = p == null ? void 0 : p.find((o1) => o1.value === v);
7791
7792
  return {
7792
- value: p,
7793
- label: (V == null ? void 0 : V.label) ?? p
7793
+ value: v,
7794
+ label: (w1 == null ? void 0 : w1.label) ?? v
7794
7795
  };
7795
7796
  })
7796
- ]), K(void 0), R($), U(!0);
7797
+ ]), O(void 0), f(J), $(!0);
7797
7798
  }
7798
7799
  },
7799
- [e, W, L, v, N]
7800
- ), P = Z1(
7800
+ [e, y, m, p, D]
7801
+ ), d1 = Z1(
7801
7802
  () => ({
7802
7803
  id: r,
7803
7804
  width: o,
7804
- options: v || [],
7805
- onChange: C1,
7806
- ref: E,
7805
+ options: p || [],
7806
+ onChange: z,
7807
+ ref: A,
7807
7808
  placeholder: n,
7808
7809
  search: !0,
7809
7810
  value: l,
7810
- onSearchChange: b,
7811
- onDropdownVisibleChange: a1,
7811
+ onSearchChange: e1,
7812
+ onDropdownVisibleChange: C1,
7812
7813
  scrollThresholdValue: g,
7813
- onScrollToEnd: o1,
7814
+ onScrollToEnd: a1,
7814
7815
  disabled: a,
7815
- extraOptions: N,
7816
- isLoading: M,
7817
- optionRender: Z,
7818
- dropdownRender: G,
7819
- readOnly: y,
7820
- clearable: _,
7821
- required: Y
7816
+ extraOptions: D,
7817
+ isLoading: j,
7818
+ optionRender: E,
7819
+ dropdownRender: B,
7820
+ readOnly: G,
7821
+ clearable: x,
7822
+ required: K,
7823
+ error: Z
7822
7824
  }),
7823
7825
  [
7824
7826
  r,
7825
7827
  o,
7826
- v,
7827
- C1,
7828
- E,
7828
+ p,
7829
+ z,
7830
+ A,
7829
7831
  n,
7830
7832
  l,
7831
- b,
7832
- a1,
7833
+ e1,
7834
+ C1,
7833
7835
  g,
7834
- o1,
7836
+ a1,
7835
7837
  a,
7836
- N,
7837
- M,
7838
- Z,
7838
+ D,
7839
+ j,
7840
+ E,
7841
+ B,
7839
7842
  G,
7840
- y,
7841
- _,
7842
- Y
7843
+ x,
7844
+ K,
7845
+ Z
7843
7846
  ]
7844
7847
  );
7845
- return W1(E, () => ({
7848
+ return W1(A, () => ({
7846
7849
  refetchOptions: async () => {
7847
- R($), K(void 0), U(!0);
7850
+ f(J), O(void 0), $(!0);
7848
7851
  }
7849
- })), L ? /* @__PURE__ */ t(f1, { ...P, value: l, mode: L }) : /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(f1, { ...P, value: l }) });
7852
+ })), m ? /* @__PURE__ */ t(f1, { ...d1, value: l, mode: m }) : /* @__PURE__ */ t("div", { className: "snmt-async-select", children: /* @__PURE__ */ t(f1, { ...d1, value: l }) });
7850
7853
  }
7851
7854
  );
7852
7855
  export {
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.7.7",
4
+ "version": "1.8.0",
5
5
  "type": "module",
6
6
  "main": "dist/async-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -23,5 +23,5 @@
23
23
  "peerDependencies": {
24
24
  "antd": "^5.18.3"
25
25
  },
26
- "gitHead": "ce3b5d9c1d396223ed981ce68efeb50c2886765a"
26
+ "gitHead": "8d61a4db9fb68d6fa82a8a9bad7d8f1663688f0a"
27
27
  }