eco-vue-js 0.5.25 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/icons/sax/IconClose.svg.js +26 -0
- package/dist/assets/icons/sax/IconEdit.svg.js +24 -0
- package/dist/assets/icons/sax/IconSlash.svg.js +27 -0
- package/dist/components/ActionsBar/WActionsBar.vue.d.ts +129 -2
- package/dist/components/ActionsBar/WActionsBar.vue.d.ts.map +1 -1
- package/dist/components/ActionsBar/WActionsBar.vue.js +1 -2
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts +20 -15
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts.map +1 -1
- package/dist/components/BottomSheet/WBottomSheet.vue.js +2 -4
- package/dist/components/Button/WButton.vue.d.ts +20 -17
- package/dist/components/Button/WButton.vue.d.ts.map +1 -1
- package/dist/components/Button/WButton.vue.js +1 -2
- package/dist/components/Button/WButtonAction.vue.d.ts +21 -18
- package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonCopy.vue.d.ts +3 -3
- package/dist/components/Button/WButtonCopy.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonCopy.vue.js +9 -43
- package/dist/components/Button/WButtonDropdown.vue.d.ts +33 -25
- package/dist/components/Button/WButtonDropdown.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonDropdown.vue.js +12 -9
- package/dist/components/Button/WButtonGroup.vue.d.ts +17 -110
- package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonGroup.vue.js +68 -44
- package/dist/components/Button/WButtonMore.vue.d.ts +14 -12
- package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMore.vue.js +1 -2
- package/dist/components/Button/WButtonMoreItem.vue.d.ts +19 -16
- package/dist/components/Button/WButtonMoreItem.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue.d.ts +16 -16
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts +8 -8
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts.map +1 -1
- package/dist/components/Button/models/semanticTypeStylesMap.d.ts +1 -0
- package/dist/components/Button/types.d.ts +36 -0
- package/dist/components/Button/types.d.ts.map +1 -0
- package/dist/components/Checkbox/WCheckbox.vue.d.ts +34 -32
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckbox.vue.js +1 -2
- package/dist/components/Chip/WChip.vue.d.ts +19 -16
- package/dist/components/Chip/WChip.vue.d.ts.map +1 -1
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts +7 -5
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts.map +1 -1
- package/dist/components/ClickOutside/WClickOutside.vue.js +3 -6
- package/dist/components/Counter/WCounter.vue.d.ts +15 -15
- package/dist/components/Counter/WCounter.vue.d.ts.map +1 -1
- package/dist/components/Counter/WCounter.vue.js +1 -2
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +6 -5
- package/dist/components/DatePicker/WDatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.js +1 -2
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +6 -6
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +1 -2
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts +10 -9
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarDay.vue.js +10 -20
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts +12 -11
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarMonth.vue.js +7 -14
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts +4 -4
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts +8 -8
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarValue.vue.js +1 -2
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts +8 -7
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarWeek.vue.js +7 -14
- package/dist/components/Dropdown/WDropdown.vue.d.ts +18 -29
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue.js +7 -14
- package/dist/components/Dropdown/types.d.ts +11 -0
- package/dist/components/Dropdown/types.d.ts.map +1 -0
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts +1 -0
- package/dist/components/Dropdown/utils/DropdownStyle.js +2 -4
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +18 -33
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +3 -3
- package/dist/components/DropdownMenu/types.d.ts +8 -0
- package/dist/components/DropdownMenu/types.d.ts.map +1 -0
- package/dist/components/Expansion/WExpansion.vue.d.ts +20 -18
- package/dist/components/Expansion/WExpansion.vue.d.ts.map +1 -1
- package/dist/components/Expansion/WExpansionItem.vue.d.ts +24 -22
- package/dist/components/Expansion/WExpansionItem.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +29 -21
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +148 -18
- package/dist/components/FieldWrapper/types.d.ts +16 -0
- package/dist/components/FieldWrapper/types.d.ts.map +1 -0
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +36 -32
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.js +3 -6
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts +19 -17
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts +7 -7
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts.map +1 -1
- package/dist/components/FilterWrapper/WFilterWrapper.vue.d.ts +16 -14
- package/dist/components/FilterWrapper/WFilterWrapper.vue.d.ts.map +1 -1
- package/dist/components/Form/WForm.vue.d.ts +21 -19
- package/dist/components/Form/WForm.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.d.ts +28 -26
- package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.js +12 -24
- package/dist/components/Form/models/injection.d.ts +2 -1
- package/dist/components/Form/models/injection.d.ts.map +1 -1
- package/dist/components/Form/models/utils.d.ts.map +1 -1
- package/dist/components/Form/models/utils.js +5 -4
- package/dist/components/Form/use/useFormErrorMessageMap.d.ts +4 -3
- package/dist/components/Form/use/useFormErrorMessageMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormHasChangesMap.d.ts +3 -2
- package/dist/components/Form/use/useFormHasChangesMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormInitModelMap.d.ts +2 -1
- package/dist/components/Form/use/useFormInitModelMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormInvalidateMap.d.ts +2 -1
- package/dist/components/Form/use/useFormInvalidateMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormTitleMap.d.ts +2 -1
- package/dist/components/Form/use/useFormTitleMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormValidateMap.d.ts +2 -1
- package/dist/components/Form/use/useFormValidateMap.d.ts.map +1 -1
- package/dist/components/Form/use/useFormValidateMap.js +1 -2
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +27 -24
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -1
- package/dist/components/HeaderBar/WHeaderBar.vue.js +2 -4
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts +9 -9
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts.map +1 -1
- package/dist/components/ImageViewer/WImageViewer.vue.js +1 -2
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts +6 -6
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +67 -237
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +50 -187
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListPages.vue.js +20 -40
- package/dist/components/InfiniteList/components/EmptyComponent.vue.d.ts +4 -2
- package/dist/components/InfiniteList/components/EmptyComponent.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts +2 -2
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +57 -209
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +21 -42
- package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts +18 -16
- package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +19 -43
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.js +2 -4
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +13 -23
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts +14 -12
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.js +1 -2
- package/dist/components/InfiniteList/models/injection.d.ts +8 -7
- package/dist/components/InfiniteList/models/injection.d.ts.map +1 -1
- package/dist/components/InfiniteList/models/utils.js +2 -4
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +5 -5
- package/dist/components/InfiniteList/use/useInfiniteListHeader.js +4 -2
- package/dist/components/InfiniteList/use/useRefetchNextPages.d.ts +1 -1
- package/dist/components/InfiniteList/use/useRefetchNextPages.js +1 -2
- package/dist/components/InfiniteList/use/useSelected.d.ts +6 -5
- package/dist/components/InfiniteList/use/useSelected.d.ts.map +1 -1
- package/dist/components/InfiniteList/use/useSelected.js +13 -26
- package/dist/components/InfoCard/WInfoCard.vue.d.ts +16 -14
- package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -1
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts +16 -13
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.d.ts +41 -199
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.js +137 -227
- package/dist/components/Input/WInputAsync.vue.d.ts +16 -94
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.js +118 -104
- package/dist/components/Input/WInputDate.vue.d.ts +41 -8
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputDate.vue.js +66 -14
- package/dist/components/Input/WInputOptions.vue.d.ts +18 -125
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputOptions.vue.js +64 -53
- package/dist/components/Input/WInputSuggest.vue.d.ts +49 -207
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.js +71 -57
- package/dist/components/Input/components/InputActions.vue.d.ts +34 -28
- package/dist/components/Input/components/InputActions.vue.d.ts.map +1 -1
- package/dist/components/Input/components/InputActions.vue.js +49 -84
- package/dist/components/Input/components/InputActionsButton.vue.d.ts +35 -0
- package/dist/components/Input/components/InputActionsButton.vue.d.ts.map +1 -0
- package/dist/components/Input/components/InputActionsButton.vue.js +41 -0
- package/dist/components/Input/components/InputActionsButton.vue2.js +5 -0
- package/dist/components/Input/types.d.ts +45 -0
- package/dist/components/Input/types.d.ts.map +1 -0
- package/dist/components/Link/WLink.vue.d.ts +19 -16
- package/dist/components/Link/WLink.vue.d.ts.map +1 -1
- package/dist/components/Link/WLinkArrow.vue.d.ts +12 -9
- package/dist/components/Link/WLinkArrow.vue.d.ts.map +1 -1
- package/dist/components/ListCard/WListCard.vue.d.ts +27 -25
- package/dist/components/ListCard/WListCard.vue.d.ts.map +1 -1
- package/dist/components/ListCard/WListCardField.vue.d.ts +17 -14
- package/dist/components/ListCard/WListCardField.vue.d.ts.map +1 -1
- package/dist/components/MenuItem/WMenuItem.vue.d.ts +19 -16
- package/dist/components/MenuItem/WMenuItem.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModal.vue.d.ts +1 -1
- package/dist/components/Modal/WModal.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModal.vue.js +2 -4
- package/dist/components/Modal/WModalStepper.vue.d.ts +18 -16
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalWrapper.vue.d.ts +14 -12
- package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -1
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts +2 -2
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts.map +1 -1
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts +19 -18
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts.map +1 -1
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue2.js +2 -4
- package/dist/components/Modal/modals/Confirm/types.d.ts +2 -1
- package/dist/components/Nav/WNavBar.vue.d.ts +7 -5
- package/dist/components/Nav/WNavBar.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.d.ts +16 -13
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.js +1 -2
- package/dist/components/Nav/WNavItemExpand.vue.d.ts +15 -12
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemExpand.vue.js +3 -0
- package/dist/components/Nav/WNavItemTransition.vue.d.ts +4 -2
- package/dist/components/Nav/WNavItemTransition.vue.d.ts.map +1 -1
- package/dist/components/Notify/WNotify.vue.d.ts +1 -1
- package/dist/components/Notify/WNotify.vue.d.ts.map +1 -1
- package/dist/components/Notify/WNotify.vue.js +1 -2
- package/dist/components/Notify/components/NotifyCard.vue.d.ts +15 -14
- package/dist/components/Notify/components/NotifyCard.vue.d.ts.map +1 -1
- package/dist/components/Notify/components/NotifyCard.vue.js +2 -4
- package/dist/components/Notify/models/types.d.ts +3 -2
- package/dist/components/Select/WSelect.vue.d.ts +41 -188
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +74 -66
- package/dist/components/Select/WSelectAsync.vue.d.ts +32 -207
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +78 -60
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +33 -111
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +24 -166
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +93 -82
- package/dist/components/Select/WSelectSingle.vue.d.ts +25 -149
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +84 -70
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +43 -133
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.js +7 -14
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +37 -104
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +37 -102
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +1 -2
- package/dist/components/Select/components/SelectOption.vue.d.ts +45 -132
- package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOption.vue.js +12 -24
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts +23 -52
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/types.d.ts +47 -0
- package/dist/components/Select/types.d.ts.map +1 -0
- package/dist/components/Skeleton/WSkeleton.vue.d.ts +1 -1
- package/dist/components/Skeleton/WSkeleton.vue.d.ts.map +1 -1
- package/dist/components/Spinner/WSpinner.vue.d.ts +1 -1
- package/dist/components/Spinner/WSpinner.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.d.ts +22 -24
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +6 -12
- package/dist/components/Tabs/WTabsColumns.vue.d.ts +3 -3
- package/dist/components/Tabs/WTabsColumns.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.d.ts +14 -12
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.js +3 -6
- package/dist/components/Tabs/models/injection.d.ts +2 -1
- package/dist/components/Tabs/models/injection.d.ts.map +1 -1
- package/dist/components/Tabs/use/useTabItemActiveListener.js +1 -2
- package/dist/components/Toggle/WToggle.vue.d.ts +19 -50
- package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
- package/dist/components/Toggle/WToggle.vue.js +1 -2
- package/dist/components/Tooltip/WTooltip.vue.d.ts +15 -15
- package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltip.vue.js +4 -8
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/WTooltipContainer.vue.js +1 -2
- package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts +22 -19
- package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts.map +1 -1
- package/dist/components/Tooltip/components/TooltipContainer.vue.js +5 -10
- package/dist/imports/componentsPlugin.d.ts +64 -63
- package/dist/imports/iconsSax.d.ts +3 -0
- package/dist/imports/iconsSax.d.ts.map +1 -1
- package/dist/imports/iconsSax.js +3 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +1 -0
- package/dist/utils/DOMListenerContainer.js +2 -4
- package/dist/utils/Modal.d.ts +4 -3
- package/dist/utils/Modal.d.ts.map +1 -1
- package/dist/utils/Notify.d.ts +5 -4
- package/dist/utils/Notify.d.ts.map +1 -1
- package/dist/utils/Tooltip.d.ts +2 -1
- package/dist/utils/dateTime.d.ts.map +1 -1
- package/dist/utils/dateTime.js +28 -56
- package/dist/utils/useCopy.d.ts +8 -0
- package/dist/utils/useCopy.d.ts.map +1 -0
- package/dist/utils/useCopy.js +56 -0
- package/dist/utils/useDefaultQuery.d.ts +4 -3
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +10 -20
- package/package.json +40 -19
- package/tailwind-base/plugins/default.cjs +6 -0
- package/tailwind-base/theme/sizes.cjs +2 -0
@@ -1,54 +1,78 @@
|
|
1
|
-
import { defineComponent, ref, computed, watch, toRef, openBlock,
|
1
|
+
import { defineComponent, ref, computed, watch, toRef, openBlock, createBlock, mergeProps, createSlots, withCtx, renderSlot, createElementBlock, normalizeClass, withModifiers, unref, createCommentVNode, nextTick } from 'vue';
|
2
2
|
import _sfc_main$1 from './WInput.vue.js';
|
3
3
|
import WSpinner from '../Spinner/WSpinner.vue.js';
|
4
|
-
import IconEdit from '../../assets/icons/
|
4
|
+
import IconEdit from '../../assets/icons/sax/IconEdit.svg.js';
|
5
5
|
import IconCheck from '../../assets/icons/default/IconCheck.svg.js';
|
6
|
+
import IconSlash from '../../assets/icons/sax/IconSlash.svg.js';
|
6
7
|
import WSkeleton from '../Skeleton/WSkeleton.vue.js';
|
7
8
|
import { Modal } from '../../utils/Modal.js';
|
8
9
|
import { SemanticType } from '../../utils/SemanticType.js';
|
10
|
+
import _sfc_main$2 from '../Tooltip/WTooltip.vue.js';
|
9
11
|
|
10
12
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
13
|
+
...{ inheritAttrs: false },
|
11
14
|
__name: "WInputAsync",
|
12
15
|
props: {
|
13
|
-
modelValue: {},
|
14
|
-
title: {},
|
15
|
-
description: {},
|
16
16
|
validate: {},
|
17
|
+
modelValue: {},
|
17
18
|
type: {},
|
18
|
-
placeholder: {},
|
19
|
-
loading: { type: Boolean },
|
20
|
-
disabled: { type: Boolean },
|
21
|
-
skeleton: { type: Boolean },
|
22
19
|
textarea: { type: Boolean },
|
20
|
+
resize: { type: Boolean },
|
21
|
+
placeholder: {},
|
22
|
+
icon: {},
|
23
|
+
size: {},
|
24
|
+
maxLength: {},
|
23
25
|
name: {},
|
24
|
-
|
26
|
+
autocomplete: {},
|
27
|
+
autofocus: { type: Boolean },
|
28
|
+
readonly: { type: Boolean },
|
29
|
+
disabledActions: { type: Boolean },
|
30
|
+
loading: { type: Boolean },
|
31
|
+
spellcheck: { type: Boolean },
|
32
|
+
customBackspaceHandle: { type: Boolean },
|
25
33
|
textSecure: { type: Boolean },
|
26
34
|
placeholderSecure: { type: Boolean },
|
27
|
-
|
28
|
-
|
29
|
-
|
35
|
+
allowClear: { type: Boolean },
|
36
|
+
allowPaste: { type: Boolean },
|
37
|
+
hideInput: { type: Boolean },
|
38
|
+
title: {},
|
39
|
+
description: {},
|
30
40
|
errorMessage: {},
|
41
|
+
tooltipText: {},
|
42
|
+
mono: { type: Boolean },
|
43
|
+
hasChanges: { type: Boolean },
|
44
|
+
skeleton: { type: Boolean },
|
45
|
+
disabled: { type: Boolean },
|
46
|
+
required: { type: Boolean },
|
31
47
|
noMargin: { type: Boolean },
|
32
|
-
|
33
|
-
allowPaste: { type: Boolean },
|
34
|
-
icon: {}
|
48
|
+
allowCopy: { type: Boolean }
|
35
49
|
},
|
36
50
|
emits: ["update:modelValue"],
|
37
51
|
setup(__props, { emit: __emit }) {
|
38
52
|
const props = __props;
|
39
53
|
const emit = __emit;
|
40
54
|
const focused = ref(false);
|
55
|
+
const saved = ref(false);
|
41
56
|
const value = ref();
|
42
57
|
const input = ref();
|
43
58
|
const errorMessageValue = ref();
|
44
59
|
const hasChangesValue = computed(() => props.modelValue !== value.value);
|
60
|
+
const canSave = computed(() => props.textSecure && focused.value || hasChangesValue.value);
|
61
|
+
const reset = () => {
|
62
|
+
value.value = props.modelValue;
|
63
|
+
focused.value = false;
|
64
|
+
};
|
65
|
+
const cancel = () => {
|
66
|
+
reset();
|
67
|
+
input.value?.blur();
|
68
|
+
};
|
45
69
|
const toggle = async () => {
|
46
|
-
if (props.disabled || props.loading)
|
47
|
-
|
48
|
-
if (hasChangesValue.value || props.textSecure && focused.value) {
|
70
|
+
if (props.disabled || props.loading) return;
|
71
|
+
if (canSave.value) {
|
49
72
|
emitUpdateModelValue(value.value);
|
50
73
|
} else {
|
51
|
-
|
74
|
+
if (focused.value) cancel();
|
75
|
+
else open();
|
52
76
|
}
|
53
77
|
};
|
54
78
|
let closeModal = null;
|
@@ -61,10 +85,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
61
85
|
acceptText: "Discard",
|
62
86
|
intermediateText: "Save",
|
63
87
|
acceptSemanticType: SemanticType.WARNING,
|
64
|
-
onAccept:
|
65
|
-
value.value = props.modelValue;
|
66
|
-
focused.value = false;
|
67
|
-
},
|
88
|
+
onAccept: reset,
|
68
89
|
onIntermediate: () => {
|
69
90
|
emitUpdateModelValue(value.value);
|
70
91
|
focused.value = false;
|
@@ -72,8 +93,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
72
93
|
}, () => {
|
73
94
|
closeModal = null;
|
74
95
|
nextTick().then(() => {
|
75
|
-
if (focused.value)
|
76
|
-
input.value?.focus();
|
96
|
+
if (focused.value) input.value?.focus();
|
77
97
|
});
|
78
98
|
});
|
79
99
|
} else {
|
@@ -82,16 +102,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
82
102
|
}
|
83
103
|
};
|
84
104
|
const open = () => {
|
85
|
-
if (props.disabled || props.loading)
|
86
|
-
return;
|
105
|
+
if (props.disabled || props.loading) return;
|
87
106
|
input.value?.focus();
|
88
107
|
};
|
89
108
|
watch(toRef(props, "modelValue"), (modelValue) => {
|
90
109
|
value.value = modelValue;
|
110
|
+
if (!props.placeholderSecure && saved.value) {
|
111
|
+
input.value?.blur();
|
112
|
+
saved.value = false;
|
113
|
+
}
|
91
114
|
}, { immediate: true });
|
92
115
|
watch(value, (newValue) => {
|
93
|
-
if (!props.validate)
|
94
|
-
return;
|
116
|
+
if (!props.validate) return;
|
95
117
|
if (props.validate instanceof Array) {
|
96
118
|
errorMessageValue.value = props.validate.map((fn) => fn(newValue)).filter((item) => item).join(", ") || void 0;
|
97
119
|
} else {
|
@@ -99,95 +121,87 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
99
121
|
}
|
100
122
|
});
|
101
123
|
const emitUpdateModelValue = (newValue) => {
|
102
|
-
if (props.disabled || props.loading)
|
103
|
-
|
104
|
-
if (
|
105
|
-
return;
|
106
|
-
if (props.placeholderSecure)
|
107
|
-
input.value?.blur();
|
124
|
+
if (props.disabled || props.loading) return;
|
125
|
+
if (errorMessageValue.value) return;
|
126
|
+
if (props.placeholderSecure) input.value?.blur();
|
108
127
|
emit("update:modelValue", newValue);
|
128
|
+
if (!props.placeholderSecure) saved.value = true;
|
109
129
|
};
|
110
130
|
const handleEnterPress = (event) => {
|
111
|
-
if (props.textarea)
|
112
|
-
return;
|
131
|
+
if (props.textarea) return;
|
113
132
|
event.stopPropagation();
|
114
133
|
event.preventDefault();
|
115
134
|
emitUpdateModelValue(value.value);
|
116
135
|
};
|
117
136
|
const handlePaste = () => {
|
137
|
+
if (!value.value) return;
|
118
138
|
if (hasChangesValue.value || props.textSecure && focused.value) {
|
119
139
|
emitUpdateModelValue(value.value);
|
120
140
|
}
|
121
141
|
};
|
122
142
|
return (_ctx, _cache) => {
|
123
|
-
return openBlock(),
|
124
|
-
|
143
|
+
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
144
|
+
ref_key: "input",
|
145
|
+
ref: input
|
146
|
+
}, {
|
147
|
+
...props,
|
148
|
+
modelValue: value.value,
|
149
|
+
disabledActions: !focused.value && !hasChangesValue.value || _ctx.disabledActions,
|
150
|
+
errorMessage: errorMessageValue.value ?? _ctx.errorMessage,
|
151
|
+
hasChanges: _ctx.hasChanges || hasChangesValue.value,
|
152
|
+
allowClear: !_ctx.textarea || _ctx.allowClear,
|
153
|
+
loading: void 0
|
154
|
+
}, {
|
155
|
+
class: _ctx.$attrs.class,
|
156
|
+
"onKeypress:enter": handleEnterPress,
|
157
|
+
onClick: open,
|
158
|
+
onBlur: close,
|
159
|
+
onFocus: _cache[1] || (_cache[1] = ($event) => focused.value = true),
|
160
|
+
onPaste: handlePaste,
|
161
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => value.value = $event)
|
162
|
+
}), createSlots({
|
163
|
+
right: withCtx(() => [
|
164
|
+
renderSlot(_ctx.$slots, "right"),
|
165
|
+
_ctx.skeleton ? (openBlock(), createBlock(WSkeleton, {
|
166
|
+
key: 0,
|
167
|
+
class: "square-11 w-skeleton-rounded-lg"
|
168
|
+
})) : (openBlock(), createElementBlock("button", {
|
169
|
+
key: 1,
|
170
|
+
class: normalizeClass(["relative square-11 rounded-lg flex items-center justify-center bg-default dark:bg-default-dark border border-solid border-gray-200 dark:border-gray-800", {
|
171
|
+
"cursor-not-allowed": _ctx.disabled,
|
172
|
+
"cursor-progress": _ctx.loading,
|
173
|
+
"w-ripple w-ripple-hover": !_ctx.disabled && !_ctx.loading,
|
174
|
+
"bg-primary-default dark:bg-primary-dark text-default dark:text-default-dark": canSave.value,
|
175
|
+
"text-description": !canSave.value
|
176
|
+
}]),
|
177
|
+
onClick: withModifiers(toggle, ["stop", "prevent"]),
|
178
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
179
|
+
}, ["stop", "prevent"]))
|
180
|
+
}, [
|
181
|
+
_ctx.loading ? (openBlock(), createBlock(WSpinner, { key: 0 })) : canSave.value ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : focused.value ? (openBlock(), createBlock(unref(IconSlash), { key: 2 })) : (openBlock(), createBlock(unref(IconEdit), { key: 3 })),
|
182
|
+
!_ctx.loading && focused.value ? (openBlock(), createBlock(_sfc_main$2, {
|
183
|
+
key: 4,
|
184
|
+
text: canSave.value ? "Save" : "Cancel"
|
185
|
+
}, null, 8, ["text"])) : createCommentVNode("", true)
|
186
|
+
], 34))
|
187
|
+
]),
|
188
|
+
_: 2
|
125
189
|
}, [
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
"
|
135
|
-
|
136
|
-
|
137
|
-
skeleton: _ctx.skeleton,
|
138
|
-
textarea: _ctx.textarea,
|
139
|
-
name: _ctx.name,
|
140
|
-
mono: _ctx.mono,
|
141
|
-
"text-secure": _ctx.textSecure,
|
142
|
-
"placeholder-secure": _ctx.placeholderSecure,
|
143
|
-
"max-length": _ctx.maxLength,
|
144
|
-
"has-changes": _ctx.hasChanges || hasChangesValue.value,
|
145
|
-
disabled: _ctx.disabled,
|
146
|
-
required: _ctx.required,
|
147
|
-
"no-margin": _ctx.noMargin,
|
148
|
-
"allow-clear": !_ctx.textarea,
|
149
|
-
resize: _ctx.resize,
|
150
|
-
"allow-paste": _ctx.allowPaste,
|
151
|
-
icon: _ctx.icon,
|
152
|
-
class: "w-full",
|
153
|
-
"onKeypress:enter": handleEnterPress,
|
154
|
-
onClick: open,
|
155
|
-
onBlur: close,
|
156
|
-
onFocus: _cache[2] || (_cache[2] = ($event) => focused.value = true),
|
157
|
-
onPaste: handlePaste
|
158
|
-
}, createSlots({
|
159
|
-
right: withCtx(() => [
|
160
|
-
renderSlot(_ctx.$slots, "right"),
|
161
|
-
_ctx.skeleton ? (openBlock(), createBlock(WSkeleton, {
|
162
|
-
key: 0,
|
163
|
-
class: "square-11 w-skeleton-rounded-lg"
|
164
|
-
})) : (openBlock(), createElementBlock("button", {
|
165
|
-
key: 1,
|
166
|
-
class: normalizeClass(["relative square-11 rounded-lg flex items-center justify-center bg-default dark:bg-default-dark border border-solid border-gray-200 dark:border-gray-800", {
|
167
|
-
"cursor-not-allowed": _ctx.disabled,
|
168
|
-
"cursor-progress": _ctx.loading,
|
169
|
-
"w-ripple w-ripple-hover": !_ctx.disabled && !_ctx.loading,
|
170
|
-
"bg-primary-default dark:bg-primary-dark text-default dark:text-default-dark": focused.value,
|
171
|
-
"text-description": !focused.value
|
172
|
-
}]),
|
173
|
-
onClick: withModifiers(toggle, ["stop"]),
|
174
|
-
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
|
175
|
-
}, ["stop", "prevent"]))
|
176
|
-
}, [
|
177
|
-
_ctx.loading ? (openBlock(), createBlock(WSpinner, { key: 0 })) : _ctx.hasChanges || focused.value ? (openBlock(), createBlock(unref(IconCheck), { key: 1 })) : (openBlock(), createBlock(unref(IconEdit), { key: 2 }))
|
178
|
-
], 34))
|
190
|
+
_ctx.$slots.title ? {
|
191
|
+
name: "title",
|
192
|
+
fn: withCtx(() => [
|
193
|
+
renderSlot(_ctx.$slots, "title")
|
194
|
+
]),
|
195
|
+
key: "0"
|
196
|
+
} : void 0,
|
197
|
+
_ctx.$slots.subtitle || true ? {
|
198
|
+
name: "subtitle",
|
199
|
+
fn: withCtx(() => [
|
200
|
+
renderSlot(_ctx.$slots, "subtitle")
|
179
201
|
]),
|
180
|
-
|
181
|
-
}
|
182
|
-
|
183
|
-
name: "title",
|
184
|
-
fn: withCtx(() => [
|
185
|
-
renderSlot(_ctx.$slots, "title")
|
186
|
-
]),
|
187
|
-
key: "0"
|
188
|
-
} : void 0
|
189
|
-
]), 1032, ["modelValue", "title", "description", "placeholder", "disabled-actions", "type", "error-message", "skeleton", "textarea", "name", "mono", "text-secure", "placeholder-secure", "max-length", "has-changes", "disabled", "required", "no-margin", "allow-clear", "resize", "allow-paste", "icon"])
|
190
|
-
], 2);
|
202
|
+
key: "1"
|
203
|
+
} : void 0
|
204
|
+
]), 1040, ["class"]);
|
191
205
|
};
|
192
206
|
}
|
193
207
|
});
|
@@ -1,17 +1,50 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
import { HorizontalAlign } from '../../utils/HorizontalAlign';
|
2
|
+
import { InputSuggestProps } from './types';
|
3
|
+
|
4
|
+
interface Props extends Omit<InputSuggestProps<'text'>, 'modelValue'> {
|
3
5
|
modelValue?: Date | undefined;
|
4
|
-
}
|
6
|
+
}
|
7
|
+
declare function __VLS_template(): {
|
8
|
+
title?(_: {}): any;
|
9
|
+
subtitle?(_: {}): any;
|
10
|
+
};
|
11
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
12
|
+
modelValue: undefined;
|
13
|
+
maxHeight: number;
|
14
|
+
maxWidth: number;
|
15
|
+
horizontalAlign: HorizontalAlign;
|
16
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
5
17
|
"update:model-value": (value: Date | undefined) => void;
|
6
|
-
}, string, import(
|
7
|
-
|
8
|
-
|
18
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
19
|
+
modelValue: undefined;
|
20
|
+
maxHeight: number;
|
21
|
+
maxWidth: number;
|
22
|
+
horizontalAlign: HorizontalAlign;
|
9
23
|
}>>> & {
|
10
24
|
"onUpdate:model-value"?: ((value: Date | undefined) => any) | undefined;
|
11
|
-
}, {
|
25
|
+
}, {
|
26
|
+
maxHeight: number;
|
27
|
+
maxWidth: number;
|
28
|
+
horizontalAlign: HorizontalAlign;
|
29
|
+
modelValue: Date;
|
30
|
+
}, {}>;
|
31
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
12
32
|
export default _default;
|
33
|
+
type __VLS_WithDefaults<P, D> = {
|
34
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
35
|
+
default: D[K];
|
36
|
+
}> : P[K];
|
37
|
+
};
|
38
|
+
type __VLS_Prettify<T> = {
|
39
|
+
[K in keyof T]: T[K];
|
40
|
+
} & {};
|
41
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
42
|
+
new (): {
|
43
|
+
$slots: S;
|
44
|
+
};
|
45
|
+
};
|
13
46
|
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
14
|
-
type
|
47
|
+
type __VLS_TypePropsToOption<T> = {
|
15
48
|
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
16
49
|
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
17
50
|
} : {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInputDate.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputDate.vue"],"names":[],"mappings":"AA2FA,OAAO,EAAC,eAAe,EAAC,MAAM,yBAAyB,CAAA;AACvD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;AAI9C,UAAU,KAAM,SAAQ,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC;IACnE,UAAU,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAC9B;AAgDD,iBAAS,cAAc;mBA+II,GAAG;sBACC,GAAG;EAqBjC;AACD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;MAOnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AAOxG,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAC1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAC7C,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QAAE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KAAC,CAAC,GACvC,CAAC,CAAC,CAAC,CAAC;CACP,CAAC;AAEN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AAExD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACpC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC;AAEN,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AAC5D,KAAK,uBAAuB,CAAC,CAAC,IAAI;KAChC,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GACpC;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAC9D;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CACzD,CAAC"}
|
@@ -1,14 +1,52 @@
|
|
1
|
-
import { defineComponent, ref, openBlock, createBlock,
|
1
|
+
import { defineComponent, ref, openBlock, createBlock, mergeProps, createSlots, withCtx, createElementVNode, withModifiers, createVNode, renderSlot } from 'vue';
|
2
2
|
import _sfc_main$2 from '../DatePicker/WDatePickerSingle.vue.js';
|
3
3
|
import { dateFormat, parseDate } from '../../utils/dateTime.js';
|
4
4
|
import _sfc_main$1 from './WInputSuggest.vue.js';
|
5
5
|
import { HorizontalAlign } from '../../utils/HorizontalAlign.js';
|
6
6
|
|
7
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
8
|
+
...{ inheritAttrs: false },
|
8
9
|
__name: "WInputDate",
|
9
10
|
props: {
|
11
|
+
modelValue: { default: void 0 },
|
12
|
+
mobileTitle: {},
|
13
|
+
persist: { type: Boolean },
|
14
|
+
type: {},
|
15
|
+
textarea: { type: Boolean },
|
16
|
+
resize: { type: Boolean },
|
17
|
+
placeholder: {},
|
18
|
+
icon: {},
|
19
|
+
size: {},
|
20
|
+
maxLength: {},
|
21
|
+
name: {},
|
22
|
+
autocomplete: {},
|
23
|
+
autofocus: { type: Boolean },
|
24
|
+
readonly: { type: Boolean },
|
25
|
+
disabledActions: { type: Boolean },
|
26
|
+
loading: { type: Boolean },
|
27
|
+
spellcheck: { type: Boolean },
|
28
|
+
customBackspaceHandle: { type: Boolean },
|
29
|
+
textSecure: { type: Boolean },
|
30
|
+
placeholderSecure: { type: Boolean },
|
31
|
+
allowClear: { type: Boolean },
|
32
|
+
allowPaste: { type: Boolean },
|
33
|
+
hideInput: { type: Boolean },
|
10
34
|
title: {},
|
11
|
-
|
35
|
+
description: {},
|
36
|
+
errorMessage: {},
|
37
|
+
tooltipText: {},
|
38
|
+
mono: { type: Boolean },
|
39
|
+
hasChanges: { type: Boolean },
|
40
|
+
skeleton: { type: Boolean },
|
41
|
+
disabled: { type: Boolean },
|
42
|
+
required: { type: Boolean },
|
43
|
+
noMargin: { type: Boolean },
|
44
|
+
allowCopy: { type: Boolean },
|
45
|
+
teleport: { type: Boolean },
|
46
|
+
noZIndex: { type: Boolean },
|
47
|
+
maxHeight: { default: 520 },
|
48
|
+
maxWidth: { default: 480 },
|
49
|
+
horizontalAlign: { default: HorizontalAlign.RIGHT_INNER }
|
12
50
|
},
|
13
51
|
emits: ["update:model-value"],
|
14
52
|
setup(__props, { emit: __emit }) {
|
@@ -19,25 +57,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
57
|
const updateInputValue = (value) => {
|
20
58
|
inputValue.value = value;
|
21
59
|
const date = parseDate(value);
|
22
|
-
if (date)
|
23
|
-
emit("update:model-value", date);
|
60
|
+
if (date) emit("update:model-value", date);
|
24
61
|
};
|
25
62
|
const formatModelValue = (value) => {
|
26
63
|
inputValue.value = value ? dateFormat(value) : "";
|
27
64
|
};
|
28
65
|
return (_ctx, _cache) => {
|
29
|
-
return openBlock(), createBlock(_sfc_main$1, {
|
66
|
+
return openBlock(), createBlock(_sfc_main$1, mergeProps({
|
30
67
|
ref_key: "inputComponent",
|
31
|
-
ref: inputComponent
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
68
|
+
ref: inputComponent
|
69
|
+
}, {
|
70
|
+
...props,
|
71
|
+
modelValue: inputValue.value
|
72
|
+
}, {
|
73
|
+
class: _ctx.$attrs.class,
|
37
74
|
"onUpdate:modelValue": updateInputValue,
|
38
75
|
onClose: _cache[2] || (_cache[2] = ($event) => formatModelValue(_ctx.modelValue)),
|
39
76
|
"onKeypress:enter": _cache[3] || (_cache[3] = ($event) => inputComponent.value?.blur())
|
40
|
-
}, {
|
77
|
+
}), createSlots({
|
41
78
|
content: withCtx(() => [
|
42
79
|
createElementVNode("div", {
|
43
80
|
class: "sm:p-6 sm:w-[28rem] sm-not:w-screen sm-not:px-3",
|
@@ -54,8 +91,23 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
54
91
|
}, null, 8, ["model-value", "title"])
|
55
92
|
], 32)
|
56
93
|
]),
|
57
|
-
_:
|
58
|
-
},
|
94
|
+
_: 2
|
95
|
+
}, [
|
96
|
+
_ctx.$slots.title ? {
|
97
|
+
name: "title",
|
98
|
+
fn: withCtx(() => [
|
99
|
+
renderSlot(_ctx.$slots, "title")
|
100
|
+
]),
|
101
|
+
key: "0"
|
102
|
+
} : void 0,
|
103
|
+
_ctx.$slots.subtitle ? {
|
104
|
+
name: "subtitle",
|
105
|
+
fn: withCtx(() => [
|
106
|
+
renderSlot(_ctx.$slots, "subtitle")
|
107
|
+
]),
|
108
|
+
key: "1"
|
109
|
+
} : void 0
|
110
|
+
]), 1040, ["class"]);
|
59
111
|
};
|
60
112
|
}
|
61
113
|
});
|
@@ -1,145 +1,38 @@
|
|
1
|
-
import {
|
1
|
+
import { InputOptionsProps } from './types';
|
2
|
+
|
2
3
|
declare const _default: <Type extends InputType = "text", Option extends Record<string, any> & {
|
3
4
|
id: number;
|
4
5
|
} = Record<string, any> & {
|
5
6
|
id: number;
|
6
|
-
}>(__VLS_props: {
|
7
|
-
|
8
|
-
required?: boolean | undefined;
|
9
|
-
title?: string | undefined;
|
10
|
-
icon?: SVGComponent | undefined;
|
11
|
-
disabled?: boolean | undefined;
|
12
|
-
loading?: boolean | undefined;
|
13
|
-
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
14
|
-
modelValue: Type extends "number" ? number : string;
|
15
|
-
readonly?: boolean | undefined;
|
16
|
-
skeleton?: boolean | undefined;
|
17
|
-
description?: string | undefined;
|
18
|
-
placeholder?: string | undefined;
|
19
|
-
errorMessage?: string | undefined;
|
20
|
-
hasChanges?: boolean | undefined;
|
21
|
-
mono?: boolean | undefined;
|
22
|
-
noMargin?: boolean | undefined;
|
23
|
-
mobileTitle?: string | undefined;
|
24
|
-
emptyStub?: string | undefined;
|
25
|
-
"onUpdate:model-value"?: ((value: Type extends "number" ? number : string) => any) | undefined;
|
26
|
-
options: Option[];
|
27
|
-
maxSearchLength?: number | undefined;
|
28
|
-
optionComponent?: Component<{
|
29
|
-
option: Option;
|
30
|
-
selected?: boolean | undefined;
|
31
|
-
model?: boolean | undefined;
|
32
|
-
}> | undefined;
|
33
|
-
disableClear?: boolean | undefined;
|
34
|
-
searchSize?: number | undefined;
|
35
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, __VLS_ctx?: {
|
36
|
-
attrs: any;
|
37
|
-
slots: {
|
38
|
-
right?(_: {}): any;
|
39
|
-
option?(_: {
|
40
|
-
option: Option;
|
41
|
-
selected: boolean;
|
42
|
-
model: boolean;
|
43
|
-
}): any;
|
44
|
-
};
|
45
|
-
emit: (e: 'update:model-value', value: Type extends "number" ? number : string) => void;
|
46
|
-
} | undefined, __VLS_expose?: ((exposed: import("vue").ShallowUnwrapRef<{
|
47
|
-
focus: () => void;
|
48
|
-
blur: () => void;
|
49
|
-
}>) => void) | undefined, __VLS_setup?: Promise<{
|
50
|
-
props: {
|
51
|
-
type?: Type | undefined;
|
52
|
-
required?: boolean | undefined;
|
53
|
-
title?: string | undefined;
|
54
|
-
icon?: SVGComponent | undefined;
|
55
|
-
disabled?: boolean | undefined;
|
56
|
-
loading?: boolean | undefined;
|
57
|
-
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
58
|
-
modelValue: Type extends "number" ? number : string;
|
59
|
-
readonly?: boolean | undefined;
|
60
|
-
skeleton?: boolean | undefined;
|
61
|
-
description?: string | undefined;
|
62
|
-
placeholder?: string | undefined;
|
63
|
-
errorMessage?: string | undefined;
|
64
|
-
hasChanges?: boolean | undefined;
|
65
|
-
mono?: boolean | undefined;
|
66
|
-
noMargin?: boolean | undefined;
|
67
|
-
mobileTitle?: string | undefined;
|
68
|
-
emptyStub?: string | undefined;
|
7
|
+
}>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_Prettify<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
8
|
+
props: __VLS_Prettify<Pick<Partial<{}> & Omit<{
|
69
9
|
"onUpdate:model-value"?: ((value: Type extends "number" ? number : string) => any) | undefined;
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
selected?: boolean | undefined;
|
75
|
-
model?: boolean | undefined;
|
76
|
-
}> | undefined;
|
77
|
-
disableClear?: boolean | undefined;
|
78
|
-
searchSize?: number | undefined;
|
79
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
80
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
10
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{}>> & {
|
11
|
+
"onUpdate:model-value"?: ((value: Type extends "number" ? number : string) => any) | undefined;
|
12
|
+
}, never>, "onUpdate:model-value"> & InputOptionsProps<Type, Option>> & import('vue').PublicProps;
|
13
|
+
expose(exposed: import('vue').ShallowUnwrapRef<{
|
81
14
|
focus: () => void;
|
82
15
|
blur: () => void;
|
83
16
|
}>): void;
|
84
17
|
attrs: any;
|
85
|
-
slots: {
|
18
|
+
slots: ReturnType<() => {
|
19
|
+
title?(_: {}): any;
|
20
|
+
subtitle?(_: {}): any;
|
86
21
|
right?(_: {}): any;
|
87
22
|
option?(_: {
|
88
23
|
option: Option;
|
89
24
|
selected: boolean;
|
90
25
|
model: boolean;
|
91
26
|
}): any;
|
92
|
-
}
|
93
|
-
emit: (e:
|
94
|
-
}>) => import(
|
27
|
+
}>;
|
28
|
+
emit: ((e: "update:model-value", value: Type extends "number" ? number : string) => void) & {};
|
29
|
+
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
95
30
|
[key: string]: any;
|
96
31
|
}> & {
|
97
|
-
__ctx?:
|
98
|
-
props: {
|
99
|
-
type?: Type | undefined;
|
100
|
-
required?: boolean | undefined;
|
101
|
-
title?: string | undefined;
|
102
|
-
icon?: SVGComponent | undefined;
|
103
|
-
disabled?: boolean | undefined;
|
104
|
-
loading?: boolean | undefined;
|
105
|
-
valueGetter: (option: Option) => Type extends "number" ? number : string;
|
106
|
-
modelValue: Type extends "number" ? number : string;
|
107
|
-
readonly?: boolean | undefined;
|
108
|
-
skeleton?: boolean | undefined;
|
109
|
-
description?: string | undefined;
|
110
|
-
placeholder?: string | undefined;
|
111
|
-
errorMessage?: string | undefined;
|
112
|
-
hasChanges?: boolean | undefined;
|
113
|
-
mono?: boolean | undefined;
|
114
|
-
noMargin?: boolean | undefined;
|
115
|
-
mobileTitle?: string | undefined;
|
116
|
-
emptyStub?: string | undefined;
|
117
|
-
"onUpdate:model-value"?: ((value: Type extends "number" ? number : string) => any) | undefined;
|
118
|
-
options: Option[];
|
119
|
-
maxSearchLength?: number | undefined;
|
120
|
-
optionComponent?: Component<{
|
121
|
-
option: Option;
|
122
|
-
selected?: boolean | undefined;
|
123
|
-
model?: boolean | undefined;
|
124
|
-
}> | undefined;
|
125
|
-
disableClear?: boolean | undefined;
|
126
|
-
searchSize?: number | undefined;
|
127
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps;
|
128
|
-
expose(exposed: import("vue").ShallowUnwrapRef<{
|
129
|
-
focus: () => void;
|
130
|
-
blur: () => void;
|
131
|
-
}>): void;
|
132
|
-
attrs: any;
|
133
|
-
slots: {
|
134
|
-
right?(_: {}): any;
|
135
|
-
option?(_: {
|
136
|
-
option: Option;
|
137
|
-
selected: boolean;
|
138
|
-
model: boolean;
|
139
|
-
}): any;
|
140
|
-
};
|
141
|
-
emit: (e: 'update:model-value', value: Type extends "number" ? number : string) => void;
|
142
|
-
} | undefined;
|
32
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
143
33
|
};
|
144
34
|
export default _default;
|
35
|
+
type __VLS_Prettify<T> = {
|
36
|
+
[K in keyof T]: T[K];
|
37
|
+
} & {};
|
145
38
|
//# sourceMappingURL=WInputOptions.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WInputOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputOptions.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WInputOptions.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Input/WInputOptions.vue"],"names":[],"mappings":"AA0MA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,SAAS,CAAA;yBAG7B,IAAI,SAAS,SAAS,WAAW,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC;QAA8B,MAAM;gBACzH,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,cAAc,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBACvF,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WAgZxD,cAAc,CAAC;;;;wEAAyD,CAAC,4BAA2B;oBAC3F,OAAO,KAAK,EAAE,gBAAgB;;;MAAsB,GAAG,IAAI;WACpE,GAAG;WACH,UAAU;uBAvCQ,GAAG;0BACA,GAAG;uBACN,GAAG;;;;;YACF,GAAG;MAoCW;UAClC,KA3YH,oBAAoB,qDAAsB,IAAI,MA2YT;;;;YAGC,OAAO,CAAC,OAAO,WAAW,CAAC;;AA1ZvE,wBA0Z4E;AAM5E,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|