mhz-helpers 1.0.42 → 1.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +20 -18
- package/package.json +16 -16
package/dist/index.js
CHANGED
|
@@ -2504,7 +2504,7 @@ function vn(t, e) {
|
|
|
2504
2504
|
return e;
|
|
2505
2505
|
}
|
|
2506
2506
|
function ve(t, e) {
|
|
2507
|
-
if (
|
|
2507
|
+
if (!e || Object.keys(t).length !== Object.keys(e).length)
|
|
2508
2508
|
return !1;
|
|
2509
2509
|
for (const n in t)
|
|
2510
2510
|
if (t[n] !== e[n])
|
|
@@ -3432,7 +3432,8 @@ var ii = class {
|
|
|
3432
3432
|
return this.#t.findAll({ ...e, status: "pending" }).length;
|
|
3433
3433
|
}
|
|
3434
3434
|
getQueryData(e) {
|
|
3435
|
-
|
|
3435
|
+
const n = this.defaultQueryOptions({ queryKey: e });
|
|
3436
|
+
return this.#e.get(n.queryHash)?.state.data;
|
|
3436
3437
|
}
|
|
3437
3438
|
ensureQueryData(e) {
|
|
3438
3439
|
const n = this.getQueryData(e.queryKey);
|
|
@@ -3445,11 +3446,11 @@ var ii = class {
|
|
|
3445
3446
|
});
|
|
3446
3447
|
}
|
|
3447
3448
|
setQueryData(e, n, r) {
|
|
3448
|
-
const
|
|
3449
|
-
|
|
3450
|
-
|
|
3451
|
-
|
|
3452
|
-
|
|
3449
|
+
const s = this.defaultQueryOptions({ queryKey: e }), o = this.#e.get(
|
|
3450
|
+
s.queryHash
|
|
3451
|
+
)?.state.data, a = Ks(n, o);
|
|
3452
|
+
if (!(typeof a > "u"))
|
|
3453
|
+
return this.#e.build(this, s).setData(a, { ...r, manual: !0 });
|
|
3453
3454
|
}
|
|
3454
3455
|
setQueriesData(e, n, r) {
|
|
3455
3456
|
return T.batch(
|
|
@@ -3460,7 +3461,8 @@ var ii = class {
|
|
|
3460
3461
|
);
|
|
3461
3462
|
}
|
|
3462
3463
|
getQueryState(e) {
|
|
3463
|
-
|
|
3464
|
+
const n = this.defaultQueryOptions({ queryKey: e });
|
|
3465
|
+
return this.#e.get(n.queryHash)?.state;
|
|
3464
3466
|
}
|
|
3465
3467
|
removeQueries(e) {
|
|
3466
3468
|
const n = this.#e;
|
|
@@ -3567,11 +3569,11 @@ var ii = class {
|
|
|
3567
3569
|
}), r;
|
|
3568
3570
|
}
|
|
3569
3571
|
defaultQueryOptions(e) {
|
|
3570
|
-
if (e
|
|
3572
|
+
if (e._defaulted)
|
|
3571
3573
|
return e;
|
|
3572
3574
|
const n = {
|
|
3573
3575
|
...this.#n.queries,
|
|
3574
|
-
...
|
|
3576
|
+
...this.getQueryDefaults(e.queryKey),
|
|
3575
3577
|
...e,
|
|
3576
3578
|
_defaulted: !0
|
|
3577
3579
|
};
|
|
@@ -3639,13 +3641,13 @@ var ii = class {
|
|
|
3639
3641
|
}
|
|
3640
3642
|
setOptions(t, e) {
|
|
3641
3643
|
const n = this.options, r = this.#t;
|
|
3642
|
-
if (this.options = this.#e.defaultQueryOptions(t),
|
|
3644
|
+
if (this.options = this.#e.defaultQueryOptions(t), typeof this.options.enabled < "u" && typeof this.options.enabled != "boolean")
|
|
3645
|
+
throw new Error("Expected enabled to be a boolean");
|
|
3646
|
+
this.#w(), ve(this.options, n) || this.#e.getQueryCache().notify({
|
|
3643
3647
|
type: "observerOptionsUpdated",
|
|
3644
3648
|
query: this.#t,
|
|
3645
3649
|
observer: this
|
|
3646
|
-
})
|
|
3647
|
-
throw new Error("Expected enabled to be a boolean");
|
|
3648
|
-
this.options.queryKey || (this.options.queryKey = n.queryKey), this.#w();
|
|
3650
|
+
});
|
|
3649
3651
|
const s = this.hasListeners();
|
|
3650
3652
|
s && Nt(
|
|
3651
3653
|
this.#t,
|
|
@@ -3870,11 +3872,11 @@ var ci = class extends re {
|
|
|
3870
3872
|
}
|
|
3871
3873
|
setOptions(t) {
|
|
3872
3874
|
const e = this.options;
|
|
3873
|
-
this.options = this.#e.defaultMutationOptions(t), ve(
|
|
3875
|
+
this.options = this.#e.defaultMutationOptions(t), ve(this.options, e) || this.#e.getMutationCache().notify({
|
|
3874
3876
|
type: "observerOptionsUpdated",
|
|
3875
3877
|
mutation: this.#n,
|
|
3876
3878
|
observer: this
|
|
3877
|
-
}),
|
|
3879
|
+
}), e?.mutationKey && this.options.mutationKey && G(e.mutationKey) !== G(this.options.mutationKey) ? this.reset() : this.#n?.setOptions(this.options);
|
|
3878
3880
|
}
|
|
3879
3881
|
onUnsubscribe() {
|
|
3880
3882
|
this.hasListeners() || this.#n?.removeObserver(this);
|
|
@@ -4088,13 +4090,13 @@ function di() {
|
|
|
4088
4090
|
return qn().__VUE_DEVTOOLS_GLOBAL_HOOK__;
|
|
4089
4091
|
}
|
|
4090
4092
|
function qn() {
|
|
4091
|
-
return typeof navigator < "u" && typeof window < "u" ? window : typeof
|
|
4093
|
+
return typeof navigator < "u" && typeof window < "u" ? window : typeof globalThis < "u" ? globalThis : {};
|
|
4092
4094
|
}
|
|
4093
4095
|
const pi = typeof Proxy == "function", yi = "devtools-plugin:setup", mi = "plugin:settings:set";
|
|
4094
4096
|
let X, Ze;
|
|
4095
4097
|
function gi() {
|
|
4096
4098
|
var t;
|
|
4097
|
-
return X !== void 0 || (typeof window < "u" && window.performance ? (X = !0, Ze = window.performance) : typeof
|
|
4099
|
+
return X !== void 0 || (typeof window < "u" && window.performance ? (X = !0, Ze = window.performance) : typeof globalThis < "u" && (!((t = globalThis.perf_hooks) === null || t === void 0) && t.performance) ? (X = !0, Ze = globalThis.perf_hooks.performance) : X = !1), X;
|
|
4098
4100
|
}
|
|
4099
4101
|
function bi() {
|
|
4100
4102
|
return gi() ? Ze.now() : Date.now();
|
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.
|
|
4
|
+
"version": "1.0.43",
|
|
5
5
|
"author": "Alexandr Dergunov <dergunovs@mail.ru> (https://github.com/dergunovs)",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "module",
|
|
@@ -22,25 +22,25 @@
|
|
|
22
22
|
"ts": "vue-tsc --noEmit"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@tanstack/vue-query": "5.
|
|
26
|
-
"@vueuse/core": "10.
|
|
27
|
-
"@vueuse/integrations": "10.
|
|
25
|
+
"@tanstack/vue-query": "5.24.1",
|
|
26
|
+
"@vueuse/core": "10.9.0",
|
|
27
|
+
"@vueuse/integrations": "10.9.0",
|
|
28
28
|
"async-validator": "4.2.5",
|
|
29
29
|
"axios": "1.6.7",
|
|
30
|
-
"vue": "3.4.
|
|
31
|
-
"vue-router": "4.
|
|
30
|
+
"vue": "3.4.21",
|
|
31
|
+
"vue-router": "4.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@types/node": "20.11.
|
|
35
|
-
"@typescript-eslint/eslint-plugin": "
|
|
36
|
-
"@typescript-eslint/parser": "
|
|
34
|
+
"@types/node": "20.11.24",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "7.1.0",
|
|
36
|
+
"@typescript-eslint/parser": "7.1.0",
|
|
37
37
|
"@vitejs/plugin-vue": "5.0.4",
|
|
38
|
-
"eslint": "8.
|
|
38
|
+
"eslint": "8.57.0",
|
|
39
39
|
"eslint-config-prettier": "9.1.0",
|
|
40
40
|
"eslint-import-resolver-typescript": "3.6.1",
|
|
41
41
|
"eslint-plugin-import": "2.29.1",
|
|
42
42
|
"eslint-plugin-prettier": "5.1.3",
|
|
43
|
-
"eslint-plugin-vue": "9.
|
|
43
|
+
"eslint-plugin-vue": "9.22.0",
|
|
44
44
|
"postcss-html": "1.6.0",
|
|
45
45
|
"prettier": "3.2.5",
|
|
46
46
|
"stylelint": "16.2.1",
|
|
@@ -49,14 +49,14 @@
|
|
|
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.1.
|
|
53
|
-
"vite-plugin-dts": "3.7.
|
|
52
|
+
"vite": "5.1.4",
|
|
53
|
+
"vite-plugin-dts": "3.7.3",
|
|
54
54
|
"vue-linters-config": "0.1.13",
|
|
55
|
-
"vue-tsc": "
|
|
55
|
+
"vue-tsc": "2.0.2"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"vue": "3.4.
|
|
59
|
-
"vue-router": "4.
|
|
58
|
+
"vue": "3.4.21",
|
|
59
|
+
"vue-router": "4.3.0"
|
|
60
60
|
},
|
|
61
61
|
"engines": {
|
|
62
62
|
"npm": ">=10.2.3",
|