@globalbrain/sefirot 3.28.2 → 3.29.1
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/lib/composables/Api.ts +9 -1
- package/lib/http/Http.ts +5 -1
- package/package.json +3 -3
package/lib/composables/Api.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Ref, ref } from 'vue'
|
|
1
|
+
import { type Ref, type WatchSource, ref, watch } from 'vue'
|
|
2
2
|
import { Http } from '../http/Http'
|
|
3
3
|
import { tryOnMounted } from './Utils'
|
|
4
4
|
|
|
@@ -14,6 +14,10 @@ export interface UseQueryOptions {
|
|
|
14
14
|
* @default true
|
|
15
15
|
*/
|
|
16
16
|
immediate?: boolean
|
|
17
|
+
/**
|
|
18
|
+
* watch the given source(s) and re-execute the query
|
|
19
|
+
*/
|
|
20
|
+
watch?: WatchSource | WatchSource[]
|
|
17
21
|
}
|
|
18
22
|
|
|
19
23
|
export interface Mutation<Data = any, Args extends any[] = any[]> {
|
|
@@ -35,6 +39,10 @@ export function useQuery<Data = any>(
|
|
|
35
39
|
tryOnMounted(execute)
|
|
36
40
|
}
|
|
37
41
|
|
|
42
|
+
if (options.watch) {
|
|
43
|
+
watch(options.watch, execute, { deep: true })
|
|
44
|
+
}
|
|
45
|
+
|
|
38
46
|
async function execute(): Promise<Data> {
|
|
39
47
|
loading.value = true
|
|
40
48
|
|
package/lib/http/Http.ts
CHANGED
|
@@ -158,7 +158,11 @@ export class Http {
|
|
|
158
158
|
return
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
-
if (
|
|
161
|
+
if (
|
|
162
|
+
typeof obj[property] === 'object'
|
|
163
|
+
&& !(obj[property] instanceof Blob)
|
|
164
|
+
&& obj[property] !== null
|
|
165
|
+
) {
|
|
162
166
|
this.objectToFormData(obj[property], fd, property)
|
|
163
167
|
} else {
|
|
164
168
|
fd.append(formKey, obj[property])
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@globalbrain/sefirot",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.1",
|
|
4
4
|
"packageManager": "pnpm@8.15.1",
|
|
5
5
|
"description": "Vue Components for Global Brain Design System.",
|
|
6
6
|
"author": "Kia Ishii <ka.ishii@globalbrains.com>",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"markdown-it": "^14.0.0",
|
|
54
54
|
"normalize.css": "^8.0.1",
|
|
55
55
|
"pinia": "^2.1.7",
|
|
56
|
-
"postcss": "^8.4.
|
|
56
|
+
"postcss": "^8.4.34",
|
|
57
57
|
"postcss-nested": "^6.0.1",
|
|
58
58
|
"v-calendar": "^3.1.2",
|
|
59
59
|
"vue": "^3.4.15",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
"markdown-it": "^14.0.0",
|
|
97
97
|
"normalize.css": "^8.0.1",
|
|
98
98
|
"pinia": "^2.1.7",
|
|
99
|
-
"postcss": "^8.4.
|
|
99
|
+
"postcss": "^8.4.34",
|
|
100
100
|
"postcss-nested": "^6.0.1",
|
|
101
101
|
"punycode": "^2.3.1",
|
|
102
102
|
"release-it": "^17.0.3",
|