niuma-ui 1.1.12 → 1.2.1
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 +28 -18
- package/README.en.md +12 -9
- package/README.md +13 -10
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/RsAlert.css +111 -0
- package/dist/components/RsAlert.d.ts +32 -0
- package/dist/components/RsAlert.impl.js +83 -0
- package/dist/components/RsAlert.js +8 -0
- package/dist/components/RsAvatar.css +60 -0
- package/dist/components/RsAvatar.d.ts +30 -0
- package/dist/components/RsAvatar.impl.js +59 -0
- package/dist/components/RsAvatar.js +7 -0
- package/dist/components/RsBadge.css +41 -0
- package/dist/components/RsBadge.d.ts +18 -0
- package/dist/components/RsBadge.impl.js +13 -0
- package/dist/components/RsBadge.js +8 -0
- package/dist/components/RsBreadcrumb.css +37 -0
- package/dist/components/RsBreadcrumb.d.ts +11 -0
- package/dist/components/RsBreadcrumb.impl.js +26 -0
- package/dist/components/RsBreadcrumb.js +7 -0
- package/dist/components/RsBreadcrumbItems.d.ts +8 -0
- package/dist/components/RsBreadcrumbItems.impl.js +40 -0
- package/dist/components/RsBreadcrumbItems.js +5 -0
- package/dist/components/RsButton.css +298 -0
- package/dist/components/RsButton.d.ts +56 -0
- package/dist/components/RsButton.impl.js +244 -0
- package/dist/components/RsButton.js +8 -0
- package/dist/components/RsCalendarGrid.css +99 -0
- package/dist/components/RsCalendarGrid.d.ts +30 -0
- package/dist/components/RsCalendarGrid.impl.js +182 -0
- package/dist/components/RsCalendarGrid.js +8 -0
- package/dist/components/RsCard.css +282 -0
- package/dist/components/RsCard.d.ts +78 -0
- package/dist/components/RsCard.impl.js +104 -0
- package/dist/components/RsCard.js +7 -0
- package/dist/components/RsCheckbox.css +104 -0
- package/dist/components/RsCheckbox.d.ts +36 -0
- package/dist/components/RsCheckbox.impl.js +86 -0
- package/dist/components/RsCheckbox.js +7 -0
- package/dist/components/RsCodeBlock.css +102 -0
- package/dist/components/RsCodeBlock.d.ts +34 -0
- package/dist/components/RsCodeBlock.impl.js +173 -0
- package/dist/components/RsCodeBlock.js +8 -0
- package/dist/components/RsCodeEditor.css +214 -0
- package/dist/components/RsCodeEditor.d.ts +88 -0
- package/dist/components/RsCodeEditor.impl.js +308 -0
- package/dist/components/RsCodeEditor.js +8 -0
- package/dist/components/RsConfigProvider.css +7 -0
- package/dist/components/RsConfigProvider.d.ts +36 -0
- package/dist/components/RsConfigProvider.impl.js +49 -0
- package/dist/components/RsConfigProvider.js +8 -0
- package/dist/components/RsConfirmDialog.css +118 -0
- package/dist/components/RsConfirmDialog.d.ts +72 -0
- package/dist/components/RsConfirmDialog.impl.js +207 -0
- package/dist/components/RsConfirmDialog.js +7 -0
- package/dist/components/RsContainer.css +94 -0
- package/dist/components/RsContainer.d.ts +52 -0
- package/dist/components/RsContainer.impl.js +99 -0
- package/dist/components/RsContainer.js +8 -0
- package/dist/components/RsContextMenu.css +178 -0
- package/dist/components/RsContextMenu.d.ts +35 -0
- package/dist/components/RsContextMenu.impl.js +81 -0
- package/dist/components/RsContextMenu.js +7 -0
- package/dist/components/RsContextMenuItems.d.ts +11 -0
- package/dist/components/RsContextMenuItems.impl.js +90 -0
- package/dist/components/RsContextMenuItems.js +5 -0
- package/dist/components/RsDatePicker-1.css +157 -0
- package/dist/components/RsDatePicker.css +100 -0
- package/dist/components/RsDatePicker.d.ts +72 -0
- package/dist/components/RsDatePicker.impl.js +719 -0
- package/dist/components/RsDatePicker.js +10 -0
- package/dist/components/RsDateTimePicker.d.ts +50 -0
- package/dist/components/RsDateTimePicker.impl.js +70 -0
- package/dist/components/RsDateTimePicker.js +5 -0
- package/dist/components/RsDescriptions.css +86 -0
- package/dist/components/RsDescriptions.d.ts +34 -0
- package/dist/components/RsDescriptions.impl.js +69 -0
- package/dist/components/RsDescriptions.js +7 -0
- package/dist/components/RsDescriptionsItem.d.ts +21 -0
- package/dist/components/RsDescriptionsItem.impl.js +26 -0
- package/dist/components/RsDescriptionsItem.js +5 -0
- package/dist/components/RsDialog.css +298 -0
- package/dist/components/RsDialog.d.ts +143 -0
- package/dist/components/RsDialog.impl.js +410 -0
- package/dist/components/RsDialog.js +7 -0
- package/dist/components/RsDivider.css +51 -0
- package/dist/components/RsDivider.d.ts +20 -0
- package/dist/components/RsDivider.impl.js +31 -0
- package/dist/components/RsDivider.js +8 -0
- package/dist/components/RsDrawer.css +368 -0
- package/dist/components/RsDrawer.d.ts +104 -0
- package/dist/components/RsDrawer.impl.js +497 -0
- package/dist/components/RsDrawer.js +7 -0
- package/dist/components/RsDropdown.css +157 -0
- package/dist/components/RsDropdown.d.ts +34 -0
- package/dist/components/RsDropdown.impl.js +100 -0
- package/dist/components/RsDropdown.js +7 -0
- package/dist/components/RsDropdownItems.d.ts +15 -0
- package/dist/components/RsDropdownItems.impl.js +99 -0
- package/dist/components/RsDropdownItems.js +5 -0
- package/dist/components/RsDynamicTags.css +148 -0
- package/dist/components/RsDynamicTags.d.ts +71 -0
- package/dist/components/RsDynamicTags.impl.js +313 -0
- package/dist/components/RsDynamicTags.js +8 -0
- package/dist/components/RsEmpty.css +52 -0
- package/dist/components/RsEmpty.d.ts +32 -0
- package/dist/components/RsEmpty.impl.js +43 -0
- package/dist/components/RsEmpty.js +7 -0
- package/dist/components/RsForm.css +30 -0
- package/dist/components/RsForm.d.ts +80 -0
- package/dist/components/RsForm.impl.js +188 -0
- package/dist/components/RsForm.js +8 -0
- package/dist/components/RsFormItem.css +52 -0
- package/dist/components/RsFormItem.d.ts +78 -0
- package/dist/components/RsFormItem.impl.js +288 -0
- package/dist/components/RsFormItem.js +8 -0
- package/dist/components/RsFormItemControl.d.ts +21 -0
- package/dist/components/RsFormItemControl.impl.js +19 -0
- package/dist/components/RsFormItemControl.js +5 -0
- package/dist/components/RsFormList.d.ts +23 -0
- package/dist/components/RsFormList.impl.js +86 -0
- package/dist/components/RsFormList.js +5 -0
- package/dist/components/RsIcon.css +14 -0
- package/dist/components/RsIcon.d.ts +24 -0
- package/dist/components/RsIcon.impl.js +77 -0
- package/dist/components/RsIcon.js +8 -0
- package/dist/components/RsInput.css +528 -0
- package/dist/components/RsInput.d.ts +147 -0
- package/dist/components/RsInput.impl.js +439 -0
- package/dist/components/RsInput.js +8 -0
- package/dist/components/RsInputNumber.css +163 -0
- package/dist/components/RsInputNumber.d.ts +88 -0
- package/dist/components/RsInputNumber.impl.js +375 -0
- package/dist/components/RsInputNumber.js +8 -0
- package/dist/components/RsLabel.css +33 -0
- package/dist/components/RsLabel.d.ts +25 -0
- package/dist/components/RsLabel.impl.js +45 -0
- package/dist/components/RsLabel.js +8 -0
- package/dist/components/RsLink.css +45 -0
- package/dist/components/RsLink.d.ts +25 -0
- package/dist/components/RsLink.impl.js +59 -0
- package/dist/components/RsLink.js +7 -0
- package/dist/components/RsLoading.css +106 -0
- package/dist/components/RsLoading.d.ts +24 -0
- package/dist/components/RsLoading.impl.js +72 -0
- package/dist/components/RsLoading.js +7 -0
- package/dist/components/RsLoadingBar.css +20 -0
- package/dist/components/RsLoadingBar.d.ts +31 -0
- package/dist/components/RsLoadingBar.impl.js +111 -0
- package/dist/components/RsLoadingBar.js +8 -0
- package/dist/components/RsMarkdown.css +214 -0
- package/dist/components/RsMarkdown.d.ts +36 -0
- package/dist/components/RsMarkdown.impl.js +139 -0
- package/dist/components/RsMarkdown.js +7 -0
- package/dist/components/RsMenu.css +200 -0
- package/dist/components/RsMenu.d.ts +28 -0
- package/dist/components/RsMenu.impl.js +108 -0
- package/dist/components/RsMenu.js +7 -0
- package/dist/components/RsMenuItems.d.ts +25 -0
- package/dist/components/RsMenuItems.impl.js +282 -0
- package/dist/components/RsMenuItems.js +5 -0
- package/dist/components/RsMonacoEditor.css +28 -0
- package/dist/components/RsMonacoEditor.d.ts +105 -0
- package/dist/components/RsMonacoEditor.impl.js +353 -0
- package/dist/components/RsMonacoEditor.js +8 -0
- package/dist/components/RsPagination.css +83 -0
- package/dist/components/RsPagination.d.ts +44 -0
- package/dist/components/RsPagination.impl.js +208 -0
- package/dist/components/RsPagination.js +8 -0
- package/dist/components/RsPopover.css +24 -0
- package/dist/components/RsPopover.d.ts +43 -0
- package/dist/components/RsPopover.impl.js +71 -0
- package/dist/components/RsPopover.js +7 -0
- package/dist/components/RsProseEditor.css +19 -0
- package/dist/components/RsProseEditor.d.ts +38 -0
- package/dist/components/RsProseEditor.impl.js +137 -0
- package/dist/components/RsProseEditor.js +8 -0
- package/dist/components/RsRadio.css +19 -0
- package/dist/components/RsRadio.d.ts +34 -0
- package/dist/components/RsRadio.impl.js +66 -0
- package/dist/components/RsRadio.js +7 -0
- package/dist/components/RsRadioItem.css +90 -0
- package/dist/components/RsRadioItem.d.ts +23 -0
- package/dist/components/RsRadioItem.impl.js +55 -0
- package/dist/components/RsRadioItem.js +7 -0
- package/dist/components/RsScrollbar.css +68 -0
- package/dist/components/RsScrollbar.d.ts +31 -0
- package/dist/components/RsScrollbar.impl.js +81 -0
- package/dist/components/RsScrollbar.js +7 -0
- package/dist/components/RsSelect.css +233 -0
- package/dist/components/RsSelect.d.ts +148 -0
- package/dist/components/RsSelect.impl.js +506 -0
- package/dist/components/RsSelect.js +8 -0
- package/dist/components/RsSidebar.css +61 -0
- package/dist/components/RsSidebar.d.ts +44 -0
- package/dist/components/RsSidebar.impl.js +63 -0
- package/dist/components/RsSidebar.js +8 -0
- package/dist/components/RsSidebarGroup.css +15 -0
- package/dist/components/RsSidebarGroup.d.ts +17 -0
- package/dist/components/RsSidebarGroup.impl.js +22 -0
- package/dist/components/RsSidebarGroup.js +8 -0
- package/dist/components/RsSidebarItem.css +45 -0
- package/dist/components/RsSidebarItem.d.ts +20 -0
- package/dist/components/RsSidebarItem.impl.js +41 -0
- package/dist/components/RsSidebarItem.js +8 -0
- package/dist/components/RsSplitPane.css +183 -0
- package/dist/components/RsSplitPane.d.ts +51 -0
- package/dist/components/RsSplitPane.impl.js +408 -0
- package/dist/components/RsSplitPane.js +7 -0
- package/dist/components/RsStatCard.css +51 -0
- package/dist/components/RsStatCard.d.ts +26 -0
- package/dist/components/RsStatCard.impl.js +41 -0
- package/dist/components/RsStatCard.js +8 -0
- package/dist/components/RsSteps.css +83 -0
- package/dist/components/RsSteps.d.ts +22 -0
- package/dist/components/RsSteps.impl.js +55 -0
- package/dist/components/RsSteps.js +8 -0
- package/dist/components/RsSwitch.css +101 -0
- package/dist/components/RsSwitch.d.ts +41 -0
- package/dist/components/RsSwitch.impl.js +92 -0
- package/dist/components/RsSwitch.js +7 -0
- package/dist/components/RsTable.d.ts +139 -0
- package/dist/components/RsTable.impl.js +676 -0
- package/dist/components/RsTable.js +5 -0
- package/dist/components/RsTabs.css +616 -0
- package/dist/components/RsTabs.d.ts +92 -0
- package/dist/components/RsTabs.impl.js +526 -0
- package/dist/components/RsTabs.js +7 -0
- package/dist/components/RsTag.css +94 -0
- package/dist/components/RsTag.d.ts +33 -0
- package/dist/components/RsTag.impl.js +70 -0
- package/dist/components/RsTag.js +8 -0
- package/dist/components/RsTerminal.css +119 -0
- package/dist/components/RsTerminal.d.ts +85 -0
- package/dist/components/RsTerminal.impl.js +525 -0
- package/dist/components/RsTerminal.js +8 -0
- package/dist/components/RsTimePicker-1.css +98 -0
- package/dist/components/RsTimePicker.css +106 -0
- package/dist/components/RsTimePicker.d.ts +41 -0
- package/dist/components/RsTimePicker.impl.js +374 -0
- package/dist/components/RsTimePicker.js +10 -0
- package/dist/components/RsTimePickerColumns.css +104 -0
- package/dist/components/RsTimePickerColumns.d.ts +30 -0
- package/dist/components/RsTimePickerColumns.impl.js +172 -0
- package/dist/components/RsTimePickerColumns.js +8 -0
- package/dist/components/RsToaster.css +329 -0
- package/dist/components/RsToaster.d.ts +17 -0
- package/dist/components/RsToaster.impl.js +67 -0
- package/dist/components/RsToaster.js +7 -0
- package/dist/components/RsToolbar.css +61 -0
- package/dist/components/RsToolbar.d.ts +43 -0
- package/dist/components/RsToolbar.impl.js +57 -0
- package/dist/components/RsToolbar.js +7 -0
- package/dist/components/RsTooltip.css +59 -0
- package/dist/components/RsTooltip.d.ts +47 -0
- package/dist/components/RsTooltip.impl.js +88 -0
- package/dist/components/RsTooltip.js +7 -0
- package/dist/components/RsTooltipProvider.d.ts +26 -0
- package/dist/components/RsTooltipProvider.impl.js +32 -0
- package/dist/components/RsTooltipProvider.js +5 -0
- package/dist/components/RsTree.css +308 -0
- package/dist/components/RsTree.d.ts +131 -0
- package/dist/components/RsTree.impl.js +762 -0
- package/dist/components/RsTree.js +8 -0
- package/dist/components/RsUpload.css +191 -0
- package/dist/components/RsUpload.d.ts +38 -0
- package/dist/components/RsUpload.impl.js +198 -0
- package/dist/components/RsUpload.js +8 -0
- package/dist/components/RsVNodeHost.d.ts +18 -0
- package/dist/components/RsVNodeHost.impl.js +18 -0
- package/dist/components/RsVNodeHost.js +5 -0
- package/dist/components/RsVirtualList.css +29 -0
- package/dist/components/RsVirtualList.d.ts +37 -0
- package/dist/components/RsVirtualList.impl.js +138 -0
- package/dist/components/RsVirtualList.js +8 -0
- package/dist/components/avatar-utils.d.ts +11 -0
- package/dist/components/avatar-utils.js +13 -0
- package/dist/components/breadcrumb-utils.d.ts +12 -0
- package/dist/components/breadcrumb-utils.js +12 -0
- package/dist/components/button-utils.d.ts +17 -0
- package/dist/components/button-utils.js +13 -0
- package/dist/components/class-utils.d.ts +2 -0
- package/dist/components/code-editor-utils.d.ts +33 -0
- package/dist/components/code-editor-utils.js +64 -0
- package/dist/components/code-mirror-completion.d.ts +5 -0
- package/dist/components/code-mirror-completion.js +37 -0
- package/dist/components/code-mirror-diagnostics.d.ts +6 -0
- package/dist/components/code-mirror-diagnostics.js +35 -0
- package/dist/components/code-mirror-ghost.d.ts +8 -0
- package/dist/components/code-mirror-ghost.js +133 -0
- package/dist/components/code-mirror-inline-edit.d.ts +11 -0
- package/dist/components/code-mirror-inline-edit.js +51 -0
- package/dist/components/code-mirror-intel.d.ts +22 -0
- package/dist/components/code-mirror-intel.js +62 -0
- package/dist/components/code-mirror-lang.d.ts +10 -0
- package/dist/components/code-mirror-lang.js +113 -0
- package/dist/components/context-menu-utils.d.ts +21 -0
- package/dist/components/context-menu-utils.js +8 -0
- package/dist/components/date-picker-utils.d.ts +115 -0
- package/dist/components/date-picker-utils.js +270 -0
- package/dist/components/date-range-validation.d.ts +15 -0
- package/dist/components/date-range-validation.js +16 -0
- package/dist/components/date-validation.d.ts +15 -0
- package/dist/components/date-validation.js +46 -0
- package/dist/components/descriptions-utils.d.ts +18 -0
- package/dist/components/descriptions-utils.js +4 -0
- package/dist/components/dialog-utils.d.ts +95 -0
- package/dist/components/dialog-utils.js +58 -0
- package/dist/components/dialog-viewport.d.ts +14 -0
- package/dist/components/dialog-viewport.js +38 -0
- package/dist/components/dialog-window.d.ts +45 -0
- package/dist/components/dialog-window.js +275 -0
- package/dist/components/drawer-utils.d.ts +37 -0
- package/dist/components/drawer-utils.js +59 -0
- package/dist/components/dropdown-utils.d.ts +13 -0
- package/dist/components/dropdown-utils.js +12 -0
- package/dist/components/form-item-control.d.ts +7 -0
- package/dist/components/form-item-control.js +46 -0
- package/dist/components/form-path.d.ts +29 -0
- package/dist/components/form-path.js +78 -0
- package/dist/components/form-rules.d.ts +82 -0
- package/dist/components/form-rules.js +130 -0
- package/dist/components/form-utils.d.ts +120 -0
- package/dist/components/form-utils.js +67 -0
- package/dist/components/input-number-utils.d.ts +36 -0
- package/dist/components/input-number-utils.js +74 -0
- package/dist/components/input-rules.d.ts +15 -0
- package/dist/components/input-rules.js +59 -0
- package/dist/components/loading-utils.d.ts +6 -0
- package/dist/components/markdown-utils.d.ts +16 -0
- package/dist/components/markdown-utils.js +143 -0
- package/dist/components/menu-utils.d.ts +16 -0
- package/dist/components/menu-utils.js +29 -0
- package/dist/components/overlay-utils.d.ts +23 -0
- package/dist/components/overlay-utils.js +17 -0
- package/dist/components/pagination-utils.d.ts +9 -0
- package/dist/components/pagination-utils.js +53 -0
- package/dist/components/popover-utils.d.ts +6 -0
- package/dist/components/radio-utils.d.ts +9 -0
- package/dist/components/radio-utils.js +4 -0
- package/dist/components/reka.d.ts +2 -0
- package/dist/components/reka.js +2 -0
- package/dist/components/resolve-radius.d.ts +9 -0
- package/dist/components/resolve-radius.js +18 -0
- package/dist/components/resolve-size.d.ts +10 -0
- package/dist/components/resolve-size.js +20 -0
- package/dist/components/scrollbar-utils.d.ts +3 -0
- package/dist/components/scrollbar-utils.js +7 -0
- package/dist/components/select-utils.d.ts +83 -0
- package/dist/components/select-utils.js +211 -0
- package/dist/components/split-pane-utils.d.ts +74 -0
- package/dist/components/split-pane-utils.js +135 -0
- package/dist/components/steps-utils.d.ts +12 -0
- package/dist/components/steps-utils.js +12 -0
- package/dist/components/table/RsTableBody.d.ts +47 -0
- package/dist/components/table/RsTableBody.impl.js +312 -0
- package/dist/components/table/RsTableBody.js +5 -0
- package/dist/components/table/RsTableBodyRow.d.ts +149 -0
- package/dist/components/table/RsTableBodyRow.impl.js +438 -0
- package/dist/components/table/RsTableBodyRow.js +5 -0
- package/dist/components/table/RsTableCell.d.ts +59 -0
- package/dist/components/table/RsTableCell.impl.js +213 -0
- package/dist/components/table/RsTableCell.js +5 -0
- package/dist/components/table/RsTableCellContent.d.ts +19 -0
- package/dist/components/table/RsTableCellContent.js +25 -0
- package/dist/components/table/RsTableCellEditor.d.ts +46 -0
- package/dist/components/table/RsTableCellEditor.impl.js +341 -0
- package/dist/components/table/RsTableCellEditor.js +5 -0
- package/dist/components/table/RsTableColGroup.d.ts +18 -0
- package/dist/components/table/RsTableColGroup.impl.js +58 -0
- package/dist/components/table/RsTableColGroup.js +5 -0
- package/dist/components/table/RsTableEditGutter.d.ts +17 -0
- package/dist/components/table/RsTableEditGutter.impl.js +52 -0
- package/dist/components/table/RsTableEditGutter.js +5 -0
- package/dist/components/table/RsTableHeader.d.ts +22 -0
- package/dist/components/table/RsTableHeader.impl.js +184 -0
- package/dist/components/table/RsTableHeader.js +5 -0
- package/dist/components/table/RsTableHeaderFilter.css +24 -0
- package/dist/components/table/RsTableHeaderFilter.d.ts +19 -0
- package/dist/components/table/RsTableHeaderFilter.impl.js +102 -0
- package/dist/components/table/RsTableHeaderFilter.js +8 -0
- package/dist/components/table/RsTableRowStatus.css +30 -0
- package/dist/components/table/RsTableRowStatus.d.ts +14 -0
- package/dist/components/table/RsTableRowStatus.impl.js +44 -0
- package/dist/components/table/RsTableRowStatus.js +8 -0
- package/dist/components/table/RsTableSummaryRow.d.ts +37 -0
- package/dist/components/table/RsTableSummaryRow.impl.js +57 -0
- package/dist/components/table/RsTableSummaryRow.js +5 -0
- package/dist/components/table/rs-table-api.d.ts +65 -0
- package/dist/components/table/rs-table-api.js +22 -0
- package/dist/components/table/rs-table-compat-matrix.d.ts +24 -0
- package/dist/components/table/rs-table-compat-matrix.js +64 -0
- package/dist/components/table/rs-table-echarts-adapter.d.ts +47 -0
- package/dist/components/table/rs-table-echarts-adapter.js +49 -0
- package/dist/components/table/rs-table-feature-host.d.ts +61 -0
- package/dist/components/table/rs-table-feature-host.js +97 -0
- package/dist/components/table/rs-table-grid-nav.d.ts +22 -0
- package/dist/components/table/rs-table-grid-nav.js +80 -0
- package/dist/components/table/rs-table-header-types.d.ts +45 -0
- package/dist/components/table/rs-table-module-registry.d.ts +37 -0
- package/dist/components/table/rs-table-module-registry.js +51 -0
- package/dist/components/table/rs-table-props.d.ts +315 -0
- package/dist/components/table/rs-table-props.js +64 -0
- package/dist/components/table/rs-table-view-context.d.ts +218 -0
- package/dist/components/table/rs-table-view-context.js +47 -0
- package/dist/components/table/table-chart-utils.d.ts +62 -0
- package/dist/components/table/table-chart-utils.js +91 -0
- package/dist/components/table/table-context-menu.d.ts +13 -0
- package/dist/components/table/table-context-menu.js +30 -0
- package/dist/components/table/table-edit-utils.d.ts +94 -0
- package/dist/components/table/table-edit-utils.js +282 -0
- package/dist/components/table/table-features.d.ts +149 -0
- package/dist/components/table/table-features.js +119 -0
- package/dist/components/table/table-keys.d.ts +5 -0
- package/dist/components/table/table-keys.js +6 -0
- package/dist/components/table/table-summary-utils.d.ts +90 -0
- package/dist/components/table/table-summary-utils.js +97 -0
- package/dist/components/table-drag.d.ts +39 -0
- package/dist/components/table-drag.js +130 -0
- package/dist/components/table-utils.d.ts +440 -0
- package/dist/components/table-utils.js +722 -0
- package/dist/components/tabs-utils.d.ts +71 -0
- package/dist/components/tabs-utils.js +147 -0
- package/dist/components/terminal-utils.d.ts +59 -0
- package/dist/components/terminal-utils.js +210 -0
- package/dist/components/terminal-wheel.d.ts +24 -0
- package/dist/components/terminal-wheel.js +42 -0
- package/dist/components/time-picker-utils.d.ts +51 -0
- package/dist/components/time-picker-utils.js +158 -0
- package/dist/components/time-range-validation.d.ts +11 -0
- package/dist/components/time-range-validation.js +15 -0
- package/dist/components/time-validation.d.ts +11 -0
- package/dist/components/time-validation.js +22 -0
- package/dist/components/tree-utils.d.ts +112 -0
- package/dist/components/tree-utils.js +310 -0
- package/dist/components/upload-utils.d.ts +26 -0
- package/dist/components/upload-utils.js +177 -0
- package/dist/components/use-rs-select.d.ts +78 -0
- package/dist/components/use-rs-select.js +266 -0
- package/dist/components/virtual-list-utils.d.ts +7 -0
- package/dist/components/virtual-list-utils.js +28 -0
- package/dist/composables/assembleRsTableApi.d.ts +34 -0
- package/dist/composables/assembleRsTableApi.js +26 -0
- package/dist/composables/bindRsTableViewContext.d.ts +73 -0
- package/dist/composables/bindRsTableViewContext.js +104 -0
- package/dist/composables/createRsDialog.d.ts +77 -0
- package/dist/composables/createRsDialog.js +263 -0
- package/dist/composables/createRsTableEditEmitBridge.d.ts +16 -0
- package/dist/composables/createRsTableEditEmitBridge.js +25 -0
- package/dist/composables/useClickOutside.d.ts +2 -0
- package/dist/composables/useRsConfig.d.ts +26 -0
- package/dist/composables/useRsConfig.js +55 -0
- package/dist/composables/useRsI18n.d.ts +9 -0
- package/dist/composables/useRsI18n.js +25 -0
- package/dist/composables/useRsLoadingBar.d.ts +13 -0
- package/dist/composables/useRsLoadingBar.js +30 -0
- package/dist/composables/useRsTable.d.ts +61 -0
- package/dist/composables/useRsTable.js +57 -0
- package/dist/composables/useRsTableA11y.d.ts +35 -0
- package/dist/composables/useRsTableA11y.js +34 -0
- package/dist/composables/useRsTableChartBridge.d.ts +37 -0
- package/dist/composables/useRsTableChartBridge.js +47 -0
- package/dist/composables/useRsTableColumnLayout.d.ts +75 -0
- package/dist/composables/useRsTableColumnLayout.js +250 -0
- package/dist/composables/useRsTableColumnResize.d.ts +35 -0
- package/dist/composables/useRsTableColumnResize.js +182 -0
- package/dist/composables/useRsTableColumnVirtual.d.ts +76 -0
- package/dist/composables/useRsTableColumnVirtual.js +116 -0
- package/dist/composables/useRsTableColumns.d.ts +70 -0
- package/dist/composables/useRsTableColumns.js +132 -0
- package/dist/composables/useRsTableContextMenu.d.ts +83 -0
- package/dist/composables/useRsTableContextMenu.js +152 -0
- package/dist/composables/useRsTableCore.d.ts +177 -0
- package/dist/composables/useRsTableCore.js +164 -0
- package/dist/composables/useRsTableEditActions.d.ts +129 -0
- package/dist/composables/useRsTableEditActions.js +376 -0
- package/dist/composables/useRsTableEditLayer.d.ts +228 -0
- package/dist/composables/useRsTableEditLayer.js +146 -0
- package/dist/composables/useRsTableEngine.d.ts +115 -0
- package/dist/composables/useRsTableEngine.js +225 -0
- package/dist/composables/useRsTableGridKeyboard.d.ts +38 -0
- package/dist/composables/useRsTableGridKeyboard.js +70 -0
- package/dist/composables/useRsTableHeadless.d.ts +138 -0
- package/dist/composables/useRsTableHeadless.js +105 -0
- package/dist/composables/useRsTableInteraction.d.ts +145 -0
- package/dist/composables/useRsTableInteraction.js +249 -0
- package/dist/composables/useRsTableScrollHost.d.ts +25 -0
- package/dist/composables/useRsTableScrollHost.js +42 -0
- package/dist/composables/useRsTableScrollLayout.d.ts +42 -0
- package/dist/composables/useRsTableScrollLayout.js +195 -0
- package/dist/composables/useRsTableSelectionSource.d.ts +38 -0
- package/dist/composables/useRsTableSelectionSource.js +57 -0
- package/dist/composables/useRsTableShell.d.ts +380 -0
- package/dist/composables/useRsTableShell.js +237 -0
- package/dist/composables/useRsTableShellChrome.d.ts +126 -0
- package/dist/composables/useRsTableShellChrome.js +110 -0
- package/dist/composables/useRsTableSummary.d.ts +44 -0
- package/dist/composables/useRsTableSummary.js +52 -0
- package/dist/composables/useRsTableViewProvide.d.ts +111 -0
- package/dist/composables/useRsTableViewProvide.js +93 -0
- package/dist/composables/useRsTableVirtual.d.ts +75 -0
- package/dist/composables/useRsTableVirtual.js +83 -0
- package/dist/composables/useRsTabsNav.d.ts +33 -0
- package/dist/composables/useRsTabsNav.js +137 -0
- package/dist/composables/useRsToast.d.ts +15 -0
- package/dist/composables/useRsToast.js +30 -0
- package/dist/composables/useTableCellTooltip.d.ts +28 -0
- package/dist/composables/useTableCellTooltip.js +177 -0
- package/dist/composables/useTableEdit.d.ts +63 -0
- package/dist/composables/useTableEdit.js +176 -0
- package/dist/composables/useTableRowHighlight.d.ts +14 -0
- package/dist/composables/useTableRowHighlight.js +35 -0
- package/dist/dev/vite-codemirror-deps.d.ts +20 -0
- package/dist/dev/vite-codemirror-deps.js +16 -0
- package/dist/dev/vite-xterm-deps.d.ts +8 -0
- package/dist/dev/vite-xterm-deps.js +3 -0
- package/dist/icons/custom/api.d.ts +37 -0
- package/dist/icons/custom/api.js +56 -0
- package/dist/icons/custom/clickhouse.d.ts +37 -0
- package/dist/icons/custom/clickhouse.js +61 -0
- package/dist/icons/custom/dameng.d.ts +37 -0
- package/dist/icons/custom/dameng.js +81 -0
- package/dist/icons/custom/ftp.d.ts +37 -0
- package/dist/icons/custom/ftp.js +62 -0
- package/dist/icons/custom/kingbase.d.ts +37 -0
- package/dist/icons/custom/kingbase.js +61 -0
- package/dist/icons/custom/mongodb.d.ts +37 -0
- package/dist/icons/custom/mongodb.js +59 -0
- package/dist/icons/custom/mysql.d.ts +37 -0
- package/dist/icons/custom/mysql.js +60 -0
- package/dist/icons/custom/oracle.d.ts +37 -0
- package/dist/icons/custom/oracle.js +61 -0
- package/dist/icons/custom/postgres.d.ts +37 -0
- package/dist/icons/custom/postgres.js +61 -0
- package/dist/icons/custom/redis.d.ts +38 -0
- package/dist/icons/custom/redis.js +60 -0
- package/dist/icons/custom/sqlite.d.ts +37 -0
- package/dist/icons/custom/sqlite.js +59 -0
- package/dist/icons/custom/sqlserver.d.ts +37 -0
- package/dist/icons/custom/sqlserver.js +61 -0
- package/dist/icons/custom/vastbase.d.ts +37 -0
- package/dist/icons/custom/vastbase.js +67 -0
- package/dist/icons/lucide.d.ts +7 -0
- package/dist/icons/lucide.js +74 -0
- package/dist/icons/registry.d.ts +3 -0
- package/dist/icons/registry.js +31 -0
- package/dist/index.d.ts +209 -0
- package/dist/index.js +156 -0
- package/dist/lib/iso-local-datetime.d.ts +17 -0
- package/dist/lib/iso-local-datetime.js +103 -0
- package/dist/lib/rs-dayjs.d.ts +15 -0
- package/dist/lib/rs-dayjs.js +41 -0
- package/dist/locale/interpolate.d.ts +14 -0
- package/dist/locale/interpolate.js +24 -0
- package/dist/locale/messages.d.ts +7 -0
- package/dist/locale/messages.js +407 -0
- package/dist/locale/types.d.ts +3 -0
- package/dist/locale/types.js +4 -0
- package/dist/monaco/debug-decorations.d.ts +21 -0
- package/dist/monaco/debug-decorations2.js +44 -0
- package/dist/monaco/index.d.ts +5 -0
- package/dist/monaco/languages/index.d.ts +3 -0
- package/dist/monaco/languages/mongodb-shell.d.ts +7 -0
- package/dist/monaco/languages/mongodb-shell.js +222 -0
- package/dist/monaco/languages/types.d.ts +30 -0
- package/dist/monaco/languages/types.js +25 -0
- package/dist/monaco/setup.d.ts +9 -0
- package/dist/monaco/setup.js +53 -0
- package/dist/styles.css +2006 -0
- package/dist/theme/apply.d.ts +6 -0
- package/dist/theme/apply.js +10 -0
- package/dist/theme/css-token.d.ts +27 -0
- package/dist/theme/css-token.js +72 -0
- package/dist/theme/presets.d.ts +7 -0
- package/dist/theme/presets.js +74 -0
- package/dist/theme/types.d.ts +97 -0
- package/dist/theme/types.js +65 -0
- package/dist/utils/rs-clipboard.d.ts +17 -0
- package/dist/utils/rs-clipboard.js +187 -0
- package/dist/vite-plugins/monaco-zh-nls.d.ts +7 -0
- package/dist/vite-plugins/monaco-zh-nls.js +84 -0
- package/dist/vite-plugins/niuma-ui-host.d.ts +22 -0
- package/dist/vite-plugins/niuma-ui-host.js +254 -0
- package/dist/vite-plugins/rewrite-named-imports.d.ts +5 -0
- package/dist/vite-plugins/rewrite-named-imports.js +5 -0
- package/dist/vite-plugins/silence-antlr-parse-console.d.ts +19 -0
- package/dist/vite-plugins/silence-antlr-parse-console.js +35 -0
- package/package.json +58 -16
- package/src/__tests__/RsBadge.spec.ts +0 -40
- package/src/__tests__/RsBreadcrumb.spec.ts +0 -172
- package/src/__tests__/RsButton.spec.ts +0 -188
- package/src/__tests__/RsCalendarGrid.spec.ts +0 -101
- package/src/__tests__/RsCard.spec.ts +0 -256
- package/src/__tests__/RsCheckbox.spec.ts +0 -36
- package/src/__tests__/RsCodeEditor.spec.ts +0 -111
- package/src/__tests__/RsConfirmDialog.spec.ts +0 -285
- package/src/__tests__/RsContainer.spec.ts +0 -89
- package/src/__tests__/RsContextMenu.spec.ts +0 -130
- package/src/__tests__/RsDatePicker.spec.ts +0 -109
- package/src/__tests__/RsDateTimePicker.spec.ts +0 -80
- package/src/__tests__/RsDescriptions.spec.ts +0 -50
- package/src/__tests__/RsDialog.spec.ts +0 -595
- package/src/__tests__/RsDrawer.spec.ts +0 -292
- package/src/__tests__/RsDropdown.spec.ts +0 -135
- package/src/__tests__/RsDynamicTags.spec.ts +0 -52
- package/src/__tests__/RsEmpty.spec.ts +0 -99
- package/src/__tests__/RsForm.spec.ts +0 -417
- package/src/__tests__/RsFormItem.spec.ts +0 -478
- package/src/__tests__/RsFormList.spec.ts +0 -109
- package/src/__tests__/RsIcon.spec.ts +0 -258
- package/src/__tests__/RsInput.spec.ts +0 -377
- package/src/__tests__/RsInputNumber.spec.ts +0 -151
- package/src/__tests__/RsLabel.spec.ts +0 -106
- package/src/__tests__/RsLink.spec.ts +0 -49
- package/src/__tests__/RsLoading.spec.ts +0 -84
- package/src/__tests__/RsMarkdown.spec.ts +0 -180
- package/src/__tests__/RsMenu.spec.ts +0 -511
- package/src/__tests__/RsNewComponents.spec.ts +0 -17
- package/src/__tests__/RsPagination.spec.ts +0 -223
- package/src/__tests__/RsPopover.spec.ts +0 -140
- package/src/__tests__/RsScrollbar.spec.ts +0 -53
- package/src/__tests__/RsSelect.spec.ts +0 -850
- package/src/__tests__/RsSidebar.spec.ts +0 -119
- package/src/__tests__/RsSplitPane.spec.ts +0 -177
- package/src/__tests__/RsStatCard.spec.ts +0 -79
- package/src/__tests__/RsSteps.spec.ts +0 -125
- package/src/__tests__/RsSwitch.spec.ts +0 -74
- package/src/__tests__/RsTable.a11y.spec.ts +0 -83
- package/src/__tests__/RsTable.dom-baseline.spec.ts +0 -87
- package/src/__tests__/RsTable.perf.spec.ts +0 -122
- package/src/__tests__/RsTable.spec.ts +0 -1207
- package/src/__tests__/RsTable.ssr.spec.ts +0 -71
- package/src/__tests__/RsTable.summary.spec.ts +0 -45
- package/src/__tests__/RsTabs.spec.ts +0 -426
- package/src/__tests__/RsTerminal.spec.ts +0 -218
- package/src/__tests__/RsTimePicker.spec.ts +0 -97
- package/src/__tests__/RsToaster.spec.ts +0 -95
- package/src/__tests__/RsToolbar.spec.ts +0 -75
- package/src/__tests__/RsTooltip.spec.ts +0 -154
- package/src/__tests__/RsTree.spec.ts +0 -573
- package/src/__tests__/RsUpload.spec.ts +0 -216
- package/src/__tests__/RsVirtualList.spec.ts +0 -77
- package/src/__tests__/createRsDialog.spec.ts +0 -158
- package/src/__tests__/css-token.spec.ts +0 -51
- package/src/__tests__/date-picker-utils.spec.ts +0 -119
- package/src/__tests__/dialog-utils.spec.ts +0 -43
- package/src/__tests__/dialog-viewport.spec.ts +0 -38
- package/src/__tests__/form-path.spec.ts +0 -46
- package/src/__tests__/form-rules.spec.ts +0 -139
- package/src/__tests__/iso-local-datetime.spec.ts +0 -58
- package/src/__tests__/perf-budgets.ts +0 -32
- package/src/__tests__/rs-clipboard.spec.ts +0 -142
- package/src/__tests__/rs-select-model.types.spec.ts +0 -28
- package/src/__tests__/rs-table-api.spec.ts +0 -206
- package/src/__tests__/rs-table-compat-matrix.spec.ts +0 -108
- package/src/__tests__/rs-table-echarts-adapter.spec.ts +0 -43
- package/src/__tests__/rs-table-grid-nav.spec.ts +0 -63
- package/src/__tests__/rs-table-isolation.spec.ts +0 -158
- package/src/__tests__/rs-table-slots.types.spec.ts +0 -20
- package/src/__tests__/setup.ts +0 -12
- package/src/__tests__/split-pane-utils.spec.ts +0 -157
- package/src/__tests__/table-chart-utils.spec.ts +0 -88
- package/src/__tests__/table-drag.spec.ts +0 -35
- package/src/__tests__/table-edit-utils.spec.ts +0 -194
- package/src/__tests__/table-summary-utils.spec.ts +0 -62
- package/src/__tests__/table-utils.spec.ts +0 -410
- package/src/__tests__/theme.spec.ts +0 -49
- package/src/__tests__/tree-utils.spec.ts +0 -234
- package/src/__tests__/useRsTableColumnResize.spec.ts +0 -25
- package/src/__tests__/useRsTableCore.perf.spec.ts +0 -170
- package/src/__tests__/useTableCellTooltip.spec.ts +0 -101
- package/src/components/RsAlert.vue +0 -212
- package/src/components/RsAvatar.vue +0 -115
- package/src/components/RsBadge.vue +0 -59
- package/src/components/RsBreadcrumb.vue +0 -65
- package/src/components/RsBreadcrumbItems.vue +0 -36
- package/src/components/RsButton.vue +0 -596
- package/src/components/RsCalendarGrid.vue +0 -318
- package/src/components/RsCard.vue +0 -421
- package/src/components/RsCheckbox.vue +0 -189
- package/src/components/RsCodeBlock.vue +0 -327
- package/src/components/RsCodeEditor.vue +0 -597
- package/src/components/RsConfigProvider.vue +0 -92
- package/src/components/RsConfirmDialog.vue +0 -365
- package/src/components/RsContainer.vue +0 -235
- package/src/components/RsContextMenu.vue +0 -277
- package/src/components/RsContextMenuItems.vue +0 -77
- package/src/components/RsDatePicker.vue +0 -1033
- package/src/components/RsDateTimePicker.vue +0 -67
- package/src/components/RsDescriptions.vue +0 -186
- package/src/components/RsDescriptionsItem.vue +0 -32
- package/src/components/RsDialog.vue +0 -813
- package/src/components/RsDivider.vue +0 -89
- package/src/components/RsDrawer.vue +0 -979
- package/src/components/RsDropdown.vue +0 -283
- package/src/components/RsDropdownItems.vue +0 -90
- package/src/components/RsDynamicTags.vue +0 -531
- package/src/components/RsEmpty.vue +0 -107
- package/src/components/RsForm.vue +0 -287
- package/src/components/RsFormItem.vue +0 -423
- package/src/components/RsFormItemControl.vue +0 -21
- package/src/components/RsFormList.vue +0 -117
- package/src/components/RsIcon.vue +0 -104
- package/src/components/RsInput.vue +0 -1508
- package/src/components/RsInputNumber.vue +0 -582
- package/src/components/RsLabel.vue +0 -69
- package/src/components/RsLink.vue +0 -106
- package/src/components/RsLoading.vue +0 -171
- package/src/components/RsLoadingBar.vue +0 -151
- package/src/components/RsMarkdown.vue +0 -348
- package/src/components/RsMenu.vue +0 -314
- package/src/components/RsMenuItems.vue +0 -263
- package/src/components/RsMonacoEditor.vue +0 -567
- package/src/components/RsPagination.vue +0 -263
- package/src/components/RsPopover.vue +0 -79
- package/src/components/RsProseEditor.vue +0 -160
- package/src/components/RsRadio.vue +0 -81
- package/src/components/RsRadioItem.vue +0 -156
- package/src/components/RsScrollbar.vue +0 -171
- package/src/components/RsSelect.vue +0 -786
- package/src/components/RsSidebar.vue +0 -121
- package/src/components/RsSidebarGroup.vue +0 -32
- package/src/components/RsSidebarItem.vue +0 -72
- package/src/components/RsSplitPane.vue +0 -714
- package/src/components/RsStatCard.vue +0 -85
- package/src/components/RsSteps.vue +0 -138
- package/src/components/RsSwitch.vue +0 -192
- package/src/components/RsTable.vue +0 -762
- package/src/components/RsTabs.vue +0 -1283
- package/src/components/RsTag.vue +0 -191
- package/src/components/RsTerminal.vue +0 -840
- package/src/components/RsTimePicker.vue +0 -617
- package/src/components/RsTimePickerColumns.vue +0 -285
- package/src/components/RsToaster.vue +0 -436
- package/src/components/RsToolbar.vue +0 -135
- package/src/components/RsTooltip.vue +0 -151
- package/src/components/RsTooltipProvider.vue +0 -30
- package/src/components/RsTree.vue +0 -1270
- package/src/components/RsUpload.vue +0 -412
- package/src/components/RsVNodeHost.vue +0 -20
- package/src/components/RsVirtualList.vue +0 -217
- package/src/components/avatar-utils.ts +0 -19
- package/src/components/breadcrumb-utils.ts +0 -19
- package/src/components/button-utils.ts +0 -39
- package/src/components/class-utils.ts +0 -29
- package/src/components/code-editor-utils.ts +0 -106
- package/src/components/code-mirror-completion.ts +0 -40
- package/src/components/code-mirror-diagnostics.ts +0 -52
- package/src/components/code-mirror-ghost.ts +0 -158
- package/src/components/code-mirror-inline-edit.ts +0 -55
- package/src/components/code-mirror-intel.ts +0 -81
- package/src/components/code-mirror-lang.ts +0 -128
- package/src/components/context-menu-utils.ts +0 -26
- package/src/components/date-picker-utils.ts +0 -475
- package/src/components/date-range-validation.ts +0 -29
- package/src/components/date-validation.ts +0 -38
- package/src/components/descriptions-utils.ts +0 -24
- package/src/components/dialog-utils.ts +0 -183
- package/src/components/dialog-viewport.ts +0 -48
- package/src/components/dialog-window.ts +0 -318
- package/src/components/drawer-utils.ts +0 -109
- package/src/components/dropdown-utils.ts +0 -31
- package/src/components/form-item-control.ts +0 -55
- package/src/components/form-path.ts +0 -92
- package/src/components/form-rules.ts +0 -311
- package/src/components/form-utils.ts +0 -219
- package/src/components/input-number-utils.ts +0 -128
- package/src/components/input-rules.ts +0 -84
- package/src/components/loading-utils.ts +0 -8
- package/src/components/markdown-utils.ts +0 -174
- package/src/components/menu-utils.ts +0 -59
- package/src/components/overlay-utils.ts +0 -50
- package/src/components/pagination-utils.ts +0 -38
- package/src/components/popover-utils.ts +0 -8
- package/src/components/radio-utils.ts +0 -12
- package/src/components/reka.ts +0 -111
- package/src/components/resolve-radius.ts +0 -22
- package/src/components/resolve-size.ts +0 -29
- package/src/components/scrollbar-utils.ts +0 -10
- package/src/components/select-utils.ts +0 -372
- package/src/components/split-pane-utils.ts +0 -254
- package/src/components/steps-utils.ts +0 -22
- package/src/components/table/RsTableBody.vue +0 -217
- package/src/components/table/RsTableBodyRow.vue +0 -376
- package/src/components/table/RsTableCell.vue +0 -239
- package/src/components/table/RsTableCellContent.ts +0 -18
- package/src/components/table/RsTableCellEditor.vue +0 -352
- package/src/components/table/RsTableColGroup.vue +0 -41
- package/src/components/table/RsTableEditGutter.vue +0 -54
- package/src/components/table/RsTableHeader.vue +0 -158
- package/src/components/table/RsTableHeaderFilter.vue +0 -107
- package/src/components/table/RsTableRowStatus.vue +0 -69
- package/src/components/table/RsTableSummaryRow.vue +0 -52
- package/src/components/table/rs-table-api.ts +0 -99
- package/src/components/table/rs-table-compat-matrix.ts +0 -71
- package/src/components/table/rs-table-echarts-adapter.ts +0 -81
- package/src/components/table/rs-table-feature-host.ts +0 -178
- package/src/components/table/rs-table-grid-nav.ts +0 -122
- package/src/components/table/rs-table-header-types.ts +0 -47
- package/src/components/table/rs-table-module-registry.ts +0 -72
- package/src/components/table/rs-table-props.ts +0 -340
- package/src/components/table/rs-table-view-context.ts +0 -258
- package/src/components/table/table-chart-utils.ts +0 -165
- package/src/components/table/table-context-menu.ts +0 -53
- package/src/components/table/table-edit-utils.ts +0 -496
- package/src/components/table/table-features.ts +0 -284
- package/src/components/table/table-keys.ts +0 -12
- package/src/components/table/table-summary-utils.ts +0 -194
- package/src/components/table-drag.ts +0 -215
- package/src/components/table-utils.ts +0 -1400
- package/src/components/tabs-utils.ts +0 -247
- package/src/components/terminal-utils.ts +0 -323
- package/src/components/terminal-wheel.ts +0 -74
- package/src/components/time-picker-utils.ts +0 -240
- package/src/components/time-range-validation.ts +0 -23
- package/src/components/time-validation.ts +0 -20
- package/src/components/tree-utils.ts +0 -518
- package/src/components/upload-utils.ts +0 -177
- package/src/components/use-rs-select.ts +0 -451
- package/src/components/virtual-list-utils.ts +0 -30
- package/src/composables/assembleRsTableApi.ts +0 -79
- package/src/composables/bindRsTableViewContext.ts +0 -269
- package/src/composables/createRsDialog.ts +0 -408
- package/src/composables/createRsTableEditEmitBridge.ts +0 -38
- package/src/composables/useClickOutside.ts +0 -22
- package/src/composables/useRsConfig.ts +0 -98
- package/src/composables/useRsI18n.ts +0 -33
- package/src/composables/useRsLoadingBar.ts +0 -36
- package/src/composables/useRsTable.ts +0 -134
- package/src/composables/useRsTableA11y.ts +0 -52
- package/src/composables/useRsTableChartBridge.ts +0 -79
- package/src/composables/useRsTableColumnLayout.ts +0 -320
- package/src/composables/useRsTableColumnResize.ts +0 -244
- package/src/composables/useRsTableColumnVirtual.ts +0 -180
- package/src/composables/useRsTableColumns.ts +0 -200
- package/src/composables/useRsTableContextMenu.ts +0 -257
- package/src/composables/useRsTableCore.ts +0 -258
- package/src/composables/useRsTableEditActions.ts +0 -606
- package/src/composables/useRsTableEditLayer.ts +0 -251
- package/src/composables/useRsTableEngine.ts +0 -357
- package/src/composables/useRsTableGridKeyboard.ts +0 -123
- package/src/composables/useRsTableHeadless.ts +0 -145
- package/src/composables/useRsTableInteraction.ts +0 -433
- package/src/composables/useRsTableScrollHost.ts +0 -75
- package/src/composables/useRsTableScrollLayout.ts +0 -255
- package/src/composables/useRsTableSelectionSource.ts +0 -89
- package/src/composables/useRsTableShell.ts +0 -416
- package/src/composables/useRsTableShellChrome.ts +0 -170
- package/src/composables/useRsTableSummary.ts +0 -113
- package/src/composables/useRsTableViewProvide.ts +0 -263
- package/src/composables/useRsTableVirtual.ts +0 -154
- package/src/composables/useRsTabsNav.ts +0 -191
- package/src/composables/useRsToast.ts +0 -48
- package/src/composables/useTableCellTooltip.ts +0 -240
- package/src/composables/useTableEdit.ts +0 -271
- package/src/composables/useTableRowHighlight.ts +0 -50
- package/src/dev/vite-codemirror-deps.ts +0 -20
- package/src/dev/vite-xterm-deps.ts +0 -8
- package/src/icons/custom/api.ts +0 -54
- package/src/icons/custom/clickhouse.ts +0 -52
- package/src/icons/custom/dameng.ts +0 -83
- package/src/icons/custom/ftp.ts +0 -61
- package/src/icons/custom/kingbase.ts +0 -52
- package/src/icons/custom/mongodb.ts +0 -50
- package/src/icons/custom/mysql.ts +0 -51
- package/src/icons/custom/oracle.ts +0 -52
- package/src/icons/custom/postgres.ts +0 -52
- package/src/icons/custom/redis.ts +0 -51
- package/src/icons/custom/sqlite.ts +0 -50
- package/src/icons/custom/sqlserver.ts +0 -52
- package/src/icons/custom/vastbase.ts +0 -57
- package/src/icons/lucide.ts +0 -94
- package/src/icons/registry.ts +0 -35
- package/src/index.ts +0 -813
- package/src/lib/iso-local-datetime.ts +0 -152
- package/src/lib/rs-dayjs.ts +0 -56
- package/src/locale/interpolate.ts +0 -32
- package/src/locale/messages.ts +0 -408
- package/src/locale/types.ts +0 -5
- package/src/monaco/debug-decorations.ts +0 -70
- package/src/monaco/index.ts +0 -23
- package/src/monaco/languages/index.ts +0 -22
- package/src/monaco/languages/mongodb-shell.ts +0 -125
- package/src/monaco/languages/types.ts +0 -59
- package/src/monaco/setup.ts +0 -101
- package/src/styles.css +0 -1364
- package/src/theme/apply.ts +0 -12
- package/src/theme/css-token.ts +0 -107
- package/src/theme/presets.ts +0 -73
- package/src/theme/types.ts +0 -149
- package/src/utils/rs-clipboard.ts +0 -272
- package/src/vite-env.d.ts +0 -7
- package/vite-plugins/monaco-zh-nls.ts +0 -101
- package/vite-plugins/silence-antlr-parse-console.ts +0 -29
- /package/{src → dist}/components/table/rs-table.css +0 -0
- /package/{src → dist}/monaco/debug-decorations.css +0 -0
- /package/{src → dist}/theme/brand.example.css +0 -0
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { computed, type ComputedRef } from 'vue'
|
|
2
|
-
import { RS_RADIUS_CSS, type RsRadius } from '../theme/types'
|
|
3
|
-
import { useRsConfigOptional } from '../composables/useRsConfig'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* 解析圆角:props → ConfigProvider.controlRadius → 组件默认档。
|
|
7
|
-
* 业务应传 `radius` / `iconRadius` 或依赖全局配置,避免 :deep 改 border-radius。
|
|
8
|
-
*/
|
|
9
|
-
export function useResolvedRsRadius(
|
|
10
|
-
radius: () => RsRadius | undefined,
|
|
11
|
-
fallback: RsRadius,
|
|
12
|
-
): ComputedRef<RsRadius> {
|
|
13
|
-
const config = useRsConfigOptional()
|
|
14
|
-
return computed(
|
|
15
|
-
() => radius() ?? config?.controlRadius.value ?? fallback,
|
|
16
|
-
)
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
/** 将档位转为可写入 style / CSS 变量的值。 */
|
|
20
|
-
export function rsRadiusCss(radius: RsRadius): string {
|
|
21
|
-
return RS_RADIUS_CSS[radius]
|
|
22
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { computed, type ComputedRef } from 'vue'
|
|
2
|
-
import type { RsComponentSize } from '../theme/types'
|
|
3
|
-
import { useRsConfigOptional } from '../composables/useRsConfig'
|
|
4
|
-
import { useRsFormContext, type RsFormContext } from './form-utils'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* 解析控件尺寸:props → Form → ConfigProvider → md。
|
|
8
|
-
* 业务应传 `size` 或依赖全局/表单上下文,避免 :deep 改高度。
|
|
9
|
-
*/
|
|
10
|
-
export function resolveRsComponentSize(
|
|
11
|
-
size: RsComponentSize | undefined,
|
|
12
|
-
form?: RsFormContext | null,
|
|
13
|
-
): ComputedRef<RsComponentSize> {
|
|
14
|
-
const config = useRsConfigOptional()
|
|
15
|
-
return computed(
|
|
16
|
-
() => size ?? form?.size.value ?? config?.controlSize.value ?? 'md',
|
|
17
|
-
)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
/** 在 setup 内便捷解析(自动读 Form / Config)。 */
|
|
21
|
-
export function useResolvedRsComponentSize(
|
|
22
|
-
size: () => RsComponentSize | undefined,
|
|
23
|
-
): ComputedRef<RsComponentSize> {
|
|
24
|
-
const form = useRsFormContext()
|
|
25
|
-
const config = useRsConfigOptional()
|
|
26
|
-
return computed(
|
|
27
|
-
() => size() ?? form?.size.value ?? config?.controlSize.value ?? 'md',
|
|
28
|
-
)
|
|
29
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type RsScrollbarType = 'auto' | 'always' | 'scroll' | 'hover'
|
|
2
|
-
|
|
3
|
-
export type RsScrollbarOrientation = 'vertical' | 'horizontal' | 'both'
|
|
4
|
-
|
|
5
|
-
export function resolveScrollbarSize(size: number | string | undefined): string | undefined {
|
|
6
|
-
if (size === undefined) {
|
|
7
|
-
return undefined
|
|
8
|
-
}
|
|
9
|
-
return typeof size === 'number' ? `${size}px` : size
|
|
10
|
-
}
|
|
@@ -1,372 +0,0 @@
|
|
|
1
|
-
export type RsSelectValue = string | number
|
|
2
|
-
|
|
3
|
-
/** 过滤 / 回显比对字段名,默认 label;可传 value 或 fieldNames 映射后的键 */
|
|
4
|
-
export type RsSelectOptionFilterProp = string
|
|
5
|
-
|
|
6
|
-
export type RsSelectPlacement = 'top' | 'bottom' | 'left' | 'right'
|
|
7
|
-
|
|
8
|
-
export type RsSelectStatus = 'error' | 'warning' | ''
|
|
9
|
-
|
|
10
|
-
/** 自定义过滤(对齐 Ant Design filterOption)。返回 false 则隐藏该项。 */
|
|
11
|
-
export type RsSelectFilterOption = (query: string, option: RsSelectOption) => boolean
|
|
12
|
-
|
|
13
|
-
/** 过滤后排序(对齐 Ant Design filterSort) */
|
|
14
|
-
export type RsSelectFilterSort = (a: RsSelectOption, b: RsSelectOption) => number
|
|
15
|
-
|
|
16
|
-
export interface RsSelectOption {
|
|
17
|
-
label: string
|
|
18
|
-
value: RsSelectValue
|
|
19
|
-
disabled?: boolean
|
|
20
|
-
/** 原生 title;悬停展示补充说明 */
|
|
21
|
-
title?: string
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export interface RsSelectOptionGroup {
|
|
25
|
-
label: string
|
|
26
|
-
options: RsSelectOption[]
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export type RsSelectOptions = ReadonlyArray<RsSelectOption | RsSelectOptionGroup>
|
|
30
|
-
|
|
31
|
-
/** 未正规化的选项(配合 fieldNames 可用 name/id/children 等业务字段) */
|
|
32
|
-
export type RsSelectOptionInput = RsSelectOption | RsSelectOptionGroup | Record<string, unknown>
|
|
33
|
-
|
|
34
|
-
export type RsSelectOptionsInput = ReadonlyArray<RsSelectOptionInput>
|
|
35
|
-
|
|
36
|
-
/** 对齐 Ant Design fieldNames */
|
|
37
|
-
export interface RsSelectFieldNames {
|
|
38
|
-
label?: string
|
|
39
|
-
value?: string
|
|
40
|
-
options?: string
|
|
41
|
-
disabled?: string
|
|
42
|
-
groupLabel?: string
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type RsSelectGetPopupContainer = (triggerNode?: HTMLElement) => string | HTMLElement | undefined
|
|
46
|
-
|
|
47
|
-
/** labelInValue 时的 v-model 项(对齐 Ant Design) */
|
|
48
|
-
export interface RsSelectLabeledValue {
|
|
49
|
-
label: string
|
|
50
|
-
value: RsSelectValue
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
export type RsSelectModelValue =
|
|
54
|
-
| RsSelectValue
|
|
55
|
-
| RsSelectValue[]
|
|
56
|
-
| RsSelectLabeledValue
|
|
57
|
-
| RsSelectLabeledValue[]
|
|
58
|
-
| ''
|
|
59
|
-
|
|
60
|
-
/**
|
|
61
|
-
* 按泛型收窄后的 v-model。
|
|
62
|
-
* 默认单选、值为 string:宿主 `@update:model-value="(v: string) => void"` 可直接赋值。
|
|
63
|
-
* `multiple` / `labelInValue` 为字面量 true 时收成数组或 labeled;为 `boolean` 时保留联合。
|
|
64
|
-
*/
|
|
65
|
-
export type RsSelectResolvedModel<
|
|
66
|
-
Value extends RsSelectValue = string,
|
|
67
|
-
Multiple extends boolean = false,
|
|
68
|
-
LabelInValue extends boolean = false,
|
|
69
|
-
> = LabelInValue extends true
|
|
70
|
-
? Multiple extends true
|
|
71
|
-
? RsSelectLabeledValue[]
|
|
72
|
-
: Multiple extends false
|
|
73
|
-
? RsSelectLabeledValue | ''
|
|
74
|
-
: RsSelectLabeledValue | RsSelectLabeledValue[] | ''
|
|
75
|
-
: Multiple extends true
|
|
76
|
-
? Value[]
|
|
77
|
-
: Multiple extends false
|
|
78
|
-
? Value | ''
|
|
79
|
-
: Value | Value[] | ''
|
|
80
|
-
|
|
81
|
-
/**
|
|
82
|
-
* Reka ComboboxItem 禁止 value 为空串(空串表示未选中 / placeholder)。
|
|
83
|
-
* 选项若传入 value: '',对内映射为此哨兵,避免崩溃;对外读写仍为 ''。
|
|
84
|
-
*/
|
|
85
|
-
export const RS_SELECT_EMPTY_VALUE = '__rs_select_empty__'
|
|
86
|
-
|
|
87
|
-
/** 业务 value → ComboboxItem token(空串走哨兵;数字转为十进制字符串) */
|
|
88
|
-
export function toComboboxValue(value: RsSelectValue): string {
|
|
89
|
-
return value === '' ? RS_SELECT_EMPTY_VALUE : String(value)
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
/** ComboboxItem token → 业务字符串(仅还原空串哨兵,不恢复 number) */
|
|
93
|
-
export function fromComboboxValue(value: string): string {
|
|
94
|
-
return value === RS_SELECT_EMPTY_VALUE ? '' : value
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
export function isSelectOptionGroup(
|
|
98
|
-
item: RsSelectOption | RsSelectOptionGroup,
|
|
99
|
-
): item is RsSelectOptionGroup {
|
|
100
|
-
return 'options' in item && Array.isArray(item.options)
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
export function flattenSelectOptions(options: RsSelectOptions): RsSelectOption[] {
|
|
104
|
-
const result: RsSelectOption[] = []
|
|
105
|
-
for (const item of options) {
|
|
106
|
-
if (isSelectOptionGroup(item)) {
|
|
107
|
-
result.push(...item.options)
|
|
108
|
-
} else {
|
|
109
|
-
result.push(item)
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return result
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export function findSelectOption(
|
|
116
|
-
options: RsSelectOptions,
|
|
117
|
-
token: string,
|
|
118
|
-
): RsSelectOption | undefined {
|
|
119
|
-
const raw = fromComboboxValue(token)
|
|
120
|
-
return flattenSelectOptions(options).find((opt) => String(opt.value) === String(raw))
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Combobox token → 业务 value。
|
|
125
|
-
* 优先返回 options 里的原始类型(number 0 保持为 0);手输/未知项保持字符串。
|
|
126
|
-
*/
|
|
127
|
-
export function restoreSelectValue(
|
|
128
|
-
token: string,
|
|
129
|
-
options: RsSelectOptions,
|
|
130
|
-
): RsSelectValue {
|
|
131
|
-
const matched = findSelectOption(options, token)
|
|
132
|
-
if (matched) return matched.value
|
|
133
|
-
return fromComboboxValue(token)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
export function restoreSelectValues(
|
|
137
|
-
tokens: string[],
|
|
138
|
-
options: RsSelectOptions,
|
|
139
|
-
): RsSelectValue[] {
|
|
140
|
-
return tokens.map((token) => restoreSelectValue(token, options))
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
export function buildOptionLabelMap(options: RsSelectOptions): Map<string, string> {
|
|
144
|
-
const map = new Map<string, string>()
|
|
145
|
-
for (const opt of flattenSelectOptions(options)) {
|
|
146
|
-
const key = toComboboxValue(opt.value)
|
|
147
|
-
map.set(key, opt.label)
|
|
148
|
-
if (opt.value === '') map.set('', opt.label)
|
|
149
|
-
}
|
|
150
|
-
return map
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export function buildOptionDisabledMap(options: RsSelectOptions): Map<string, boolean> {
|
|
154
|
-
const map = new Map<string, boolean>()
|
|
155
|
-
for (const opt of flattenSelectOptions(options)) {
|
|
156
|
-
const key = toComboboxValue(opt.value)
|
|
157
|
-
map.set(key, Boolean(opt.disabled))
|
|
158
|
-
}
|
|
159
|
-
return map
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function optionFieldText(option: RsSelectOption, prop: string): string {
|
|
163
|
-
if (prop === 'value') return String(option.value)
|
|
164
|
-
if (prop === 'label' || !prop) return String(option.label)
|
|
165
|
-
const extra = Reflect.get(option, prop)
|
|
166
|
-
return extra == null ? String(option.label) : String(extra)
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function defaultMatchOption(
|
|
170
|
-
option: RsSelectOption,
|
|
171
|
-
query: string,
|
|
172
|
-
contains: (text: string, search: string) => boolean,
|
|
173
|
-
optionFilterProp: RsSelectOptionFilterProp,
|
|
174
|
-
): boolean {
|
|
175
|
-
return contains(optionFieldText(option, optionFilterProp), query)
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
function coerceSelectValue(raw: unknown): RsSelectValue {
|
|
179
|
-
if (typeof raw === 'number' || typeof raw === 'string') return raw
|
|
180
|
-
if (raw == null) return ''
|
|
181
|
-
return String(raw)
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
function mapSelectOption(
|
|
185
|
-
raw: Record<string, unknown>,
|
|
186
|
-
names: Required<Pick<RsSelectFieldNames, 'label' | 'value' | 'disabled'>>,
|
|
187
|
-
): RsSelectOption {
|
|
188
|
-
const value = coerceSelectValue(raw[names.value])
|
|
189
|
-
const label = raw[names.label]
|
|
190
|
-
return {
|
|
191
|
-
...raw,
|
|
192
|
-
value,
|
|
193
|
-
label: label == null ? String(value) : String(label),
|
|
194
|
-
disabled: Boolean(raw[names.disabled]),
|
|
195
|
-
title: typeof raw.title === 'string' ? raw.title : undefined,
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
/**
|
|
200
|
-
* 按 fieldNames 把业务选项正规化为 { label, value, disabled }。
|
|
201
|
-
* 默认键即为 label / value / options,既有调用无需改。
|
|
202
|
-
*/
|
|
203
|
-
export function normalizeSelectOptions(
|
|
204
|
-
options: RsSelectOptionsInput,
|
|
205
|
-
fieldNames?: RsSelectFieldNames,
|
|
206
|
-
): RsSelectOptions {
|
|
207
|
-
const labelKey = fieldNames?.label ?? 'label'
|
|
208
|
-
const valueKey = fieldNames?.value ?? 'value'
|
|
209
|
-
const optionsKey = fieldNames?.options ?? 'options'
|
|
210
|
-
const disabledKey = fieldNames?.disabled ?? 'disabled'
|
|
211
|
-
const groupLabelKey = fieldNames?.groupLabel ?? labelKey
|
|
212
|
-
const result: Array<RsSelectOption | RsSelectOptionGroup> = []
|
|
213
|
-
|
|
214
|
-
for (const item of options) {
|
|
215
|
-
if (!item || typeof item !== 'object') continue
|
|
216
|
-
const raw = item as Record<string, unknown>
|
|
217
|
-
const nested = raw[optionsKey]
|
|
218
|
-
if (Array.isArray(nested)) {
|
|
219
|
-
const children: RsSelectOption[] = []
|
|
220
|
-
for (const child of nested) {
|
|
221
|
-
if (!child || typeof child !== 'object') continue
|
|
222
|
-
children.push(mapSelectOption(child as Record<string, unknown>, {
|
|
223
|
-
label: labelKey,
|
|
224
|
-
value: valueKey,
|
|
225
|
-
disabled: disabledKey,
|
|
226
|
-
}))
|
|
227
|
-
}
|
|
228
|
-
result.push({
|
|
229
|
-
label: String(raw[groupLabelKey] ?? ''),
|
|
230
|
-
options: children,
|
|
231
|
-
})
|
|
232
|
-
continue
|
|
233
|
-
}
|
|
234
|
-
result.push(mapSelectOption(raw, { label: labelKey, value: valueKey, disabled: disabledKey }))
|
|
235
|
-
}
|
|
236
|
-
return result
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
/** 触发器 / tag 展示文案,对齐 Ant optionLabelProp */
|
|
240
|
-
export function optionDisplayLabel(option: RsSelectOption, prop = 'label'): string {
|
|
241
|
-
return optionFieldText(option, prop)
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
export function comboboxBindingToTokens(value: unknown, multiple: boolean): string[] {
|
|
245
|
-
if (multiple) return Array.isArray(value) ? value.map(String) : []
|
|
246
|
-
if (value == null || value === '') return []
|
|
247
|
-
return [String(value)]
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
export function selectModelEntries(value: unknown): unknown[] {
|
|
251
|
-
if (Array.isArray(value)) return value
|
|
252
|
-
if (value === '' || value == null) return []
|
|
253
|
-
return [value]
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
export function filterSelectOptions(
|
|
257
|
-
options: RsSelectOptions,
|
|
258
|
-
query: string,
|
|
259
|
-
contains: (text: string, search: string) => boolean,
|
|
260
|
-
filterOption?: RsSelectFilterOption | boolean,
|
|
261
|
-
optionFilterProp: RsSelectOptionFilterProp = 'label',
|
|
262
|
-
): RsSelectOptions {
|
|
263
|
-
if (filterOption === false) return options
|
|
264
|
-
const trimmed = query.trim()
|
|
265
|
-
if (!trimmed) return options
|
|
266
|
-
|
|
267
|
-
const match =
|
|
268
|
-
typeof filterOption === 'function'
|
|
269
|
-
? (opt: RsSelectOption) => filterOption(trimmed, opt)
|
|
270
|
-
: (opt: RsSelectOption) => defaultMatchOption(opt, trimmed, contains, optionFilterProp)
|
|
271
|
-
|
|
272
|
-
const result: Array<RsSelectOption | RsSelectOptionGroup> = []
|
|
273
|
-
for (const item of options) {
|
|
274
|
-
if (isSelectOptionGroup(item)) {
|
|
275
|
-
const filtered = item.options.filter(match)
|
|
276
|
-
if (filtered.length > 0) {
|
|
277
|
-
result.push({ label: item.label, options: filtered })
|
|
278
|
-
}
|
|
279
|
-
} else if (match(item)) {
|
|
280
|
-
result.push(item)
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
return result as RsSelectOptions
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export function flattenSelectValues(options: RsSelectOptions): string[] {
|
|
287
|
-
return flattenSelectOptions(options).map((opt) => toComboboxValue(opt.value))
|
|
288
|
-
}
|
|
289
|
-
|
|
290
|
-
export function toSelectedTokens(value: unknown, multiple: boolean): string[] {
|
|
291
|
-
const entries = multiple
|
|
292
|
-
? selectModelEntries(value)
|
|
293
|
-
: Array.isArray(value) || value === '' || value == null
|
|
294
|
-
? []
|
|
295
|
-
: [value]
|
|
296
|
-
const tokens: string[] = []
|
|
297
|
-
for (const entry of entries) {
|
|
298
|
-
const raw = unwrapSelectEntry(entry)
|
|
299
|
-
if (raw === null) continue
|
|
300
|
-
tokens.push(toComboboxValue(raw))
|
|
301
|
-
}
|
|
302
|
-
return tokens
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
export function isSelectLabeledValue(value: unknown): value is RsSelectLabeledValue {
|
|
306
|
-
return typeof value === 'object' && value !== null && !Array.isArray(value) && 'value' in value
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export function unwrapSelectEntry(item: unknown): RsSelectValue | null {
|
|
310
|
-
if (item == null || item === '') return null
|
|
311
|
-
if (isSelectLabeledValue(item)) return item.value
|
|
312
|
-
if (typeof item === 'string' || typeof item === 'number') return item
|
|
313
|
-
return null
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
export function toLabeledValue(
|
|
317
|
-
value: RsSelectValue,
|
|
318
|
-
options: RsSelectOptions,
|
|
319
|
-
): RsSelectLabeledValue {
|
|
320
|
-
const matched = flattenSelectOptions(options).find(
|
|
321
|
-
(opt) => String(opt.value) === String(value),
|
|
322
|
-
)
|
|
323
|
-
return {
|
|
324
|
-
value: matched ? matched.value : value,
|
|
325
|
-
label: matched?.label ?? String(value),
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
export function packSelectModel(
|
|
330
|
-
values: RsSelectValue[],
|
|
331
|
-
options: RsSelectOptions,
|
|
332
|
-
multiple: boolean,
|
|
333
|
-
labelInValue: boolean,
|
|
334
|
-
): RsSelectModelValue {
|
|
335
|
-
if (multiple) {
|
|
336
|
-
return labelInValue ? values.map((value) => toLabeledValue(value, options)) : values
|
|
337
|
-
}
|
|
338
|
-
const first = values[0]
|
|
339
|
-
if (first === undefined) return ''
|
|
340
|
-
return labelInValue ? toLabeledValue(first, options) : first
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
export function sortSelectOptions(
|
|
344
|
-
options: RsSelectOptions,
|
|
345
|
-
sort?: RsSelectFilterSort,
|
|
346
|
-
): RsSelectOptions {
|
|
347
|
-
if (!sort) return options
|
|
348
|
-
const next: Array<RsSelectOption | RsSelectOptionGroup> = []
|
|
349
|
-
const flats: RsSelectOption[] = []
|
|
350
|
-
const flushFlats = () => {
|
|
351
|
-
if (!flats.length) return
|
|
352
|
-
next.push(...[...flats].sort(sort))
|
|
353
|
-
flats.length = 0
|
|
354
|
-
}
|
|
355
|
-
for (const item of options) {
|
|
356
|
-
if (isSelectOptionGroup(item)) {
|
|
357
|
-
flushFlats()
|
|
358
|
-
next.push({ label: item.label, options: [...item.options].sort(sort) })
|
|
359
|
-
} else {
|
|
360
|
-
flats.push(item)
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
flushFlats()
|
|
364
|
-
return next as RsSelectOptions
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
export function splitByTokenSeparators(raw: string, separators: string[]): string[] | null {
|
|
368
|
-
if (!separators.length) return null
|
|
369
|
-
const found = separators.find((sep) => sep && raw.includes(sep))
|
|
370
|
-
if (!found) return null
|
|
371
|
-
return raw.split(found)
|
|
372
|
-
}
|
|
@@ -1,254 +0,0 @@
|
|
|
1
|
-
/** 面板分割方向:horizontal 左右排布(拖动横向)· vertical 上下排布(拖动纵向) */
|
|
2
|
-
export type RsSplitOrientation = 'horizontal' | 'vertical'
|
|
3
|
-
|
|
4
|
-
/** 面板尺寸:数字为占比百分比;'auto' 按内容自适应(不占百分比配额) */
|
|
5
|
-
export type RsSplitPaneSize = number | 'auto'
|
|
6
|
-
|
|
7
|
-
/** 单个面板定义;百分比尺寸单位为 0~100 */
|
|
8
|
-
export interface RsSplitPaneItem {
|
|
9
|
-
/** 唯一标识,用于插槽名与 v-model:sizes 的顺序映射 */
|
|
10
|
-
key: string
|
|
11
|
-
/**
|
|
12
|
-
* 初始尺寸
|
|
13
|
-
* - number:占比百分比
|
|
14
|
-
* - 'auto':按内容自适应(flex-basis: auto)
|
|
15
|
-
* - 缺省:在「非 auto」面板的剩余百分比内均分
|
|
16
|
-
*/
|
|
17
|
-
size?: RsSplitPaneSize
|
|
18
|
-
/** 最小尺寸(百分比),默认 0;auto 面板可作为 min-height/min-width % */
|
|
19
|
-
min?: number
|
|
20
|
-
/** 最大尺寸(百分比),默认 100;auto 面板可作为 max-height/max-width % */
|
|
21
|
-
max?: number
|
|
22
|
-
/** 是否可折叠:拖动越过阈值时吸附到 collapsedSize */
|
|
23
|
-
collapsible?: boolean
|
|
24
|
-
/** 折叠后的尺寸(百分比),默认 0;会被限制在 [0, min] */
|
|
25
|
-
collapsedSize?: number
|
|
26
|
-
/** 本面板右侧分隔条是否显示抓手;缺省时继承 RsSplitPane.withHandle */
|
|
27
|
-
resizerHandle?: boolean
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
/**
|
|
31
|
-
* RsSplitPane 模板 ref 请用此类型。
|
|
32
|
-
* 不要写 `InstanceType<typeof RsSplitPane>`:组件实例类型过深,vue-tsc 会报 Excessive stack depth。
|
|
33
|
-
*/
|
|
34
|
-
export interface RsSplitPaneExpose {
|
|
35
|
-
collapse: (key: string) => void
|
|
36
|
-
expand: (key: string, toSize?: number) => void
|
|
37
|
-
reset: () => void
|
|
38
|
-
getSizes: () => number[]
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/** 模板 ref 实例:expose + 根节点 */
|
|
42
|
-
export type RsSplitPaneInstance = RsSplitPaneExpose & { $el: HTMLElement }
|
|
43
|
-
|
|
44
|
-
/** 由 RsSplitPaneItem 解析出的规范化约束 */
|
|
45
|
-
export interface RsSplitConstraint {
|
|
46
|
-
min: number
|
|
47
|
-
max: number
|
|
48
|
-
collapsible: boolean
|
|
49
|
-
collapsedSize: number
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
const clamp = (value: number, lower: number, upper: number): number =>
|
|
53
|
-
Math.min(Math.max(value, lower), upper)
|
|
54
|
-
|
|
55
|
-
/** 保留有限位小数,消除浮点毛刺 */
|
|
56
|
-
export function roundSize(value: number, precision = 4): number {
|
|
57
|
-
const factor = 10 ** precision
|
|
58
|
-
return Math.round(value * factor) / factor
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
/** 是否为内容自适应尺寸 */
|
|
62
|
-
export function isRsSplitPaneAutoSize(size: RsSplitPaneSize | undefined): size is 'auto' {
|
|
63
|
-
return size === 'auto'
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/** 各面板是否声明为 auto(忽略受控 provided 时的瞬时物化) */
|
|
67
|
-
export function resolveSplitAutoFlags(panes: RsSplitPaneItem[]): boolean[] {
|
|
68
|
-
return panes.map((pane) => isRsSplitPaneAutoSize(pane.size))
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/** 将面板定义解析为规范化约束,保证 0 ≤ min ≤ max ≤ 100 且 collapsedSize ≤ min */
|
|
72
|
-
export function resolveSplitConstraints(panes: RsSplitPaneItem[]): RsSplitConstraint[] {
|
|
73
|
-
return panes.map((pane) => {
|
|
74
|
-
const rawMin = clamp(pane.min ?? 0, 0, 100)
|
|
75
|
-
const rawMax = clamp(pane.max ?? 100, 0, 100)
|
|
76
|
-
const min = Math.min(rawMin, rawMax)
|
|
77
|
-
const max = Math.max(rawMin, rawMax)
|
|
78
|
-
const collapsedSize = clamp(pane.collapsedSize ?? 0, 0, min)
|
|
79
|
-
return {
|
|
80
|
-
min,
|
|
81
|
-
max,
|
|
82
|
-
collapsible: pane.collapsible ?? false,
|
|
83
|
-
collapsedSize,
|
|
84
|
-
}
|
|
85
|
-
})
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
/** 按比例把一组尺寸缩放到总和为 100 */
|
|
89
|
-
function rescaleTo100(sizes: number[]): number[] {
|
|
90
|
-
if (!sizes.length) return []
|
|
91
|
-
const sum = sizes.reduce((acc, value) => acc + Math.max(0, value), 0)
|
|
92
|
-
if (sum <= 0) {
|
|
93
|
-
const each = 100 / sizes.length
|
|
94
|
-
return sizes.map(() => each)
|
|
95
|
-
}
|
|
96
|
-
return sizes.map((value) => (Math.max(0, value) / sum) * 100)
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
/**
|
|
100
|
-
* 计算初始尺寸数组(非 auto 面板总和 100;auto 位为 0 占位,样式层不使用 flex-grow)。
|
|
101
|
-
* 优先使用 provided(受控值),其次面板自身的 number size,未指定的非 auto 项在剩余空间内均分。
|
|
102
|
-
*/
|
|
103
|
-
export function normalizeSplitSizes(
|
|
104
|
-
panes: RsSplitPaneItem[],
|
|
105
|
-
provided?: number[] | null,
|
|
106
|
-
): number[] {
|
|
107
|
-
const count = panes.length
|
|
108
|
-
if (count === 0) return []
|
|
109
|
-
|
|
110
|
-
const autoFlags = resolveSplitAutoFlags(panes)
|
|
111
|
-
// 受控 sizes 一旦提供完整数组,视为已全部物化为百分比(含原 auto)
|
|
112
|
-
const fullyControlled =
|
|
113
|
-
Array.isArray(provided) &&
|
|
114
|
-
provided.length === count &&
|
|
115
|
-
provided.every((value) => typeof value === 'number' && Number.isFinite(value))
|
|
116
|
-
|
|
117
|
-
if (fullyControlled) {
|
|
118
|
-
return rescaleTo100(provided!.map((value) => Math.max(0, value))).map((value) =>
|
|
119
|
-
roundSize(value),
|
|
120
|
-
)
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
const seed: (number | null)[] = panes.map((pane, index) => {
|
|
124
|
-
if (autoFlags[index]) return 0
|
|
125
|
-
const candidate = provided?.[index] ?? (typeof pane.size === 'number' ? pane.size : null)
|
|
126
|
-
return typeof candidate === 'number' && Number.isFinite(candidate)
|
|
127
|
-
? Math.max(0, candidate)
|
|
128
|
-
: null
|
|
129
|
-
})
|
|
130
|
-
|
|
131
|
-
const flexibleIndices = panes
|
|
132
|
-
.map((_, index) => index)
|
|
133
|
-
.filter((index) => !autoFlags[index])
|
|
134
|
-
|
|
135
|
-
if (flexibleIndices.length === 0) {
|
|
136
|
-
// 全部 auto:占位全 0,由内容撑开
|
|
137
|
-
return panes.map(() => 0)
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
const missing = flexibleIndices.filter((index) => seed[index] === null).length
|
|
141
|
-
const knownSum = flexibleIndices.reduce<number>((acc, index) => acc + (seed[index] ?? 0), 0)
|
|
142
|
-
const each = missing > 0 ? Math.max(0, 100 - knownSum) / missing : 0
|
|
143
|
-
|
|
144
|
-
const filled = seed.map((value, index) => {
|
|
145
|
-
if (autoFlags[index]) return 0
|
|
146
|
-
return value ?? each
|
|
147
|
-
})
|
|
148
|
-
|
|
149
|
-
// 只对非 auto 部分缩放到 100
|
|
150
|
-
const flexibleValues = flexibleIndices.map((index) => filled[index] ?? 0)
|
|
151
|
-
const scaledFlexible = rescaleTo100(flexibleValues)
|
|
152
|
-
const next = filled.slice()
|
|
153
|
-
flexibleIndices.forEach((paneIndex, i) => {
|
|
154
|
-
next[paneIndex] = roundSize(scaledFlexible[i] ?? 0)
|
|
155
|
-
})
|
|
156
|
-
return next
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
/** 判断某面板当前是否处于折叠态 */
|
|
160
|
-
export function isSplitPaneCollapsed(size: number, constraint: RsSplitConstraint): boolean {
|
|
161
|
-
if (!constraint.collapsible) return false
|
|
162
|
-
return size <= constraint.collapsedSize + 0.01
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/**
|
|
166
|
-
* 在第 index 个分隔条(介于 pane[index] 与 pane[index+1] 之间)上拖动 deltaPercent。
|
|
167
|
-
* 仅调整相邻两个面板,遵守各自 min/max,并在可折叠时吸附到 collapsedSize。
|
|
168
|
-
* 返回新的尺寸数组(引用不同,总和保持不变)。
|
|
169
|
-
*/
|
|
170
|
-
export function applySplitResize(
|
|
171
|
-
sizes: number[],
|
|
172
|
-
constraints: RsSplitConstraint[],
|
|
173
|
-
index: number,
|
|
174
|
-
deltaPercent: number,
|
|
175
|
-
): number[] {
|
|
176
|
-
if (index < 0 || index >= sizes.length - 1) return sizes
|
|
177
|
-
const a = sizes[index]
|
|
178
|
-
const b = sizes[index + 1]
|
|
179
|
-
const ca = constraints[index]
|
|
180
|
-
const cb = constraints[index + 1]
|
|
181
|
-
if (a === undefined || b === undefined || !ca || !cb) return sizes
|
|
182
|
-
|
|
183
|
-
const total = a + b
|
|
184
|
-
let nextA = a + deltaPercent
|
|
185
|
-
|
|
186
|
-
// 收缩 A:越过阈值吸附折叠
|
|
187
|
-
if (ca.collapsible && deltaPercent < 0 && nextA < ca.min) {
|
|
188
|
-
nextA = nextA <= (ca.min + ca.collapsedSize) / 2 ? ca.collapsedSize : ca.min
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// 收缩 B(即放大 A):越过阈值吸附折叠 B
|
|
192
|
-
if (cb.collapsible && deltaPercent > 0) {
|
|
193
|
-
const nextB = total - nextA
|
|
194
|
-
if (nextB < cb.min) {
|
|
195
|
-
const snappedB = nextB <= (cb.min + cb.collapsedSize) / 2 ? cb.collapsedSize : cb.min
|
|
196
|
-
nextA = total - snappedB
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
// 硬约束:A 的可行区间需同时满足 A 与 B 的 min/max
|
|
201
|
-
const lowerA = Math.max(ca.collapsible ? ca.collapsedSize : ca.min, total - cb.max)
|
|
202
|
-
const upperA = Math.min(ca.max, total - (cb.collapsible ? cb.collapsedSize : cb.min))
|
|
203
|
-
nextA = clamp(nextA, Math.min(lowerA, upperA), Math.max(lowerA, upperA))
|
|
204
|
-
|
|
205
|
-
const next = sizes.slice()
|
|
206
|
-
next[index] = roundSize(nextA)
|
|
207
|
-
next[index + 1] = roundSize(total - nextA)
|
|
208
|
-
return next
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
/** 把 pane[index] 设为 target,差额从相邻面板(优先右侧)补偿 */
|
|
212
|
-
function redistribute(sizes: number[], index: number, target: number): number[] {
|
|
213
|
-
const current = sizes[index]
|
|
214
|
-
if (current === undefined) return sizes
|
|
215
|
-
const neighbor = index + 1 < sizes.length ? index + 1 : index - 1
|
|
216
|
-
if (neighbor < 0) return sizes
|
|
217
|
-
const next = sizes.slice()
|
|
218
|
-
const delta = target - current
|
|
219
|
-
next[index] = roundSize(target)
|
|
220
|
-
next[neighbor] = roundSize(Math.max(0, (next[neighbor] ?? 0) - delta))
|
|
221
|
-
return next
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
/** 折叠 pane[index](可折叠→collapsedSize,否则→min) */
|
|
225
|
-
export function collapseSplitPane(
|
|
226
|
-
sizes: number[],
|
|
227
|
-
constraints: RsSplitConstraint[],
|
|
228
|
-
index: number,
|
|
229
|
-
): number[] {
|
|
230
|
-
const constraint = constraints[index]
|
|
231
|
-
if (!constraint || sizes[index] === undefined) return sizes
|
|
232
|
-
const target = constraint.collapsible ? constraint.collapsedSize : constraint.min
|
|
233
|
-
return redistribute(sizes, index, target)
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
/** 展开 pane[index](toSize 缺省时回到 min 或均分值),并夹紧到 [min, max] */
|
|
237
|
-
export function expandSplitPane(
|
|
238
|
-
sizes: number[],
|
|
239
|
-
constraints: RsSplitConstraint[],
|
|
240
|
-
index: number,
|
|
241
|
-
toSize?: number,
|
|
242
|
-
): number[] {
|
|
243
|
-
const constraint = constraints[index]
|
|
244
|
-
if (!constraint || sizes[index] === undefined) return sizes
|
|
245
|
-
const fallback = constraint.min > 0 ? constraint.min : 100 / Math.max(1, sizes.length)
|
|
246
|
-
const target = clamp(toSize ?? fallback, constraint.min, constraint.max)
|
|
247
|
-
return redistribute(sizes, index, target)
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
/** 两组尺寸是否近似相等(用于受控回写时避免抖动) */
|
|
251
|
-
export function splitSizesEqual(a: number[], b: number[], epsilon = 0.01): boolean {
|
|
252
|
-
if (a.length !== b.length) return false
|
|
253
|
-
return a.every((value, index) => Math.abs(value - (b[index] ?? 0)) <= epsilon)
|
|
254
|
-
}
|