eco-vue-js 0.3.67
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +21 -0
- package/README.md +69 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/icons/default/IconAdd.svg.js +30 -0
- package/dist/assets/icons/default/IconArrow.svg.js +23 -0
- package/dist/assets/icons/default/IconAvatar.svg.js +20 -0
- package/dist/assets/icons/default/IconBack.svg.js +44 -0
- package/dist/assets/icons/default/IconCancel.svg.js +24 -0
- package/dist/assets/icons/default/IconCheck.svg.js +23 -0
- package/dist/assets/icons/default/IconDanger.svg.js +35 -0
- package/dist/assets/icons/default/IconDojo.svg.js +32 -0
- package/dist/assets/icons/default/IconEdit.svg.js +33 -0
- package/dist/assets/icons/default/IconFalsePositive.svg.js +31 -0
- package/dist/assets/icons/default/IconFeedback.svg.js +44 -0
- package/dist/assets/icons/default/IconFilter.svg.js +25 -0
- package/dist/assets/icons/default/IconInProgress.svg.js +30 -0
- package/dist/assets/icons/default/IconJira.svg.js +20 -0
- package/dist/assets/icons/default/IconLogout.svg.js +20 -0
- package/dist/assets/icons/default/IconMore.svg.js +39 -0
- package/dist/assets/icons/default/IconNotification.svg.js +25 -0
- package/dist/assets/icons/default/IconProfile.svg.js +37 -0
- package/dist/assets/icons/default/IconSearch.svg.js +23 -0
- package/dist/assets/icons/default/IconSettings.svg.js +34 -0
- package/dist/assets/icons/default/IconSort.svg.js +25 -0
- package/dist/assets/icons/default/IconStar.svg.js +24 -0
- package/dist/assets/icons/default/IconSuccess.svg.js +30 -0
- package/dist/assets/icons/default/IconTask.svg.js +39 -0
- package/dist/assets/icons/default/IconTime.svg.js +42 -0
- package/dist/assets/icons/default/IconWarn.svg.js +48 -0
- package/dist/assets/icons/sax/IconAdd.svg.js +26 -0
- package/dist/assets/icons/sax/IconAddCircle.svg.js +26 -0
- package/dist/assets/icons/sax/IconAddSquare.svg.js +26 -0
- package/dist/assets/icons/sax/IconAlarm.svg.js +26 -0
- package/dist/assets/icons/sax/IconArchiveBook.svg.js +36 -0
- package/dist/assets/icons/sax/IconCandle.svg.js +27 -0
- package/dist/assets/icons/sax/IconCelery.svg.js +46 -0
- package/dist/assets/icons/sax/IconChart.svg.js +26 -0
- package/dist/assets/icons/sax/IconCheckCircle.svg.js +34 -0
- package/dist/assets/icons/sax/IconCloseCircle.svg.js +26 -0
- package/dist/assets/icons/sax/IconCopy.svg.js +34 -0
- package/dist/assets/icons/sax/IconCopySuccess.svg.js +42 -0
- package/dist/assets/icons/sax/IconCopyright.svg.js +34 -0
- package/dist/assets/icons/sax/IconDedupe.svg.js +43 -0
- package/dist/assets/icons/sax/IconDojo.svg.js +32 -0
- package/dist/assets/icons/sax/IconEditCircle.svg.js +43 -0
- package/dist/assets/icons/sax/IconElement.svg.js +26 -0
- package/dist/assets/icons/sax/IconExport.svg.js +26 -0
- package/dist/assets/icons/sax/IconEye.svg.js +34 -0
- package/dist/assets/icons/sax/IconEyeSlash.svg.js +42 -0
- package/dist/assets/icons/sax/IconFilter.svg.js +27 -0
- package/dist/assets/icons/sax/IconFinding.svg.js +26 -0
- package/dist/assets/icons/sax/IconFolder.svg.js +25 -0
- package/dist/assets/icons/sax/IconFolderCross.svg.js +34 -0
- package/dist/assets/icons/sax/IconJira.svg.js +26 -0
- package/dist/assets/icons/sax/IconKey.svg.js +35 -0
- package/dist/assets/icons/sax/IconKeySquare.svg.js +43 -0
- package/dist/assets/icons/sax/IconLayer.svg.js +42 -0
- package/dist/assets/icons/sax/IconLink.svg.js +28 -0
- package/dist/assets/icons/sax/IconLinkBold.svg.js +23 -0
- package/dist/assets/icons/sax/IconLinkOutline.svg.js +28 -0
- package/dist/assets/icons/sax/IconLogout.svg.js +50 -0
- package/dist/assets/icons/sax/IconMenu.svg.js +25 -0
- package/dist/assets/icons/sax/IconMinusCircle.svg.js +26 -0
- package/dist/assets/icons/sax/IconNegate.svg.js +34 -0
- package/dist/assets/icons/sax/IconNegativeInfo.svg.js +34 -0
- package/dist/assets/icons/sax/IconNote.svg.js +34 -0
- package/dist/assets/icons/sax/IconOutlineCheckCircle.svg.js +34 -0
- package/dist/assets/icons/sax/IconOutlineCloseCircle.svg.js +26 -0
- package/dist/assets/icons/sax/IconOutlineEdit.svg.js +44 -0
- package/dist/assets/icons/sax/IconOutlineFolderAdd.svg.js +34 -0
- package/dist/assets/icons/sax/IconOutlineRefresh.svg.js +26 -0
- package/dist/assets/icons/sax/IconOutlineStar.svg.js +26 -0
- package/dist/assets/icons/sax/IconPaste.svg.js +44 -0
- package/dist/assets/icons/sax/IconProfile.svg.js +34 -0
- package/dist/assets/icons/sax/IconRadar.svg.js +26 -0
- package/dist/assets/icons/sax/IconRefresh.svg.js +26 -0
- package/dist/assets/icons/sax/IconSearch.svg.js +26 -0
- package/dist/assets/icons/sax/IconSettings.svg.js +36 -0
- package/dist/assets/icons/sax/IconStar.svg.js +26 -0
- package/dist/assets/icons/sax/IconSummary.svg.js +34 -0
- package/dist/assets/icons/sax/IconTag.svg.js +33 -0
- package/dist/assets/icons/sax/IconTask.svg.js +26 -0
- package/dist/assets/icons/sax/IconTime.svg.js +26 -0
- package/dist/assets/icons/sax/IconTrash.svg.js +26 -0
- package/dist/assets/icons/sax/IconUser.svg.js +26 -0
- package/dist/assets/icons/sax/IconVersionControl.svg.js +26 -0
- package/dist/assets/icons/sax/IconWeight.svg.js +34 -0
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts +29 -0
- package/dist/components/BottomSheet/WBottomSheet.vue.d.ts.map +1 -0
- package/dist/components/BottomSheet/WBottomSheet.vue.js +127 -0
- package/dist/components/BottomSheet/WBottomSheet.vue2.js +5 -0
- package/dist/components/Button/WButton.vue.d.ts +97 -0
- package/dist/components/Button/WButton.vue.d.ts.map +1 -0
- package/dist/components/Button/WButton.vue.js +76 -0
- package/dist/components/Button/WButton.vue2.js +5 -0
- package/dist/components/Button/WButtonAction.vue.d.ts +78 -0
- package/dist/components/Button/WButtonAction.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonAction.vue.js +64 -0
- package/dist/components/Button/WButtonAction.vue2.js +5 -0
- package/dist/components/Button/WButtonCopy.vue.d.ts +13 -0
- package/dist/components/Button/WButtonCopy.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonCopy.vue.js +67 -0
- package/dist/components/Button/WButtonCopy.vue2.js +5 -0
- package/dist/components/Button/WButtonGroup.vue.d.ts +78 -0
- package/dist/components/Button/WButtonGroup.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonGroup.vue.js +59 -0
- package/dist/components/Button/WButtonGroup.vue2.js +5 -0
- package/dist/components/Button/WButtonMore.vue.d.ts +18 -0
- package/dist/components/Button/WButtonMore.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonMore.vue.js +70 -0
- package/dist/components/Button/WButtonMore.vue2.js +5 -0
- package/dist/components/Button/WButtonMoreItem.vue.d.ts +51 -0
- package/dist/components/Button/WButtonMoreItem.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonMoreItem.vue.js +35 -0
- package/dist/components/Button/WButtonMoreItem.vue2.js +5 -0
- package/dist/components/Button/WButtonSelection.vue.d.ts +28 -0
- package/dist/components/Button/WButtonSelection.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonSelection.vue.js +56 -0
- package/dist/components/Button/WButtonSelection.vue2.js +5 -0
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts +37 -0
- package/dist/components/Button/WButtonSelectionAction.vue.d.ts.map +1 -0
- package/dist/components/Button/WButtonSelectionAction.vue.js +43 -0
- package/dist/components/Button/WButtonSelectionAction.vue2.js +5 -0
- package/dist/components/Button/models/semanticTypeStylesMap.d.ts +5 -0
- package/dist/components/Button/models/semanticTypeStylesMap.d.ts.map +1 -0
- package/dist/components/Button/models/semanticTypeStylesMap.js +24 -0
- package/dist/components/Checkbox/WCheckbox.vue.d.ts +72 -0
- package/dist/components/Checkbox/WCheckbox.vue.d.ts.map +1 -0
- package/dist/components/Checkbox/WCheckbox.vue.js +113 -0
- package/dist/components/Checkbox/WCheckbox.vue2.js +5 -0
- package/dist/components/Chip/WChip.vue.d.ts +31 -0
- package/dist/components/Chip/WChip.vue.d.ts.map +1 -0
- package/dist/components/Chip/WChip.vue.js +37 -0
- package/dist/components/Chip/WChip.vue2.js +5 -0
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts +14 -0
- package/dist/components/ClickOutside/WClickOutside.vue.d.ts.map +1 -0
- package/dist/components/ClickOutside/WClickOutside.vue.js +36 -0
- package/dist/components/ClickOutside/WClickOutside.vue2.js +5 -0
- package/dist/components/Counter/WCounter.vue.d.ts +29 -0
- package/dist/components/Counter/WCounter.vue.d.ts.map +1 -0
- package/dist/components/Counter/WCounter.vue.js +38 -0
- package/dist/components/Counter/WCounter.vue2.js +5 -0
- package/dist/components/DatePicker/WDatePicker.vue.d.ts +18 -0
- package/dist/components/DatePicker/WDatePicker.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/WDatePicker.vue.js +131 -0
- package/dist/components/DatePicker/WDatePicker.vue2.js +5 -0
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts +23 -0
- package/dist/components/DatePicker/WDatePickerSingle.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/WDatePickerSingle.vue.js +97 -0
- package/dist/components/DatePicker/WDatePickerSingle.vue2.js +5 -0
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts +64 -0
- package/dist/components/DatePicker/components/CalendarDay.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/components/CalendarDay.vue.js +96 -0
- package/dist/components/DatePicker/components/CalendarDay.vue2.js +5 -0
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts +47 -0
- package/dist/components/DatePicker/components/CalendarMonth.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/components/CalendarMonth.vue.js +101 -0
- package/dist/components/DatePicker/components/CalendarMonth.vue2.js +5 -0
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts +19 -0
- package/dist/components/DatePicker/components/CalendarToggle.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/components/CalendarToggle.vue.js +48 -0
- package/dist/components/DatePicker/components/CalendarToggle.vue2.js +5 -0
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts +37 -0
- package/dist/components/DatePicker/components/CalendarValue.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/components/CalendarValue.vue.js +45 -0
- package/dist/components/DatePicker/components/CalendarValue.vue2.js +5 -0
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts +50 -0
- package/dist/components/DatePicker/components/CalendarWeek.vue.d.ts.map +1 -0
- package/dist/components/DatePicker/components/CalendarWeek.vue.js +79 -0
- package/dist/components/DatePicker/components/CalendarWeek.vue2.js +5 -0
- package/dist/components/DatePicker/models/types.d.ts +5 -0
- package/dist/components/DatePicker/models/types.d.ts.map +1 -0
- package/dist/components/Dropdown/WDropdown.vue.d.ts +67 -0
- package/dist/components/Dropdown/WDropdown.vue.d.ts.map +1 -0
- package/dist/components/Dropdown/WDropdown.vue.js +116 -0
- package/dist/components/Dropdown/WDropdown.vue2.js +5 -0
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts +21 -0
- package/dist/components/Dropdown/utils/DropdownStyle.d.ts.map +1 -0
- package/dist/components/Dropdown/utils/DropdownStyle.js +141 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts +72 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue.d.ts.map +1 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue.js +71 -0
- package/dist/components/DropdownMenu/WDropdownMenu.vue2.js +5 -0
- package/dist/components/Expansion/WExpansion.vue.d.ts +31 -0
- package/dist/components/Expansion/WExpansion.vue.d.ts.map +1 -0
- package/dist/components/Expansion/WExpansion.vue.js +41 -0
- package/dist/components/Expansion/WExpansion.vue2.js +5 -0
- package/dist/components/Expansion/WExpansionItem.vue.d.ts +46 -0
- package/dist/components/Expansion/WExpansionItem.vue.d.ts.map +1 -0
- package/dist/components/Expansion/WExpansionItem.vue.js +68 -0
- package/dist/components/Expansion/WExpansionItem.vue2.js +5 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts +44 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.d.ts.map +1 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue.js +38 -0
- package/dist/components/FieldWrapper/WFieldWrapper.vue2.js +5 -0
- package/dist/components/FilePicker/WFilePicker.vue.d.ts +74 -0
- package/dist/components/FilePicker/WFilePicker.vue.d.ts.map +1 -0
- package/dist/components/FilePicker/WFilePicker.vue.js +207 -0
- package/dist/components/FilePicker/WFilePicker.vue2.js +5 -0
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts +29 -0
- package/dist/components/FilePicker/components/FilePickerItem.vue.d.ts.map +1 -0
- package/dist/components/FilePicker/components/FilePickerItem.vue.js +47 -0
- package/dist/components/FilePicker/components/FilePickerItem.vue2.js +5 -0
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts +33 -0
- package/dist/components/FilePicker/components/FilePickerSvg.vue.d.ts.map +1 -0
- package/dist/components/FilePicker/components/FilePickerSvg.vue.js +84 -0
- package/dist/components/FilePicker/components/FilePickerSvg.vue2.js +5 -0
- package/dist/components/Form/WForm.vue.d.ts +38 -0
- package/dist/components/Form/WForm.vue.d.ts.map +1 -0
- package/dist/components/Form/WForm.vue.js +59 -0
- package/dist/components/Form/WForm.vue2.js +5 -0
- package/dist/components/Form/WFormValidator.vue.d.ts +50 -0
- package/dist/components/Form/WFormValidator.vue.d.ts.map +1 -0
- package/dist/components/Form/WFormValidator.vue.js +199 -0
- package/dist/components/Form/WFormValidator.vue2.js +5 -0
- package/dist/components/Form/models/injection.d.ts +9 -0
- package/dist/components/Form/models/injection.d.ts.map +1 -0
- package/dist/components/Form/models/injection.js +9 -0
- package/dist/components/Form/models/utils.d.ts +3 -0
- package/dist/components/Form/models/utils.d.ts.map +1 -0
- package/dist/components/Form/models/utils.js +19 -0
- package/dist/components/Form/use/useFormErrorMessageMap.d.ts +7 -0
- package/dist/components/Form/use/useFormErrorMessageMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormErrorMessageMap.js +31 -0
- package/dist/components/Form/use/useFormHasChangesMap.d.ts +6 -0
- package/dist/components/Form/use/useFormHasChangesMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormHasChangesMap.js +27 -0
- package/dist/components/Form/use/useFormInitModelMap.d.ts +6 -0
- package/dist/components/Form/use/useFormInitModelMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormInitModelMap.js +31 -0
- package/dist/components/Form/use/useFormInvalidateMap.d.ts +8 -0
- package/dist/components/Form/use/useFormInvalidateMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormInvalidateMap.js +31 -0
- package/dist/components/Form/use/useFormTitleMap.d.ts +6 -0
- package/dist/components/Form/use/useFormTitleMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormTitleMap.js +29 -0
- package/dist/components/Form/use/useFormValidateMap.d.ts +6 -0
- package/dist/components/Form/use/useFormValidateMap.d.ts.map +1 -0
- package/dist/components/Form/use/useFormValidateMap.js +32 -0
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts +51 -0
- package/dist/components/HeaderBar/WHeaderBar.vue.d.ts.map +1 -0
- package/dist/components/HeaderBar/WHeaderBar.vue.js +134 -0
- package/dist/components/HeaderBar/WHeaderBar.vue2.js +5 -0
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts +23 -0
- package/dist/components/ImageViewer/WImageViewer.vue.d.ts.map +1 -0
- package/dist/components/ImageViewer/WImageViewer.vue.js +59 -0
- package/dist/components/ImageViewer/WImageViewer.vue2.js +5 -0
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts +23 -0
- package/dist/components/ImageViewer/components/ImageModal.vue.d.ts.map +1 -0
- package/dist/components/ImageViewer/components/ImageModal.vue.js +5 -0
- package/dist/components/ImageViewer/components/ImageModal.vue2.js +39 -0
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts +177 -0
- package/dist/components/InfiniteList/WInfiniteList.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/WInfiniteList.vue.js +122 -0
- package/dist/components/InfiniteList/WInfiniteList.vue2.js +5 -0
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts +171 -0
- package/dist/components/InfiniteList/WInfiniteListPages.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/WInfiniteListPages.vue.js +229 -0
- package/dist/components/InfiniteList/WInfiniteListPages.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts +7 -0
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListButton.vue.js +26 -0
- package/dist/components/InfiniteList/components/InfiniteListButton.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts +183 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue.js +236 -0
- package/dist/components/InfiniteList/components/InfiniteListPage.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts +57 -0
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue.js +66 -0
- package/dist/components/InfiniteList/components/InfiniteListPageSelection.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts +21 -0
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue.js +35 -0
- package/dist/components/InfiniteList/components/InfiniteListPageTitle.vue2.js +5 -0
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts +29 -0
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.d.ts.map +1 -0
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue.js +56 -0
- package/dist/components/InfiniteList/components/InfiniteListScroll.vue2.js +5 -0
- package/dist/components/InfiniteList/models/utils.d.ts +3 -0
- package/dist/components/InfiniteList/models/utils.d.ts.map +1 -0
- package/dist/components/InfiniteList/models/utils.js +13 -0
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts +8 -0
- package/dist/components/InfiniteList/use/useInfiniteListHeader.d.ts.map +1 -0
- package/dist/components/InfiniteList/use/useInfiniteListHeader.js +61 -0
- package/dist/components/InfiniteList/use/useRefetchNextPages.d.ts +5 -0
- package/dist/components/InfiniteList/use/useRefetchNextPages.d.ts.map +1 -0
- package/dist/components/InfiniteList/use/useRefetchNextPages.js +31 -0
- package/dist/components/InfoCard/WInfoCard.vue.d.ts +24 -0
- package/dist/components/InfoCard/WInfoCard.vue.d.ts.map +1 -0
- package/dist/components/InfoCard/WInfoCard.vue.js +30 -0
- package/dist/components/InfoCard/WInfoCard.vue2.js +5 -0
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts +27 -0
- package/dist/components/InfoCard/WInfoCardNegative.vue.d.ts.map +1 -0
- package/dist/components/InfoCard/WInfoCardNegative.vue.js +39 -0
- package/dist/components/InfoCard/WInfoCardNegative.vue2.js +5 -0
- package/dist/components/Input/WInput.vue.d.ts +218 -0
- package/dist/components/Input/WInput.vue.d.ts.map +1 -0
- package/dist/components/Input/WInput.vue.js +397 -0
- package/dist/components/Input/WInput.vue2.js +5 -0
- package/dist/components/Input/WInputAsync.vue.d.ts +126 -0
- package/dist/components/Input/WInputAsync.vue.d.ts.map +1 -0
- package/dist/components/Input/WInputAsync.vue.js +195 -0
- package/dist/components/Input/WInputAsync.vue2.js +5 -0
- package/dist/components/Input/WInputDate.vue.d.ts +21 -0
- package/dist/components/Input/WInputDate.vue.d.ts.map +1 -0
- package/dist/components/Input/WInputDate.vue.js +62 -0
- package/dist/components/Input/WInputDate.vue2.js +5 -0
- package/dist/components/Input/WInputOptions.vue.d.ts +172 -0
- package/dist/components/Input/WInputOptions.vue.d.ts.map +1 -0
- package/dist/components/Input/WInputOptions.vue.js +192 -0
- package/dist/components/Input/WInputOptions.vue2.js +5 -0
- package/dist/components/Input/WInputSuggest.vue.d.ts +206 -0
- package/dist/components/Input/WInputSuggest.vue.d.ts.map +1 -0
- package/dist/components/Input/WInputSuggest.vue.js +191 -0
- package/dist/components/Input/WInputSuggest.vue2.js +5 -0
- package/dist/components/Input/components/InputActions.vue.d.ts +62 -0
- package/dist/components/Input/components/InputActions.vue.d.ts.map +1 -0
- package/dist/components/Input/components/InputActions.vue.js +114 -0
- package/dist/components/Input/components/InputActions.vue2.js +5 -0
- package/dist/components/Link/WLink.vue.d.ts +66 -0
- package/dist/components/Link/WLink.vue.d.ts.map +1 -0
- package/dist/components/Link/WLink.vue.js +51 -0
- package/dist/components/Link/WLink.vue2.js +5 -0
- package/dist/components/Link/WLinkArrow.vue.d.ts +27 -0
- package/dist/components/Link/WLinkArrow.vue.d.ts.map +1 -0
- package/dist/components/Link/WLinkArrow.vue.js +29 -0
- package/dist/components/Link/WLinkArrow.vue2.js +5 -0
- package/dist/components/ListCard/WListCard.vue.d.ts +53 -0
- package/dist/components/ListCard/WListCard.vue.d.ts.map +1 -0
- package/dist/components/ListCard/WListCard.vue.js +70 -0
- package/dist/components/ListCard/WListCard.vue2.js +5 -0
- package/dist/components/ListCard/WListCardField.vue.d.ts +25 -0
- package/dist/components/ListCard/WListCardField.vue.d.ts.map +1 -0
- package/dist/components/ListCard/WListCardField.vue.js +46 -0
- package/dist/components/ListCard/WListCardField.vue2.js +5 -0
- package/dist/components/MenuItem/WMenuItem.vue.d.ts +37 -0
- package/dist/components/MenuItem/WMenuItem.vue.d.ts.map +1 -0
- package/dist/components/MenuItem/WMenuItem.vue.js +30 -0
- package/dist/components/MenuItem/WMenuItem.vue2.js +5 -0
- package/dist/components/Modal/WModal.vue.d.ts +3 -0
- package/dist/components/Modal/WModal.vue.d.ts.map +1 -0
- package/dist/components/Modal/WModal.vue.js +123 -0
- package/dist/components/Modal/WModal.vue2.js +5 -0
- package/dist/components/Modal/WModalStepper.vue.d.ts +41 -0
- package/dist/components/Modal/WModalStepper.vue.d.ts.map +1 -0
- package/dist/components/Modal/WModalStepper.vue.js +121 -0
- package/dist/components/Modal/WModalStepper.vue2.js +5 -0
- package/dist/components/Modal/WModalWrapper.vue.d.ts +21 -0
- package/dist/components/Modal/WModalWrapper.vue.d.ts.map +1 -0
- package/dist/components/Modal/WModalWrapper.vue.js +39 -0
- package/dist/components/Modal/WModalWrapper.vue2.js +5 -0
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts +7 -0
- package/dist/components/Modal/components/ModalCloseButton.vue.d.ts.map +1 -0
- package/dist/components/Modal/components/ModalCloseButton.vue.js +23 -0
- package/dist/components/Modal/components/ModalCloseButton.vue2.js +5 -0
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts +76 -0
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.d.ts.map +1 -0
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue.js +5 -0
- package/dist/components/Modal/modals/Confirm/ConfirmModal.vue2.js +112 -0
- package/dist/components/Modal/modals/Confirm/types.d.ts +14 -0
- package/dist/components/Modal/modals/Confirm/types.d.ts.map +1 -0
- package/dist/components/Nav/WNavBar.vue.d.ts +14 -0
- package/dist/components/Nav/WNavBar.vue.d.ts.map +1 -0
- package/dist/components/Nav/WNavBar.vue.js +69 -0
- package/dist/components/Nav/WNavBar.vue2.js +5 -0
- package/dist/components/Nav/WNavItem.vue.d.ts +69 -0
- package/dist/components/Nav/WNavItem.vue.d.ts.map +1 -0
- package/dist/components/Nav/WNavItem.vue.js +86 -0
- package/dist/components/Nav/WNavItem.vue2.js +5 -0
- package/dist/components/Nav/WNavItemExpand.vue.d.ts +46 -0
- package/dist/components/Nav/WNavItemExpand.vue.d.ts.map +1 -0
- package/dist/components/Nav/WNavItemExpand.vue.js +66 -0
- package/dist/components/Nav/WNavItemExpand.vue2.js +5 -0
- package/dist/components/Nav/WNavItemTransition.vue.d.ts +10 -0
- package/dist/components/Nav/WNavItemTransition.vue.d.ts.map +1 -0
- package/dist/components/Nav/WNavItemTransition.vue.js +23 -0
- package/dist/components/Notify/WNotify.vue.d.ts +3 -0
- package/dist/components/Notify/WNotify.vue.d.ts.map +1 -0
- package/dist/components/Notify/WNotify.vue.js +70 -0
- package/dist/components/Notify/WNotify.vue2.js +5 -0
- package/dist/components/Notify/components/NotifyCard.vue.d.ts +53 -0
- package/dist/components/Notify/components/NotifyCard.vue.d.ts.map +1 -0
- package/dist/components/Notify/components/NotifyCard.vue.js +111 -0
- package/dist/components/Notify/components/NotifyCard.vue2.js +5 -0
- package/dist/components/Notify/models/NotifyType.d.ts +6 -0
- package/dist/components/Notify/models/NotifyType.d.ts.map +1 -0
- package/dist/components/Notify/models/NotifyType.js +8 -0
- package/dist/components/Notify/models/types.d.ts +11 -0
- package/dist/components/Notify/models/types.d.ts.map +1 -0
- package/dist/components/Select/WSelect.vue.d.ts +187 -0
- package/dist/components/Select/WSelect.vue.d.ts.map +1 -0
- package/dist/components/Select/WSelect.vue.js +318 -0
- package/dist/components/Select/WSelect.vue2.js +5 -0
- package/dist/components/Select/WSelectAsync.vue.d.ts +201 -0
- package/dist/components/Select/WSelectAsync.vue.d.ts.map +1 -0
- package/dist/components/Select/WSelectAsync.vue.js +210 -0
- package/dist/components/Select/WSelectAsync.vue2.js +5 -0
- package/dist/components/Select/WSelectAsyncList.vue.d.ts +105 -0
- package/dist/components/Select/WSelectAsyncList.vue.d.ts.map +1 -0
- package/dist/components/Select/WSelectAsyncList.vue.js +76 -0
- package/dist/components/Select/WSelectAsyncList.vue2.js +5 -0
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts +185 -0
- package/dist/components/Select/WSelectAsyncSingle.vue.d.ts.map +1 -0
- package/dist/components/Select/WSelectAsyncSingle.vue.js +110 -0
- package/dist/components/Select/WSelectAsyncSingle.vue2.js +5 -0
- package/dist/components/Select/WSelectSingle.vue.d.ts +177 -0
- package/dist/components/Select/WSelectSingle.vue.d.ts.map +1 -0
- package/dist/components/Select/WSelectSingle.vue.js +106 -0
- package/dist/components/Select/WSelectSingle.vue2.js +5 -0
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts +133 -0
- package/dist/components/Select/components/SelectAsyncList.vue.d.ts.map +1 -0
- package/dist/components/Select/components/SelectAsyncList.vue.js +193 -0
- package/dist/components/Select/components/SelectAsyncList.vue2.js +5 -0
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts +97 -0
- package/dist/components/Select/components/SelectAsyncPrefix.vue.d.ts.map +1 -0
- package/dist/components/Select/components/SelectAsyncPrefix.vue.js +72 -0
- package/dist/components/Select/components/SelectAsyncPrefix.vue2.js +5 -0
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts +97 -0
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.d.ts.map +1 -0
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue.js +89 -0
- package/dist/components/Select/components/SelectAsyncPrefixPage.vue2.js +5 -0
- package/dist/components/Select/components/SelectOption.vue.d.ts +104 -0
- package/dist/components/Select/components/SelectOption.vue.d.ts.map +1 -0
- package/dist/components/Select/components/SelectOption.vue.js +112 -0
- package/dist/components/Select/components/SelectOption.vue2.js +5 -0
- package/dist/components/Skeleton/WSkeleton.vue.d.ts +3 -0
- package/dist/components/Skeleton/WSkeleton.vue.d.ts.map +1 -0
- package/dist/components/Skeleton/WSkeleton.vue.js +14 -0
- package/dist/components/Spinner/WSpinner.vue.d.ts +3 -0
- package/dist/components/Spinner/WSpinner.vue.d.ts.map +1 -0
- package/dist/components/Spinner/WSpinner.vue.js +33 -0
- package/dist/components/Tabs/WTabs.vue.d.ts +39 -0
- package/dist/components/Tabs/WTabs.vue.d.ts.map +1 -0
- package/dist/components/Tabs/WTabs.vue.js +210 -0
- package/dist/components/Tabs/WTabs.vue2.js +5 -0
- package/dist/components/Tabs/WTabsColumns.vue.d.ts +13 -0
- package/dist/components/Tabs/WTabsColumns.vue.d.ts.map +1 -0
- package/dist/components/Tabs/WTabsColumns.vue.js +33 -0
- package/dist/components/Tabs/WTabsColumns.vue2.js +5 -0
- package/dist/components/Tabs/components/TabItem.vue.d.ts +26 -0
- package/dist/components/Tabs/components/TabItem.vue.d.ts.map +1 -0
- package/dist/components/Tabs/components/TabItem.vue.js +42 -0
- package/dist/components/Tabs/components/TabItem.vue2.js +5 -0
- package/dist/components/Tabs/models/injection.d.ts +4 -0
- package/dist/components/Tabs/models/injection.d.ts.map +1 -0
- package/dist/components/Tabs/models/injection.js +4 -0
- package/dist/components/Tabs/use/useTabActiveListener.d.ts +2 -0
- package/dist/components/Tabs/use/useTabActiveListener.d.ts.map +1 -0
- package/dist/components/Tabs/use/useTabActiveListener.js +15 -0
- package/dist/components/Tabs/use/useTabItemActiveListener.d.ts +4 -0
- package/dist/components/Tabs/use/useTabItemActiveListener.d.ts.map +1 -0
- package/dist/components/Tabs/use/useTabItemActiveListener.js +28 -0
- package/dist/components/Toggle/WToggle.vue.d.ts +69 -0
- package/dist/components/Toggle/WToggle.vue.d.ts.map +1 -0
- package/dist/components/Toggle/WToggle.vue.js +94 -0
- package/dist/components/Toggle/WToggle.vue2.js +5 -0
- package/dist/components/Tooltip/WTooltip.vue.d.ts +35 -0
- package/dist/components/Tooltip/WTooltip.vue.d.ts.map +1 -0
- package/dist/components/Tooltip/WTooltip.vue.js +67 -0
- package/dist/components/Tooltip/WTooltip.vue2.js +5 -0
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts +3 -0
- package/dist/components/Tooltip/WTooltipContainer.vue.d.ts.map +1 -0
- package/dist/components/Tooltip/WTooltipContainer.vue.js +152 -0
- package/dist/components/Tooltip/WTooltipContainer.vue2.js +5 -0
- package/dist/components/Tooltip/models/utils.d.ts +2 -0
- package/dist/components/Tooltip/models/utils.d.ts.map +1 -0
- package/dist/components/Tooltip/models/utils.js +6 -0
- package/dist/imports/componentsPlugin.d.ts +66 -0
- package/dist/imports/componentsPlugin.d.ts.map +1 -0
- package/dist/imports/iconsDefault.d.ts +27 -0
- package/dist/imports/iconsDefault.d.ts.map +1 -0
- package/dist/imports/iconsDefault.js +26 -0
- package/dist/imports/iconsSax.d.ts +59 -0
- package/dist/imports/iconsSax.d.ts.map +1 -0
- package/dist/imports/iconsSax.js +58 -0
- package/dist/main.d.ts +12 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +71 -0
- package/dist/types/global.d.ts +48 -0
- package/dist/utils/DOMListenerContainer.d.ts +8 -0
- package/dist/utils/DOMListenerContainer.d.ts.map +1 -0
- package/dist/utils/DOMListenerContainer.js +39 -0
- package/dist/utils/HorizontalAlign.d.ts +9 -0
- package/dist/utils/HorizontalAlign.d.ts.map +1 -0
- package/dist/utils/HorizontalAlign.js +11 -0
- package/dist/utils/Modal.d.ts +10 -0
- package/dist/utils/Modal.d.ts.map +1 -0
- package/dist/utils/Modal.js +25 -0
- package/dist/utils/Notify.d.ts +8 -0
- package/dist/utils/Notify.d.ts.map +1 -0
- package/dist/utils/Notify.js +19 -0
- package/dist/utils/SemanticType.d.ts +9 -0
- package/dist/utils/SemanticType.d.ts.map +1 -0
- package/dist/utils/SemanticType.js +11 -0
- package/dist/utils/Tooltip.d.ts +15 -0
- package/dist/utils/Tooltip.d.ts.map +1 -0
- package/dist/utils/Tooltip.js +14 -0
- package/dist/utils/dateTime.d.ts +44 -0
- package/dist/utils/dateTime.d.ts.map +1 -0
- package/dist/utils/dateTime.js +187 -0
- package/dist/utils/mobile.d.ts +3 -0
- package/dist/utils/mobile.d.ts.map +1 -0
- package/dist/utils/mobile.js +10 -0
- package/dist/utils/supportsPassive.d.ts +2 -0
- package/dist/utils/supportsPassive.d.ts.map +1 -0
- package/dist/utils/supportsPassive.js +15 -0
- package/dist/utils/utils.d.ts +14 -0
- package/dist/utils/utils.d.ts.map +1 -0
- package/dist/utils/utils.js +61 -0
- package/package.json +281 -0
- package/tailwind-base/index.cjs +103 -0
- package/tailwind-base/plugins/default.cjs +456 -0
- package/tailwind-base/theme/animations.cjs +88 -0
- package/tailwind-base/theme/score.cjs +31 -0
- package/tailwind-base/theme/severity.cjs +32 -0
- package/tailwind-base/theme/sizes.cjs +23 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, renderSlot, createVNode, unref, createElementVNode, toDisplayString, withModifiers } from 'vue';
|
2
|
+
import IconCancel from '../../../assets/icons/default/IconCancel.svg.js';
|
3
|
+
import IconCheckCircle from '../../../assets/icons/sax/IconCheckCircle.svg.js';
|
4
|
+
import IconCloseCircle from '../../../assets/icons/sax/IconCloseCircle.svg.js';
|
5
|
+
|
6
|
+
const _hoisted_1 = { class: "relative height-52 width-44 flex flex-col gap-2" };
|
7
|
+
const _hoisted_2 = {
|
8
|
+
key: 0,
|
9
|
+
class: "square-44 flex items-center justify-center"
|
10
|
+
};
|
11
|
+
const _hoisted_3 = {
|
12
|
+
key: 1,
|
13
|
+
class: "square-44 flex items-center justify-center"
|
14
|
+
};
|
15
|
+
const _hoisted_4 = { class: "text-base text-accent text-center font-normal truncate" };
|
16
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
17
|
+
__name: "FilePickerItem",
|
18
|
+
props: {
|
19
|
+
name: {},
|
20
|
+
hasError: { type: Boolean }
|
21
|
+
},
|
22
|
+
emits: ["click:cancel"],
|
23
|
+
setup(__props) {
|
24
|
+
return (_ctx, _cache) => {
|
25
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
26
|
+
!_ctx.hasError ? (openBlock(), createElementBlock("div", _hoisted_2, [
|
27
|
+
renderSlot(_ctx.$slots, "positive", {}, () => [
|
28
|
+
createVNode(unref(IconCheckCircle), { class: "square-36 text-positive dark:text-positive-dark" })
|
29
|
+
])
|
30
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_3, [
|
31
|
+
renderSlot(_ctx.$slots, "negative", {}, () => [
|
32
|
+
createVNode(unref(IconCloseCircle), { class: "square-36 text-negative dark:text-negative-dark" })
|
33
|
+
])
|
34
|
+
])),
|
35
|
+
createElementVNode("div", _hoisted_4, toDisplayString(_ctx.name), 1),
|
36
|
+
createElementVNode("button", {
|
37
|
+
class: "absolute top-0 right-0 w-ripple flex square-5 rounded-full items-center justify-center hover:bg-opacity-5 hover:bg-black-default outline-none",
|
38
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => _ctx.$emit("click:cancel"), ["stop", "prevent"]))
|
39
|
+
}, [
|
40
|
+
createVNode(unref(IconCancel), { class: "square-3 text-description" })
|
41
|
+
])
|
42
|
+
]);
|
43
|
+
};
|
44
|
+
}
|
45
|
+
});
|
46
|
+
|
47
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,33 @@
|
|
1
|
+
declare const _default: import("vue").DefineComponent<{
|
2
|
+
svgWidth: {
|
3
|
+
type: import("vue").PropType<number>;
|
4
|
+
required: true;
|
5
|
+
};
|
6
|
+
svgHeight: {
|
7
|
+
type: import("vue").PropType<number>;
|
8
|
+
required: true;
|
9
|
+
};
|
10
|
+
isActive: {
|
11
|
+
type: import("vue").PropType<boolean>;
|
12
|
+
};
|
13
|
+
hasError: {
|
14
|
+
type: import("vue").PropType<boolean>;
|
15
|
+
};
|
16
|
+
}, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
17
|
+
svgWidth: {
|
18
|
+
type: import("vue").PropType<number>;
|
19
|
+
required: true;
|
20
|
+
};
|
21
|
+
svgHeight: {
|
22
|
+
type: import("vue").PropType<number>;
|
23
|
+
required: true;
|
24
|
+
};
|
25
|
+
isActive: {
|
26
|
+
type: import("vue").PropType<boolean>;
|
27
|
+
};
|
28
|
+
hasError: {
|
29
|
+
type: import("vue").PropType<boolean>;
|
30
|
+
};
|
31
|
+
}>>, {}, {}>;
|
32
|
+
export default _default;
|
33
|
+
//# sourceMappingURL=FilePickerSvg.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"FilePickerSvg.vue.d.ts","sourceRoot":"","sources":["../../../../../src/components/FilePicker/components/FilePickerSvg.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,wBAAkD"}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { defineComponent, ref, computed, watch, toRef, onBeforeMount, openBlock, createElementBlock, normalizeClass, createElementVNode, normalizeStyle } from 'vue';
|
2
|
+
|
3
|
+
const _hoisted_1 = ["width", "height"];
|
4
|
+
const _hoisted_2 = ["x", "y", "width", "height", "rx", "ry", "stroke-width", "stroke-dasharray", "stroke-dashoffset"];
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
6
|
+
__name: "FilePickerSvg",
|
7
|
+
props: {
|
8
|
+
svgWidth: {},
|
9
|
+
svgHeight: {},
|
10
|
+
isActive: { type: Boolean },
|
11
|
+
hasError: { type: Boolean }
|
12
|
+
},
|
13
|
+
setup(__props) {
|
14
|
+
const props = __props;
|
15
|
+
const lengthList = Array(8).fill(void 0).map((_, index) => (7 + index * 2) * 4);
|
16
|
+
const borderRaduis = ref(12);
|
17
|
+
const strokeWidth = ref(4);
|
18
|
+
const svgRect = ref();
|
19
|
+
const fraction = ref(48);
|
20
|
+
const fractionShift = ref(0);
|
21
|
+
const rectWidth = computed(() => props.svgWidth - strokeWidth.value);
|
22
|
+
const rectHeight = computed(() => props.svgHeight - strokeWidth.value);
|
23
|
+
const roundedHalf = computed(() => 12 * Math.PI / 2);
|
24
|
+
const pathLength = computed(() => svgRect.value?.getTotalLength() ?? 480);
|
25
|
+
const segmentLength = computed(() => pathLength.value / fraction.value);
|
26
|
+
const dashoffset = computed(() => (segmentLength.value + roundedHalf.value) / 2);
|
27
|
+
const calcFaction = () => {
|
28
|
+
const factor = rectWidth.value / rectHeight.value;
|
29
|
+
let result = 2;
|
30
|
+
let index = 0;
|
31
|
+
for (let i = 0; i < lengthList.length; i++) {
|
32
|
+
const value = lengthList[i] * factor % 1;
|
33
|
+
if (result > value) {
|
34
|
+
result = value;
|
35
|
+
index = i;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
fraction.value = lengthList[index] ?? 48;
|
39
|
+
fractionShift.value = result;
|
40
|
+
};
|
41
|
+
watch(toRef(props, "svgWidth"), calcFaction);
|
42
|
+
onBeforeMount(() => {
|
43
|
+
calcFaction();
|
44
|
+
});
|
45
|
+
return (_ctx, _cache) => {
|
46
|
+
return openBlock(), createElementBlock("svg", {
|
47
|
+
class: normalizeClass({
|
48
|
+
"opacity-50": !_ctx.isActive,
|
49
|
+
"opacity-100": _ctx.isActive,
|
50
|
+
"text-negative dark:text-negative-dark": _ctx.hasError,
|
51
|
+
"text-primary-default dark:text-primary-dark": !_ctx.hasError
|
52
|
+
}),
|
53
|
+
width: _ctx.svgWidth,
|
54
|
+
height: _ctx.svgHeight
|
55
|
+
}, [
|
56
|
+
createElementVNode("rect", {
|
57
|
+
ref_key: "svgRect",
|
58
|
+
ref: svgRect,
|
59
|
+
x: strokeWidth.value / 2,
|
60
|
+
y: strokeWidth.value / 2,
|
61
|
+
width: rectWidth.value,
|
62
|
+
height: rectHeight.value,
|
63
|
+
rx: borderRaduis.value,
|
64
|
+
ry: borderRaduis.value,
|
65
|
+
"stroke-width": strokeWidth.value,
|
66
|
+
"stroke-dasharray": segmentLength.value + " " + segmentLength.value,
|
67
|
+
"stroke-dashoffset": dashoffset.value,
|
68
|
+
"stroke-linecap": "round",
|
69
|
+
stroke: "currentColor",
|
70
|
+
fill: "none",
|
71
|
+
class: normalizeClass({
|
72
|
+
"animate-border-rotate": _ctx.isActive
|
73
|
+
}),
|
74
|
+
style: normalizeStyle({
|
75
|
+
"--border-rotate-offset-from": dashoffset.value,
|
76
|
+
"--border-rotate-offset-to": dashoffset.value - pathLength.value
|
77
|
+
})
|
78
|
+
}, null, 14, _hoisted_2)
|
79
|
+
], 10, _hoisted_1);
|
80
|
+
};
|
81
|
+
}
|
82
|
+
});
|
83
|
+
|
84
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,38 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
2
|
+
name: {
|
3
|
+
type: import("vue").PropType<string>;
|
4
|
+
};
|
5
|
+
title: {
|
6
|
+
type: import("vue").PropType<string>;
|
7
|
+
};
|
8
|
+
}, {
|
9
|
+
isValid: import("vue").ComputedRef<boolean>;
|
10
|
+
validate: (silent?: boolean | undefined) => string | undefined;
|
11
|
+
invalidate: (payload: {
|
12
|
+
[x: string]: string | string[];
|
13
|
+
}) => void;
|
14
|
+
initModel: () => void;
|
15
|
+
errorMessage: import("vue").ComputedRef<string>;
|
16
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
17
|
+
"update:isValid": (value: boolean | undefined) => void;
|
18
|
+
"update:hasChanges": (value: boolean) => void;
|
19
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
20
|
+
name: {
|
21
|
+
type: import("vue").PropType<string>;
|
22
|
+
};
|
23
|
+
title: {
|
24
|
+
type: import("vue").PropType<string>;
|
25
|
+
};
|
26
|
+
}>> & {
|
27
|
+
"onUpdate:isValid"?: ((value: boolean | undefined) => any) | undefined;
|
28
|
+
"onUpdate:hasChanges"?: ((value: boolean) => any) | undefined;
|
29
|
+
}, {}, {}>, {
|
30
|
+
default?(_: {}): any;
|
31
|
+
}>;
|
32
|
+
export default _default;
|
33
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
34
|
+
new (): {
|
35
|
+
$slots: S;
|
36
|
+
};
|
37
|
+
};
|
38
|
+
//# sourceMappingURL=WForm.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WForm.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WForm.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuIA,wBAA8G;AAmB9G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
@@ -0,0 +1,59 @@
|
|
1
|
+
import { defineComponent, computed, toRef, provide, inject, watch, onBeforeUnmount, openBlock, createElementBlock, renderSlot } from 'vue';
|
2
|
+
import { wFormUnlistener } from './models/injection.js';
|
3
|
+
import { useFormErrorMessageMap } from './use/useFormErrorMessageMap.js';
|
4
|
+
import { useFormHasChangesMap } from './use/useFormHasChangesMap.js';
|
5
|
+
import { useFormInitModelMap } from './use/useFormInitModelMap.js';
|
6
|
+
import { useFormInvalidateMap } from './use/useFormInvalidateMap.js';
|
7
|
+
import { useFormTitleMap } from './use/useFormTitleMap.js';
|
8
|
+
import { useFormValidateMap } from './use/useFormValidateMap.js';
|
9
|
+
|
10
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
11
|
+
__name: "WForm",
|
12
|
+
props: {
|
13
|
+
name: {},
|
14
|
+
title: {}
|
15
|
+
},
|
16
|
+
emits: ["update:isValid", "update:hasChanges"],
|
17
|
+
setup(__props, { expose: __expose, emit }) {
|
18
|
+
const props = __props;
|
19
|
+
const name = computed(() => props.name);
|
20
|
+
const { titleGetter, titleMapUnlistener } = useFormTitleMap(name, toRef(props, "title"));
|
21
|
+
const { errorMessageMapUnlistener, isValid, errorMessage } = useFormErrorMessageMap(name, titleGetter);
|
22
|
+
const { hasChangesMapUnlistener, hasChanges } = useFormHasChangesMap(name);
|
23
|
+
const { validateMapUnlistener, validate } = useFormValidateMap(name, titleGetter, (value) => emit("update:isValid", value));
|
24
|
+
const { invalidateMapUnlistener, invalidate } = useFormInvalidateMap(name);
|
25
|
+
const { initModelMapUnlistener, initModel } = useFormInitModelMap(name);
|
26
|
+
const unlistener = (key) => {
|
27
|
+
titleMapUnlistener(key);
|
28
|
+
errorMessageMapUnlistener(key);
|
29
|
+
hasChangesMapUnlistener(key);
|
30
|
+
validateMapUnlistener(key);
|
31
|
+
invalidateMapUnlistener(key);
|
32
|
+
initModelMapUnlistener(key);
|
33
|
+
};
|
34
|
+
provide(wFormUnlistener, unlistener);
|
35
|
+
const unlistenerInjected = inject(wFormUnlistener, void 0);
|
36
|
+
watch(isValid, (value) => emit("update:isValid", value));
|
37
|
+
watch(hasChanges, (value) => emit("update:hasChanges", value));
|
38
|
+
onBeforeUnmount(() => {
|
39
|
+
if (props.name) {
|
40
|
+
unlistenerInjected?.(props.name);
|
41
|
+
}
|
42
|
+
emit("update:isValid", void 0);
|
43
|
+
});
|
44
|
+
__expose({
|
45
|
+
isValid,
|
46
|
+
validate,
|
47
|
+
invalidate,
|
48
|
+
initModel,
|
49
|
+
errorMessage
|
50
|
+
});
|
51
|
+
return (_ctx, _cache) => {
|
52
|
+
return openBlock(), createElementBlock("div", null, [
|
53
|
+
renderSlot(_ctx.$slots, "default")
|
54
|
+
]);
|
55
|
+
};
|
56
|
+
}
|
57
|
+
});
|
58
|
+
|
59
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,50 @@
|
|
1
|
+
declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
|
2
|
+
name: {
|
3
|
+
type: import("vue").PropType<string>;
|
4
|
+
};
|
5
|
+
title: {
|
6
|
+
type: import("vue").PropType<string>;
|
7
|
+
};
|
8
|
+
validate: {
|
9
|
+
type: import("vue").PropType<ValidateFn | ValidateFn[]>;
|
10
|
+
};
|
11
|
+
forbiddenRegexp: {
|
12
|
+
type: import("vue").PropType<RegExp>;
|
13
|
+
};
|
14
|
+
requiredSymbols: {
|
15
|
+
type: import("vue").PropType<string>;
|
16
|
+
};
|
17
|
+
}, {
|
18
|
+
validateOnUpdate(): string | undefined;
|
19
|
+
invalidate(message: string): void;
|
20
|
+
initModel: () => void;
|
21
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
22
|
+
"update:has-changes": (value: boolean) => void;
|
23
|
+
}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
24
|
+
name: {
|
25
|
+
type: import("vue").PropType<string>;
|
26
|
+
};
|
27
|
+
title: {
|
28
|
+
type: import("vue").PropType<string>;
|
29
|
+
};
|
30
|
+
validate: {
|
31
|
+
type: import("vue").PropType<ValidateFn | ValidateFn[]>;
|
32
|
+
};
|
33
|
+
forbiddenRegexp: {
|
34
|
+
type: import("vue").PropType<RegExp>;
|
35
|
+
};
|
36
|
+
requiredSymbols: {
|
37
|
+
type: import("vue").PropType<string>;
|
38
|
+
};
|
39
|
+
}>> & {
|
40
|
+
"onUpdate:has-changes"?: ((value: boolean) => any) | undefined;
|
41
|
+
}, {}, {}>, {
|
42
|
+
default: () => void;
|
43
|
+
}>;
|
44
|
+
export default _default;
|
45
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
46
|
+
new (): {
|
47
|
+
$slots: S;
|
48
|
+
};
|
49
|
+
};
|
50
|
+
//# sourceMappingURL=WFormValidator.vue.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"WFormValidator.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Form/WFormValidator.vue.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+TA,wBAA8G;AAiB9G,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
@@ -0,0 +1,199 @@
|
|
1
|
+
import { defineComponent, inject, useSlots, computed, ref, watch, onBeforeMount, onBeforeUnmount, openBlock, createBlock, resolveDynamicComponent } from 'vue';
|
2
|
+
import { wFormTitleUpdater, wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormValidateUpdater, wFormInvalidateUpdater, wFormInitModelUpdater, wFormUnlistener } from './models/injection.js';
|
3
|
+
|
4
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
5
|
+
__name: "WFormValidator",
|
6
|
+
props: {
|
7
|
+
name: {},
|
8
|
+
title: {},
|
9
|
+
validate: {},
|
10
|
+
forbiddenRegexp: {},
|
11
|
+
requiredSymbols: {}
|
12
|
+
},
|
13
|
+
emits: ["update:has-changes"],
|
14
|
+
setup(__props, { expose: __expose, emit }) {
|
15
|
+
const props = __props;
|
16
|
+
const titleUpdater = inject(wFormTitleUpdater, void 0);
|
17
|
+
const errorMessageUpdater = inject(wFormErrorMessageUpdater, void 0);
|
18
|
+
const hasChangesUpdater = inject(wFormHasChangesUpdater, void 0);
|
19
|
+
const validateUpdater = inject(wFormValidateUpdater, void 0);
|
20
|
+
const invalidateUpdater = inject(wFormInvalidateUpdater, void 0);
|
21
|
+
const initModelUpdater = inject(wFormInitModelUpdater, void 0);
|
22
|
+
const unlistener = inject(wFormUnlistener, void 0);
|
23
|
+
const slots = useSlots();
|
24
|
+
const component = computed(() => slots.default?.()[0]);
|
25
|
+
const modelValue = computed(() => {
|
26
|
+
const props2 = component.value?.props;
|
27
|
+
if (!props2)
|
28
|
+
return void 0;
|
29
|
+
if ("modelValue" in props2) {
|
30
|
+
return props2.modelValue;
|
31
|
+
}
|
32
|
+
if ("model-value" in props2) {
|
33
|
+
return props2["model-value"];
|
34
|
+
}
|
35
|
+
return void 0;
|
36
|
+
});
|
37
|
+
const initModelValue = ref();
|
38
|
+
const required = computed(() => component.value?.props?.required !== void 0 ? component.value?.props?.required !== false : void 0);
|
39
|
+
const title = computed(() => props.title ?? component.value?.props?.title);
|
40
|
+
const errorMessage = ref();
|
41
|
+
const hasChanges = ref(false);
|
42
|
+
const hasBeenValidated = ref(false);
|
43
|
+
const requiredSymbols = computed(() => props.requiredSymbols?.split("") ?? []);
|
44
|
+
const _updateHasChanges = (value) => {
|
45
|
+
if (initModelValue.value === void 0) {
|
46
|
+
hasChanges.value = value !== void 0 && value !== "";
|
47
|
+
} else {
|
48
|
+
if (value instanceof Array && initModelValue.value instanceof Array) {
|
49
|
+
const oldValue = initModelValue.value;
|
50
|
+
const newValue = value;
|
51
|
+
hasChanges.value = newValue.length !== oldValue.length || newValue.some((item) => !oldValue.includes(item));
|
52
|
+
} else {
|
53
|
+
hasChanges.value = value !== initModelValue.value;
|
54
|
+
}
|
55
|
+
}
|
56
|
+
};
|
57
|
+
const _validate = (value) => {
|
58
|
+
if (required.value && !value) {
|
59
|
+
const message2 = "A value is required";
|
60
|
+
return message2;
|
61
|
+
}
|
62
|
+
if (props.forbiddenRegexp && typeof value === "string") {
|
63
|
+
const match = value.match(props.forbiddenRegexp);
|
64
|
+
if (match?.length) {
|
65
|
+
const message2 = "The following symbols are not allowed: " + match.filter((item, index) => match.indexOf(item) === index).map((item) => {
|
66
|
+
switch (item) {
|
67
|
+
case " ":
|
68
|
+
return "whitespace";
|
69
|
+
case "\n":
|
70
|
+
return "line break";
|
71
|
+
default:
|
72
|
+
return `" ${item} "`;
|
73
|
+
}
|
74
|
+
}).join(", ");
|
75
|
+
return message2;
|
76
|
+
}
|
77
|
+
}
|
78
|
+
if (props.requiredSymbols && typeof value === "string") {
|
79
|
+
const match = requiredSymbols.value.filter((item) => !value.includes(item)).map((item) => {
|
80
|
+
switch (item) {
|
81
|
+
case " ":
|
82
|
+
return "whitespace";
|
83
|
+
case "\n":
|
84
|
+
return "line break";
|
85
|
+
case " ":
|
86
|
+
return "tabulation";
|
87
|
+
default:
|
88
|
+
return `${item}`;
|
89
|
+
}
|
90
|
+
}).join(", ");
|
91
|
+
if (match.length)
|
92
|
+
return "Please include the required symbols: " + match;
|
93
|
+
}
|
94
|
+
let message;
|
95
|
+
if (props.validate instanceof Array) {
|
96
|
+
message = props.validate.map((cb) => cb(value)).filter((item) => item).join(", ") || void 0;
|
97
|
+
} else {
|
98
|
+
message = props.validate?.(value) || void 0;
|
99
|
+
}
|
100
|
+
return message;
|
101
|
+
};
|
102
|
+
const validateOnUpdate = (value) => {
|
103
|
+
const message = _validate(value);
|
104
|
+
_updateHasChanges(value);
|
105
|
+
errorMessage.value = message;
|
106
|
+
hasBeenValidated.value = true;
|
107
|
+
return message;
|
108
|
+
};
|
109
|
+
const _validateOnUpdate = (value) => {
|
110
|
+
validateOnUpdate(value);
|
111
|
+
};
|
112
|
+
const _validateOnSelect = (value) => {
|
113
|
+
const newValue = modelValue.value instanceof Array ? modelValue.value.slice() : [];
|
114
|
+
newValue.push(value);
|
115
|
+
validateOnUpdate(newValue);
|
116
|
+
};
|
117
|
+
const _validateOnUnselect = (value) => {
|
118
|
+
const newValue = modelValue.value instanceof Array ? modelValue.value.slice() : [];
|
119
|
+
const index = newValue.indexOf(value);
|
120
|
+
if (index !== -1)
|
121
|
+
newValue.splice(index, 1);
|
122
|
+
validateOnUpdate(newValue);
|
123
|
+
};
|
124
|
+
const validate = (silent) => {
|
125
|
+
const message = _validate(modelValue.value);
|
126
|
+
if (!silent) {
|
127
|
+
errorMessage.value = message;
|
128
|
+
hasBeenValidated.value = true;
|
129
|
+
}
|
130
|
+
return message;
|
131
|
+
};
|
132
|
+
const invalidate = (messages) => {
|
133
|
+
if (!props.name)
|
134
|
+
return;
|
135
|
+
const message = messages[props.name];
|
136
|
+
if (typeof message === "string")
|
137
|
+
errorMessage.value = message;
|
138
|
+
else if (message instanceof Array)
|
139
|
+
errorMessage.value = message.join(", ");
|
140
|
+
};
|
141
|
+
const initModel = () => {
|
142
|
+
initModelValue.value = modelValue.value;
|
143
|
+
hasChanges.value = false;
|
144
|
+
};
|
145
|
+
watch(errorMessage, (value) => {
|
146
|
+
if (props.name) {
|
147
|
+
errorMessageUpdater?.(props.name, value);
|
148
|
+
}
|
149
|
+
});
|
150
|
+
watch(hasChanges, (value) => {
|
151
|
+
if (props.name) {
|
152
|
+
hasChangesUpdater?.(props.name, value);
|
153
|
+
}
|
154
|
+
emit("update:has-changes", value);
|
155
|
+
});
|
156
|
+
watch(title, (value) => {
|
157
|
+
if (props.name) {
|
158
|
+
titleUpdater?.(props.name, value);
|
159
|
+
}
|
160
|
+
}, { immediate: true });
|
161
|
+
watch(required, () => {
|
162
|
+
if (hasBeenValidated.value)
|
163
|
+
validate();
|
164
|
+
});
|
165
|
+
onBeforeMount(() => {
|
166
|
+
if (props.name) {
|
167
|
+
initModel();
|
168
|
+
validateUpdater?.(props.name, validate);
|
169
|
+
invalidateUpdater?.(props.name, invalidate);
|
170
|
+
initModelUpdater?.(props.name, initModel);
|
171
|
+
}
|
172
|
+
});
|
173
|
+
onBeforeUnmount(() => {
|
174
|
+
if (props.name) {
|
175
|
+
unlistener?.(props.name);
|
176
|
+
}
|
177
|
+
});
|
178
|
+
__expose({
|
179
|
+
validateOnUpdate() {
|
180
|
+
return validateOnUpdate(modelValue.value);
|
181
|
+
},
|
182
|
+
invalidate(message) {
|
183
|
+
errorMessage.value = message;
|
184
|
+
},
|
185
|
+
initModel
|
186
|
+
});
|
187
|
+
return (_ctx, _cache) => {
|
188
|
+
return openBlock(), createBlock(resolveDynamicComponent(component.value), {
|
189
|
+
"error-message": errorMessage.value,
|
190
|
+
"has-changes": hasChanges.value,
|
191
|
+
"onUpdate:modelValue": _validateOnUpdate,
|
192
|
+
onSelect: _validateOnSelect,
|
193
|
+
onUnselect: _validateOnUnselect
|
194
|
+
}, null, 40, ["error-message", "has-changes"]);
|
195
|
+
};
|
196
|
+
}
|
197
|
+
});
|
198
|
+
|
199
|
+
export { _sfc_main as default };
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
2
|
+
export declare const wFormTitleUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
|
3
|
+
export declare const wFormErrorMessageUpdater: InjectionKey<(key: string, value: string | undefined) => void>;
|
4
|
+
export declare const wFormHasChangesUpdater: InjectionKey<(key: string, value: boolean) => void>;
|
5
|
+
export declare const wFormValidateUpdater: InjectionKey<(key: string, value: () => string | undefined) => void>;
|
6
|
+
export declare const wFormInvalidateUpdater: InjectionKey<(key: string, value: (messages: Record<string, string | string[]>) => void) => void>;
|
7
|
+
export declare const wFormInitModelUpdater: InjectionKey<(key: string, value: () => void) => void>;
|
8
|
+
export declare const wFormUnlistener: InjectionKey<(key: string) => void>;
|
9
|
+
//# sourceMappingURL=injection.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"injection.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/injection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,KAAK,CAAA;AAErC,eAAO,MAAM,iBAAiB,qBAAqD,MAAM,SAAS,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,wBAAwB,qBAA4D,MAAM,SAAS,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE5I,eAAO,MAAM,sBAAsB,qBAA0D,MAAM,SAAS,OAAO,KAAK,IAAI,CAAC,CAAA;AAE7H,eAAO,MAAM,oBAAoB,qBAAwD,MAAM,SAAS,MAAM,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,CAAA;AAE1I,eAAO,MAAM,sBAAsB,qBAAwD,MAAM,oBAAoB,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,KAAK,IAAI,KAAK,IAAI,CAAC,CAAA;AAEzK,eAAO,MAAM,qBAAqB,qBAAyD,MAAM,SAAS,MAAM,IAAI,KAAK,IAAI,CAAC,CAAA;AAE9H,eAAO,MAAM,eAAe,qBAAmD,MAAM,KAAK,IAAI,CAAC,CAAA"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
const wFormTitleUpdater = Symbol("wFormTitleUpdater");
|
2
|
+
const wFormErrorMessageUpdater = Symbol("wFormErrorMessageUpdater");
|
3
|
+
const wFormHasChangesUpdater = Symbol("wFormHasChangesUpdater");
|
4
|
+
const wFormValidateUpdater = Symbol("wFormValidateUpdater");
|
5
|
+
const wFormInvalidateUpdater = Symbol("wFormValidateUpdater");
|
6
|
+
const wFormInitModelUpdater = Symbol("wFormInitModelUpdater");
|
7
|
+
const wFormUnlistener = Symbol("wFormUnlistener");
|
8
|
+
|
9
|
+
export { wFormErrorMessageUpdater, wFormHasChangesUpdater, wFormInitModelUpdater, wFormInvalidateUpdater, wFormTitleUpdater, wFormUnlistener, wFormValidateUpdater };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/models/utils.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS,sDAAuD,MAAM,MAMlF,CAAA;AAKD,eAAO,MAAM,cAAc,UAAW,MAAM,WAAW,MAAM,GAAG,SAAS,KAAG,MAAM,GAAG,SAQpF,CAAA"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
const removeKey = (entity, key) => {
|
2
|
+
const result = { ...entity };
|
3
|
+
delete result[key];
|
4
|
+
return result;
|
5
|
+
};
|
6
|
+
const fieldMessageStart = "- ";
|
7
|
+
const subformMessageStart = " ";
|
8
|
+
const compileMessage = (title, message) => {
|
9
|
+
if (message === void 0)
|
10
|
+
return void 0;
|
11
|
+
if (message.startsWith(fieldMessageStart) || message.startsWith(subformMessageStart)) {
|
12
|
+
return `${subformMessageStart}${title}:
|
13
|
+
${message}`;
|
14
|
+
} else {
|
15
|
+
return `${fieldMessageStart}${title}: ${message}`;
|
16
|
+
}
|
17
|
+
};
|
18
|
+
|
19
|
+
export { compileMessage, removeKey };
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { type Ref } from 'vue';
|
2
|
+
export declare const useFormErrorMessageMap: (name: Ref<string | undefined>, titleGetter: (key: string) => string) => {
|
3
|
+
errorMessageMapUnlistener: (key: string) => void;
|
4
|
+
isValid: import("vue").ComputedRef<boolean>;
|
5
|
+
errorMessage: import("vue").ComputedRef<string>;
|
6
|
+
};
|
7
|
+
//# sourceMappingURL=useFormErrorMessageMap.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFormErrorMessageMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormErrorMessageMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAC,MAAM,KAAK,CAAA;AAInE,eAAO,MAAM,sBAAsB,SAAU,IAAI,MAAM,GAAG,SAAS,CAAC,qBAAqB,MAAM,KAAK,MAAM;qCAQhE,MAAM;;;CAuB/C,CAAA"}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { ref, computed, provide, inject, watch } from 'vue';
|
2
|
+
import { wFormErrorMessageUpdater } from '../models/injection.js';
|
3
|
+
import { compileMessage, removeKey } from '../models/utils.js';
|
4
|
+
|
5
|
+
const useFormErrorMessageMap = (name, titleGetter) => {
|
6
|
+
const errorMessageMap = ref({});
|
7
|
+
const isValid = computed(() => !Object.values(errorMessageMap.value).some((item) => item));
|
8
|
+
const errorMessageMapUpdater = (key, value) => {
|
9
|
+
errorMessageMap.value = !value ? removeKey(errorMessageMap.value, key) : { ...errorMessageMap.value, [key]: value };
|
10
|
+
};
|
11
|
+
const errorMessageMapUnlistener = (key) => {
|
12
|
+
errorMessageMap.value = removeKey(errorMessageMap.value, key);
|
13
|
+
};
|
14
|
+
const errorMessage = computed(() => {
|
15
|
+
return Object.keys(errorMessageMap.value).map((key) => compileMessage(titleGetter(key), errorMessageMap.value[key])).filter((item) => item).join("\n");
|
16
|
+
});
|
17
|
+
provide(wFormErrorMessageUpdater, errorMessageMapUpdater);
|
18
|
+
const errorMessageUpdaterInjected = inject(wFormErrorMessageUpdater, void 0);
|
19
|
+
watch(errorMessage, (value) => {
|
20
|
+
if (name.value) {
|
21
|
+
errorMessageUpdaterInjected?.(name.value, value);
|
22
|
+
}
|
23
|
+
});
|
24
|
+
return {
|
25
|
+
errorMessageMapUnlistener,
|
26
|
+
isValid,
|
27
|
+
errorMessage
|
28
|
+
};
|
29
|
+
};
|
30
|
+
|
31
|
+
export { useFormErrorMessageMap };
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { type Ref } from 'vue';
|
2
|
+
export declare const useFormHasChangesMap: (name: Ref<string | undefined>) => {
|
3
|
+
hasChangesMapUnlistener: (key: string) => void;
|
4
|
+
hasChanges: import("vue").ComputedRef<boolean>;
|
5
|
+
};
|
6
|
+
//# sourceMappingURL=useFormHasChangesMap.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"useFormHasChangesMap.d.ts","sourceRoot":"","sources":["../../../../../src/components/Form/use/useFormHasChangesMap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAwC,KAAK,GAAG,EAAC,MAAM,KAAK,CAAA;AAInE,eAAO,MAAM,oBAAoB,SAAU,IAAI,MAAM,GAAG,SAAS,CAAC;mCAQ1B,MAAM;;CAkB7C,CAAA"}
|