eco-vue-js 0.10.80 → 0.10.82
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 +16 -13
- 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 +21 -18
- 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 +8 -6
- 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 +2 -1
- 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/Progress/WProgressStriped.vue.d.ts.map +1 -1
- package/dist/components/Progress/WProgressStriped.vue.js +6 -4
- 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
@@ -1,6 +1,7 @@
|
|
1
1
|
import { defineComponent, ref, useTemplateRef, computed, watch, nextTick, createBlock, openBlock, mergeProps, unref, withModifiers, createSlots, withCtx, createVNode, renderSlot, resolveDynamicComponent, createCommentVNode } from 'vue';
|
2
2
|
import _sfc_main$1 from '../Input/WInputSuggest.vue.js';
|
3
3
|
import { useIsMobile } from '../../utils/mobile.js';
|
4
|
+
import { useComponentStates } from '../../utils/useComponentStates.js';
|
4
5
|
import _sfc_main$2 from './components/SelectAsyncList.vue.js';
|
5
6
|
import _sfc_main$3 from './components/SelectAsyncPrefix.vue.js';
|
6
7
|
|
@@ -40,7 +41,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
40
41
|
name: {},
|
41
42
|
autocomplete: {},
|
42
43
|
autofocus: { type: Boolean },
|
43
|
-
readonly: { type: Boolean },
|
44
|
+
readonly: { type: Boolean, default: void 0 },
|
44
45
|
disabledActions: { type: Boolean },
|
45
46
|
loading: { type: Boolean },
|
46
47
|
spellcheck: { type: Boolean },
|
@@ -56,8 +57,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
56
57
|
tooltipText: {},
|
57
58
|
mono: { type: Boolean },
|
58
59
|
hasChanges: { type: Boolean },
|
59
|
-
skeleton: { type: Boolean },
|
60
|
-
disabled: { type: Boolean },
|
60
|
+
skeleton: { type: Boolean, default: void 0 },
|
61
|
+
disabled: { type: Boolean, default: void 0 },
|
61
62
|
required: { type: Boolean },
|
62
63
|
mandatory: { type: Boolean },
|
63
64
|
noMargin: { type: Boolean },
|
@@ -73,6 +74,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
73
74
|
maxWidth: {},
|
74
75
|
horizontalAlign: {},
|
75
76
|
top: { type: Boolean },
|
77
|
+
bottom: { type: Boolean },
|
76
78
|
optionComponent: {},
|
77
79
|
optionComponentProps: {}
|
78
80
|
},
|
@@ -80,6 +82,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
80
82
|
setup(__props, { expose: __expose, emit: __emit }) {
|
81
83
|
const props = __props;
|
82
84
|
const emit = __emit;
|
85
|
+
const { isReadonly, isDisabled } = useComponentStates(props);
|
83
86
|
const { isMobile } = useIsMobile();
|
84
87
|
const isOpen = ref(false);
|
85
88
|
const inputRef = useTemplateRef("input");
|
@@ -88,7 +91,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
88
91
|
const isFetchingPrefix = ref(false);
|
89
92
|
const search = ref("");
|
90
93
|
const loadingCreate = ref(false);
|
91
|
-
const
|
94
|
+
const isDisabledComputed = computed(() => props.loading || isReadonly.value || isDisabled.value);
|
92
95
|
const isModelValueSearch = computed(() => !!search.value && props.modelValue.includes(search.value));
|
93
96
|
const enabled = computed(() => !props.disabled);
|
94
97
|
const queryParams = computed(() => ({ ...props.queryParamsOptions, [props.searchField ?? "search"]: search.value }));
|
@@ -123,17 +126,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
123
126
|
}
|
124
127
|
};
|
125
128
|
const select = (item) => {
|
126
|
-
if (
|
129
|
+
if (isDisabledComputed.value) return;
|
127
130
|
emit("select", item);
|
128
131
|
search.value = "";
|
129
132
|
};
|
130
133
|
const unselect = (item) => {
|
131
|
-
if (
|
134
|
+
if (isDisabledComputed.value) return;
|
132
135
|
emit("unselect", item);
|
133
136
|
search.value = "";
|
134
137
|
};
|
135
138
|
const create = async (value) => {
|
136
|
-
if (
|
139
|
+
if (isDisabledComputed.value) return;
|
137
140
|
if (!props.createOption) return;
|
138
141
|
loadingCreate.value = true;
|
139
142
|
const option = await props.createOption(value);
|
@@ -144,7 +147,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
144
147
|
loadingCreate.value = false;
|
145
148
|
};
|
146
149
|
const updateSelected = (value) => {
|
147
|
-
if (
|
150
|
+
if (isDisabledComputed.value) return;
|
148
151
|
emit("update:modelValue", value);
|
149
152
|
search.value = "";
|
150
153
|
};
|
@@ -211,16 +214,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
211
214
|
key: 0,
|
212
215
|
"use-query-fn": _ctx.useQueryFnPrefix ?? _ctx.useQueryFnOptions,
|
213
216
|
"model-value": _ctx.modelValue,
|
214
|
-
disabled:
|
217
|
+
disabled: unref(isDisabled),
|
215
218
|
loading: _ctx.loading || isFetchingPrefix.value,
|
216
219
|
"option-component": _ctx.optionComponent,
|
217
220
|
"option-component-props": _ctx.optionComponentProps,
|
218
|
-
"disable-clear": _ctx.disableClear ||
|
221
|
+
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value,
|
219
222
|
"preview-data": _ctx.previewData,
|
220
223
|
"created-data": _ctx.createdData,
|
221
224
|
"value-getter": _ctx.valueGetter,
|
222
225
|
"value-query-key": _ctx.valueQueryKey,
|
223
|
-
readonly:
|
226
|
+
readonly: unref(isReadonly),
|
224
227
|
onUnselect: unselect,
|
225
228
|
"onUpdate:fetching": _cache[0] || (_cache[0] = ($event) => {
|
226
229
|
!$event && updateDropdown();
|
@@ -251,7 +254,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
251
254
|
"use-query-fn": _ctx.useQueryFnOptions,
|
252
255
|
"query-params": queryParams.value,
|
253
256
|
loading: _ctx.loading || isFetchingPrefix.value,
|
254
|
-
disabled:
|
257
|
+
disabled: isDisabledComputed.value,
|
255
258
|
"empty-stub": !search.value && _ctx.emptyStub ? _ctx.emptyStub : void 0,
|
256
259
|
"allow-create": _ctx.createOption && (!hasSearchOption.value || isModelValueSearch.value),
|
257
260
|
"hide-option-icon": _ctx.hideOptionIcon,
|
@@ -18,6 +18,8 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
18
18
|
hideOptionIcon?: boolean;
|
19
19
|
valueGetter?: (data: Data) => Model;
|
20
20
|
queryOptions?: Partial<Parameters<UseQueryPaginated<Data, QueryParams>>[1]>;
|
21
|
+
disabled?: boolean;
|
22
|
+
readonly?: boolean;
|
21
23
|
} & Partial<{}>> & import('vue').PublicProps;
|
22
24
|
expose(exposed: import('vue').ShallowUnwrapRef<{}>): void;
|
23
25
|
attrs: any;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncList.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsyncList.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncList.vue"],"names":[],"mappings":"AAyDA;AA+GA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAS7B,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EACpF,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+NO,mBAAmB,CAAC;;;;;;gBA7NhB,MAAM;oBACF,MAAM;oBACN,KAAK,EAAE;oBACP,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC;qBACnC,WAAW;mBACb,OAAO;wBACF,CAAC,MAAM,WAAW,CAAC,EAAE;qBACxB,OAAO;uBACL,OAAO;yBACL,OAAO;sBACV,CAAC,IAAI,EAAE,IAAI,KAAK,KAAK;uBACpB,OAAO,CAAC,UAAU,CAAC,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;mBAChE,OAAO;mBACP,OAAO;mBAgNwE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;kBAvLC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;kBAApD,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;;YAV1D,QAAQ,SAAS,KAAK,GAAG,IAAI;YAC7B,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC3C,cAAc,SAAS,MAAM,GAAG,IAAI;;EAkMtC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA1OzE,wBA0O4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -1,6 +1,7 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createBlock, Fragment, createTextVNode, toDisplayString, withCtx, createVNode, createSlots, renderSlot } from 'vue';
|
1
|
+
import { defineComponent, createElementBlock, openBlock, createCommentVNode, createBlock, unref, Fragment, createTextVNode, toDisplayString, withCtx, createVNode, createSlots, renderSlot } from 'vue';
|
2
2
|
import _sfc_main$1 from '../InfiniteList/WInfiniteListScrollingElement.vue.js';
|
3
3
|
import WSkeleton from '../Skeleton/WSkeleton.vue.js';
|
4
|
+
import { useComponentStates } from '../../utils/useComponentStates.js';
|
4
5
|
import _sfc_main$2 from './components/SelectAsyncList.vue.js';
|
5
6
|
|
6
7
|
const _hoisted_1 = {
|
@@ -15,24 +16,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
16
|
modelValue: {},
|
16
17
|
useQueryFn: {},
|
17
18
|
queryParams: {},
|
18
|
-
skeleton: { type: Boolean },
|
19
|
+
skeleton: { type: Boolean, default: void 0 },
|
19
20
|
excludeParams: { default: void 0 },
|
20
21
|
selectOnly: { type: Boolean },
|
21
22
|
unselectOnly: { type: Boolean },
|
22
23
|
hideOptionIcon: { type: Boolean },
|
23
24
|
valueGetter: { type: Function, default: (data) => data.id },
|
24
|
-
queryOptions: { default: void 0 }
|
25
|
+
queryOptions: { default: void 0 },
|
26
|
+
disabled: { type: Boolean, default: void 0 },
|
27
|
+
readonly: { type: Boolean, default: void 0 }
|
25
28
|
},
|
26
29
|
emits: ["select", "unselect", "update:model-value", "update:count"],
|
27
30
|
setup(__props) {
|
31
|
+
const props = __props;
|
32
|
+
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
28
33
|
return (_ctx, _cache) => {
|
29
34
|
return openBlock(), createElementBlock("div", null, [
|
30
35
|
_ctx.title ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
31
|
-
|
36
|
+
unref(isSkeleton) ? (openBlock(), createBlock(WSkeleton, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
32
37
|
createTextVNode(toDisplayString(_ctx.title), 1)
|
33
38
|
], 64))
|
34
39
|
])) : createCommentVNode("", true),
|
35
|
-
|
40
|
+
unref(isSkeleton) ? (openBlock(), createBlock(WSkeleton, {
|
36
41
|
key: 1,
|
37
42
|
class: "w-skeleton-rounded-2xl w-skeleton-h-[24rem] w-skeleton-w-full"
|
38
43
|
})) : (openBlock(), createBlock(_sfc_main$1, {
|
@@ -51,6 +56,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
51
56
|
"hide-option-icon": _ctx.hideOptionIcon,
|
52
57
|
"value-getter": _ctx.valueGetter,
|
53
58
|
"query-options": _ctx.queryOptions,
|
59
|
+
disabled: unref(isDisabled) || unref(isReadonly),
|
54
60
|
transition: "",
|
55
61
|
onSelect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("select", $event)),
|
56
62
|
onUnselect: _cache[1] || (_cache[1] = ($event) => _ctx.$emit("unselect", $event)),
|
@@ -71,7 +77,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
71
77
|
]),
|
72
78
|
key: "0"
|
73
79
|
} : void 0
|
74
|
-
]), 1032, ["model-value", "use-query-fn", "query-params", "exclude-params", "empty-stub", "select-only", "unselect-only", "hide-option-icon", "value-getter", "query-options"])
|
80
|
+
]), 1032, ["model-value", "use-query-fn", "query-params", "exclude-params", "empty-stub", "select-only", "unselect-only", "hide-option-icon", "value-getter", "query-options", "disabled"])
|
75
81
|
]),
|
76
82
|
_: 3
|
77
83
|
}))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AAmDA;
|
1
|
+
{"version":3,"file":"WSelectAsyncSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsyncSingle.vue"],"names":[],"mappings":"AAmDA;AAwGA,OAAO,KAAK,EAAC,sBAAsB,EAAE,qBAAqB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAM5E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,GAAG,KAAK,EAC7K,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;WAqMO,mBAAmB,CAAC;;;0PAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBA5JD,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;gBAHrD,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI;;;YA9BzD,mBAAmB,0DAAoB,IAAI;YAC3C,YAAY,GAAG,IAAI;;EA0LrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAhNzE,wBAgN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -15,11 +15,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
15
15
|
queryParamsOptions: {},
|
16
16
|
searchField: {},
|
17
17
|
valueQueryKey: {},
|
18
|
-
valueGetter: {
|
18
|
+
valueGetter: {},
|
19
19
|
useQueryFnDefault: {},
|
20
20
|
emptyStub: {},
|
21
21
|
hidePrefix: { type: Boolean },
|
22
|
-
createOption: {
|
22
|
+
createOption: {},
|
23
23
|
hideOptionIcon: { type: Boolean },
|
24
24
|
selectOnClose: { type: Boolean },
|
25
25
|
mobileTitle: {},
|
@@ -38,7 +38,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
38
38
|
name: {},
|
39
39
|
autocomplete: {},
|
40
40
|
autofocus: { type: Boolean },
|
41
|
-
readonly: { type: Boolean },
|
41
|
+
readonly: { type: Boolean, default: void 0 },
|
42
42
|
disabledActions: { type: Boolean },
|
43
43
|
loading: { type: Boolean },
|
44
44
|
spellcheck: { type: Boolean },
|
@@ -54,8 +54,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
54
54
|
tooltipText: {},
|
55
55
|
mono: { type: Boolean },
|
56
56
|
hasChanges: { type: Boolean },
|
57
|
-
skeleton: { type: Boolean },
|
58
|
-
disabled: { type: Boolean },
|
57
|
+
skeleton: { type: Boolean, default: void 0 },
|
58
|
+
disabled: { type: Boolean, default: void 0 },
|
59
59
|
required: { type: Boolean },
|
60
60
|
mandatory: { type: Boolean },
|
61
61
|
noMargin: { type: Boolean },
|
@@ -71,6 +71,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
71
71
|
maxWidth: {},
|
72
72
|
horizontalAlign: {},
|
73
73
|
top: { type: Boolean },
|
74
|
+
bottom: { type: Boolean },
|
74
75
|
optionComponent: {},
|
75
76
|
optionComponentProps: {}
|
76
77
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAmDA;
|
1
|
+
{"version":3,"file":"WSelectSingle.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectSingle.vue"],"names":[],"mappings":"AAmDA;AA2GA,OAAO,KAAK,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAExF,OAAO,EAAC,KAAK,KAAK,EAAyC,MAAM,KAAK,CAAA;yBAIrD,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,kBAAkB,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EAAE,UAAU,SAAS,OAAO,GAAG,KAAK,EACpL,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;WA4MO,mBAAmB,CAAC;;;;8RAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAhKD,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;;;YAjC5D,oBAAoB,0DAAoB,IAAI;YAC5C,4BAA4B,SAAS,MAAM,GAAG,SAAS,GAAG,IAAI;YAC9D,YAAY,GAAG,IAAI;;EAgMrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAvNzE,wBAuN4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -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,EAAE,KAAK,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAA;
|
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,EAAE,KAAK,CAAA;IACjB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,EAAE,CAAA;IACpC,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;
|