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
@@ -5,9 +5,10 @@ import _sfc_main$1 from '../InfiniteList/WInfiniteList.vue.js';
|
|
5
5
|
import IconRefresh from '../../assets/icons/sax/IconRefresh.svg.js';
|
6
6
|
import { useIsMobile } from '../../utils/mobile.js';
|
7
7
|
import { parseOrdering, encodeOrdering } from '../../utils/order.js';
|
8
|
+
import { useComponentStates } from '../../utils/useComponentStates.js';
|
8
9
|
import { PAGE_LENGTH } from '../../utils/useDefaultQuery.js';
|
9
10
|
import { useSelected } from '../../utils/useSelected.js';
|
10
|
-
import { BASE_ZINDEX_DROPDOWN } from '../../utils/utils.js';
|
11
|
+
import { ListMode, BASE_ZINDEX_DROPDOWN } from '../../utils/utils.js';
|
11
12
|
import _sfc_main$2 from './WListCard.vue.js';
|
12
13
|
import _sfc_main$8 from './WListHeader.vue.js';
|
13
14
|
import _sfc_main$a from './WListHeaderItem.vue.js';
|
@@ -25,35 +26,35 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
25
26
|
...{ inheritAttrs: false },
|
26
27
|
__name: "WList",
|
27
28
|
props: {
|
28
|
-
count: {},
|
29
|
+
count: { default: void 0 },
|
29
30
|
fields: {},
|
30
|
-
expansion: {},
|
31
|
+
expansion: { default: void 0 },
|
31
32
|
useQueryFn: {},
|
32
33
|
queryParams: {},
|
33
|
-
queryOptions: {},
|
34
|
-
bulkDisableMessage: {},
|
34
|
+
queryOptions: { default: void 0 },
|
35
|
+
bulkDisableMessage: { default: void 0 },
|
35
36
|
selectionTitle: {},
|
36
|
-
bulk: {},
|
37
|
-
bulkMore: {},
|
38
|
-
action: {},
|
39
|
-
menu: {},
|
40
|
-
readonlyGetter: { type: Function },
|
41
|
-
cardClass: {},
|
42
|
-
cardWrapperClass: {},
|
43
|
-
selectAllTextGetter: {
|
37
|
+
bulk: { default: void 0 },
|
38
|
+
bulkMore: { default: void 0 },
|
39
|
+
action: { default: void 0 },
|
40
|
+
menu: { default: void 0 },
|
41
|
+
readonlyGetter: { type: Function, default: void 0 },
|
42
|
+
cardClass: { default: void 0 },
|
43
|
+
cardWrapperClass: { default: void 0 },
|
44
|
+
selectAllTextGetter: {},
|
44
45
|
hasBorder: { type: Boolean },
|
45
46
|
configKey: {},
|
46
47
|
defaultConfigMap: {},
|
47
|
-
defaultMode: {},
|
48
|
+
defaultMode: { default: ListMode.TABLE },
|
48
49
|
alignTop: { type: Boolean },
|
49
50
|
disableMore: { type: Boolean },
|
50
|
-
readonly: { type: Boolean },
|
51
|
+
readonly: { type: Boolean, default: void 0 },
|
51
52
|
noOrdering: { type: Boolean },
|
52
|
-
formNameGetter: { type: Function },
|
53
|
-
groupBy: { type: Function },
|
53
|
+
formNameGetter: { type: Function, default: void 0 },
|
54
|
+
groupBy: { type: Function, default: void 0 },
|
54
55
|
cardColumns: {},
|
55
56
|
cardAreas: {},
|
56
|
-
cardTo: { type: Function },
|
57
|
+
cardTo: { type: Function, default: void 0 },
|
57
58
|
hasAction: { type: Boolean },
|
58
59
|
noHeaderSettings: { type: Boolean },
|
59
60
|
noRefetch: { type: Boolean }
|
@@ -62,6 +63,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
63
|
setup(__props, { emit: __emit }) {
|
63
64
|
const props = __props;
|
64
65
|
const emit = __emit;
|
66
|
+
const { isDisabled, isReadonly } = useComponentStates(props);
|
65
67
|
const { isMobile } = useIsMobile();
|
66
68
|
const listCount = ref(void 0);
|
67
69
|
const countValue = computed(() => props.count ?? listCount.value);
|
@@ -221,7 +223,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
221
223
|
return openBlock(), createBlock(resolveDynamicComponent(item), {
|
222
224
|
key: index,
|
223
225
|
"query-params": _ctx.queryParams,
|
224
|
-
readonly:
|
226
|
+
readonly: unref(isReadonly) ?? unref(isDisabled) ?? false,
|
225
227
|
class: normalizeClass(cssClass)
|
226
228
|
}, null, 8, ["query-params", "readonly", "class"]);
|
227
229
|
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.bulk, (item, index) => {
|
@@ -230,7 +232,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
230
232
|
"selection-count": unref(selectionCount),
|
231
233
|
"query-params-getter": getQueryParamsBulk,
|
232
234
|
"disable-message": disableMessage,
|
233
|
-
readonly:
|
235
|
+
readonly: unref(isReadonly) ?? unref(isDisabled) ?? false,
|
234
236
|
class: normalizeClass(cssClass),
|
235
237
|
"onClear:selected": unref(resetSelection)
|
236
238
|
}, null, 40, ["selection-count", "disable-message", "readonly", "class", "onClear:selected"]);
|
@@ -247,7 +249,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
247
249
|
"selection-count": unref(selectionCount),
|
248
250
|
"query-params-getter": getQueryParamsBulk,
|
249
251
|
"disable-message": scope?.disableMessage,
|
250
|
-
readonly:
|
252
|
+
readonly: unref(isReadonly) ?? unref(isDisabled) ?? false,
|
251
253
|
class: normalizeClass(scope?.cssClass),
|
252
254
|
"onClear:selected": unref(resetSelection)
|
253
255
|
}, null, 40, ["selection-count", "disable-message", "readonly", "class", "onClear:selected"]);
|
@@ -340,12 +342,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
340
342
|
item,
|
341
343
|
skeleton,
|
342
344
|
card: unref(isGrid),
|
343
|
-
readonly:
|
345
|
+
readonly: (unref(isReadonly) ?? unref(isDisabled)) || (_ctx.readonlyGetter?.(item) ?? false)
|
344
346
|
}, {
|
345
347
|
default: withCtx((defaultScope) => [
|
346
348
|
(openBlock(), createBlock(resolveDynamicComponent(defaultScope.field.default), {
|
347
349
|
item: defaultScope.item,
|
348
|
-
readonly:
|
350
|
+
readonly: (unref(isReadonly) ?? unref(isDisabled)) || (_ctx.readonlyGetter?.(defaultScope.item) ?? false),
|
349
351
|
skeleton,
|
350
352
|
card: unref(isGrid),
|
351
353
|
config: unref(fieldConfigMap)[defaultScope.field.meta.label],
|
@@ -380,7 +382,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
380
382
|
fn: withCtx(() => [
|
381
383
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.expansion), {
|
382
384
|
item,
|
383
|
-
readonly:
|
385
|
+
readonly: (unref(isReadonly) ?? unref(isDisabled)) || (_ctx.readonlyGetter?.(item) ?? false),
|
384
386
|
skeleton,
|
385
387
|
card: unref(isGrid),
|
386
388
|
"onUpdate:item": setter,
|
@@ -401,7 +403,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
401
403
|
ref_for: true
|
402
404
|
}, Array.isArray(menuItem) ? menuItem[1] : void 0, {
|
403
405
|
item,
|
404
|
-
readonly:
|
406
|
+
readonly: (unref(isReadonly) ?? unref(isDisabled)) || (_ctx.readonlyGetter?.(item) ?? false),
|
405
407
|
"update-item": setter,
|
406
408
|
"delete-item": () => {
|
407
409
|
setter();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListCard.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WListCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListCard.vue"],"names":[],"mappings":"AAoMA;AAAA,OAyRO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAgB5C,KAAK,WAAW,GAAG;IACjB,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,MAAM,EAAE,OAAO,GAAG,SAAS,CAAA;IAC3B,QAAQ,EAAE,OAAO,GAAG,SAAS,CAAA;IAC7B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IAC7B,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;IACpC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,WAAW,EAAE,OAAO,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAA;IAC5B,IAAI,EAAE,OAAO,CAAA;IACb,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IAC/B,SAAS,EAAE,OAAO,GAAG,SAAS,CAAA;IAC9B,QAAQ,EAAE,OAAO,CAAA;IAEjB,QAAQ,EAAE,OAAO,CAAA;IACjB,WAAW,EAAE,OAAO,CAAA;IACpB,gBAAgB,EAAE,OAAO,CAAA;CAC1B,CAAC;AAmDF,iBAAS,cAAc,QA+YtB;AA4BD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;mFAQnB,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"}
|
@@ -109,7 +109,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
109
109
|
_ctx.allowSelect ? (openBlock(), createBlock(_sfc_main$1, {
|
110
110
|
key: 0,
|
111
111
|
"model-value": _ctx.selected,
|
112
|
-
disabled: _ctx.disabled,
|
112
|
+
disabled: _ctx.disabled ?? false,
|
113
|
+
readonly: false,
|
113
114
|
"align-top": _ctx.alignTop,
|
114
115
|
"less-transitions": _ctx.allowSelectHover,
|
115
116
|
class: normalizeClass(["h-full px-[--w-list-padding,1rem]", {
|
@@ -136,7 +137,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
136
137
|
_ctx.allowSelect && _ctx.card ? (openBlock(), createBlock(_sfc_main$1, {
|
137
138
|
key: 0,
|
138
139
|
"model-value": _ctx.selected,
|
139
|
-
disabled: _ctx.disabled,
|
140
|
+
disabled: _ctx.disabled ?? false,
|
141
|
+
readonly: false,
|
140
142
|
class: normalizeClass(["-p--inner-margin -my---inner-margin -mr---inner-margin justify-end self-start", {
|
141
143
|
"opacity-50": _ctx.allowSelectHover
|
142
144
|
}]),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WListHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListHeader.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WListHeader.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/List/WListHeader.vue"],"names":[],"mappings":"AA2CA;AA4EA,KAAK,WAAW,GAAG;IACjB,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAA;IAC1B,WAAW,EAAE,MAAM,CAAA;CACpB,CAAC;AAmBF,iBAAS,cAAc;WAuFT,OAAO,IAA6B;;yBAXrB,GAAG;0BACF,GAAG;;;;EAehC;AAUD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;6FAQnB,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"}
|
@@ -36,6 +36,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
36
36
|
_ctx.allowSelect && _ctx.selection !== void 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
37
37
|
key: 0,
|
38
38
|
disabled: _ctx.disabled || _ctx.count === 0 || _ctx.count === void 0,
|
39
|
+
readonly: false,
|
39
40
|
"model-value": _ctx.selection,
|
40
41
|
"tooltip-text": _ctx.tooltipText,
|
41
42
|
intermediate: "",
|
@@ -12,7 +12,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
12
|
emits: ["click"],
|
13
13
|
setup(__props) {
|
14
14
|
return (_ctx, _cache) => {
|
15
|
-
return openBlock(), createBlock(resolveDynamicComponent(_ctx.
|
15
|
+
return openBlock(), createBlock(resolveDynamicComponent(_ctx.disabled ? "div" : _ctx.to ? unref(RouterLink) : _ctx.href ? "a" : "button"), mergeProps(_ctx.disabled ? void 0 : _ctx.to ? { to: _ctx.to } : _ctx.href ? { href: _ctx.href, download: _ctx.download } : void 0, {
|
16
16
|
class: ["text-description w-ripple-trigger block w-full min-w-36 select-none items-center justify-start px-2 text-start outline-none first:pt-2 last:pb-2", {
|
17
17
|
"hover:text-primary dark:hover:text-primary-dark cursor-pointer": !_ctx.disabled,
|
18
18
|
"cursor-not-allowed opacity-50": _ctx.disabled
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WNavItemTransition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemTransition.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WNavItemTransition.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Nav/WNavItemTransition.vue"],"names":[],"mappings":"AAYA;AAoBA,iBAAS,cAAc;WA0CT,OAAO,IAA6B;;yBAVrB,GAAG;;;;EAe/B;AAOD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe,+QAMnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAEpG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AA8KA;
|
1
|
+
{"version":3,"file":"WSelect.vue.d.ts","sour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BrB,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AAhsBzE,wBAgsB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -2,6 +2,7 @@ import { defineComponent, ref, useTemplateRef, computed, toRef, watch, nextTick,
|
|
2
2
|
import _sfc_main$1 from '../Input/WInputSuggest.vue.js';
|
3
3
|
import { ApiError } from '../../utils/api.js';
|
4
4
|
import { useIsMobile } from '../../utils/mobile.js';
|
5
|
+
import { useComponentStates } from '../../utils/useComponentStates.js';
|
5
6
|
import { debounce } from '../../utils/utils.js';
|
6
7
|
import _sfc_main$2 from './components/SelectOption.vue.js';
|
7
8
|
import _sfc_main$3 from './components/SelectOptionPrefix.vue.js';
|
@@ -20,14 +21,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
20
21
|
__name: "WSelect",
|
21
22
|
props: {
|
22
23
|
modelValue: {},
|
23
|
-
valueGetter: {
|
24
|
-
searchFn: {
|
24
|
+
valueGetter: {},
|
25
|
+
searchFn: {},
|
25
26
|
useQueryFnDefault: {},
|
26
27
|
emptyStub: {},
|
27
28
|
disableClear: { type: Boolean },
|
28
29
|
hidePrefix: { type: Boolean },
|
29
|
-
createOption: {
|
30
|
-
filterOptions: {
|
30
|
+
createOption: {},
|
31
|
+
filterOptions: {},
|
31
32
|
hideOptionIcon: { type: Boolean },
|
32
33
|
createdData: {},
|
33
34
|
selectOnClose: { type: Boolean },
|
@@ -47,7 +48,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
47
48
|
name: {},
|
48
49
|
autocomplete: {},
|
49
50
|
autofocus: { type: Boolean },
|
50
|
-
readonly: { type: Boolean },
|
51
|
+
readonly: { type: Boolean, default: void 0 },
|
51
52
|
disabledActions: { type: Boolean },
|
52
53
|
loading: { type: Boolean },
|
53
54
|
spellcheck: { type: Boolean },
|
@@ -63,8 +64,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
64
|
tooltipText: {},
|
64
65
|
mono: { type: Boolean },
|
65
66
|
hasChanges: { type: Boolean },
|
66
|
-
skeleton: { type: Boolean },
|
67
|
-
disabled: { type: Boolean },
|
67
|
+
skeleton: { type: Boolean, default: void 0 },
|
68
|
+
disabled: { type: Boolean, default: void 0 },
|
68
69
|
required: { type: Boolean },
|
69
70
|
mandatory: { type: Boolean },
|
70
71
|
noMargin: { type: Boolean },
|
@@ -80,6 +81,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
80
81
|
maxWidth: {},
|
81
82
|
horizontalAlign: {},
|
82
83
|
top: { type: Boolean },
|
84
|
+
bottom: { type: Boolean },
|
83
85
|
optionComponent: {},
|
84
86
|
optionComponentProps: {},
|
85
87
|
useQueryFnOptions: {},
|
@@ -90,6 +92,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
90
92
|
setup(__props, { expose: __expose, emit: __emit }) {
|
91
93
|
const props = __props;
|
92
94
|
const emit = __emit;
|
95
|
+
const { isReadonly, isDisabled } = useComponentStates(props);
|
93
96
|
const { isMobile } = useIsMobile();
|
94
97
|
const isOpen = ref(false);
|
95
98
|
const inputRef = useTemplateRef("input");
|
@@ -125,7 +128,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
125
128
|
const focused = ref(false);
|
126
129
|
const loadingOptionIndex = ref(null);
|
127
130
|
const loadingCreate = ref(false);
|
128
|
-
const
|
131
|
+
const isDisabledComputed = computed(() => props.loading || isReadonly.value || isDisabled.value);
|
129
132
|
const hasCreateOption = computed(() => props.createOption && (!optionsFiltered.value.some((option) => props.valueGetter(option) === search.value) || isModelValueSearch.value));
|
130
133
|
const close = () => {
|
131
134
|
if (props.selectOnClose && focused.value && !isModelValueSearch.value) {
|
@@ -139,7 +142,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
139
142
|
search.value = "";
|
140
143
|
};
|
141
144
|
const setLoadingOptionIndex = (value) => {
|
142
|
-
if (
|
145
|
+
if (isDisabledComputed.value) return;
|
143
146
|
loadingOptionIndex.value = value;
|
144
147
|
};
|
145
148
|
const unlockCursor = debounce(() => {
|
@@ -154,17 +157,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
154
157
|
cursor.value = value;
|
155
158
|
};
|
156
159
|
const cursorUp = () => {
|
157
|
-
if (
|
160
|
+
if (isDisabledComputed.value) return;
|
158
161
|
lockCursor();
|
159
162
|
cursor.value = !optionsFiltered.value.length ? 0 : cursor.value < 1 ? lastIndex.value : cursor.value - 1;
|
160
163
|
};
|
161
164
|
const cursorDown = () => {
|
162
|
-
if (
|
165
|
+
if (isDisabledComputed.value) return;
|
163
166
|
lockCursor();
|
164
167
|
cursor.value = !optionsFiltered.value.length ? 0 : cursor.value >= lastIndex.value ? 0 : cursor.value + 1;
|
165
168
|
};
|
166
169
|
const selectCursor = () => {
|
167
|
-
if (
|
170
|
+
if (isDisabledComputed.value) return;
|
168
171
|
if (cursor.value === optionsFiltered.value.length) {
|
169
172
|
if (search.value && props.createOption) create(search.value);
|
170
173
|
return;
|
@@ -190,19 +193,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
190
193
|
}
|
191
194
|
};
|
192
195
|
const select = (item) => {
|
193
|
-
if (
|
196
|
+
if (isDisabledComputed.value) return;
|
194
197
|
emit("select", item);
|
195
198
|
search.value = "";
|
196
199
|
};
|
197
200
|
const unselect = (item) => {
|
198
|
-
if (
|
201
|
+
if (isDisabledComputed.value) return;
|
199
202
|
emit("unselect", item);
|
200
203
|
search.value = "";
|
201
204
|
const index = createdOptions.value.findIndex((option) => props.valueGetter(option) === item);
|
202
205
|
if (index !== -1) createdOptions.value.splice(index, 1);
|
203
206
|
};
|
204
207
|
const create = async (value) => {
|
205
|
-
if (
|
208
|
+
if (isDisabledComputed.value) return;
|
206
209
|
if (!props.createOption) return;
|
207
210
|
loadingCreate.value = true;
|
208
211
|
const option = await props.createOption(value);
|
@@ -288,13 +291,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
288
291
|
"option-component-props": _ctx.optionComponentProps,
|
289
292
|
index,
|
290
293
|
loading: _ctx.loading || unref(isLoading),
|
291
|
-
disabled:
|
292
|
-
readonly:
|
293
|
-
"disable-clear": _ctx.disableClear ||
|
294
|
+
disabled: unref(isDisabled),
|
295
|
+
readonly: unref(isReadonly),
|
296
|
+
"disable-clear": _ctx.disableClear || unref(isReadonly) || _ctx.seamless && !focused.value,
|
294
297
|
search: value,
|
295
298
|
class: normalizeClass({
|
296
|
-
"cursor-pointer": !
|
297
|
-
"cursor-not-allowed opacity-50":
|
299
|
+
"cursor-pointer": !unref(isDisabled) && !unref(isReadonly),
|
300
|
+
"cursor-not-allowed opacity-50": unref(isDisabled)
|
298
301
|
}),
|
299
302
|
onUnselect: ($event) => unselect(value)
|
300
303
|
}, createSlots({ _: 2 }, [
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA6HA;
|
1
|
+
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AA6HA;AAyTA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA8B,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAYlG,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,EACzI,aAAa,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC9D,YAAY,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,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ed, 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,OAA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