eco-vue-js 0.11.13 → 0.11.15
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/assets/icons/IconRedo.svg.js +32 -0
- package/dist/assets/icons/IconUndo.svg.js +32 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +1 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +36 -6
- package/dist/components/FieldWrapper/use/useFieldSaved.d.ts +4 -5
- package/dist/components/FieldWrapper/use/useFieldSaved.d.ts.map +1 -1
- package/dist/components/FieldWrapper/use/useFieldSaved.js +10 -25
- package/dist/components/FormAsync/use/useFormAsync.js +3 -3
- package/dist/components/Input/WInput.vue.d.ts +5 -5
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +107 -49
- package/dist/components/Input/WInputDate.vue.d.ts +2 -8
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.d.ts +1 -4
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +2 -2
- package/dist/components/Input/WInputToolbarButton.vue.d.ts +5 -8
- package/dist/components/Input/WInputToolbarButton.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputToolbarButton.vue.js +33 -25
- package/dist/components/Input/components/ContentEditable.vue.d.ts +1 -4
- package/dist/components/Input/components/ContentEditable.vue.d.ts.map +1 -1
- package/dist/components/Input/components/ContentEditable.vue2.js +24 -62
- package/dist/components/Input/components/InputToolbar.vue.d.ts +7 -0
- package/dist/components/Input/components/InputToolbar.vue.d.ts.map +1 -1
- package/dist/components/Input/components/InputToolbar.vue2.js +39 -13
- package/dist/components/Input/components/InputToolbarButton.vue.d.ts +5 -2
- package/dist/components/Input/components/InputToolbarButton.vue.d.ts.map +1 -1
- package/dist/components/Input/components/InputToolbarButton.vue.js +19 -11
- package/dist/components/Input/models/utils.d.ts +7 -0
- package/dist/components/Input/models/utils.d.ts.map +1 -0
- package/dist/components/Input/models/utils.js +56 -0
- package/dist/components/Input/types.d.ts +3 -2
- package/dist/components/Input/types.d.ts.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +3 -1
- package/dist/utils/useCopy.d.ts +1 -0
- package/dist/utils/useCopy.d.ts.map +1 -1
- package/dist/utils/useCopy.js +20 -18
- package/package.json +1 -1
package/dist/main.js
CHANGED
@@ -117,7 +117,7 @@ export { Order, encodeOrdering, parseOrdering } from './utils/order.js';
|
|
117
117
|
export { useProvideDisabled, useProvideReadonly, useProvideSkeleton } from './utils/provide.js';
|
118
118
|
export { supportsPassive } from './utils/supportsPassive.js';
|
119
119
|
export { useComponentStates, useComponentStatesButton, useComponentStatesSkeleton } from './utils/useComponentStates.js';
|
120
|
-
export { useCopy } from './utils/useCopy.js';
|
120
|
+
export { checkPermissionPaste, useCopy } from './utils/useCopy.js';
|
121
121
|
export { PAGE_LENGTH, makeQueryPaginated, useDefaultQuery, wrapUseQueryPaginated } from './utils/useDefaultQuery.js';
|
122
122
|
export { paginatedResponseUpdater, useQueryUpdater } from './utils/useQueryUpdater.js';
|
123
123
|
export { getPosition, useSelected } from './utils/useSelected.js';
|
@@ -192,6 +192,7 @@ export { default as IconPaste } from './assets/icons/IconPaste.svg.js';
|
|
192
192
|
export { default as IconProfile } from './assets/icons/IconProfile.svg.js';
|
193
193
|
export { default as IconQuote } from './assets/icons/IconQuote.svg.js';
|
194
194
|
export { default as IconRadar } from './assets/icons/IconRadar.svg.js';
|
195
|
+
export { default as IconRedo } from './assets/icons/IconRedo.svg.js';
|
195
196
|
export { default as IconRefresh } from './assets/icons/IconRefresh.svg.js';
|
196
197
|
export { default as IconSearch } from './assets/icons/IconSearch.svg.js';
|
197
198
|
export { default as IconSettings } from './assets/icons/IconSettings.svg.js';
|
@@ -208,6 +209,7 @@ export { default as IconTag } from './assets/icons/IconTag.svg.js';
|
|
208
209
|
export { default as IconTask } from './assets/icons/IconTask.svg.js';
|
209
210
|
export { default as IconTime } from './assets/icons/IconTime.svg.js';
|
210
211
|
export { default as IconTrash } from './assets/icons/IconTrash.svg.js';
|
212
|
+
export { default as IconUndo } from './assets/icons/IconUndo.svg.js';
|
211
213
|
export { default as IconUser } from './assets/icons/IconUser.svg.js';
|
212
214
|
export { default as IconVersionControl } from './assets/icons/IconVersionControl.svg.js';
|
213
215
|
export { default as IconWarn } from './assets/icons/IconWarn.svg.js';
|
package/dist/utils/useCopy.d.ts
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
import { MaybeRef } from 'vue';
|
2
|
+
export declare const checkPermissionPaste: () => Promise<boolean>;
|
2
3
|
export declare const useCopy: (value: MaybeRef<string | number | undefined>) => {
|
3
4
|
copied: import('vue').Ref<boolean, boolean>;
|
4
5
|
iconCopy: import('vue').ComputedRef<import('vue').Raw<import('vue').FunctionalComponent<import('vue').SVGAttributes, {}, any, {}>>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"useCopy.d.ts","sourceRoot":"","sources":["../../../src/utils/useCopy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAgC,MAAM,KAAK,CAAA;AAOhE,eAAO,MAAM,OAAO,GAAI,OAAO,QAAQ,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;;;;
|
1
|
+
{"version":3,"file":"useCopy.d.ts","sourceRoot":"","sources":["../../../src/utils/useCopy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAgC,MAAM,KAAK,CAAA;AAOhE,eAAO,MAAM,oBAAoB,QAAa,OAAO,CAAC,OAAO,CAG5D,CAAA;AAOD,eAAO,MAAM,OAAO,GAAI,OAAO,QAAQ,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;;;;CAuDnE,CAAA"}
|
package/dist/utils/useCopy.js
CHANGED
@@ -3,14 +3,18 @@ import IconCopy from '../assets/icons/IconCopy.svg.js';
|
|
3
3
|
import IconCopySuccess from '../assets/icons/IconCopySuccess.svg.js';
|
4
4
|
import { Notify } from './Notify.js';
|
5
5
|
|
6
|
+
const checkPermissionPaste = async () => {
|
7
|
+
const result = await navigator.permissions.query({ name: "clipboard-read" });
|
8
|
+
return result.state === "granted" || result.state === "prompt";
|
9
|
+
};
|
10
|
+
const checkPermissionCopy = async () => {
|
11
|
+
const result = await navigator.permissions.query({ name: "clipboard-write" });
|
12
|
+
return result.state === "granted" || result.state === "prompt";
|
13
|
+
};
|
6
14
|
const useCopy = (value) => {
|
7
15
|
const copied = ref(false);
|
8
16
|
let timeout;
|
9
17
|
const iconCopy = computed(() => copied.value ? markRaw(IconCopySuccess) : markRaw(IconCopy));
|
10
|
-
const checkPermission = async () => {
|
11
|
-
const result = await navigator.permissions.query({ name: "clipboard-write" });
|
12
|
-
return result.state === "granted" || result.state === "prompt";
|
13
|
-
};
|
14
18
|
const _doCopy = () => {
|
15
19
|
const text = unref(value);
|
16
20
|
if (!text) {
|
@@ -29,22 +33,20 @@ const useCopy = (value) => {
|
|
29
33
|
timeout = void 0;
|
30
34
|
copied.value = false;
|
31
35
|
}, 1e3);
|
32
|
-
}).catch(() => {
|
33
|
-
Notify.error({
|
34
|
-
title: "Copy failed"
|
35
|
-
});
|
36
36
|
});
|
37
37
|
};
|
38
38
|
const doCopy = () => {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
39
|
+
try {
|
40
|
+
_doCopy().catch(async () => {
|
41
|
+
await checkPermissionCopy();
|
42
|
+
await _doCopy();
|
43
|
+
});
|
44
|
+
} catch {
|
45
|
+
Notify.error({
|
46
|
+
title: "Copy failed",
|
47
|
+
caption: `Please allow the clipboard actions in browser settings for current domain: ${location.host}`
|
48
|
+
});
|
49
|
+
}
|
48
50
|
};
|
49
51
|
return {
|
50
52
|
copied,
|
@@ -53,4 +55,4 @@ const useCopy = (value) => {
|
|
53
55
|
};
|
54
56
|
};
|
55
57
|
|
56
|
-
export { useCopy };
|
58
|
+
export { checkPermissionPaste, useCopy };
|