@snmt-react-ui/user-select 2.8.1 → 2.8.3

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/user-select.js +98 -90
  2. package/package.json +5 -5
@@ -5805,14 +5805,18 @@ const D5 = ({
5805
5805
  ]
5806
5806
  }
5807
5807
  );
5808
- }, K1 = ({ size: i = 30, color: e = "#004ed7" }) => {
5809
- const t = `no-repeat linear-gradient(${e}
5810
- calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
5811
- width: i,
5812
- background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
5808
+ }, B5 = {
5809
+ small: 20,
5810
+ medium: 28,
5811
+ large: 48
5812
+ }, K1 = ({ size: i = "medium", color: e = "#004ed7" }) => {
5813
+ const t = B5[i], s = `no-repeat linear-gradient(${e}
5814
+ calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, n = {
5815
+ width: t,
5816
+ background: `${s} 0% 100%, ${s} 50% 100%, ${s} 100% 100%`,
5813
5817
  backgroundSize: "20% calc(200% + 20px)"
5814
5818
  };
5815
- return /* @__PURE__ */ r("span", { className: "snmt-loader", style: s });
5819
+ return /* @__PURE__ */ r("span", { className: "snmt-loader", style: n });
5816
5820
  }, $1 = k1(
5817
5821
  ({
5818
5822
  value: i,
@@ -5955,7 +5959,7 @@ const D5 = ({
5955
5959
  maxTagCount: "responsive",
5956
5960
  maxTagPlaceholder: N1,
5957
5961
  onPopupScroll: v1,
5958
- prefix: S && /* @__PURE__ */ r(K1, { size: 15 }),
5962
+ prefix: S && /* @__PURE__ */ r(K1, { size: "small" }),
5959
5963
  suffixIcon: /* @__PURE__ */ r("div", { className: "wrapper-suffix-icon", children: s !== "filter" && /* @__PURE__ */ C(i1, { children: [
5960
5964
  I && !!I.length && (s || d) && /* @__PURE__ */ r(
5961
5965
  "div",
@@ -6010,7 +6014,7 @@ const D5 = ({
6010
6014
  ] }),
6011
6015
  dropdownRender: (L) => /* @__PURE__ */ C("div", { className: "dropdown-container", children: [
6012
6016
  /* @__PURE__ */ r("div", { className: "dropdown-menu", children: _ ? _(L) : L }),
6013
- S && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(K1, { size: 28 }) })
6017
+ S && /* @__PURE__ */ r("div", { className: "loading-overlay", children: /* @__PURE__ */ r(K1, {}) })
6014
6018
  ] })
6015
6019
  }
6016
6020
  ),
@@ -6048,7 +6052,7 @@ const D5 = ({
6048
6052
  ] });
6049
6053
  }
6050
6054
  );
6051
- function B5(i, e = 500) {
6055
+ function j5(i, e = 500) {
6052
6056
  const t = q();
6053
6057
  return j(() => () => {
6054
6058
  t.current && clearTimeout(t.current);
@@ -6117,7 +6121,7 @@ const I1 = 100, l1 = {
6117
6121
  }
6118
6122
  },
6119
6123
  [i]
6120
- ), t1 = B5((A) => {
6124
+ ), t1 = j5((A) => {
6121
6125
  H(A), A || v(l1);
6122
6126
  }), g1 = $(
6123
6127
  (A) => t1(A),
@@ -6224,16 +6228,20 @@ const I1 = 100, l1 = {
6224
6228
  }
6225
6229
  );
6226
6230
  var R1 = /* @__PURE__ */ ((i) => (i.ACTIVE = "Active", i.ARCHIVED = "Archived", i))(R1 || {});
6227
- const j5 = ({ size: i = 30, color: e = "#004ed7" }) => {
6228
- const t = `no-repeat linear-gradient(${e}
6229
- calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, s = {
6230
- width: i,
6231
- background: `${t} 0% 100%, ${t} 50% 100%, ${t} 100% 100%`,
6231
+ const W5 = {
6232
+ small: 20,
6233
+ medium: 28,
6234
+ large: 48
6235
+ }, G5 = ({ size: i = "medium", color: e = "#004ed7" }) => {
6236
+ const t = W5[i], s = `no-repeat linear-gradient(${e}
6237
+ calc(50% - 10px), #0000 0 calc(50% + 10px), ${e} 0)`, n = {
6238
+ width: t,
6239
+ background: `${s} 0% 100%, ${s} 50% 100%, ${s} 100% 100%`,
6232
6240
  backgroundSize: "20% calc(200% + 20px)"
6233
6241
  };
6234
- return /* @__PURE__ */ r("span", { className: "snmt-loader", style: s });
6242
+ return /* @__PURE__ */ r("span", { className: "snmt-loader", style: n });
6235
6243
  };
6236
- function W5() {
6244
+ function K5() {
6237
6245
  if (console && console.warn) {
6238
6246
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
6239
6247
  e[t] = arguments[t];
@@ -6244,7 +6252,7 @@ const Y1 = {};
6244
6252
  function A1() {
6245
6253
  for (var i = arguments.length, e = new Array(i), t = 0; t < i; t++)
6246
6254
  e[t] = arguments[t];
6247
- n1(e[0]) && Y1[e[0]] || (n1(e[0]) && (Y1[e[0]] = /* @__PURE__ */ new Date()), W5(...e));
6255
+ n1(e[0]) && Y1[e[0]] || (n1(e[0]) && (Y1[e[0]] = /* @__PURE__ */ new Date()), K5(...e));
6248
6256
  }
6249
6257
  const ue = (i, e) => () => {
6250
6258
  if (i.isInitialized)
@@ -6263,7 +6271,7 @@ const ue = (i, e) => () => {
6263
6271
  n1(t) && (t = [t]), t.forEach((n) => {
6264
6272
  i.options.ns.indexOf(n) < 0 && i.options.ns.push(n);
6265
6273
  }), i.loadLanguages(e, ue(i, s));
6266
- }, G5 = function(i, e) {
6274
+ }, $5 = function(i, e) {
6267
6275
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6268
6276
  const s = e.languages[0], n = e.options ? e.options.fallbackLng : !1, o = e.languages[e.languages.length - 1];
6269
6277
  if (s.toLowerCase() === "cimode") return !0;
@@ -6272,15 +6280,15 @@ const ue = (i, e) => () => {
6272
6280
  return d === -1 || d === 2;
6273
6281
  };
6274
6282
  return t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && e.services.backendConnector.backend && e.isLanguageChangingTo && !c(e.isLanguageChangingTo, i) ? !1 : !!(e.hasResourceBundle(s, i) || !e.services.backendConnector.backend || e.options.resources && !e.options.partialBundledLanguages || c(s, i) && (!n || c(o, i)));
6275
- }, K5 = function(i, e) {
6283
+ }, P5 = function(i, e) {
6276
6284
  let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
6277
6285
  return !e.languages || !e.languages.length ? (A1("i18n.languages were undefined or empty", e.languages), !0) : e.options.ignoreJSONStructure !== void 0 ? e.hasLoadedNamespace(i, {
6278
6286
  lng: t.lng,
6279
6287
  precheck: (n, o) => {
6280
6288
  if (t.bindI18n && t.bindI18n.indexOf("languageChanging") > -1 && n.services.backendConnector.backend && n.isLanguageChangingTo && !o(n.isLanguageChangingTo, i)) return !1;
6281
6289
  }
6282
- }) : G5(i, e, t);
6283
- }, n1 = (i) => typeof i == "string", $5 = (i) => typeof i == "object" && i !== null, P5 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, F5 = {
6290
+ }) : $5(i, e, t);
6291
+ }, n1 = (i) => typeof i == "string", F5 = (i) => typeof i == "object" && i !== null, Y5 = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g, U5 = {
6284
6292
  "&amp;": "&",
6285
6293
  "&#38;": "&",
6286
6294
  "&lt;": "<",
@@ -6301,7 +6309,7 @@ const ue = (i, e) => () => {
6301
6309
  "&#8230;": "…",
6302
6310
  "&#x2F;": "/",
6303
6311
  "&#47;": "/"
6304
- }, Y5 = (i) => F5[i], U5 = (i) => i.replace(P5, Y5);
6312
+ }, z5 = (i) => U5[i], J5 = (i) => i.replace(Y5, z5);
6305
6313
  let T1 = {
6306
6314
  bindI18n: "languageChanged",
6307
6315
  bindI18nStore: "",
@@ -6310,25 +6318,25 @@ let T1 = {
6310
6318
  transWrapTextNodes: "",
6311
6319
  transKeepBasicHtmlNodesFor: ["br", "strong", "i", "p"],
6312
6320
  useSuspense: !0,
6313
- unescape: U5
6321
+ unescape: J5
6314
6322
  };
6315
- const z5 = function() {
6323
+ const q5 = function() {
6316
6324
  let i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
6317
6325
  T1 = {
6318
6326
  ...T1,
6319
6327
  ...i
6320
6328
  };
6321
- }, J5 = () => T1;
6329
+ }, Q5 = () => T1;
6322
6330
  let Ce;
6323
- const q5 = (i) => {
6331
+ const X5 = (i) => {
6324
6332
  Ce = i;
6325
- }, Q5 = () => Ce, X5 = {
6333
+ }, ei = () => Ce, ti = {
6326
6334
  type: "3rdParty",
6327
6335
  init(i) {
6328
- z5(i.options.react), q5(i);
6336
+ q5(i.options.react), X5(i);
6329
6337
  }
6330
- }, ei = d1();
6331
- class ti {
6338
+ }, ii = d1();
6339
+ class si {
6332
6340
  constructor() {
6333
6341
  B1(this, "getUsedNamespaces", () => Object.keys(this.usedNamespaces));
6334
6342
  this.usedNamespaces = {};
@@ -6339,27 +6347,27 @@ class ti {
6339
6347
  });
6340
6348
  }
6341
6349
  }
6342
- const ii = (i, e) => {
6350
+ const ni = (i, e) => {
6343
6351
  const t = q();
6344
6352
  return j(() => {
6345
6353
  t.current = i;
6346
6354
  }, [i, e]), t.current;
6347
- }, pe = (i, e, t, s) => i.getFixedT(e, t, s), si = (i, e, t, s) => $(pe(i, e, t, s), [i, e, t, s]), ni = function(i) {
6355
+ }, pe = (i, e, t, s) => i.getFixedT(e, t, s), ri = (i, e, t, s) => $(pe(i, e, t, s), [i, e, t, s]), oi = function(i) {
6348
6356
  let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6349
6357
  const {
6350
6358
  i18n: t
6351
6359
  } = e, {
6352
6360
  i18n: s,
6353
6361
  defaultNS: n
6354
- } = r1(ei) || {}, o = t || s || Q5();
6355
- if (o && !o.reportNamespaces && (o.reportNamespaces = new ti()), !o) {
6362
+ } = r1(ii) || {}, o = t || s || ei();
6363
+ if (o && !o.reportNamespaces && (o.reportNamespaces = new si()), !o) {
6356
6364
  A1("You will need to pass in an i18next instance by using initReactI18next");
6357
- const f = (x, v) => n1(v) ? v : $5(v) && n1(v.defaultValue) ? v.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
6365
+ const f = (x, v) => n1(v) ? v : F5(v) && n1(v.defaultValue) ? v.defaultValue : Array.isArray(x) ? x[x.length - 1] : x, N = [f, {}, !1];
6358
6366
  return N.t = f, N.i18n = {}, N.ready = !1, N;
6359
6367
  }
6360
6368
  o.options.react && o.options.react.wait !== void 0 && A1("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");
6361
6369
  const c = {
6362
- ...J5(),
6370
+ ...Q5(),
6363
6371
  ...o.options.react,
6364
6372
  ...e
6365
6373
  }, {
@@ -6368,10 +6376,10 @@ const ii = (i, e) => {
6368
6376
  } = c;
6369
6377
  let d = i;
6370
6378
  d = n1(d) ? [d] : d || ["translation"], o.reportNamespaces.addUsedNamespaces && o.reportNamespaces.addUsedNamespaces(d);
6371
- const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) => K5(f, o, c)), h = si(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => pe(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, k] = T(u);
6379
+ const l = (o.isInitialized || o.initializedStoreOnce) && d.every((f) => P5(f, o, c)), h = ri(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), u = () => h, p = () => pe(o, e.lng || null, c.nsMode === "fallback" ? d : d[0], g), [w, k] = T(u);
6372
6380
  let m = d.join();
6373
6381
  e.lng && (m = `${e.lng}${m}`);
6374
- const _ = ii(m), M = q(!0);
6382
+ const _ = ni(m), M = q(!0);
6375
6383
  j(() => {
6376
6384
  const {
6377
6385
  bindI18n: f,
@@ -6402,11 +6410,11 @@ const ii = (i, e) => {
6402
6410
  i = s, e = n;
6403
6411
  });
6404
6412
  return t.resolve = i, t.reject = e, t;
6405
- }, J1 = (i) => i == null ? "" : "" + i, ri = (i, e, t) => {
6413
+ }, J1 = (i) => i == null ? "" : "" + i, ai = (i, e, t) => {
6406
6414
  i.forEach((s) => {
6407
6415
  e[s] && (t[s] = e[s]);
6408
6416
  });
6409
- }, oi = /###/g, q1 = (i) => i && i.indexOf("###") > -1 ? i.replace(oi, ".") : i, Q1 = (i) => !i || R(i), m1 = (i, e, t) => {
6417
+ }, li = /###/g, q1 = (i) => i && i.indexOf("###") > -1 ? i.replace(li, ".") : i, Q1 = (i) => !i || R(i), m1 = (i, e, t) => {
6410
6418
  const s = R(e) ? e.split(".") : e;
6411
6419
  let n = 0;
6412
6420
  for (; n < s.length - 1; ) {
@@ -6431,7 +6439,7 @@ const ii = (i, e) => {
6431
6439
  for (; a.obj === void 0 && c.length; )
6432
6440
  o = `${c[c.length - 1]}.${o}`, c = c.slice(0, c.length - 1), a = m1(i, c, Object), a && a.obj && typeof a.obj[`${a.k}.${o}`] < "u" && (a.obj = void 0);
6433
6441
  a.obj[`${a.k}.${o}`] = t;
6434
- }, ai = (i, e, t, s) => {
6442
+ }, hi = (i, e, t, s) => {
6435
6443
  const {
6436
6444
  obj: n,
6437
6445
  k: o
@@ -6444,7 +6452,7 @@ const ii = (i, e) => {
6444
6452
  } = m1(i, e);
6445
6453
  if (t)
6446
6454
  return t[s];
6447
- }, li = (i, e, t) => {
6455
+ }, ci = (i, e, t) => {
6448
6456
  const s = M1(i, t);
6449
6457
  return s !== void 0 ? s : M1(e, t);
6450
6458
  }, fe = (i, e, t) => {
@@ -6452,7 +6460,7 @@ const ii = (i, e) => {
6452
6460
  s !== "__proto__" && s !== "constructor" && (s in i ? R(i[s]) || i[s] instanceof String || R(e[s]) || e[s] instanceof String ? t && (i[s] = e[s]) : fe(i[s], e[s], t) : i[s] = e[s]);
6453
6461
  return i;
6454
6462
  }, h1 = (i) => i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
6455
- var hi = {
6463
+ var di = {
6456
6464
  "&": "&amp;",
6457
6465
  "<": "&lt;",
6458
6466
  ">": "&gt;",
@@ -6460,8 +6468,8 @@ var hi = {
6460
6468
  "'": "&#39;",
6461
6469
  "/": "&#x2F;"
6462
6470
  };
6463
- const ci = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => hi[e]) : i;
6464
- class di {
6471
+ const gi = (i) => R(i) ? i.replace(/[&<>"'\/]/g, (e) => di[e]) : i;
6472
+ class ui {
6465
6473
  constructor(e) {
6466
6474
  this.capacity = e, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
6467
6475
  }
@@ -6473,11 +6481,11 @@ class di {
6473
6481
  return this.regExpQueue.length === this.capacity && this.regExpMap.delete(this.regExpQueue.shift()), this.regExpMap.set(e, s), this.regExpQueue.push(e), s;
6474
6482
  }
6475
6483
  }
6476
- const gi = [" ", ",", "?", "!", ";"], ui = new di(20), Ci = (i, e, t) => {
6484
+ const Ci = [" ", ",", "?", "!", ";"], pi = new ui(20), fi = (i, e, t) => {
6477
6485
  e = e || "", t = t || "";
6478
- const s = gi.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6486
+ const s = Ci.filter((c) => e.indexOf(c) < 0 && t.indexOf(c) < 0);
6479
6487
  if (s.length === 0) return !0;
6480
- const n = ui.getRegExp(`(${s.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6488
+ const n = pi.getRegExp(`(${s.map((c) => c === "?" ? "\\?" : c).join("|")})`);
6481
6489
  let o = !n.test(i);
6482
6490
  if (!o) {
6483
6491
  const c = i.indexOf(t);
@@ -6504,7 +6512,7 @@ const gi = [" ", ",", "?", "!", ";"], ui = new di(20), Ci = (i, e, t) => {
6504
6512
  n = c;
6505
6513
  }
6506
6514
  return n;
6507
- }, b1 = (i) => i && i.replace("_", "-"), pi = {
6515
+ }, b1 = (i) => i && i.replace("_", "-"), mi = {
6508
6516
  type: "logger",
6509
6517
  log(i) {
6510
6518
  this.output("log", i);
@@ -6526,7 +6534,7 @@ class y1 {
6526
6534
  }
6527
6535
  init(e) {
6528
6536
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6529
- this.prefix = t.prefix || "i18next:", this.logger = e || pi, this.options = t, this.debug = t.debug;
6537
+ this.prefix = t.prefix || "i18next:", this.logger = e || mi, this.options = t, this.debug = t.debug;
6530
6538
  }
6531
6539
  log() {
6532
6540
  for (var e = arguments.length, t = new Array(e), s = 0; s < e; s++)
@@ -6686,7 +6694,7 @@ const te = {};
6686
6694
  class E1 extends H1 {
6687
6695
  constructor(e) {
6688
6696
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
6689
- super(), ri(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = X.create("translator");
6697
+ super(), ai(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], e, this), this.options = t, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = X.create("translator");
6690
6698
  }
6691
6699
  changeLanguage(e) {
6692
6700
  e && (this.language = e);
@@ -6705,7 +6713,7 @@ class E1 extends H1 {
6705
6713
  s === void 0 && (s = ":");
6706
6714
  const n = t.keySeparator !== void 0 ? t.keySeparator : this.options.keySeparator;
6707
6715
  let o = t.ns || this.options.defaultNS || [];
6708
- const c = s && e.indexOf(s) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !Ci(e, s, n);
6716
+ const c = s && e.indexOf(s) > -1, a = !this.options.userDefinedKeySeparator && !t.keySeparator && !this.options.userDefinedNsSeparator && !t.nsSeparator && !fi(e, s, n);
6709
6717
  if (c && !a) {
6710
6718
  const g = e.match(this.interpolator.nestingRegexp);
6711
6719
  if (g && g.length > 0)
@@ -6995,7 +7003,7 @@ class ie {
6995
7003
  }), n;
6996
7004
  }
6997
7005
  }
6998
- let fi = [{
7006
+ let wi = [{
6999
7007
  lngs: ["ach", "ak", "am", "arn", "br", "fil", "gun", "ln", "mfe", "mg", "mi", "oc", "pt", "pt-BR", "tg", "tl", "ti", "tr", "uz", "wa"],
7000
7008
  nr: [1, 2],
7001
7009
  fc: 1
@@ -7087,7 +7095,7 @@ let fi = [{
7087
7095
  lngs: ["he", "iw"],
7088
7096
  nr: [1, 2, 20, 21],
7089
7097
  fc: 22
7090
- }], mi = {
7098
+ }], ki = {
7091
7099
  1: (i) => +(i > 1),
7092
7100
  2: (i) => +(i != 1),
7093
7101
  3: (i) => 0,
@@ -7111,28 +7119,28 @@ let fi = [{
7111
7119
  21: (i) => i % 100 == 1 ? 1 : i % 100 == 2 ? 2 : i % 100 == 3 || i % 100 == 4 ? 3 : 0,
7112
7120
  22: (i) => i == 1 ? 0 : i == 2 ? 1 : (i < 0 || i > 10) && i % 10 == 0 ? 2 : 3
7113
7121
  };
7114
- const wi = ["v1", "v2", "v3"], ki = ["v4"], se = {
7122
+ const Li = ["v1", "v2", "v3"], vi = ["v4"], se = {
7115
7123
  zero: 0,
7116
7124
  one: 1,
7117
7125
  two: 2,
7118
7126
  few: 3,
7119
7127
  many: 4,
7120
7128
  other: 5
7121
- }, Li = () => {
7129
+ }, Ni = () => {
7122
7130
  const i = {};
7123
- return fi.forEach((e) => {
7131
+ return wi.forEach((e) => {
7124
7132
  e.lngs.forEach((t) => {
7125
7133
  i[t] = {
7126
7134
  numbers: e.nr,
7127
- plurals: mi[e.fc]
7135
+ plurals: ki[e.fc]
7128
7136
  };
7129
7137
  });
7130
7138
  }), i;
7131
7139
  };
7132
- class vi {
7140
+ class xi {
7133
7141
  constructor(e) {
7134
7142
  let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
7135
- this.languageUtils = e, this.options = t, this.logger = X.create("pluralResolver"), (!this.options.compatibilityJSON || ki.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Li(), this.pluralRulesCache = {};
7143
+ this.languageUtils = e, this.options = t, this.logger = X.create("pluralResolver"), (!this.options.compatibilityJSON || vi.includes(this.options.compatibilityJSON)) && (typeof Intl > "u" || !Intl.PluralRules) && (this.options.compatibilityJSON = "v3", this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")), this.rules = Ni(), this.pluralRulesCache = {};
7136
7144
  }
7137
7145
  addRule(e, t) {
7138
7146
  this.rules[e] = t;
@@ -7190,14 +7198,14 @@ class vi {
7190
7198
  return this.options.compatibilityJSON === "v1" ? n === 1 ? "" : typeof n == "number" ? `_plural_${n.toString()}` : o() : this.options.compatibilityJSON === "v2" || this.options.simplifyPluralSuffix && e.numbers.length === 2 && e.numbers[0] === 1 ? o() : this.options.prepend && s.toString() ? this.options.prepend + s.toString() : s.toString();
7191
7199
  }
7192
7200
  shouldUseIntlApi() {
7193
- return !wi.includes(this.options.compatibilityJSON);
7201
+ return !Li.includes(this.options.compatibilityJSON);
7194
7202
  }
7195
7203
  }
7196
7204
  const ne = function(i, e, t) {
7197
- let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = li(i, e, t);
7205
+ let s = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : ".", n = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : !0, o = ci(i, e, t);
7198
7206
  return !o && n && R(t) && (o = Z1(i, t, s), o === void 0 && (o = Z1(e, t, s))), o;
7199
7207
  }, S1 = (i) => i.replace(/\$/g, "$$$$");
7200
- class Ni {
7208
+ class Ri {
7201
7209
  constructor() {
7202
7210
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7203
7211
  this.logger = X.create("interpolator"), this.options = e, this.format = e.interpolation && e.interpolation.format || ((t) => t), this.init(e);
@@ -7226,7 +7234,7 @@ class Ni {
7226
7234
  maxReplaces: _,
7227
7235
  alwaysFormat: M
7228
7236
  } = e.interpolation;
7229
- this.escape = t !== void 0 ? t : ci, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = o ? h1(o) : c || "{{", this.suffix = a ? h1(a) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? h1(u) : p || h1("$t("), this.nestingSuffix = w ? h1(w) : k || h1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = _ || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
7237
+ this.escape = t !== void 0 ? t : gi, this.escapeValue = s !== void 0 ? s : !0, this.useRawValueToEscape = n !== void 0 ? n : !1, this.prefix = o ? h1(o) : c || "{{", this.suffix = a ? h1(a) : g || "}}", this.formatSeparator = d || ",", this.unescapePrefix = l ? "" : h || "-", this.unescapeSuffix = this.unescapePrefix ? "" : l || "", this.nestingPrefix = u ? h1(u) : p || h1("$t("), this.nestingSuffix = w ? h1(w) : k || h1(")"), this.nestingOptionsSeparator = m || ",", this.maxReplaces = _ || 1e3, this.alwaysFormat = M !== void 0 ? M : !1, this.resetRegExp();
7230
7238
  }
7231
7239
  reset() {
7232
7240
  this.options && this.init(this.options);
@@ -7321,7 +7329,7 @@ class Ni {
7321
7329
  return e;
7322
7330
  }
7323
7331
  }
7324
- const xi = (i) => {
7332
+ const Mi = (i) => {
7325
7333
  let e = i.toLowerCase().trim();
7326
7334
  const t = {};
7327
7335
  if (i.indexOf("(") > -1) {
@@ -7352,7 +7360,7 @@ const xi = (i) => {
7352
7360
  return a || (a = i(b1(s), n), e[c] = a), a(t);
7353
7361
  };
7354
7362
  };
7355
- class Ri {
7363
+ class bi {
7356
7364
  constructor() {
7357
7365
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
7358
7366
  this.logger = X.create("formatter"), this.options = e, this.formats = {
@@ -7412,7 +7420,7 @@ class Ri {
7412
7420
  const {
7413
7421
  formatName: d,
7414
7422
  formatOptions: l
7415
- } = xi(g);
7423
+ } = Mi(g);
7416
7424
  if (this.formats[d]) {
7417
7425
  let h = a;
7418
7426
  try {
@@ -7432,10 +7440,10 @@ class Ri {
7432
7440
  }, e);
7433
7441
  }
7434
7442
  }
7435
- const Mi = (i, e) => {
7443
+ const yi = (i, e) => {
7436
7444
  i.pending[e] !== void 0 && (delete i.pending[e], i.pendingCount--);
7437
7445
  };
7438
- class bi extends H1 {
7446
+ class Ei extends H1 {
7439
7447
  constructor(e, t, s) {
7440
7448
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : {};
7441
7449
  super(), this.backend = e, this.store = t, this.services = s, this.languageUtils = s.languageUtils, this.options = n, this.logger = X.create("backendConnector"), this.waitingReads = [], this.maxParallelReads = n.maxParallelReads || 10, this.readingCalls = 0, this.maxRetries = n.maxRetries >= 0 ? n.maxRetries : 5, this.retryTimeout = n.retryTimeout >= 1 ? n.retryTimeout : 350, this.state = {}, this.queue = [], this.backend && this.backend.init && this.backend.init(s, n.backend, n);
@@ -7468,7 +7476,7 @@ class bi extends H1 {
7468
7476
  }), this.state[e] = t ? -1 : 2, t && s && (this.state[e] = 0);
7469
7477
  const a = {};
7470
7478
  this.queue.forEach((g) => {
7471
- ai(g.loaded, [o], c), Mi(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
7479
+ hi(g.loaded, [o], c), yi(g, e), t && g.errors.push(t), g.pendingCount === 0 && !g.done && (Object.keys(g.loaded).forEach((d) => {
7472
7480
  a[d] || (a[d] = {});
7473
7481
  const l = g.loaded[d];
7474
7482
  l.length && l.forEach((h) => {
@@ -7627,7 +7635,7 @@ const re = () => ({
7627
7635
  skipOnVariables: !0
7628
7636
  }
7629
7637
  }), oe = (i) => (R(i.ns) && (i.ns = [i.ns]), R(i.fallbackLng) && (i.fallbackLng = [i.fallbackLng]), R(i.fallbackNS) && (i.fallbackNS = [i.fallbackNS]), i.supportedLngs && i.supportedLngs.indexOf("cimode") < 0 && (i.supportedLngs = i.supportedLngs.concat(["cimode"])), i), x1 = () => {
7630
- }, yi = (i) => {
7638
+ }, _i = (i) => {
7631
7639
  Object.getOwnPropertyNames(Object.getPrototypeOf(i)).forEach((t) => {
7632
7640
  typeof i[t] == "function" && (i[t] = i[t].bind(i));
7633
7641
  });
@@ -7637,7 +7645,7 @@ class w1 extends H1 {
7637
7645
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, t = arguments.length > 1 ? arguments[1] : void 0;
7638
7646
  if (super(), this.options = oe(e), this.services = {}, this.logger = X, this.modules = {
7639
7647
  external: []
7640
- }, yi(this), t && !this.isInitialized && !e.isClone) {
7648
+ }, _i(this), t && !this.isInitialized && !e.isClone) {
7641
7649
  if (!this.options.initImmediate)
7642
7650
  return this.init(e, t), this;
7643
7651
  setTimeout(() => {
@@ -7662,17 +7670,17 @@ class w1 extends H1 {
7662
7670
  if (!this.options.isClone) {
7663
7671
  this.modules.logger ? X.init(o(this.modules.logger), this.options) : X.init(null, this.options);
7664
7672
  let l;
7665
- this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = Ri);
7673
+ this.modules.formatter ? l = this.modules.formatter : typeof Intl < "u" && (l = bi);
7666
7674
  const h = new ie(this.options);
7667
7675
  this.store = new ee(this.options.resources, this.options);
7668
7676
  const u = this.services;
7669
- u.logger = X, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new vi(h, {
7677
+ u.logger = X, u.resourceStore = this.store, u.languageUtils = h, u.pluralResolver = new xi(h, {
7670
7678
  prepend: this.options.pluralSeparator,
7671
7679
  compatibilityJSON: this.options.compatibilityJSON,
7672
7680
  simplifyPluralSuffix: this.options.simplifyPluralSuffix
7673
- }), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = o(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ni(this.options), u.utils = {
7681
+ }), l && (!this.options.interpolation.format || this.options.interpolation.format === n.interpolation.format) && (u.formatter = o(l), u.formatter.init(u, this.options), this.options.interpolation.format = u.formatter.format.bind(u.formatter)), u.interpolator = new Ri(this.options), u.utils = {
7674
7682
  hasLoadedNamespace: this.hasLoadedNamespace.bind(this)
7675
- }, u.backendConnector = new bi(o(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7683
+ }, u.backendConnector = new Ei(o(this.modules.backend), u.resourceStore, u, this.options), u.backendConnector.on("*", function(p) {
7676
7684
  for (var w = arguments.length, k = new Array(w > 1 ? w - 1 : 0), m = 1; m < w; m++)
7677
7685
  k[m - 1] = arguments[m];
7678
7686
  e.emit(p, ...k);
@@ -7886,26 +7894,26 @@ Y.setDefaultNamespace;
7886
7894
  Y.hasLoadedNamespace;
7887
7895
  Y.loadNamespaces;
7888
7896
  Y.loadLanguages;
7889
- const Ei = "Archived", _i = "Deleted", Hi = {
7890
- archived: Ei,
7891
- deleted: _i
7892
- }, Ii = "Заархивирован", Oi = "Удалён", Si = {
7893
- archived: Ii,
7894
- deleted: Oi
7897
+ const Hi = "Archived", Ii = "Deleted", Oi = {
7898
+ archived: Hi,
7899
+ deleted: Ii
7900
+ }, Si = "Заархивирован", Vi = "Удалён", Ai = {
7901
+ archived: Si,
7902
+ deleted: Vi
7895
7903
  };
7896
- Y.use(X5).init({
7904
+ Y.use(ti).init({
7897
7905
  defaultNS: "common",
7898
7906
  lng: "en",
7899
7907
  resources: {
7900
7908
  en: {
7901
- common: Hi
7909
+ common: Oi
7902
7910
  },
7903
7911
  ru: {
7904
- common: Si
7912
+ common: Ai
7905
7913
  }
7906
7914
  }
7907
7915
  });
7908
- const ji = k1(
7916
+ const Gi = k1(
7909
7917
  ({
7910
7918
  fetchParams: i,
7911
7919
  mode: e = void 0,
@@ -7920,7 +7928,7 @@ const ji = k1(
7920
7928
  required: l,
7921
7929
  error: h
7922
7930
  }, u) => {
7923
- const { axiosPeople: p, locale: w } = r1(Ee), { t: k } = ni("common", { lng: w }), [m, _] = T([]), [M, S] = T(!0), f = q(m), N = q(null);
7931
+ const { axiosPeople: p, locale: w } = r1(Ee), { t: k } = oi("common", { lng: w }), [m, _] = T([]), [M, S] = T(!0), f = q(m), N = q(null);
7924
7932
  if (_1(u, () => N.current), !p)
7925
7933
  throw new Error(
7926
7934
  `UserSelect requires "axiosPeople" to fetch users.
@@ -8031,7 +8039,7 @@ const ji = k1(
8031
8039
  [a, v]
8032
8040
  );
8033
8041
  if (M)
8034
- return /* @__PURE__ */ r(j5, {});
8042
+ return /* @__PURE__ */ r(G5, {});
8035
8043
  const F = {
8036
8044
  ref: N,
8037
8045
  placeholder: t,
@@ -8066,5 +8074,5 @@ const ji = k1(
8066
8074
  }
8067
8075
  );
8068
8076
  export {
8069
- ji as UserSelect
8077
+ Gi as UserSelect
8070
8078
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@snmt-react-ui/user-select",
3
3
  "private": false,
4
- "version": "2.8.1",
4
+ "version": "2.8.3",
5
5
  "type": "module",
6
6
  "main": "dist/user-select.js",
7
7
  "types": "dist/index.d.ts",
@@ -18,15 +18,15 @@
18
18
  "build": "tsc && vite build"
19
19
  },
20
20
  "dependencies": {
21
- "@snmt-react-ui/async-select": "^1.9.1",
21
+ "@snmt-react-ui/async-select": "^1.9.3",
22
22
  "@snmt-react-ui/core": "^2.4.0",
23
- "@snmt-react-ui/loader": "^1.5.0",
24
- "@snmt-react-ui/select": "^1.19.1"
23
+ "@snmt-react-ui/loader": "^2.1.0",
24
+ "@snmt-react-ui/select": "^1.20.0"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "antd": "^5.22.3",
28
28
  "i18next": "^23.11.1",
29
29
  "react-i18next": "^14.1.0"
30
30
  },
31
- "gitHead": "b2140fff934bfa6a07b26714b36c79e1937e0ae9"
31
+ "gitHead": "1a01a169053a07bad6ab32f44956ad73e10355de"
32
32
  }