eco-vue-js 0.11.57 → 0.11.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/icons/IconAdd.svg.js +2 -2
- package/dist/assets/icons/IconAddCircle.svg.js +2 -2
- package/dist/assets/icons/IconAddSquare.svg.js +2 -2
- package/dist/assets/icons/IconAlarm.svg.js +2 -2
- package/dist/assets/icons/IconArchiveBook.svg.js +2 -2
- package/dist/assets/icons/IconArrow.svg.js +2 -2
- package/dist/assets/icons/IconBack.svg.js +2 -2
- package/dist/assets/icons/IconBold.svg.js +2 -2
- package/dist/assets/icons/IconCancel.svg.js +2 -2
- package/dist/assets/icons/IconCandle.svg.js +2 -2
- package/dist/assets/icons/IconCelery.svg.js +2 -2
- package/dist/assets/icons/IconChart.svg.js +2 -2
- package/dist/assets/icons/IconCheck.svg.js +2 -2
- package/dist/assets/icons/IconCheckCircle.svg.js +2 -2
- package/dist/assets/icons/IconClose.svg.js +2 -2
- package/dist/assets/icons/IconCloseCircle.svg.js +2 -2
- package/dist/assets/icons/IconCodeBlock.svg.js +2 -2
- package/dist/assets/icons/IconCodeInline.svg.js +2 -2
- package/dist/assets/icons/IconCopy.svg.js +2 -2
- package/dist/assets/icons/IconCopySuccess.svg.js +2 -2
- package/dist/assets/icons/IconCopyright.svg.js +2 -2
- package/dist/assets/icons/IconDanger.svg.js +2 -2
- package/dist/assets/icons/IconDojo.svg.js +2 -2
- package/dist/assets/icons/IconDrag.svg.js +2 -2
- package/dist/assets/icons/IconEdit.svg.js +2 -2
- package/dist/assets/icons/IconEditCircle.svg.js +2 -2
- package/dist/assets/icons/IconEditSquare.svg.js +2 -2
- package/dist/assets/icons/IconElement.svg.js +2 -2
- package/dist/assets/icons/IconExport.svg.js +2 -2
- package/dist/assets/icons/IconEye.svg.js +2 -2
- package/dist/assets/icons/IconEyeSlash.svg.js +2 -2
- package/dist/assets/icons/IconFilter.svg.js +2 -2
- package/dist/assets/icons/IconFilterRemove.svg.js +2 -2
- package/dist/assets/icons/IconFinding.svg.js +2 -2
- package/dist/assets/icons/IconFolder.svg.js +2 -2
- package/dist/assets/icons/IconFolderAdd.svg.js +2 -2
- package/dist/assets/icons/IconFolderCross.svg.js +2 -2
- package/dist/assets/icons/IconGrid.svg.js +2 -2
- package/dist/assets/icons/IconHeading.svg.js +2 -2
- package/dist/assets/icons/IconItalic.svg.js +2 -2
- package/dist/assets/icons/IconJira.svg.js +2 -2
- package/dist/assets/icons/IconKey.svg.js +2 -2
- package/dist/assets/icons/IconKeySquare.svg.js +2 -2
- package/dist/assets/icons/IconLayer.svg.js +2 -2
- package/dist/assets/icons/IconLink.svg.js +2 -2
- package/dist/assets/icons/IconLinkBold.svg.js +2 -2
- package/dist/assets/icons/IconLinkOutline.svg.js +2 -2
- package/dist/assets/icons/IconLinkedIn.svg.js +2 -2
- package/dist/assets/icons/IconList.svg.js +2 -2
- package/dist/assets/icons/IconListBullet.svg.js +2 -2
- package/dist/assets/icons/IconListCheckbox.svg.js +2 -2
- package/dist/assets/icons/IconListDecrease.svg.js +2 -2
- package/dist/assets/icons/IconListIncrease.svg.js +2 -2
- package/dist/assets/icons/IconListNumbered.svg.js +2 -2
- package/dist/assets/icons/IconListSettings.svg.js +2 -2
- package/dist/assets/icons/IconLock.svg.js +2 -2
- package/dist/assets/icons/IconLockOff.svg.js +2 -2
- package/dist/assets/icons/IconLogout.svg.js +2 -2
- package/dist/assets/icons/IconMenu.svg.js +2 -2
- package/dist/assets/icons/IconMinusCircle.svg.js +2 -2
- package/dist/assets/icons/IconMoon.svg.js +2 -2
- package/dist/assets/icons/IconMore.svg.js +2 -2
- package/dist/assets/icons/IconNegate.svg.js +2 -2
- package/dist/assets/icons/IconNegativeInfo.svg.js +2 -2
- package/dist/assets/icons/IconNote.svg.js +2 -2
- package/dist/assets/icons/IconPaste.svg.js +2 -2
- package/dist/assets/icons/IconProfile.svg.js +2 -2
- package/dist/assets/icons/IconQuote.svg.js +2 -2
- package/dist/assets/icons/IconRadar.svg.js +2 -2
- package/dist/assets/icons/IconRange.svg.js +2 -2
- package/dist/assets/icons/IconRedo.svg.js +2 -2
- package/dist/assets/icons/IconRefresh.svg.js +2 -2
- package/dist/assets/icons/IconSearch.svg.js +2 -2
- package/dist/assets/icons/IconSettings.svg.js +2 -2
- package/dist/assets/icons/IconShift.svg.js +2 -2
- package/dist/assets/icons/IconSlash.svg.js +2 -2
- package/dist/assets/icons/IconSort.svg.js +2 -2
- package/dist/assets/icons/IconStar.svg.js +2 -2
- package/dist/assets/icons/IconStrikethrough.svg.js +2 -2
- package/dist/assets/icons/IconSuccess.svg.js +2 -2
- package/dist/assets/icons/IconSummary.svg.js +2 -2
- package/dist/assets/icons/IconSun.svg.js +2 -2
- package/dist/assets/icons/IconTable.svg.js +2 -2
- package/dist/assets/icons/IconTableCollapsed.svg.js +2 -2
- package/dist/assets/icons/IconTag.svg.js +2 -2
- package/dist/assets/icons/IconTask.svg.js +2 -2
- package/dist/assets/icons/IconTime.svg.js +2 -2
- package/dist/assets/icons/IconTrash.svg.js +2 -2
- package/dist/assets/icons/IconUnderline.svg.js +2 -2
- package/dist/assets/icons/IconUndo.svg.js +2 -2
- package/dist/assets/icons/IconUser.svg.js +2 -2
- package/dist/assets/icons/IconVersionControl.svg.js +2 -2
- package/dist/assets/icons/IconWarn.svg.js +2 -2
- package/dist/assets/icons/IconWeight.svg.js +2 -2
- package/dist/components/ActionsBar/WActionsBar.vue.js +3 -3
- package/dist/components/BottomSheet/WBottomSheet.vue.js +1 -1
- package/dist/components/Button/WButton.vue.js +15 -15
- package/dist/components/Button/WButtonAction.vue.js +21 -21
- package/dist/components/Button/WButtonCopy.vue.d.ts +1 -1
- package/dist/components/Button/WButtonCopy.vue.js +3 -3
- package/dist/components/Button/WButtonDropdown.vue.js +9 -9
- package/dist/components/Button/WButtonGroup.vue.js +16 -19
- package/dist/components/Button/WButtonInput.vue.js +11 -11
- package/dist/components/Button/WButtonMore.vue.js +17 -17
- package/dist/components/Button/WButtonMoreItem.vue.js +6 -6
- package/dist/components/Button/WButtonSelection.vue.js +3 -3
- package/dist/components/Button/WButtonSelectionAction.vue.js +14 -14
- package/dist/components/Button/WButtonTab.vue.js +38 -38
- package/dist/components/Button/WButtonUnselect.vue.js +7 -7
- package/dist/components/Chart/WChartLine.vue.js +18 -18
- package/dist/components/Chart/WChartLinear.vue.js +9 -9
- package/dist/components/Chart/components/ChartAxis.vue.js +6 -6
- package/dist/components/Checkbox/WCheckbox.vue.js +30 -30
- package/dist/components/Checkbox/WCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroup.vue.js +17 -20
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckboxGroupMultiple.vue.js +16 -19
- package/dist/components/Chip/WChip.vue.js +2 -2
- package/dist/components/Counter/WCounter.vue.js +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.js +2 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +2 -2
- package/dist/components/DatePicker/components/CalendarDay.vue.js +9 -9
- package/dist/components/DatePicker/components/CalendarMonth.vue.js +7 -7
- package/dist/components/DatePicker/components/CalendarToggle.vue.js +2 -2
- package/dist/components/DatePicker/components/CalendarValue.vue.js +3 -3
- package/dist/components/DatePicker/components/CalendarWeek.vue.js +7 -7
- package/dist/components/Dismissable/WDismissable.vue.js +2 -2
- package/dist/components/DragContainer/WDragContainer.vue.js +2 -2
- package/dist/components/DragContainer/components/DragItem.vue.js +5 -5
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +8 -8
- package/dist/components/Expansion/WExpansion.vue.js +2 -2
- package/dist/components/Expansion/WExpansionItem.vue.js +7 -7
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +37 -37
- package/dist/components/FieldWrapper/components/FilterButton.vue.js +5 -5
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.js +17 -17
- package/dist/components/FilePicker/components/FilePickerItem.vue.js +2 -2
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/components/FilePickerSvg.vue.js +7 -7
- package/dist/components/FilterWrapper/WFilterWrapper.vue.js +1 -1
- package/dist/components/Form/WForm.vue.js +1 -1
- package/dist/components/Form/WFormValidator.vue.js +1 -1
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncCheckboxGroup.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts +2 -2
- package/dist/components/FormAsync/WFormAsyncInput.vue.js +5 -5
- package/dist/components/FormAsync/WFormAsyncSelect.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectInfiniteSingle.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncSelectStringified.vue.js +3 -3
- package/dist/components/FormAsync/WFormAsyncToggle.vue.js +2 -2
- package/dist/components/HeaderBar/WHeaderBar.vue.js +1 -1
- package/dist/components/ImageViewer/WImageViewer.vue.js +6 -6
- package/dist/components/ImageViewer/components/ImageModal.vue2.js +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.js +20 -20
- package/dist/components/InfiniteList/WInfiniteListWrapper.vue.js +3 -3
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.js +3 -3
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +16 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +15 -15
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +2 -2
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPages.vue.js +23 -23
- package/dist/components/InfoCard/WInfoCard.vue.js +5 -5
- package/dist/components/InfoCard/WInfoCardNegative.vue.js +2 -2
- package/dist/components/Input/WInput.vue.d.ts +15 -1
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +70 -80
- package/dist/components/Input/WInputAsync.vue.d.ts +2 -2
- package/dist/components/Input/WInputAsync.vue.js +16 -16
- package/dist/components/Input/WInputDate.vue.js +7 -7
- package/dist/components/Input/WInputOptions.vue.js +6 -6
- package/dist/components/Input/WInputSuggest.vue.d.ts +12 -1
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +18 -18
- package/dist/components/Input/WInputToolbarButton.vue.js +14 -14
- package/dist/components/Input/components/ContentEditable.vue2.js +1 -1
- package/dist/components/Input/components/InputActions.vue.js +12 -12
- package/dist/components/Input/components/InputActionsButton.vue.js +12 -12
- package/dist/components/Input/components/InputToolbar.vue2.js +7 -13
- package/dist/components/Input/components/InputToolbarButton.vue.js +11 -11
- package/dist/components/Link/WLink.vue.js +5 -5
- package/dist/components/Link/WLinkArrow.vue.js +2 -2
- package/dist/components/List/WList.vue.js +49 -49
- package/dist/components/List/WListCard.vue.d.ts.map +1 -1
- package/dist/components/List/WListCard.vue.js +57 -57
- package/dist/components/List/WListCardField.vue.js +3 -3
- package/dist/components/List/WListFilter.vue.js +8 -8
- package/dist/components/List/WListHeader.vue.js +7 -7
- package/dist/components/List/WListHeaderItem.vue.js +14 -14
- package/dist/components/List/components/HeaderFieldNested.vue.js +6 -6
- package/dist/components/List/components/HeaderSettings.vue.js +13 -13
- package/dist/components/List/components/HeaderSettingsList.vue.js +16 -16
- package/dist/components/List/components/HeaderSettingsModeButton.vue.js +5 -5
- package/dist/components/List/components/HeaderSort.vue.js +5 -5
- package/dist/components/List/components/HeaderSortItem.vue.js +5 -5
- package/dist/components/List/components/ListCardAction.vue.js +3 -3
- package/dist/components/List/components/ListCardFieldNested.vue.js +20 -20
- package/dist/components/List/components/ListCardFieldNestedItem.vue.js +2 -2
- package/dist/components/List/components/ListFilterGlobal.vue2.js +13 -13
- package/dist/components/List/components/ListFilterGlobalItem.vue.js +14 -14
- package/dist/components/List/components/ListFilterLocal.vue2.js +13 -14
- package/dist/components/List/components/ListFilterSearch.vue.js +2 -2
- package/dist/components/List/components/ListFilterSelect.vue.js +4 -4
- package/dist/components/MenuItem/WMenuItem.vue.js +12 -12
- package/dist/components/Modal/WModal.vue.js +1 -1
- package/dist/components/Modal/WModalExport.vue.js +4 -4
- package/dist/components/Modal/WModalExportSimple.vue.js +4 -4
- package/dist/components/Modal/WModalImport.vue.js +3 -3
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalStepper.vue.js +20 -20
- package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalWrapper.vue.js +10 -10
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue2.js +22 -22
- package/dist/components/Nav/WNavBar.vue.js +2 -2
- package/dist/components/Nav/WNavItem.vue.js +14 -14
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +15 -15
- package/dist/components/Notify/components/NotifyCard.vue.js +11 -11
- package/dist/components/NumberFormatter/WNumberFormatter.vue.js +4 -4
- package/dist/components/Page/WPage.vue.js +17 -17
- package/dist/components/Page/WPageTitle.vue.js +3 -3
- package/dist/components/Progress/WProgress.vue.js +1 -1
- package/dist/components/Progress/WProgressStriped.vue.js +9 -9
- package/dist/components/RouterLink/WRouterLink.vue.js +1 -1
- package/dist/components/Select/WSelect.vue.js +25 -25
- package/dist/components/Select/WSelectAsync.vue.js +27 -27
- package/dist/components/Select/WSelectAsyncList.vue.js +12 -12
- package/dist/components/Select/WSelectAsyncSingle.vue.js +7 -7
- package/dist/components/Select/WSelectSingle.vue.js +6 -6
- package/dist/components/Select/WSelectStringified.vue.js +2 -2
- package/dist/components/Select/components/SelectAsyncList.vue.js +33 -33
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +17 -17
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +10 -10
- package/dist/components/Select/components/SelectOption.vue.d.ts +15 -1
- package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOption.vue.js +10 -10
- package/dist/components/Select/components/SelectOptionPrefix.vue.js +14 -14
- package/dist/components/Shine/WShine.vue.js +1 -1
- package/dist/components/Shine/WShineEffect.vue.js +2 -2
- package/dist/components/Slider/WSlider.vue.js +6 -6
- package/dist/components/Slider/WSliderRange.vue.js +6 -6
- package/dist/components/Spinner/WSpinner.vue.js +2 -2
- package/dist/components/Status/WStatusIcon.vue.js +2 -2
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +22 -22
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +5 -5
- package/dist/components/Tabs/components/TabTitleButton.vue.js +14 -14
- package/dist/components/Toggle/WToggle.vue.js +17 -17
- package/dist/components/Toggle/WToggleTheme.vue.js +2 -2
- package/dist/components/Tooltip/WTooltip.vue.js +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +2 -2
- package/dist/components/Tooltip/components/TooltipContainer.vue.js +11 -11
- package/dist/components/VirtualScroll/WVirtualScroll.vue.js +9 -9
- package/dist/components/VirtualScroll/components/VirtualScrollPage.vue.d.ts +1 -1
- package/dist/components/VirtualScroll/components/VirtualScrollPage.vue.js +3 -3
- package/dist/utils/useQueryUpdater.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -192,17 +192,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
192
192
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "input" }, {
|
|
193
193
|
...props,
|
|
194
194
|
modelValue: search.value,
|
|
195
|
-
loading:
|
|
196
|
-
hideInput:
|
|
197
|
-
filterValue:
|
|
198
|
-
placeholder:
|
|
195
|
+
loading: __props.loading || isFetchingPrefix.value || loadingCreate.value,
|
|
196
|
+
hideInput: __props.modelValue.length === 0 && !__props.emptyValue ? false : unref(isMobile) ? !focused.value : !isOpen.value,
|
|
197
|
+
filterValue: __props.filterValue === void 0 ? __props.modelValue : __props.filterValue,
|
|
198
|
+
placeholder: __props.emptyValue || focused.value || __props.modelValue.length ? void 0 : __props.placeholder,
|
|
199
199
|
emptyValue: void 0
|
|
200
200
|
}, {
|
|
201
201
|
class: _ctx.$attrs.class,
|
|
202
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !
|
|
203
|
-
"onKeypress:enter": _cache[3] || (_cache[3] = withModifiers(($event) =>
|
|
204
|
-
"onKeypress:up": _cache[4] || (_cache[4] = withModifiers(($event) =>
|
|
205
|
-
"onKeypress:down": _cache[5] || (_cache[5] = withModifiers(($event) =>
|
|
202
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !__props.loading && !isFetchingPrefix.value && (search.value = $event ?? "")),
|
|
203
|
+
"onKeypress:enter": _cache[3] || (_cache[3] = withModifiers(($event) => listRef.value?.selectCursor(), ["stop", "prevent"])),
|
|
204
|
+
"onKeypress:up": _cache[4] || (_cache[4] = withModifiers(($event) => listRef.value?.cursorUp(), ["prevent"])),
|
|
205
|
+
"onKeypress:down": _cache[5] || (_cache[5] = withModifiers(($event) => listRef.value?.cursorDown(), ["prevent"])),
|
|
206
206
|
"onKeypress:delete": captureDoubleDelete,
|
|
207
207
|
onOpen: _cache[6] || (_cache[6] = ($event) => isOpen.value = true),
|
|
208
208
|
onClose: close,
|
|
@@ -216,19 +216,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
216
216
|
})
|
|
217
217
|
}), createSlots({
|
|
218
218
|
prefix: withCtx(({ unclickable }) => [
|
|
219
|
-
(
|
|
219
|
+
(__props.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(), createBlock(_sfc_main$3, {
|
|
220
220
|
key: 0,
|
|
221
|
-
"use-query-fn":
|
|
222
|
-
"model-value": !
|
|
221
|
+
"use-query-fn": __props.useQueryFnPrefix ?? __props.useQueryFnOptions,
|
|
222
|
+
"model-value": !__props.emptyValue || __props.modelValue.length !== 0 ? __props.modelValue : __props.emptyValue,
|
|
223
223
|
disabled: unref(isDisabled),
|
|
224
|
-
loading:
|
|
225
|
-
"option-component":
|
|
226
|
-
"option-component-props":
|
|
227
|
-
"disable-clear":
|
|
228
|
-
"preview-data":
|
|
229
|
-
"created-data":
|
|
230
|
-
"value-getter":
|
|
231
|
-
"value-query-key":
|
|
224
|
+
loading: __props.loading || isFetchingPrefix.value,
|
|
225
|
+
"option-component": __props.optionComponent,
|
|
226
|
+
"option-component-props": __props.optionComponentProps,
|
|
227
|
+
"disable-clear": __props.disableClear || unref(isReadonly) || __props.seamless && !focused.value || __props.modelValue.length === 0,
|
|
228
|
+
"preview-data": __props.previewData,
|
|
229
|
+
"created-data": __props.createdData,
|
|
230
|
+
"value-getter": __props.valueGetter,
|
|
231
|
+
"value-query-key": __props.valueQueryKey,
|
|
232
232
|
readonly: unref(isReadonly),
|
|
233
233
|
onUnselect: unselect,
|
|
234
234
|
"onUpdate:fetching": _cache[0] || (_cache[0] = ($event) => {
|
|
@@ -256,15 +256,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
256
256
|
content: withCtx(() => [
|
|
257
257
|
createVNode(_sfc_main$2, {
|
|
258
258
|
ref: "list",
|
|
259
|
-
"model-value":
|
|
260
|
-
"use-query-fn":
|
|
259
|
+
"model-value": __props.modelValue,
|
|
260
|
+
"use-query-fn": __props.useQueryFnOptions,
|
|
261
261
|
"query-params": queryParams.value,
|
|
262
|
-
loading:
|
|
262
|
+
loading: __props.loading || isFetchingPrefix.value,
|
|
263
263
|
disabled: isDisabledComputed.value,
|
|
264
|
-
"empty-stub": !search.value &&
|
|
265
|
-
"allow-create":
|
|
266
|
-
"hide-option-icon":
|
|
267
|
-
"value-getter":
|
|
264
|
+
"empty-stub": !search.value && __props.emptyStub ? __props.emptyStub : void 0,
|
|
265
|
+
"allow-create": __props.createOption && (!hasSearchOption.value || isModelValueSearch.value),
|
|
266
|
+
"hide-option-icon": __props.hideOptionIcon,
|
|
267
|
+
"value-getter": __props.valueGetter,
|
|
268
268
|
"loading-create": loadingCreate.value,
|
|
269
269
|
search: search.value,
|
|
270
270
|
class: "max-h-80",
|
|
@@ -282,7 +282,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
282
282
|
search: search.value,
|
|
283
283
|
index
|
|
284
284
|
}, () => [
|
|
285
|
-
(openBlock(), createBlock(resolveDynamicComponent(
|
|
285
|
+
(openBlock(), createBlock(resolveDynamicComponent(__props.optionComponent), mergeProps(__props.optionComponentProps, {
|
|
286
286
|
option,
|
|
287
287
|
selected,
|
|
288
288
|
skeleton: skeletonList,
|
|
@@ -32,9 +32,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
32
32
|
const { isReadonly, isDisabled, isSkeleton } = useComponentStates(props);
|
|
33
33
|
return (_ctx, _cache) => {
|
|
34
34
|
return openBlock(), createElementBlock("div", null, [
|
|
35
|
-
|
|
35
|
+
__props.title ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
36
36
|
unref(isSkeleton) ? (openBlock(), createBlock(_sfc_main$1, { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
37
|
-
createTextVNode(toDisplayString(
|
|
37
|
+
createTextVNode(toDisplayString(__props.title), 1)
|
|
38
38
|
], 64))
|
|
39
39
|
])) : createCommentVNode("", true),
|
|
40
40
|
unref(isSkeleton) ? (openBlock(), createBlock(_sfc_main$1, {
|
|
@@ -46,16 +46,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
46
|
}, {
|
|
47
47
|
default: withCtx(() => [
|
|
48
48
|
createVNode(_sfc_main$3, {
|
|
49
|
-
"model-value":
|
|
50
|
-
"use-query-fn":
|
|
51
|
-
"query-params":
|
|
52
|
-
"exclude-params":
|
|
53
|
-
"empty-stub":
|
|
54
|
-
"select-only":
|
|
55
|
-
"unselect-only":
|
|
56
|
-
"hide-option-icon":
|
|
57
|
-
"value-getter":
|
|
58
|
-
"query-options":
|
|
49
|
+
"model-value": __props.modelValue,
|
|
50
|
+
"use-query-fn": __props.useQueryFn,
|
|
51
|
+
"query-params": __props.queryParams,
|
|
52
|
+
"exclude-params": __props.excludeParams,
|
|
53
|
+
"empty-stub": __props.emptyStub,
|
|
54
|
+
"select-only": __props.selectOnly,
|
|
55
|
+
"unselect-only": __props.unselectOnly,
|
|
56
|
+
"hide-option-icon": __props.hideOptionIcon,
|
|
57
|
+
"value-getter": __props.valueGetter,
|
|
58
|
+
"query-options": __props.queryOptions,
|
|
59
59
|
disabled: unref(isDisabled) || unref(isReadonly),
|
|
60
60
|
transition: "",
|
|
61
61
|
onSelect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("select", $event)),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps,
|
|
1
|
+
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import _sfc_main$1 from './WSelectAsync.vue.js';
|
|
3
3
|
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -101,18 +101,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "selectComponent" }, {
|
|
102
102
|
...props,
|
|
103
103
|
modelValue: arrayValue.value,
|
|
104
|
-
disableClear: !
|
|
105
|
-
previewData:
|
|
106
|
-
createdData:
|
|
104
|
+
disableClear: !__props.allowClear,
|
|
105
|
+
previewData: __props.previewData ? [__props.previewData] : void 0,
|
|
106
|
+
createdData: __props.createdData ? [__props.createdData] : void 0,
|
|
107
107
|
hidePrefix: true,
|
|
108
|
-
filterValue:
|
|
108
|
+
filterValue: __props.filterValue === void 0 ? __props.modelValue : __props.filterValue,
|
|
109
109
|
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose,
|
|
110
110
|
emptyValue: props.emptyValue !== void 0 && props.emptyValue !== null ? [props.emptyValue] : void 0
|
|
111
111
|
}, {
|
|
112
112
|
class: _ctx.$attrs.class,
|
|
113
113
|
onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
|
|
114
|
-
onUnselect: _cache[1] || (_cache[1] = ($event) =>
|
|
115
|
-
onFocus: _cache[2] || (_cache[2] = ($event) =>
|
|
114
|
+
onUnselect: _cache[1] || (_cache[1] = ($event) => __props.allowClear && updateModelValue(null)),
|
|
115
|
+
onFocus: _cache[2] || (_cache[2] = ($event) => __props.searchModel && typeof __props.modelValue === "string" ? selectComponentRef.value?.setSearch(__props.modelValue) : void 0),
|
|
116
116
|
onInitModel: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("init-model"))
|
|
117
117
|
}), createSlots({ _: 2 }, [
|
|
118
118
|
_ctx.$slots.title ? {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps,
|
|
1
|
+
import { defineComponent, useTemplateRef, computed, watch, toRef, createBlock, openBlock, mergeProps, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps } from 'vue';
|
|
2
2
|
import _sfc_main$1 from './WSelect.vue.js';
|
|
3
3
|
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -101,18 +101,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
101
101
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "selectComponent" }, {
|
|
102
102
|
...props,
|
|
103
103
|
modelValue: arrayValue.value,
|
|
104
|
-
disableClear: !
|
|
105
|
-
createdData:
|
|
104
|
+
disableClear: !__props.allowClear,
|
|
105
|
+
createdData: __props.createdData ? [__props.createdData] : void 0,
|
|
106
106
|
hidePrefix: true,
|
|
107
|
-
filterValue:
|
|
107
|
+
filterValue: __props.filterValue === void 0 ? __props.modelValue : __props.filterValue,
|
|
108
108
|
selectOnClose: props.searchModel ? props.searchModel : props.selectOnClose,
|
|
109
109
|
emptyValue: props.emptyValue !== void 0 && props.emptyValue !== null ? [props.emptyValue] : void 0
|
|
110
110
|
}, {
|
|
111
111
|
class: _ctx.$attrs.class,
|
|
112
112
|
onSelect: _cache[0] || (_cache[0] = ($event) => updateModelValue($event)),
|
|
113
|
-
onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(
|
|
113
|
+
onUnselect: _cache[1] || (_cache[1] = ($event) => updateModelValue(__props.allowClear ? null : $event)),
|
|
114
114
|
onFocus: _cache[2] || (_cache[2] = ($event) => {
|
|
115
|
-
|
|
115
|
+
__props.searchModel && typeof __props.modelValue === "string" ? selectComponentRef.value?.setSearch(__props.modelValue) : void 0;
|
|
116
116
|
_ctx.$emit("focus", $event);
|
|
117
117
|
}),
|
|
118
118
|
onBlur: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("blur", $event)),
|
|
@@ -126,8 +126,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
126
126
|
return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "selectComponent" }, {
|
|
127
127
|
...props,
|
|
128
128
|
modelValue: arrayValue.value,
|
|
129
|
-
filterValue:
|
|
130
|
-
createdData:
|
|
129
|
+
filterValue: __props.filterValue === void 0 ? arrayValue.value : __props.filterValue,
|
|
130
|
+
createdData: __props.createOption ? arrayValue.value.map(__props.createOption) : void 0,
|
|
131
131
|
emptyValue: arrayValueEmpty.value
|
|
132
132
|
}, {
|
|
133
133
|
class: _ctx.$attrs.class,
|
|
@@ -104,18 +104,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
104
104
|
});
|
|
105
105
|
return (_ctx, _cache) => {
|
|
106
106
|
return openBlock(), createElementBlock("div", null, [
|
|
107
|
-
|
|
107
|
+
__props.allowCreate ? (openBlock(), createBlock(_sfc_main$1, {
|
|
108
108
|
key: 0,
|
|
109
109
|
"is-selected": false,
|
|
110
110
|
"is-cursor": cursor.value === null,
|
|
111
|
-
loading:
|
|
111
|
+
loading: __props.loading && (__props.loadingCreate || loadingOption.value === null),
|
|
112
112
|
scroll: isCursorLocked.value,
|
|
113
113
|
previous: lastItem.value,
|
|
114
114
|
next: firstItem.value,
|
|
115
115
|
first: count.value === 0,
|
|
116
116
|
"is-no-cursor": cursor.value === void 0,
|
|
117
|
-
"hide-option-icon":
|
|
118
|
-
disabled: !
|
|
117
|
+
"hide-option-icon": __props.hideOptionIcon,
|
|
118
|
+
disabled: !__props.search || isModelValueSearch.value,
|
|
119
119
|
class: "first:-pt--w-select-option-padding last:-pb--w-select-option-padding",
|
|
120
120
|
onMouseenter: _cache[0] || (_cache[0] = ($event) => setCursor(null)),
|
|
121
121
|
"onUpdate:cursor": _cache[1] || (_cache[1] = ($event) => setCursor(null)),
|
|
@@ -128,16 +128,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
128
128
|
"onUpdate:next": _cache[4] || (_cache[4] = ($event) => cursorNext.value = $event),
|
|
129
129
|
onUnmounted: _cache[5] || (_cache[5] = ($event) => updateCursor(void 0))
|
|
130
130
|
}, {
|
|
131
|
-
prefix: withCtx(() => _cache[9] || (_cache[9] = [
|
|
131
|
+
prefix: withCtx(() => [..._cache[9] || (_cache[9] = [
|
|
132
132
|
createElementVNode("span", { class: "w-option flex items-center pr-2" }, " Create: ", -1)
|
|
133
|
-
])),
|
|
133
|
+
])]),
|
|
134
134
|
default: withCtx(() => [
|
|
135
|
-
|
|
135
|
+
__props.search && !isModelValueSearch.value ? renderSlot(_ctx.$slots, "default", {
|
|
136
136
|
key: 0,
|
|
137
137
|
option: void 0,
|
|
138
138
|
selected: false,
|
|
139
139
|
skeleton: false,
|
|
140
|
-
search:
|
|
140
|
+
search: __props.search,
|
|
141
141
|
model: false,
|
|
142
142
|
index: void 0
|
|
143
143
|
}) : (openBlock(), createElementBlock("div", _hoisted_1, " Start typing.. "))
|
|
@@ -145,15 +145,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
145
145
|
_: 3
|
|
146
146
|
}, 8, ["is-cursor", "loading", "scroll", "previous", "next", "first", "is-no-cursor", "hide-option-icon", "disabled"])) : createCommentVNode("", true),
|
|
147
147
|
createVNode(_sfc_main$2, {
|
|
148
|
-
"use-query-fn":
|
|
149
|
-
"query-params":
|
|
150
|
-
transition:
|
|
151
|
-
"exclude-params":
|
|
152
|
-
"empty-stub":
|
|
153
|
-
"value-getter":
|
|
154
|
-
"query-options":
|
|
148
|
+
"use-query-fn": __props.useQueryFn,
|
|
149
|
+
"query-params": __props.queryParams,
|
|
150
|
+
transition: __props.transition,
|
|
151
|
+
"exclude-params": __props.excludeParams,
|
|
152
|
+
"empty-stub": __props.emptyStub,
|
|
153
|
+
"value-getter": __props.valueGetter,
|
|
154
|
+
"query-options": __props.queryOptions,
|
|
155
155
|
"skeleton-length": count.value || 1,
|
|
156
|
-
"last-child": !
|
|
156
|
+
"last-child": !__props.allowCreate,
|
|
157
157
|
"hide-page-title": "",
|
|
158
158
|
"header-top-ignore": "",
|
|
159
159
|
"min-height": "",
|
|
@@ -165,31 +165,31 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
165
165
|
}, {
|
|
166
166
|
default: withCtx(({ item, skeleton, previous, next, first, last, index }) => [
|
|
167
167
|
createVNode(_sfc_main$1, {
|
|
168
|
-
"is-selected": !skeleton &&
|
|
169
|
-
"is-cursor": !skeleton &&
|
|
170
|
-
loading:
|
|
168
|
+
"is-selected": !skeleton && __props.modelValue.includes(__props.valueGetter(item)),
|
|
169
|
+
"is-cursor": !skeleton && __props.valueGetter(item) === cursor.value,
|
|
170
|
+
loading: __props.loading && loadingOption.value === __props.valueGetter(item),
|
|
171
171
|
skeleton,
|
|
172
172
|
scroll: isCursorLocked.value,
|
|
173
173
|
first,
|
|
174
174
|
last,
|
|
175
|
-
previous: first &&
|
|
176
|
-
next: last &&
|
|
175
|
+
previous: first && __props.allowCreate ? null : previous ? __props.valueGetter(previous) : void 0,
|
|
176
|
+
next: last && __props.allowCreate ? null : next ? __props.valueGetter(next) : void 0,
|
|
177
177
|
"is-no-cursor": cursor.value === void 0,
|
|
178
|
-
"hide-option-icon":
|
|
178
|
+
"hide-option-icon": __props.hideOptionIcon,
|
|
179
179
|
class: normalizeClass({
|
|
180
|
-
"-pt--w-select-option-padding": !
|
|
181
|
-
"-pb--w-select-option-padding": !
|
|
180
|
+
"-pt--w-select-option-padding": !__props.noPadding && first && !__props.allowCreate,
|
|
181
|
+
"-pb--w-select-option-padding": !__props.noPadding && last
|
|
182
182
|
}),
|
|
183
|
-
onSelect: ($event) => emitSelect(
|
|
184
|
-
onUnselect: ($event) => emitUnselect(
|
|
185
|
-
onMouseenter: ($event) => !skeleton && setCursor(
|
|
186
|
-
"onUpdate:cursor": ($event) => setCursor(
|
|
183
|
+
onSelect: ($event) => emitSelect(__props.valueGetter(item)),
|
|
184
|
+
onUnselect: ($event) => emitUnselect(__props.valueGetter(item)),
|
|
185
|
+
onMouseenter: ($event) => !skeleton && setCursor(__props.valueGetter(item)),
|
|
186
|
+
"onUpdate:cursor": ($event) => setCursor(__props.valueGetter(item)),
|
|
187
187
|
"onUpdate:isCursor": updateCursors,
|
|
188
188
|
"onUpdate:previous": _cache[6] || (_cache[6] = ($event) => cursorPrevious.value = $event),
|
|
189
189
|
"onUpdate:next": _cache[7] || (_cache[7] = ($event) => cursorNext.value = $event),
|
|
190
|
-
onUnmounted: ($event) => updateCursor(next ?
|
|
191
|
-
"onUpdate:first": ($event) => firstItem.value =
|
|
192
|
-
"onUpdate:last": ($event) => lastItem.value =
|
|
190
|
+
onUnmounted: ($event) => updateCursor(next ? __props.valueGetter(next) : void 0),
|
|
191
|
+
"onUpdate:first": ($event) => firstItem.value = __props.valueGetter(item),
|
|
192
|
+
"onUpdate:last": ($event) => lastItem.value = __props.valueGetter(item)
|
|
193
193
|
}, {
|
|
194
194
|
default: withCtx(({ selected }) => [
|
|
195
195
|
renderSlot(_ctx.$slots, "default", {
|
|
@@ -207,10 +207,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
207
207
|
empty: withCtx(() => [
|
|
208
208
|
createElementVNode("div", {
|
|
209
209
|
class: normalizeClass(["w-select-option -pb--w-select-option-padding", {
|
|
210
|
-
"-pt--w-select-option-padding": !
|
|
210
|
+
"-pt--w-select-option-padding": !__props.noPadding && !__props.allowCreate
|
|
211
211
|
}])
|
|
212
212
|
}, [
|
|
213
|
-
createElementVNode("div", _hoisted_2, toDisplayString(!
|
|
213
|
+
createElementVNode("div", _hoisted_2, toDisplayString(!__props.search && __props.emptyStub ? __props.emptyStub : __props.search ? "No match" : "Nothing to show"), 1)
|
|
214
214
|
], 2)
|
|
215
215
|
]),
|
|
216
216
|
_: 3
|
|
@@ -35,17 +35,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
return (_ctx, _cache) => {
|
|
36
36
|
return valueInString.value.length !== 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
37
37
|
createVNode(_sfc_main$1, {
|
|
38
|
-
"use-query-fn":
|
|
39
|
-
"query-params": { page: 1, [
|
|
40
|
-
"option-component":
|
|
41
|
-
"option-component-props":
|
|
42
|
-
"disable-clear":
|
|
43
|
-
loading:
|
|
44
|
-
disabled:
|
|
45
|
-
"preview-data":
|
|
46
|
-
"created-data":
|
|
47
|
-
"value-getter":
|
|
48
|
-
readonly:
|
|
38
|
+
"use-query-fn": __props.useQueryFn,
|
|
39
|
+
"query-params": { page: 1, [__props.valueQueryKey]: valueInString.value },
|
|
40
|
+
"option-component": __props.optionComponent,
|
|
41
|
+
"option-component-props": __props.optionComponentProps,
|
|
42
|
+
"disable-clear": __props.disableClear,
|
|
43
|
+
loading: __props.loading,
|
|
44
|
+
disabled: __props.disabled,
|
|
45
|
+
"preview-data": __props.previewData,
|
|
46
|
+
"created-data": __props.createdData,
|
|
47
|
+
"value-getter": __props.valueGetter,
|
|
48
|
+
readonly: __props.readonly,
|
|
49
49
|
onUnselect: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("unselect", $event)),
|
|
50
50
|
"onUpdate:fetching": _cache[1] || (_cache[1] = ($event) => _ctx.$emit("update:fetching", $event))
|
|
51
51
|
}, createSlots({ _: 2 }, [
|
|
@@ -57,15 +57,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
57
57
|
key: "0"
|
|
58
58
|
} : void 0
|
|
59
59
|
]), 1032, ["use-query-fn", "query-params", "option-component", "option-component-props", "disable-clear", "loading", "disabled", "preview-data", "created-data", "value-getter", "readonly"]),
|
|
60
|
-
|
|
61
|
-
createElementVNode("div", null, "... " + toDisplayString(unref(numberFormatter).format(
|
|
62
|
-
!
|
|
60
|
+
__props.modelValue.length > PAGE_LENGTH ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
61
|
+
createElementVNode("div", null, "... " + toDisplayString(unref(numberFormatter).format(__props.modelValue.length)) + " items", 1),
|
|
62
|
+
!__props.disableClear ? (openBlock(), createBlock(_sfc_main$2, {
|
|
63
63
|
key: 0,
|
|
64
|
-
loading:
|
|
65
|
-
disabled:
|
|
64
|
+
loading: __props.loading,
|
|
65
|
+
disabled: __props.disabled,
|
|
66
66
|
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
67
67
|
}, ["stop", "prevent"])),
|
|
68
|
-
onClick: _cache[3] || (_cache[3] = withModifiers(($event) => !
|
|
68
|
+
onClick: _cache[3] || (_cache[3] = withModifiers(($event) => !__props.loading && _ctx.$emit("update:model-value", []), ["stop", "prevent"]))
|
|
69
69
|
}, null, 8, ["loading", "disabled"])) : createCommentVNode("", true)
|
|
70
70
|
])) : createCommentVNode("", true)
|
|
71
71
|
], 64)) : createCommentVNode("", true);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AAgCA;AAyFA,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAA;yBAM9D,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,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;
|
|
1
|
+
{"version":3,"file":"SelectAsyncPrefixPage.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectAsyncPrefixPage.vue"],"names":[],"mappings":"AAgCA;AAyFA,OAAO,KAAK,EAAC,0BAA0B,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAA;yBAM9D,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,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;WA0JO,mBAAmB,CAAC;;;;uQAAkE,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB,CAAC,EAAE,CAAC,GAAG,IAAI;WAClD,GAAG;;iBA5GA,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;iBAA7E,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,SAAS,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YA3ClF,UAAU,SAAS,KAAK,GAAG,IAAI;YAC/B,oBAAoB,SAAS,MAAM,GAAG,IAAI;YAC1C,iBAAiB,SAAS,OAAO,GAAG,IAAI;;EAyJ1C,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AArKzE,wBAqK4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -50,22 +50,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
50
50
|
return (_ctx, _cache) => {
|
|
51
51
|
return openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (option, index) => {
|
|
52
52
|
return openBlock(), createBlock(_sfc_main$1, {
|
|
53
|
-
key:
|
|
53
|
+
key: __props.valueGetter(option),
|
|
54
54
|
option,
|
|
55
|
-
"option-component":
|
|
56
|
-
"option-component-props":
|
|
55
|
+
"option-component": __props.optionComponent,
|
|
56
|
+
"option-component-props": __props.optionComponentProps,
|
|
57
57
|
index,
|
|
58
|
-
loading:
|
|
59
|
-
disabled:
|
|
60
|
-
readonly:
|
|
61
|
-
"disable-clear":
|
|
58
|
+
loading: __props.loading,
|
|
59
|
+
disabled: __props.disabled,
|
|
60
|
+
readonly: __props.readonly,
|
|
61
|
+
"disable-clear": __props.disableClear,
|
|
62
62
|
skeleton: queryEnabled.value && !unref(data),
|
|
63
63
|
search: void 0,
|
|
64
64
|
class: normalizeClass({
|
|
65
|
-
"cursor-pointer": !
|
|
66
|
-
"cursor-not-allowed opacity-50":
|
|
65
|
+
"cursor-pointer": !__props.disabled && !__props.readonly,
|
|
66
|
+
"cursor-not-allowed opacity-50": __props.disabled
|
|
67
67
|
}),
|
|
68
|
-
onUnselect: ($event) => _ctx.$emit("unselect",
|
|
68
|
+
onUnselect: ($event) => _ctx.$emit("unselect", __props.valueGetter(option))
|
|
69
69
|
}, createSlots({ _: 2 }, [
|
|
70
70
|
_ctx.$slots.option ? {
|
|
71
71
|
name: "option",
|
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
declare const _default: <Model extends number | string>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
2
|
-
props: __VLS_PrettifyLocal<
|
|
2
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
3
|
+
readonly onUnmounted?: (() => any) | undefined;
|
|
4
|
+
readonly onSelect?: (() => any) | undefined;
|
|
5
|
+
readonly onMouseenter?: ((value: MouseEvent) => any) | undefined;
|
|
6
|
+
readonly onUnselect?: (() => any) | undefined;
|
|
7
|
+
readonly "onUpdate:cursor"?: (() => any) | undefined;
|
|
8
|
+
readonly "onUpdate:is-cursor"?: ((value: {
|
|
9
|
+
previous: Model | null | undefined;
|
|
10
|
+
next: Model | null | undefined;
|
|
11
|
+
}) => any) | undefined;
|
|
12
|
+
readonly "onUpdate:previous"?: ((value: Model | null | undefined) => any) | undefined;
|
|
13
|
+
readonly "onUpdate:next"?: ((value: Model | null | undefined) => any) | undefined;
|
|
14
|
+
readonly "onUpdate:first"?: (() => any) | undefined;
|
|
15
|
+
readonly "onUpdate:last"?: (() => any) | undefined;
|
|
16
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps, never>, "onMouseenter" | "onSelect" | "onUnselect" | "onUnmounted" | "onUpdate:cursor" | "onUpdate:is-cursor" | "onUpdate:previous" | "onUpdate:next" | "onUpdate:first" | "onUpdate:last"> & {
|
|
3
17
|
isSelected: boolean;
|
|
4
18
|
isCursor?: boolean;
|
|
5
19
|
loading?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectOption.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectOption.vue"],"names":[],"mappings":"AA6CA;yBAqJiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7C,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;WAgNO,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectOption.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/Select/components/SelectOption.vue"],"names":[],"mappings":"AA6CA;yBAqJiB,KAAK,SAAS,MAAM,GAAG,MAAM,EAC7C,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;WAgNO,mBAAmB,CAAC;;;;;;;sBA5LgB,KAAK,GAAG,IAAI,GAAG,SAAS;kBAAQ,KAAK,GAAG,IAAI,GAAG,SAAS;;;;;;;oBAlBtF,OAAO;mBACR,OAAO;kBACR,OAAO;mBACN,OAAO;iBACT,OAAO;gBACR,OAAO;eACR,OAAO;mBACH,KAAK,GAAG,IAAI;eAChB,KAAK,GAAG,IAAI;qBACN,OAAO;yBACH,OAAO;mBACb,OAAO;mBAmM0E,CAAC,4BAA2B;oBACzG,OAAO,KAAK,EAAE,gBAAgB;;MAAsB,GAAG,IAAI;WACpE,GAAG;;iBAxHA,CAAC,KAAK,EAAE;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;gBACrC,MAAM,IAAI;;iBADT,CAAC,KAAK,EAAE;YAAC,QAAQ,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;gBACrC,MAAM,IAAI;;;YAzEd,QAAQ,GAAG,IAAI;YACf,UAAU,GAAG,IAAI;YACjB,kBAAkB,SAAS;YAAC,QAAQ,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,CAAC;YAAC,IAAI,EAAE,KAAK,GAAG,IAAI,GAAG,SAAS,CAAA;SAAC,GAAG,IAAI;YACtG,eAAe,GAAG,IAAI;YACtB,iBAAiB,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;YACzD,aAAa,SAAS,KAAK,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;YACrD,WAAW,GAAG,IAAI;YAClB,cAAc,GAAG,IAAI;YACrB,aAAa,GAAG,IAAI;YACpB,YAAY,SAAS,UAAU,GAAG,IAAI;;EA2LxC,KACQ,OAAO,KAAK,EAAE,KAAK,GAAG;IAAE,KAAK,CAAC,EAAE,OAAO,CAAC,OAAO,WAAW,CAAC,CAAA;CAAE;AA3NzE,wBA2N4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
|
@@ -70,11 +70,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
70
70
|
return openBlock(), createElementBlock("div", {
|
|
71
71
|
ref: "element",
|
|
72
72
|
class: normalizeClass(["w-select-option relative grid w-full grid-cols-[auto,1fr,1.25em]", {
|
|
73
|
-
"bg-primary-light/30 dark:bg-primary-darkest/30":
|
|
74
|
-
"before:opacity-5": !
|
|
75
|
-
"cursor-progress":
|
|
76
|
-
"w-ripple": !
|
|
77
|
-
"cursor-not-allowed":
|
|
73
|
+
"bg-primary-light/30 dark:bg-primary-darkest/30": __props.isSelected,
|
|
74
|
+
"before:opacity-5": !__props.loading && __props.isCursor && !__props.skeleton && !__props.disabled,
|
|
75
|
+
"cursor-progress": __props.loading || __props.skeleton,
|
|
76
|
+
"w-ripple": !__props.loading && !__props.skeleton && !__props.disabled,
|
|
77
|
+
"cursor-not-allowed": __props.disabled
|
|
78
78
|
}]),
|
|
79
79
|
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
80
80
|
}, ["prevent", "stop"])),
|
|
@@ -84,10 +84,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
84
|
renderSlot(_ctx.$slots, "prefix"),
|
|
85
85
|
createElementVNode("div", {
|
|
86
86
|
class: normalizeClass(["-pr--w-option-padding col-start-2 flex items-center overflow-hidden", {
|
|
87
|
-
"col-span-2":
|
|
87
|
+
"col-span-2": __props.hideOptionIcon
|
|
88
88
|
}])
|
|
89
89
|
}, [
|
|
90
|
-
renderSlot(_ctx.$slots, "default", { selected:
|
|
90
|
+
renderSlot(_ctx.$slots, "default", { selected: __props.isSelected })
|
|
91
91
|
], 2),
|
|
92
92
|
createVNode(Transition, {
|
|
93
93
|
"enter-active-class": "transition-opacity",
|
|
@@ -96,11 +96,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
96
96
|
"leave-to-class": "opacity-0"
|
|
97
97
|
}, {
|
|
98
98
|
default: withCtx(() => [
|
|
99
|
-
!
|
|
100
|
-
|
|
99
|
+
!__props.hideOptionIcon && (__props.isSelected || __props.loading) ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
100
|
+
__props.isSelected && !__props.loading ? (openBlock(), createBlock(unref(IconCheck), {
|
|
101
101
|
key: 0,
|
|
102
102
|
class: "square-[1.25em]"
|
|
103
|
-
})) :
|
|
103
|
+
})) : __props.loading ? (openBlock(), createBlock(WSpinner, { key: 1 })) : createCommentVNode("", true)
|
|
104
104
|
])) : createCommentVNode("", true)
|
|
105
105
|
]),
|
|
106
106
|
_: 1
|
|
@@ -22,19 +22,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
22
22
|
emits: ["unselect"],
|
|
23
23
|
setup(__props) {
|
|
24
24
|
return (_ctx, _cache) => {
|
|
25
|
-
return
|
|
26
|
-
option:
|
|
27
|
-
index:
|
|
28
|
-
search:
|
|
25
|
+
return __props.optionComponent ? (openBlock(), createBlock(resolveDynamicComponent(__props.optionComponent), mergeProps({ key: 0 }, __props.optionComponentProps, {
|
|
26
|
+
option: __props.option,
|
|
27
|
+
index: __props.index,
|
|
28
|
+
search: __props.option === void 0 ? __props.search?.toString() : void 0,
|
|
29
29
|
selected: true,
|
|
30
30
|
model: true,
|
|
31
|
-
skeleton:
|
|
31
|
+
skeleton: __props.skeleton
|
|
32
32
|
}), {
|
|
33
33
|
default: withCtx(() => [
|
|
34
|
-
!
|
|
34
|
+
!__props.disableClear ? (openBlock(), createBlock(_sfc_main$1, {
|
|
35
35
|
key: 0,
|
|
36
|
-
loading:
|
|
37
|
-
disabled:
|
|
36
|
+
loading: __props.loading,
|
|
37
|
+
disabled: __props.disabled,
|
|
38
38
|
class: "w-option-button ml-1 mr-2",
|
|
39
39
|
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
40
40
|
}, ["stop", "prevent"])),
|
|
@@ -44,14 +44,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
44
44
|
_: 1
|
|
45
45
|
}, 16, ["option", "index", "search", "skeleton"])) : (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
46
46
|
renderSlot(_ctx.$slots, "option", {
|
|
47
|
-
option:
|
|
48
|
-
search:
|
|
49
|
-
skeleton:
|
|
47
|
+
option: __props.option,
|
|
48
|
+
search: __props.option === void 0 ? __props.search : void 0,
|
|
49
|
+
skeleton: __props.skeleton
|
|
50
50
|
}),
|
|
51
|
-
!
|
|
51
|
+
!__props.disableClear ? (openBlock(), createBlock(_sfc_main$1, {
|
|
52
52
|
key: 0,
|
|
53
|
-
loading:
|
|
54
|
-
disabled:
|
|
53
|
+
loading: __props.loading,
|
|
54
|
+
disabled: __props.disabled,
|
|
55
55
|
class: "mx-1 mr-2",
|
|
56
56
|
onMousedown: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
57
57
|
}, ["stop", "prevent"])),
|
|
@@ -17,7 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
style: normalizeStyle({
|
|
18
18
|
"mask": `url(#${unref(id)})`,
|
|
19
19
|
"-webkit-mask": `url(#${unref(id)})`,
|
|
20
|
-
"left": `-${
|
|
20
|
+
"left": `-${elementRef.value?.getBoundingClientRect().left ?? 0}px`
|
|
21
21
|
})
|
|
22
22
|
}, null, 4)
|
|
23
23
|
], 512);
|
|
@@ -21,7 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
21
21
|
createElementVNode("mask", {
|
|
22
22
|
id: unref(id),
|
|
23
23
|
maskUnits: "userSpaceOnUse"
|
|
24
|
-
}, _cache[0] || (_cache[0] = [
|
|
24
|
+
}, [..._cache[0] || (_cache[0] = [
|
|
25
25
|
createElementVNode("rect", {
|
|
26
26
|
width: "100%",
|
|
27
27
|
height: "100%",
|
|
@@ -35,7 +35,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
35
35
|
repeatCount: "indefinite"
|
|
36
36
|
})
|
|
37
37
|
], -1)
|
|
38
|
-
]), 8, _hoisted_2)
|
|
38
|
+
])], 8, _hoisted_2)
|
|
39
39
|
])
|
|
40
40
|
])) : createCommentVNode("", true);
|
|
41
41
|
};
|