mhz-helpers 1.0.36 → 1.0.37

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/index.js +51 -49
  2. package/package.json +6 -6
package/dist/index.js CHANGED
@@ -771,13 +771,13 @@ var ke = Le(), Z = /* @__PURE__ */ function() {
771
771
  }), se = K({}, se, l.rule.fields);
772
772
  var ct = {};
773
773
  Object.keys(se).forEach(function(L) {
774
- var _ = se[L], _n = Array.isArray(_) ? _ : [_];
775
- ct[L] = _n.map(v.bind(null, L));
774
+ var U = se[L], Un = Array.isArray(U) ? U : [U];
775
+ ct[L] = Un.map(v.bind(null, L));
776
776
  });
777
777
  var ft = new t(ct);
778
778
  ft.messages(u.messages), l.rule.options && (l.rule.options.messages = u.messages, l.rule.options.error = u.error), ft.validate(l.value, l.rule.options || u, function(L) {
779
- var _ = [];
780
- j && j.length && _.push.apply(_, j), L && L.length && _.push.apply(_, L), g(_.length ? _ : null);
779
+ var U = [];
780
+ j && j.length && U.push.apply(U, j), L && L.length && U.push.apply(U, L), g(U.length ? U : null);
781
781
  });
782
782
  }
783
783
  }
@@ -962,22 +962,22 @@ const { toString: Tr } = Object.prototype, { getPrototypeOf: tt } = Object, Ee =
962
962
  return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
963
963
  })(/* @__PURE__ */ Object.create(null)), M = (t) => (t = t.toLowerCase(), (e) => Ee(e) === t), Ae = (t) => (e) => typeof e === t, { isArray: ne } = Array, ce = Ae("undefined");
964
964
  function xr(t) {
965
- return t !== null && !ce(t) && t.constructor !== null && !ce(t.constructor) && U(t.constructor.isBuffer) && t.constructor.isBuffer(t);
965
+ return t !== null && !ce(t) && t.constructor !== null && !ce(t.constructor) && _(t.constructor.isBuffer) && t.constructor.isBuffer(t);
966
966
  }
967
967
  const Jt = M("ArrayBuffer");
968
968
  function qr(t) {
969
969
  let e;
970
970
  return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && Jt(t.buffer), e;
971
971
  }
