hys-ui 0.1.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +149 -0
- package/README.md +17 -1
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAlert/HysAlert.vue.js +5 -54
- package/dist/components/HysAlert/HysAlert2.vue.js +159 -2
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +639 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +256 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -27
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +288 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -92
- package/dist/components/HysCalendar/HysCalendar2.vue.js +815 -2
- package/dist/components/HysCard/HysCard.vue.js +2 -2
- package/dist/components/HysCard/HysCard2.vue.js +175 -42
- package/dist/components/HysCascader/HysCascader.vue.js +5 -194
- package/dist/components/HysCascader/HysCascader2.vue.js +773 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +3 -3
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPanel.vue.js +7 -0
- package/dist/components/HysColorPicker/HysColorPanel2.vue.js +238 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +1 -1
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +239 -216
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +90 -76
- package/dist/components/HysContextMenu/HysContextMenu.vue.js +5 -89
- package/dist/components/HysContextMenu/HysContextMenu2.vue.js +247 -2
- package/dist/components/HysContextMenu/HysMenuPanel.vue.js +7 -0
- package/dist/components/HysContextMenu/HysMenuPanel2.vue.js +208 -0
- package/dist/components/HysContextMenu/HysMenuSlot.js +10 -0
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +1019 -563
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +270 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +820 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +270 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +434 -84
- package/dist/components/HysEmpty/HysEmpty.vue.js +5 -41
- package/dist/components/HysEmpty/HysEmpty2.vue.js +181 -2
- package/dist/components/HysFileManager/HysFileManager.vue.js +3 -3
- package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +578 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
- package/dist/components/HysFormItem/HysFormItem2.vue.js +528 -2
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +1380 -268
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +467 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +122 -109
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +490 -85
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
- package/dist/components/HysPagination/HysPagination.vue.js +1 -1
- package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
- package/dist/components/HysPopover/HysPopover.vue.js +5 -91
- package/dist/components/HysPopover/HysPopover2.vue.js +120 -2
- package/dist/components/HysProgress/HysProgress.vue.js +2 -2
- package/dist/components/HysProgress/HysProgress2.vue.js +319 -52
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +2 -2
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
- package/dist/components/HysSearch/HysSearch.vue.js +37 -36
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +999 -189
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +1 -1
- package/dist/components/HysSlider/HysSlider2.vue.js +536 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +170 -0
- package/dist/components/HysSteps/HysSteps.vue.js +1 -1
- package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1494 -88
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -68
- package/dist/components/HysTagInput/HysTagInput.vue.js +5 -81
- package/dist/components/HysTagInput/HysTagInput2.vue.js +396 -2
- package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
- package/dist/components/HysTimeline/HysTimeline.vue.js +2 -2
- package/dist/components/HysTimeline/HysTimeline2.vue.js +243 -24
- package/dist/components/HysTooltip/HysTooltip.vue.js +5 -64
- package/dist/components/HysTooltip/HysTooltip2.vue.js +110 -2
- package/dist/components/HysTour/HysTour.vue.js +46 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
- package/dist/components/HysTransfer/HysTransfer2.vue.js +446 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +503 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +651 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +570 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +459 -124
- package/dist/components/HysVirtualTable/HysVirtualTable.vue.js +5 -94
- package/dist/components/HysVirtualTable/HysVirtualTable2.vue.js +656 -2
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/color.js +97 -0
- package/dist/composables/dataGrid.js +68 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/drawer.js +17 -0
- package/dist/composables/feedback.js +14 -0
- package/dist/composables/formContext.js +92 -7
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/menu.js +96 -0
- package/dist/composables/modal.js +14 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/overlayManager.js +48 -18
- package/dist/composables/progress.js +94 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/tagInput.js +16 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/timeline.js +19 -0
- package/dist/composables/transfer.js +65 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/upload.js +55 -0
- package/dist/composables/uploadRequest.js +58 -0
- package/dist/composables/useAlert.js +124 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useColorPicker.js +402 -0
- package/dist/composables/useContextMenu.js +514 -0
- package/dist/composables/useDataGridRemote.js +67 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +86 -43
- package/dist/composables/useDrawerPush.js +33 -0
- package/dist/composables/useDrawerResize.js +221 -0
- package/dist/composables/useFloating.js +136 -56
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysModal.js +185 -0
- package/dist/composables/useModal.js +295 -0
- package/dist/composables/useModalInteraction.js +394 -0
- package/dist/composables/usePopupSurface.js +458 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTagInput.js +313 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTransferMotion.js +185 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/composables/useUpload.js +472 -0
- package/dist/composables/useUploadModel.js +65 -0
- package/dist/composables/useUploadRequests.js +266 -0
- package/dist/composables/useVirtualTableLayout.js +277 -0
- package/dist/composables/virtualTable.js +43 -0
- package/dist/index.js +152 -139
- package/dist/internal/PopupReference.js +39 -0
- package/dist/internal/PopupSurfacePanel.vue.js +7 -0
- package/dist/internal/PopupSurfacePanel2.vue.js +92 -0
- package/dist/motion/PopupMotion.js +105 -0
- package/dist/motion/popup.js +10 -0
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAlert/HysAlert.vue.d.ts +32 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +104 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +71 -20
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +120 -31
- package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +50 -39
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysColorPicker/HysColorPanel.vue.d.ts +58 -0
- package/dist/types/components/HysColorPicker/HysColorPicker.vue.d.ts +63 -10
- package/dist/types/components/HysCommandPalette/HysCommandPalette.vue.d.ts +2 -1
- package/dist/types/components/HysContextMenu/HysContextMenu.vue.d.ts +50 -34
- package/dist/types/components/HysContextMenu/HysMenuPanel.vue.d.ts +79 -0
- package/dist/types/components/HysContextMenu/HysMenuSlot.d.ts +8 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +65 -118
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +92 -35
- package/dist/types/components/HysEmpty/HysEmpty.vue.d.ts +24 -20
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +84 -5
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +4 -3
- package/dist/types/components/HysModal/HysModal.vue.d.ts +111 -34
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -35
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +41 -29
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +18 -24
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +34 -12
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +2 -2
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +131 -22
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +69 -11
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +24 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +3 -3
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +50 -28
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysTimeline/HysTimeline.vue.d.ts +19 -32
- package/dist/types/components/HysToast/HysToast.vue.d.ts +3 -3
- package/dist/types/components/HysTooltip/HysTooltip.vue.d.ts +39 -19
- package/dist/types/components/HysTour/HysTour.vue.d.ts +4 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +107 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/components/HysUpload/HysUpload.vue.d.ts +55 -67
- package/dist/types/components/HysVirtualTable/HysVirtualTable.vue.d.ts +71 -40
- package/dist/types/composables/autocomplete.d.ts +109 -0
- package/dist/types/composables/avatar.d.ts +73 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +195 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/color.d.ts +97 -0
- package/dist/types/composables/dataGrid.d.ts +100 -0
- package/dist/types/composables/datePicker.d.ts +250 -0
- package/dist/types/composables/drawer.d.ts +102 -0
- package/dist/types/composables/feedback.d.ts +98 -0
- package/dist/types/composables/formContext.d.ts +135 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/menu.d.ts +183 -0
- package/dist/types/composables/modal.d.ts +183 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/overlayManager.d.ts +7 -3
- package/dist/types/composables/popupSurface.d.ts +83 -0
- package/dist/types/composables/progress.d.ts +92 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +46 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +312 -0
- package/dist/types/composables/tagInput.d.ts +96 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/timeline.d.ts +82 -0
- package/dist/types/composables/transfer.d.ts +187 -0
- package/dist/types/composables/tree.d.ts +240 -0
- package/dist/types/composables/treeSelect.d.ts +170 -0
- package/dist/types/composables/upload.d.ts +202 -0
- package/dist/types/composables/uploadRequest.d.ts +3 -0
- package/dist/types/composables/useAlert.d.ts +21 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useColorPicker.d.ts +101 -0
- package/dist/types/composables/useContextMenu.d.ts +81 -0
- package/dist/types/composables/useDataGridRemote.d.ts +15 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useDialog.d.ts +16 -3
- package/dist/types/composables/useDrawerPush.d.ts +6 -0
- package/dist/types/composables/useDrawerResize.d.ts +27 -0
- package/dist/types/composables/useFloating.d.ts +28 -6
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useHysModal.d.ts +44 -0
- package/dist/types/composables/useModal.d.ts +62 -0
- package/dist/types/composables/useModalInteraction.d.ts +27 -0
- package/dist/types/composables/usePopupSurface.d.ts +3341 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTagInput.d.ts +66 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTransferMotion.d.ts +36 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/composables/useUpload.d.ts +94 -0
- package/dist/types/composables/useUploadModel.d.ts +14 -0
- package/dist/types/composables/useUploadRequests.d.ts +38 -0
- package/dist/types/composables/useVirtualTableLayout.d.ts +51 -0
- package/dist/types/composables/virtualTable.d.ts +126 -0
- package/dist/types/index.d.ts +50 -9
- package/dist/types/internal/PopupReference.d.ts +18 -0
- package/dist/types/internal/PopupSurfacePanel.vue.d.ts +37 -0
- package/dist/types/motion/PopupMotion.d.ts +59 -0
- package/dist/types/motion/popup.d.ts +12 -0
- package/package.json +2 -1
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
function x(i) {
|
|
2
|
+
if (!/^\d{4}-\d{2}-\d{2}$/.test(i)) return null;
|
|
3
|
+
const [n, c, l] = i.split("-").map(Number), o = /* @__PURE__ */ new Date(0);
|
|
4
|
+
return o.setUTCHours(0, 0, 0, 0), o.setUTCFullYear(n, c - 1, l), o.getUTCFullYear() === n && o.getUTCMonth() === c - 1 && o.getUTCDate() === l ? o.getTime() / 864e5 : null;
|
|
5
|
+
}
|
|
6
|
+
const C = (i, n) => JSON.stringify([i, n]), h = (i) => new Date(i * 864e5).toISOString().split("T")[0];
|
|
7
|
+
function $(i, n) {
|
|
8
|
+
if (!(i.s === null || i.e === null || n.s === null || n.e === null || i.e < i.s || n.e < n.s || n.s > i.e))
|
|
9
|
+
return {
|
|
10
|
+
id: JSON.stringify(["dependency-order", i.id, n.id]),
|
|
11
|
+
type: "dependency-order",
|
|
12
|
+
taskId: n.id,
|
|
13
|
+
taskTitle: n.title,
|
|
14
|
+
sourceId: i.id,
|
|
15
|
+
sourceTitle: i.title,
|
|
16
|
+
expectedStart: h(i.e + 1),
|
|
17
|
+
days: i.e - n.s + 1,
|
|
18
|
+
message: `${i.title} 于 ${h(i.e)} 结束,${n.title} 最早应在 ${h(i.e + 1)} 开始;当前提前 ${i.e - n.s + 1} 天`
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
function D(i) {
|
|
22
|
+
const n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), o = [], r = [], a = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), y = (e) => (u.has(e) || u.set(e, x(e)), u.get(e));
|
|
23
|
+
for (const e of i) {
|
|
24
|
+
const t = {
|
|
25
|
+
id: e.id,
|
|
26
|
+
title: e.title,
|
|
27
|
+
start: e.start,
|
|
28
|
+
end: e.end,
|
|
29
|
+
dependencies: e.dependencies,
|
|
30
|
+
s: y(e.start),
|
|
31
|
+
e: y(e.end)
|
|
32
|
+
};
|
|
33
|
+
n.set(e.id, t), c.set(e.id, []), l.set(e.id, []), (t.s === null || t.e === null || t.e < t.s) && r.push({
|
|
34
|
+
id: JSON.stringify(["invalid-date", e.id]),
|
|
35
|
+
type: "invalid-date",
|
|
36
|
+
taskId: e.id,
|
|
37
|
+
taskTitle: e.title,
|
|
38
|
+
message: `${e.title} 的日期无效,需使用有效的 YYYY-MM-DD 且结束日期不早于开始日期`
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
for (const e of n.values())
|
|
42
|
+
for (const t of new Set(e.dependencies ?? [])) {
|
|
43
|
+
if (!n.get(t)) {
|
|
44
|
+
r.push({
|
|
45
|
+
id: JSON.stringify(["missing-dependency", t, e.id]),
|
|
46
|
+
type: "missing-dependency",
|
|
47
|
+
taskId: e.id,
|
|
48
|
+
taskTitle: e.title,
|
|
49
|
+
sourceId: t,
|
|
50
|
+
message: `${e.title} 引用了不存在的前置任务 ${t}`
|
|
51
|
+
});
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
c.get(t).push(e.id), l.get(e.id).push(t);
|
|
55
|
+
const d = {
|
|
56
|
+
sourceId: t,
|
|
57
|
+
targetId: e.id,
|
|
58
|
+
id: C(t, e.id)
|
|
59
|
+
};
|
|
60
|
+
o.push(d);
|
|
61
|
+
for (const g of /* @__PURE__ */ new Set([t, e.id])) {
|
|
62
|
+
const I = a.get(g);
|
|
63
|
+
I ? I.push(d) : a.set(g, [d]);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
const f = /* @__PURE__ */ new Set(), k = [];
|
|
67
|
+
for (const e of n.keys()) {
|
|
68
|
+
if (f.has(e)) continue;
|
|
69
|
+
const t = [{ id: e, exit: !1 }];
|
|
70
|
+
for (; t.length; ) {
|
|
71
|
+
const s = t.pop();
|
|
72
|
+
if (s.exit) {
|
|
73
|
+
k.push(s.id);
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
if (!f.has(s.id)) {
|
|
77
|
+
f.add(s.id), t.push({ id: s.id, exit: !0 });
|
|
78
|
+
for (const d of c.get(s.id))
|
|
79
|
+
f.has(d) || t.push({ id: d, exit: !1 });
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
const p = /* @__PURE__ */ new Map(), w = [];
|
|
84
|
+
for (let e = k.length - 1; e >= 0; e--) {
|
|
85
|
+
const t = k[e];
|
|
86
|
+
if (p.has(t)) continue;
|
|
87
|
+
const s = w.length, d = [t];
|
|
88
|
+
let g = 0;
|
|
89
|
+
for (p.set(t, s); d.length; ) {
|
|
90
|
+
const I = d.pop();
|
|
91
|
+
g++;
|
|
92
|
+
for (const S of l.get(I))
|
|
93
|
+
p.has(S) || (p.set(S, s), d.push(S));
|
|
94
|
+
}
|
|
95
|
+
w.push(g);
|
|
96
|
+
}
|
|
97
|
+
const T = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Map();
|
|
98
|
+
for (const e of o) {
|
|
99
|
+
const t = n.get(e.sourceId), s = n.get(e.targetId);
|
|
100
|
+
let d;
|
|
101
|
+
p.get(t.id) === p.get(s.id) && (t.id === s.id || w[p.get(t.id)] > 1) ? (T.add(e.id), d = {
|
|
102
|
+
id: JSON.stringify(["dependency-cycle", t.id, s.id]),
|
|
103
|
+
type: "dependency-cycle",
|
|
104
|
+
sourceId: t.id,
|
|
105
|
+
sourceTitle: t.title,
|
|
106
|
+
taskId: s.id,
|
|
107
|
+
taskTitle: s.title,
|
|
108
|
+
message: `${t.title} → ${s.title} 属于循环依赖,需先移除环内关系`
|
|
109
|
+
}) : d = $(t, s), d && (r.push(d), M.set(e.id, d));
|
|
110
|
+
}
|
|
111
|
+
const m = /* @__PURE__ */ new Map();
|
|
112
|
+
for (const e of r)
|
|
113
|
+
for (const t of /* @__PURE__ */ new Set([
|
|
114
|
+
e.taskId,
|
|
115
|
+
...e.sourceId !== void 0 && n.has(e.sourceId) ? [e.sourceId] : []
|
|
116
|
+
])) {
|
|
117
|
+
const s = m.get(t);
|
|
118
|
+
s ? s.push(e) : m.set(t, [e]);
|
|
119
|
+
}
|
|
120
|
+
return { conflicts: r, byTask: m, byEdge: M, tasks: n, incident: a, cyclic: T };
|
|
121
|
+
}
|
|
122
|
+
function N(i, n, c, l) {
|
|
123
|
+
const o = i.tasks.get(n);
|
|
124
|
+
if (!o) return [];
|
|
125
|
+
const r = {
|
|
126
|
+
...o,
|
|
127
|
+
s: c,
|
|
128
|
+
e: l,
|
|
129
|
+
start: h(c),
|
|
130
|
+
end: h(l)
|
|
131
|
+
};
|
|
132
|
+
return (i.incident.get(n) ?? []).flatMap((a) => {
|
|
133
|
+
if (i.cyclic.has(a.id)) return [];
|
|
134
|
+
const u = a.sourceId === n ? r : i.tasks.get(a.sourceId), y = a.targetId === n ? r : i.tasks.get(a.targetId), f = $(u, y);
|
|
135
|
+
return f ? [f] : [];
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
export {
|
|
139
|
+
D as analyzeGanttSchedule,
|
|
140
|
+
C as ganttEdgeKey,
|
|
141
|
+
x as parseGanttDay,
|
|
142
|
+
N as previewGanttConflicts
|
|
143
|
+
};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { toRaw as O } from "vue";
|
|
2
|
+
const h = (o) => typeof o + ":" + o;
|
|
3
|
+
function K(o) {
|
|
4
|
+
return [
|
|
5
|
+
...new Set(
|
|
6
|
+
(o ?? []).filter(
|
|
7
|
+
(t) => typeof t == "string" || typeof t == "number" && Number.isFinite(t)
|
|
8
|
+
)
|
|
9
|
+
)
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
const A = (o, t) => o.length === t.length && o.every((n, d) => n === t[d]);
|
|
13
|
+
function R(o, t) {
|
|
14
|
+
let n = o;
|
|
15
|
+
for (const d of t.split(".")) {
|
|
16
|
+
if (!n || typeof n != "object" || !Object.prototype.hasOwnProperty.call(n, d))
|
|
17
|
+
return;
|
|
18
|
+
n = n[d];
|
|
19
|
+
}
|
|
20
|
+
return n;
|
|
21
|
+
}
|
|
22
|
+
const G = (o, t) => o === "_blank" ? [
|
|
23
|
+
...new Set(
|
|
24
|
+
(t ?? "").split(/\s+/).filter(Boolean).concat("noopener", "noreferrer")
|
|
25
|
+
)
|
|
26
|
+
].join(" ") : t;
|
|
27
|
+
function M(o, t = {}) {
|
|
28
|
+
const n = [], d = /* @__PURE__ */ new Set(), g = /* @__PURE__ */ new WeakSet();
|
|
29
|
+
let w = 0;
|
|
30
|
+
function b(c, s, j = !1, m = 0) {
|
|
31
|
+
if (m > 32) return [];
|
|
32
|
+
const v = [];
|
|
33
|
+
for (const u of c) {
|
|
34
|
+
if (!u || typeof u != "object" || g.has(u)) continue;
|
|
35
|
+
g.add(u);
|
|
36
|
+
const e = (r) => R(u, t[r] ?? r);
|
|
37
|
+
if (e("hidden")) continue;
|
|
38
|
+
const p = e("value"), l = typeof p == "string" || typeof p == "number" && Number.isFinite(p) ? p : void 0, k = e("type"), i = ["divider", "group", "checkbox", "radio"].includes(
|
|
39
|
+
String(k)
|
|
40
|
+
) ? k : "item";
|
|
41
|
+
if (i !== "divider" && i !== "group" && (l === void 0 || d.has(h(l))))
|
|
42
|
+
continue;
|
|
43
|
+
i !== "divider" && i !== "group" && d.add(h(l));
|
|
44
|
+
const a = (r) => String(e(r) ?? ""), y = e("icon"), S = e("children"), f = {
|
|
45
|
+
id: l === void 0 || i === "group" || i === "divider" ? "structure-" + ++w : encodeURIComponent(h(l)),
|
|
46
|
+
raw: u,
|
|
47
|
+
key: l,
|
|
48
|
+
label: a("label"),
|
|
49
|
+
type: i,
|
|
50
|
+
disabled: j || !!e("disabled"),
|
|
51
|
+
danger: !!e("danger"),
|
|
52
|
+
icon: y && (typeof y == "object" || typeof y == "function") ? O(y) : void 0,
|
|
53
|
+
description: a("description"),
|
|
54
|
+
shortcut: a("shortcut"),
|
|
55
|
+
href: e("href") == null ? void 0 : a("href"),
|
|
56
|
+
target: e("target") == null ? void 0 : a("target"),
|
|
57
|
+
rel: e("rel") == null ? void 0 : a("rel"),
|
|
58
|
+
radioGroup: e("radioGroup"),
|
|
59
|
+
checked: !!e("checked"),
|
|
60
|
+
closeOnSelect: typeof e("closeOnSelect") == "boolean" ? e("closeOnSelect") : void 0,
|
|
61
|
+
children: [],
|
|
62
|
+
parents: s,
|
|
63
|
+
path: s.map((r) => r.raw).concat(u),
|
|
64
|
+
keys: s.flatMap((r) => r.key === void 0 ? [] : [r.key]).concat(l === void 0 ? [] : [l]),
|
|
65
|
+
level: s.length
|
|
66
|
+
};
|
|
67
|
+
if (v.push(f), n.push(f), Array.isArray(S) && i !== "divider") {
|
|
68
|
+
const r = b(
|
|
69
|
+
S,
|
|
70
|
+
i === "group" ? s : s.concat(f),
|
|
71
|
+
f.disabled,
|
|
72
|
+
m + 1
|
|
73
|
+
);
|
|
74
|
+
i === "group" ? v.push(...r) : f.children = r;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
return v;
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
roots: b(o, []),
|
|
81
|
+
all: n,
|
|
82
|
+
byKey: new Map(
|
|
83
|
+
n.filter(
|
|
84
|
+
(c) => c.key !== void 0 && c.type !== "divider" && c.type !== "group"
|
|
85
|
+
).map((c) => [h(c.key), c])
|
|
86
|
+
)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
export {
|
|
90
|
+
R as menuField,
|
|
91
|
+
K as menuKeys,
|
|
92
|
+
A as menuKeysEqual,
|
|
93
|
+
M as menuRows,
|
|
94
|
+
G as menuSafeRel,
|
|
95
|
+
h as menuToken
|
|
96
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
const d = {
|
|
2
|
+
xs: 360,
|
|
3
|
+
sm: 440,
|
|
4
|
+
md: 560,
|
|
5
|
+
lg: 720,
|
|
6
|
+
xl: 960,
|
|
7
|
+
"2xl": 1200,
|
|
8
|
+
full: "100%"
|
|
9
|
+
}, i = (t) => t.width ?? d[t.size ?? "md"], m = (t) => typeof t == "number" ? Number.isFinite(t) && t >= 0 ? t + "px" : void 0 : t;
|
|
10
|
+
export {
|
|
11
|
+
m as modalLength,
|
|
12
|
+
i as modalWidth,
|
|
13
|
+
d as modalWidths
|
|
14
|
+
};
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
const a = (n) => 10n ** BigInt(n);
|
|
2
|
+
function B(n) {
|
|
3
|
+
if (typeof n != "string" && typeof n != "number" || typeof n == "number" && !Number.isFinite(n)) return;
|
|
4
|
+
const i = String(n).trim();
|
|
5
|
+
if (i.length > 2048) return;
|
|
6
|
+
const t = /^([+-]?)(?:(\d+)(?:\.(\d*))?|\.(\d+))(?:e([+-]?\d+))?$/i.exec(
|
|
7
|
+
i
|
|
8
|
+
);
|
|
9
|
+
if (!t) return;
|
|
10
|
+
const r = Number(t[5] ?? 0);
|
|
11
|
+
if (!Number.isInteger(r) || Math.abs(r) > 1e3) return;
|
|
12
|
+
const s = t[3] ?? t[4] ?? "", e = (t[2] ?? "0") + s;
|
|
13
|
+
let c = s.length - r, o = BigInt(e) * (t[1] === "-" ? -1n : 1n);
|
|
14
|
+
if (c < 0 && (o *= a(-c), c = 0), !(c > 1e3)) {
|
|
15
|
+
for (; c > 0 && o % 10n === 0n; )
|
|
16
|
+
o /= 10n, c--;
|
|
17
|
+
return { units: o, scale: c };
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function b(n, i) {
|
|
21
|
+
const t = Math.max(n.scale, i.scale);
|
|
22
|
+
return {
|
|
23
|
+
a: n.units * a(t - n.scale),
|
|
24
|
+
b: i.units * a(t - i.scale),
|
|
25
|
+
scale: t
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function h(n, i) {
|
|
29
|
+
const t = b(n, i);
|
|
30
|
+
return t.a === t.b ? 0 : t.a < t.b ? -1 : 1;
|
|
31
|
+
}
|
|
32
|
+
function D(n, i, t = 1) {
|
|
33
|
+
const r = b(n, i);
|
|
34
|
+
return {
|
|
35
|
+
units: r.a + r.b * BigInt(Math.trunc(t)),
|
|
36
|
+
scale: r.scale
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function w(n, i) {
|
|
40
|
+
const t = Math.max(0, Math.min(100, Math.floor(i)));
|
|
41
|
+
if (n.scale <= t) return n;
|
|
42
|
+
const r = a(n.scale - t), s = n.units < 0n, e = s ? -n.units : n.units;
|
|
43
|
+
return {
|
|
44
|
+
units: (e / r + (e % r * 2n >= r ? 1n : 0n)) * (s ? -1n : 1n),
|
|
45
|
+
scale: t
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
function N(n, i) {
|
|
49
|
+
const t = n.units < 0n, r = t ? -n.units : n.units;
|
|
50
|
+
let s = r.toString().padStart(n.scale + 1, "0"), e = n.scale ? s.slice(0, -n.scale) + "." + s.slice(-n.scale) : s;
|
|
51
|
+
if (e.includes(".") && (e = e.replace(/\.?0+$/, "")), i !== void 0 && i > 0) {
|
|
52
|
+
const c = e.split(".");
|
|
53
|
+
e = c[0] + "." + (c[1] ?? "").padEnd(Math.min(100, i), "0");
|
|
54
|
+
}
|
|
55
|
+
return (t && r !== 0n ? "-" : "") + e;
|
|
56
|
+
}
|
|
57
|
+
function M(n, i) {
|
|
58
|
+
const t = n / i;
|
|
59
|
+
return n < 0n && n % i !== 0n ? t - 1n : t;
|
|
60
|
+
}
|
|
61
|
+
function y(n, i) {
|
|
62
|
+
return -M(-n, i);
|
|
63
|
+
}
|
|
64
|
+
function S(n, i) {
|
|
65
|
+
const { step: t, base: r, min: s, max: e } = i;
|
|
66
|
+
if (s && e && h(s, e) > 0) return;
|
|
67
|
+
let c = i.precision === void 0 ? n : w(n, i.precision);
|
|
68
|
+
if (i.strict) {
|
|
69
|
+
const o = Math.max(
|
|
70
|
+
c.scale,
|
|
71
|
+
t.scale,
|
|
72
|
+
r.scale,
|
|
73
|
+
(s == null ? void 0 : s.scale) ?? 0,
|
|
74
|
+
(e == null ? void 0 : e.scale) ?? 0
|
|
75
|
+
), I = c.units * a(o - c.scale), u = t.units * a(o - t.scale), m = r.units * a(o - r.scale), g = I - m, p = g < 0n, x = p ? -g : g;
|
|
76
|
+
let l = (x / u + (x % u * 2n >= u ? 1n : 0n)) * (p ? -1n : 1n);
|
|
77
|
+
const f = s ? y(s.units * a(o - s.scale) - m, u) : void 0, d = e ? M(e.units * a(o - e.scale) - m, u) : void 0;
|
|
78
|
+
if (f !== void 0 && d !== void 0 && f > d) return;
|
|
79
|
+
f !== void 0 && l < f && (l = f), d !== void 0 && l > d && (l = d), c = { units: m + l * u, scale: o };
|
|
80
|
+
} else
|
|
81
|
+
s && h(c, s) < 0 && (c = s), e && h(c, e) > 0 && (c = e);
|
|
82
|
+
return c;
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
B as decimal,
|
|
86
|
+
D as decimalAdd,
|
|
87
|
+
h as decimalCompare,
|
|
88
|
+
w as decimalRound,
|
|
89
|
+
N as decimalText,
|
|
90
|
+
S as normalizeDecimal
|
|
91
|
+
};
|
|
@@ -1,25 +1,55 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { computed as f, ref as h } from "vue";
|
|
2
|
+
const v = Symbol(
|
|
3
|
+
"hys-ui-overlay-owner"
|
|
4
|
+
), t = [], l = h(0);
|
|
5
|
+
function b(o, d, m) {
|
|
6
|
+
const n = Symbol(o);
|
|
7
|
+
t.push({ id: n, kind: o, dismiss: d, base: m }), l.value = t.length;
|
|
8
|
+
const g = f(() => {
|
|
9
|
+
var r;
|
|
10
|
+
l.value;
|
|
11
|
+
let e = -2;
|
|
12
|
+
for (const i of t) {
|
|
13
|
+
const u = (r = i.base) == null ? void 0 : r.call(i);
|
|
14
|
+
if (e = Math.max(
|
|
15
|
+
e + 2,
|
|
16
|
+
Number.isFinite(u) ? Math.max(0, u) : i.kind === "floating" ? 1200 : 100
|
|
17
|
+
), i.id === n) return e;
|
|
18
|
+
}
|
|
19
|
+
return o === "floating" ? 1200 : 100;
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
id: n,
|
|
23
|
+
zIndex: g,
|
|
24
|
+
isTop: () => {
|
|
25
|
+
var e;
|
|
26
|
+
return ((e = t.at(-1)) == null ? void 0 : e.id) === n;
|
|
27
|
+
},
|
|
28
|
+
unregister: () => {
|
|
29
|
+
const e = t.findIndex((r) => r.id === n);
|
|
30
|
+
e >= 0 && t.splice(e, 1), l.value = t.length;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
12
33
|
}
|
|
13
|
-
let
|
|
14
|
-
function
|
|
15
|
-
|
|
34
|
+
let a = 0, c = "", s = "", y = "";
|
|
35
|
+
function w() {
|
|
36
|
+
if (a++ === 0) {
|
|
37
|
+
c = document.body.style.overflow, s = document.body.style.paddingRight, y = document.body.style.getPropertyPriority("padding-right");
|
|
38
|
+
const d = document.documentElement.clientWidth > 0 ? Math.max(0, window.innerWidth - document.documentElement.clientWidth) : 0;
|
|
39
|
+
d && (document.body.style.paddingRight = (parseFloat(getComputedStyle(document.body).paddingRight) || 0) + d + "px"), document.body.style.overflow = "hidden";
|
|
40
|
+
}
|
|
16
41
|
let o = !1;
|
|
17
42
|
return () => {
|
|
18
|
-
o || (o = !0, --
|
|
43
|
+
o || (o = !0, --a === 0 && (document.body.style.overflow = c, document.body.style.setProperty(
|
|
44
|
+
"padding-right",
|
|
45
|
+
s,
|
|
46
|
+
y
|
|
47
|
+
)));
|
|
19
48
|
};
|
|
20
49
|
}
|
|
21
50
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
51
|
+
w as lockBodyScroll,
|
|
52
|
+
l as overlayCount,
|
|
53
|
+
v as overlayOwnerKey,
|
|
54
|
+
b as registerOverlay
|
|
25
55
|
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
const a = (t) => Number.isFinite(t) ? Math.max(0, Math.min(100, t)) : 0, h = (t, o, e, i) => Number.isFinite(t) ? Math.max(e, Math.min(i, t)) : o, u = "var(--hys-ui-primary,var(--hys-ui-theme-primary))", y = (t) => ({
|
|
2
|
+
normal: u,
|
|
3
|
+
active: u,
|
|
4
|
+
success: "var(--hys-ui-success,var(--hys-ui-theme-success,#16a46e))",
|
|
5
|
+
warning: "var(--hys-ui-warning,var(--hys-ui-theme-warning,#d9860c))",
|
|
6
|
+
error: "var(--hys-ui-red,var(--hys-ui-theme-red,#ed4556))"
|
|
7
|
+
})[t] || u, f = (t, o) => typeof t == "string" && t.trim() ? t.trim() : o;
|
|
8
|
+
function m(t) {
|
|
9
|
+
return typeof t == "number" ? Number.isFinite(t) ? (t % 360 + 360) % 360 : 90 : {
|
|
10
|
+
"to top": 0,
|
|
11
|
+
"to top right": 45,
|
|
12
|
+
"to right": 90,
|
|
13
|
+
"to bottom right": 135,
|
|
14
|
+
"to bottom": 180,
|
|
15
|
+
"to bottom left": 225,
|
|
16
|
+
"to left": 270,
|
|
17
|
+
"to top left": 315
|
|
18
|
+
}[t ?? "to right"] ?? 90;
|
|
19
|
+
}
|
|
20
|
+
function p(t, o, e) {
|
|
21
|
+
var i;
|
|
22
|
+
if (typeof t == "function")
|
|
23
|
+
try {
|
|
24
|
+
return { color: f(t(o), e) };
|
|
25
|
+
} catch {
|
|
26
|
+
return { color: e };
|
|
27
|
+
}
|
|
28
|
+
if (Array.isArray(t)) {
|
|
29
|
+
if (t.every((r) => typeof r == "string")) {
|
|
30
|
+
const r = t.filter(
|
|
31
|
+
(n) => n.trim()
|
|
32
|
+
);
|
|
33
|
+
return r.length > 1 ? {
|
|
34
|
+
color: r[0],
|
|
35
|
+
gradient: {
|
|
36
|
+
angle: 90,
|
|
37
|
+
stops: r.map((n, c) => ({
|
|
38
|
+
offset: c / (r.length - 1) * 100,
|
|
39
|
+
color: n
|
|
40
|
+
}))
|
|
41
|
+
}
|
|
42
|
+
} : { color: r[0] || e };
|
|
43
|
+
}
|
|
44
|
+
const s = t.filter(
|
|
45
|
+
(r) => r && Number.isFinite(r.value) && typeof r.color == "string" && r.color.trim()
|
|
46
|
+
).map((r) => ({ ...r, value: a(r.value) })).sort((r, n) => r.value - n.value);
|
|
47
|
+
return {
|
|
48
|
+
color: ((i = s.find((r) => o <= r.value) ?? s.at(-1)) == null ? void 0 : i.color) || e
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
if (t && typeof t == "object") {
|
|
52
|
+
const s = t, r = [
|
|
53
|
+
{ offset: 0, color: f(s.from, e) },
|
|
54
|
+
...(s.stops ?? []).filter(
|
|
55
|
+
(n) => n && Number.isFinite(n.offset) && typeof n.color == "string" && n.color.trim()
|
|
56
|
+
).map((n) => ({
|
|
57
|
+
offset: a(n.offset),
|
|
58
|
+
color: n.color
|
|
59
|
+
})),
|
|
60
|
+
{ offset: 100, color: f(s.to, e) }
|
|
61
|
+
].sort((n, c) => n.offset - c.offset);
|
|
62
|
+
return {
|
|
63
|
+
color: r[0].color,
|
|
64
|
+
gradient: { stops: r, angle: m(s.direction) }
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
return { color: f(t, e) };
|
|
68
|
+
}
|
|
69
|
+
function $(t) {
|
|
70
|
+
return t.gradient ? `linear-gradient(${t.gradient.angle}deg,${t.gradient.stops.map((o) => `${o.color} ${o.offset}%`).join(",")})` : t.color;
|
|
71
|
+
}
|
|
72
|
+
function l(t) {
|
|
73
|
+
const o = t * Math.PI / 180, e = Math.sin(o) * 50, i = -Math.cos(o) * 50;
|
|
74
|
+
return { x1: 50 - e, y1: 50 - i, x2: 50 + e, y2: 50 + i };
|
|
75
|
+
}
|
|
76
|
+
function M(t, o, e) {
|
|
77
|
+
const i = (s) => {
|
|
78
|
+
const r = s * Math.PI / 180;
|
|
79
|
+
return `${+(50 + t * Math.cos(r)).toFixed(5)} ${+(50 + t * Math.sin(r)).toFixed(5)}`;
|
|
80
|
+
};
|
|
81
|
+
return e <= 0 ? "" : e >= 359.99999 ? `M ${i(o)} A ${t} ${t} 0 1 1 ${i(o + 180)} A ${t} ${t} 0 1 1 ${i(o + 360)}` : `M ${i(o)} A ${t} ${t} 0 ${e > 180 ? 1 : 0} 1 ${i(o + e)}`;
|
|
82
|
+
}
|
|
83
|
+
let g = 0;
|
|
84
|
+
const v = () => `hys-ui-progress-${++g}`;
|
|
85
|
+
export {
|
|
86
|
+
M as progressArc,
|
|
87
|
+
$ as progressCssPaint,
|
|
88
|
+
l as progressGradientCoordinates,
|
|
89
|
+
v as progressId,
|
|
90
|
+
h as progressNumber,
|
|
91
|
+
p as progressPaint,
|
|
92
|
+
a as progressPercent,
|
|
93
|
+
y as progressStatusColor
|
|
94
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function N(e, i, c, m, n) {
|
|
2
|
+
if (Array.isArray(e))
|
|
3
|
+
return e[i <= c ? 0 : i >= m ? 2 : 1] ?? e.at(-1) ?? n;
|
|
4
|
+
if (!e || typeof e != "object") return n;
|
|
5
|
+
const y = Object.entries(e).filter(([t]) => Number.isFinite(Number(t))).sort((t, r) => Number(t[0]) - Number(r[0]));
|
|
6
|
+
let u = n;
|
|
7
|
+
for (const [t, r] of y) {
|
|
8
|
+
const o = r && typeof r == "object" && "value" in r && ("excluded" in r || Object.keys(r).every((f) => f === "value")), b = o ? r.value : r;
|
|
9
|
+
if (u = b, i < Number(t) || i === Number(t) && !(o && r.excluded))
|
|
10
|
+
return b;
|
|
11
|
+
}
|
|
12
|
+
return u;
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
N as ratingLevel
|
|
16
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { toRaw as g } from "vue";
|
|
2
|
+
function W(a) {
|
|
3
|
+
let r = 0;
|
|
4
|
+
const s = /* @__PURE__ */ new WeakMap();
|
|
5
|
+
return (e) => {
|
|
6
|
+
if (e && typeof e == "object") {
|
|
7
|
+
const n = g(e), o = a().split(".").reduce(
|
|
8
|
+
(l, i) => l && typeof l == "object" && Object.prototype.hasOwnProperty.call(l, i) ? l[i] : void 0,
|
|
9
|
+
n
|
|
10
|
+
);
|
|
11
|
+
return o != null && typeof o != "object" ? "object:" + typeof o + ":" + String(o) : (s.has(n) || s.set(n, ++r), "reference:" + s.get(n));
|
|
12
|
+
}
|
|
13
|
+
return typeof e + ":" + String(e);
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
function z(a, r, s) {
|
|
17
|
+
const e = [], n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new WeakSet();
|
|
18
|
+
let l = 0;
|
|
19
|
+
const i = r.label ?? "label", u = r.value ?? "value", K = r.options ?? "options", v = r.disabled ?? "disabled";
|
|
20
|
+
function p(x, d, O = !1, b = "") {
|
|
21
|
+
x.forEach((t, h) => {
|
|
22
|
+
if (!t || typeof t != "object") return;
|
|
23
|
+
const w = t[K], j = O || !!t[v], f = String(t[i] ?? t[u] ?? "");
|
|
24
|
+
if (Array.isArray(w)) {
|
|
25
|
+
const k = g(t);
|
|
26
|
+
if (o.has(k)) return;
|
|
27
|
+
o.add(k);
|
|
28
|
+
const S = d ? d + " / " + f : f;
|
|
29
|
+
e.push({ key: "group:" + b + h, group: S, index: -1 }), p(w, S, j, b + h + ".");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const c = t[u];
|
|
33
|
+
if (c == null || !["string", "number", "boolean", "object"].includes(typeof c))
|
|
34
|
+
return;
|
|
35
|
+
const y = s(c);
|
|
36
|
+
n.has(y) || (n.add(y), e.push({
|
|
37
|
+
key: y,
|
|
38
|
+
option: {
|
|
39
|
+
...t,
|
|
40
|
+
value: c,
|
|
41
|
+
label: f,
|
|
42
|
+
disabled: j
|
|
43
|
+
},
|
|
44
|
+
group: d,
|
|
45
|
+
index: l++
|
|
46
|
+
}));
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
return p(a), e;
|
|
50
|
+
}
|
|
51
|
+
export {
|
|
52
|
+
z as normalizeSelectOptions,
|
|
53
|
+
W as selectKeyFactory
|
|
54
|
+
};
|