niuma-ui 1.1.12 → 1.2.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 +17 -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 +2005 -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 +2 -0
- package/dist/vite-plugins/monaco-zh-nls.js +92 -0
- package/dist/vite-plugins/silence-antlr-parse-console.d.ts +9 -0
- package/dist/vite-plugins/silence-antlr-parse-console.js +26 -0
- package/package.json +38 -15
- 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
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RsTable 列宽拖拽:mousemove 走 DOM 直写,避免整表 Vue 重渲。
|
|
3
|
+
*
|
|
4
|
+
* 性能关键:
|
|
5
|
+
* - 会话开始时缓存 col/th 元素与基准总宽,RAF 内不再 querySelector 全表
|
|
6
|
+
* - 拖拽中只更新变化列宽度 + table 总宽(O(1)),不重写其它列
|
|
7
|
+
* - activeDragWidths 为非响应式 plain object,禁止写入 reactive
|
|
8
|
+
*/
|
|
9
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
10
|
+
import { type RsTableColumn, type RsTableRowData } from '../components/table-utils';
|
|
11
|
+
export interface UseRsTableColumnResizeOptions<T extends RsTableRowData> {
|
|
12
|
+
resizable: ComputedRef<boolean> | (() => boolean);
|
|
13
|
+
minColumnWidth: ComputedRef<number | undefined> | (() => number | undefined);
|
|
14
|
+
maxColumnWidth: ComputedRef<number | undefined> | (() => number | undefined);
|
|
15
|
+
displayColumns: ComputedRef<RsTableColumn<T>[]> | (() => RsTableColumn<T>[]);
|
|
16
|
+
resolvedColumnWidths: {
|
|
17
|
+
get: () => Record<string, number>;
|
|
18
|
+
set: (value: Record<string, number>) => void;
|
|
19
|
+
};
|
|
20
|
+
/** 前缀列总宽(px),用于 DOM 直写时的 table 总宽 */
|
|
21
|
+
measurePrefixColumnWidth: () => number;
|
|
22
|
+
tableMinWidth: ComputedRef<string | undefined> | (() => string | undefined);
|
|
23
|
+
onColumnResize: (key: string, width: number) => void;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* 列宽拖拽会话。
|
|
27
|
+
*/
|
|
28
|
+
export declare function useRsTableColumnResize<T extends RsTableRowData>(options: UseRsTableColumnResizeOptions<T>): {
|
|
29
|
+
tableRef: Ref<HTMLTableElement | null, HTMLTableElement | null>;
|
|
30
|
+
isColumnResizing: Ref<boolean, boolean>;
|
|
31
|
+
resizePaintWidths: Ref<Record<string, number> | null, Record<string, number> | null>;
|
|
32
|
+
onResizeStart: (key: string, event: MouseEvent) => void;
|
|
33
|
+
stopResize: () => void;
|
|
34
|
+
};
|
|
35
|
+
export type RsTableColumnResizeApi = ReturnType<typeof useRsTableColumnResize>;
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { clampColumnWidth, parseColumnWidth } from "../components/table-utils.js";
|
|
2
|
+
import { nextTick, onUnmounted, ref } from "vue";
|
|
3
|
+
//#region src/composables/useRsTableColumnResize.ts
|
|
4
|
+
/**
|
|
5
|
+
* RsTable 列宽拖拽:mousemove 走 DOM 直写,避免整表 Vue 重渲。
|
|
6
|
+
*
|
|
7
|
+
* 性能关键:
|
|
8
|
+
* - 会话开始时缓存 col/th 元素与基准总宽,RAF 内不再 querySelector 全表
|
|
9
|
+
* - 拖拽中只更新变化列宽度 + table 总宽(O(1)),不重写其它列
|
|
10
|
+
* - activeDragWidths 为非响应式 plain object,禁止写入 reactive
|
|
11
|
+
*/
|
|
12
|
+
function read(source) {
|
|
13
|
+
if (typeof source === "function") return source();
|
|
14
|
+
return source.value;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* 列宽拖拽会话。
|
|
18
|
+
*/
|
|
19
|
+
function useRsTableColumnResize(options) {
|
|
20
|
+
const tableRef = ref(null);
|
|
21
|
+
const isColumnResizing = ref(false);
|
|
22
|
+
/** 拖拽会话中的列宽快照(仅首帧写入一次,供 colgroup 初始渲染) */
|
|
23
|
+
const resizePaintWidths = ref(null);
|
|
24
|
+
let session = null;
|
|
25
|
+
/** 非响应式:mousemove 高频更新不得触发 Vue */
|
|
26
|
+
let activeDragWidths = null;
|
|
27
|
+
let resizeRafId = 0;
|
|
28
|
+
let latestResizeClientX = 0;
|
|
29
|
+
let resizeMoved = false;
|
|
30
|
+
function cacheColumnElements(table) {
|
|
31
|
+
const colEls = /* @__PURE__ */ new Map();
|
|
32
|
+
const thEls = /* @__PURE__ */ new Map();
|
|
33
|
+
for (const col of table.querySelectorAll("colgroup col[data-col-key]")) {
|
|
34
|
+
const key = col.dataset.colKey;
|
|
35
|
+
if (key) colEls.set(key, col);
|
|
36
|
+
}
|
|
37
|
+
for (const th of table.querySelectorAll("thead th[data-col-key]")) {
|
|
38
|
+
const key = th.dataset.colKey;
|
|
39
|
+
if (key) thEls.set(key, th);
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
colEls,
|
|
43
|
+
thEls
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
/** 会话开始:一次性写满所有列宽到 DOM */
|
|
47
|
+
function paintAllColumnWidths(table, widths, cache) {
|
|
48
|
+
let sum = options.measurePrefixColumnWidth();
|
|
49
|
+
for (const column of read(options.displayColumns)) {
|
|
50
|
+
const width = widths[column.key] ?? parseColumnWidth(column.width ?? column.minWidth);
|
|
51
|
+
const col = cache.colEls.get(column.key);
|
|
52
|
+
if (col) col.style.width = `${width}px`;
|
|
53
|
+
const th = cache.thEls.get(column.key);
|
|
54
|
+
if (th) th.style.width = `${width}px`;
|
|
55
|
+
sum += width;
|
|
56
|
+
}
|
|
57
|
+
table.style.width = `${sum}px`;
|
|
58
|
+
const minWidth = read(options.tableMinWidth);
|
|
59
|
+
if (minWidth) table.style.minWidth = minWidth;
|
|
60
|
+
return sum;
|
|
61
|
+
}
|
|
62
|
+
/** 确保 colgroup 元素已缓存;fixed 布局首帧可能尚未挂上,失败则返回 false */
|
|
63
|
+
function ensureSessionDomCache() {
|
|
64
|
+
if (!session || !tableRef.value || !activeDragWidths) return false;
|
|
65
|
+
if (session.colEls.size > 0) return true;
|
|
66
|
+
const cache = cacheColumnElements(tableRef.value);
|
|
67
|
+
if (cache.colEls.size === 0) return false;
|
|
68
|
+
session.colEls = cache.colEls;
|
|
69
|
+
session.thEls = cache.thEls;
|
|
70
|
+
session.baseTableWidth = paintAllColumnWidths(tableRef.value, activeDragWidths, cache);
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
/** RAF 热路径:只改变化列 + 总宽;缓存未就绪时先全量写一次 */
|
|
74
|
+
function paintChangedColumnWidth(width) {
|
|
75
|
+
if (!session || !tableRef.value) return;
|
|
76
|
+
if (!ensureSessionDomCache()) return;
|
|
77
|
+
const { key, colEls, thEls, baseTableWidth, startWidth } = session;
|
|
78
|
+
const col = colEls.get(key);
|
|
79
|
+
if (col) col.style.width = `${width}px`;
|
|
80
|
+
const th = thEls.get(key);
|
|
81
|
+
if (th) th.style.width = `${width}px`;
|
|
82
|
+
tableRef.value.style.width = `${baseTableWidth - startWidth + width}px`;
|
|
83
|
+
}
|
|
84
|
+
function beginResizeSession() {
|
|
85
|
+
if (!session || isColumnResizing.value || !tableRef.value) return;
|
|
86
|
+
isColumnResizing.value = true;
|
|
87
|
+
activeDragWidths = { ...session.domSnapshot };
|
|
88
|
+
resizePaintWidths.value = { ...activeDragWidths };
|
|
89
|
+
if (!ensureSessionDomCache()) nextTick(() => {
|
|
90
|
+
ensureSessionDomCache();
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
function onResizeMove(event) {
|
|
94
|
+
if (!session) return;
|
|
95
|
+
latestResizeClientX = event.clientX;
|
|
96
|
+
if (!resizeMoved && Math.abs(latestResizeClientX - session.startX) < 1) return;
|
|
97
|
+
if (!resizeMoved) {
|
|
98
|
+
resizeMoved = true;
|
|
99
|
+
beginResizeSession();
|
|
100
|
+
}
|
|
101
|
+
if (resizeRafId !== 0) return;
|
|
102
|
+
resizeRafId = requestAnimationFrame(() => {
|
|
103
|
+
resizeRafId = 0;
|
|
104
|
+
if (!session || !activeDragWidths) return;
|
|
105
|
+
const nextWidth = clampColumnWidth(session.startWidth + latestResizeClientX - session.startX, read(options.minColumnWidth), read(options.maxColumnWidth));
|
|
106
|
+
if (nextWidth === session.currentWidth) return;
|
|
107
|
+
session.currentWidth = nextWidth;
|
|
108
|
+
activeDragWidths[session.key] = nextWidth;
|
|
109
|
+
paintChangedColumnWidth(nextWidth);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function stopResize() {
|
|
113
|
+
if (session && resizeMoved) {
|
|
114
|
+
const finalWidth = clampColumnWidth(session.startWidth + latestResizeClientX - session.startX, read(options.minColumnWidth), read(options.maxColumnWidth));
|
|
115
|
+
if (finalWidth !== session.startWidth) {
|
|
116
|
+
const merged = {
|
|
117
|
+
...session.domSnapshot,
|
|
118
|
+
[session.key]: finalWidth
|
|
119
|
+
};
|
|
120
|
+
options.resolvedColumnWidths.set(merged);
|
|
121
|
+
options.onColumnResize(session.key, finalWidth);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
if (tableRef.value) {
|
|
125
|
+
tableRef.value.style.width = "";
|
|
126
|
+
tableRef.value.style.minWidth = "";
|
|
127
|
+
for (const th of tableRef.value.querySelectorAll("thead th[data-col-key]")) th.style.width = "";
|
|
128
|
+
}
|
|
129
|
+
isColumnResizing.value = false;
|
|
130
|
+
resizePaintWidths.value = null;
|
|
131
|
+
activeDragWidths = null;
|
|
132
|
+
session = null;
|
|
133
|
+
resizeMoved = false;
|
|
134
|
+
if (resizeRafId !== 0) {
|
|
135
|
+
cancelAnimationFrame(resizeRafId);
|
|
136
|
+
resizeRafId = 0;
|
|
137
|
+
}
|
|
138
|
+
document.body.style.cursor = "";
|
|
139
|
+
document.body.style.userSelect = "";
|
|
140
|
+
document.removeEventListener("mousemove", onResizeMove);
|
|
141
|
+
document.removeEventListener("mouseup", stopResize, { capture: true });
|
|
142
|
+
}
|
|
143
|
+
function onResizeStart(key, event) {
|
|
144
|
+
if (!read(options.resizable)) return;
|
|
145
|
+
const thEl = event.currentTarget.closest("th");
|
|
146
|
+
if (!thEl) return;
|
|
147
|
+
const tableEl = thEl.closest("table");
|
|
148
|
+
if (!tableEl) return;
|
|
149
|
+
const dataThs = Array.from(tableEl.querySelectorAll("thead th[data-col-key]"));
|
|
150
|
+
const domSnapshot = {};
|
|
151
|
+
for (const th of dataThs) domSnapshot[th.dataset.colKey] = th.offsetWidth;
|
|
152
|
+
const startWidth = domSnapshot[key] ?? thEl.offsetWidth;
|
|
153
|
+
latestResizeClientX = event.clientX;
|
|
154
|
+
resizeMoved = false;
|
|
155
|
+
session = {
|
|
156
|
+
key,
|
|
157
|
+
startX: event.clientX,
|
|
158
|
+
startWidth,
|
|
159
|
+
currentWidth: startWidth,
|
|
160
|
+
domSnapshot,
|
|
161
|
+
baseTableWidth: 0,
|
|
162
|
+
colEls: /* @__PURE__ */ new Map(),
|
|
163
|
+
thEls: /* @__PURE__ */ new Map()
|
|
164
|
+
};
|
|
165
|
+
document.body.style.cursor = "col-resize";
|
|
166
|
+
document.body.style.userSelect = "none";
|
|
167
|
+
document.addEventListener("mousemove", onResizeMove);
|
|
168
|
+
document.addEventListener("mouseup", stopResize, { capture: true });
|
|
169
|
+
}
|
|
170
|
+
onUnmounted(() => {
|
|
171
|
+
stopResize();
|
|
172
|
+
});
|
|
173
|
+
return {
|
|
174
|
+
tableRef,
|
|
175
|
+
isColumnResizing,
|
|
176
|
+
resizePaintWidths,
|
|
177
|
+
onResizeStart,
|
|
178
|
+
stopResize
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { useRsTableColumnResize };
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RsTable 横向列虚拟:冻结列始终渲染,中间 fluid 列按 scrollLeft 切片。
|
|
3
|
+
*
|
|
4
|
+
* 列宽拖拽 DOM 直写仍在 RsTable;本 composable 只消费已算好的列宽 getter。
|
|
5
|
+
*/
|
|
6
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
7
|
+
import { type RsTableColumn, type RsTableRowData } from '../components/table-utils';
|
|
8
|
+
/** ComputedRef / Ref / getter 均可(抽离后 RsTable 常直接传入 ref) */
|
|
9
|
+
type Source<T> = ComputedRef<T> | Ref<T> | (() => T);
|
|
10
|
+
/** 前缀列固定宽度(与 CSS / resizable 合计一致) */
|
|
11
|
+
export declare const RS_TABLE_PREFIX_COL_WIDTH: {
|
|
12
|
+
readonly drag: 40;
|
|
13
|
+
readonly expand: 40;
|
|
14
|
+
readonly select: 40;
|
|
15
|
+
readonly status: 52;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 计算前缀列总宽(拖拽/展开/选择/序号或 gutter)。
|
|
19
|
+
* 供列布局合计与列宽拖拽 DOM 直写共用,避免两处公式漂移。
|
|
20
|
+
*/
|
|
21
|
+
export declare function measureRsTablePrefixWidth(flags: {
|
|
22
|
+
showRowDragHandle?: boolean;
|
|
23
|
+
detailExpandable?: boolean;
|
|
24
|
+
showSelectColumn?: boolean;
|
|
25
|
+
showEditGutterColumn?: boolean;
|
|
26
|
+
showIndexColumn?: boolean;
|
|
27
|
+
gutterWidth?: number;
|
|
28
|
+
indexWidth?: number;
|
|
29
|
+
}): number;
|
|
30
|
+
export interface UseRsTableColumnVirtualOptions<T extends RsTableRowData> {
|
|
31
|
+
displayColumns: Source<RsTableColumn<T>[]>;
|
|
32
|
+
/** virtualColumns prop:true / false / 'auto' */
|
|
33
|
+
virtualColumns: Source<boolean | 'auto' | undefined>;
|
|
34
|
+
virtualColumnsAutoThreshold: Source<number | undefined>;
|
|
35
|
+
virtualColumnOverscan: Source<number | undefined>;
|
|
36
|
+
/** 列宽拖拽中强制关闭列虚拟,避免切片与 DOM 直写打架 */
|
|
37
|
+
isColumnResizing: Source<boolean>;
|
|
38
|
+
scrollLeft: Source<number>;
|
|
39
|
+
measuredViewportWidth: Source<number>;
|
|
40
|
+
columnWidths: Source<Record<string, number>>;
|
|
41
|
+
showRowDragHandle: Source<boolean>;
|
|
42
|
+
detailExpandable: Source<boolean>;
|
|
43
|
+
showSelectColumn: Source<boolean>;
|
|
44
|
+
showEditGutterColumn: Source<boolean>;
|
|
45
|
+
showIndexColumn: Source<boolean>;
|
|
46
|
+
showRowStatusColumn: Source<boolean>;
|
|
47
|
+
resolvedGutterWidth: Source<number>;
|
|
48
|
+
resolvedIndexWidth: Source<number>;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* 横向列虚拟切片状态。
|
|
52
|
+
*
|
|
53
|
+
* @returns left/right/fluid 列分组、virtualColumnsEnabled、visibleDataColumns、左右 pad
|
|
54
|
+
*/
|
|
55
|
+
export declare function useRsTableColumnVirtual<T extends RsTableRowData>(options: UseRsTableColumnVirtualOptions<T>): {
|
|
56
|
+
leftFixedDataColumns: ComputedRef<RsTableColumn<T>[]>;
|
|
57
|
+
rightFixedDataColumns: ComputedRef<RsTableColumn<T>[]>;
|
|
58
|
+
fluidDataColumns: ComputedRef<RsTableColumn<T>[]>;
|
|
59
|
+
dataColumnWidth: (column: RsTableColumn<T>) => number;
|
|
60
|
+
virtualColumnsEnabled: ComputedRef<boolean>;
|
|
61
|
+
fluidLeadingOffset: ComputedRef<number>;
|
|
62
|
+
columnVirtualSlice: ComputedRef<{
|
|
63
|
+
columns: RsTableColumn<T>[];
|
|
64
|
+
paddingLeft: number;
|
|
65
|
+
paddingRight: number;
|
|
66
|
+
startIndex: number;
|
|
67
|
+
endIndex: number;
|
|
68
|
+
fluidCount: number;
|
|
69
|
+
}>;
|
|
70
|
+
visibleDataColumns: ComputedRef<RsTableColumn<T>[]>;
|
|
71
|
+
columnPadLeft: ComputedRef<number>;
|
|
72
|
+
columnPadRight: ComputedRef<number>;
|
|
73
|
+
};
|
|
74
|
+
/** useRsTableColumnVirtual 返回值类型 */
|
|
75
|
+
export type RsTableColumnVirtualApi<T extends RsTableRowData> = ReturnType<typeof useRsTableColumnVirtual<T>>;
|
|
76
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { resolveColumnPixelWidth, sliceVirtualColumns } from "../components/table-utils.js";
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
//#region src/composables/useRsTableColumnVirtual.ts
|
|
4
|
+
/**
|
|
5
|
+
* RsTable 横向列虚拟:冻结列始终渲染,中间 fluid 列按 scrollLeft 切片。
|
|
6
|
+
*
|
|
7
|
+
* 列宽拖拽 DOM 直写仍在 RsTable;本 composable 只消费已算好的列宽 getter。
|
|
8
|
+
*/
|
|
9
|
+
/** 统一读取 ComputedRef / Ref / getter */
|
|
10
|
+
function read(source) {
|
|
11
|
+
if (typeof source === "function") return source();
|
|
12
|
+
return source.value;
|
|
13
|
+
}
|
|
14
|
+
/** 前缀列固定宽度(与 CSS / resizable 合计一致) */
|
|
15
|
+
var RS_TABLE_PREFIX_COL_WIDTH = {
|
|
16
|
+
drag: 40,
|
|
17
|
+
expand: 40,
|
|
18
|
+
select: 40,
|
|
19
|
+
status: 52
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* 计算前缀列总宽(拖拽/展开/选择/序号或 gutter)。
|
|
23
|
+
* 供列布局合计与列宽拖拽 DOM 直写共用,避免两处公式漂移。
|
|
24
|
+
*/
|
|
25
|
+
function measureRsTablePrefixWidth(flags) {
|
|
26
|
+
let sum = 0;
|
|
27
|
+
if (flags.showRowDragHandle) sum += RS_TABLE_PREFIX_COL_WIDTH.drag;
|
|
28
|
+
if (flags.detailExpandable) sum += RS_TABLE_PREFIX_COL_WIDTH.expand;
|
|
29
|
+
if (flags.showSelectColumn) sum += RS_TABLE_PREFIX_COL_WIDTH.select;
|
|
30
|
+
if (flags.showEditGutterColumn) sum += flags.gutterWidth ?? 0;
|
|
31
|
+
else if (flags.showIndexColumn) sum += flags.indexWidth ?? 0;
|
|
32
|
+
return sum;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* 横向列虚拟切片状态。
|
|
36
|
+
*
|
|
37
|
+
* @returns left/right/fluid 列分组、virtualColumnsEnabled、visibleDataColumns、左右 pad
|
|
38
|
+
*/
|
|
39
|
+
function useRsTableColumnVirtual(options) {
|
|
40
|
+
const leftFixedDataColumns = computed(() => read(options.displayColumns).filter((c) => c.fixed === "left"));
|
|
41
|
+
const rightFixedDataColumns = computed(() => read(options.displayColumns).filter((c) => c.fixed === "right"));
|
|
42
|
+
const fluidDataColumns = computed(() => read(options.displayColumns).filter((c) => !c.fixed));
|
|
43
|
+
const dataColumnWidth = (column) => resolveColumnPixelWidth(column, read(options.columnWidths));
|
|
44
|
+
/**
|
|
45
|
+
* 启用规则:
|
|
46
|
+
* - false → 关
|
|
47
|
+
* - 列宽拖拽中 → 关
|
|
48
|
+
* - true → fluid 列非空即开
|
|
49
|
+
* - auto → fluid 列数 >= threshold
|
|
50
|
+
*/
|
|
51
|
+
const virtualColumnsEnabled = computed(() => {
|
|
52
|
+
if (read(options.virtualColumns) === false) return false;
|
|
53
|
+
if (read(options.isColumnResizing)) return false;
|
|
54
|
+
if (read(options.virtualColumns) === true) return fluidDataColumns.value.length > 0;
|
|
55
|
+
const threshold = read(options.virtualColumnsAutoThreshold) ?? 0;
|
|
56
|
+
return threshold > 0 && fluidDataColumns.value.length >= threshold;
|
|
57
|
+
});
|
|
58
|
+
/** 左侧前缀 + 左冻结列总宽,用于把 scrollLeft 映射到 fluid 区 */
|
|
59
|
+
const fluidLeadingOffset = computed(() => {
|
|
60
|
+
let sum = 0;
|
|
61
|
+
if (read(options.showRowDragHandle)) sum += RS_TABLE_PREFIX_COL_WIDTH.drag;
|
|
62
|
+
if (read(options.detailExpandable)) sum += RS_TABLE_PREFIX_COL_WIDTH.expand;
|
|
63
|
+
if (read(options.showSelectColumn)) sum += RS_TABLE_PREFIX_COL_WIDTH.select;
|
|
64
|
+
if (read(options.showEditGutterColumn)) sum += read(options.resolvedGutterWidth);
|
|
65
|
+
else if (read(options.showIndexColumn)) sum += read(options.resolvedIndexWidth);
|
|
66
|
+
if (read(options.showRowStatusColumn)) sum += RS_TABLE_PREFIX_COL_WIDTH.status;
|
|
67
|
+
for (const col of leftFixedDataColumns.value) sum += dataColumnWidth(col);
|
|
68
|
+
return sum;
|
|
69
|
+
});
|
|
70
|
+
const columnVirtualSlice = computed(() => {
|
|
71
|
+
const fluidCount = fluidDataColumns.value.length;
|
|
72
|
+
if (!virtualColumnsEnabled.value) return {
|
|
73
|
+
columns: read(options.displayColumns),
|
|
74
|
+
paddingLeft: 0,
|
|
75
|
+
paddingRight: 0,
|
|
76
|
+
startIndex: 0,
|
|
77
|
+
endIndex: fluidCount,
|
|
78
|
+
fluidCount
|
|
79
|
+
};
|
|
80
|
+
const viewport = Math.max(read(options.measuredViewportWidth) || 320, 120);
|
|
81
|
+
const midScroll = Math.max(0, read(options.scrollLeft) - fluidLeadingOffset.value);
|
|
82
|
+
const midViewport = Math.max(120, viewport - Math.min(viewport - 40, fluidLeadingOffset.value));
|
|
83
|
+
const sliced = sliceVirtualColumns(fluidDataColumns.value, {
|
|
84
|
+
scrollLeft: midScroll,
|
|
85
|
+
viewportWidth: midViewport,
|
|
86
|
+
getWidth: dataColumnWidth,
|
|
87
|
+
overscan: read(options.virtualColumnOverscan) ?? 2
|
|
88
|
+
});
|
|
89
|
+
return {
|
|
90
|
+
columns: [
|
|
91
|
+
...leftFixedDataColumns.value,
|
|
92
|
+
...sliced.columns,
|
|
93
|
+
...rightFixedDataColumns.value
|
|
94
|
+
],
|
|
95
|
+
paddingLeft: sliced.paddingLeft,
|
|
96
|
+
paddingRight: sliced.paddingRight,
|
|
97
|
+
startIndex: sliced.startIndex,
|
|
98
|
+
endIndex: sliced.endIndex,
|
|
99
|
+
fluidCount
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
return {
|
|
103
|
+
leftFixedDataColumns,
|
|
104
|
+
rightFixedDataColumns,
|
|
105
|
+
fluidDataColumns,
|
|
106
|
+
dataColumnWidth,
|
|
107
|
+
virtualColumnsEnabled,
|
|
108
|
+
fluidLeadingOffset,
|
|
109
|
+
columnVirtualSlice,
|
|
110
|
+
visibleDataColumns: computed(() => columnVirtualSlice.value.columns),
|
|
111
|
+
columnPadLeft: computed(() => columnVirtualSlice.value.paddingLeft),
|
|
112
|
+
columnPadRight: computed(() => columnVirtualSlice.value.paddingRight)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { RS_TABLE_PREFIX_COL_WIDTH, measureRsTablePrefixWidth, useRsTableColumnVirtual };
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RsTable 列模型编排:顺序、列筛选、宽度与 displayColumns。
|
|
3
|
+
*
|
|
4
|
+
* 从 RsTable.vue 抽离,保持受控 / 非受控 API 与原先行为一致。
|
|
5
|
+
* 不负责虚拟列切片、列拖拽排序的 DOM 交互(仍由 RsTable 编排)。
|
|
6
|
+
*/
|
|
7
|
+
import { type ComputedRef, type Ref } from 'vue';
|
|
8
|
+
import { type RsTableColumn, type RsTableRowData } from '../components/table-utils';
|
|
9
|
+
/** 列相关事件(与 RsTable emit 子集对齐) */
|
|
10
|
+
export interface UseRsTableColumnsEmit {
|
|
11
|
+
(e: 'update:columnOrder', value: string[]): void;
|
|
12
|
+
(e: 'columnOrderChange', value: string[]): void;
|
|
13
|
+
(e: 'update:columnFilters', value: Record<string, string>): void;
|
|
14
|
+
(e: 'columnFiltersChange', value: Record<string, string>): void;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* useRsTableColumns 入参。
|
|
18
|
+
* 多数字段支持 ComputedRef 或 getter,便于在 RsTable 内直接绑定 props。
|
|
19
|
+
*/
|
|
20
|
+
export interface UseRsTableColumnsOptions<T extends RsTableRowData> {
|
|
21
|
+
/** 原始列定义(未排序) */
|
|
22
|
+
columns: ComputedRef<RsTableColumn<T>[]> | (() => RsTableColumn<T>[]);
|
|
23
|
+
/** 受控列顺序;undefined 表示非受控 */
|
|
24
|
+
columnOrder: ComputedRef<string[] | undefined> | (() => string[] | undefined);
|
|
25
|
+
/** 非受控初始列顺序 */
|
|
26
|
+
defaultColumnOrder: string[];
|
|
27
|
+
/** 受控列筛选;undefined 表示非受控 */
|
|
28
|
+
columnFilters: ComputedRef<Record<string, string> | undefined> | (() => Record<string, string> | undefined);
|
|
29
|
+
/** 非受控初始列筛选 */
|
|
30
|
+
defaultColumnFilters: Record<string, string>;
|
|
31
|
+
/** 初始列宽(像素) */
|
|
32
|
+
initialColumnWidths: ComputedRef<Record<string, number> | undefined> | (() => Record<string, number> | undefined);
|
|
33
|
+
/** 是否允许拖拽改列宽 */
|
|
34
|
+
resizable: ComputedRef<boolean> | (() => boolean);
|
|
35
|
+
/** 列布局:auto 自适应;fixed 固定表布局 */
|
|
36
|
+
columnLayout: ComputedRef<'auto' | 'fixed'> | (() => 'auto' | 'fixed');
|
|
37
|
+
/** 是否树表(影响展开列固定) */
|
|
38
|
+
treeMode: ComputedRef<boolean> | (() => boolean);
|
|
39
|
+
/** 树表是否固定展开列到左侧 */
|
|
40
|
+
treeFixExpandColumn: ComputedRef<boolean> | (() => boolean);
|
|
41
|
+
/** 树表展开列 key */
|
|
42
|
+
treeExpandColumnKey: ComputedRef<string | null> | (() => string | null);
|
|
43
|
+
emit: UseRsTableColumnsEmit;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* 列顺序 / 列筛选 / 列宽 / displayColumns。
|
|
47
|
+
*
|
|
48
|
+
* @returns
|
|
49
|
+
* - `columnOrderState` / `columnFiltersState`:受控或非受控读写
|
|
50
|
+
* - `displayColumns`:按顺序排列;树表可将展开列钉为 fixed-left
|
|
51
|
+
* - `resolvedColumnWidths` / `useStableColumnWidths`:拖拽列宽与稳定布局判定
|
|
52
|
+
* - `updateColumnFilter` / `columnFilterValue`:表头筛选写入与读取
|
|
53
|
+
*/
|
|
54
|
+
export declare function useRsTableColumns<T extends RsTableRowData>(options: UseRsTableColumnsOptions<T>): {
|
|
55
|
+
internalColumnOrder: Ref<string[], string[]>;
|
|
56
|
+
internalColumnFilters: Ref<Record<string, string>, Record<string, string>>;
|
|
57
|
+
internalColumnWidths: Ref<Record<string, number>, Record<string, number>>;
|
|
58
|
+
isColumnOrderControlled: ComputedRef<boolean>;
|
|
59
|
+
columnOrderState: import("vue").WritableComputedRef<string[], string[]>;
|
|
60
|
+
isColumnFiltersControlled: ComputedRef<boolean>;
|
|
61
|
+
columnFiltersState: ComputedRef<Record<string, string>>;
|
|
62
|
+
displayColumns: ComputedRef<RsTableColumn<T>[]>;
|
|
63
|
+
resolvedColumnWidths: import("vue").WritableComputedRef<Record<string, number>, Record<string, number>>;
|
|
64
|
+
useStableColumnWidths: ComputedRef<boolean>;
|
|
65
|
+
syncInternalColumnWidths: (columns: RsTableColumn<T>[]) => void;
|
|
66
|
+
updateColumnFilter: (key: string, value: string) => void;
|
|
67
|
+
columnFilterValue: (key: string) => string;
|
|
68
|
+
};
|
|
69
|
+
/** useRsTableColumns 返回值类型 */
|
|
70
|
+
export type RsTableColumnsApi<T extends RsTableRowData> = ReturnType<typeof useRsTableColumns<T>>;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { createInitialColumnWidths, resolveColumnOrder, resolveOrderedColumns } from "../components/table-utils.js";
|
|
2
|
+
import { computed, ref, watch } from "vue";
|
|
3
|
+
//#region src/composables/useRsTableColumns.ts
|
|
4
|
+
/**
|
|
5
|
+
* RsTable 列模型编排:顺序、列筛选、宽度与 displayColumns。
|
|
6
|
+
*
|
|
7
|
+
* 从 RsTable.vue 抽离,保持受控 / 非受控 API 与原先行为一致。
|
|
8
|
+
* 不负责虚拟列切片、列拖拽排序的 DOM 交互(仍由 RsTable 编排)。
|
|
9
|
+
*/
|
|
10
|
+
/** 统一读取 ComputedRef / getter */
|
|
11
|
+
function read(source) {
|
|
12
|
+
return typeof source === "function" ? source() : source.value;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* 列顺序 / 列筛选 / 列宽 / displayColumns。
|
|
16
|
+
*
|
|
17
|
+
* @returns
|
|
18
|
+
* - `columnOrderState` / `columnFiltersState`:受控或非受控读写
|
|
19
|
+
* - `displayColumns`:按顺序排列;树表可将展开列钉为 fixed-left
|
|
20
|
+
* - `resolvedColumnWidths` / `useStableColumnWidths`:拖拽列宽与稳定布局判定
|
|
21
|
+
* - `updateColumnFilter` / `columnFilterValue`:表头筛选写入与读取
|
|
22
|
+
*/
|
|
23
|
+
function useRsTableColumns(options) {
|
|
24
|
+
const internalColumnOrder = ref([...options.defaultColumnOrder]);
|
|
25
|
+
const internalColumnFilters = ref({ ...options.defaultColumnFilters });
|
|
26
|
+
const internalColumnWidths = ref({});
|
|
27
|
+
const isColumnOrderControlled = computed(() => read(options.columnOrder) !== void 0);
|
|
28
|
+
/** 当前列 key 顺序;受控时写回 update:columnOrder */
|
|
29
|
+
const columnOrderState = computed({
|
|
30
|
+
get: () => {
|
|
31
|
+
if (isColumnOrderControlled.value) return read(options.columnOrder) ?? [];
|
|
32
|
+
if (internalColumnOrder.value.length) return internalColumnOrder.value;
|
|
33
|
+
return resolveColumnOrder(read(options.columns));
|
|
34
|
+
},
|
|
35
|
+
set: (value) => {
|
|
36
|
+
if (isColumnOrderControlled.value) options.emit("update:columnOrder", value);
|
|
37
|
+
else internalColumnOrder.value = value;
|
|
38
|
+
options.emit("columnOrderChange", value);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
const isColumnFiltersControlled = computed(() => read(options.columnFilters) !== void 0);
|
|
42
|
+
/** 当前列筛选 map(列 key → 查询串) */
|
|
43
|
+
const columnFiltersState = computed(() => read(options.columnFilters) ?? internalColumnFilters.value);
|
|
44
|
+
/**
|
|
45
|
+
* 更新单列筛选值。
|
|
46
|
+
* 空串会删除该 key;同时发出 update:columnFilters / columnFiltersChange。
|
|
47
|
+
*/
|
|
48
|
+
function updateColumnFilter(key, value) {
|
|
49
|
+
const next = { ...columnFiltersState.value };
|
|
50
|
+
if (value.trim()) next[key] = value;
|
|
51
|
+
else delete next[key];
|
|
52
|
+
if (isColumnFiltersControlled.value) options.emit("update:columnFilters", next);
|
|
53
|
+
else internalColumnFilters.value = next;
|
|
54
|
+
options.emit("columnFiltersChange", next);
|
|
55
|
+
}
|
|
56
|
+
/** 读取单列当前筛选文案(无则空串) */
|
|
57
|
+
function columnFilterValue(key) {
|
|
58
|
+
return columnFiltersState.value[key] ?? "";
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* 渲染用列列表:先按 columnOrder 排序;
|
|
62
|
+
* 树表且 fixExpandColumn 时,将展开列强制 fixed=left(已有 fixed 则不动)。
|
|
63
|
+
*/
|
|
64
|
+
const displayColumns = computed(() => {
|
|
65
|
+
const ordered = resolveOrderedColumns(read(options.columns), columnOrderState.value);
|
|
66
|
+
if (!read(options.treeMode) || !read(options.treeFixExpandColumn)) return ordered;
|
|
67
|
+
const expandKey = read(options.treeExpandColumnKey);
|
|
68
|
+
if (!expandKey) return ordered;
|
|
69
|
+
return ordered.map((column) => {
|
|
70
|
+
if (column.key !== expandKey || column.fixed) return column;
|
|
71
|
+
return {
|
|
72
|
+
...column,
|
|
73
|
+
fixed: "left"
|
|
74
|
+
};
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
/** 持久化列宽(像素);拖拽过程中由 RsTable 另用 DOM 直写避免整表重渲 */
|
|
78
|
+
const resolvedColumnWidths = computed({
|
|
79
|
+
get: () => internalColumnWidths.value,
|
|
80
|
+
set: (value) => {
|
|
81
|
+
internalColumnWidths.value = value;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
/**
|
|
85
|
+
* 是否启用「稳定列宽」布局(resizable 下避免松手回弹)。
|
|
86
|
+
* fixed 布局,或每一列都有显式 width / 已测宽时为 true。
|
|
87
|
+
*/
|
|
88
|
+
const useStableColumnWidths = computed(() => {
|
|
89
|
+
if (!read(options.resizable)) return false;
|
|
90
|
+
if (read(options.columnLayout) === "fixed") return true;
|
|
91
|
+
const widths = internalColumnWidths.value;
|
|
92
|
+
return displayColumns.value.every((col) => {
|
|
93
|
+
return typeof widths[col.key] === "number" || col.width !== void 0;
|
|
94
|
+
});
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* 按当前 columns 重建内部列宽:保留已有测量值,合并 initialColumnWidths。
|
|
98
|
+
* columns 变化时由 watch 调用。
|
|
99
|
+
*/
|
|
100
|
+
function syncInternalColumnWidths(columns) {
|
|
101
|
+
const preserved = {};
|
|
102
|
+
for (const column of columns) {
|
|
103
|
+
const width = internalColumnWidths.value[column.key];
|
|
104
|
+
if (typeof width === "number") preserved[column.key] = width;
|
|
105
|
+
}
|
|
106
|
+
internalColumnWidths.value = createInitialColumnWidths(columns, {
|
|
107
|
+
...read(options.initialColumnWidths) ?? {},
|
|
108
|
+
...preserved
|
|
109
|
+
}, { forceAll: read(options.resizable) && useStableColumnWidths.value });
|
|
110
|
+
}
|
|
111
|
+
watch(() => read(options.columns), (columns) => {
|
|
112
|
+
syncInternalColumnWidths(columns);
|
|
113
|
+
if (!isColumnOrderControlled.value) internalColumnOrder.value = resolveColumnOrder(columns, internalColumnOrder.value);
|
|
114
|
+
}, { immediate: true });
|
|
115
|
+
return {
|
|
116
|
+
internalColumnOrder,
|
|
117
|
+
internalColumnFilters,
|
|
118
|
+
internalColumnWidths,
|
|
119
|
+
isColumnOrderControlled,
|
|
120
|
+
columnOrderState,
|
|
121
|
+
isColumnFiltersControlled,
|
|
122
|
+
columnFiltersState,
|
|
123
|
+
displayColumns,
|
|
124
|
+
resolvedColumnWidths,
|
|
125
|
+
useStableColumnWidths,
|
|
126
|
+
syncInternalColumnWidths,
|
|
127
|
+
updateColumnFilter,
|
|
128
|
+
columnFilterValue
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
//#endregion
|
|
132
|
+
export { useRsTableColumns };
|