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,150 @@
|
|
|
1
|
+
const N = (n) => typeof n + ":" + n;
|
|
2
|
+
function g(n, r) {
|
|
3
|
+
const s = typeof r == "string" ? r.split(".") : r;
|
|
4
|
+
let o = n;
|
|
5
|
+
for (const e of s) {
|
|
6
|
+
if (o == null || typeof o != "object") return;
|
|
7
|
+
o = o[e];
|
|
8
|
+
}
|
|
9
|
+
return o;
|
|
10
|
+
}
|
|
11
|
+
const M = (n) => n < 576 ? "xs" : n < 768 ? "sm" : n < 992 ? "md" : n < 1200 ? "lg" : n < 1600 ? "xl" : "xxl";
|
|
12
|
+
function S(n, r, s = !0) {
|
|
13
|
+
const o = /* @__PURE__ */ new Set();
|
|
14
|
+
function e(y, u, i = /* @__PURE__ */ new Set(), p = 0) {
|
|
15
|
+
return p > 32 ? [] : y.flatMap((d) => {
|
|
16
|
+
if (i.has(d) || d.hidden || !s && d.type === "expand" || d.responsive && !d.responsive.includes(r) || o.has(d.key))
|
|
17
|
+
return [];
|
|
18
|
+
o.add(d.key);
|
|
19
|
+
const v = d.fixed === !1 ? void 0 : d.fixed === !0 ? "left" : d.fixed ?? u, b = d.children ? e(
|
|
20
|
+
d.children,
|
|
21
|
+
v,
|
|
22
|
+
/* @__PURE__ */ new Set([...i, d]),
|
|
23
|
+
p + 1
|
|
24
|
+
) : void 0;
|
|
25
|
+
return b && !b.length ? [] : [{ ...d, fixed: v, children: b }];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
const t = e(n);
|
|
29
|
+
function a(y, u) {
|
|
30
|
+
return y.flatMap((i) => {
|
|
31
|
+
if (i.children) {
|
|
32
|
+
const p = a(i.children, u);
|
|
33
|
+
return p.length ? [{ ...i, children: p, fixed: u }] : [];
|
|
34
|
+
}
|
|
35
|
+
return i.fixed === u ? [i] : [];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
const f = [
|
|
39
|
+
...a(t, "left"),
|
|
40
|
+
...a(t),
|
|
41
|
+
...a(t, "right")
|
|
42
|
+
];
|
|
43
|
+
function m(y) {
|
|
44
|
+
return y.flatMap((u) => u.children ? m(u.children) : [u]);
|
|
45
|
+
}
|
|
46
|
+
function l(y) {
|
|
47
|
+
return Math.max(
|
|
48
|
+
1,
|
|
49
|
+
...y.map((u) => u.children ? 1 + l(u.children) : 1)
|
|
50
|
+
);
|
|
51
|
+
}
|
|
52
|
+
const c = l(f), h = Array.from({ length: c }, () => []);
|
|
53
|
+
function x(y, u) {
|
|
54
|
+
for (const i of y) {
|
|
55
|
+
const p = i.children ? m(i.children) : [i];
|
|
56
|
+
h[u].push({
|
|
57
|
+
column: i,
|
|
58
|
+
key: i.key + ":" + (i.fixed || "center"),
|
|
59
|
+
leaves: p,
|
|
60
|
+
colspan: p.length,
|
|
61
|
+
rowspan: i.children ? 1 : c - u,
|
|
62
|
+
fixed: i.fixed === "left" || i.fixed === "right" ? i.fixed : void 0
|
|
63
|
+
}), i.children && x(i.children, u + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return x(f, 0), { leaves: m(f), headers: h };
|
|
67
|
+
}
|
|
68
|
+
function F(n, r) {
|
|
69
|
+
const s = new Intl.Collator("zh-CN", {
|
|
70
|
+
numeric: !0,
|
|
71
|
+
sensitivity: "base"
|
|
72
|
+
}), o = n.flatMap((e) => {
|
|
73
|
+
const t = r.find((a) => a.key === e.key);
|
|
74
|
+
return t && t.sortable !== "custom" ? [{ ...e, column: t }] : [];
|
|
75
|
+
});
|
|
76
|
+
return (e, t) => {
|
|
77
|
+
for (const { direction: a, column: f } of o) {
|
|
78
|
+
if (f.sorter) {
|
|
79
|
+
const l = f.sorter(e, t);
|
|
80
|
+
if (Number.isFinite(l) && l !== 0)
|
|
81
|
+
return (a === "asc" ? 1 : -1) * l;
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
const m = Array.isArray(f.sortBy) ? f.sortBy : [f.sortBy ?? f.dataIndex ?? f.key];
|
|
85
|
+
for (const l of m) {
|
|
86
|
+
const c = typeof l == "function" ? l(e) : g(e, l), h = typeof l == "function" ? l(t) : g(t, l);
|
|
87
|
+
if (c == null || h == null) {
|
|
88
|
+
if (c == null && h == null) continue;
|
|
89
|
+
return c == null ? 1 : -1;
|
|
90
|
+
}
|
|
91
|
+
const x = typeof c == "number" && typeof h == "number" ? Number.isNaN(c) ? Number.isNaN(h) ? 0 : 1 : Number.isNaN(h) ? -1 : c - h : s.compare(String(c), String(h));
|
|
92
|
+
if (Number.isFinite(x) && x !== 0)
|
|
93
|
+
return (a === "asc" ? 1 : -1) * x;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
return 0;
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
function w(n, r) {
|
|
100
|
+
var o;
|
|
101
|
+
const s = /* @__PURE__ */ new Map();
|
|
102
|
+
for (const e of r) {
|
|
103
|
+
const t = n[e.key];
|
|
104
|
+
if (!(t != null && t.length) || !e.filters || e.filterMethod) continue;
|
|
105
|
+
const a = new Set(t), f = k(e.filters), m = new Map(f.map((l) => [l.value, l]));
|
|
106
|
+
for (const l of t) {
|
|
107
|
+
const c = (o = m.get(l)) == null ? void 0 : o.children;
|
|
108
|
+
if (c)
|
|
109
|
+
for (const h of k(c))
|
|
110
|
+
a.add(h.value);
|
|
111
|
+
}
|
|
112
|
+
s.set(e.key, a);
|
|
113
|
+
}
|
|
114
|
+
return (e) => r.every((t) => {
|
|
115
|
+
const a = n[t.key];
|
|
116
|
+
return a != null && a.length ? s.has(t.key) ? s.get(t.key).has(
|
|
117
|
+
g(
|
|
118
|
+
e,
|
|
119
|
+
t.dataIndex ?? t.key
|
|
120
|
+
)
|
|
121
|
+
) : a.some(
|
|
122
|
+
(f) => t.filterMethod ? t.filterMethod(f, e, t) : String(g(e, t.dataIndex ?? t.key) ?? "").toLocaleLowerCase().includes(String(f).toLocaleLowerCase())
|
|
123
|
+
) : !0;
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
function k(n) {
|
|
127
|
+
const r = [], s = /* @__PURE__ */ new Set(), o = [...n].reverse();
|
|
128
|
+
for (; o.length; ) {
|
|
129
|
+
const e = o.pop();
|
|
130
|
+
s.has(e) || (s.add(e), r.push(e), e.children && o.push(...[...e.children].reverse()));
|
|
131
|
+
}
|
|
132
|
+
return r;
|
|
133
|
+
}
|
|
134
|
+
function C(n, r) {
|
|
135
|
+
if (r.summary === "count") return n.length;
|
|
136
|
+
const s = n.map((e) => g(e, r.dataIndex ?? r.key)).filter((e) => typeof e == "number" && Number.isFinite(e));
|
|
137
|
+
if (!s.length) return "—";
|
|
138
|
+
const o = s.reduce((e, t) => e + t, 0);
|
|
139
|
+
return r.summary === "sum" ? +o.toFixed(12) : r.summary === "avg" ? +(o / s.length).toFixed(12) : r.summary === "min" ? s.reduce((e, t) => Math.min(e, t)) : r.summary === "max" ? s.reduce((e, t) => Math.max(e, t)) : "";
|
|
140
|
+
}
|
|
141
|
+
export {
|
|
142
|
+
M as tableBreakpoint,
|
|
143
|
+
S as tableColumns,
|
|
144
|
+
F as tableCompare,
|
|
145
|
+
k as tableFilterOptions,
|
|
146
|
+
w as tableFilterPredicate,
|
|
147
|
+
C as tableSummary,
|
|
148
|
+
N as tableToken,
|
|
149
|
+
g as tableValue
|
|
150
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function f(t, n) {
|
|
2
|
+
if (!n || typeof n == "string" && !n.length)
|
|
3
|
+
return [t];
|
|
4
|
+
if (n instanceof RegExp)
|
|
5
|
+
return t.split(new RegExp(n.source, n.flags.replace(/[gy]/g, ""))).filter((e) => e !== void 0);
|
|
6
|
+
const g = (typeof n == "string" ? [n] : [...n]).filter(Boolean).sort((e, i) => i.length - e.length);
|
|
7
|
+
return g.length ? t.split(
|
|
8
|
+
new RegExp(
|
|
9
|
+
g.map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")).join("|"),
|
|
10
|
+
"u"
|
|
11
|
+
)
|
|
12
|
+
) : [t];
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
f as splitTags
|
|
16
|
+
};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
let f;
|
|
2
|
+
function u(t) {
|
|
3
|
+
const n = Intl.Segmenter;
|
|
4
|
+
return n && (f ?? (f = new n(void 0, { granularity: "grapheme" })), f) ? Array.from(f.segment(t), (r) => r.segment) : Array.from(t);
|
|
5
|
+
}
|
|
6
|
+
function m(t, n) {
|
|
7
|
+
if (typeof n == "function")
|
|
8
|
+
try {
|
|
9
|
+
const r = n(t);
|
|
10
|
+
if (Number.isFinite(r) && r >= 0) return r;
|
|
11
|
+
} catch {
|
|
12
|
+
}
|
|
13
|
+
return n ? u(t).length : t.length;
|
|
14
|
+
}
|
|
15
|
+
function h(t, n, r) {
|
|
16
|
+
if (n === void 0 || m(t, r) <= n) return t;
|
|
17
|
+
const i = r ? u(t) : Array.from(t);
|
|
18
|
+
let e = 0, o = i.length;
|
|
19
|
+
for (; e < o; ) {
|
|
20
|
+
const c = Math.ceil((e + o) / 2);
|
|
21
|
+
m(i.slice(0, c).join(""), r) <= n ? e = c : o = c - 1;
|
|
22
|
+
}
|
|
23
|
+
return i.slice(0, e).join("");
|
|
24
|
+
}
|
|
25
|
+
function s(t) {
|
|
26
|
+
if (t === void 0 || t === "") return;
|
|
27
|
+
const n = Number(t);
|
|
28
|
+
return Number.isFinite(n) && n >= 0 ? Math.floor(n) : void 0;
|
|
29
|
+
}
|
|
30
|
+
export {
|
|
31
|
+
m as textCount,
|
|
32
|
+
s as textLengthLimit,
|
|
33
|
+
h as textLimit
|
|
34
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function n(e, i) {
|
|
2
|
+
return i.split(".").reduce(
|
|
3
|
+
(r, t) => r != null && typeof r == "object" ? r[t] : void 0,
|
|
4
|
+
e
|
|
5
|
+
);
|
|
6
|
+
}
|
|
7
|
+
const s = (e) => typeof e == "string" || typeof e == "number" ? String(e) : "", u = (e) => ({
|
|
8
|
+
primary: "var(--hys-ui-primary,var(--hys-ui-theme-primary))",
|
|
9
|
+
success: "var(--hys-ui-success,#16a46e)",
|
|
10
|
+
warning: "var(--hys-ui-warning,#d9860c)",
|
|
11
|
+
danger: "var(--hys-ui-red,var(--hys-ui-theme-red,#ed4556))",
|
|
12
|
+
info: "var(--hys-ui-info,#3867f5)",
|
|
13
|
+
neutral: "var(--hys-ui-muted,var(--hys-ui-theme-muted))"
|
|
14
|
+
})[e] || "var(--hys-ui-muted,var(--hys-ui-theme-muted))";
|
|
15
|
+
export {
|
|
16
|
+
n as timelineRead,
|
|
17
|
+
s as timelineText,
|
|
18
|
+
u as timelineTone
|
|
19
|
+
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
const d = (e) => typeof e + ":" + e;
|
|
2
|
+
function l(e, a) {
|
|
3
|
+
return a.split(".").reduce(
|
|
4
|
+
(t, o) => t != null && Object.prototype.hasOwnProperty.call(Object(t), o) ? t[o] : void 0,
|
|
5
|
+
e
|
|
6
|
+
);
|
|
7
|
+
}
|
|
8
|
+
function f(e) {
|
|
9
|
+
var o, s, c;
|
|
10
|
+
const a = [], t = /* @__PURE__ */ new Map();
|
|
11
|
+
for (const n of e.options) {
|
|
12
|
+
if (!n || typeof n != "object") continue;
|
|
13
|
+
const i = e.rowKey ? e.rowKey(n) : l(n, ((o = e.fieldNames) == null ? void 0 : o.value) ?? "value");
|
|
14
|
+
if (typeof i != "string" && (typeof i != "number" || !Number.isFinite(i)) || t.has(i))
|
|
15
|
+
continue;
|
|
16
|
+
const r = {
|
|
17
|
+
key: i,
|
|
18
|
+
label: String(
|
|
19
|
+
l(n, ((s = e.fieldNames) == null ? void 0 : s.label) ?? "label") ?? i
|
|
20
|
+
),
|
|
21
|
+
disabled: !!l(
|
|
22
|
+
n,
|
|
23
|
+
((c = e.fieldNames) == null ? void 0 : c.disabled) ?? "disabled"
|
|
24
|
+
),
|
|
25
|
+
option: n
|
|
26
|
+
};
|
|
27
|
+
a.push(r), t.set(r.key, r);
|
|
28
|
+
}
|
|
29
|
+
return { rows: a, map: t };
|
|
30
|
+
}
|
|
31
|
+
const u = (e) => ({
|
|
32
|
+
leftTitle: "待选择",
|
|
33
|
+
rightTitle: "已选择",
|
|
34
|
+
search: "筛选成员",
|
|
35
|
+
emptyLeft: "暂无待选成员",
|
|
36
|
+
emptyRight: "暂无已选成员",
|
|
37
|
+
noMatch: "无匹配成员",
|
|
38
|
+
loading: "加载中…",
|
|
39
|
+
selectAll: "全选{title}当前页",
|
|
40
|
+
invert: "反选当前页",
|
|
41
|
+
remove: "移除{label}",
|
|
42
|
+
moveRight: "添加选中项",
|
|
43
|
+
moveLeft: "移除选中项",
|
|
44
|
+
dragRight: "拖动到已选择区域",
|
|
45
|
+
dragLeft: "拖动到待选择区域",
|
|
46
|
+
doubleClickRight: "双击移入已选择区域,也可拖拽移动",
|
|
47
|
+
doubleClickLeft: "双击移回待选择区域,也可拖拽移动",
|
|
48
|
+
dragCount: "正在拖动 {count} 项",
|
|
49
|
+
moved: "已{direction} {count} 项",
|
|
50
|
+
added: "移入",
|
|
51
|
+
removed: "移出",
|
|
52
|
+
firstPage: "首页",
|
|
53
|
+
previousPage: "上一页",
|
|
54
|
+
nextPage: "下一页",
|
|
55
|
+
lastPage: "末页",
|
|
56
|
+
perPage: "每页条数",
|
|
57
|
+
...e
|
|
58
|
+
}), g = (e, a) => e.replace(/\{(\w+)\}/g, (t, o) => String(a[o] ?? t));
|
|
59
|
+
export {
|
|
60
|
+
g as transferLabel,
|
|
61
|
+
f as transferRows,
|
|
62
|
+
d as transferToken,
|
|
63
|
+
l as transferValue,
|
|
64
|
+
u as transferWords
|
|
65
|
+
};
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
const j = {
|
|
2
|
+
search: "搜索节点…",
|
|
3
|
+
empty: "暂无数据",
|
|
4
|
+
noMatch: "无匹配节点",
|
|
5
|
+
loading: "加载中",
|
|
6
|
+
retry: "重试",
|
|
7
|
+
loadError: "加载失败",
|
|
8
|
+
expand: "展开",
|
|
9
|
+
collapse: "折叠",
|
|
10
|
+
check: "勾选",
|
|
11
|
+
select: "选择节点",
|
|
12
|
+
clear: "清除选择",
|
|
13
|
+
close: "关闭",
|
|
14
|
+
tree: "树形列表"
|
|
15
|
+
}, m = (n) => typeof n == "string" || typeof n == "number" && Number.isFinite(n), L = (n) => [
|
|
16
|
+
...new Set(n.filter(m))
|
|
17
|
+
];
|
|
18
|
+
function o(n, i) {
|
|
19
|
+
return i.split(".").reduce(
|
|
20
|
+
(a, t) => a != null && Object.prototype.hasOwnProperty.call(Object(a), t) ? a[t] : void 0,
|
|
21
|
+
n
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
function _(n, i, a) {
|
|
25
|
+
const t = i.split(".");
|
|
26
|
+
if (t.some((d) => ["__proto__", "constructor", "prototype"].includes(d)))
|
|
27
|
+
return n;
|
|
28
|
+
const b = { ...n };
|
|
29
|
+
let h = b, f = n;
|
|
30
|
+
for (const d of t.slice(0, -1)) {
|
|
31
|
+
const c = f == null ? void 0 : f[d];
|
|
32
|
+
h[d] = Array.isArray(c) ? [...c] : c && typeof c == "object" ? { ...c } : {}, h = h[d], f = c;
|
|
33
|
+
}
|
|
34
|
+
return h[t.at(-1)] = a, b;
|
|
35
|
+
}
|
|
36
|
+
function K(n) {
|
|
37
|
+
return {
|
|
38
|
+
id: "id",
|
|
39
|
+
label: "label",
|
|
40
|
+
children: "children",
|
|
41
|
+
disabled: "disabled",
|
|
42
|
+
disableCheckbox: "disableCheckbox",
|
|
43
|
+
selectable: "selectable",
|
|
44
|
+
checkable: "checkable",
|
|
45
|
+
icon: "icon",
|
|
46
|
+
hasChildren: "hasChildren",
|
|
47
|
+
isLeaf: "isLeaf",
|
|
48
|
+
...n.fieldNames
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function F(n, i, a = /* @__PURE__ */ new Map()) {
|
|
52
|
+
var y, g, k;
|
|
53
|
+
const t = K(i), b = /* @__PURE__ */ new Map(), h = [], f = [], d = [
|
|
54
|
+
{ nodes: n }
|
|
55
|
+
];
|
|
56
|
+
let c = !1;
|
|
57
|
+
for (; d.length; ) {
|
|
58
|
+
const l = d.pop(), s = [];
|
|
59
|
+
for (const e of l.nodes) {
|
|
60
|
+
if (!e || typeof e != "object") {
|
|
61
|
+
c = !0;
|
|
62
|
+
continue;
|
|
63
|
+
}
|
|
64
|
+
const r = typeof i.nodeKey == "function" ? i.nodeKey(e) : o(
|
|
65
|
+
e,
|
|
66
|
+
typeof i.nodeKey == "string" ? i.nodeKey : t.id
|
|
67
|
+
);
|
|
68
|
+
if (!m(r) || b.has(r)) {
|
|
69
|
+
c = !0;
|
|
70
|
+
continue;
|
|
71
|
+
}
|
|
72
|
+
const p = a.get(r) ?? o(e, t.children), C = Array.isArray(p) ? p : [], x = !!o(e, t.disabled) || !!(i.inheritDisabled && ((y = l.parent) != null && y.disabled)), w = o(e, t.isLeaf) === !0, A = {
|
|
73
|
+
key: r,
|
|
74
|
+
node: e,
|
|
75
|
+
label: String(o(e, t.label) ?? r),
|
|
76
|
+
parent: (g = l.parent) == null ? void 0 : g.key,
|
|
77
|
+
children: [],
|
|
78
|
+
depth: l.parent ? l.parent.depth + 1 : 0,
|
|
79
|
+
index: 0,
|
|
80
|
+
pos: s.length + 1,
|
|
81
|
+
size: 0,
|
|
82
|
+
disabled: x,
|
|
83
|
+
checkboxDisabled: x || !!o(e, t.disableCheckbox),
|
|
84
|
+
checkable: o(e, t.checkable) !== !1,
|
|
85
|
+
selectable: o(e, t.selectable) !== !1,
|
|
86
|
+
leaf: w,
|
|
87
|
+
hasChildren: !w && !!(C.length || !a.has(r) && o(e, t.hasChildren)),
|
|
88
|
+
icon: o(e, t.icon)
|
|
89
|
+
};
|
|
90
|
+
b.set(r, A), s.push(A), (((k = l.parent) == null ? void 0 : k.children) ?? f).push(r);
|
|
91
|
+
}
|
|
92
|
+
for (const e of s) e.size = s.length;
|
|
93
|
+
for (let e = s.length - 1; e >= 0; e--) {
|
|
94
|
+
const r = s[e], p = a.get(r.key) ?? o(r.node, t.children);
|
|
95
|
+
d.push({
|
|
96
|
+
nodes: r.leaf ? [] : Array.isArray(p) ? p : [],
|
|
97
|
+
parent: r
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const u = [...f].reverse();
|
|
102
|
+
for (; u.length; ) {
|
|
103
|
+
const l = b.get(u.pop());
|
|
104
|
+
l.index = h.length, h.push(l);
|
|
105
|
+
for (let s = l.children.length - 1; s >= 0; s--)
|
|
106
|
+
u.push(l.children[s]);
|
|
107
|
+
}
|
|
108
|
+
return { map: b, rows: h, roots: f, fields: t, invalid: c };
|
|
109
|
+
}
|
|
110
|
+
export {
|
|
111
|
+
_ as treeAssign,
|
|
112
|
+
o as treeField,
|
|
113
|
+
K as treeFields,
|
|
114
|
+
F as treeIndex,
|
|
115
|
+
m as treeKey,
|
|
116
|
+
L as treeKeys,
|
|
117
|
+
j as treeLocale
|
|
118
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { treeField as y, treeKey as g, treeAssign as I, treeIndex as k } from "./tree.js";
|
|
2
|
+
function v(s) {
|
|
3
|
+
const { value: i, ...r } = s.fieldNames ?? {};
|
|
4
|
+
return { id: i ?? "value", ...r };
|
|
5
|
+
}
|
|
6
|
+
function b(s, i) {
|
|
7
|
+
const r = /* @__PURE__ */ new Map();
|
|
8
|
+
if (!i.simpleMode) return { nodes: s, raw: r };
|
|
9
|
+
const c = typeof i.simpleMode == "object" ? i.simpleMode : {}, m = v(i), w = c.id ?? "id", K = c.parentId ?? "parentId", M = m.children ?? "children", d = /* @__PURE__ */ new Map();
|
|
10
|
+
for (const e of s) {
|
|
11
|
+
const n = y(e, w);
|
|
12
|
+
if (!g(n) || d.has(n)) continue;
|
|
13
|
+
const t = y(e, K), o = typeof i.nodeKey == "function" ? i.nodeKey(e) : y(
|
|
14
|
+
e,
|
|
15
|
+
typeof i.nodeKey == "string" ? i.nodeKey : m.id
|
|
16
|
+
);
|
|
17
|
+
g(o) && r.set(o, e), d.set(n, {
|
|
18
|
+
node: e,
|
|
19
|
+
parent: g(t) && t !== c.rootParentId && t !== n ? t : void 0,
|
|
20
|
+
children: []
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
const a = /* @__PURE__ */ new Set();
|
|
24
|
+
for (const e of d.keys()) {
|
|
25
|
+
if (a.has(e)) continue;
|
|
26
|
+
const n = [], t = /* @__PURE__ */ new Map();
|
|
27
|
+
let o = e;
|
|
28
|
+
for (; o !== void 0 && d.has(o) && !a.has(o) && !t.has(o); )
|
|
29
|
+
t.set(o, n.length), n.push(o), o = d.get(o).parent;
|
|
30
|
+
if (o !== void 0 && t.has(o))
|
|
31
|
+
for (const u of n.slice(t.get(o)))
|
|
32
|
+
d.get(u).parent = void 0;
|
|
33
|
+
for (const u of n) a.add(u);
|
|
34
|
+
}
|
|
35
|
+
const l = [];
|
|
36
|
+
for (const [e, n] of d) {
|
|
37
|
+
const t = n.parent === void 0 ? void 0 : d.get(n.parent);
|
|
38
|
+
t ? t.children.push(e) : l.push(e);
|
|
39
|
+
}
|
|
40
|
+
const f = [], h = [...l].reverse();
|
|
41
|
+
for (; h.length; ) {
|
|
42
|
+
const e = h.pop();
|
|
43
|
+
f.push(e);
|
|
44
|
+
const n = d.get(e).children;
|
|
45
|
+
for (let t = n.length - 1; t >= 0; t--) h.push(n[t]);
|
|
46
|
+
}
|
|
47
|
+
const p = /* @__PURE__ */ new Map();
|
|
48
|
+
for (let e = f.length - 1; e >= 0; e--) {
|
|
49
|
+
const n = f[e], t = d.get(n);
|
|
50
|
+
p.set(
|
|
51
|
+
n,
|
|
52
|
+
I(
|
|
53
|
+
t.node,
|
|
54
|
+
M,
|
|
55
|
+
t.children.map((o) => p.get(o))
|
|
56
|
+
)
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
return { nodes: l.map((e) => p.get(e)), raw: r };
|
|
60
|
+
}
|
|
61
|
+
const x = (s, i) => k(s, {
|
|
62
|
+
nodes: s,
|
|
63
|
+
fieldNames: v(i),
|
|
64
|
+
nodeKey: i.nodeKey,
|
|
65
|
+
inheritDisabled: !0
|
|
66
|
+
});
|
|
67
|
+
export {
|
|
68
|
+
x as selectTreeIndex,
|
|
69
|
+
v as treeSelectFields,
|
|
70
|
+
b as treeSelectForest
|
|
71
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
const r = {
|
|
2
|
+
choose: "选择文件",
|
|
3
|
+
drag: "点击选择或拖入文件",
|
|
4
|
+
checking: "正在检查文件…",
|
|
5
|
+
localHint: "文件通过事件交给业务层上传",
|
|
6
|
+
uploadHint: "支持选择、拖入和上传进度管理",
|
|
7
|
+
files: "文件列表",
|
|
8
|
+
ready: "待上传",
|
|
9
|
+
uploading: "上传中",
|
|
10
|
+
success: "已完成",
|
|
11
|
+
error: "上传失败",
|
|
12
|
+
queued: "等待上传",
|
|
13
|
+
removing: "正在移除",
|
|
14
|
+
submit: "开始上传",
|
|
15
|
+
abort: "取消上传",
|
|
16
|
+
retry: "重试",
|
|
17
|
+
clear: "清空",
|
|
18
|
+
remove: "移除",
|
|
19
|
+
preview: "预览",
|
|
20
|
+
download: "下载",
|
|
21
|
+
empty: "暂无文件"
|
|
22
|
+
}, n = (t) => ["ready", "uploading", "success", "error"].includes(t.status ?? "") ? t.status : t.raw ? "ready" : "success", a = (t) => n(t) === "success" ? 100 : Number.isFinite(t.percentage) ? Math.max(0, Math.min(100, t.percentage)) : 0, o = (t) => {
|
|
23
|
+
var e, s;
|
|
24
|
+
return !!((s = t.type ?? ((e = t.raw) == null ? void 0 : e.type)) != null && s.startsWith("image/")) || /\.(png|jpe?g|gif|webp|avif|bmp|svg)(?:[?#]|$)/i.test(
|
|
25
|
+
t.name || t.url || ""
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
function c(t) {
|
|
29
|
+
return !Number.isFinite(t) || t < 0 ? "" : t < 1024 ? t + " B" : t < 1048576 ? (t / 1024).toFixed(1) + " KB" : (t / 1048576).toFixed(1) + " MB";
|
|
30
|
+
}
|
|
31
|
+
function i(t, e = "custom") {
|
|
32
|
+
return t instanceof Error ? Object.assign(new Error(t.message, { cause: t }), t, {
|
|
33
|
+
kind: t.kind ?? e
|
|
34
|
+
}) : Object.assign(new Error(typeof t == "string" ? t : "上传失败"), {
|
|
35
|
+
kind: e
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
function u(t, e = !1) {
|
|
39
|
+
if (t)
|
|
40
|
+
try {
|
|
41
|
+
const s = new URL(t, document.baseURI);
|
|
42
|
+
if (["http:", "https:", "blob:"].includes(s.protocol) || e && /^data:image\//i.test(t))
|
|
43
|
+
return s.href;
|
|
44
|
+
} catch {
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export {
|
|
48
|
+
i as uploadFailure,
|
|
49
|
+
o as uploadImage,
|
|
50
|
+
r as uploadLocale,
|
|
51
|
+
a as uploadPercent,
|
|
52
|
+
c as uploadSize,
|
|
53
|
+
n as uploadStatus,
|
|
54
|
+
u as uploadUrl
|
|
55
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { uploadFailure as i } from "./upload.js";
|
|
2
|
+
function m(e) {
|
|
3
|
+
const r = new XMLHttpRequest(), l = new FormData();
|
|
4
|
+
for (const [t, a] of Object.entries(e.data))
|
|
5
|
+
for (const d of Array.isArray(a) ? a : [a])
|
|
6
|
+
d !== void 0 && l.append(
|
|
7
|
+
t,
|
|
8
|
+
d instanceof Blob ? d : d === null ? "" : String(d)
|
|
9
|
+
);
|
|
10
|
+
l.append(
|
|
11
|
+
e.name,
|
|
12
|
+
e.body,
|
|
13
|
+
e.body instanceof File && e.body !== e.file.raw ? e.body.name : e.file.name
|
|
14
|
+
);
|
|
15
|
+
let n = !1;
|
|
16
|
+
const s = () => {
|
|
17
|
+
e.signal.removeEventListener("abort", u), r.upload.onprogress = null, r.onload = r.onerror = r.ontimeout = r.onabort = null;
|
|
18
|
+
}, o = (t, a) => {
|
|
19
|
+
n || (n = !0, s(), !e.signal.aborted && (t ? e.onError(t) : e.onSuccess(a)));
|
|
20
|
+
}, c = (t, a) => Object.assign(i(t, a), {
|
|
21
|
+
status: r.status,
|
|
22
|
+
response: f(),
|
|
23
|
+
url: e.action,
|
|
24
|
+
method: e.method
|
|
25
|
+
});
|
|
26
|
+
function f() {
|
|
27
|
+
const t = r.responseText;
|
|
28
|
+
if (t)
|
|
29
|
+
try {
|
|
30
|
+
return JSON.parse(t);
|
|
31
|
+
} catch {
|
|
32
|
+
return t;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
function u() {
|
|
36
|
+
n || (n = !0, s(), r.abort());
|
|
37
|
+
}
|
|
38
|
+
r.open(e.method, e.action, !0), r.withCredentials = e.withCredentials, r.timeout = e.timeout;
|
|
39
|
+
for (const [t, a] of Object.entries(e.headers))
|
|
40
|
+
r.setRequestHeader(t, a);
|
|
41
|
+
if (r.upload.onprogress = (t) => {
|
|
42
|
+
!n && !e.signal.aborted && t.lengthComputable && t.total > 0 && e.onProgress(t.loaded / t.total * 100);
|
|
43
|
+
}, r.onload = () => {
|
|
44
|
+
r.status >= 200 && r.status < 300 ? o(void 0, f()) : o(c("上传请求失败(" + r.status + ")", "http"));
|
|
45
|
+
}, r.onerror = () => o(c("网络连接失败", "network")), r.ontimeout = () => o(c("上传请求超时", "timeout")), r.onabort = () => {
|
|
46
|
+
n = !0, s();
|
|
47
|
+
}, e.signal.addEventListener("abort", u, { once: !0 }), e.signal.aborted)
|
|
48
|
+
return u(), u;
|
|
49
|
+
try {
|
|
50
|
+
r.send(l);
|
|
51
|
+
} catch (t) {
|
|
52
|
+
o(t);
|
|
53
|
+
}
|
|
54
|
+
return u;
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
m as uploadRequest
|
|
58
|
+
};
|