@vueuse/integrations 12.3.0 → 12.4.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.
- package/index.cjs +30 -30
- package/index.d.cts +1 -1
- package/index.d.mts +1 -1
- package/index.d.ts +1 -1
- package/index.iife.js +30 -30
- package/index.iife.min.js +1 -1
- package/index.mjs +30 -30
- package/package.json +3 -3
- package/useAsyncValidator.cjs +2 -2
- package/useAsyncValidator.iife.js +2 -2
- package/useAsyncValidator.iife.min.js +1 -1
- package/useAsyncValidator.mjs +2 -2
- package/useAxios.cjs +5 -5
- package/useAxios.iife.js +5 -5
- package/useAxios.iife.min.js +1 -1
- package/useAxios.mjs +5 -5
- package/useDrauu.cjs +9 -9
- package/useDrauu.iife.js +9 -9
- package/useDrauu.iife.min.js +1 -1
- package/useDrauu.mjs +9 -9
- package/useFuse.cjs +5 -5
- package/useFuse.iife.js +5 -5
- package/useFuse.iife.min.js +1 -1
- package/useFuse.mjs +5 -5
- package/useJwt.cjs +1 -1
- package/useJwt.iife.js +1 -1
- package/useJwt.iife.min.js +1 -1
- package/useJwt.mjs +1 -1
- package/useNProgress.cjs +1 -1
- package/useNProgress.d.cts +1 -1
- package/useNProgress.d.mts +1 -1
- package/useNProgress.d.ts +1 -1
- package/useNProgress.iife.js +1 -1
- package/useNProgress.iife.min.js +1 -1
- package/useNProgress.mjs +3 -3
- package/useSortable/component.cjs +3 -3
- package/useSortable/component.mjs +3 -3
- package/useSortable.cjs +7 -7
- package/useSortable.iife.js +7 -7
- package/useSortable.iife.min.js +1 -1
- package/useSortable.mjs +7 -7
package/useAsyncValidator.cjs
CHANGED
|
@@ -17,11 +17,11 @@ function useAsyncValidator(value, rules, options = {}) {
|
|
|
17
17
|
const pass = vue.ref(!immediate || manual);
|
|
18
18
|
const errors = vue.computed(() => {
|
|
19
19
|
var _a;
|
|
20
|
-
return ((_a = errorInfo.value) == null ?
|
|
20
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.errors) || [];
|
|
21
21
|
});
|
|
22
22
|
const errorFields = vue.computed(() => {
|
|
23
23
|
var _a;
|
|
24
|
-
return ((_a = errorInfo.value) == null ?
|
|
24
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.fields) || {};
|
|
25
25
|
});
|
|
26
26
|
const validator = vue.computed(() => new AsyncValidatorSchema(vue.toValue(rules)));
|
|
27
27
|
const execute = async () => {
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
const pass = vue.ref(!immediate || manual);
|
|
15
15
|
const errors = vue.computed(() => {
|
|
16
16
|
var _a;
|
|
17
|
-
return ((_a = errorInfo.value) == null ?
|
|
17
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.errors) || [];
|
|
18
18
|
});
|
|
19
19
|
const errorFields = vue.computed(() => {
|
|
20
20
|
var _a;
|
|
21
|
-
return ((_a = errorInfo.value) == null ?
|
|
21
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.fields) || {};
|
|
22
22
|
});
|
|
23
23
|
const validator = vue.computed(() => new AsyncValidatorSchema(vue.toValue(rules)));
|
|
24
24
|
const execute = async () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(m,s,
|
|
1
|
+
(function(m,u,s,t){"use strict";const p=s.default||s;function y(w,A,F={}){const{validateOption:U={},immediate:o=!0,manual:i=!1}=F,c=u.toRef(w),r=t.shallowRef(null),a=t.ref(!0),n=t.ref(!o||i),d=t.computed(()=>{var e;return((e=r.value)==null?void 0:e.errors)||[]}),f=t.computed(()=>{var e;return((e=r.value)==null?void 0:e.fields)||{}}),v=t.computed(()=>new p(t.toValue(A))),h=async()=>{a.value=!1,n.value=!1;try{await v.value.validate(c.value,U),n.value=!0,r.value=null}catch(e){r.value=e}finally{a.value=!0}return{pass:n.value,errorInfo:r.value,errors:d.value,errorFields:f.value}};i||t.watch([c,v],()=>h(),{immediate:o,deep:!0});const V={isFinished:a,pass:n,errors:d,errorInfo:r,errorFields:f,execute:h};function R(){return new Promise((e,l)=>{u.until(a).toBe(!0).then(()=>e(V)).catch(I=>l(I))})}return{...V,then(e,l){return R().then(e,l)}}}m.useAsyncValidator=y})(this.VueUse=this.VueUse||{},VueUse,AsyncValidator,Vue);
|
package/useAsyncValidator.mjs
CHANGED
|
@@ -15,11 +15,11 @@ function useAsyncValidator(value, rules, options = {}) {
|
|
|
15
15
|
const pass = ref(!immediate || manual);
|
|
16
16
|
const errors = computed(() => {
|
|
17
17
|
var _a;
|
|
18
|
-
return ((_a = errorInfo.value) == null ?
|
|
18
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.errors) || [];
|
|
19
19
|
});
|
|
20
20
|
const errorFields = computed(() => {
|
|
21
21
|
var _a;
|
|
22
|
-
return ((_a = errorInfo.value) == null ?
|
|
22
|
+
return ((_a = errorInfo.value) == null ? undefined : _a.fields) || {};
|
|
23
23
|
});
|
|
24
24
|
const validator = computed(() => new AsyncValidatorSchema(toValue(rules)));
|
|
25
25
|
const execute = async () => {
|
package/useAxios.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var axios = require('axios');
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
7
|
function useAxios(...args) {
|
|
8
|
-
const url = typeof args[0] === "string" ? args[0] :
|
|
8
|
+
const url = typeof args[0] === "string" ? args[0] : undefined;
|
|
9
9
|
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
|
10
10
|
const defaultOptions = {
|
|
11
11
|
immediate: !!argsPlaceholder,
|
|
@@ -15,7 +15,7 @@ function useAxios(...args) {
|
|
|
15
15
|
let defaultConfig = {};
|
|
16
16
|
let instance = axios;
|
|
17
17
|
let options = defaultOptions;
|
|
18
|
-
const isAxiosInstance = (val) => !!(val == null ?
|
|
18
|
+
const isAxiosInstance = (val) => !!(val == null ? undefined : val.request);
|
|
19
19
|
if (args.length > 0 + argsPlaceholder) {
|
|
20
20
|
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
|
21
21
|
instance = args[0 + argsPlaceholder];
|
|
@@ -70,9 +70,9 @@ function useAxios(...args) {
|
|
|
70
70
|
};
|
|
71
71
|
let executeCounter = 0;
|
|
72
72
|
const execute = (executeUrl = url, config = {}) => {
|
|
73
|
-
error.value =
|
|
73
|
+
error.value = undefined;
|
|
74
74
|
const _url = typeof executeUrl === "string" ? executeUrl : url != null ? url : config.url;
|
|
75
|
-
if (_url ===
|
|
75
|
+
if (_url === undefined) {
|
|
76
76
|
error.value = new axios.AxiosError(axios.AxiosError.ERR_INVALID_URL);
|
|
77
77
|
isFinished.value = true;
|
|
78
78
|
return promise;
|
|
@@ -96,7 +96,7 @@ function useAxios(...args) {
|
|
|
96
96
|
onError(e);
|
|
97
97
|
}).finally(() => {
|
|
98
98
|
var _a;
|
|
99
|
-
(_a = options.onFinish) == null ?
|
|
99
|
+
(_a = options.onFinish) == null ? undefined : _a.call(options);
|
|
100
100
|
if (currentExecuteCounter === executeCounter)
|
|
101
101
|
loading(false);
|
|
102
102
|
});
|
package/useAxios.iife.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
function useAxios(...args) {
|
|
5
|
-
const url = typeof args[0] === "string" ? args[0] :
|
|
5
|
+
const url = typeof args[0] === "string" ? args[0] : undefined;
|
|
6
6
|
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
|
7
7
|
const defaultOptions = {
|
|
8
8
|
immediate: !!argsPlaceholder,
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
let defaultConfig = {};
|
|
13
13
|
let instance = axios;
|
|
14
14
|
let options = defaultOptions;
|
|
15
|
-
const isAxiosInstance = (val) => !!(val == null ?
|
|
15
|
+
const isAxiosInstance = (val) => !!(val == null ? undefined : val.request);
|
|
16
16
|
if (args.length > 0 + argsPlaceholder) {
|
|
17
17
|
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
|
18
18
|
instance = args[0 + argsPlaceholder];
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
};
|
|
68
68
|
let executeCounter = 0;
|
|
69
69
|
const execute = (executeUrl = url, config = {}) => {
|
|
70
|
-
error.value =
|
|
70
|
+
error.value = undefined;
|
|
71
71
|
const _url = typeof executeUrl === "string" ? executeUrl : url != null ? url : config.url;
|
|
72
|
-
if (_url ===
|
|
72
|
+
if (_url === undefined) {
|
|
73
73
|
error.value = new axios.AxiosError(axios.AxiosError.ERR_INVALID_URL);
|
|
74
74
|
isFinished.value = true;
|
|
75
75
|
return promise;
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
onError(e);
|
|
94
94
|
}).finally(() => {
|
|
95
95
|
var _a;
|
|
96
|
-
(_a = options.onFinish) == null ?
|
|
96
|
+
(_a = options.onFinish) == null ? undefined : _a.call(options);
|
|
97
97
|
if (currentExecuteCounter === executeCounter)
|
|
98
98
|
loading(false);
|
|
99
99
|
});
|
package/useAxios.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(L,h,
|
|
1
|
+
(function(L,h,d,o){"use strict";function O(...t){const a=typeof t[0]=="string"?t[0]:void 0,n=typeof a=="string"?1:0,E={immediate:!!n,shallow:!0,abortPrevious:!0};let R={},v=d,s=E;const p=e=>!!e?.request;t.length>0+n&&(p(t[0+n])?v=t[0+n]:R=t[0+n]),t.length>1+n&&p(t[1+n])&&(v=t[1+n]),(t.length===2+n&&!p(t[1+n])||t.length===3+n)&&(s=t[t.length-1]||E);const{shallow:U,onSuccess:j=h.noop,onError:q=h.noop,immediate:B,resetOnExecute:N=!1}=s,x=s.initialData,y=o.shallowRef(),w=(U?o.shallowRef:o.ref)(x),i=o.ref(!1),c=o.ref(!1),r=o.ref(!1),u=o.shallowRef();let b=new AbortController;const A=e=>{i.value||!c.value||(b.abort(e),b=new AbortController,r.value=!0,c.value=!1,i.value=!1)},V=e=>{c.value=e,i.value=!e},S=()=>{N&&(w.value=x)},D=()=>new Promise((e,f)=>{h.until(i).toBe(!0).then(()=>u.value?f(u.value):e(_))}),C={then:(...e)=>D().then(...e),catch:(...e)=>D().catch(...e)};let m=0;const P=(e=a,f={})=>{u.value=void 0;const F=typeof e=="string"?e:a??f.url;if(F===void 0)return u.value=new d.AxiosError(d.AxiosError.ERR_INVALID_URL),i.value=!0,C;S(),s.abortPrevious!==!1&&A(),V(!0),m+=1;const k=m;return r.value=!1,v(F,{...R,...typeof e=="object"?e:f,signal:b.signal}).then(l=>{if(r.value)return;y.value=l;const I=l.data;w.value=I,j(I)}).catch(l=>{u.value=l,q(l)}).finally(()=>{var l;(l=s.onFinish)==null||l.call(s),k===m&&V(!1)}),C};B&&a&&P();const _={response:y,data:w,error:u,isFinished:i,isLoading:c,cancel:A,isAborted:r,isCanceled:r,abort:A,execute:P};return{..._,...C}}L.useAxios=O})(this.VueUse=this.VueUse||{},VueUse,axios,Vue);
|
package/useAxios.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import axios, { AxiosError } from 'axios';
|
|
|
3
3
|
import { shallowRef, ref } from 'vue';
|
|
4
4
|
|
|
5
5
|
function useAxios(...args) {
|
|
6
|
-
const url = typeof args[0] === "string" ? args[0] :
|
|
6
|
+
const url = typeof args[0] === "string" ? args[0] : undefined;
|
|
7
7
|
const argsPlaceholder = typeof url === "string" ? 1 : 0;
|
|
8
8
|
const defaultOptions = {
|
|
9
9
|
immediate: !!argsPlaceholder,
|
|
@@ -13,7 +13,7 @@ function useAxios(...args) {
|
|
|
13
13
|
let defaultConfig = {};
|
|
14
14
|
let instance = axios;
|
|
15
15
|
let options = defaultOptions;
|
|
16
|
-
const isAxiosInstance = (val) => !!(val == null ?
|
|
16
|
+
const isAxiosInstance = (val) => !!(val == null ? undefined : val.request);
|
|
17
17
|
if (args.length > 0 + argsPlaceholder) {
|
|
18
18
|
if (isAxiosInstance(args[0 + argsPlaceholder]))
|
|
19
19
|
instance = args[0 + argsPlaceholder];
|
|
@@ -68,9 +68,9 @@ function useAxios(...args) {
|
|
|
68
68
|
};
|
|
69
69
|
let executeCounter = 0;
|
|
70
70
|
const execute = (executeUrl = url, config = {}) => {
|
|
71
|
-
error.value =
|
|
71
|
+
error.value = undefined;
|
|
72
72
|
const _url = typeof executeUrl === "string" ? executeUrl : url != null ? url : config.url;
|
|
73
|
-
if (_url ===
|
|
73
|
+
if (_url === undefined) {
|
|
74
74
|
error.value = new AxiosError(AxiosError.ERR_INVALID_URL);
|
|
75
75
|
isFinished.value = true;
|
|
76
76
|
return promise;
|
|
@@ -94,7 +94,7 @@ function useAxios(...args) {
|
|
|
94
94
|
onError(e);
|
|
95
95
|
}).finally(() => {
|
|
96
96
|
var _a;
|
|
97
|
-
(_a = options.onFinish) == null ?
|
|
97
|
+
(_a = options.onFinish) == null ? undefined : _a.call(options);
|
|
98
98
|
if (currentExecuteCounter === executeCounter)
|
|
99
99
|
loading(false);
|
|
100
100
|
});
|
package/useDrauu.cjs
CHANGED
|
@@ -22,10 +22,10 @@ function useDrauu(target, options) {
|
|
|
22
22
|
size: 3,
|
|
23
23
|
arrowEnd: false,
|
|
24
24
|
cornerRadius: 0,
|
|
25
|
-
dasharray:
|
|
25
|
+
dasharray: undefined,
|
|
26
26
|
fill: "transparent",
|
|
27
27
|
mode: "draw",
|
|
28
|
-
...options == null ?
|
|
28
|
+
...options == null ? undefined : options.brush
|
|
29
29
|
});
|
|
30
30
|
vue.watch(brush, () => {
|
|
31
31
|
const instance = drauuInstance.value;
|
|
@@ -36,32 +36,32 @@ function useDrauu(target, options) {
|
|
|
36
36
|
}, { deep: true });
|
|
37
37
|
const undo = () => {
|
|
38
38
|
var _a;
|
|
39
|
-
return (_a = drauuInstance.value) == null ?
|
|
39
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.undo();
|
|
40
40
|
};
|
|
41
41
|
const redo = () => {
|
|
42
42
|
var _a;
|
|
43
|
-
return (_a = drauuInstance.value) == null ?
|
|
43
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.redo();
|
|
44
44
|
};
|
|
45
45
|
const clear = () => {
|
|
46
46
|
var _a;
|
|
47
|
-
return (_a = drauuInstance.value) == null ?
|
|
47
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.clear();
|
|
48
48
|
};
|
|
49
49
|
const cancel = () => {
|
|
50
50
|
var _a;
|
|
51
|
-
return (_a = drauuInstance.value) == null ?
|
|
51
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.cancel();
|
|
52
52
|
};
|
|
53
53
|
const load = (svg) => {
|
|
54
54
|
var _a;
|
|
55
|
-
return (_a = drauuInstance.value) == null ?
|
|
55
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.load(svg);
|
|
56
56
|
};
|
|
57
57
|
const dump = () => {
|
|
58
58
|
var _a;
|
|
59
|
-
return (_a = drauuInstance.value) == null ?
|
|
59
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.dump();
|
|
60
60
|
};
|
|
61
61
|
const cleanup = () => {
|
|
62
62
|
var _a;
|
|
63
63
|
disposables.forEach((dispose) => dispose());
|
|
64
|
-
(_a = drauuInstance.value) == null ?
|
|
64
|
+
(_a = drauuInstance.value) == null ? undefined : _a.unmount();
|
|
65
65
|
};
|
|
66
66
|
const syncStatus = () => {
|
|
67
67
|
if (drauuInstance.value) {
|
package/useDrauu.iife.js
CHANGED
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
size: 3,
|
|
19
19
|
arrowEnd: false,
|
|
20
20
|
cornerRadius: 0,
|
|
21
|
-
dasharray:
|
|
21
|
+
dasharray: undefined,
|
|
22
22
|
fill: "transparent",
|
|
23
23
|
mode: "draw",
|
|
24
|
-
...options == null ?
|
|
24
|
+
...options == null ? undefined : options.brush
|
|
25
25
|
});
|
|
26
26
|
vue.watch(brush, () => {
|
|
27
27
|
const instance = drauuInstance.value;
|
|
@@ -32,32 +32,32 @@
|
|
|
32
32
|
}, { deep: true });
|
|
33
33
|
const undo = () => {
|
|
34
34
|
var _a;
|
|
35
|
-
return (_a = drauuInstance.value) == null ?
|
|
35
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.undo();
|
|
36
36
|
};
|
|
37
37
|
const redo = () => {
|
|
38
38
|
var _a;
|
|
39
|
-
return (_a = drauuInstance.value) == null ?
|
|
39
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.redo();
|
|
40
40
|
};
|
|
41
41
|
const clear = () => {
|
|
42
42
|
var _a;
|
|
43
|
-
return (_a = drauuInstance.value) == null ?
|
|
43
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.clear();
|
|
44
44
|
};
|
|
45
45
|
const cancel = () => {
|
|
46
46
|
var _a;
|
|
47
|
-
return (_a = drauuInstance.value) == null ?
|
|
47
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.cancel();
|
|
48
48
|
};
|
|
49
49
|
const load = (svg) => {
|
|
50
50
|
var _a;
|
|
51
|
-
return (_a = drauuInstance.value) == null ?
|
|
51
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.load(svg);
|
|
52
52
|
};
|
|
53
53
|
const dump = () => {
|
|
54
54
|
var _a;
|
|
55
|
-
return (_a = drauuInstance.value) == null ?
|
|
55
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.dump();
|
|
56
56
|
};
|
|
57
57
|
const cleanup = () => {
|
|
58
58
|
var _a;
|
|
59
59
|
disposables.forEach((dispose) => dispose());
|
|
60
|
-
(_a = drauuInstance.value) == null ?
|
|
60
|
+
(_a = drauuInstance.value) == null ? undefined : _a.unmount();
|
|
61
61
|
};
|
|
62
62
|
const syncStatus = () => {
|
|
63
63
|
if (drauuInstance.value) {
|
package/useDrauu.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(E,
|
|
1
|
+
(function(E,t,k,H,a){"use strict";function V(p,r){const n=a.ref();let l=[];const s=t.createEventHook(),d=t.createEventHook(),c=t.createEventHook(),f=t.createEventHook(),i=t.createEventHook(),v=a.ref(!1),h=a.ref(!1),S=a.ref(!1),_=a.ref(!1),u=a.ref({color:"black",size:3,arrowEnd:!1,cornerRadius:0,dasharray:void 0,fill:"transparent",mode:"draw",...r?.brush});a.watch(u,()=>{const e=n.value;e&&(e.brush=u.value,e.mode=u.value.mode)},{deep:!0});const C=()=>{var e;return(e=n.value)==null?void 0:e.undo()},U=()=>{var e;return(e=n.value)==null?void 0:e.redo()},b=()=>{var e;return(e=n.value)==null?void 0:e.clear()},D=()=>{var e;return(e=n.value)==null?void 0:e.cancel()},w=e=>{var o;return(o=n.value)==null?void 0:o.load(e)},y=()=>{var e;return(e=n.value)==null?void 0:e.dump()},m=()=>{var e;l.forEach(o=>o()),(e=n.value)==null||e.unmount()},g=()=>{n.value&&(v.value=n.value.canUndo(),h.value=n.value.canRedo(),S.value=n.value.altPressed,_.value=n.value.shiftPressed)};return a.watch(()=>t.unrefElement(p),e=>{!e||typeof SVGSVGElement>"u"||!(e instanceof SVGSVGElement)||(n.value&&m(),n.value=H.createDrauu({el:e,...r}),g(),l=[n.value.on("canceled",()=>d.trigger()),n.value.on("committed",o=>c.trigger(o)),n.value.on("start",()=>f.trigger()),n.value.on("end",()=>i.trigger()),n.value.on("changed",()=>{g(),s.trigger()})])},{flush:"post"}),k.tryOnScopeDispose(()=>m()),{drauuInstance:n,load:w,dump:y,clear:b,cancel:D,undo:C,redo:U,canUndo:v,canRedo:h,brush:u,onChanged:s.on,onCommitted:c.on,onStart:f.on,onEnd:i.on,onCanceled:d.on}}E.useDrauu=V})(this.VueUse=this.VueUse||{},VueUse,VueUse,Drauu,Vue);
|
package/useDrauu.mjs
CHANGED
|
@@ -20,10 +20,10 @@ function useDrauu(target, options) {
|
|
|
20
20
|
size: 3,
|
|
21
21
|
arrowEnd: false,
|
|
22
22
|
cornerRadius: 0,
|
|
23
|
-
dasharray:
|
|
23
|
+
dasharray: undefined,
|
|
24
24
|
fill: "transparent",
|
|
25
25
|
mode: "draw",
|
|
26
|
-
...options == null ?
|
|
26
|
+
...options == null ? undefined : options.brush
|
|
27
27
|
});
|
|
28
28
|
watch(brush, () => {
|
|
29
29
|
const instance = drauuInstance.value;
|
|
@@ -34,32 +34,32 @@ function useDrauu(target, options) {
|
|
|
34
34
|
}, { deep: true });
|
|
35
35
|
const undo = () => {
|
|
36
36
|
var _a;
|
|
37
|
-
return (_a = drauuInstance.value) == null ?
|
|
37
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.undo();
|
|
38
38
|
};
|
|
39
39
|
const redo = () => {
|
|
40
40
|
var _a;
|
|
41
|
-
return (_a = drauuInstance.value) == null ?
|
|
41
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.redo();
|
|
42
42
|
};
|
|
43
43
|
const clear = () => {
|
|
44
44
|
var _a;
|
|
45
|
-
return (_a = drauuInstance.value) == null ?
|
|
45
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.clear();
|
|
46
46
|
};
|
|
47
47
|
const cancel = () => {
|
|
48
48
|
var _a;
|
|
49
|
-
return (_a = drauuInstance.value) == null ?
|
|
49
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.cancel();
|
|
50
50
|
};
|
|
51
51
|
const load = (svg) => {
|
|
52
52
|
var _a;
|
|
53
|
-
return (_a = drauuInstance.value) == null ?
|
|
53
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.load(svg);
|
|
54
54
|
};
|
|
55
55
|
const dump = () => {
|
|
56
56
|
var _a;
|
|
57
|
-
return (_a = drauuInstance.value) == null ?
|
|
57
|
+
return (_a = drauuInstance.value) == null ? undefined : _a.dump();
|
|
58
58
|
};
|
|
59
59
|
const cleanup = () => {
|
|
60
60
|
var _a;
|
|
61
61
|
disposables.forEach((dispose) => dispose());
|
|
62
|
-
(_a = drauuInstance.value) == null ?
|
|
62
|
+
(_a = drauuInstance.value) == null ? undefined : _a.unmount();
|
|
63
63
|
};
|
|
64
64
|
const syncStatus = () => {
|
|
65
65
|
if (drauuInstance.value) {
|
package/useFuse.cjs
CHANGED
|
@@ -8,14 +8,14 @@ function useFuse(search, data, options) {
|
|
|
8
8
|
var _a, _b;
|
|
9
9
|
return new Fuse(
|
|
10
10
|
(_a = vue.toValue(data)) != null ? _a : [],
|
|
11
|
-
(_b = vue.toValue(options)) == null ?
|
|
11
|
+
(_b = vue.toValue(options)) == null ? undefined : _b.fuseOptions
|
|
12
12
|
);
|
|
13
13
|
};
|
|
14
14
|
const fuse = vue.ref(createFuse());
|
|
15
15
|
vue.watch(
|
|
16
16
|
() => {
|
|
17
17
|
var _a;
|
|
18
|
-
return (_a = vue.toValue(options)) == null ?
|
|
18
|
+
return (_a = vue.toValue(options)) == null ? undefined : _a.fuseOptions;
|
|
19
19
|
},
|
|
20
20
|
() => {
|
|
21
21
|
fuse.value = createFuse();
|
|
@@ -31,10 +31,10 @@ function useFuse(search, data, options) {
|
|
|
31
31
|
);
|
|
32
32
|
const results = vue.computed(() => {
|
|
33
33
|
const resolved = vue.toValue(options);
|
|
34
|
-
if ((resolved == null ?
|
|
34
|
+
if ((resolved == null ? undefined : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
|
|
35
35
|
return vue.toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
36
|
-
const limit = resolved == null ?
|
|
37
|
-
return fuse.value.search(vue.toValue(search), limit ? { limit } :
|
|
36
|
+
const limit = resolved == null ? undefined : resolved.resultLimit;
|
|
37
|
+
return fuse.value.search(vue.toValue(search), limit ? { limit } : undefined);
|
|
38
38
|
});
|
|
39
39
|
return {
|
|
40
40
|
fuse,
|
package/useFuse.iife.js
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
return new Fuse(
|
|
8
8
|
(_a = vue.toValue(data)) != null ? _a : [],
|
|
9
|
-
(_b = vue.toValue(options)) == null ?
|
|
9
|
+
(_b = vue.toValue(options)) == null ? undefined : _b.fuseOptions
|
|
10
10
|
);
|
|
11
11
|
};
|
|
12
12
|
const fuse = vue.ref(createFuse());
|
|
13
13
|
vue.watch(
|
|
14
14
|
() => {
|
|
15
15
|
var _a;
|
|
16
|
-
return (_a = vue.toValue(options)) == null ?
|
|
16
|
+
return (_a = vue.toValue(options)) == null ? undefined : _a.fuseOptions;
|
|
17
17
|
},
|
|
18
18
|
() => {
|
|
19
19
|
fuse.value = createFuse();
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
);
|
|
30
30
|
const results = vue.computed(() => {
|
|
31
31
|
const resolved = vue.toValue(options);
|
|
32
|
-
if ((resolved == null ?
|
|
32
|
+
if ((resolved == null ? undefined : resolved.matchAllWhenSearchEmpty) && !vue.toValue(search))
|
|
33
33
|
return vue.toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
34
|
-
const limit = resolved == null ?
|
|
35
|
-
return fuse.value.search(vue.toValue(search), limit ? { limit } :
|
|
34
|
+
const limit = resolved == null ? undefined : resolved.resultLimit;
|
|
35
|
+
return fuse.value.search(vue.toValue(search), limit ? { limit } : undefined);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
fuse,
|
package/useFuse.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(o,i,e){"use strict";function c(r,l,s){const a=()=>{var t,u;return new i((t=e.toValue(l))!=null?t:[],(u=e.toValue(s))==null?void 0:u.fuseOptions)},n=e.ref(a());e.watch(()=>{var t;return(t=e.toValue(s))==null?void 0:t.fuseOptions},()=>{n.value=a()},{deep:!0}),e.watch(()=>e.toValue(l),t=>{n.value.setCollection(t)},{deep:!0});const d=e.computed(()=>{const t=e.toValue(s);if(t?.matchAllWhenSearchEmpty&&!e.toValue(r))return e.toValue(l).map((f,V)=>({item:f,refIndex:V}));const u=t?.resultLimit;return n.value.search(e.toValue(r),u?{limit:u}:void 0)});return{fuse:n,results:d}}o.useFuse=c})(this.VueUse=this.VueUse||{},Fuse,Vue);
|
package/useFuse.mjs
CHANGED
|
@@ -6,14 +6,14 @@ function useFuse(search, data, options) {
|
|
|
6
6
|
var _a, _b;
|
|
7
7
|
return new Fuse(
|
|
8
8
|
(_a = toValue(data)) != null ? _a : [],
|
|
9
|
-
(_b = toValue(options)) == null ?
|
|
9
|
+
(_b = toValue(options)) == null ? undefined : _b.fuseOptions
|
|
10
10
|
);
|
|
11
11
|
};
|
|
12
12
|
const fuse = ref(createFuse());
|
|
13
13
|
watch(
|
|
14
14
|
() => {
|
|
15
15
|
var _a;
|
|
16
|
-
return (_a = toValue(options)) == null ?
|
|
16
|
+
return (_a = toValue(options)) == null ? undefined : _a.fuseOptions;
|
|
17
17
|
},
|
|
18
18
|
() => {
|
|
19
19
|
fuse.value = createFuse();
|
|
@@ -29,10 +29,10 @@ function useFuse(search, data, options) {
|
|
|
29
29
|
);
|
|
30
30
|
const results = computed(() => {
|
|
31
31
|
const resolved = toValue(options);
|
|
32
|
-
if ((resolved == null ?
|
|
32
|
+
if ((resolved == null ? undefined : resolved.matchAllWhenSearchEmpty) && !toValue(search))
|
|
33
33
|
return toValue(data).map((item, index) => ({ item, refIndex: index }));
|
|
34
|
-
const limit = resolved == null ?
|
|
35
|
-
return fuse.value.search(toValue(search), limit ? { limit } :
|
|
34
|
+
const limit = resolved == null ? undefined : resolved.resultLimit;
|
|
35
|
+
return fuse.value.search(toValue(search), limit ? { limit } : undefined);
|
|
36
36
|
});
|
|
37
37
|
return {
|
|
38
38
|
fuse,
|
package/useJwt.cjs
CHANGED
package/useJwt.iife.js
CHANGED
package/useJwt.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(c,n,e){"use strict";function o(t,a={}){const{onError:u,fallbackValue:l=null}=a,r=(i,h)=>{try{return n.jwtDecode(i,h)}catch(V){return u?.(V),l}},s=e.computed(()=>r(e.toValue(t),{header:!0})),d=e.computed(()=>r(e.toValue(t)));return{header:s,payload:d}}c.useJwt=o})(this.VueUse=this.VueUse||{},jwt_decode,Vue);
|
package/useJwt.mjs
CHANGED
package/useNProgress.cjs
CHANGED
|
@@ -5,7 +5,7 @@ var nprogress = require('nprogress');
|
|
|
5
5
|
var vue = require('vue');
|
|
6
6
|
|
|
7
7
|
function useNProgress(currentProgress = null, options) {
|
|
8
|
-
const progress =
|
|
8
|
+
const progress = shared.toRef(currentProgress);
|
|
9
9
|
const isLoading = vue.computed({
|
|
10
10
|
set: (load) => load ? nprogress.start() : nprogress.done(),
|
|
11
11
|
get: () => typeof progress.value === "number" && progress.value < 1
|
package/useNProgress.d.cts
CHANGED
|
@@ -10,7 +10,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
10
10
|
*/
|
|
11
11
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
12
12
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
13
|
-
progress: vue.Ref<number |
|
|
13
|
+
progress: vue.Ref<number | null | undefined, number | null | undefined>;
|
|
14
14
|
start: () => nprogress.NProgress;
|
|
15
15
|
done: (force?: boolean) => nprogress.NProgress;
|
|
16
16
|
remove: () => void;
|
package/useNProgress.d.mts
CHANGED
|
@@ -10,7 +10,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
10
10
|
*/
|
|
11
11
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
12
12
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
13
|
-
progress: vue.Ref<number |
|
|
13
|
+
progress: vue.Ref<number | null | undefined, number | null | undefined>;
|
|
14
14
|
start: () => nprogress.NProgress;
|
|
15
15
|
done: (force?: boolean) => nprogress.NProgress;
|
|
16
16
|
remove: () => void;
|
package/useNProgress.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ type UseNProgressOptions = Partial<NProgressOptions>;
|
|
|
10
10
|
*/
|
|
11
11
|
declare function useNProgress(currentProgress?: MaybeRefOrGetter<number | null | undefined>, options?: UseNProgressOptions): {
|
|
12
12
|
isLoading: vue.WritableComputedRef<boolean, boolean>;
|
|
13
|
-
progress: vue.Ref<number |
|
|
13
|
+
progress: vue.Ref<number | null | undefined, number | null | undefined>;
|
|
14
14
|
start: () => nprogress.NProgress;
|
|
15
15
|
done: (force?: boolean) => nprogress.NProgress;
|
|
16
16
|
remove: () => void;
|
package/useNProgress.iife.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
function useNProgress(currentProgress = null, options) {
|
|
5
|
-
const progress =
|
|
5
|
+
const progress = shared.toRef(currentProgress);
|
|
6
6
|
const isLoading = vue.computed({
|
|
7
7
|
set: (load) => load ? nprogress.start() : nprogress.done(),
|
|
8
8
|
get: () => typeof progress.value === "number" && progress.value < 1
|
package/useNProgress.iife.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(a,l,e,c){"use strict";function f(s=null,i){const t=l.toRef(s),n=c.computed({set:u=>u?e.start():e.done(),get:()=>typeof t.value=="number"&&t.value<1});i&&e.configure(i);const o=e.set;return e.set=u=>(t.value=u,o.call(e,u)),c.watchEffect(()=>{typeof t.value=="number"&&l.isClient&&o.call(e,t.value)}),l.tryOnScopeDispose(e.remove),{isLoading:n,progress:t,start:e.start,done:e.done,remove:()=>{t.value=null,e.remove()}}}a.useNProgress=f})(this.VueUse=this.VueUse||{},VueUse,nprogress,Vue);
|
package/useNProgress.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { isClient, tryOnScopeDispose } from '@vueuse/shared';
|
|
1
|
+
import { toRef, isClient, tryOnScopeDispose } from '@vueuse/shared';
|
|
2
2
|
import nprogress from 'nprogress';
|
|
3
|
-
import {
|
|
3
|
+
import { computed, watchEffect } from 'vue';
|
|
4
4
|
|
|
5
5
|
function useNProgress(currentProgress = null, options) {
|
|
6
|
-
const progress =
|
|
6
|
+
const progress = toRef(currentProgress);
|
|
7
7
|
const isLoading = computed({
|
|
8
8
|
set: (load) => load ? nprogress.start() : nprogress.done(),
|
|
9
9
|
get: () => typeof progress.value === "number" && progress.value < 1
|
|
@@ -14,16 +14,16 @@ function useSortable(el, list, options = {}) {
|
|
|
14
14
|
};
|
|
15
15
|
const start = () => {
|
|
16
16
|
const target = typeof el === "string" ? document?.querySelector(el) : core.unrefElement(el);
|
|
17
|
-
if (!target || sortable !==
|
|
17
|
+
if (!target || sortable !== undefined)
|
|
18
18
|
return;
|
|
19
19
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
20
20
|
};
|
|
21
21
|
const stop = () => {
|
|
22
22
|
sortable?.destroy();
|
|
23
|
-
sortable =
|
|
23
|
+
sortable = undefined;
|
|
24
24
|
};
|
|
25
25
|
const option = (name, value) => {
|
|
26
|
-
if (value !==
|
|
26
|
+
if (value !== undefined)
|
|
27
27
|
sortable?.option(name, value);
|
|
28
28
|
else
|
|
29
29
|
return sortable?.option(name);
|
|
@@ -12,16 +12,16 @@ function useSortable(el, list, options = {}) {
|
|
|
12
12
|
};
|
|
13
13
|
const start = () => {
|
|
14
14
|
const target = typeof el === "string" ? document?.querySelector(el) : unrefElement(el);
|
|
15
|
-
if (!target || sortable !==
|
|
15
|
+
if (!target || sortable !== undefined)
|
|
16
16
|
return;
|
|
17
17
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
18
18
|
};
|
|
19
19
|
const stop = () => {
|
|
20
20
|
sortable?.destroy();
|
|
21
|
-
sortable =
|
|
21
|
+
sortable = undefined;
|
|
22
22
|
};
|
|
23
23
|
const option = (name, value) => {
|
|
24
|
-
if (value !==
|
|
24
|
+
if (value !== undefined)
|
|
25
25
|
sortable?.option(name, value);
|
|
26
26
|
else
|
|
27
27
|
return sortable?.option(name);
|
package/useSortable.cjs
CHANGED
|
@@ -13,20 +13,20 @@ function useSortable(el, list, options = {}) {
|
|
|
13
13
|
}
|
|
14
14
|
};
|
|
15
15
|
const start = () => {
|
|
16
|
-
const target = typeof el === "string" ? document == null ?
|
|
17
|
-
if (!target || sortable !==
|
|
16
|
+
const target = typeof el === "string" ? document == null ? undefined : document.querySelector(el) : core.unrefElement(el);
|
|
17
|
+
if (!target || sortable !== undefined)
|
|
18
18
|
return;
|
|
19
19
|
sortable = new Sortable(target, { ...defaultOptions, ...resetOptions });
|
|
20
20
|
};
|
|
21
21
|
const stop = () => {
|
|
22
|
-
sortable == null ?
|
|
23
|
-
sortable =
|
|
22
|
+
sortable == null ? undefined : sortable.destroy();
|
|
23
|
+
sortable = undefined;
|
|
24
24
|
};
|
|
25
25
|
const option = (name, value) => {
|
|
26
|
-
if (value !==
|
|
27
|
-
sortable == null ?
|
|
26
|
+
if (value !== undefined)
|
|
27
|
+
sortable == null ? undefined : sortable.option(name, value);
|
|
28
28
|
else
|
|
29
|
-
return sortable == null ?
|
|
29
|
+
return sortable == null ? undefined : sortable.option(name);
|
|
30
30
|
};
|
|
31
31
|
core.tryOnMounted(start);
|
|
32
32
|
core.tryOnScopeDispose(stop);
|