eco-vue-js 0.10.81 → 0.10.83
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/components/Button/WButton.vue.d.ts +2 -0
- package/dist/components/Button/WButton.vue.d.ts.map +1 -1
- package/dist/components/Button/WButton.vue.js +13 -11
- package/dist/components/Button/WButtonAction.vue.d.ts +2 -0
- package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonAction.vue.js +2 -2
- package/dist/components/Button/WButtonDropdown.vue.d.ts +1 -0
- package/dist/components/Button/WButtonDropdown.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonDropdown.vue.js +2 -1
- package/dist/components/Button/WButtonGroup.vue.d.ts +1 -1
- package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonGroup.vue.js +7 -5
- package/dist/components/Chart/WChartLine.vue.d.ts.map +1 -1
- package/dist/components/Chart/WChartLine.vue.js +12 -9
- package/dist/components/Chart/WChartLinear.vue.d.ts +1 -0
- package/dist/components/Chart/WChartLinear.vue.d.ts.map +1 -1
- package/dist/components/Chart/WChartLinear.vue.js +7 -5
- package/dist/components/Checkbox/WCheckbox.vue.d.ts +5 -1
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckbox.vue.js +21 -18
- package/dist/components/Checkbox/types.d.ts +1 -0
- package/dist/components/Checkbox/types.d.ts.map +1 -1
- package/dist/components/Chip/WChip.vue.d.ts +5 -1
- package/dist/components/Chip/WChip.vue.d.ts.map +1 -1
- package/dist/components/Chip/WChip.vue.js +9 -6
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +9 -1
- package/dist/components/DatePicker/WDatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.js +8 -4
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +11 -1
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +10 -4
- package/dist/components/DragContainer/use/useDragContainer.js +2 -1
- package/dist/components/Dropdown/WDropdown.vue.js +2 -2
- package/dist/components/Dropdown/types.d.ts +1 -0
- package/dist/components/Dropdown/types.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +2 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +1 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +5 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +12 -10
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +11 -1
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.js +20 -14
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncCheckboxGroup.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncInput.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelect.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +4 -3
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +4 -3
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +4 -3
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +4 -3
- package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts.map +1 -1
- package/dist/components/FormAsync/WFormAsyncToggle.vue.js +3 -2
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +1 -0
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +4 -2
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts +1 -0
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +3 -2
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +24 -22
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.js +11 -9
- package/dist/components/Input/WInputDate.vue.d.ts +3 -0
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputDate.vue.js +5 -4
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputOptions.vue.js +13 -10
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +12 -9
- package/dist/components/List/WList.vue.d.ts.map +1 -1
- package/dist/components/List/WList.vue.js +27 -25
- package/dist/components/List/WListCard.vue.d.ts.map +1 -1
- package/dist/components/List/WListCard.vue.js +4 -2
- package/dist/components/List/WListHeader.vue.d.ts.map +1 -1
- package/dist/components/List/WListHeader.vue.js +1 -0
- package/dist/components/MenuItem/WMenuItem.vue.js +1 -1
- package/dist/components/Nav/WNavItemTransition.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +23 -20
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +15 -12
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +2 -0
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncList.vue.js +12 -6
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +6 -5
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +8 -7
- package/dist/components/Select/WSelectStringified.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectStringified.vue.js +8 -7
- package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
- package/dist/components/Toggle/WToggle.vue.js +16 -12
- package/dist/components/Toggle/WToggleTheme.vue.js +2 -1
- package/dist/components/Toggle/types.d.ts +1 -0
- package/dist/components/Toggle/types.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltip.vue.d.ts +2 -0
- package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltip.vue.js +4 -0
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts +1 -0
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +3 -1
- package/dist/components/Tooltip/models/tooltipMeta.d.ts +6 -0
- package/dist/components/Tooltip/models/tooltipMeta.d.ts.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +2 -0
- package/dist/types/global.d.ts +1 -1
- package/dist/utils/api.d.ts +1 -0
- package/dist/utils/api.d.ts.map +1 -1
- package/dist/utils/api.js +4 -1
- package/dist/utils/provide.d.ts +5 -0
- package/dist/utils/provide.d.ts.map +1 -0
- package/dist/utils/provide.js +19 -0
- package/dist/utils/useComponentStates.d.ts +19 -0
- package/dist/utils/useComponentStates.d.ts.map +1 -0
- package/dist/utils/useComponentStates.js +36 -0
- package/package.json +4 -1
@@ -9,13 +9,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
allowClear: { type: Boolean },
|
10
10
|
searchModel: { type: Boolean },
|
11
11
|
createdData: {},
|
12
|
-
valueGetter: {
|
13
|
-
searchFn: {
|
12
|
+
valueGetter: {},
|
13
|
+
searchFn: {},
|
14
14
|
useQueryFnDefault: {},
|
15
15
|
emptyStub: {},
|
16
16
|
hidePrefix: { type: Boolean },
|
17
|
-
createOption: {
|
18
|
-
filterOptions: {
|
17
|
+
createOption: {},
|
18
|
+
filterOptions: {},
|
19
19
|
hideOptionIcon: { type: Boolean },
|
20
20
|
selectOnClose: { type: Boolean },
|
21
21
|
mobileTitle: {},
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
34
|
name: {},
|
35
35
|
autocomplete: {},
|
36
36
|
autofocus: { type: Boolean },
|
37
|
-
readonly: { type: Boolean },
|
37
|
+
readonly: { type: Boolean, default: void 0 },
|
38
38
|
disabledActions: { type: Boolean },
|
39
39
|
loading: { type: Boolean },
|
40
40
|
spellcheck: { type: Boolean },
|
@@ -50,8 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
50
50
|
tooltipText: {},
|
51
51
|
mono: { type: Boolean },
|
52
52
|
hasChanges: { type: Boolean },
|
53
|
-
skeleton: { type: Boolean },
|
54
|
-
disabled: { type: Boolean },
|
53
|
+
skeleton: { type: Boolean, default: void 0 },
|
54
|
+
disabled: { type: Boolean, default: void 0 },
|
55
55
|
required: { type: Boolean },
|
56
56
|
mandatory: { type: Boolean },
|
57
57
|
noMargin: { type: Boolean },
|
@@ -67,6 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
67
|
maxWidth: {},
|
68
68
|
horizontalAlign: {},
|
69
69
|
top: { type: Boolean },
|
70
|
+
bottom: { type: Boolean },
|
70
71
|
optionComponent: {},
|
71
72
|
optionComponentProps: {},
|
72
73
|
useQueryFnOptions: {},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectStringified.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectStringified.vue"],"names":[],"mappings":"AA+CA;
|
1
|
+
{"version":3,"file":"WSelectStringified.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectStringified.vue"],"names":[],"mappings":"AA+CA;AA6GA,OAAO,KAAK,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,sBAAsB,EAAC,MAAM,SAAS,CAAA;AAE7F,OAAO,EAAC,KAAK,KAAK,EAA2B,MAAM,KAAK,CAAA;yBAIvC,KAAK,SAAS,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACvI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WAsMO,mBAAmB,CAAC;;;;uRAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBApJD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;gBAHxD,MAAM,KAAK,EAAE;mBACV,MAAM,KAAK,EAAE;gBAChB,MAAM,KAAK,EAAE;iBACZ,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,KAAK,EAAE;;;YAzC5D,oBAAoB,SAAS,KAAK,GAAG,IAAI;YACzC,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EA4LrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAjNzE,wBAiN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -7,14 +7,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
7
7
|
props: {
|
8
8
|
modelValue: {},
|
9
9
|
divider: {},
|
10
|
-
valueGetter: {
|
11
|
-
searchFn: {
|
10
|
+
valueGetter: {},
|
11
|
+
searchFn: {},
|
12
12
|
useQueryFnDefault: {},
|
13
13
|
emptyStub: {},
|
14
14
|
disableClear: { type: Boolean },
|
15
15
|
hidePrefix: { type: Boolean },
|
16
|
-
createOption: {
|
17
|
-
filterOptions: {
|
16
|
+
createOption: {},
|
17
|
+
filterOptions: {},
|
18
18
|
hideOptionIcon: { type: Boolean },
|
19
19
|
createdData: {},
|
20
20
|
selectOnClose: { type: Boolean },
|
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
34
|
name: {},
|
35
35
|
autocomplete: {},
|
36
36
|
autofocus: { type: Boolean },
|
37
|
-
readonly: { type: Boolean },
|
37
|
+
readonly: { type: Boolean, default: void 0 },
|
38
38
|
disabledActions: { type: Boolean },
|
39
39
|
loading: { type: Boolean },
|
40
40
|
spellcheck: { type: Boolean },
|
@@ -50,8 +50,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
50
50
|
tooltipText: {},
|
51
51
|
mono: { type: Boolean },
|
52
52
|
hasChanges: { type: Boolean },
|
53
|
-
skeleton: { type: Boolean },
|
54
|
-
disabled: { type: Boolean },
|
53
|
+
skeleton: { type: Boolean, default: void 0 },
|
54
|
+
disabled: { type: Boolean, default: void 0 },
|
55
55
|
required: { type: Boolean },
|
56
56
|
mandatory: { type: Boolean },
|
57
57
|
noMargin: { type: Boolean },
|
@@ -67,6 +67,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
67
67
|
maxWidth: {},
|
68
68
|
horizontalAlign: {},
|
69
69
|
top: { type: Boolean },
|
70
|
+
bottom: { type: Boolean },
|
70
71
|
optionComponent: {},
|
71
72
|
optionComponentProps: {},
|
72
73
|
useQueryFnOptions: {},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WToggle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Toggle/WToggle.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WToggle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Toggle/WToggle.vue"],"names":[],"mappings":"AAgFA;AA0JA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,SAAS,CAAA;yBAUvB,KAAK,SAAS,OAAO,GAAG,IAAI,GAAG,OAAO,EACtD,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,EAC3G,eAAe,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,EACjE;WA+MO,mBAAmB,CAAC;;8KAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;uBArCgB,GAAG;;cA3JxB,mBAAmB,SAAS,KAAK,KAAG,IAAI;EAoM1C,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA1NzE,wBA0N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, renderSlot, createTextVNode, toDisplayString,
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, createElementVNode, createCommentVNode, unref, renderSlot, createTextVNode, toDisplayString, createBlock, resolveDynamicComponent } from 'vue';
|
2
2
|
import WSpinner from '../Spinner/WSpinner.vue.js';
|
3
3
|
import { Notify } from '../../utils/Notify.js';
|
4
4
|
import { useSemanticTypeBackgroundMap, SemanticType } from '../../utils/SemanticType.js';
|
5
|
+
import { useComponentStates } from '../../utils/useComponentStates.js';
|
5
6
|
|
6
7
|
const _hoisted_1 = ["disabled"];
|
7
8
|
const _hoisted_2 = { class: "-h--w-input-height py-0.75" };
|
@@ -18,9 +19,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
19
|
title: { default: void 0 },
|
19
20
|
icon: {},
|
20
21
|
small: { type: Boolean },
|
21
|
-
disabled: { type: Boolean },
|
22
|
+
disabled: { type: Boolean, default: void 0 },
|
22
23
|
loading: { type: Boolean },
|
23
|
-
readonly: { type: Boolean },
|
24
|
+
readonly: { type: Boolean, default: void 0 },
|
24
25
|
rightLabel: { type: Boolean },
|
25
26
|
noMargin: { type: Boolean },
|
26
27
|
description: { default: void 0 },
|
@@ -28,12 +29,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
28
29
|
negate: { type: Boolean },
|
29
30
|
validate: {},
|
30
31
|
center: { type: Boolean },
|
31
|
-
mandatory: { type: Boolean }
|
32
|
+
mandatory: { type: Boolean },
|
33
|
+
skeleton: { type: Boolean, default: void 0 }
|
32
34
|
},
|
33
35
|
emits: ["update:modelValue"],
|
34
36
|
setup(__props, { emit: __emit }) {
|
35
37
|
const props = __props;
|
36
38
|
const emit = __emit;
|
39
|
+
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
37
40
|
const semanticTypeBackgroundMap = useSemanticTypeBackgroundMap();
|
38
41
|
const value = computed({
|
39
42
|
get: () => {
|
@@ -42,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
42
45
|
return props.modelValue;
|
43
46
|
},
|
44
47
|
set: (value2) => {
|
45
|
-
if (
|
48
|
+
if (isDisabled.value || props.loading || isReadonly.value) return;
|
46
49
|
const newValue = value2 === null ? null : props.negate ? !value2 : value2;
|
47
50
|
const errorMessage = Array.isArray(props.validate) ? props.validate.map((item) => item(newValue)).join(", ") : props.validate?.(newValue);
|
48
51
|
if (errorMessage) {
|
@@ -71,17 +74,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
71
74
|
}, [
|
72
75
|
createElementVNode("button", {
|
73
76
|
class: normalizeClass(["w-ripple-trigger isolate grid w-full items-center text-start focus:outline-none", {
|
74
|
-
"cursor-not-allowed
|
75
|
-
"
|
76
|
-
"cursor-
|
77
|
-
"cursor-
|
78
|
-
"select-
|
77
|
+
"cursor-not-allowed": unref(isDisabled) && !unref(isSkeleton),
|
78
|
+
"opacity-50": unref(isDisabled) || unref(isSkeleton),
|
79
|
+
"cursor-progress": _ctx.loading || unref(isSkeleton),
|
80
|
+
"cursor-pointer": !unref(isReadonly) && !_ctx.loading && !unref(isDisabled) && !unref(isSkeleton),
|
81
|
+
"cursor-auto select-text": unref(isReadonly),
|
82
|
+
"select-none": !unref(isReadonly),
|
79
83
|
"grid-cols-[1fr,auto]": (_ctx.title || _ctx.$slots.title) && !_ctx.rightLabel,
|
80
84
|
"grid-cols-[auto,1fr]": (_ctx.title || _ctx.$slots.title) && _ctx.rightLabel,
|
81
85
|
"gap-4": _ctx.title || _ctx.$slots.title,
|
82
86
|
"justify-center": _ctx.center
|
83
87
|
}]),
|
84
|
-
disabled:
|
88
|
+
disabled: unref(isDisabled) || unref(isReadonly) || unref(isSkeleton),
|
85
89
|
onClick: updateModelValue
|
86
90
|
}, [
|
87
91
|
_ctx.title || _ctx.$slots.title ? (openBlock(), createElementBlock("div", {
|
@@ -109,7 +113,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
109
113
|
"right-[calc(100%-1.25rem)]": value.value === false,
|
110
114
|
"right-[calc(50%-0.625rem)]": value.value === null,
|
111
115
|
"right-0": value.value === true,
|
112
|
-
"w-ripple w-ripple-hover": !_ctx.disabled && !_ctx.readonly
|
116
|
+
"w-ripple w-ripple-hover": !_ctx.disabled && !_ctx.readonly && !_ctx.skeleton
|
113
117
|
}])
|
114
118
|
}, [
|
115
119
|
_ctx.loading ? (openBlock(), createBlock(WSpinner, {
|
@@ -18,7 +18,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
18
18
|
description: {},
|
19
19
|
validate: {},
|
20
20
|
center: { type: Boolean },
|
21
|
-
mandatory: { type: Boolean }
|
21
|
+
mandatory: { type: Boolean },
|
22
|
+
skeleton: { type: Boolean }
|
22
23
|
},
|
23
24
|
emits: ["update:model-value"],
|
24
25
|
setup(__props) {
|
@@ -15,6 +15,7 @@ export interface ToggleProps<Value extends boolean | null> {
|
|
15
15
|
validate?: ValidateFn | ValidateFn[];
|
16
16
|
center?: boolean;
|
17
17
|
mandatory?: boolean;
|
18
|
+
skeleton?: boolean;
|
18
19
|
}
|
19
20
|
export interface ToggleThemeProps extends Omit<ToggleProps<boolean>, 'modelValue' | 'icon' | 'negate' | 'intermediate'> {
|
20
21
|
modelValue: Theme;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Toggle/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,KAAK,EAAC,MAAM,QAAQ,CAAA;AAEjC,MAAM,WAAW,WAAW,CAAC,KAAK,SAAS,OAAO,GAAG,IAAI;IACvD,UAAU,E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MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,GAAG,QAAQ,GAAG,cAAc,CAAC;IACrH,UAAU,EAAE,KAAK,CAAA;CAClB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltip.vue"],"names":[],"mappings":"AAOA;
|
1
|
+
{"version":3,"file":"WTooltip.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltip.vue"],"names":[],"mappings":"AAOA;AAoGA,OAAO,EAAC,KAAK,KAAK,EAAoF,MAAM,KAAK,CAAA;AAMjH,KAAK,WAAW,GAAG;IACjB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAC;AA+EF,iBAAS,cAAc;WAyBT,OAAO,IAA6B;;kBAzCtC,MAAM,KAAK,EAAE;;kBAAb,MAAM,KAAK,EAAE;;;;;;EA8CxB;AASD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;OAQnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAQpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -17,6 +17,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
17
17
|
trigger: {},
|
18
18
|
noTrigger: { type: Boolean },
|
19
19
|
maxHeight: {},
|
20
|
+
top: { type: Boolean },
|
21
|
+
bottom: { type: Boolean },
|
20
22
|
left: { type: Boolean },
|
21
23
|
right: { type: Boolean }
|
22
24
|
},
|
@@ -44,6 +46,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
44
46
|
text: props.text,
|
45
47
|
id,
|
46
48
|
maxHeight: props.maxHeight,
|
49
|
+
top: props.top,
|
50
|
+
bottom: props.bottom,
|
47
51
|
left: props.left,
|
48
52
|
right: props.right
|
49
53
|
});
|
@@ -8,6 +8,7 @@ declare const _default: import('vue').DefineComponent<{}, {}, {}, {}, {}, import
|
|
8
8
|
readonly maxWidth: number;
|
9
9
|
readonly horizontalAlign: HorizontalAlign;
|
10
10
|
readonly top?: boolean | undefined;
|
11
|
+
readonly bottom?: boolean | undefined;
|
11
12
|
readonly parentElement: Pick<Element, "getBoundingClientRect">;
|
12
13
|
readonly updateAlign?: boolean | undefined;
|
13
14
|
readonly emitUpdate?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WTooltipContainer.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Tooltip/WTooltipContainer.vue"],"names":[],"mappings":"AAoDA;AAuFA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oCAmMiif,GAAG,8CAA8C,GAAG,yBAAyB,GAAG,6DAAmC,GAAG;;;;;;;;;;;;;AAT9sf,wBAOG"}
|
@@ -38,6 +38,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
38
|
"horizontal-align": unref(tooltipMeta).left ? unref(HorizontalAlign).LEFT_CENTER : unref(tooltipMeta).right ? unref(HorizontalAlign).RIGHT_CENTER : unref(HorizontalAlign).CENTER,
|
39
39
|
"max-height": unref(tooltipMeta)?.maxHeight ?? 120,
|
40
40
|
"max-width": unref(tooltipMeta).left || unref(tooltipMeta).right ? 400 : 240,
|
41
|
+
top: unref(tooltipMeta).top,
|
42
|
+
bottom: unref(tooltipMeta).bottom,
|
41
43
|
"emit-update": "",
|
42
44
|
class: "isolate z-[10000]",
|
43
45
|
"onUpdate:rect": unref(close)
|
@@ -64,7 +66,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
64
66
|
}, 1032, ["tooltip-meta", "left", "right", "top", "bottom", "is-top", "is-left", "is-right"])
|
65
67
|
]),
|
66
68
|
_: 1
|
67
|
-
}, 8, ["parent-element", "horizontal-align", "max-height", "max-width", "onUpdate:rect"])) : createCommentVNode("", true)
|
69
|
+
}, 8, ["parent-element", "horizontal-align", "max-height", "max-width", "top", "bottom", "onUpdate:rect"])) : createCommentVNode("", true)
|
68
70
|
]),
|
69
71
|
_: 1
|
70
72
|
});
|
@@ -5,6 +5,8 @@ export type TooltipMeta = {
|
|
5
5
|
slot?: VNode;
|
6
6
|
text?: string;
|
7
7
|
maxHeight?: number;
|
8
|
+
top?: boolean;
|
9
|
+
bottom?: boolean;
|
8
10
|
left?: boolean;
|
9
11
|
right?: boolean;
|
10
12
|
};
|
@@ -15,6 +17,8 @@ export declare const useTooltipMeta: () => {
|
|
15
17
|
slot?: VNode | undefined;
|
16
18
|
text?: string | undefined;
|
17
19
|
maxHeight?: number | undefined;
|
20
|
+
top?: boolean | undefined;
|
21
|
+
bottom?: boolean | undefined;
|
18
22
|
left?: boolean | undefined;
|
19
23
|
right?: boolean | undefined;
|
20
24
|
} | null, TooltipMeta | {
|
@@ -23,6 +27,8 @@ export declare const useTooltipMeta: () => {
|
|
23
27
|
slot?: VNode | undefined;
|
24
28
|
text?: string | undefined;
|
25
29
|
maxHeight?: number | undefined;
|
30
|
+
top?: boolean | undefined;
|
31
|
+
bottom?: boolean | undefined;
|
26
32
|
left?: boolean | undefined;
|
27
33
|
right?: boolean | undefined;
|
28
34
|
} | null>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltipMeta.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/models/tooltipMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,KAAK,EAAe,MAAM,KAAK,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAaD,eAAO,MAAM,cAAc;;
|
1
|
+
{"version":3,"file":"tooltipMeta.d.ts","sourceRoot":"","sources":["../../../../../src/components/Tooltip/models/tooltipMeta.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,KAAK,EAAe,MAAM,KAAK,CAAA;AAE5C,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB,CAAA;AAaD,eAAO,MAAM,cAAc;;YAtBrB,MAAM;gBACF,WAAW;eACZ,KAAK;eACL,MAAM;oBACD,MAAM;cACZ,OAAO;iBACJ,OAAO;eACT,OAAO;gBACN,OAAO;;YARX,MAAM;gBACF,WAAW;eACZ,KAAK;eACL,MAAM;oBACD,MAAM;cACZ,OAAO;iBACJ,OAAO;eACT,OAAO;gBACN,OAAO;;2BAee,WAAW,GAAG,IAAI;;CA+BjD,CAAA"}
|
package/dist/main.d.ts
CHANGED
@@ -10,6 +10,8 @@ export * from './utils/SemanticType';
|
|
10
10
|
export * from './utils/HorizontalAlign';
|
11
11
|
export * from './utils/dateTime';
|
12
12
|
export * from './utils/mobile';
|
13
|
+
export * from './utils/order';
|
14
|
+
export * from './utils/provide';
|
13
15
|
export * from './utils/useDefaultQuery';
|
14
16
|
export * from './utils/useQueryUpdater';
|
15
17
|
export * from './utils/useCopy';
|
package/dist/main.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAE1C,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA"}
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../../src/main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,wBAAwB,CAAA;AACtD,OAAO,KAAK,QAAQ,MAAM,oBAAoB,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAE1C,cAAc,aAAa,CAAA;AAC3B,cAAc,mBAAmB,CAAA;AACjC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAA;AACpE,cAAc,sBAAsB,CAAA;AACpC,cAAc,yBAAyB,CAAA;AACvC,cAAc,kBAAkB,CAAA;AAChC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AACvC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,kBAAkB,CAAA"}
|
package/dist/main.js
CHANGED
@@ -117,6 +117,8 @@ export { SemanticType, setSemanticTypeBackgroundMap, setSemanticTypeBorderMap, s
|
|
117
117
|
export { HorizontalAlign } from './utils/HorizontalAlign.js';
|
118
118
|
export { Month, WeekDay, addDay, addMonth, addYear, dateFormat, dateFormatter, dateRegexp, dateToQueryString, datetimeFormat, durationHumanize, getDurationRound, getStartOfDay, getStartOfMonth, getStartOfNextDay, getStartOfWeek, isSameDate, isSameMonth, isSameWeek, isSameYear, monthShortFormatter, parseDate, timeFormat, timeFormatShort, weekdayShortFormatter } from './utils/dateTime.js';
|
119
119
|
export { getIsMobile, getIsTablet, getIsTouchDevice, useIsMobile } from './utils/mobile.js';
|
120
|
+
export { Order, encodeOrdering, parseOrdering } from './utils/order.js';
|
121
|
+
export { useProvideDisabled, useProvideReadonly, useProvideSkeleton } from './utils/provide.js';
|
120
122
|
export { PAGE_LENGTH, makeQueryPaginated, useDefaultQuery, wrapUseQueryPaginated } from './utils/useDefaultQuery.js';
|
121
123
|
export { paginatedResponseUpdater, useQueryUpdater } from './utils/useQueryUpdater.js';
|
122
124
|
export { useCopy } from './utils/useCopy.js';
|
package/dist/types/global.d.ts
CHANGED
@@ -50,7 +50,7 @@ declare module 'eco-vue-js/dist/assets/icons/*' {
|
|
50
50
|
export default src
|
51
51
|
}
|
52
52
|
|
53
|
-
declare type DefaultData =
|
53
|
+
declare type DefaultData = NonNullable<unknown>
|
54
54
|
|
55
55
|
type Params = Parameters<import('@tanstack/vue-query').QueryClient['setQueriesData']>
|
56
56
|
|
package/dist/utils/api.d.ts
CHANGED
@@ -22,6 +22,7 @@ export declare const encodeRouteParams: <T>(params: T) => Partial<EncodeQueryPar
|
|
22
22
|
export declare const createUseQueryParams: <QueryParams extends Record<string, unknown>>(config: { [Key in keyof QueryParams]: ParseFn<QueryParams[Key]>; }) => {
|
23
23
|
(route: {
|
24
24
|
query: EncodeQueryParams<Partial<QueryParams>>;
|
25
|
+
hash?: string;
|
25
26
|
}, enabled?: Ref<boolean>): {
|
26
27
|
queryParams: Reactive<Partial<QueryParams>>;
|
27
28
|
updateQueryParams: (value: Partial<QueryParams>) => void;
|
package/dist/utils/api.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../src/utils/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,QAAQ,EAAE,KAAK,GAAG,EAAkB,MAAM,KAAK,CAAA;AAG5D,OAAO,KAAK,KAAK,MAAM,6BAA6B,CAAA;AACpD,OAAO,KAAK,cAAc,MAAM,sCAAsC,CAAA;AAMtE,KAAK,aAAa,CAAC,QAAQ,IAAI;KAC5B,GAAG,IAAI,QAAQ,GAAG,kBAAkB,GAAG,MAAM,QAAQ,CAAC,CAAC,EAAE,GAAG,SAAS,QAAQ,GAAG,MAAM,GAAG,MAAM,EAAE;CACnG,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BAAgB,GAAI,CAAC,EAAE,OAAO,CAAC,KAAG,gBAAgB,CAAC,CAAC,CAAC,GAAG,SAYpE,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAG,iBAAiB,CAAC,CAAC,CAYnE,CAAA;AAED,eAAO,MAAM,iBAAiB,GAAI,CAAC,EAAE,QAAQ,CAAC,KAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAc5E,CAAA;AAED,eAAO,MAAM,oBAAoB,GAAI,WAAW,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,GAAE,GAAG,IAAI,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,GAAC,KAwDlI;YAhCM;QAAC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAC,YAAY,GAAG,CAAC,OAAO,CAAC;;mCAGtE,OAAO,CAAC,WAAW,CAAC;;eA3BkC,GAAG;yBAGjE,OAAO,CAAC,WAAW,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,SAAS,iBAAiB,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAqDxG;IAAC,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,CAAA;CAC5D,CAAA"}
|
package/dist/utils/api.js
CHANGED
@@ -76,7 +76,10 @@ const createUseQueryParams = (config) => {
|
|
76
76
|
const fn = (route, enabled) => {
|
77
77
|
const router = useRouter();
|
78
78
|
const updateQueryParams = (value) => {
|
79
|
-
router.replace({
|
79
|
+
router.replace({
|
80
|
+
query: { ...route.query, ...encodeRouteParams(value) },
|
81
|
+
hash: Object.keys(value).length === 1 && "ordering" in value ? route.hash : void 0
|
82
|
+
});
|
80
83
|
};
|
81
84
|
const handle = watch(() => route.query, (value) => {
|
82
85
|
if (lastQuery === value) return;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { MaybeRef } from 'vue';
|
2
|
+
export declare const useProvideReadonly: (value?: MaybeRef<boolean>) => MaybeRef<boolean> | undefined;
|
3
|
+
export declare const useProvideDisabled: (value?: MaybeRef<boolean>) => MaybeRef<boolean> | undefined;
|
4
|
+
export declare const useProvideSkeleton: (value?: MaybeRef<boolean>) => MaybeRef<boolean> | undefined;
|
5
|
+
//# sourceMappingURL=provide.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"provide.d.ts","sourceRoot":"","sources":["../../../src/utils/provide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,QAAQ,EAAkB,MAAM,KAAK,CAAA;AAIrE,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,CAAC,OAAO,CAAC,kCAI3D,CAAA;AAID,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,CAAC,OAAO,CAAC,kCAI3D,CAAA;AAID,eAAO,MAAM,kBAAkB,GAAI,QAAQ,QAAQ,CAAC,OAAO,CAAC,kCAI3D,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { inject, provide } from 'vue';
|
2
|
+
|
3
|
+
const wReadonlyKey = Symbol("wReadonlyKey");
|
4
|
+
const useProvideReadonly = (value) => {
|
5
|
+
if (value !== void 0) provide(wReadonlyKey, value);
|
6
|
+
return inject(wReadonlyKey, void 0);
|
7
|
+
};
|
8
|
+
const wDisabledKey = Symbol("wDisabledKey");
|
9
|
+
const useProvideDisabled = (value) => {
|
10
|
+
if (value !== void 0) provide(wDisabledKey, value);
|
11
|
+
return inject(wDisabledKey, void 0);
|
12
|
+
};
|
13
|
+
const wSkeletonKey = Symbol("wSkeletonKey");
|
14
|
+
const useProvideSkeleton = (value) => {
|
15
|
+
if (value !== void 0) provide(wSkeletonKey, value);
|
16
|
+
return inject(wSkeletonKey, void 0);
|
17
|
+
};
|
18
|
+
|
19
|
+
export { useProvideDisabled, useProvideReadonly, useProvideSkeleton };
|
@@ -0,0 +1,19 @@
|
|
1
|
+
interface ComponentStateProps {
|
2
|
+
readonly?: boolean;
|
3
|
+
disabled?: boolean;
|
4
|
+
skeleton?: boolean;
|
5
|
+
}
|
6
|
+
export declare const useComponentStates: <T extends ComponentStateProps>(props: T) => {
|
7
|
+
isReadonly: import('vue').ComputedRef<boolean | undefined>;
|
8
|
+
isDisabled: import('vue').ComputedRef<boolean | undefined>;
|
9
|
+
isSkeleton: import('vue').ComputedRef<boolean | undefined>;
|
10
|
+
};
|
11
|
+
export declare const useComponentStatesButton: <T extends Omit<ComponentStateProps, "readonly">>(props: T) => {
|
12
|
+
isDisabled: import('vue').ComputedRef<boolean>;
|
13
|
+
isSkeleton: import('vue').ComputedRef<boolean | undefined>;
|
14
|
+
};
|
15
|
+
export declare const useComponentStatesSkeleton: <T extends Pick<ComponentStateProps, "skeleton">>(props: T) => {
|
16
|
+
isSkeleton: import('vue').ComputedRef<boolean | undefined>;
|
17
|
+
};
|
18
|
+
export {};
|
19
|
+
//# sourceMappingURL=useComponentStates.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useComponentStates.d.ts","sourceRoot":"","sources":["../../../src/utils/useComponentStates.ts"],"names":[],"mappings":"AAIA,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,eAAO,MAAM,kBAAkB,GAAI,CAAC,SAAS,mBAAmB,EAAE,OAAO,CAAC;;;;CAczE,CAAA;AAED,eAAO,MAAM,wBAAwB,GAAI,CAAC,SAAS,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC;;;CAYjG,CAAA;AAED,eAAO,MAAM,0BAA0B,GAAI,CAAC,SAAS,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,EAAE,OAAO,CAAC;;CAQnG,CAAA"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import { computed, unref } from 'vue';
|
2
|
+
import { useProvideReadonly, useProvideDisabled, useProvideSkeleton } from './provide.js';
|
3
|
+
|
4
|
+
const useComponentStates = (props) => {
|
5
|
+
const readonlyProvided = useProvideReadonly();
|
6
|
+
const disabledProvided = useProvideDisabled();
|
7
|
+
const skeletonProvided = useProvideSkeleton();
|
8
|
+
const isReadonly = computed(() => props.readonly ?? unref(readonlyProvided));
|
9
|
+
const isDisabled = computed(() => props.disabled ?? unref(disabledProvided));
|
10
|
+
const isSkeleton = computed(() => props.skeleton ?? unref(skeletonProvided));
|
11
|
+
return {
|
12
|
+
isReadonly,
|
13
|
+
isDisabled,
|
14
|
+
isSkeleton
|
15
|
+
};
|
16
|
+
};
|
17
|
+
const useComponentStatesButton = (props) => {
|
18
|
+
const readonlyProvided = useProvideReadonly();
|
19
|
+
const disabledProvided = useProvideDisabled();
|
20
|
+
const skeletonProvided = useProvideSkeleton();
|
21
|
+
const isDisabled = computed(() => props.disabled ?? (unref(disabledProvided) || unref(readonlyProvided)) ?? false);
|
22
|
+
const isSkeleton = computed(() => props.skeleton ?? unref(skeletonProvided));
|
23
|
+
return {
|
24
|
+
isDisabled,
|
25
|
+
isSkeleton
|
26
|
+
};
|
27
|
+
};
|
28
|
+
const useComponentStatesSkeleton = (props) => {
|
29
|
+
const skeletonProvided = useProvideSkeleton();
|
30
|
+
const isSkeleton = computed(() => props.skeleton ?? unref(skeletonProvided));
|
31
|
+
return {
|
32
|
+
isSkeleton
|
33
|
+
};
|
34
|
+
};
|
35
|
+
|
36
|
+
export { useComponentStates, useComponentStatesButton, useComponentStatesSkeleton };
|
package/package.json
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
"type": "git",
|
5
5
|
"url": "https://github.com/rsmple/eco-vue-js.git"
|
6
6
|
},
|
7
|
-
"version": "0.10.
|
7
|
+
"version": "0.10.83",
|
8
8
|
"dependencies": {
|
9
9
|
"@stylistic/eslint-plugin": "5.1.0",
|
10
10
|
"@tanstack/eslint-plugin-query": "5.81.2",
|
@@ -92,6 +92,9 @@
|
|
92
92
|
"./dist/utils/order": {
|
93
93
|
"import": "./dist/utils/order.js"
|
94
94
|
},
|
95
|
+
"./dist/utils/provide": {
|
96
|
+
"import": "./dist/utils/provide.js"
|
97
|
+
},
|
95
98
|
"./dist/utils/useSelected": {
|
96
99
|
"import": "./dist/utils/useSelected.js"
|
97
100
|
},
|