@azure-net/kit 4.0.0-1 → 4.0.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.
|
@@ -12,6 +12,7 @@ export interface CreateQueryOptions<T extends Record<string, unknown>> {
|
|
|
12
12
|
}
|
|
13
13
|
export interface QueryController<T extends Record<string, unknown>> {
|
|
14
14
|
data: T;
|
|
15
|
+
patch: (value: Partial<T>) => void;
|
|
15
16
|
reset: () => void;
|
|
16
17
|
snapshot: () => T;
|
|
17
18
|
initial: () => T;
|
|
@@ -56,6 +56,9 @@ export const createQuery = (initialValue, options) => {
|
|
|
56
56
|
const reset = () => {
|
|
57
57
|
data = ObjectUtil.deepClone(baseInitial);
|
|
58
58
|
};
|
|
59
|
+
const patch = (value) => {
|
|
60
|
+
data = { ...data, ...value };
|
|
61
|
+
};
|
|
59
62
|
const snapshot = () => ObjectUtil.deepClone(data);
|
|
60
63
|
const initial = () => ObjectUtil.deepClone(baseInitial);
|
|
61
64
|
return {
|
|
@@ -65,6 +68,7 @@ export const createQuery = (initialValue, options) => {
|
|
|
65
68
|
set data(value) {
|
|
66
69
|
data = value;
|
|
67
70
|
},
|
|
71
|
+
patch,
|
|
68
72
|
reset,
|
|
69
73
|
snapshot,
|
|
70
74
|
initial
|
package/package.json
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azure-net/kit",
|
|
3
|
-
"version": "4.0.0
|
|
3
|
+
"version": "4.0.0",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Pixel1917",
|
|
6
|
+
"description": "Universal toolkit and library collection, developed as part of the Azure-net ecosystem",
|
|
7
|
+
"homepage": "https://github.com/Pixel1917/azure-net-kit",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/Pixel1917/azure-net-kit/issues",
|
|
10
|
+
"email": "sank195951@gmail.com"
|
|
11
|
+
},
|
|
12
|
+
"repository": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/Pixel1917/azure-net-kit.git"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"registry": "https://registry.npmjs.org/"
|
|
19
|
+
},
|
|
4
20
|
"files": [
|
|
5
21
|
"dist",
|
|
6
22
|
"!dist/**/*.test.*",
|
|
@@ -102,12 +118,19 @@
|
|
|
102
118
|
}
|
|
103
119
|
},
|
|
104
120
|
"keywords": [
|
|
105
|
-
"
|
|
121
|
+
"sveltekit",
|
|
122
|
+
"svelte",
|
|
123
|
+
"toolkit",
|
|
124
|
+
"library",
|
|
125
|
+
"azure-net",
|
|
126
|
+
"store",
|
|
127
|
+
"i18n",
|
|
128
|
+
"utils"
|
|
106
129
|
],
|
|
107
130
|
"dependencies": {
|
|
108
|
-
"@azure-net/edges": "^1.2.
|
|
109
|
-
"@azure-net/edges-translations": "^1.2.
|
|
110
|
-
"@azure-net/tools": "^1.2.
|
|
131
|
+
"@azure-net/edges": "^1.2.5",
|
|
132
|
+
"@azure-net/edges-translations": "^1.2.5",
|
|
133
|
+
"@azure-net/tools": "^1.2.5"
|
|
111
134
|
},
|
|
112
135
|
"scripts": {
|
|
113
136
|
"dev": "vite dev",
|