@oneflowui/ui 0.4.2 → 0.4.4
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/dist/_virtual/_commonjsHelpers.js +6 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/assets/tableWorker-CTsbCPPP.js +1 -0
- package/dist/components/ContextMenu/index.vue.d.ts +2 -1
- package/dist/components/ContextMenu/index.vue.js +7 -0
- package/dist/components/ContextMenu/index.vue2.js +92 -0
- package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
- package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
- package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
- package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
- package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
- package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
- package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
- package/dist/components/Dashboard/index.vue.js +7 -0
- package/dist/components/Dashboard/index.vue2.js +104 -0
- package/dist/components/ai/AiMessageBubble.vue.js +7 -0
- package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
- package/dist/components/ai/AiMessageList.vue.js +7 -0
- package/dist/components/ai/AiMessageList.vue2.js +78 -0
- package/dist/components/ai/AiSender.vue.js +7 -0
- package/dist/components/ai/AiSender.vue2.js +86 -0
- package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
- package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
- package/dist/components/ai/AiThinking.vue.js +7 -0
- package/dist/components/ai/AiThinking.vue2.js +19 -0
- package/dist/components/ai/UserMessageBubble.vue.js +7 -0
- package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
- package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
- package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
- package/dist/components/auxiliary/FileUpload.vue.js +7 -0
- package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
- package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
- package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
- package/dist/components/base/Accordion.vue.js +7 -0
- package/dist/components/base/Accordion.vue2.js +78 -0
- package/dist/components/base/AddViewBtn.vue.js +7 -0
- package/dist/components/base/AddViewBtn.vue2.js +25 -0
- package/dist/components/base/Avatar.vue.js +7 -0
- package/dist/components/base/Avatar.vue2.js +72 -0
- package/dist/components/base/Badge.vue.js +7 -0
- package/dist/components/base/Badge.vue2.js +70 -0
- package/dist/components/base/ButtonGroup.vue.js +7 -0
- package/dist/components/base/ButtonGroup.vue2.js +40 -0
- package/dist/components/base/ChainItem.vue.js +7 -0
- package/dist/components/base/ChainItem.vue2.js +68 -0
- package/dist/components/base/DescBlock.vue.js +7 -0
- package/dist/components/base/DescBlock.vue2.js +13 -0
- package/dist/components/base/DropdownMenu.vue.js +7 -0
- package/dist/components/base/DropdownMenu.vue2.js +91 -0
- package/dist/components/base/EmptyState.vue.js +7 -0
- package/dist/components/base/EmptyState.vue2.js +38 -0
- package/dist/components/base/InfoCard.vue.js +7 -0
- package/dist/components/base/InfoCard.vue2.js +167 -0
- package/dist/components/base/MonitorItem.vue.d.ts +1 -1
- package/dist/components/base/MonitorItem.vue.js +7 -0
- package/dist/components/base/MonitorItem.vue2.js +56 -0
- package/dist/components/base/PersonaCard.vue.d.ts +2 -1
- package/dist/components/base/PersonaCard.vue.js +7 -0
- package/dist/components/base/PersonaCard.vue2.js +185 -0
- package/dist/components/base/ProgressBar.vue.js +7 -0
- package/dist/components/base/ProgressBar.vue2.js +49 -0
- package/dist/components/base/RangeSlider.vue.js +7 -0
- package/dist/components/base/RangeSlider.vue2.js +35 -0
- package/dist/components/base/RefTag.vue.d.ts +2 -2
- package/dist/components/base/RefTag.vue.js +7 -0
- package/dist/components/base/RefTag.vue2.js +52 -0
- package/dist/components/base/SearchHighlight.vue.d.ts +6 -0
- package/dist/components/base/SearchHighlight.vue.js +7 -0
- package/dist/components/base/SearchHighlight.vue2.js +21 -0
- package/dist/components/base/SectionBlock.vue.js +7 -0
- package/dist/components/base/SectionBlock.vue2.js +115 -0
- package/dist/components/base/SelectBadge.vue.js +7 -0
- package/dist/components/base/SelectBadge.vue2.js +81 -0
- package/dist/components/base/StatisticCard.vue.js +7 -0
- package/dist/components/base/StatisticCard.vue2.js +57 -0
- package/dist/components/base/StatusIndicator.vue.js +7 -0
- package/dist/components/base/StatusIndicator.vue2.js +54 -0
- package/dist/components/base/StatusSummary.vue.js +7 -0
- package/dist/components/base/StatusSummary.vue2.js +64 -0
- package/dist/components/base/Stepper.vue.js +7 -0
- package/dist/components/base/Stepper.vue2.js +70 -0
- package/dist/components/base/Switch.vue.js +7 -0
- package/dist/components/base/Switch.vue2.js +43 -0
- package/dist/components/base/ToolbarBtn.vue.d.ts +2 -1
- package/dist/components/base/ToolbarBtn.vue.js +7 -0
- package/dist/components/base/ToolbarBtn.vue2.js +30 -0
- package/dist/components/base/ViewModeGroup.vue.d.ts +2 -1
- package/dist/components/base/ViewModeGroup.vue.js +7 -0
- package/dist/components/base/ViewModeGroup.vue2.js +32 -0
- package/dist/components/base/ViewSwitcher.vue.d.ts +2 -1
- package/dist/components/base/ViewSwitcher.vue.js +7 -0
- package/dist/components/base/ViewSwitcher.vue2.js +73 -0
- package/dist/components/base/ViewTab.vue.js +7 -0
- package/dist/components/base/ViewTab.vue2.js +42 -0
- package/dist/components/base/index.d.ts +1 -0
- package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
- package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
- package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
- package/dist/components/detail/CommentItem.vue.js +7 -0
- package/dist/components/detail/CommentItem.vue2.js +29 -0
- package/dist/components/detail/DetailLayout.vue.js +7 -0
- package/dist/components/detail/DetailLayout.vue2.js +118 -0
- package/dist/components/detail/PropPanel.vue.js +7 -0
- package/dist/components/detail/PropPanel.vue2.js +51 -0
- package/dist/components/detail/PropRow.vue.js +7 -0
- package/dist/components/detail/PropRow.vue2.js +51 -0
- package/dist/components/editor/BlockQuote.vue.js +7 -0
- package/dist/components/editor/BlockQuote.vue2.js +45 -0
- package/dist/components/editor/CodeBlock.vue.js +7 -0
- package/dist/components/editor/CodeBlock.vue2.js +48 -0
- package/dist/components/editor/ContentBlock.vue.js +7 -0
- package/dist/components/editor/ContentBlock.vue2.js +49 -0
- package/dist/components/editor/RefLink.vue.js +7 -0
- package/dist/components/editor/RefLink.vue2.js +37 -0
- package/dist/components/editor/RichTextEditor.vue.js +7 -0
- package/dist/components/editor/RichTextEditor.vue2.js +132 -0
- package/dist/components/field/FieldAttachment.vue.d.ts +17 -0
- package/dist/components/field/FieldAttachment.vue.js +7 -0
- package/dist/components/field/FieldAttachment.vue2.js +69 -0
- package/dist/components/field/FieldAutoNumber.vue.d.ts +7 -0
- package/dist/components/field/FieldAutoNumber.vue.js +7 -0
- package/dist/components/field/FieldAutoNumber.vue2.js +15 -0
- package/dist/components/field/FieldCheckbox.vue.js +7 -0
- package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
- package/dist/components/field/FieldCreator.vue.d.ts +7 -0
- package/dist/components/field/FieldCreator.vue.js +7 -0
- package/dist/components/field/FieldCreator.vue2.js +24 -0
- package/dist/components/field/FieldCurrency.vue.d.ts +17 -0
- package/dist/components/field/FieldCurrency.vue.js +7 -0
- package/dist/components/field/FieldCurrency.vue2.js +42 -0
- package/dist/components/field/FieldDate.vue.js +7 -0
- package/dist/components/field/FieldDate.vue2.js +36 -0
- package/dist/components/field/FieldDatetime.vue.js +7 -0
- package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
- package/dist/components/field/FieldEmail.vue.js +7 -0
- package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
- package/dist/components/field/FieldMarkdownPreview.vue.d.ts +13 -0
- package/dist/components/field/FieldMarkdownPreview.vue.js +7 -0
- package/dist/components/field/FieldMarkdownPreview.vue2.js +37 -0
- package/dist/components/field/FieldMultiSelect.vue.js +7 -0
- package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
- package/dist/components/field/FieldNumber.vue.js +7 -0
- package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
- package/dist/components/field/FieldPhone.vue.d.ts +17 -0
- package/dist/components/field/FieldPhone.vue.js +7 -0
- package/dist/components/field/FieldPhone.vue2.js +34 -0
- package/dist/components/field/FieldProgress.vue.d.ts +15 -0
- package/dist/components/field/FieldProgress.vue.js +7 -0
- package/dist/components/field/FieldProgress.vue2.js +40 -0
- package/dist/components/field/FieldRating.vue.js +7 -0
- package/dist/components/field/FieldRating.vue2.js +31 -0
- package/dist/components/field/FieldRelation.vue.d.ts +17 -0
- package/dist/components/field/FieldRelation.vue.js +7 -0
- package/dist/components/field/FieldRelation.vue2.js +67 -0
- package/dist/components/field/FieldRichText.vue.d.ts +17 -0
- package/dist/components/field/FieldRichText.vue.js +7 -0
- package/dist/components/field/FieldRichText.vue2.js +65 -0
- package/dist/components/field/FieldSelect.vue.js +7 -0
- package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +44 -44
- package/dist/components/field/FieldText.vue.js +7 -0
- package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
- package/dist/components/field/FieldUrl.vue.js +7 -0
- package/dist/components/field/FieldUrl.vue2.js +33 -0
- package/dist/components/form/FormDesigner.vue.js +7 -0
- package/dist/components/form/FormDesigner.vue2.js +255 -0
- package/dist/components/gallery/GalleryCard.vue.js +7 -0
- package/dist/components/gallery/GalleryCard.vue2.js +87 -0
- package/dist/components/gallery/GalleryView.vue.d.ts +6 -2
- package/dist/components/gallery/GalleryView.vue.js +7 -0
- package/dist/components/gallery/GalleryView.vue2.js +58 -0
- package/dist/components/kanban/KanbanBoard.vue.d.ts +5 -1
- package/dist/components/kanban/KanbanBoard.vue.js +7 -0
- package/dist/components/kanban/KanbanBoard.vue2.js +119 -0
- package/dist/components/kanban/KanbanCard.vue.js +7 -0
- package/dist/components/kanban/KanbanCard.vue2.js +56 -0
- package/dist/components/kanban/KanbanColumn.vue.js +7 -0
- package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
- package/dist/components/kanban/QuickAddRow.vue.js +7 -0
- package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
- package/dist/components/layout/AppLayout.vue.js +7 -0
- package/dist/components/layout/AppLayout.vue2.js +82 -0
- package/dist/components/layout/Navbar.vue.js +7 -0
- package/dist/components/layout/Navbar.vue2.js +70 -0
- package/dist/components/layout/Sidebar.vue.js +7 -0
- package/dist/components/layout/Sidebar.vue2.js +88 -0
- package/dist/components/layout/StatusBar.vue.js +7 -0
- package/dist/components/layout/StatusBar.vue2.js +37 -0
- package/dist/components/mermaid/MermaidChart.vue.js +7 -0
- package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
- package/dist/components/overlay/Dialog.vue.js +7 -0
- package/dist/components/overlay/Dialog.vue2.js +89 -0
- package/dist/components/overlay/Drawer.vue.js +7 -0
- package/dist/components/overlay/Drawer.vue2.js +96 -0
- package/dist/components/overlay/Modal.vue.js +7 -0
- package/dist/components/overlay/Modal.vue2.js +99 -0
- package/dist/components/overlay/SidePanel.vue.js +7 -0
- package/dist/components/overlay/SidePanel.vue2.js +121 -0
- package/dist/components/split/SplitPane.vue.js +8 -0
- package/dist/components/split/SplitPane.vue2.js +68 -0
- package/dist/components/table/ColumnHeaderMenu.vue.d.ts +33 -0
- package/dist/components/table/ColumnHeaderMenu.vue.js +7 -0
- package/dist/components/table/ColumnHeaderMenu.vue2.js +153 -0
- package/dist/components/table/DataTable.vue.d.ts +116 -25
- package/dist/components/table/DataTable.vue.js +7 -0
- package/dist/components/table/DataTable.vue2.js +821 -0
- package/dist/components/table/DetailSheet.vue.d.ts +43 -0
- package/dist/components/table/DetailSheet.vue.js +7 -0
- package/dist/components/table/DetailSheet.vue2.js +140 -0
- package/dist/components/table/FieldCell.vue.d.ts +1 -1
- package/dist/components/table/FieldCell.vue.js +7 -0
- package/dist/components/table/FieldCell.vue2.js +86 -0
- package/dist/components/table/FieldTypePicker.vue.d.ts +15 -0
- package/dist/components/table/FieldTypePicker.vue.js +7 -0
- package/dist/components/table/FieldTypePicker.vue2.js +92 -0
- package/dist/components/table/MobileListView.vue.d.ts +24 -0
- package/dist/components/table/MobileListView.vue.js +7 -0
- package/dist/components/table/MobileListView.vue2.js +90 -0
- package/dist/components/table/NewRowBtn.vue.js +7 -0
- package/dist/components/table/NewRowBtn.vue2.js +22 -0
- package/dist/components/table/TableColumnManager.vue.js +7 -0
- package/dist/components/table/TableColumnManager.vue2.js +100 -0
- package/dist/components/table/TableDataRow.vue.js +7 -0
- package/dist/components/table/TableDataRow.vue2.js +115 -0
- package/dist/components/table/TableFilterPanel.vue.js +7 -0
- package/dist/components/table/TableFilterPanel.vue2.js +142 -0
- package/dist/components/table/TableGroupRow.vue.d.ts +5 -0
- package/dist/components/table/TableGroupRow.vue.js +7 -0
- package/dist/components/table/TableGroupRow.vue2.js +58 -0
- package/dist/components/table/TableHeaderRow.vue.d.ts +16 -0
- package/dist/components/table/TableHeaderRow.vue.js +7 -0
- package/dist/components/table/TableHeaderRow.vue2.js +90 -0
- package/dist/components/table/TableToolbar.vue.d.ts +118 -0
- package/dist/components/table/TableToolbar.vue.js +7 -0
- package/dist/components/table/TableToolbar.vue2.js +273 -0
- package/dist/components/table/index.d.ts +5 -0
- package/dist/components/tabs/TabPanel.vue.js +7 -0
- package/dist/components/tabs/TabPanel.vue2.js +26 -0
- package/dist/components/tabs/Tabs.vue.js +7 -0
- package/dist/components/tabs/Tabs.vue2.js +87 -0
- package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
- package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
- package/dist/components/timeline/GanttRow.vue.js +7 -0
- package/dist/components/timeline/GanttRow.vue2.js +110 -0
- package/dist/components/timeline/GanttTimeline.vue.js +7 -0
- package/dist/components/timeline/GanttTimeline.vue2.js +186 -0
- package/dist/components/toast/ToastContainer.vue.js +34 -0
- package/dist/components/toast/ToastContainer.vue3.js +5 -0
- package/dist/components/toast/ToastItem.vue.js +7 -0
- package/dist/components/toast/ToastItem.vue2.js +78 -0
- package/dist/composables/index.d.ts +19 -0
- package/dist/composables/useAiChat.js +103 -0
- package/dist/composables/useBadge.js +76 -0
- package/dist/composables/useBreakpoint.d.ts +2 -1
- package/dist/composables/useBreakpoint.js +18 -0
- package/dist/composables/useColumnResize.d.ts +19 -0
- package/dist/composables/useColumnResize.js +58 -0
- package/dist/composables/useDraftRows.d.ts +33 -0
- package/dist/composables/useDraftRows.js +103 -0
- package/dist/composables/useFixedColumns.d.ts +25 -0
- package/dist/composables/useFixedColumns.js +61 -0
- package/dist/composables/useFocusTrap.d.ts +10 -0
- package/dist/composables/useFocusTrap.js +37 -0
- package/dist/composables/useInlineEdit.js +28 -0
- package/dist/composables/useKeyboardNavigation.d.ts +45 -0
- package/dist/composables/useKeyboardNavigation.js +140 -0
- package/dist/composables/useMarkdown.js +69 -0
- package/dist/composables/useRowDrag.d.ts +32 -0
- package/dist/composables/useRowDrag.js +85 -0
- package/dist/composables/useSchemaEngine.d.ts +31 -0
- package/dist/composables/useSchemaEngine.js +129 -0
- package/dist/composables/useSearch.d.ts +30 -0
- package/dist/composables/useSearch.js +59 -0
- package/dist/composables/useStream.js +80 -0
- package/dist/composables/useSupabaseProvider.d.ts +70 -0
- package/dist/composables/useSupabaseProvider.js +126 -0
- package/dist/composables/useTable.d.ts +3 -0
- package/dist/composables/useTable.js +135 -0
- package/dist/composables/useTableColumns.js +24 -0
- package/dist/composables/useTableData.js +16 -0
- package/dist/composables/useTableFilter.js +97 -0
- package/dist/composables/useTableGroup.d.ts +14 -1
- package/dist/composables/useTableGroup.js +70 -0
- package/dist/composables/useToast.js +38 -0
- package/dist/composables/useTypewriter.js +56 -0
- package/dist/composables/useViewPersistence.d.ts +98 -0
- package/dist/composables/useViewPersistence.js +141 -0
- package/dist/composables/useVirtualList.d.ts +4 -1
- package/dist/composables/useVirtualList.js +140 -0
- package/dist/composables/useWorkerSort.d.ts +14 -0
- package/dist/composables/useWorkerSort.js +61 -0
- package/dist/constants/table.js +11 -0
- package/dist/index.d.ts +28 -4
- package/dist/index.js +349 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
- package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +63 -2
- package/dist/types/index.js +94 -0
- package/dist/types/table-internal.d.ts +64 -0
- package/dist/utils/aggregation.d.ts +5 -0
- package/dist/utils/aggregation.js +38 -0
- package/dist/utils/icon.js +15 -0
- package/dist/utils/supabaseAdapter.d.ts +48 -0
- package/dist/utils/supabaseAdapter.js +76 -0
- package/dist/utils/supabaseSchema.d.ts +81 -0
- package/dist/utils/supabaseSchema.js +202 -0
- package/dist/workers/tableWorker.d.ts +31 -0
- package/package.json +13 -6
- package/dist/FieldDate-Bljx4jb7.js +0 -34
- package/dist/FieldRating-BKHUu-A1.js +0 -32
- package/dist/FieldUrl-bv0EB9sh.js +0 -34
- package/dist/index-DQph5iTq.js +0 -12936
- package/dist/oneflow-ui.js +0 -111
- package/dist/oneflow-ui.umd.cjs +0 -13
|
@@ -0,0 +1,821 @@
|
|
|
1
|
+
import { defineComponent as Fl, defineAsyncComponent as Ge, ref as S, toRef as h, computed as b, watch as be, unref as t, openBlock as a, createElementBlock as s, Fragment as v, createVNode as T, createBlock as y, createCommentVNode as M, createElementVNode as g, normalizeStyle as k, normalizeClass as z, renderList as m, mergeProps as K, withModifiers as _, renderSlot as Q, toDisplayString as L, createSlots as Pe, withCtx as Ve, Teleport as Hl } from "vue";
|
|
2
|
+
import ke from "./TableHeaderRow.vue.js";
|
|
3
|
+
import Oe from "./TableDataRow.vue.js";
|
|
4
|
+
import Z from "./TableGroupRow.vue.js";
|
|
5
|
+
import Bl from "./NewRowBtn.vue.js";
|
|
6
|
+
import Il from "./MobileListView.vue.js";
|
|
7
|
+
import Kl from "./DetailSheet.vue.js";
|
|
8
|
+
import E from "./FieldCell.vue.js";
|
|
9
|
+
import { useInlineEdit as El } from "../../composables/useInlineEdit.js";
|
|
10
|
+
import { useVirtualList as _l } from "../../composables/useVirtualList.js";
|
|
11
|
+
import { useTable as Ll } from "../../composables/useTable.js";
|
|
12
|
+
import { useTableGroup as Gl } from "../../composables/useTableGroup.js";
|
|
13
|
+
import { useTableData as Pl } from "../../composables/useTableData.js";
|
|
14
|
+
import { useTableColumns as Vl } from "../../composables/useTableColumns.js";
|
|
15
|
+
import { useColumnResize as Ol } from "../../composables/useColumnResize.js";
|
|
16
|
+
import { useKeyboardNavigation as Nl } from "../../composables/useKeyboardNavigation.js";
|
|
17
|
+
import { useBreakpoint as Wl } from "../../composables/useBreakpoint.js";
|
|
18
|
+
import { useFixedColumns as Yl } from "../../composables/useFixedColumns.js";
|
|
19
|
+
import { useRowDrag as jl } from "../../composables/useRowDrag.js";
|
|
20
|
+
import { useDraftRows as Xl } from "../../composables/useDraftRows.js";
|
|
21
|
+
const Ul = ["tabindex"], ql = {
|
|
22
|
+
key: 0,
|
|
23
|
+
class: "of-data-table-body",
|
|
24
|
+
style: { position: "relative" }
|
|
25
|
+
}, Jl = { class: "of-data-table-fixed-body" }, Ql = ["onMouseenter", "onClick"], Zl = ["checked", "onChange"], eo = {
|
|
26
|
+
key: 1,
|
|
27
|
+
class: "of-td-text"
|
|
28
|
+
}, lo = ["onMouseenter", "onClick"], oo = ["checked", "onChange"], to = {
|
|
29
|
+
key: 1,
|
|
30
|
+
class: "of-td-text"
|
|
31
|
+
}, no = { class: "of-data-table-scroll-body" }, ao = {
|
|
32
|
+
key: 0,
|
|
33
|
+
style: { height: "36px" }
|
|
34
|
+
}, ro = ["onMouseenter", "onClick"], so = {
|
|
35
|
+
key: 1,
|
|
36
|
+
class: "of-td-text"
|
|
37
|
+
}, io = {
|
|
38
|
+
key: 0,
|
|
39
|
+
style: { height: "36px" }
|
|
40
|
+
}, uo = ["onMouseenter", "onClick"], fo = {
|
|
41
|
+
key: 1,
|
|
42
|
+
class: "of-td-text"
|
|
43
|
+
}, co = {
|
|
44
|
+
key: 3,
|
|
45
|
+
class: "of-data-table-draft-toolbar"
|
|
46
|
+
}, vo = { class: "of-data-table-draft-count" }, yo = { class: "of-add-field-popup" }, go = 36, bo = 44, No = /* @__PURE__ */ Fl({
|
|
47
|
+
__name: "DataTable",
|
|
48
|
+
props: {
|
|
49
|
+
tasks: {},
|
|
50
|
+
records: {},
|
|
51
|
+
schema: {},
|
|
52
|
+
view: {},
|
|
53
|
+
columns: {},
|
|
54
|
+
fieldDefs: {},
|
|
55
|
+
rowKey: { default: "id" },
|
|
56
|
+
selectable: { type: Boolean, default: !0 },
|
|
57
|
+
addable: { type: Boolean, default: !0 },
|
|
58
|
+
priorityColorMap: {},
|
|
59
|
+
statusColorMap: {},
|
|
60
|
+
groupBy: {},
|
|
61
|
+
groupColorMap: {},
|
|
62
|
+
virtual: { type: Boolean },
|
|
63
|
+
virtualThreshold: { default: 100 },
|
|
64
|
+
readonly: { type: Boolean, default: !1 },
|
|
65
|
+
fixedColumns: {},
|
|
66
|
+
enableResize: { type: Boolean, default: !1 },
|
|
67
|
+
enableKeyboard: { type: Boolean, default: !1 },
|
|
68
|
+
enableRowDrag: { type: Boolean, default: !1 },
|
|
69
|
+
enableCrossGroupDrag: { type: Boolean, default: !1 },
|
|
70
|
+
groups: {},
|
|
71
|
+
aggregations: {},
|
|
72
|
+
enableFieldManagement: { type: Boolean, default: !1 }
|
|
73
|
+
},
|
|
74
|
+
emits: ["row-click", "row-click-record", "add-row", "selection-change", "cell-edit", "column-resize", "active-cell-change", "row-reorder", "row-group-change", "draft-commit", "draft-discard", "drafts-commit-all", "paste", "schema-add-field", "schema-rename-field", "schema-change-field-type", "schema-hide-field", "schema-delete-field", "schema-duplicate-field"],
|
|
75
|
+
setup(f, { emit: Ne }) {
|
|
76
|
+
const We = Ge(() => import("./ColumnHeaderMenu.vue.js")), Ye = Ge(() => import("./FieldTypePicker.vue.js")), i = f, c = Ne, { isMobile: he } = Wl(), G = S(!1), P = S(null), ee = El(), { commit: je, editingCell: Xe } = ee, { rows: me } = Pl({
|
|
77
|
+
tasks: h(i, "tasks"),
|
|
78
|
+
records: h(i, "records")
|
|
79
|
+
}), { columns: le } = Vl({
|
|
80
|
+
columns: h(i, "columns"),
|
|
81
|
+
schema: h(i, "schema"),
|
|
82
|
+
view: h(i, "view")
|
|
83
|
+
}), { startResize: Ue, columnWidthOverrides: qe, showResizeIndicator: Je, resizeIndicatorX: Qe, autoFitColumn: Ze } = Ol({
|
|
84
|
+
columns: le,
|
|
85
|
+
onResize: (l, o) => c("column-resize", { colKey: l, width: o })
|
|
86
|
+
}), C = b(() => {
|
|
87
|
+
const l = qe.value;
|
|
88
|
+
return l.size === 0 ? le.value : le.value.map((o) => {
|
|
89
|
+
const e = l.get(o.key);
|
|
90
|
+
return e !== void 0 ? { ...o, width: e } : o;
|
|
91
|
+
});
|
|
92
|
+
}), {
|
|
93
|
+
data: V,
|
|
94
|
+
sort: A,
|
|
95
|
+
toggleSort: O,
|
|
96
|
+
selectedRows: p,
|
|
97
|
+
toggleSelectAll: el,
|
|
98
|
+
toggleRowSelection: ll,
|
|
99
|
+
isAllSelected: oe,
|
|
100
|
+
setData: ol
|
|
101
|
+
} = Ll({
|
|
102
|
+
data: me.value,
|
|
103
|
+
pageSize: 999999
|
|
104
|
+
});
|
|
105
|
+
be(me, (l) => ol(l), { deep: !1 });
|
|
106
|
+
const { groupedItems: D, collapsedGroups: tl, toggleGroup: N, isGroupHeader: x } = Gl({
|
|
107
|
+
data: V,
|
|
108
|
+
groupBy: h(i, "groupBy"),
|
|
109
|
+
groups: h(i, "groups"),
|
|
110
|
+
aggregations: h(i, "aggregations")
|
|
111
|
+
}), W = S(null), te = S(null), pe = S(null), nl = b(() => {
|
|
112
|
+
var l;
|
|
113
|
+
return (((l = i.fixedColumns) == null ? void 0 : l.length) ?? 0) > 0;
|
|
114
|
+
}), we = S(0), al = b(() => we.value > 0), {
|
|
115
|
+
fixedColumns: ne,
|
|
116
|
+
scrollableColumns: ae,
|
|
117
|
+
fixedWidth: Ce,
|
|
118
|
+
handleScroll: rl,
|
|
119
|
+
handleFixedScroll: De,
|
|
120
|
+
scrollLeft: ko,
|
|
121
|
+
syncHover: R,
|
|
122
|
+
isRowHovered: Y
|
|
123
|
+
} = Yl({
|
|
124
|
+
columns: C,
|
|
125
|
+
fixedColumnKeys: b(() => i.fixedColumns ?? []),
|
|
126
|
+
scrollContainerRef: W,
|
|
127
|
+
fixedContainerRef: pe
|
|
128
|
+
}), re = b(() => i.virtual !== void 0 ? i.virtual : D.value.length >= i.virtualThreshold), { visibleItems: se, totalHeight: de, offsetY: ie, scrollToIndex: sl, observeRow: j } = _l({
|
|
129
|
+
items: D,
|
|
130
|
+
itemHeight: (l) => {
|
|
131
|
+
const o = D.value[l];
|
|
132
|
+
return x(o) ? go : bo;
|
|
133
|
+
},
|
|
134
|
+
overscan: 5,
|
|
135
|
+
containerRef: W,
|
|
136
|
+
measureRow: !0
|
|
137
|
+
}), xe = b(() => D.value.filter((l) => !x(l))), { activeCell: Re, selectedRange: dl, setActiveCell: Se, handleKeyDown: il } = Nl({
|
|
138
|
+
columns: C,
|
|
139
|
+
rows: xe,
|
|
140
|
+
containerRef: te,
|
|
141
|
+
editingCell: Xe,
|
|
142
|
+
enabled: b(() => i.enableKeyboard),
|
|
143
|
+
onActivateEdit: (l, o) => ee.activate(l, o),
|
|
144
|
+
onCancelEdit: () => ee.cancel(),
|
|
145
|
+
onScrollToRow: (l) => sl(l),
|
|
146
|
+
getCellValue: (l, o) => {
|
|
147
|
+
const e = xe.value.find((r) => r.id === l);
|
|
148
|
+
if (!e) return "";
|
|
149
|
+
const n = e[o];
|
|
150
|
+
return n != null ? String(n) : "";
|
|
151
|
+
},
|
|
152
|
+
onPaste: (l, o, e) => {
|
|
153
|
+
c("paste", { startRowId: l, startColKey: o, data: e });
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
be(Re, (l) => c("active-cell-change", l ?? null));
|
|
157
|
+
const {
|
|
158
|
+
isDragging: ul,
|
|
159
|
+
draggedRowId: fl,
|
|
160
|
+
dropTargetId: ue,
|
|
161
|
+
dropPosition: Me,
|
|
162
|
+
handleDragStart: cl,
|
|
163
|
+
handleDragOver: vl,
|
|
164
|
+
handleDrop: yl,
|
|
165
|
+
handleDragEnd: $e
|
|
166
|
+
} = jl({
|
|
167
|
+
processedItems: D,
|
|
168
|
+
enableCrossGroupDrag: b(() => i.enableCrossGroupDrag),
|
|
169
|
+
groupFieldId: h(i, "groupBy")
|
|
170
|
+
});
|
|
171
|
+
function Te(l, o) {
|
|
172
|
+
i.enableRowDrag && cl(l, o);
|
|
173
|
+
}
|
|
174
|
+
function ze(l, o) {
|
|
175
|
+
i.enableRowDrag && vl(l, o);
|
|
176
|
+
}
|
|
177
|
+
function Ae(l, o) {
|
|
178
|
+
i.enableRowDrag && yl(l, o, {
|
|
179
|
+
onReorder: (e) => c("row-reorder", e),
|
|
180
|
+
onGroupChange: (e) => c("row-group-change", e)
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
const {
|
|
184
|
+
drafts: Fe,
|
|
185
|
+
addDraft: gl,
|
|
186
|
+
updateDraftField: ho,
|
|
187
|
+
removeDraft: mo,
|
|
188
|
+
commitDraft: po,
|
|
189
|
+
commitAll: bl,
|
|
190
|
+
discardAll: kl,
|
|
191
|
+
isDraft: wo,
|
|
192
|
+
getDraftErrors: Co
|
|
193
|
+
} = Xl({
|
|
194
|
+
schema: h(i, "schema"),
|
|
195
|
+
groupFieldId: h(i, "groupBy")
|
|
196
|
+
}), hl = b(() => Fe.value.size > 0);
|
|
197
|
+
function ml() {
|
|
198
|
+
i.schema ? gl() : c("add-row");
|
|
199
|
+
}
|
|
200
|
+
function pl() {
|
|
201
|
+
const l = bl();
|
|
202
|
+
l.length > 0 && c("drafts-commit-all", { records: l });
|
|
203
|
+
}
|
|
204
|
+
function wl() {
|
|
205
|
+
kl();
|
|
206
|
+
}
|
|
207
|
+
const w = S({ visible: !1, colKey: "", colLabel: "", x: 0, y: 0 }), X = S(!1);
|
|
208
|
+
function fe(l, o) {
|
|
209
|
+
var r;
|
|
210
|
+
const e = C.value.find((d) => d.key === o), n = (r = i.fieldDefs) == null ? void 0 : r.find((d) => d.id === o);
|
|
211
|
+
w.value = {
|
|
212
|
+
visible: !0,
|
|
213
|
+
colKey: o,
|
|
214
|
+
colLabel: (e == null ? void 0 : e.label) ?? o,
|
|
215
|
+
fieldType: n == null ? void 0 : n.type,
|
|
216
|
+
x: l.clientX,
|
|
217
|
+
y: l.clientY
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
function ce(l) {
|
|
221
|
+
var e, n;
|
|
222
|
+
const o = C.value.find((r) => r.key === l);
|
|
223
|
+
w.value = {
|
|
224
|
+
visible: !0,
|
|
225
|
+
colKey: l,
|
|
226
|
+
colLabel: (o == null ? void 0 : o.label) ?? l,
|
|
227
|
+
fieldType: (n = (e = i.fieldDefs) == null ? void 0 : e.find((r) => r.id === l)) == null ? void 0 : n.type,
|
|
228
|
+
x: 200,
|
|
229
|
+
y: 100
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
function Cl(l, o) {
|
|
233
|
+
c("schema-rename-field", { fieldId: l, newName: o });
|
|
234
|
+
}
|
|
235
|
+
function Dl(l, o) {
|
|
236
|
+
c("schema-change-field-type", { fieldId: l, newType: o });
|
|
237
|
+
}
|
|
238
|
+
function xl(l) {
|
|
239
|
+
c("schema-hide-field", l);
|
|
240
|
+
}
|
|
241
|
+
function Rl(l) {
|
|
242
|
+
c("schema-delete-field", l);
|
|
243
|
+
}
|
|
244
|
+
function Sl(l) {
|
|
245
|
+
c("schema-duplicate-field", l);
|
|
246
|
+
}
|
|
247
|
+
function ve() {
|
|
248
|
+
X.value = !0;
|
|
249
|
+
}
|
|
250
|
+
function Ml(l) {
|
|
251
|
+
c("schema-add-field", l), X.value = !1;
|
|
252
|
+
}
|
|
253
|
+
const $ = b(() => i.readonly ? !1 : i.selectable), He = b(() => i.readonly ? !1 : i.addable), $l = b(() => Array.from(p.value)), Be = b(() => p.value.size > 0 && !oe.value);
|
|
254
|
+
function Ie() {
|
|
255
|
+
el(V.value);
|
|
256
|
+
}
|
|
257
|
+
function U(l) {
|
|
258
|
+
const o = V.value.find((e) => e[i.rowKey] === l);
|
|
259
|
+
o && ll(o, 0);
|
|
260
|
+
}
|
|
261
|
+
be($l, (l) => c("selection-change", l), { immediate: !1 });
|
|
262
|
+
function u(l) {
|
|
263
|
+
const o = l[i.rowKey];
|
|
264
|
+
return o != null ? String(o) : "";
|
|
265
|
+
}
|
|
266
|
+
function F(l) {
|
|
267
|
+
var o;
|
|
268
|
+
return ((o = i.fieldDefs) == null ? void 0 : o.find((e) => e.id === l)) ?? {
|
|
269
|
+
id: l,
|
|
270
|
+
type: "text",
|
|
271
|
+
label: l
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
function H(l, o, e) {
|
|
275
|
+
je(l, o, e), c("cell-edit", { rowId: l, fieldId: o, value: e });
|
|
276
|
+
}
|
|
277
|
+
function B(l) {
|
|
278
|
+
if (he.value) {
|
|
279
|
+
P.value = l, G.value = !0;
|
|
280
|
+
return;
|
|
281
|
+
}
|
|
282
|
+
const o = l;
|
|
283
|
+
if (o.__record) {
|
|
284
|
+
c("row-click-record", o.__record), c("row-click", o.__record);
|
|
285
|
+
return;
|
|
286
|
+
}
|
|
287
|
+
c("row-click", l);
|
|
288
|
+
}
|
|
289
|
+
function ye(l, o) {
|
|
290
|
+
Ue(l, o);
|
|
291
|
+
}
|
|
292
|
+
function ge(l) {
|
|
293
|
+
Ze(l, te.value);
|
|
294
|
+
}
|
|
295
|
+
function Tl(l) {
|
|
296
|
+
rl(l);
|
|
297
|
+
const o = l.target;
|
|
298
|
+
we.value = o.scrollLeft;
|
|
299
|
+
}
|
|
300
|
+
function q(l) {
|
|
301
|
+
return {
|
|
302
|
+
groupKey: l.__groupKey,
|
|
303
|
+
count: l.__groupCount,
|
|
304
|
+
collapsed: tl.value.has(
|
|
305
|
+
l.__groupPath ? l.__groupPath.join("/") : l.__groupKey
|
|
306
|
+
),
|
|
307
|
+
colorMap: i.groupColorMap,
|
|
308
|
+
selectable: $.value,
|
|
309
|
+
level: l.__groupLevel ?? 0,
|
|
310
|
+
aggregations: l.__aggregations
|
|
311
|
+
};
|
|
312
|
+
}
|
|
313
|
+
function J(l) {
|
|
314
|
+
return l.__groupPath ? l.__groupPath.join("/") : l.__groupKey;
|
|
315
|
+
}
|
|
316
|
+
function Ke(l) {
|
|
317
|
+
return {
|
|
318
|
+
row: l,
|
|
319
|
+
rowKey: i.rowKey,
|
|
320
|
+
selected: p.value.has(u(l)),
|
|
321
|
+
selectable: $.value,
|
|
322
|
+
columns: C.value,
|
|
323
|
+
priorityColorMap: i.priorityColorMap,
|
|
324
|
+
statusColorMap: i.statusColorMap
|
|
325
|
+
};
|
|
326
|
+
}
|
|
327
|
+
function Ee(l, o) {
|
|
328
|
+
const e = Re.value;
|
|
329
|
+
return e !== null && e.rowId === l && e.colKey === o;
|
|
330
|
+
}
|
|
331
|
+
function _e(l, o) {
|
|
332
|
+
return dl.value.some((e) => e.rowId === l && e.colKey === o);
|
|
333
|
+
}
|
|
334
|
+
function Le(l) {
|
|
335
|
+
const o = u(l);
|
|
336
|
+
return {
|
|
337
|
+
"of-row-dragging": ul.value && fl.value === o,
|
|
338
|
+
"of-row-drop-target": ue.value === o,
|
|
339
|
+
"of-row-drop-before": ue.value === o && Me.value === "before",
|
|
340
|
+
"of-row-drop-after": ue.value === o && Me.value === "after"
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
function zl(l) {
|
|
344
|
+
P.value = l, G.value = !0;
|
|
345
|
+
}
|
|
346
|
+
function Al(l) {
|
|
347
|
+
for (const [o, e] of Object.entries(l.fields))
|
|
348
|
+
c("cell-edit", { rowId: l.rowId, fieldId: o, value: e });
|
|
349
|
+
}
|
|
350
|
+
return (l, o) => t(he) ? (a(), s(v, { key: 0 }, [
|
|
351
|
+
T(Il, {
|
|
352
|
+
rows: t(V),
|
|
353
|
+
columns: C.value,
|
|
354
|
+
selectable: $.value,
|
|
355
|
+
addable: He.value,
|
|
356
|
+
"status-color-map": f.statusColorMap,
|
|
357
|
+
readonly: f.readonly,
|
|
358
|
+
onRowClick: zl,
|
|
359
|
+
onAddRow: o[0] || (o[0] = (e) => c("add-row"))
|
|
360
|
+
}, null, 8, ["rows", "columns", "selectable", "addable", "status-color-map", "readonly"]),
|
|
361
|
+
P.value ? (a(), y(Kl, {
|
|
362
|
+
key: 0,
|
|
363
|
+
row: P.value,
|
|
364
|
+
columns: C.value,
|
|
365
|
+
"field-defs": f.fieldDefs,
|
|
366
|
+
visible: G.value,
|
|
367
|
+
onClose: o[1] || (o[1] = (e) => G.value = !1),
|
|
368
|
+
onSave: Al,
|
|
369
|
+
onDelete: o[2] || (o[2] = (e) => c("row-click", { id: e, __action: "delete" })),
|
|
370
|
+
onCellEdit: o[3] || (o[3] = (e) => c("cell-edit", e))
|
|
371
|
+
}, null, 8, ["row", "columns", "field-defs", "visible"])) : M("", !0)
|
|
372
|
+
], 64)) : (a(), s("div", {
|
|
373
|
+
key: 1,
|
|
374
|
+
ref_key: "tableContainerRef",
|
|
375
|
+
ref: te,
|
|
376
|
+
class: "of-data-table",
|
|
377
|
+
role: "grid",
|
|
378
|
+
tabindex: f.enableKeyboard ? 0 : void 0,
|
|
379
|
+
onKeydown: o[14] || (o[14] = (e) => f.enableKeyboard ? t(il)(e) : void 0)
|
|
380
|
+
}, [
|
|
381
|
+
nl.value ? (a(), s("div", ql, [
|
|
382
|
+
g("div", {
|
|
383
|
+
ref_key: "fixedContainerRef",
|
|
384
|
+
ref: pe,
|
|
385
|
+
class: z(["of-data-table-fixed-region", { "of-fixed-shadow": al.value }]),
|
|
386
|
+
style: k({ width: t(Ce) + "px" }),
|
|
387
|
+
onScroll: o[8] || (o[8] = //@ts-ignore
|
|
388
|
+
(...e) => t(De) && t(De)(...e))
|
|
389
|
+
}, [
|
|
390
|
+
T(ke, {
|
|
391
|
+
columns: t(ne),
|
|
392
|
+
selectable: $.value,
|
|
393
|
+
"sort-key": t(A).field ?? "",
|
|
394
|
+
"sort-order": t(A).order ?? "asc",
|
|
395
|
+
"all-selected": t(oe),
|
|
396
|
+
indeterminate: Be.value,
|
|
397
|
+
"enable-resize": f.enableResize,
|
|
398
|
+
"enable-field-menu": f.enableFieldManagement,
|
|
399
|
+
"enable-add-field": f.enableFieldManagement,
|
|
400
|
+
onSort: t(O),
|
|
401
|
+
onSelectAll: Ie,
|
|
402
|
+
onResizeStart: ye,
|
|
403
|
+
onResizeDblclick: ge,
|
|
404
|
+
onHeaderContextmenu: fe,
|
|
405
|
+
onHeaderDblclick: ce,
|
|
406
|
+
onAddField: ve
|
|
407
|
+
}, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
|
|
408
|
+
g("div", Jl, [
|
|
409
|
+
re.value ? (a(), s("div", {
|
|
410
|
+
key: 0,
|
|
411
|
+
style: k({ height: t(de) + "px", position: "relative" })
|
|
412
|
+
}, [
|
|
413
|
+
g("div", {
|
|
414
|
+
style: k({ transform: `translateY(${t(ie)}px)` })
|
|
415
|
+
}, [
|
|
416
|
+
(a(!0), s(v, null, m(t(se), ({ data: e, index: n }) => (a(), s(v, {
|
|
417
|
+
key: e.id
|
|
418
|
+
}, [
|
|
419
|
+
t(x)(e) ? (a(), y(Z, K({
|
|
420
|
+
key: 0,
|
|
421
|
+
ref_for: !0,
|
|
422
|
+
ref: (r) => t(j)((r == null ? void 0 : r.$el) ?? r, n)
|
|
423
|
+
}, { ref_for: !0 }, q(e), {
|
|
424
|
+
onToggle: (r) => t(N)(J(e))
|
|
425
|
+
}), null, 16, ["onToggle"])) : (a(), s("div", {
|
|
426
|
+
key: 1,
|
|
427
|
+
ref_for: !0,
|
|
428
|
+
ref: (r) => t(j)(r, n),
|
|
429
|
+
class: z(["of-table-row", {
|
|
430
|
+
"of-table-row--selected": t(p).has(u(e)),
|
|
431
|
+
"of-table-row--hover": t(Y)(u(e))
|
|
432
|
+
}]),
|
|
433
|
+
onMouseenter: (r) => t(R)(u(e)),
|
|
434
|
+
onMouseleave: o[5] || (o[5] = (r) => t(R)(null)),
|
|
435
|
+
onClick: (r) => B(e)
|
|
436
|
+
}, [
|
|
437
|
+
$.value ? (a(), s("div", {
|
|
438
|
+
key: 0,
|
|
439
|
+
class: "of-td of-td-checkbox",
|
|
440
|
+
onClick: o[4] || (o[4] = _(() => {
|
|
441
|
+
}, ["stop"]))
|
|
442
|
+
}, [
|
|
443
|
+
g("input", {
|
|
444
|
+
type: "checkbox",
|
|
445
|
+
class: "of-checkbox",
|
|
446
|
+
checked: t(p).has(u(e)),
|
|
447
|
+
onChange: (r) => U(u(e))
|
|
448
|
+
}, null, 40, Zl)
|
|
449
|
+
])) : M("", !0),
|
|
450
|
+
(a(!0), s(v, null, m(t(ne), (r) => (a(), s("div", {
|
|
451
|
+
key: r.key,
|
|
452
|
+
class: "of-td",
|
|
453
|
+
style: k({
|
|
454
|
+
width: (r.width === "fill" ? 200 : r.width) + "px",
|
|
455
|
+
flexShrink: "0"
|
|
456
|
+
})
|
|
457
|
+
}, [
|
|
458
|
+
Q(l.$slots, "cell", {
|
|
459
|
+
row: e,
|
|
460
|
+
col: r
|
|
461
|
+
}, () => {
|
|
462
|
+
var d;
|
|
463
|
+
return [
|
|
464
|
+
(d = f.fieldDefs) != null && d.length ? (a(), y(E, {
|
|
465
|
+
key: 0,
|
|
466
|
+
"row-id": u(e),
|
|
467
|
+
field: F(r.key),
|
|
468
|
+
value: e[r.key],
|
|
469
|
+
onCommit: H
|
|
470
|
+
}, null, 8, ["row-id", "field", "value"])) : (a(), s("span", eo, L(e[r.key] ?? "-"), 1))
|
|
471
|
+
];
|
|
472
|
+
}, !0)
|
|
473
|
+
], 4))), 128))
|
|
474
|
+
], 42, Ql))
|
|
475
|
+
], 64))), 128))
|
|
476
|
+
], 4)
|
|
477
|
+
], 4)) : (a(!0), s(v, { key: 1 }, m(t(D), (e) => (a(), s(v, {
|
|
478
|
+
key: e.id
|
|
479
|
+
}, [
|
|
480
|
+
t(x)(e) ? (a(), y(Z, K({
|
|
481
|
+
key: 0,
|
|
482
|
+
ref_for: !0
|
|
483
|
+
}, q(e), {
|
|
484
|
+
onToggle: (n) => t(N)(J(e))
|
|
485
|
+
}), null, 16, ["onToggle"])) : (a(), s("div", {
|
|
486
|
+
key: 1,
|
|
487
|
+
class: z(["of-table-row", {
|
|
488
|
+
"of-table-row--selected": t(p).has(u(e)),
|
|
489
|
+
"of-table-row--hover": t(Y)(u(e))
|
|
490
|
+
}]),
|
|
491
|
+
onMouseenter: (n) => t(R)(u(e)),
|
|
492
|
+
onMouseleave: o[7] || (o[7] = (n) => t(R)(null)),
|
|
493
|
+
onClick: (n) => B(e)
|
|
494
|
+
}, [
|
|
495
|
+
$.value ? (a(), s("div", {
|
|
496
|
+
key: 0,
|
|
497
|
+
class: "of-td of-td-checkbox",
|
|
498
|
+
onClick: o[6] || (o[6] = _(() => {
|
|
499
|
+
}, ["stop"]))
|
|
500
|
+
}, [
|
|
501
|
+
g("input", {
|
|
502
|
+
type: "checkbox",
|
|
503
|
+
class: "of-checkbox",
|
|
504
|
+
checked: t(p).has(u(e)),
|
|
505
|
+
onChange: (n) => U(u(e))
|
|
506
|
+
}, null, 40, oo)
|
|
507
|
+
])) : M("", !0),
|
|
508
|
+
(a(!0), s(v, null, m(t(ne), (n) => (a(), s("div", {
|
|
509
|
+
key: n.key,
|
|
510
|
+
class: "of-td",
|
|
511
|
+
style: k({
|
|
512
|
+
width: (n.width === "fill" ? 200 : n.width) + "px",
|
|
513
|
+
flexShrink: "0"
|
|
514
|
+
})
|
|
515
|
+
}, [
|
|
516
|
+
Q(l.$slots, "cell", {
|
|
517
|
+
row: e,
|
|
518
|
+
col: n
|
|
519
|
+
}, () => {
|
|
520
|
+
var r;
|
|
521
|
+
return [
|
|
522
|
+
(r = f.fieldDefs) != null && r.length ? (a(), y(E, {
|
|
523
|
+
key: 0,
|
|
524
|
+
"row-id": u(e),
|
|
525
|
+
field: F(n.key),
|
|
526
|
+
value: e[n.key],
|
|
527
|
+
onCommit: H
|
|
528
|
+
}, null, 8, ["row-id", "field", "value"])) : (a(), s("span", to, L(e[n.key] ?? "-"), 1))
|
|
529
|
+
];
|
|
530
|
+
}, !0)
|
|
531
|
+
], 4))), 128))
|
|
532
|
+
], 42, lo))
|
|
533
|
+
], 64))), 128))
|
|
534
|
+
])
|
|
535
|
+
], 38),
|
|
536
|
+
g("div", {
|
|
537
|
+
ref_key: "scrollContainerRef",
|
|
538
|
+
ref: W,
|
|
539
|
+
class: "of-data-table-scroll-region",
|
|
540
|
+
style: k({ marginLeft: t(Ce) + "px" }),
|
|
541
|
+
onScroll: Tl
|
|
542
|
+
}, [
|
|
543
|
+
T(ke, {
|
|
544
|
+
columns: t(ae),
|
|
545
|
+
selectable: !1,
|
|
546
|
+
"sort-key": t(A).field ?? "",
|
|
547
|
+
"sort-order": t(A).order ?? "asc",
|
|
548
|
+
"enable-resize": f.enableResize,
|
|
549
|
+
"enable-field-menu": f.enableFieldManagement,
|
|
550
|
+
"enable-add-field": f.enableFieldManagement,
|
|
551
|
+
onSort: t(O),
|
|
552
|
+
onResizeStart: ye,
|
|
553
|
+
onResizeDblclick: ge,
|
|
554
|
+
onHeaderContextmenu: fe,
|
|
555
|
+
onHeaderDblclick: ce,
|
|
556
|
+
onAddField: ve
|
|
557
|
+
}, null, 8, ["columns", "sort-key", "sort-order", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
|
|
558
|
+
g("div", no, [
|
|
559
|
+
re.value ? (a(), s("div", {
|
|
560
|
+
key: 0,
|
|
561
|
+
style: k({ height: t(de) + "px", position: "relative" })
|
|
562
|
+
}, [
|
|
563
|
+
g("div", {
|
|
564
|
+
style: k({ transform: `translateY(${t(ie)}px)` })
|
|
565
|
+
}, [
|
|
566
|
+
(a(!0), s(v, null, m(t(se), ({ data: e }) => (a(), s(v, {
|
|
567
|
+
key: e.id
|
|
568
|
+
}, [
|
|
569
|
+
t(x)(e) ? (a(), s("div", ao)) : (a(), s("div", {
|
|
570
|
+
key: 1,
|
|
571
|
+
class: z(["of-table-row", {
|
|
572
|
+
"of-table-row--selected": t(p).has(u(e)),
|
|
573
|
+
"of-table-row--hover": t(Y)(u(e))
|
|
574
|
+
}]),
|
|
575
|
+
onMouseenter: (n) => t(R)(u(e)),
|
|
576
|
+
onMouseleave: o[9] || (o[9] = (n) => t(R)(null)),
|
|
577
|
+
onClick: (n) => B(e)
|
|
578
|
+
}, [
|
|
579
|
+
(a(!0), s(v, null, m(t(ae), (n) => (a(), s("div", {
|
|
580
|
+
key: n.key,
|
|
581
|
+
class: "of-td",
|
|
582
|
+
style: k({
|
|
583
|
+
width: n.width === "fill" ? void 0 : n.width + "px",
|
|
584
|
+
flex: n.width === "fill" ? "1 1 " + (n.minWidth ?? 220) + "px" : "0 0 auto"
|
|
585
|
+
})
|
|
586
|
+
}, [
|
|
587
|
+
Q(l.$slots, "cell", {
|
|
588
|
+
row: e,
|
|
589
|
+
col: n
|
|
590
|
+
}, () => {
|
|
591
|
+
var r;
|
|
592
|
+
return [
|
|
593
|
+
(r = f.fieldDefs) != null && r.length ? (a(), y(E, {
|
|
594
|
+
key: 0,
|
|
595
|
+
"row-id": u(e),
|
|
596
|
+
field: F(n.key),
|
|
597
|
+
value: e[n.key],
|
|
598
|
+
onCommit: H
|
|
599
|
+
}, null, 8, ["row-id", "field", "value"])) : (a(), s("span", so, L(e[n.key] ?? "-"), 1))
|
|
600
|
+
];
|
|
601
|
+
}, !0)
|
|
602
|
+
], 4))), 128))
|
|
603
|
+
], 42, ro))
|
|
604
|
+
], 64))), 128))
|
|
605
|
+
], 4)
|
|
606
|
+
], 4)) : (a(!0), s(v, { key: 1 }, m(t(D), (e) => (a(), s(v, {
|
|
607
|
+
key: e.id
|
|
608
|
+
}, [
|
|
609
|
+
t(x)(e) ? (a(), s("div", io)) : (a(), s("div", {
|
|
610
|
+
key: 1,
|
|
611
|
+
class: z(["of-table-row", {
|
|
612
|
+
"of-table-row--selected": t(p).has(u(e)),
|
|
613
|
+
"of-table-row--hover": t(Y)(u(e))
|
|
614
|
+
}]),
|
|
615
|
+
onMouseenter: (n) => t(R)(u(e)),
|
|
616
|
+
onMouseleave: o[10] || (o[10] = (n) => t(R)(null)),
|
|
617
|
+
onClick: (n) => B(e)
|
|
618
|
+
}, [
|
|
619
|
+
(a(!0), s(v, null, m(t(ae), (n) => (a(), s("div", {
|
|
620
|
+
key: n.key,
|
|
621
|
+
class: "of-td",
|
|
622
|
+
style: k({
|
|
623
|
+
width: n.width === "fill" ? void 0 : n.width + "px",
|
|
624
|
+
flex: n.width === "fill" ? "1 1 " + (n.minWidth ?? 220) + "px" : "0 0 auto"
|
|
625
|
+
})
|
|
626
|
+
}, [
|
|
627
|
+
Q(l.$slots, "cell", {
|
|
628
|
+
row: e,
|
|
629
|
+
col: n
|
|
630
|
+
}, () => {
|
|
631
|
+
var r;
|
|
632
|
+
return [
|
|
633
|
+
(r = f.fieldDefs) != null && r.length ? (a(), y(E, {
|
|
634
|
+
key: 0,
|
|
635
|
+
"row-id": u(e),
|
|
636
|
+
field: F(n.key),
|
|
637
|
+
value: e[n.key],
|
|
638
|
+
onCommit: H
|
|
639
|
+
}, null, 8, ["row-id", "field", "value"])) : (a(), s("span", fo, L(e[n.key] ?? "-"), 1))
|
|
640
|
+
];
|
|
641
|
+
}, !0)
|
|
642
|
+
], 4))), 128))
|
|
643
|
+
], 42, uo))
|
|
644
|
+
], 64))), 128))
|
|
645
|
+
])
|
|
646
|
+
], 36)
|
|
647
|
+
])) : (a(), s(v, { key: 1 }, [
|
|
648
|
+
T(ke, {
|
|
649
|
+
columns: C.value,
|
|
650
|
+
selectable: $.value,
|
|
651
|
+
"sort-key": t(A).field ?? "",
|
|
652
|
+
"sort-order": t(A).order ?? "asc",
|
|
653
|
+
"all-selected": t(oe),
|
|
654
|
+
indeterminate: Be.value,
|
|
655
|
+
"enable-resize": f.enableResize,
|
|
656
|
+
"enable-field-menu": f.enableFieldManagement,
|
|
657
|
+
"enable-add-field": f.enableFieldManagement,
|
|
658
|
+
onSort: t(O),
|
|
659
|
+
onSelectAll: Ie,
|
|
660
|
+
onResizeStart: ye,
|
|
661
|
+
onResizeDblclick: ge,
|
|
662
|
+
onHeaderContextmenu: fe,
|
|
663
|
+
onHeaderDblclick: ce,
|
|
664
|
+
onAddField: ve
|
|
665
|
+
}, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
|
|
666
|
+
g("div", {
|
|
667
|
+
ref_key: "scrollContainerRef",
|
|
668
|
+
ref: W,
|
|
669
|
+
class: "of-data-table-scroll-container"
|
|
670
|
+
}, [
|
|
671
|
+
re.value ? (a(), s("div", {
|
|
672
|
+
key: 0,
|
|
673
|
+
style: k({ height: t(de) + "px", position: "relative" })
|
|
674
|
+
}, [
|
|
675
|
+
g("div", {
|
|
676
|
+
style: k({ transform: `translateY(${t(ie)}px)` })
|
|
677
|
+
}, [
|
|
678
|
+
(a(!0), s(v, null, m(t(se), ({ data: e, index: n }) => {
|
|
679
|
+
var r;
|
|
680
|
+
return a(), s(v, {
|
|
681
|
+
key: e.id
|
|
682
|
+
}, [
|
|
683
|
+
t(x)(e) ? (a(), y(Z, K({
|
|
684
|
+
key: 0,
|
|
685
|
+
ref_for: !0,
|
|
686
|
+
ref: (d) => t(j)((d == null ? void 0 : d.$el) ?? d, n)
|
|
687
|
+
}, { ref_for: !0 }, q(e), {
|
|
688
|
+
onToggle: (d) => t(N)(J(e))
|
|
689
|
+
}), null, 16, ["onToggle"])) : (a(), y(Oe, K({
|
|
690
|
+
key: 1,
|
|
691
|
+
ref_for: !0,
|
|
692
|
+
ref: (d) => t(j)((d == null ? void 0 : d.$el) ?? d, n)
|
|
693
|
+
}, { ref_for: !0 }, Ke(e), {
|
|
694
|
+
draggable: f.enableRowDrag,
|
|
695
|
+
class: Le(e),
|
|
696
|
+
onSelect: U,
|
|
697
|
+
onClick: (d) => B(e),
|
|
698
|
+
onDragstart: (d) => Te(d, e),
|
|
699
|
+
onDragover: (d) => ze(d, e),
|
|
700
|
+
onDrop: (d) => Ae(d, e),
|
|
701
|
+
onDragend: t($e)
|
|
702
|
+
}), Pe({ _: 2 }, [
|
|
703
|
+
(r = f.fieldDefs) != null && r.length ? {
|
|
704
|
+
name: "cell",
|
|
705
|
+
fn: Ve(({ row: d, col: I }) => [
|
|
706
|
+
T(E, {
|
|
707
|
+
"row-id": u(d),
|
|
708
|
+
field: F(I.key),
|
|
709
|
+
value: d[I.key],
|
|
710
|
+
class: z({
|
|
711
|
+
"of-cell--active": Ee(u(d), I.key),
|
|
712
|
+
"of-cell--selected": _e(u(d), I.key)
|
|
713
|
+
}),
|
|
714
|
+
onCommit: H,
|
|
715
|
+
onClick: _((Do) => f.enableKeyboard && t(Se)(u(d), I.key), ["stop"])
|
|
716
|
+
}, null, 8, ["row-id", "field", "value", "class", "onClick"])
|
|
717
|
+
]),
|
|
718
|
+
key: "0"
|
|
719
|
+
} : void 0
|
|
720
|
+
]), 1040, ["draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
|
|
721
|
+
], 64);
|
|
722
|
+
}), 128))
|
|
723
|
+
], 4)
|
|
724
|
+
], 4)) : (a(!0), s(v, { key: 1 }, m(t(D), (e) => {
|
|
725
|
+
var n;
|
|
726
|
+
return a(), s(v, {
|
|
727
|
+
key: e.id
|
|
728
|
+
}, [
|
|
729
|
+
t(x)(e) ? (a(), y(Z, K({
|
|
730
|
+
key: 0,
|
|
731
|
+
ref_for: !0
|
|
732
|
+
}, q(e), {
|
|
733
|
+
onToggle: (r) => t(N)(J(e))
|
|
734
|
+
}), null, 16, ["onToggle"])) : (a(), y(Oe, K({
|
|
735
|
+
key: 1,
|
|
736
|
+
ref_for: !0
|
|
737
|
+
}, Ke(e), {
|
|
738
|
+
draggable: f.enableRowDrag,
|
|
739
|
+
class: Le(e),
|
|
740
|
+
onSelect: U,
|
|
741
|
+
onClick: (r) => B(e),
|
|
742
|
+
onDragstart: (r) => Te(r, e),
|
|
743
|
+
onDragover: (r) => ze(r, e),
|
|
744
|
+
onDrop: (r) => Ae(r, e),
|
|
745
|
+
onDragend: t($e)
|
|
746
|
+
}), Pe({ _: 2 }, [
|
|
747
|
+
(n = f.fieldDefs) != null && n.length ? {
|
|
748
|
+
name: "cell",
|
|
749
|
+
fn: Ve(({ row: r, col: d }) => [
|
|
750
|
+
T(E, {
|
|
751
|
+
"row-id": u(r),
|
|
752
|
+
field: F(d.key),
|
|
753
|
+
value: r[d.key],
|
|
754
|
+
class: z({
|
|
755
|
+
"of-cell--active": Ee(u(r), d.key),
|
|
756
|
+
"of-cell--selected": _e(u(r), d.key)
|
|
757
|
+
}),
|
|
758
|
+
onCommit: H,
|
|
759
|
+
onClick: _((I) => f.enableKeyboard && t(Se)(u(r), d.key), ["stop"])
|
|
760
|
+
}, null, 8, ["row-id", "field", "value", "class", "onClick"])
|
|
761
|
+
]),
|
|
762
|
+
key: "0"
|
|
763
|
+
} : void 0
|
|
764
|
+
]), 1040, ["draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
|
|
765
|
+
], 64);
|
|
766
|
+
}), 128))
|
|
767
|
+
], 512)
|
|
768
|
+
], 64)),
|
|
769
|
+
t(Je) ? (a(), s("div", {
|
|
770
|
+
key: 2,
|
|
771
|
+
class: "of-resize-indicator",
|
|
772
|
+
style: k({ left: t(Qe) + "px" })
|
|
773
|
+
}, null, 4)) : M("", !0),
|
|
774
|
+
hl.value ? (a(), s("div", co, [
|
|
775
|
+
g("span", vo, L(t(Fe).size) + " 条草稿", 1),
|
|
776
|
+
g("button", {
|
|
777
|
+
class: "of-data-table-draft-btn of-data-table-draft-btn--commit",
|
|
778
|
+
onClick: pl
|
|
779
|
+
}, " 全部提交 "),
|
|
780
|
+
g("button", {
|
|
781
|
+
class: "of-data-table-draft-btn of-data-table-draft-btn--discard",
|
|
782
|
+
onClick: wl
|
|
783
|
+
}, " 全部放弃 ")
|
|
784
|
+
])) : M("", !0),
|
|
785
|
+
He.value ? (a(), y(Bl, {
|
|
786
|
+
key: 4,
|
|
787
|
+
onClick: ml
|
|
788
|
+
})) : M("", !0),
|
|
789
|
+
f.enableFieldManagement ? (a(), y(t(We), {
|
|
790
|
+
key: 5,
|
|
791
|
+
visible: w.value.visible,
|
|
792
|
+
"col-key": w.value.colKey,
|
|
793
|
+
"col-label": w.value.colLabel,
|
|
794
|
+
"field-type": w.value.fieldType,
|
|
795
|
+
x: w.value.x,
|
|
796
|
+
y: w.value.y,
|
|
797
|
+
onClose: o[11] || (o[11] = (e) => w.value.visible = !1),
|
|
798
|
+
onRename: Cl,
|
|
799
|
+
onChangeType: Dl,
|
|
800
|
+
onSort: o[12] || (o[12] = (e, n) => t(O)(e)),
|
|
801
|
+
onHide: xl,
|
|
802
|
+
onDelete: Rl,
|
|
803
|
+
onDuplicate: Sl
|
|
804
|
+
}, null, 8, ["visible", "col-key", "col-label", "field-type", "x", "y"])) : M("", !0),
|
|
805
|
+
(a(), y(Hl, { to: "body" }, [
|
|
806
|
+
X.value ? (a(), s("div", {
|
|
807
|
+
key: 0,
|
|
808
|
+
class: "of-add-field-overlay",
|
|
809
|
+
onClick: o[13] || (o[13] = _((e) => X.value = !1, ["self"]))
|
|
810
|
+
}, [
|
|
811
|
+
g("div", yo, [
|
|
812
|
+
T(t(Ye), { onSelect: Ml })
|
|
813
|
+
])
|
|
814
|
+
])) : M("", !0)
|
|
815
|
+
]))
|
|
816
|
+
], 40, Ul));
|
|
817
|
+
}
|
|
818
|
+
});
|
|
819
|
+
export {
|
|
820
|
+
No as default
|
|
821
|
+
};
|