niuma-ui 1.1.11 → 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 +23 -17
- package/README.en.md +13 -10
- package/README.md +18 -11
- 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,47 @@
|
|
|
1
|
+
import { inject, provide } from "vue";
|
|
2
|
+
//#region src/components/table/rs-table-view-context.ts
|
|
3
|
+
/**
|
|
4
|
+
* RsTable 视图上下文(provide/inject)。
|
|
5
|
+
*
|
|
6
|
+
* 多表隔离(关键):
|
|
7
|
+
* - 每个 RsTable 实例在自身 setup 内 provide,子树 inject 最近祖先
|
|
8
|
+
* - 同页多表互不影响:A 的 Header/Body 不会读到 B 的 view
|
|
9
|
+
* - 禁止把 view 存到模块级单例;instanceId 仅用于诊断
|
|
10
|
+
*
|
|
11
|
+
* 对比:RsTableModuleRegistry 是进程级全局(同 AG Grid ModuleRegistry),
|
|
12
|
+
* 会作用于所有实例;实例专属能力请用 props.features。
|
|
13
|
+
*/
|
|
14
|
+
/** 每实例递增,仅诊断用,不参与业务逻辑 */
|
|
15
|
+
var viewInstanceSeq = 0;
|
|
16
|
+
var RS_TABLE_VIEW_KEY = Symbol("rsTableView");
|
|
17
|
+
/**
|
|
18
|
+
* 显式区分 state getters 与 handlers,避免把零参 handler 误当成状态 getter。
|
|
19
|
+
*/
|
|
20
|
+
function createRsTableViewContext(parts) {
|
|
21
|
+
const ctx = { instanceId: `rs-table-view-${++viewInstanceSeq}` };
|
|
22
|
+
for (const [key, getter] of Object.entries(parts.state)) {
|
|
23
|
+
if (!getter) continue;
|
|
24
|
+
Object.defineProperty(ctx, key, {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
configurable: true,
|
|
27
|
+
get: getter
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
for (const [key, fn] of Object.entries(parts.handlers)) if (fn !== void 0) ctx[key] = fn;
|
|
31
|
+
return ctx;
|
|
32
|
+
}
|
|
33
|
+
/** 在 RsTable 内 provide(每个实例调用一次) */
|
|
34
|
+
function provideRsTableView(ctx) {
|
|
35
|
+
provide(RS_TABLE_VIEW_KEY, ctx);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* 子视图 inject;必须在某个 RsTable 子树内。
|
|
39
|
+
* 多表场景下自动绑定到最近的表格实例。
|
|
40
|
+
*/
|
|
41
|
+
function useRsTableView() {
|
|
42
|
+
const ctx = inject(RS_TABLE_VIEW_KEY, null);
|
|
43
|
+
if (!ctx) throw new Error("[RsTable] useRsTableView() 必须在 RsTable 子树内调用(每表独立 provide,多表互不串扰)");
|
|
44
|
+
return ctx;
|
|
45
|
+
}
|
|
46
|
+
//#endregion
|
|
47
|
+
export { RS_TABLE_VIEW_KEY, createRsTableViewContext, provideRsTableView, useRsTableView };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 表格 → 图表系列纯函数(库无关)。
|
|
3
|
+
*
|
|
4
|
+
* 产出结构可直接喂给 ECharts / Chart.js 等:
|
|
5
|
+
* - pie / 普通 bar:points[{ name, value }]
|
|
6
|
+
* - 分类轴 bar:categories + values
|
|
7
|
+
*
|
|
8
|
+
* 不引入任何图表依赖,避免拖重内核。
|
|
9
|
+
*/
|
|
10
|
+
import type { RsTableRowData } from '../table-utils';
|
|
11
|
+
/** 图表意图类型(渲染层自行映射到具体库) */
|
|
12
|
+
export type RsTableChartKind = 'bar' | 'pie' | 'line';
|
|
13
|
+
/** 单点:饼图扇区 / 柱条 */
|
|
14
|
+
export interface RsTableChartPoint {
|
|
15
|
+
/** 分类名(展示) */
|
|
16
|
+
name: string;
|
|
17
|
+
/** 聚合值 */
|
|
18
|
+
value: number;
|
|
19
|
+
/** 原始分类 key(与 name 通常相同,供下钻) */
|
|
20
|
+
key: string;
|
|
21
|
+
/** 该分类下的行数(便于 tooltip) */
|
|
22
|
+
count: number;
|
|
23
|
+
}
|
|
24
|
+
/** 一组图表系列 */
|
|
25
|
+
export interface RsTableChartSeries {
|
|
26
|
+
id: string;
|
|
27
|
+
kind: RsTableChartKind;
|
|
28
|
+
points: RsTableChartPoint[];
|
|
29
|
+
/** 分类轴(与 points 顺序一致) */
|
|
30
|
+
categories: string[];
|
|
31
|
+
/** 数值轴(与 points 顺序一致) */
|
|
32
|
+
values: number[];
|
|
33
|
+
}
|
|
34
|
+
export type RsTableChartValueAgg = 'count' | 'sum' | 'avg' | 'min' | 'max';
|
|
35
|
+
/**
|
|
36
|
+
* 图表系列定义。
|
|
37
|
+
* - categoryField:分组字段
|
|
38
|
+
* - valueField + valueAgg:度量;仅 count 时可省略 valueField
|
|
39
|
+
*/
|
|
40
|
+
export interface RsTableChartSeriesDef {
|
|
41
|
+
id: string;
|
|
42
|
+
kind: RsTableChartKind;
|
|
43
|
+
categoryField: string;
|
|
44
|
+
valueField?: string;
|
|
45
|
+
valueAgg?: RsTableChartValueAgg;
|
|
46
|
+
/** 最多保留前 N 类,其余合并为 otherLabel;0/不传表示不截断 */
|
|
47
|
+
topN?: number;
|
|
48
|
+
otherLabel?: string;
|
|
49
|
+
/** 空分类展示名 */
|
|
50
|
+
emptyCategoryLabel?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* 按分类字段对行做聚合,生成库无关图表系列。
|
|
54
|
+
*
|
|
55
|
+
* @param rows 通常为 SelectionSource.sourceRows(选中优先)
|
|
56
|
+
* @param def 系列定义
|
|
57
|
+
*/
|
|
58
|
+
export declare function buildTableChartSeries<T extends RsTableRowData>(rows: readonly T[], def: RsTableChartSeriesDef): RsTableChartSeries;
|
|
59
|
+
/**
|
|
60
|
+
* 批量构建多组系列(同一 sourceRows,多套分组/度量)。
|
|
61
|
+
*/
|
|
62
|
+
export declare function buildTableChartSeriesList<T extends RsTableRowData>(rows: readonly T[], defs: readonly RsTableChartSeriesDef[]): RsTableChartSeries[];
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
//#region src/components/table/table-chart-utils.ts
|
|
2
|
+
function readField(row, field) {
|
|
3
|
+
return row[field];
|
|
4
|
+
}
|
|
5
|
+
function toNumber(value) {
|
|
6
|
+
if (typeof value === "number" && Number.isFinite(value)) return value;
|
|
7
|
+
if (typeof value === "string" && value.trim() !== "") {
|
|
8
|
+
const n = Number(value);
|
|
9
|
+
return Number.isFinite(n) ? n : null;
|
|
10
|
+
}
|
|
11
|
+
return null;
|
|
12
|
+
}
|
|
13
|
+
function categoryKey(raw, emptyLabel) {
|
|
14
|
+
if (raw == null || raw === "") return emptyLabel;
|
|
15
|
+
return String(raw);
|
|
16
|
+
}
|
|
17
|
+
function aggregateBucket(bucket, agg) {
|
|
18
|
+
if (agg === "count") return bucket.count;
|
|
19
|
+
if (!bucket.nums.length) return 0;
|
|
20
|
+
if (agg === "sum") return bucket.nums.reduce((a, b) => a + b, 0);
|
|
21
|
+
if (agg === "avg") return bucket.nums.reduce((a, b) => a + b, 0) / bucket.nums.length;
|
|
22
|
+
if (agg === "min") return Math.min(...bucket.nums);
|
|
23
|
+
if (agg === "max") return Math.max(...bucket.nums);
|
|
24
|
+
return 0;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 按分类字段对行做聚合,生成库无关图表系列。
|
|
28
|
+
*
|
|
29
|
+
* @param rows 通常为 SelectionSource.sourceRows(选中优先)
|
|
30
|
+
* @param def 系列定义
|
|
31
|
+
*/
|
|
32
|
+
function buildTableChartSeries(rows, def) {
|
|
33
|
+
const emptyLabel = def.emptyCategoryLabel ?? "(空)";
|
|
34
|
+
const agg = def.valueAgg ?? (def.valueField ? "sum" : "count");
|
|
35
|
+
const map = /* @__PURE__ */ new Map();
|
|
36
|
+
for (let i = 0; i < rows.length; i += 1) {
|
|
37
|
+
const row = rows[i];
|
|
38
|
+
const key = categoryKey(readField(row, def.categoryField), emptyLabel);
|
|
39
|
+
let bucket = map.get(key);
|
|
40
|
+
if (!bucket) {
|
|
41
|
+
bucket = {
|
|
42
|
+
key,
|
|
43
|
+
name: key,
|
|
44
|
+
count: 0,
|
|
45
|
+
nums: []
|
|
46
|
+
};
|
|
47
|
+
map.set(key, bucket);
|
|
48
|
+
}
|
|
49
|
+
bucket.count += 1;
|
|
50
|
+
if (def.valueField && agg !== "count") {
|
|
51
|
+
const n = toNumber(readField(row, def.valueField));
|
|
52
|
+
if (n != null) bucket.nums.push(n);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
let points = [...map.values()].map((bucket) => ({
|
|
56
|
+
key: bucket.key,
|
|
57
|
+
name: bucket.name,
|
|
58
|
+
value: aggregateBucket(bucket, agg),
|
|
59
|
+
count: bucket.count
|
|
60
|
+
}));
|
|
61
|
+
points.sort((a, b) => b.value - a.value || a.name.localeCompare(b.name));
|
|
62
|
+
const topN = def.topN ?? 0;
|
|
63
|
+
if (topN > 0 && points.length > topN) {
|
|
64
|
+
const head = points.slice(0, topN);
|
|
65
|
+
const rest = points.slice(topN);
|
|
66
|
+
const otherValue = rest.reduce((s, p) => s + p.value, 0);
|
|
67
|
+
const otherCount = rest.reduce((s, p) => s + p.count, 0);
|
|
68
|
+
head.push({
|
|
69
|
+
key: "__other__",
|
|
70
|
+
name: def.otherLabel ?? "其他",
|
|
71
|
+
value: otherValue,
|
|
72
|
+
count: otherCount
|
|
73
|
+
});
|
|
74
|
+
points = head;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
id: def.id,
|
|
78
|
+
kind: def.kind,
|
|
79
|
+
points,
|
|
80
|
+
categories: points.map((p) => p.name),
|
|
81
|
+
values: points.map((p) => p.value)
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* 批量构建多组系列(同一 sourceRows,多套分组/度量)。
|
|
86
|
+
*/
|
|
87
|
+
function buildTableChartSeriesList(rows, defs) {
|
|
88
|
+
return defs.map((def) => buildTableChartSeries(rows, def));
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { buildTableChartSeries, buildTableChartSeriesList };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RsContextMenuItem } from '../context-menu-utils';
|
|
2
|
+
import type { RsTableColumn, RsTableRowData } from '../table-utils';
|
|
3
|
+
export declare const TABLE_CTX_COPY_CELL = "copyCell";
|
|
4
|
+
export declare const TABLE_CTX_COPY_ROW = "copyRow";
|
|
5
|
+
export declare function buildDefaultTableContextMenuItems(options: {
|
|
6
|
+
copyCellLabel: string;
|
|
7
|
+
copyRowLabel: string;
|
|
8
|
+
hasRow: boolean;
|
|
9
|
+
hasCell: boolean;
|
|
10
|
+
}): RsContextMenuItem[];
|
|
11
|
+
export declare function resolveTableCellCopyText<T extends RsTableRowData>(row: T, column: RsTableColumn<T>, rowIndex: number, draft?: string): string;
|
|
12
|
+
export declare function resolveTableRowCopyText<T extends RsTableRowData>(row: T, rowIndex: number, columns: RsTableColumn<T>[], getDraft?: (rowKey: string, colKey: string) => string | undefined, rowKey?: string): string;
|
|
13
|
+
export declare function isBuiltInTableContextMenuKey(key: string): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { formatCellDisplayValue, resolveCellEditText, resolveColumnRawValue } from "./table-edit-utils.js";
|
|
2
|
+
//#region src/components/table/table-context-menu.ts
|
|
3
|
+
var TABLE_CTX_COPY_CELL = "copyCell";
|
|
4
|
+
var TABLE_CTX_COPY_ROW = "copyRow";
|
|
5
|
+
function buildDefaultTableContextMenuItems(options) {
|
|
6
|
+
const items = [];
|
|
7
|
+
if (options.hasRow && options.hasCell) items.push({
|
|
8
|
+
key: TABLE_CTX_COPY_CELL,
|
|
9
|
+
label: options.copyCellLabel,
|
|
10
|
+
icon: "copy"
|
|
11
|
+
});
|
|
12
|
+
if (options.hasRow) items.push({
|
|
13
|
+
key: TABLE_CTX_COPY_ROW,
|
|
14
|
+
label: options.copyRowLabel,
|
|
15
|
+
icon: "copy"
|
|
16
|
+
});
|
|
17
|
+
return items;
|
|
18
|
+
}
|
|
19
|
+
function resolveTableCellCopyText(row, column, rowIndex, draft) {
|
|
20
|
+
return resolveCellEditText(row, column, rowIndex, draft);
|
|
21
|
+
}
|
|
22
|
+
function resolveTableRowCopyText(row, rowIndex, columns, getDraft, rowKey) {
|
|
23
|
+
return columns.map((column) => {
|
|
24
|
+
const draft = rowKey && getDraft ? getDraft(rowKey, column.key) : void 0;
|
|
25
|
+
if (draft !== void 0) return formatCellDisplayValue(draft, row, column, rowIndex);
|
|
26
|
+
return formatCellDisplayValue(resolveColumnRawValue(row, column, rowIndex), row, column, rowIndex);
|
|
27
|
+
}).join(" ");
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { TABLE_CTX_COPY_CELL, TABLE_CTX_COPY_ROW, buildDefaultTableContextMenuItems, resolveTableCellCopyText, resolveTableRowCopyText };
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import type { VNodeChild } from 'vue';
|
|
2
|
+
import type { RsTableCellValueType, RsTableColumn, RsTableColumnEditorOptionsResolved, RsTableRowData } from '../table-utils';
|
|
3
|
+
export type RsTableCellCommitTrigger = 'blur' | 'enter' | 'change' | 'manual';
|
|
4
|
+
export type RsTableCellEditTrigger = 'click' | 'dblclick';
|
|
5
|
+
export type RsTableCellEditFocusMode = 'end' | 'select' | 'start';
|
|
6
|
+
export type RsTableCellNavigateDirection = 'next' | 'prev' | 'up' | 'down';
|
|
7
|
+
export type RsTableCellEditorInputType = 'text' | 'number' | 'date' | 'datetime-local' | 'textarea';
|
|
8
|
+
/** 编辑草稿中的显式 NULL 哨兵(与空字符串区分) */
|
|
9
|
+
export declare const RS_TABLE_NULL_DRAFT = "__rs_null__";
|
|
10
|
+
export declare function isNullDraft(text: string | undefined | null): boolean;
|
|
11
|
+
export declare function nullToEditText(): string;
|
|
12
|
+
export declare function resolveCellEditorInputType(valueType?: RsTableCellValueType): RsTableCellEditorInputType;
|
|
13
|
+
export declare function resolveColumnValueType<T extends RsTableRowData>(column: RsTableColumn<T>): RsTableCellValueType;
|
|
14
|
+
export declare function resolveColumnEditorOptions<T extends RsTableRowData>(column: RsTableColumn<T>, row?: T, index?: number): RsTableColumnEditorOptionsResolved;
|
|
15
|
+
/** 布尔列:展示态直接勾选切换,不挂载编辑器(大表友好)。 */
|
|
16
|
+
export declare function isBooleanToggleColumn<T extends RsTableRowData>(column: RsTableColumn<T>): boolean;
|
|
17
|
+
/** 浮层类编辑器(select/date):点选即编辑,避免再双击。 */
|
|
18
|
+
export declare function usesOverlayEditor(valueType: RsTableCellValueType): boolean;
|
|
19
|
+
export declare function resolveColumnEditTrigger<T extends RsTableRowData>(column: RsTableColumn<T>, tableDefault: RsTableCellEditTrigger): RsTableCellEditTrigger;
|
|
20
|
+
export declare function resolveColumnCommitOn<T extends RsTableRowData>(column: RsTableColumn<T>, rowCommit: boolean): RsTableCellCommitTrigger;
|
|
21
|
+
/** 单元格数据值(编辑 / 复制 / 对比);不含 `render` 展示结果。 */
|
|
22
|
+
export declare function resolveColumnRawValue<T extends RsTableRowData>(row: T, column: RsTableColumn<T>, _index: number): unknown;
|
|
23
|
+
/** 将 `render` / 展示内容压成纯文本(tooltip、无障碍等);VNode 取文本子节点。 */
|
|
24
|
+
export declare function plainTextFromCellDisplay(content: VNodeChild): string;
|
|
25
|
+
/**
|
|
26
|
+
* 单元格展示内容:优先 `column.render`(支持 VNode),否则 formatter / 原始值。
|
|
27
|
+
* `draft` 存在时展示编辑草稿的格式化文本。
|
|
28
|
+
*/
|
|
29
|
+
export declare function resolveColumnDisplayContent<T extends RsTableRowData>(row: T, column: RsTableColumn<T>, index: number, options?: {
|
|
30
|
+
draft?: string;
|
|
31
|
+
nullLabel?: string;
|
|
32
|
+
}): VNodeChild;
|
|
33
|
+
export declare function isColumnEditable<T extends RsTableRowData>(column: RsTableColumn<T>, row: T, index: number, tableEditable: boolean): boolean;
|
|
34
|
+
export declare function isColumnNullable<T extends RsTableRowData>(column: RsTableColumn<T>, tableAllowNull: boolean): boolean;
|
|
35
|
+
export declare function coerceBoolean(value: unknown): boolean;
|
|
36
|
+
export declare function booleanToEditText(value: unknown): string;
|
|
37
|
+
/** 去掉千分位等展示噪音,便于 number 解析 */
|
|
38
|
+
export declare function stripNumberDecorations(input: string): string;
|
|
39
|
+
export declare function formatCellDisplayValue<T extends RsTableRowData>(value: unknown, row: T, column: RsTableColumn<T>, index: number, options?: {
|
|
40
|
+
nullLabel?: string;
|
|
41
|
+
}): string;
|
|
42
|
+
/** 单元格值 → 纯文本(对象用 JSON,避免 `[object Object]`)。 */
|
|
43
|
+
export declare function cellValueToText(value: unknown): string;
|
|
44
|
+
export declare function resolveCellEditText<T extends RsTableRowData>(row: T, column: RsTableColumn<T>, index: number, draft?: string): string;
|
|
45
|
+
export declare function parseCellEditInput<T extends RsTableRowData>(input: string, row: T, column: RsTableColumn<T>, index: number, options?: {
|
|
46
|
+
allowNull?: boolean;
|
|
47
|
+
}): unknown;
|
|
48
|
+
export declare function validateCellValue<T extends RsTableRowData>(value: unknown, row: T, column: RsTableColumn<T>, index: number): string | null;
|
|
49
|
+
export declare function validateCellValueAsync<T extends RsTableRowData>(value: unknown, row: T, column: RsTableColumn<T>, index: number): Promise<string | null>;
|
|
50
|
+
export declare function isAsyncValidator<T extends RsTableRowData>(column: RsTableColumn<T>): boolean;
|
|
51
|
+
/** 多行同列批量填充目标 */
|
|
52
|
+
export declare function listBatchColumnTargets<T extends RsTableRowData>(options: {
|
|
53
|
+
rows: Array<{
|
|
54
|
+
row: T;
|
|
55
|
+
rowIndex: number;
|
|
56
|
+
rowKey: string;
|
|
57
|
+
}>;
|
|
58
|
+
column: RsTableColumn<T>;
|
|
59
|
+
tableEditable: boolean;
|
|
60
|
+
selectedKeys: string[];
|
|
61
|
+
anchorRowKey: string;
|
|
62
|
+
}): Array<{
|
|
63
|
+
row: T;
|
|
64
|
+
rowIndex: number;
|
|
65
|
+
rowKey: string;
|
|
66
|
+
}>;
|
|
67
|
+
export declare function isCellValueChanged(previous: unknown, next: unknown): boolean;
|
|
68
|
+
export declare function isRowEditPending<T extends RsTableRowData>(rowKey: string, row: T, rowIndex: number, options: {
|
|
69
|
+
isRowDirty: (rowKey: string) => boolean;
|
|
70
|
+
editingCell: {
|
|
71
|
+
rowKey: string;
|
|
72
|
+
colKey: string;
|
|
73
|
+
} | null;
|
|
74
|
+
editingDraft: string;
|
|
75
|
+
resolveColumn: (colKey: string) => RsTableColumn<T> | undefined;
|
|
76
|
+
}): boolean;
|
|
77
|
+
export interface RsTableEditableCellRef {
|
|
78
|
+
rowKey: string;
|
|
79
|
+
colKey: string;
|
|
80
|
+
rowIndex: number;
|
|
81
|
+
}
|
|
82
|
+
/** 按显示列顺序收集可编辑单元格(用于 Tab / 方向键) */
|
|
83
|
+
export declare function listEditableCells<T extends RsTableRowData>(options: {
|
|
84
|
+
rows: T[];
|
|
85
|
+
columns: RsTableColumn<T>[];
|
|
86
|
+
tableEditable: boolean;
|
|
87
|
+
rowKeyOf: (row: T, index: number) => string;
|
|
88
|
+
skipBooleanToggle?: boolean;
|
|
89
|
+
}): RsTableEditableCellRef[];
|
|
90
|
+
export declare function findEditableCellIndex(cells: RsTableEditableCellRef[], rowKey: string, colKey: string): number;
|
|
91
|
+
export declare function navigateEditableCell(cells: RsTableEditableCellRef[], rowKey: string, colKey: string, direction: RsTableCellNavigateDirection, columnsPerRow: number): RsTableEditableCellRef | null;
|
|
92
|
+
/** 解析剪贴板 TSV/CSV(制表符优先) */
|
|
93
|
+
export declare function parseClipboardGrid(text: string): string[][];
|
|
94
|
+
export declare function applyFocusMode(input: HTMLInputElement | HTMLTextAreaElement, mode: RsTableCellEditFocusMode): void;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { formatDateTimeValue, formatDateValue } from "../date-picker-utils.js";
|
|
2
|
+
import { getCellValue } from "../table-utils.js";
|
|
3
|
+
import { formatIsoUtcToLocal, looksLikeIsoDateTimeWithTz, parseLocalDateTimeToUtcIso } from "../../lib/iso-local-datetime.js";
|
|
4
|
+
import "vue";
|
|
5
|
+
//#region src/components/table/table-edit-utils.ts
|
|
6
|
+
/** 编辑草稿中的显式 NULL 哨兵(与空字符串区分) */
|
|
7
|
+
var RS_TABLE_NULL_DRAFT = "__rs_null__";
|
|
8
|
+
function isNullDraft(text) {
|
|
9
|
+
return text === RS_TABLE_NULL_DRAFT;
|
|
10
|
+
}
|
|
11
|
+
function nullToEditText() {
|
|
12
|
+
return RS_TABLE_NULL_DRAFT;
|
|
13
|
+
}
|
|
14
|
+
function resolveCellEditorInputType(valueType = "text") {
|
|
15
|
+
switch (valueType) {
|
|
16
|
+
case "number": return "number";
|
|
17
|
+
case "date": return "date";
|
|
18
|
+
case "datetime": return "datetime-local";
|
|
19
|
+
case "textarea": return "textarea";
|
|
20
|
+
default: return "text";
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function resolveColumnValueType(column) {
|
|
24
|
+
return column.valueType ?? "text";
|
|
25
|
+
}
|
|
26
|
+
function resolveColumnEditorOptions(column, row, index = 0) {
|
|
27
|
+
const { options: rawOptions, ...rest } = column.editorOptions ?? {};
|
|
28
|
+
let options;
|
|
29
|
+
if (typeof rawOptions === "function") if (row != null) options = rawOptions(row, index);
|
|
30
|
+
else options = [];
|
|
31
|
+
else options = rawOptions;
|
|
32
|
+
return {
|
|
33
|
+
...rest,
|
|
34
|
+
options
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
/** 布尔列:展示态直接勾选切换,不挂载编辑器(大表友好)。 */
|
|
38
|
+
function isBooleanToggleColumn(column) {
|
|
39
|
+
return resolveColumnValueType(column) === "boolean";
|
|
40
|
+
}
|
|
41
|
+
/** 浮层类编辑器(select/date):点选即编辑,避免再双击。 */
|
|
42
|
+
function usesOverlayEditor(valueType) {
|
|
43
|
+
return valueType === "select" || valueType === "date" || valueType === "datetime";
|
|
44
|
+
}
|
|
45
|
+
function resolveColumnEditTrigger(column, tableDefault) {
|
|
46
|
+
if (column.editTrigger) return column.editTrigger;
|
|
47
|
+
if (usesOverlayEditor(resolveColumnValueType(column))) return "click";
|
|
48
|
+
return tableDefault;
|
|
49
|
+
}
|
|
50
|
+
function resolveColumnCommitOn(column, rowCommit) {
|
|
51
|
+
if (rowCommit) return "manual";
|
|
52
|
+
if (column.commitOn) return column.commitOn;
|
|
53
|
+
const valueType = resolveColumnValueType(column);
|
|
54
|
+
if (valueType === "boolean" || valueType === "select") return "change";
|
|
55
|
+
if (valueType === "date" || valueType === "datetime") return "enter";
|
|
56
|
+
return "blur";
|
|
57
|
+
}
|
|
58
|
+
/** 单元格数据值(编辑 / 复制 / 对比);不含 `render` 展示结果。 */
|
|
59
|
+
function resolveColumnRawValue(row, column, _index) {
|
|
60
|
+
return getCellValue(row, column);
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* 单元格展示内容:优先 `column.render`(支持 VNode),否则 formatter / 原始值。
|
|
64
|
+
* `draft` 存在时展示编辑草稿的格式化文本。
|
|
65
|
+
*/
|
|
66
|
+
function resolveColumnDisplayContent(row, column, index, options) {
|
|
67
|
+
if (options?.draft !== void 0) return formatCellDisplayValue(options.draft, row, column, index, { nullLabel: options.nullLabel });
|
|
68
|
+
if (column.render) return column.render(row, index);
|
|
69
|
+
return formatCellDisplayValue(getCellValue(row, column), row, column, index, { nullLabel: options?.nullLabel });
|
|
70
|
+
}
|
|
71
|
+
function isColumnEditable(column, row, index, tableEditable) {
|
|
72
|
+
if (!tableEditable) return false;
|
|
73
|
+
if (typeof column.editable === "function") return column.editable(row, index);
|
|
74
|
+
if (column.editable === false) return false;
|
|
75
|
+
if (column.editable === true) return true;
|
|
76
|
+
return tableEditable;
|
|
77
|
+
}
|
|
78
|
+
function isColumnNullable(column, tableAllowNull) {
|
|
79
|
+
if (column.nullable === false) return false;
|
|
80
|
+
if (column.nullable === true) return true;
|
|
81
|
+
return tableAllowNull;
|
|
82
|
+
}
|
|
83
|
+
function coerceBoolean(value) {
|
|
84
|
+
if (typeof value === "boolean") return value;
|
|
85
|
+
if (typeof value === "number") return value !== 0;
|
|
86
|
+
const text = String(value ?? "").trim().toLowerCase();
|
|
87
|
+
if ([
|
|
88
|
+
"false",
|
|
89
|
+
"0",
|
|
90
|
+
"no",
|
|
91
|
+
"n",
|
|
92
|
+
"否",
|
|
93
|
+
"f",
|
|
94
|
+
""
|
|
95
|
+
].includes(text)) return false;
|
|
96
|
+
return [
|
|
97
|
+
"true",
|
|
98
|
+
"1",
|
|
99
|
+
"yes",
|
|
100
|
+
"y",
|
|
101
|
+
"是",
|
|
102
|
+
"t",
|
|
103
|
+
"✓",
|
|
104
|
+
"✔",
|
|
105
|
+
"√"
|
|
106
|
+
].includes(text);
|
|
107
|
+
}
|
|
108
|
+
function booleanToEditText(value) {
|
|
109
|
+
return coerceBoolean(value) ? "true" : "false";
|
|
110
|
+
}
|
|
111
|
+
/** 去掉千分位等展示噪音,便于 number 解析 */
|
|
112
|
+
function stripNumberDecorations(input) {
|
|
113
|
+
return String(input ?? "").replace(/,/g, "").replace(/\s/g, "").trim();
|
|
114
|
+
}
|
|
115
|
+
function formatCellDisplayValue(value, row, column, index, options) {
|
|
116
|
+
if (column.formatter) return column.formatter(value, row, index);
|
|
117
|
+
if (value === null || value === void 0) return options?.nullLabel ?? "(NULL)";
|
|
118
|
+
if (isNullDraft(String(value))) return options?.nullLabel ?? "(NULL)";
|
|
119
|
+
const valueType = resolveColumnValueType(column);
|
|
120
|
+
if (valueType === "boolean") return coerceBoolean(value) ? "✓" : "";
|
|
121
|
+
if (valueType === "date") {
|
|
122
|
+
const raw = String(value);
|
|
123
|
+
const local = formatIsoUtcToLocal(raw);
|
|
124
|
+
if (local) return local.slice(0, 10);
|
|
125
|
+
return formatDateValue(raw) || raw;
|
|
126
|
+
}
|
|
127
|
+
if (valueType === "datetime") {
|
|
128
|
+
const raw = String(value);
|
|
129
|
+
const local = formatIsoUtcToLocal(raw);
|
|
130
|
+
if (local) return local;
|
|
131
|
+
return formatDateTimeValue(raw) || raw;
|
|
132
|
+
}
|
|
133
|
+
if (typeof value === "string") {
|
|
134
|
+
const local = formatIsoUtcToLocal(value);
|
|
135
|
+
if (local) return local;
|
|
136
|
+
}
|
|
137
|
+
return cellValueToText(value);
|
|
138
|
+
}
|
|
139
|
+
/** 单元格值 → 纯文本(对象用 JSON,避免 `[object Object]`)。 */
|
|
140
|
+
function cellValueToText(value) {
|
|
141
|
+
if (value === null || value === void 0) return "";
|
|
142
|
+
if (typeof value === "string") return value;
|
|
143
|
+
if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint") return String(value);
|
|
144
|
+
if (typeof value === "object") try {
|
|
145
|
+
return JSON.stringify(value);
|
|
146
|
+
} catch {
|
|
147
|
+
return Object.prototype.toString.call(value);
|
|
148
|
+
}
|
|
149
|
+
return String(value);
|
|
150
|
+
}
|
|
151
|
+
function resolveCellEditText(row, column, index, draft) {
|
|
152
|
+
if (draft !== void 0) return draft;
|
|
153
|
+
const raw = resolveColumnRawValue(row, column, index);
|
|
154
|
+
if (raw === null || raw === void 0) return RS_TABLE_NULL_DRAFT;
|
|
155
|
+
const valueType = resolveColumnValueType(column);
|
|
156
|
+
if (valueType === "boolean") return booleanToEditText(raw);
|
|
157
|
+
if (typeof raw === "string") {
|
|
158
|
+
const local = formatIsoUtcToLocal(raw);
|
|
159
|
+
if (local) {
|
|
160
|
+
if (valueType === "date") return local.slice(0, 10);
|
|
161
|
+
return local;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
if (valueType === "date") return formatDateValue(String(raw)) || String(raw);
|
|
165
|
+
if (valueType === "datetime") return formatDateTimeValue(String(raw)) || String(raw);
|
|
166
|
+
if (column.formatter) return cellValueToText(raw);
|
|
167
|
+
return cellValueToText(raw);
|
|
168
|
+
}
|
|
169
|
+
function parseCellEditInput(input, row, column, index, options) {
|
|
170
|
+
if (isNullDraft(input)) return null;
|
|
171
|
+
const allowNull = options?.allowNull ?? isColumnNullable(column, true);
|
|
172
|
+
if (column.emptyAsNull && allowNull && input.trim() === "") return null;
|
|
173
|
+
if (column.parser) return column.parser(input, row, index);
|
|
174
|
+
const valueType = resolveColumnValueType(column);
|
|
175
|
+
if (valueType === "boolean") return coerceBoolean(input);
|
|
176
|
+
if (valueType === "number") {
|
|
177
|
+
const cleaned = stripNumberDecorations(input);
|
|
178
|
+
if (!cleaned) return allowNull ? null : "";
|
|
179
|
+
const parsed = Number(cleaned);
|
|
180
|
+
return Number.isNaN(parsed) ? input : parsed;
|
|
181
|
+
}
|
|
182
|
+
const trimmed = input.trim();
|
|
183
|
+
const previous = resolveColumnRawValue(row, column, index);
|
|
184
|
+
if (typeof previous === "string" && looksLikeIsoDateTimeWithTz(previous.trim())) {
|
|
185
|
+
if (!trimmed) return allowNull ? null : "";
|
|
186
|
+
const utc = parseLocalDateTimeToUtcIso(trimmed, previous);
|
|
187
|
+
if (utc) return utc;
|
|
188
|
+
}
|
|
189
|
+
if (valueType === "datetime" && column.editorOptions?.timezone === "utc") {
|
|
190
|
+
if (!trimmed) return allowNull ? null : "";
|
|
191
|
+
const utc = parseLocalDateTimeToUtcIso(trimmed);
|
|
192
|
+
if (utc) return utc;
|
|
193
|
+
if (/Z$/i.test(trimmed) || /[+-]\d{2}:?\d{2}$/.test(trimmed)) return trimmed;
|
|
194
|
+
return `${trimmed.replace(" ", "T")}Z`;
|
|
195
|
+
}
|
|
196
|
+
return input;
|
|
197
|
+
}
|
|
198
|
+
async function validateCellValueAsync(value, row, column, index) {
|
|
199
|
+
if (!column.validator) return null;
|
|
200
|
+
return column.validator(value, row, index);
|
|
201
|
+
}
|
|
202
|
+
/** 多行同列批量填充目标 */
|
|
203
|
+
function listBatchColumnTargets(options) {
|
|
204
|
+
const selected = new Set(options.selectedKeys);
|
|
205
|
+
if (selected.size <= 1 || !selected.has(options.anchorRowKey)) {
|
|
206
|
+
const anchor = options.rows.find((item) => item.rowKey === options.anchorRowKey);
|
|
207
|
+
return anchor ? [anchor] : [];
|
|
208
|
+
}
|
|
209
|
+
return options.rows.filter((item) => selected.has(item.rowKey) && isColumnEditable(options.column, item.row, item.rowIndex, options.tableEditable));
|
|
210
|
+
}
|
|
211
|
+
function isCellValueChanged(previous, next) {
|
|
212
|
+
if (previous === next) return false;
|
|
213
|
+
if (previous == null && next == null) return false;
|
|
214
|
+
if (typeof previous === "boolean" || typeof next === "boolean") return coerceBoolean(previous) !== coerceBoolean(next);
|
|
215
|
+
return cellValueToText(previous) !== cellValueToText(next);
|
|
216
|
+
}
|
|
217
|
+
function isRowEditPending(rowKey, row, rowIndex, options) {
|
|
218
|
+
if (options.isRowDirty(rowKey)) return true;
|
|
219
|
+
const editing = options.editingCell;
|
|
220
|
+
if (!editing || editing.rowKey !== rowKey) return false;
|
|
221
|
+
const column = options.resolveColumn(editing.colKey);
|
|
222
|
+
if (!column) return false;
|
|
223
|
+
return isCellValueChanged(resolveCellEditText(row, column, rowIndex), options.editingDraft);
|
|
224
|
+
}
|
|
225
|
+
/** 按显示列顺序收集可编辑单元格(用于 Tab / 方向键) */
|
|
226
|
+
function listEditableCells(options) {
|
|
227
|
+
const result = [];
|
|
228
|
+
for (let rowIndex = 0; rowIndex < options.rows.length; rowIndex += 1) {
|
|
229
|
+
const row = options.rows[rowIndex];
|
|
230
|
+
const rowKey = options.rowKeyOf(row, rowIndex);
|
|
231
|
+
for (const column of options.columns) {
|
|
232
|
+
if (!isColumnEditable(column, row, rowIndex, options.tableEditable)) continue;
|
|
233
|
+
if (options.skipBooleanToggle && isBooleanToggleColumn(column)) continue;
|
|
234
|
+
result.push({
|
|
235
|
+
rowKey,
|
|
236
|
+
colKey: column.key,
|
|
237
|
+
rowIndex
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
return result;
|
|
242
|
+
}
|
|
243
|
+
function findEditableCellIndex(cells, rowKey, colKey) {
|
|
244
|
+
return cells.findIndex((cell) => cell.rowKey === rowKey && cell.colKey === colKey);
|
|
245
|
+
}
|
|
246
|
+
function navigateEditableCell(cells, rowKey, colKey, direction, columnsPerRow) {
|
|
247
|
+
if (!cells.length || columnsPerRow <= 0) return null;
|
|
248
|
+
const index = findEditableCellIndex(cells, rowKey, colKey);
|
|
249
|
+
if (index < 0) return cells[0] ?? null;
|
|
250
|
+
if (direction === "next") return cells[(index + 1) % cells.length] ?? null;
|
|
251
|
+
if (direction === "prev") return cells[(index - 1 + cells.length) % cells.length] ?? null;
|
|
252
|
+
const current = cells[index];
|
|
253
|
+
[...new Set(cells.map((cell) => cell.colKey))].indexOf(current.colKey);
|
|
254
|
+
const rowDelta = direction === "down" ? 1 : -1;
|
|
255
|
+
const targetRow = current.rowIndex + rowDelta;
|
|
256
|
+
const sameCol = cells.find((cell) => cell.rowIndex === targetRow && cell.colKey === current.colKey);
|
|
257
|
+
if (sameCol) return sameCol;
|
|
258
|
+
const candidates = cells.filter((cell) => cell.colKey === current.colKey);
|
|
259
|
+
if (!candidates.length) return null;
|
|
260
|
+
if (direction === "down") return candidates.find((cell) => cell.rowIndex > current.rowIndex) ?? candidates[0] ?? null;
|
|
261
|
+
return [...candidates].reverse().find((cell) => cell.rowIndex < current.rowIndex) ?? candidates[candidates.length - 1] ?? null;
|
|
262
|
+
}
|
|
263
|
+
/** 解析剪贴板 TSV/CSV(制表符优先) */
|
|
264
|
+
function parseClipboardGrid(text) {
|
|
265
|
+
const lines = text.replace(/\r\n/g, "\n").replace(/\r/g, "\n").split("\n");
|
|
266
|
+
while (lines.length && lines[lines.length - 1] === "") lines.pop();
|
|
267
|
+
return lines.map((line) => line.split(" "));
|
|
268
|
+
}
|
|
269
|
+
function applyFocusMode(input, mode) {
|
|
270
|
+
const end = input.value.length;
|
|
271
|
+
if (mode === "select") {
|
|
272
|
+
input.select();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
if (mode === "start") {
|
|
276
|
+
input.setSelectionRange(0, 0);
|
|
277
|
+
return;
|
|
278
|
+
}
|
|
279
|
+
input.setSelectionRange(end, end);
|
|
280
|
+
}
|
|
281
|
+
//#endregion
|
|
282
|
+
export { RS_TABLE_NULL_DRAFT, applyFocusMode, booleanToEditText, cellValueToText, coerceBoolean, findEditableCellIndex, formatCellDisplayValue, isBooleanToggleColumn, isCellValueChanged, isColumnEditable, isColumnNullable, isNullDraft, isRowEditPending, listBatchColumnTargets, listEditableCells, navigateEditableCell, nullToEditText, parseCellEditInput, parseClipboardGrid, resolveCellEditText, resolveCellEditorInputType, resolveColumnCommitOn, resolveColumnDisplayContent, resolveColumnEditTrigger, resolveColumnEditorOptions, resolveColumnRawValue, resolveColumnValueType, stripNumberDecorations, usesOverlayEditor, validateCellValueAsync };
|