972
- const Dr = Ae("string"), U = Ae("function"), Xt = Ae("number"), Se = (t) => t !== null && typeof t == "object", Ur = (t) => t === !0 || t === !1, ye = (t) => {
972
+ const Dr = Ae("string"), _ = Ae("function"), Xt = Ae("number"), Se = (t) => t !== null && typeof t == "object", _r = (t) => t === !0 || t === !1, ye = (t) => {
973
973
  if (Ee(t) !== "object")
974
974
  return !1;
975
975
  const e = tt(t);
976
976
  return (e === null || e === Object.prototype || Object.getPrototypeOf(e) === null) && !(Symbol.toStringTag in t) && !(Symbol.iterator in t);
977
- }, _r = M("Date"), Nr = M("File"), Ir = M("Blob"), Mr = M("FileList"), Qr = (t) => Se(t) && U(t.pipe), jr = (t) => {
977
+ }, Ur = M("Date"), Nr = M("File"), Ir = M("Blob"), Mr = M("FileList"), Qr = (t) => Se(t) && _(t.pipe), jr = (t) => {
978
978
  let e;
979
- return t && (typeof FormData == "function" && t instanceof FormData || U(t.append) && ((e = Ee(t)) === "formdata" || // detect form-data instance
980
- e === "object" && U(t.toString) && t.toString() === "[object FormData]"));
979
+ return t && (typeof FormData == "function" && t instanceof FormData || _(t.append) && ((e = Ee(t)) === "formdata" || // detect form-data instance
980
+ e === "object" && _(t.toString) && t.toString() === "[object FormData]"));
981
981
  }, Lr = M("URLSearchParams"), kr = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
982
982
  function le(t, e, { allOwnKeys: n = !1 } = {}) {
983
983
  if (t === null || typeof t > "u")
@@ -1013,7 +1013,7 @@ function Be() {
1013
1013
  return e;
1014
1014
  }
1015
1015
  const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
1016
- n && U(s) ? t[i] = Gt(s, n) : t[i] = s;
1016
+ n && _(s) ? t[i] = Gt(s, n) : t[i] = s;
1017
1017
  }, { allOwnKeys: r }), t), Hr = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Vr = (t, e, n, r) => {
1018
1018
  t.prototype = Object.create(e.prototype, r), t.prototype.constructor = t, Object.defineProperty(t, "super", {
1019
1019
  value: e.prototype
@@ -1071,10 +1071,10 @@ const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
1071
1071
  }), Object.defineProperties(t, r);
1072
1072
  }, es = (t) => {
1073
1073
  tn(t, (e, n) => {
1074
- if (U(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1074
+ if (_(t) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
1075
1075
  return !1;
1076
1076
  const r = t[n];
1077
- if (U(r)) {
1077
+ if (_(r)) {
1078
1078
  if (e.enumerable = !1, "writable" in e) {
1079
1079
  e.writable = !1;
1080
1080
  return;
@@ -1104,7 +1104,7 @@ const Br = (t, e, n, { allOwnKeys: r } = {}) => (le(e, (s, i) => {
1104
1104
  return n;
1105
1105
  };
1106
1106
  function is(t) {
1107
- return !!(t && U(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
1107
+ return !!(t && _(t.append) && t[Symbol.toStringTag] === "FormData" && t[Symbol.iterator]);
1108
1108
  }
1109
1109
  const os = (t) => {
1110
1110
  const e = new Array(10), n = (r, s) => {
@@ -1123,7 +1123,7 @@ const os = (t) => {
1123
1123
  return r;
1124
1124
  };
1125
1125
  return n(t, 0);
1126
- }, as = M("AsyncFunction"), us = (t) => t && (Se(t) || U(t)) && U(t.then) && U(t.catch), h = {
1126
+ }, as = M("AsyncFunction"), us = (t) => t && (Se(t) || _(t)) && _(t.then) && _(t.catch), h = {
1127
1127
  isArray: ne,
1128
1128
  isArrayBuffer: Jt,
1129
1129
  isBuffer: xr,
@@ -1131,15 +1131,15 @@ const os = (t) => {
1131
1131
  isArrayBufferView: qr,
1132
1132
  isString: Dr,
1133
1133
  isNumber: Xt,
1134
- isBoolean: Ur,
1134
+ isBoolean: _r,
1135
1135
  isObject: Se,
1136
1136
  isPlainObject: ye,
1137
1137
  isUndefined: ce,
1138
- isDate: _r,
1138
+ isDate: Ur,
1139
1139
  isFile: Nr,
1140
1140
  isBlob: Ir,
1141
1141
  isRegExp: Zr,
1142
- isFunction: U,
1142
+ isFunction: _,
1143
1143
  isStream: Qr,
1144
1144
  isURLSearchParams: Lr,
1145
1145
  isTypedArray: Wr,
@@ -1448,6 +1448,8 @@ function Es(t) {
1448
1448
  function ln(t) {
1449
1449
  function e(n, r, s, i) {
1450
1450
  let o = n[i++];
1451
+ if (o === "__proto__")
1452
+ return !0;
1451
1453
  const a = Number.isFinite(+o), u = i >= n.length;
1452
1454
  return o = !o && h.isArray(s) ? s.length : o, u ? (h.hasOwnProp(s, o) ? s[o] = [s[o], r] : s[o] = r, !a) : ((!s[o] || !h.isObject(s[o])) && (s[o] = []), e(n, r, s[o], i) && h.isArray(s[o]) && (s[o] = Es(s[o])), !a);
1453
1455
  }
@@ -1777,13 +1779,13 @@ const qs = I.hasStandardBrowserEnv ? (
1777
1779
  function Ds(t) {
1778
1780
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
1779
1781
  }
1780
- function Us(t, e) {
1782
+ function _s(t, e) {
1781
1783
  return e ? t.replace(/\/?\/$/, "") + "/" + e.replace(/^\/+/, "") : t;
1782
1784
  }
1783
1785
  function dn(t, e) {
1784
- return t && !Ds(e) ? Us(t, e) : e;
1786
+ return t && !Ds(e) ? _s(t, e) : e;
1785
1787
  }
1786
- const _s = I.hasStandardBrowserEnv ? (
1788
+ const Us = I.hasStandardBrowserEnv ? (
1787
1789
  // Standard browser envs have full support of the APIs needed to test
1788
1790
  // whether the request URL is of the same origin as current location.
1789
1791
  function() {
@@ -1911,7 +1913,7 @@ const Ms = typeof XMLHttpRequest < "u", Qs = Ms && function(t) {
1911
1913
  t,
1912
1914
  c
1913
1915
  )), c = null;
1914
- }, I.hasStandardBrowserEnv && (a && h.isFunction(a) && (a = a(t)), a || a !== !1 && _s(d))) {
1916
+ }, I.hasStandardBrowserEnv && (a && h.isFunction(a) && (a = a(t)), a || a !== !1 && Us(d))) {
1915
1917
  const l = t.xsrfHeaderName && t.xsrfCookieName && qs.read(t.xsrfCookieName);
1916
1918
  l && i.set(t.xsrfHeaderName, l);
1917
1919
  }
@@ -2060,7 +2062,7 @@ function ee(t, e) {
2060
2062
  h.isUndefined(d) && c !== a || (n[p] = d);
2061
2063
  }), n;
2062
2064
  }
2063
- const yn = "1.6.3", it = {};
2065
+ const yn = "1.6.4", it = {};
2064
2066
  ["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
2065
2067
  it[t] = function(r) {
2066
2068
  return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
@@ -2605,7 +2607,7 @@ var On = class {
2605
2607
  this.revert = t?.revert, this.silent = t?.silent;
2606
2608
  }
2607
2609
  };
2608
- function Ue(t) {
2610
+ function _e(t) {
2609
2611
  return t instanceof On;
2610
2612
  }
2611
2613
  function wn(t) {
@@ -2848,10 +2850,10 @@ var T = Zs(), En = class {
2848
2850
  this
2849
2851
  ), this.#t = this.state, (this.state.fetchStatus === "idle" || this.state.fetchMeta !== o.fetchOptions?.meta) && this.#a({ type: "fetch", meta: o.fetchOptions?.meta });
2850
2852
  const a = (u) => {
2851
- Ue(u) && u.silent || this.#a({
2853
+ _e(u) && u.silent || this.#a({
2852
2854
  type: "error",
2853
2855
  error: u
2854
- }), Ue(u) || (this.#n.config.onError?.(
2856
+ }), _e(u) || (this.#n.config.onError?.(
2855
2857
  u,
2856
2858
  this
2857
2859
  ), this.#n.config.onSettled?.(
@@ -2939,7 +2941,7 @@ var T = Zs(), En = class {
2939
2941
  };
2940
2942
  case "error":
2941
2943
  const r = t.error;
2942
- return Ue(r) && r.revert && this.#t ? { ...this.#t, fetchStatus: "idle" } : {
2944
+ return _e(r) && r.revert && this.#t ? { ...this.#t, fetchStatus: "idle" } : {
2943
2945
  ...n,
2944
2946
  error: r,
2945
2947
  errorUpdateCount: n.errorUpdateCount + 1,
@@ -3340,7 +3342,7 @@ function ri(t) {
3340
3342
  };
3341
3343
  let b;
3342
3344
  if (i && o.length) {
3343
- const m = i === "backward", l = m ? si : Ut, g = {
3345
+ const m = i === "backward", l = m ? si : _t, g = {
3344
3346
  pages: o,
3345
3347
  pageParams: a
3346
3348
  }, y = l(s, g);
@@ -3352,7 +3354,7 @@ function ri(t) {
3352
3354
  );
3353
3355
  const m = t ?? o.length;
3354
3356
  for (let l = 1; l < m; l++) {
3355
- const g = Ut(s, b);
3357
+ const g = _t(s, b);
3356
3358
  b = await d(b, g);
3357
3359
  }
3358
3360
  }
@@ -3370,7 +3372,7 @@ function ri(t) {
3370
3372
  }
3371
3373
  };
3372
3374
  }
3373
- function Ut(t, { pages: e, pageParams: n }) {
3375
+ function _t(t, { pages: e, pageParams: n }) {
3374
3376
  const r = e.length - 1;
3375
3377
  return t.getNextPageParam(
3376
3378
  e[r],
@@ -3599,7 +3601,7 @@ var ii = class {
3599
3601
  this.refetch = this.refetch.bind(this);
3600
3602
  }
3601
3603
  onSubscribe() {
3602
- this.listeners.size === 1 && (this.#t.addObserver(this), _t(this.#t, this.options) ? this.#p() : this.updateResult(), this.#b());
3604
+ this.listeners.size === 1 && (this.#t.addObserver(this), Ut(this.#t, this.options) ? this.#p() : this.updateResult(), this.#b());
3603
3605
  }
3604
3606
  onUnsubscribe() {
3605
3607
  this.hasListeners() || this.destroy();
@@ -3715,7 +3717,7 @@ var ii = class {
3715
3717
  const n = this.#t, r = this.options, s = this.#r, i = this.#s, o = this.#i, u = t !== n ? t.state : this.#n, { state: f } = t;
3716
3718
  let { error: p, errorUpdatedAt: c, fetchStatus: d, status: b } = f, m = !1, l;
3717
3719
  if (e._optimisticResults) {
3718
- const R = this.hasListeners(), C = !R && _t(t, e), Q = R && Nt(t, n, e, r);
3720
+ const R = this.hasListeners(), C = !R && Ut(t, e), Q = R && Nt(t, n, e, r);
3719
3721
  (C || Q) && (d = Ce(t.options.networkMode) ? "fetching" : "paused", f.dataUpdatedAt || (b = "pending")), e._optimisticResults === "isRestoring" && (d = "idle");
3720
3722
  }
3721
3723
  if (e.select && typeof f.data < "u")
@@ -3822,7 +3824,7 @@ var ii = class {
3822
3824
  function ai(t, e) {
3823
3825
  return e.enabled !== !1 && !t.state.dataUpdatedAt && !(t.state.status === "error" && e.retryOnMount === !1);
3824
3826
  }
3825
- function _t(t, e) {
3827
+ function Ut(t, e) {
3826
3828
  return ai(t, e) || t.state.dataUpdatedAt > 0 && Je(t, e, e.refetchOnMount);
3827
3829
  }
3828
3830
  function Je(t, e, n) {
@@ -4159,15 +4161,15 @@ function Oi(t, e) {
4159
4161
  }
4160
4162
  }
4161
4163
  /**
4162
- * match-sorter-utils
4163
- *
4164
- * Copyright (c) TanStack
4165
- *
4166
- * This source code is licensed under the MIT license found in the
4167
- * LICENSE.md file in the root directory of this source tree.
4168
- *
4169
- * @license MIT
4170
- */
4164
+ * match-sorter-utils
4165
+ *
4166
+ * Copyright (c) TanStack
4167
+ *
4168
+ * This source code is licensed under the MIT license found in the
4169
+ * LICENSE.md file in the root directory of this source tree.
4170
+ *
4171
+ * @license MIT
4172
+ */
4171
4173
  const Dn = {
4172
4174
  À: "A",
4173
4175
  Á: "A",
@@ -4703,12 +4705,12 @@ function qi(t) {
4703
4705
  const e = z(t);
4704
4706
  return e === 0 ? 27647 : e === 4 ? 9193963 : e === 2 ? 16757248 : e === 3 ? 4148832 : 33575;
4705
4707
  }
4706
- var Di = (t, e) => t.queryHash.localeCompare(e.queryHash), Un = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, Ui = (t, e) => z(t) === z(e) ? Un(t, e) : z(t) > z(e) ? 1 : -1, _e = {
4707
- "Status > Last Updated": Ui,
4708
+ var Di = (t, e) => t.queryHash.localeCompare(e.queryHash), _n = (t, e) => t.state.dataUpdatedAt < e.state.dataUpdatedAt ? 1 : -1, _i = (t, e) => z(t) === z(e) ? _n(t, e) : z(t) > z(e) ? 1 : -1, Ue = {
4709
+ "Status > Last Updated": _i,
4708
4710
  "Query Hash": Di,
4709
- "Last Updated": Un
4711
+ "Last Updated": _n
4710
4712
  }, V = "vue-query", Ne = "Vue Query";
4711
- function _i(t, e) {
4713
+ function Ui(t, e) {
4712
4714
  Oi(
4713
4715
  {
4714
4716
  id: V,
@@ -4737,11 +4739,11 @@ function _i(t, e) {
4737
4739
  sortFn: {
4738
4740
  type: "choice",
4739
4741
  label: "Sort Function",
4740
- options: Object.keys(_e).map((n) => ({
4742
+ options: Object.keys(Ue).map((n) => ({
4741
4743
  label: n,
4742
4744
  value: n
4743
4745
  })),
4744
- defaultValue: Object.keys(_e)[0]
4746
+ defaultValue: Object.keys(Ue)[0]
4745
4747
  },
4746
4748
  onlineMode: {
4747
4749
  type: "choice",
@@ -4850,7 +4852,7 @@ function _i(t, e) {
4850
4852
  const o = s.getAll(), a = n.getSettings(), p = (i.filter ? o.filter(
4851
4853
  (c) => Si(c.queryHash, i.filter).passed
4852
4854
  ) : [...o]).sort(
4853
- (c, d) => _e[a.sortFn](c, d) * a.baseSort
4855
+ (c, d) => Ue[a.sortFn](c, d) * a.baseSort
4854
4856
  ).map((c) => {
4855
4857
  const d = jt(c);
4856
4858
  return {
@@ -4940,7 +4942,7 @@ var so = {
4940
4942
  i(), o();
4941
4943
  };
4942
4944
  }
4943
- t.provide(n, r), process.env.NODE_ENV === "development" && _i(t, r);
4945
+ t.provide(n, r), process.env.NODE_ENV === "development" && Ui(t, r);
4944
4946
  }
4945
4947
  };
4946
4948
  function Ni(t, e, n) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mhz-helpers",
3
3
  "description": "9000 Mhz frontend helpers and composables",
4
- "version": "1.0.36",
4
+ "version": "1.0.37",
5
5
  "author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
6
6
  "license": "MIT",
7
7
  "type": "module",
@@ -22,12 +22,12 @@
22
22
  "ts": "vue-tsc --noEmit"
23
23
  },
24
24
  "dependencies": {
25
- "@tanstack/vue-query": "5.17.0",
25
+ "@tanstack/vue-query": "5.17.2",
26
26
  "@vueuse/core": "10.7.1",
27
27
  "@vueuse/integrations": "10.7.1",
28
28
  "async-validator": "4.2.5",
29
- "axios": "1.6.3",
30
- "vue": "3.4.3",
29
+ "axios": "1.6.4",
30
+ "vue": "3.4.5",
31
31
  "vue-router": "4.2.5"
32
32
  },
33
33
  "devDependencies": {
@@ -49,13 +49,13 @@
49
49
  "stylelint-config-recommended-vue": "1.5.0",
50
50
  "stylelint-prettier": "5.0.0",
51
51
  "typescript": "5.3.3",
52
- "vite": "5.0.10",
52
+ "vite": "5.0.11",
53
53
  "vite-plugin-dts": "3.7.0",
54
54
  "vue-linters-config": "0.1.13",
55
55
  "vue-tsc": "1.8.27"
56
56
  },
57
57
  "peerDependencies": {
58
- "vue": "3.4.3",
58
+ "vue": "3.4.5",
59
59
  "vue-router": "4.2.5"
60
60
  },
61
61
  "engines": {