eco-vue-js 0.7.3 → 0.8.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/assets/icons/default/IconAdd.svg.js +12 -15
- package/dist/assets/icons/default/IconArrow.svg.js +10 -12
- package/dist/assets/icons/default/IconAvatar.svg.js +3 -5
- package/dist/assets/icons/default/IconBack.svg.js +25 -29
- package/dist/assets/icons/default/IconCancel.svg.js +7 -9
- package/dist/assets/icons/default/IconCheck.svg.js +6 -8
- package/dist/assets/icons/default/IconDanger.svg.js +16 -20
- package/dist/assets/icons/default/IconDojo.svg.js +14 -17
- package/dist/assets/icons/default/IconEdit.svg.js +15 -18
- package/dist/assets/icons/default/IconFalsePositive.svg.js +13 -16
- package/dist/assets/icons/default/IconFeedback.svg.js +24 -29
- package/dist/assets/icons/default/IconFilter.svg.js +8 -10
- package/dist/assets/icons/default/IconInProgress.svg.js +13 -15
- package/dist/assets/icons/default/IconJira.svg.js +3 -5
- package/dist/assets/icons/default/IconLogout.svg.js +3 -5
- package/dist/assets/icons/default/IconMore.svg.js +20 -24
- package/dist/assets/icons/default/IconNotification.svg.js +8 -10
- package/dist/assets/icons/default/IconProfile.svg.js +18 -22
- package/dist/assets/icons/default/IconSearch.svg.js +6 -8
- package/dist/assets/icons/default/IconSettings.svg.js +16 -19
- package/dist/assets/icons/default/IconSort.svg.js +8 -10
- package/dist/assets/icons/default/IconStar.svg.js +7 -9
- package/dist/assets/icons/default/IconSuccess.svg.js +12 -15
- package/dist/assets/icons/default/IconTask.svg.js +20 -24
- package/dist/assets/icons/default/IconTime.svg.js +23 -27
- package/dist/assets/icons/default/IconWarn.svg.js +28 -33
- package/dist/assets/icons/sax/IconAdd.svg.js +9 -11
- package/dist/assets/icons/sax/IconAddCircle.svg.js +9 -11
- package/dist/assets/icons/sax/IconAddSquare.svg.js +9 -11
- package/dist/assets/icons/sax/IconAlarm.svg.js +9 -11
- package/dist/assets/icons/sax/IconArchiveBook.svg.js +18 -21
- package/dist/assets/icons/sax/IconCandle.svg.js +10 -12
- package/dist/assets/icons/sax/IconCelery.svg.js +26 -31
- package/dist/assets/icons/sax/IconChart.svg.js +9 -11
- package/dist/assets/icons/sax/IconCheckCircle.svg.js +16 -19
- package/dist/assets/icons/sax/IconClose.svg.js +9 -11
- package/dist/assets/icons/sax/IconCloseCircle.svg.js +9 -11
- package/dist/assets/icons/sax/IconCopy.svg.js +16 -19
- package/dist/assets/icons/sax/IconCopySuccess.svg.js +23 -27
- package/dist/assets/icons/sax/IconCopyright.svg.js +16 -19
- package/dist/assets/icons/sax/IconDedupe.svg.js +24 -28
- package/dist/assets/icons/sax/IconDojo.svg.js +14 -17
- package/dist/assets/icons/sax/IconEdit.svg.js +7 -9
- package/dist/assets/icons/sax/IconEditCircle.svg.js +24 -28
- package/dist/assets/icons/sax/IconElement.svg.js +9 -11
- package/dist/assets/icons/sax/IconExport.svg.js +9 -11
- package/dist/assets/icons/sax/IconEye.svg.js +16 -19
- package/dist/assets/icons/sax/IconEyeSlash.svg.js +23 -27
- package/dist/assets/icons/sax/IconFilter.svg.js +10 -12
- package/dist/assets/icons/sax/IconFilterRemove.svg.js +26 -30
- package/dist/assets/icons/sax/IconFinding.svg.js +9 -11
- package/dist/assets/icons/sax/IconFolder.svg.js +8 -10
- package/dist/assets/icons/sax/IconFolderCross.svg.js +16 -19
- package/dist/assets/icons/sax/IconJira.svg.js +9 -11
- package/dist/assets/icons/sax/IconKey.svg.js +17 -20
- package/dist/assets/icons/sax/IconKeySquare.svg.js +24 -28
- package/dist/assets/icons/sax/IconLayer.svg.js +23 -27
- package/dist/assets/icons/sax/IconLink.svg.js +10 -13
- package/dist/assets/icons/sax/IconLinkBold.svg.js +6 -8
- package/dist/assets/icons/sax/IconLinkOutline.svg.js +10 -13
- package/dist/assets/icons/sax/IconLogout.svg.js +30 -35
- package/dist/assets/icons/sax/IconMenu.svg.js +8 -10
- package/dist/assets/icons/sax/IconMinusCircle.svg.js +9 -11
- package/dist/assets/icons/sax/IconNegate.svg.js +16 -19
- package/dist/assets/icons/sax/IconNegativeInfo.svg.js +16 -19
- package/dist/assets/icons/sax/IconNote.svg.js +16 -19
- package/dist/assets/icons/sax/IconOutlineCheckCircle.svg.js +16 -19
- package/dist/assets/icons/sax/IconOutlineCloseCircle.svg.js +9 -11
- package/dist/assets/icons/sax/IconOutlineEdit.svg.js +25 -29
- package/dist/assets/icons/sax/IconOutlineFolderAdd.svg.js +16 -19
- package/dist/assets/icons/sax/IconOutlineRefresh.svg.js +9 -11
- package/dist/assets/icons/sax/IconOutlineStar.svg.js +9 -11
- package/dist/assets/icons/sax/IconPaste.svg.js +25 -29
- package/dist/assets/icons/sax/IconProfile.svg.js +16 -19
- package/dist/assets/icons/sax/IconRadar.svg.js +9 -11
- package/dist/assets/icons/sax/IconRefresh.svg.js +9 -11
- package/dist/assets/icons/sax/IconSearch.svg.js +9 -11
- package/dist/assets/icons/sax/IconSettings.svg.js +18 -21
- package/dist/assets/icons/sax/IconSlash.svg.js +10 -12
- package/dist/assets/icons/sax/IconStar.svg.js +9 -11
- package/dist/assets/icons/sax/IconSummary.svg.js +16 -19
- package/dist/assets/icons/sax/IconTag.svg.js +15 -18
- package/dist/assets/icons/sax/IconTask.svg.js +9 -11
- package/dist/assets/icons/sax/IconTime.svg.js +9 -11
- package/dist/assets/icons/sax/IconTrash.svg.js +9 -11
- package/dist/assets/icons/sax/IconUser.svg.js +9 -11
- package/dist/assets/icons/sax/IconVersionControl.svg.js +9 -11
- package/dist/assets/icons/sax/IconWeight.svg.js +16 -19
- package/dist/components/ActionsBar/WActionsBar.vue.d.ts +9 -129
- package/dist/components/ActionsBar/WActionsBar.vue.d.ts.map +1 -1
- package/dist/components/ActionsBar/WActionsBar.vue.js +7 -8
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts +25 -23
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts.map +1 -1
- package/dist/components/BottomSheet/WBottomSheet.vue.js +1 -2
- package/dist/components/Button/WButton.vue.d.ts +14 -41
- package/dist/components/Button/WButton.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonAction.vue.d.ts +14 -39
- package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonCopy.vue.d.ts +3 -12
- package/dist/components/Button/WButtonCopy.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonDropdown.vue.d.ts +11 -32
- package/dist/components/Button/WButtonDropdown.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonGroup.vue.d.ts +13 -13
- package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonGroup.vue.js +12 -4
- package/dist/components/Button/WButtonMore.vue.d.ts +10 -14
- package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonMoreItem.vue.d.ts +11 -34
- package/dist/components/Button/WButtonMoreItem.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue.d.ts +22 -40
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -1
- package/dist/components/Button/WButtonSelection.vue.js +5 -6
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts +6 -15
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts.map +1 -1
- package/dist/components/Button/models/semanticTypeStylesMap.d.ts +0 -1
- package/dist/components/Button/types.d.ts +17 -7
- package/dist/components/Button/types.d.ts.map +1 -1
- package/dist/components/Checkbox/WCheckbox.vue.d.ts +16 -18
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -1
- package/dist/components/Chip/WChip.vue.d.ts +10 -15
- package/dist/components/Chip/WChip.vue.d.ts.map +1 -1
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts +13 -6
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts.map +1 -1
- package/dist/components/Counter/WCounter.vue.d.ts +4 -25
- package/dist/components/Counter/WCounter.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +6 -16
- package/dist/components/DatePicker/WDatePicker.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +6 -15
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts +7 -17
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts +7 -17
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts +7 -16
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts +6 -15
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts.map +1 -1
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts +7 -17
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/WDropdown.vue.d.ts +18 -21
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -1
- package/dist/components/Dropdown/types.d.ts +0 -1
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts +0 -1
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +88 -24
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -1
- package/dist/components/DropdownMenu/types.d.ts +0 -1
- package/dist/components/Expansion/WExpansion.vue.d.ts +11 -29
- package/dist/components/Expansion/WExpansion.vue.d.ts.map +1 -1
- package/dist/components/Expansion/WExpansionItem.vue.d.ts +13 -17
- package/dist/components/Expansion/WExpansionItem.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +25 -28
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -1
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +19 -18
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +25 -26
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/WFilePicker.vue.js +10 -12
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts +14 -18
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts.map +1 -1
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts +3 -12
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts.map +1 -1
- package/dist/components/FilterWrapper/WFilterWrapper.vue.d.ts +13 -17
- package/dist/components/FilterWrapper/WFilterWrapper.vue.d.ts.map +1 -1
- package/dist/components/FilterWrapper/WFilterWrapper.vue.js +5 -7
- package/dist/components/Form/WForm.vue.d.ts +15 -19
- package/dist/components/Form/WForm.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.d.ts +20 -22
- package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -1
- package/dist/components/Form/WFormValidator.vue.js +3 -4
- package/dist/components/Form/models/injection.d.ts +0 -1
- package/dist/components/Form/use/useFormErrorMessageMap.d.ts +1 -2
- package/dist/components/Form/use/useFormHasChangesMap.d.ts +0 -1
- package/dist/components/Form/use/useFormInitModelMap.d.ts +0 -1
- package/dist/components/Form/use/useFormInvalidateMap.d.ts +0 -1
- package/dist/components/Form/use/useFormTitleMap.d.ts +0 -1
- package/dist/components/Form/use/useFormValidateMap.d.ts +0 -1
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.d.ts +24 -0
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.d.ts.map +1 -0
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue.js +101 -0
- package/dist/components/FormAsync/WFormAsyncButtonGroup.vue2.js +5 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts +25 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue.d.ts.map +1 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue.js +131 -0
- package/dist/components/FormAsync/WFormAsyncInput.vue2.js +5 -0
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.d.ts +26 -0
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.d.ts.map +1 -0
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue.js +139 -0
- package/dist/components/FormAsync/WFormAsyncSelectSingle.vue2.js +5 -0
- package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts +21 -0
- package/dist/components/FormAsync/WFormAsyncToggle.vue.d.ts.map +1 -0
- package/dist/components/FormAsync/WFormAsyncToggle.vue.js +89 -0
- package/dist/components/FormAsync/WFormAsyncToggle.vue2.js +5 -0
- package/dist/components/FormAsync/types.d.ts +84 -0
- package/dist/components/FormAsync/types.d.ts.map +1 -0
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +21 -36
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -1
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts +3 -12
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts.map +1 -1
- package/dist/components/ImageViewer/WImageViewer.vue.js +3 -4
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts +6 -15
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +16 -16
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +13 -13
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/EmptyComponent.vue.d.ts +8 -3
- package/dist/components/InfiniteList/components/EmptyComponent.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts +5 -5
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.js +2 -2
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +8 -30
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +6 -5
- package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts +15 -19
- package/dist/components/InfiniteList/components/InfiniteListPageSelectItem.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +8 -8
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +8 -8
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts +15 -19
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts.map +1 -1
- package/dist/components/InfiniteList/models/injection.d.ts +0 -1
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +5 -5
- package/dist/components/InfiniteList/use/useRefetchNextPages.d.ts +1 -1
- package/dist/components/InfiniteList/use/useSelected.d.ts +0 -1
- package/dist/components/InfoCard/WInfoCard.vue.d.ts +10 -14
- package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -1
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts +10 -15
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts.map +1 -1
- package/dist/components/Input/WInput.vue.d.ts +6 -37
- package/dist/components/Input/WInput.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputAsync.vue.d.ts +9 -10
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputDate.vue.d.ts +21 -41
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputOptions.vue.d.ts +9 -10
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -1
- package/dist/components/Input/WInputSuggest.vue.d.ts +6 -29
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -1
- package/dist/components/Input/components/InputActions.vue.d.ts +17 -21
- package/dist/components/Input/components/InputActions.vue.d.ts.map +1 -1
- package/dist/components/Input/components/InputActionsButton.vue.d.ts +13 -17
- package/dist/components/Input/components/InputActionsButton.vue.d.ts.map +1 -1
- package/dist/components/Input/types.d.ts +0 -1
- package/dist/components/Link/WLink.vue.d.ts +11 -36
- package/dist/components/Link/WLink.vue.d.ts.map +1 -1
- package/dist/components/Link/WLinkArrow.vue.d.ts +8 -13
- package/dist/components/Link/WLinkArrow.vue.d.ts.map +1 -1
- package/dist/components/List/WList.vue.d.ts +9 -10
- package/dist/components/List/WList.vue.d.ts.map +1 -1
- package/dist/components/List/WListCard.vue.d.ts +18 -22
- package/dist/components/List/WListCard.vue.d.ts.map +1 -1
- package/dist/components/List/WListCardField.vue.d.ts +12 -16
- package/dist/components/List/WListCardField.vue.d.ts.map +1 -1
- package/dist/components/List/WListCardField.vue.js +1 -1
- package/dist/components/List/WListHeader.vue.d.ts +13 -17
- package/dist/components/List/WListHeader.vue.d.ts.map +1 -1
- package/dist/components/List/WListHeaderItem.vue.d.ts +5 -6
- package/dist/components/List/WListHeaderItem.vue.d.ts.map +1 -1
- package/dist/components/List/types.d.ts +0 -1
- package/dist/components/MenuItem/WMenuItem.vue.d.ts +10 -31
- 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 +3 -4
- package/dist/components/Modal/WModalStepper.vue.d.ts +80 -24
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -1
- package/dist/components/Modal/WModalStepper.vue.js +8 -8
- package/dist/components/Modal/WModalWrapper.vue.d.ts +13 -17
- package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -1
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts +4 -4
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts.map +1 -1
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts +6 -16
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts.map +1 -1
- package/dist/components/Modal/types.d.ts +0 -1
- package/dist/components/Nav/WNavBar.vue.d.ts +11 -6
- package/dist/components/Nav/WNavBar.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavBar.vue.js +6 -8
- package/dist/components/Nav/WNavItem.vue.d.ts +12 -17
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItem.vue.js +16 -18
- package/dist/components/Nav/WNavItemExpand.vue.d.ts +11 -16
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -1
- package/dist/components/Nav/WNavItemTransition.vue.d.ts +8 -3
- 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/components/NotifyCard.vue.d.ts +6 -32
- package/dist/components/Notify/components/NotifyCard.vue.d.ts.map +1 -1
- package/dist/components/Notify/models/types.d.ts +0 -1
- package/dist/components/Select/WSelect.vue.d.ts +21 -23
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelect.vue.js +48 -38
- package/dist/components/Select/WSelectAsync.vue.d.ts +14 -16
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsync.vue.js +20 -15
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +14 -14
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +10 -14
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectAsyncSingle.vue.js +4 -7
- package/dist/components/Select/WSelectSingle.vue.d.ts +14 -15
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -1
- package/dist/components/Select/WSelectSingle.vue.js +3 -2
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +15 -15
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncList.vue.js +5 -6
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +13 -12
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +2 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +13 -12
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +8 -3
- package/dist/components/Select/components/SelectOption.vue.d.ts +6 -32
- package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts +9 -10
- package/dist/components/Select/components/SelectOptionPrefix.vue.d.ts.map +1 -1
- package/dist/components/Select/components/SelectOptionPrefix.vue.js +3 -1
- package/dist/components/Select/types.d.ts +22 -21
- package/dist/components/Select/types.d.ts.map +1 -1
- 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/Spinner/WSpinner.vue.js +14 -16
- package/dist/components/Tabs/WTabs.vue.d.ts +10 -20
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -1
- package/dist/components/Tabs/WTabs.vue.js +3 -3
- package/dist/components/Tabs/WTabsColumns.vue.d.ts +3 -12
- package/dist/components/Tabs/WTabsColumns.vue.d.ts.map +1 -1
- package/dist/components/Tabs/components/TabItem.vue.d.ts +16 -18
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -1
- package/dist/components/Tabs/models/injection.d.ts +0 -1
- package/dist/components/Toggle/WToggle.vue.d.ts +9 -19
- package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -1
- package/dist/components/Toggle/WToggle.vue.js +3 -1
- package/dist/components/Toggle/types.d.ts +13 -0
- package/dist/components/Toggle/types.d.ts.map +1 -0
- package/dist/components/Tooltip/WTooltip.vue.d.ts +3 -12
- package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -1
- 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/components/TooltipContainer.vue.d.ts +17 -20
- package/dist/components/Tooltip/components/TooltipContainer.vue.d.ts.map +1 -1
- package/dist/imports/componentsPlugin.d.ts +5 -2
- package/dist/imports/componentsPlugin.d.ts.map +1 -1
- package/dist/main.d.ts +3 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +8 -1
- package/dist/types/global.d.ts +98 -11
- package/dist/utils/Modal.d.ts +0 -1
- package/dist/utils/Notify.d.ts +0 -1
- package/dist/utils/Tooltip.d.ts +0 -1
- package/dist/utils/api.d.ts +15 -0
- package/dist/utils/api.d.ts.map +1 -0
- package/dist/utils/api.js +28 -0
- package/dist/utils/useCopy.d.ts +1 -2
- package/dist/utils/useDefaultQuery.d.ts +2 -2
- package/dist/utils/useDefaultQuery.d.ts.map +1 -1
- package/dist/utils/useQueryUpdater.d.ts +11 -0
- package/dist/utils/useQueryUpdater.d.ts.map +1 -0
- package/dist/utils/useQueryUpdater.js +56 -0
- package/dist/utils/utils.d.ts +2 -0
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +13 -1
- package/dist/utils/validate.d.ts +2 -0
- package/dist/utils/validate.d.ts.map +1 -0
- package/dist/utils/validate.js +3 -0
- package/package.json +43 -16
@@ -1,46 +1,20 @@
|
|
1
1
|
import { NotifyType } from '../models/NotifyType';
|
2
2
|
import { LinkProps } from '../../../types/types';
|
3
|
-
|
4
|
-
interface Props extends LinkProps {
|
3
|
+
interface Props extends Partial<LinkProps> {
|
5
4
|
title: string;
|
6
5
|
caption?: string;
|
7
6
|
userInput?: string;
|
8
7
|
type: NotifyType;
|
9
8
|
count: number;
|
10
9
|
}
|
11
|
-
declare const _default: import('vue').DefineComponent<
|
12
|
-
|
13
|
-
|
14
|
-
to: undefined;
|
15
|
-
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
16
|
-
"click:close": () => void;
|
17
|
-
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<Props>, {
|
18
|
-
caption: undefined;
|
19
|
-
userInput: undefined;
|
20
|
-
to: undefined;
|
21
|
-
}>>> & {
|
10
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
11
|
+
"click:close": () => any;
|
12
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
22
13
|
"onClick:close"?: (() => any) | undefined;
|
23
|
-
}
|
14
|
+
}>, {
|
24
15
|
caption: string;
|
25
16
|
to: import('vue-router').RouterLinkProps["to"];
|
26
17
|
userInput: string;
|
27
|
-
}, {}>;
|
18
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
28
19
|
export default _default;
|
29
|
-
type __VLS_WithDefaults<P, D> = {
|
30
|
-
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
|
31
|
-
default: D[K];
|
32
|
-
}> : P[K];
|
33
|
-
};
|
34
|
-
type __VLS_Prettify<T> = {
|
35
|
-
[K in keyof T]: T[K];
|
36
|
-
} & {};
|
37
|
-
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
38
|
-
type __VLS_TypePropsToOption<T> = {
|
39
|
-
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
40
|
-
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
41
|
-
} : {
|
42
|
-
type: import('vue').PropType<T[K]>;
|
43
|
-
required: true;
|
44
|
-
};
|
45
|
-
};
|
46
20
|
//# sourceMappingURL=NotifyCard.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotifyCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/components/NotifyCard.vue"],"names":[],"mappings":"AA6HA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAS/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAI5C,UAAU,KAAM,SAAQ,SAAS;
|
1
|
+
{"version":3,"file":"NotifyCard.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Notify/components/NotifyCard.vue"],"names":[],"mappings":"AA6HA,OAAO,EAAC,UAAU,EAAC,MAAM,sBAAsB,CAAA;AAS/C,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,eAAe,CAAA;AAI5C,UAAU,KAAM,SAAQ,OAAO,CAAC,SAAS,CAAC;IACxC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,UAAU,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;CACd;;;;;;aAJW,MAAM;;eACJ,MAAM;;AAmPpB,wBAUG"}
|
@@ -1,31 +1,29 @@
|
|
1
1
|
import { SelectProps, SelectOptionComponent } from './types';
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
2
|
+
declare const _default: <Model extends number | string, Data extends DefaultData, OptionComponent extends SelectOptionComponent<Data>>(__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<{
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
|
+
readonly onSelect?: ((item: Model) => any) | undefined;
|
5
|
+
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
|
6
|
+
readonly onFocus?: ((value: FocusEvent) => any) | undefined;
|
7
|
+
readonly onUnselect?: ((item: Model) => any) | undefined;
|
8
|
+
readonly "onCreate:option"?: ((value: string) => any) | undefined;
|
9
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
10
|
+
onSelect?: ((item: Model) => any) | undefined;
|
6
11
|
onBlur?: ((value: FocusEvent) => any) | undefined;
|
7
|
-
onSelect?: ((item: Option) => any) | undefined;
|
8
|
-
onUnselect?: ((item: Option) => any) | undefined;
|
9
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
10
|
-
"onCreate:option"?: ((value: string) => any) | undefined;
|
11
|
-
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<import('vue').ExtractPropTypes<{}>> & {
|
12
12
|
onFocus?: ((value: FocusEvent) => any) | undefined;
|
13
|
-
|
14
|
-
onSelect?: ((item: Option) => any) | undefined;
|
15
|
-
onUnselect?: ((item: Option) => any) | undefined;
|
16
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
13
|
+
onUnselect?: ((item: Model) => any) | undefined;
|
17
14
|
"onCreate:option"?: ((value: string) => any) | undefined;
|
18
|
-
}
|
15
|
+
}>, never>, "onFocus" | "onBlur" | "onSelect" | "onUnselect" | "onCreate:option"> & SelectProps<Model, Data, OptionComponent>> & import('vue').PublicProps;
|
19
16
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
20
17
|
focus: () => void;
|
21
18
|
blur: () => void;
|
22
19
|
}>): void;
|
23
20
|
attrs: any;
|
24
|
-
slots:
|
21
|
+
slots: Readonly<{
|
25
22
|
title?: () => void;
|
26
23
|
subtitle?: () => void;
|
27
24
|
option?: (props: {
|
28
|
-
option:
|
25
|
+
option: Data | string;
|
26
|
+
index?: number;
|
29
27
|
selected: boolean;
|
30
28
|
model: boolean;
|
31
29
|
}) => void;
|
@@ -34,27 +32,27 @@ declare const _default: <Option extends string | number, OptionComponent extends
|
|
34
32
|
title?: () => void;
|
35
33
|
subtitle?: () => void;
|
36
34
|
option?: (props: {
|
37
|
-
option:
|
35
|
+
option: Data | string;
|
36
|
+
index?: number;
|
38
37
|
selected: boolean;
|
39
38
|
model: boolean;
|
40
39
|
}) => void;
|
41
40
|
right?: () => void;
|
42
|
-
}
|
41
|
+
};
|
43
42
|
emit: {
|
44
|
-
(e: "select", item:
|
45
|
-
(e: "unselect", item:
|
46
|
-
(e: "update:search", value: string): void;
|
43
|
+
(e: "select", item: Model): void;
|
44
|
+
(e: "unselect", item: Model): void;
|
47
45
|
(e: "create:option", value: string): void;
|
48
46
|
(e: "focus", value: FocusEvent): void;
|
49
47
|
(e: "blur", value: FocusEvent): void;
|
50
|
-
}
|
48
|
+
};
|
51
49
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
52
50
|
[key: string]: any;
|
53
51
|
}> & {
|
54
52
|
__ctx?: Awaited<typeof __VLS_setup>;
|
55
53
|
};
|
56
54
|
export default _default;
|
57
|
-
type
|
55
|
+
type __VLS_PrettifyLocal<T> = {
|
58
56
|
[K in keyof T]: T[K];
|
59
57
|
} & {};
|
60
58
|
//# sourceMappingURL=WSelect.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelect.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelect.vue"],"names":[],"mappings":"AAgVA,OAAO,KAAK,EAAC,WAAW,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAG1E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC/G,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA0lBxD,mBAAmB,CAAC;;;;;;;;;;;;iIAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBApbH,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;YACrB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;SACf,KAAK,IAAI;gBACF,MAAM,IAAI;;gBARV,MAAM,IAAI;mBACP,MAAM,IAAI;iBACZ,CAAC,KAAK,EAAE;YACf,MAAM,EAAE,IAAI,GAAG,MAAM,CAAA;YACrB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,QAAQ,EAAE,OAAO,CAAA;YACjB,KAAK,EAAE,OAAO,CAAA;SACf,KAAK,IAAI;gBACF,MAAM,IAAI;;;YAvKd,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,eAAe,SAAS,MAAM,GAAG,IAAI;YACrC,OAAO,SAAS,UAAU,GAAG,IAAI;YACjC,MAAM,SAAS,UAAU,GAAG,IAAI;;;;;YAolBM,OAAO,CAAC,OAAO,WAAW,CAAC;;AApmBvE,wBAomB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -10,14 +10,14 @@ const _hoisted_1 = {
|
|
10
10
|
class: "py-2 px-[1.0625rem] first:pt-4 last:pb-4"
|
11
11
|
};
|
12
12
|
const _hoisted_2 = { class: "select-none cursor-default w-select-field sm-not:px-3" };
|
13
|
-
const _hoisted_3 = /* @__PURE__ */ createElementVNode("span", { class: "w-select-field pr-2 sm-not:px-3" }, " Create: ", -1);
|
14
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
15
14
|
...{ inheritAttrs: false },
|
16
15
|
__name: "WSelect",
|
17
16
|
props: {
|
18
17
|
modelValue: {},
|
19
|
-
|
20
|
-
|
18
|
+
useQueryFnOptions: {},
|
19
|
+
valueGetter: { type: Function },
|
20
|
+
searchFn: { type: Function },
|
21
21
|
emptyStub: {},
|
22
22
|
disableClear: { type: Boolean },
|
23
23
|
hidePrefix: { type: Boolean },
|
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
62
62
|
optionComponent: {},
|
63
63
|
optionComponentProps: {}
|
64
64
|
},
|
65
|
-
emits: ["select", "unselect", "
|
65
|
+
emits: ["select", "unselect", "create:option", "focus", "blur"],
|
66
66
|
setup(__props, { expose: __expose, emit: __emit }) {
|
67
67
|
const props = __props;
|
68
68
|
const emit = __emit;
|
@@ -70,11 +70,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
70
70
|
const input = ref();
|
71
71
|
const cursor = ref(-1);
|
72
72
|
const isCursorLocked = ref(false);
|
73
|
-
const
|
73
|
+
const search = ref("");
|
74
|
+
const { data, isLoading } = props.useQueryFnOptions();
|
75
|
+
const filteredOptions = computed(() => !data.value ? [] : search.value === "" ? data.value : data.value.filter((option) => props.searchFn(option, search.value)));
|
76
|
+
const lastIndex = computed(() => props.allowCreate ? filteredOptions.value.length : filteredOptions.value.length - 1);
|
74
77
|
const isMobile = getIsMobile();
|
75
78
|
const focused = ref(false);
|
76
79
|
const loadingOptionIndex = ref(null);
|
77
80
|
const isDisabled = computed(() => props.loading || props.readonly || props.disabled);
|
81
|
+
const prefixList = computed(() => props.modelValue.map((value) => data.value?.find((item) => props.valueGetter(item) === value)).filter((item) => item !== void 0));
|
78
82
|
const close = () => {
|
79
83
|
isOpen.value = false;
|
80
84
|
focused.value = false;
|
@@ -97,27 +101,27 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
97
101
|
const cursorUp = () => {
|
98
102
|
if (isDisabled.value) return;
|
99
103
|
lockCursor();
|
100
|
-
cursor.value = !
|
104
|
+
cursor.value = !filteredOptions.value.length ? 0 : cursor.value < 1 ? lastIndex.value : cursor.value - 1;
|
101
105
|
};
|
102
106
|
const cursorDown = () => {
|
103
107
|
if (isDisabled.value) return;
|
104
108
|
lockCursor();
|
105
|
-
cursor.value = !
|
109
|
+
cursor.value = !filteredOptions.value.length ? 0 : cursor.value >= lastIndex.value ? 0 : cursor.value + 1;
|
106
110
|
};
|
107
111
|
const selectCursor = () => {
|
108
112
|
if (isDisabled.value) return;
|
109
|
-
const value = cursor.value !== -1 ? props.
|
113
|
+
const value = cursor.value !== -1 ? props.valueGetter(filteredOptions.value[cursor.value]) : void 0;
|
110
114
|
if (value) {
|
111
115
|
setLoadingOptionIndex(cursor.value);
|
112
116
|
if (props.modelValue.includes(value)) unselect(value);
|
113
117
|
else select(value);
|
114
118
|
} else {
|
115
|
-
if (
|
119
|
+
if (search.value) createOption(search.value);
|
116
120
|
}
|
117
121
|
};
|
118
122
|
let deletePressTimeout = null;
|
119
123
|
const captureDoubleDelete = () => {
|
120
|
-
if (!props.modelValue.length ||
|
124
|
+
if (!props.modelValue.length || search.value.length) return;
|
121
125
|
if (deletePressTimeout) {
|
122
126
|
unselect(props.modelValue[props.modelValue.length - 1]);
|
123
127
|
clearTimeout(deletePressTimeout);
|
@@ -131,16 +135,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
131
135
|
const select = (item) => {
|
132
136
|
if (isDisabled.value) return;
|
133
137
|
emit("select", item);
|
138
|
+
search.value = "";
|
134
139
|
};
|
135
140
|
const unselect = (item) => {
|
136
141
|
if (isDisabled.value) return;
|
137
142
|
emit("unselect", item);
|
143
|
+
search.value = "";
|
138
144
|
};
|
139
145
|
const createOption = (item) => {
|
140
146
|
if (isDisabled.value) return;
|
141
147
|
if (!props.allowCreate) return;
|
142
|
-
setLoadingOptionIndex(
|
148
|
+
setLoadingOptionIndex(filteredOptions.value.length);
|
143
149
|
emit("create:option", item);
|
150
|
+
search.value = "";
|
144
151
|
};
|
145
152
|
const focus = () => {
|
146
153
|
input.value?.focus();
|
@@ -162,11 +169,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
162
169
|
ref: input
|
163
170
|
}, {
|
164
171
|
...props,
|
165
|
-
modelValue:
|
166
|
-
hideInput: _ctx.modelValue.length === 0 ? false : unref(isMobile) ? !focused.value : !isOpen.value
|
172
|
+
modelValue: search.value,
|
173
|
+
hideInput: _ctx.modelValue.length === 0 ? false : unref(isMobile) ? !focused.value : !isOpen.value,
|
174
|
+
loading: _ctx.loading || unref(isLoading)
|
167
175
|
}, {
|
168
176
|
class: _ctx.$attrs.class,
|
169
|
-
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !_ctx.loading &&
|
177
|
+
"onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => !_ctx.loading && !unref(isLoading) && (search.value = $event ?? "")),
|
170
178
|
"onKeypress:enter": withModifiers(selectCursor, ["stop", "prevent"]),
|
171
179
|
"onKeypress:up": withModifiers(cursorUp, ["prevent"]),
|
172
180
|
"onKeypress:down": withModifiers(cursorDown, ["prevent"]),
|
@@ -174,7 +182,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
174
182
|
onOpen: _cache[3] || (_cache[3] = ($event) => isOpen.value = true),
|
175
183
|
onClose: _cache[4] || (_cache[4] = ($event) => {
|
176
184
|
close();
|
177
|
-
|
185
|
+
search.value = "";
|
178
186
|
}),
|
179
187
|
onFocus: _cache[5] || (_cache[5] = ($event) => {
|
180
188
|
focused.value = true;
|
@@ -186,47 +194,49 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
186
194
|
})
|
187
195
|
}), createSlots({
|
188
196
|
prefix: withCtx(({ unclickable }) => [
|
189
|
-
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(
|
197
|
+
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(prefixList.value, (option, index) => {
|
190
198
|
return openBlock(), createBlock(_sfc_main$2, {
|
191
|
-
key: option,
|
199
|
+
key: _ctx.valueGetter(option),
|
192
200
|
option,
|
193
201
|
"option-component": _ctx.optionComponent,
|
194
202
|
"option-component-props": _ctx.optionComponentProps,
|
195
|
-
|
203
|
+
index,
|
204
|
+
loading: _ctx.loading || unref(isLoading),
|
196
205
|
disabled: _ctx.disabled,
|
197
206
|
"disable-clear": _ctx.disableClear,
|
198
|
-
onUnselect: ($event) => unselect(option)
|
207
|
+
onUnselect: ($event) => unselect(_ctx.valueGetter(option))
|
199
208
|
}, {
|
200
209
|
option: withCtx(() => [
|
201
210
|
renderSlot(_ctx.$slots, "option", {
|
202
211
|
option,
|
203
212
|
selected: true,
|
204
|
-
model: true
|
213
|
+
model: true,
|
214
|
+
index
|
205
215
|
})
|
206
216
|
]),
|
207
217
|
_: 2
|
208
|
-
}, 1032, ["option", "option-component", "option-component-props", "loading", "disabled", "disable-clear", "onUnselect"]);
|
218
|
+
}, 1032, ["option", "option-component", "option-component-props", "index", "loading", "disabled", "disable-clear", "onUnselect"]);
|
209
219
|
}), 128)) : createCommentVNode("", true)
|
210
220
|
]),
|
211
221
|
content: withCtx(() => [
|
212
|
-
!
|
222
|
+
!filteredOptions.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
213
223
|
createElementVNode("div", _hoisted_2, toDisplayString(_ctx.emptyStub ?? "No match"), 1)
|
214
224
|
])) : createCommentVNode("", true),
|
215
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
225
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredOptions.value, (option, index) => {
|
216
226
|
return openBlock(), createBlock(_sfc_main$3, {
|
217
|
-
key: option,
|
218
|
-
"is-selected": _ctx.modelValue.includes(option),
|
227
|
+
key: _ctx.valueGetter(option),
|
228
|
+
"is-selected": _ctx.modelValue.includes(_ctx.valueGetter(option)),
|
219
229
|
"is-cursor": index === cursor.value,
|
220
230
|
loading: loadingOptionIndex.value === index && _ctx.loading,
|
221
231
|
scroll: isCursorLocked.value,
|
222
232
|
"hide-option-icon": _ctx.hideOptionIcon,
|
223
233
|
class: "first:pt-4 last:pb-4",
|
224
234
|
onSelect: ($event) => {
|
225
|
-
select(option);
|
235
|
+
select(_ctx.valueGetter(option));
|
226
236
|
setLoadingOptionIndex(index);
|
227
237
|
},
|
228
238
|
onUnselect: ($event) => {
|
229
|
-
unselect(option);
|
239
|
+
unselect(_ctx.valueGetter(option));
|
230
240
|
setLoadingOptionIndex(index);
|
231
241
|
},
|
232
242
|
onMouseenter: ($event) => setCursor(index)
|
@@ -237,7 +247,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
237
247
|
selected,
|
238
248
|
model: false
|
239
249
|
}, () => [
|
240
|
-
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps(_ctx.optionComponentProps, {
|
250
|
+
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps({ ref_for: true }, _ctx.optionComponentProps, {
|
241
251
|
option,
|
242
252
|
selected,
|
243
253
|
model: false
|
@@ -247,28 +257,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
247
257
|
_: 2
|
248
258
|
}, 1032, ["is-selected", "is-cursor", "loading", "scroll", "hide-option-icon", "onSelect", "onUnselect", "onMouseenter"]);
|
249
259
|
}), 128)),
|
250
|
-
_ctx.allowCreate &&
|
260
|
+
_ctx.allowCreate && search.value !== "" ? (openBlock(), createBlock(_sfc_main$3, {
|
251
261
|
key: 1,
|
252
262
|
"is-selected": false,
|
253
|
-
"is-cursor": cursor.value ===
|
254
|
-
loading: loadingOptionIndex.value ===
|
263
|
+
"is-cursor": cursor.value === filteredOptions.value.length,
|
264
|
+
loading: loadingOptionIndex.value === filteredOptions.value.length && _ctx.loading,
|
255
265
|
scroll: isCursorLocked.value,
|
256
266
|
"hide-option-icon": _ctx.hideOptionIcon,
|
257
267
|
class: "first:pt-4 last:pb-4",
|
258
|
-
onSelect: _cache[0] || (_cache[0] = ($event) => createOption(
|
259
|
-
onMouseenter: _cache[1] || (_cache[1] = ($event) => setCursor(
|
268
|
+
onSelect: _cache[0] || (_cache[0] = ($event) => createOption(search.value)),
|
269
|
+
onMouseenter: _cache[1] || (_cache[1] = ($event) => setCursor(filteredOptions.value.length))
|
260
270
|
}, {
|
261
|
-
prefix: withCtx(() => [
|
262
|
-
|
263
|
-
]),
|
271
|
+
prefix: withCtx(() => _cache[7] || (_cache[7] = [
|
272
|
+
createElementVNode("span", { class: "w-select-field pr-2 sm-not:px-3" }, " Create: ", -1)
|
273
|
+
])),
|
264
274
|
default: withCtx(() => [
|
265
275
|
renderSlot(_ctx.$slots, "option", {
|
266
|
-
option:
|
276
|
+
option: search.value,
|
267
277
|
selected: false,
|
268
278
|
model: false
|
269
279
|
}, () => [
|
270
280
|
(openBlock(), createBlock(resolveDynamicComponent(_ctx.optionComponent), mergeProps(_ctx.optionComponentProps, {
|
271
|
-
option:
|
281
|
+
option: search.value,
|
272
282
|
selected: false,
|
273
283
|
model: false
|
274
284
|
}), null, 16, ["option"]))
|
@@ -1,30 +1,28 @@
|
|
1
1
|
import { SelectAsyncProps, SelectOptionComponent } from './types';
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
declare const _default: <Model extends number | string, Data extends DefaultData, QueryParams, OptionComponent extends SelectOptionComponent<Data>>(__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<{
|
3
|
+
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
4
|
+
readonly onSelect?: ((item: Model) => any) | undefined;
|
5
|
+
readonly "onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
|
6
|
+
readonly onUnselect?: ((item: Model) => any) | undefined;
|
7
|
+
readonly "onCreate:option"?: ((value: string) => any) | undefined;
|
8
|
+
} & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & Readonly<{}> & Readonly<{
|
5
9
|
onSelect?: ((item: Model) => any) | undefined;
|
6
10
|
"onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
|
7
11
|
onUnselect?: ((item: Model) => any) | undefined;
|
8
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
9
12
|
"onCreate:option"?: ((value: string) => any) | undefined;
|
10
|
-
}
|
11
|
-
onSelect?: ((item: Model) => any) | undefined;
|
12
|
-
"onUpdate:modelValue"?: ((value: Model[]) => any) | undefined;
|
13
|
-
onUnselect?: ((item: Model) => any) | undefined;
|
14
|
-
"onUpdate:search"?: ((value: string) => any) | undefined;
|
15
|
-
"onCreate:option"?: ((value: string) => any) | undefined;
|
16
|
-
}, never>, "onSelect" | "onUpdate:modelValue" | "onUnselect" | "onUpdate:search" | "onCreate:option"> & SelectAsyncProps<Model, Data, ApiError, QueryParams, OptionComponent>> & import('vue').PublicProps;
|
13
|
+
}>, never>, "onSelect" | "onUpdate:modelValue" | "onUnselect" | "onCreate:option"> & SelectAsyncProps<Model, Data, QueryParams, OptionComponent>> & import('vue').PublicProps;
|
17
14
|
expose(exposed: import('vue').ShallowUnwrapRef<{
|
18
15
|
focus: () => void;
|
19
16
|
blur: () => void;
|
20
17
|
}>): void;
|
21
18
|
attrs: any;
|
22
|
-
slots:
|
19
|
+
slots: Readonly<{
|
23
20
|
title?: () => void;
|
24
21
|
subtitle?: () => void;
|
25
22
|
right?: (props: Record<string, never>) => void;
|
26
23
|
option?: (props: {
|
27
24
|
option: Data | null;
|
25
|
+
index?: number;
|
28
26
|
selected: boolean;
|
29
27
|
skeleton: boolean;
|
30
28
|
model: boolean;
|
@@ -35,25 +33,25 @@ declare const _default: <Model extends number | string, Data extends DefaultData
|
|
35
33
|
right?: (props: Record<string, never>) => void;
|
36
34
|
option?: (props: {
|
37
35
|
option: Data | null;
|
36
|
+
index?: number;
|
38
37
|
selected: boolean;
|
39
38
|
skeleton: boolean;
|
40
39
|
model: boolean;
|
41
40
|
}) => void;
|
42
|
-
}
|
41
|
+
};
|
43
42
|
emit: {
|
44
43
|
(e: "select", item: Model): void;
|
45
44
|
(e: "unselect", item: Model): void;
|
46
|
-
(e: "update:search", value: string): void;
|
47
45
|
(e: "update:modelValue", value: Model[]): void;
|
48
46
|
(e: "create:option", value: string): void;
|
49
|
-
}
|
47
|
+
};
|
50
48
|
}>) => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
51
49
|
[key: string]: any;
|
52
50
|
}> & {
|
53
51
|
__ctx?: Awaited<typeof __VLS_setup>;
|
54
52
|
};
|
55
53
|
export default _default;
|
56
|
-
type
|
54
|
+
type __VLS_PrettifyLocal<T> = {
|
57
55
|
[K in keyof T]: T[K];
|
58
56
|
} & {};
|
59
57
|
//# sourceMappingURL=WSelectAsync.vue.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"WSelectAsync.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Select/WSelectAsync.vue"],"names":[],"mappings":"AAiPA,OAAO,KAAK,EAAC,gBAAgB,EAAE,qBAAqB,EAA6B,MAAM,SAAS,CAAA;yBAG/E,KAAK,SAAS,MAAM,GAAG,MAAM,EAAE,IAAI,SAAS,WAAW,EAAE,WAAW,EAAE,eAAe,SAAS,qBAAqB,CAAC,IAAI,CAAC,eAC5H,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,cAClD,mBAAmB,CAAC,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC,iBAC5F,WAAW,CAAC,OAAO,CAAC,OAAO,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC;WA8fxD,mBAAmB,CAAC;;;;;;;;;;oJAAyD,CAAC,4BAA2B;oBAChG,OAAO,KAAK,EAAE,gBAAgB;;;MAAsB,GAAG,IAAI;WACpE,GAAG;;gBAlZH,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;gBAH7G,MAAM,IAAI;mBACP,MAAM,IAAI;gBACb,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,KAAK,IAAI;iBACrC,CAAC,KAAK,EAAE;YAAC,MAAM,EAAE,IAAI,GAAG,IAAI,CAAC;YAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,QAAQ,EAAE,OAAO,CAAC;YAAC,KAAK,EAAE,OAAO,CAAA;SAAC,KAAK,IAAI;;;YAjGjH,QAAQ,QAAQ,KAAK,GAAG,IAAI;YAC5B,UAAU,QAAQ,KAAK,GAAG,IAAI;YAC9B,mBAAmB,SAAS,KAAK,EAAE,GAAG,IAAI;YAC1C,eAAe,SAAS,MAAM,GAAG,IAAI;;;;;YAkfC,OAAO,CAAC,OAAO,WAAW,CAAC;;AAxgBvE,wBAwgB4E;AAC5E,KAAK,mBAAmB,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
|
@@ -8,17 +8,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
8
|
...{ inheritAttrs: false },
|
9
9
|
__name: "WSelectAsync",
|
10
10
|
props: {
|
11
|
-
|
11
|
+
useQueryFnOptions: {},
|
12
12
|
useQueryFnPrefix: {},
|
13
13
|
isInvalidPage: {},
|
14
14
|
queryParams: {},
|
15
15
|
previewData: {},
|
16
16
|
createdData: {},
|
17
|
-
valueGetter: { type: Function, default: (data) => data.id },
|
18
17
|
valueQueryKey: { default: "id__in" },
|
19
18
|
queryOptions: {},
|
20
19
|
modelValue: {},
|
21
|
-
|
20
|
+
valueGetter: { type: Function, default: (data) => data.id },
|
22
21
|
emptyStub: { default: "No match" },
|
23
22
|
disableClear: { type: Boolean },
|
24
23
|
hidePrefix: { type: Boolean },
|
@@ -63,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
63
62
|
optionComponent: {},
|
64
63
|
optionComponentProps: {}
|
65
64
|
},
|
66
|
-
emits: ["select", "unselect", "update:
|
65
|
+
emits: ["select", "unselect", "update:modelValue", "create:option"],
|
67
66
|
setup(__props, { expose: __expose, emit: __emit }) {
|
68
67
|
const props = __props;
|
69
68
|
const emit = __emit;
|
@@ -73,6 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
73
72
|
const isMobile = getIsMobile();
|
74
73
|
const focused = ref(false);
|
75
74
|
const isFetchingPrefix = ref(false);
|
75
|
+
const search = ref("");
|
76
76
|
const isDisabled = computed(() => props.loading || props.readonly || props.disabled);
|
77
77
|
const close = () => {
|
78
78
|
isOpen.value = false;
|
@@ -80,7 +80,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
80
80
|
};
|
81
81
|
let deletePressTimeout = null;
|
82
82
|
const captureDoubleDelete = () => {
|
83
|
-
if (!props.modelValue.length ||
|
83
|
+
if (!props.modelValue.length || search.value.length) return;
|
84
84
|
if (deletePressTimeout) {
|
85
85
|
unselect(props.modelValue[props.modelValue.length - 1]);
|
86
86
|
clearTimeout(deletePressTimeout);
|
@@ -94,18 +94,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
94
94
|
const select = (item) => {
|
95
95
|
if (isDisabled.value) return;
|
96
96
|
emit("select", item);
|
97
|
+
search.value = "";
|
97
98
|
};
|
98
99
|
const unselect = (item) => {
|
99
100
|
if (isDisabled.value) return;
|
100
101
|
emit("unselect", item);
|
102
|
+
search.value = "";
|
101
103
|
};
|
102
104
|
const create = () => {
|
103
105
|
if (isDisabled.value) return;
|
104
|
-
emit("create:option",
|
106
|
+
emit("create:option", search.value);
|
107
|
+
search.value = "";
|
105
108
|
};
|
106
109
|
const updateSelected = (value) => {
|
107
110
|
if (isDisabled.value) return;
|
108
111
|
emit("update:modelValue", value);
|
112
|
+
search.value = "";
|
109
113
|
};
|
110
114
|
const focus = () => {
|
111
115
|
input.value?.focus();
|
@@ -127,12 +131,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
127
131
|
ref: input
|
128
132
|
}, {
|
129
133
|
...props,
|
130
|
-
modelValue:
|
134
|
+
modelValue: search.value,
|
131
135
|
loading: _ctx.loading || isFetchingPrefix.value,
|
132
136
|
hideInput: unref(isMobile) ? !focused.value : !isOpen.value
|
133
137
|
}, {
|
134
138
|
class: _ctx.$attrs.class,
|
135
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => !_ctx.loading && !isFetchingPrefix.value &&
|
139
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => !_ctx.loading && !isFetchingPrefix.value && (search.value = $event ?? "")),
|
136
140
|
"onKeypress:enter": _cache[2] || (_cache[2] = withModifiers(($event) => list.value?.selectCursor(), ["stop", "prevent"])),
|
137
141
|
"onKeypress:up": _cache[3] || (_cache[3] = withModifiers(($event) => list.value?.cursorUp(), ["prevent"])),
|
138
142
|
"onKeypress:down": _cache[4] || (_cache[4] = withModifiers(($event) => list.value?.cursorDown(), ["prevent"])),
|
@@ -140,7 +144,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
140
144
|
onOpen: _cache[5] || (_cache[5] = ($event) => isOpen.value = true),
|
141
145
|
onClose: _cache[6] || (_cache[6] = ($event) => {
|
142
146
|
close();
|
143
|
-
|
147
|
+
search.value = "";
|
144
148
|
}),
|
145
149
|
onFocus: _cache[7] || (_cache[7] = ($event) => focused.value = true),
|
146
150
|
onBlur: _cache[8] || (_cache[8] = ($event) => focused.value = false)
|
@@ -148,7 +152,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
148
152
|
prefix: withCtx(({ unclickable }) => [
|
149
153
|
(_ctx.hidePrefix ? unref(isMobile) ? unclickable || !focused.value : !isOpen.value : true) ? (openBlock(), createBlock(_sfc_main$2, {
|
150
154
|
key: 0,
|
151
|
-
"use-query-fn": _ctx.useQueryFnPrefix ?? _ctx.
|
155
|
+
"use-query-fn": _ctx.useQueryFnPrefix ?? _ctx.useQueryFnOptions,
|
152
156
|
"model-value": _ctx.modelValue,
|
153
157
|
disabled: _ctx.disabled,
|
154
158
|
loading: _ctx.loading || isFetchingPrefix.value,
|
@@ -166,9 +170,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
166
170
|
}),
|
167
171
|
"onUpdate:modelValue": updateSelected
|
168
172
|
}, {
|
169
|
-
default: withCtx(({ option, skeleton: skeletonPrefix }) => [
|
173
|
+
default: withCtx(({ option, skeleton: skeletonPrefix, index }) => [
|
170
174
|
renderSlot(_ctx.$slots, "option", {
|
171
175
|
option,
|
176
|
+
index,
|
172
177
|
selected: true,
|
173
178
|
model: true,
|
174
179
|
skeleton: skeletonPrefix
|
@@ -182,13 +187,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
182
187
|
ref_key: "list",
|
183
188
|
ref: list,
|
184
189
|
"model-value": _ctx.modelValue,
|
185
|
-
"use-query-fn": _ctx.
|
186
|
-
"query-params": _ctx.queryParams,
|
190
|
+
"use-query-fn": _ctx.useQueryFnOptions,
|
191
|
+
"query-params": { ..._ctx.queryParams, search: search.value },
|
187
192
|
"is-invalid-page": _ctx.isInvalidPage,
|
188
193
|
loading: _ctx.loading || isFetchingPrefix.value,
|
189
194
|
disabled: isDisabled.value,
|
190
195
|
"empty-stub": _ctx.emptyStub,
|
191
|
-
"allow-create": _ctx.allowCreate &&
|
196
|
+
"allow-create": _ctx.allowCreate && search.value !== "",
|
192
197
|
"hide-option-icon": _ctx.hideOptionIcon,
|
193
198
|
"value-getter": _ctx.valueGetter,
|
194
199
|
"query-options": _ctx.queryOptions,
|
@@ -209,7 +214,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
209
214
|
selected,
|
210
215
|
skeleton: skeletonList,
|
211
216
|
model: false,
|
212
|
-
search:
|
217
|
+
search: search.value
|
213
218
|
}), null, 16, ["option", "selected", "skeleton", "search"]))
|
214
219
|
])
|
215
220
|
]),
|