@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,118 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
2
|
+
import { TableColumn } from '../../types';
|
|
3
|
+
import { FilterCondition, FilterLogic } from '../../composables/useTableFilter';
|
|
4
|
+
export interface ViewSwitcherTab {
|
|
5
|
+
value: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon?: string | Component;
|
|
8
|
+
}
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
/** 当前视图模式 */
|
|
11
|
+
currentView?: string;
|
|
12
|
+
/** 视图标签配置 */
|
|
13
|
+
viewTabs?: ViewSwitcherTab[];
|
|
14
|
+
/** 列配置 */
|
|
15
|
+
columns: TableColumn[];
|
|
16
|
+
/** 筛选条件 */
|
|
17
|
+
filterConditions?: readonly FilterCondition[];
|
|
18
|
+
/** 筛选逻辑 */
|
|
19
|
+
filterLogic?: FilterLogic;
|
|
20
|
+
/** 筛选是否激活 */
|
|
21
|
+
filterActive?: boolean;
|
|
22
|
+
/** 当前排序 */
|
|
23
|
+
currentSort?: {
|
|
24
|
+
field: string | null;
|
|
25
|
+
order: "asc" | "desc" | null;
|
|
26
|
+
};
|
|
27
|
+
/** 当前分组字段 */
|
|
28
|
+
currentGroup?: string;
|
|
29
|
+
/** 搜索关键词 */
|
|
30
|
+
searchKeyword?: string;
|
|
31
|
+
/** 显示控制 */
|
|
32
|
+
showViewSwitch?: boolean;
|
|
33
|
+
showFilter?: boolean;
|
|
34
|
+
showSort?: boolean;
|
|
35
|
+
showGroup?: boolean;
|
|
36
|
+
showColumns?: boolean;
|
|
37
|
+
showSearch?: boolean;
|
|
38
|
+
/** 可用的保存视图列表 */
|
|
39
|
+
savedViews?: {
|
|
40
|
+
id: string;
|
|
41
|
+
name: string;
|
|
42
|
+
}[];
|
|
43
|
+
};
|
|
44
|
+
declare function __VLS_template(): {
|
|
45
|
+
attrs: Partial<{}>;
|
|
46
|
+
slots: {
|
|
47
|
+
default?(_: {}): any;
|
|
48
|
+
};
|
|
49
|
+
refs: {
|
|
50
|
+
filterBtnRef: HTMLDivElement;
|
|
51
|
+
sortBtnRef: HTMLDivElement;
|
|
52
|
+
groupBtnRef: HTMLDivElement;
|
|
53
|
+
columnBtnRef: HTMLDivElement;
|
|
54
|
+
};
|
|
55
|
+
rootEl: HTMLDivElement;
|
|
56
|
+
};
|
|
57
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
58
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
59
|
+
sort: (field: string) => any;
|
|
60
|
+
group: (field: string | null) => any;
|
|
61
|
+
"update:columns": (columns: TableColumn[]) => any;
|
|
62
|
+
"update:currentView": (view: string) => any;
|
|
63
|
+
"update:searchKeyword": (keyword: string) => any;
|
|
64
|
+
"add-filter": () => any;
|
|
65
|
+
"remove-filter": (id: string) => any;
|
|
66
|
+
"update-filter": (id: string, update: Partial<FilterCondition>) => any;
|
|
67
|
+
"clear-filters": () => any;
|
|
68
|
+
"update:filterLogic": (logic: FilterLogic) => any;
|
|
69
|
+
"save-view": (name: string) => any;
|
|
70
|
+
"load-view": (viewId: string) => any;
|
|
71
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
72
|
+
onSort?: ((field: string) => any) | undefined;
|
|
73
|
+
onGroup?: ((field: string | null) => any) | undefined;
|
|
74
|
+
"onUpdate:columns"?: ((columns: TableColumn[]) => any) | undefined;
|
|
75
|
+
"onUpdate:currentView"?: ((view: string) => any) | undefined;
|
|
76
|
+
"onUpdate:searchKeyword"?: ((keyword: string) => any) | undefined;
|
|
77
|
+
"onAdd-filter"?: (() => any) | undefined;
|
|
78
|
+
"onRemove-filter"?: ((id: string) => any) | undefined;
|
|
79
|
+
"onUpdate-filter"?: ((id: string, update: Partial<FilterCondition>) => any) | undefined;
|
|
80
|
+
"onClear-filters"?: (() => any) | undefined;
|
|
81
|
+
"onUpdate:filterLogic"?: ((logic: FilterLogic) => any) | undefined;
|
|
82
|
+
"onSave-view"?: ((name: string) => any) | undefined;
|
|
83
|
+
"onLoad-view"?: ((viewId: string) => any) | undefined;
|
|
84
|
+
}>, {
|
|
85
|
+
showFilter: boolean;
|
|
86
|
+
showGroup: boolean;
|
|
87
|
+
showSort: boolean;
|
|
88
|
+
showSearch: boolean;
|
|
89
|
+
currentView: string;
|
|
90
|
+
viewTabs: ViewSwitcherTab[];
|
|
91
|
+
filterConditions: readonly FilterCondition[];
|
|
92
|
+
filterLogic: FilterLogic;
|
|
93
|
+
filterActive: boolean;
|
|
94
|
+
currentSort: {
|
|
95
|
+
field: string | null;
|
|
96
|
+
order: "asc" | "desc" | null;
|
|
97
|
+
};
|
|
98
|
+
currentGroup: string;
|
|
99
|
+
searchKeyword: string;
|
|
100
|
+
showViewSwitch: boolean;
|
|
101
|
+
showColumns: boolean;
|
|
102
|
+
savedViews: {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
}[];
|
|
106
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
107
|
+
filterBtnRef: HTMLDivElement;
|
|
108
|
+
sortBtnRef: HTMLDivElement;
|
|
109
|
+
groupBtnRef: HTMLDivElement;
|
|
110
|
+
columnBtnRef: HTMLDivElement;
|
|
111
|
+
}, HTMLDivElement>;
|
|
112
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
113
|
+
export default _default;
|
|
114
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
115
|
+
new (): {
|
|
116
|
+
$slots: S;
|
|
117
|
+
};
|
|
118
|
+
};
|
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { defineComponent as Q, computed as T, ref as i, onMounted as W, onUnmounted as X, openBlock as o, createElementBlock as n, Fragment as V, renderList as L, normalizeClass as m, createBlock as C, resolveDynamicComponent as Y, unref as w, createCommentVNode as s, createElementVNode as a, toDisplayString as g, withModifiers as d, createVNode as b, Teleport as B, normalizeStyle as $, renderSlot as Z, nextTick as ee } from "vue";
|
|
2
|
+
import { resolveIcon as te } from "../../utils/icon.js";
|
|
3
|
+
import oe from "./TableFilterPanel.vue.js";
|
|
4
|
+
import le from "./TableColumnManager.vue.js";
|
|
5
|
+
import { ListFilter as ne, ArrowUpDown as re, Layers as se, Columns3 as ae, Search as ue } from "lucide-vue-next";
|
|
6
|
+
const ie = { class: "of-table-toolbar" }, fe = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "of-table-toolbar__views"
|
|
9
|
+
}, de = ["onClick"], be = {
|
|
10
|
+
key: 1,
|
|
11
|
+
class: "of-table-toolbar__sep"
|
|
12
|
+
}, ve = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "of-table-toolbar__badge"
|
|
15
|
+
}, ce = { class: "of-table-toolbar__simple-panel" }, ye = ["onClick"], me = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "of-table-toolbar__sort-dir"
|
|
18
|
+
}, we = { class: "of-table-toolbar__simple-panel" }, ke = ["onClick"], pe = {
|
|
19
|
+
key: 6,
|
|
20
|
+
class: "of-table-toolbar__search"
|
|
21
|
+
}, Ce = ["value"], Ve = /* @__PURE__ */ Q({
|
|
22
|
+
__name: "TableToolbar",
|
|
23
|
+
props: {
|
|
24
|
+
currentView: { default: "table" },
|
|
25
|
+
viewTabs: { default: void 0 },
|
|
26
|
+
columns: {},
|
|
27
|
+
filterConditions: { default: void 0 },
|
|
28
|
+
filterLogic: { default: "and" },
|
|
29
|
+
filterActive: { type: Boolean, default: !1 },
|
|
30
|
+
currentSort: { default: void 0 },
|
|
31
|
+
currentGroup: { default: void 0 },
|
|
32
|
+
searchKeyword: { default: "" },
|
|
33
|
+
showViewSwitch: { type: Boolean, default: !0 },
|
|
34
|
+
showFilter: { type: Boolean, default: !0 },
|
|
35
|
+
showSort: { type: Boolean, default: !0 },
|
|
36
|
+
showGroup: { type: Boolean, default: !0 },
|
|
37
|
+
showColumns: { type: Boolean, default: !0 },
|
|
38
|
+
showSearch: { type: Boolean, default: !0 },
|
|
39
|
+
savedViews: { default: void 0 }
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:currentView", "update:columns", "update:searchKeyword", "add-filter", "remove-filter", "update-filter", "clear-filters", "update:filterLogic", "sort", "group", "save-view", "load-view"],
|
|
42
|
+
setup(l, { emit: N }) {
|
|
43
|
+
const I = [
|
|
44
|
+
{ value: "table", label: "表格", icon: "table-2" },
|
|
45
|
+
{ value: "kanban", label: "看板", icon: "columns-3" },
|
|
46
|
+
{ value: "timeline", label: "时间线", icon: "calendar" }
|
|
47
|
+
], R = l, u = N, j = T(() => R.viewTabs ?? I), k = i(!1), v = i(!1), c = i(!1), p = i(!1), D = i(null), G = i(null), A = i(null), z = i(null), F = i({}), P = i({}), U = i({}), E = i({});
|
|
48
|
+
function q(r) {
|
|
49
|
+
if (!r) return {};
|
|
50
|
+
const e = r.getBoundingClientRect();
|
|
51
|
+
return {
|
|
52
|
+
top: `${e.bottom + 4}px`,
|
|
53
|
+
left: `${e.left}px`
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function S(r) {
|
|
57
|
+
r !== "filter" && (k.value = !1), r !== "sort" && (v.value = !1), r !== "group" && (c.value = !1), r !== "column" && (p.value = !1);
|
|
58
|
+
const f = {
|
|
59
|
+
filter: { show: k, btnRef: D, style: F },
|
|
60
|
+
sort: { show: v, btnRef: G, style: P },
|
|
61
|
+
group: { show: c, btnRef: A, style: U },
|
|
62
|
+
column: { show: p, btnRef: z, style: E }
|
|
63
|
+
}[r];
|
|
64
|
+
f.show.value = !f.show.value, f.show.value && ee(() => {
|
|
65
|
+
f.style.value = q(f.btnRef.value);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
function H() {
|
|
69
|
+
k.value = !1, v.value = !1, c.value = !1, p.value = !1;
|
|
70
|
+
}
|
|
71
|
+
function h(r) {
|
|
72
|
+
const e = r.target;
|
|
73
|
+
!e.closest(".of-table-toolbar__btn-group") && !e.closest(".of-table-toolbar__dropdown") && H();
|
|
74
|
+
}
|
|
75
|
+
W(() => document.addEventListener("click", h, !0)), X(() => document.removeEventListener("click", h, !0));
|
|
76
|
+
const J = T(() => R.columns.filter((r) => !r.hidden)), O = T(
|
|
77
|
+
() => R.columns.filter(
|
|
78
|
+
(r) => !r.hidden && (r.type === "status" || r.type === "string" || r.type === "priority")
|
|
79
|
+
)
|
|
80
|
+
);
|
|
81
|
+
return (r, e) => {
|
|
82
|
+
var f, x, K;
|
|
83
|
+
return o(), n("div", ie, [
|
|
84
|
+
l.showViewSwitch ? (o(), n("div", fe, [
|
|
85
|
+
(o(!0), n(V, null, L(j.value, (t) => (o(), n("button", {
|
|
86
|
+
key: t.value,
|
|
87
|
+
class: m(["of-table-toolbar__view-tab", { "of-table-toolbar__view-tab--active": l.currentView === t.value }]),
|
|
88
|
+
onClick: (y) => u("update:currentView", t.value)
|
|
89
|
+
}, [
|
|
90
|
+
t.icon ? (o(), C(Y(w(te)(t.icon)), {
|
|
91
|
+
key: 0,
|
|
92
|
+
class: "of-table-toolbar__tab-icon"
|
|
93
|
+
})) : s("", !0),
|
|
94
|
+
a("span", null, g(t.label), 1)
|
|
95
|
+
], 10, de))), 128))
|
|
96
|
+
])) : s("", !0),
|
|
97
|
+
l.showViewSwitch ? (o(), n("div", be)) : s("", !0),
|
|
98
|
+
l.showFilter ? (o(), n("div", {
|
|
99
|
+
key: 2,
|
|
100
|
+
ref_key: "filterBtnRef",
|
|
101
|
+
ref: D,
|
|
102
|
+
class: "of-table-toolbar__btn-group"
|
|
103
|
+
}, [
|
|
104
|
+
a("button", {
|
|
105
|
+
class: m(["of-table-toolbar__btn", { "of-table-toolbar__btn--active": l.filterActive }]),
|
|
106
|
+
onClick: e[0] || (e[0] = d((t) => S("filter"), ["stop"]))
|
|
107
|
+
}, [
|
|
108
|
+
b(w(ne), { size: 14 }),
|
|
109
|
+
e[19] || (e[19] = a("span", null, "筛选", -1)),
|
|
110
|
+
l.filterActive ? (o(), n("span", ve, g(((f = l.filterConditions) == null ? void 0 : f.length) ?? 0), 1)) : s("", !0)
|
|
111
|
+
], 2),
|
|
112
|
+
(o(), C(B, { to: "body" }, [
|
|
113
|
+
k.value ? (o(), n("div", {
|
|
114
|
+
key: 0,
|
|
115
|
+
class: "of-table-toolbar__dropdown",
|
|
116
|
+
style: $(F.value),
|
|
117
|
+
onClick: e[7] || (e[7] = d(() => {
|
|
118
|
+
}, ["stop"]))
|
|
119
|
+
}, [
|
|
120
|
+
b(oe, {
|
|
121
|
+
conditions: l.filterConditions ?? [],
|
|
122
|
+
columns: l.columns,
|
|
123
|
+
logic: l.filterLogic ?? "and",
|
|
124
|
+
visible: !0,
|
|
125
|
+
onAddCondition: e[1] || (e[1] = (t) => u("add-filter")),
|
|
126
|
+
onRemoveCondition: e[2] || (e[2] = (t) => u("remove-filter", t)),
|
|
127
|
+
onUpdateCondition: e[3] || (e[3] = (t, y) => u("update-filter", t, y)),
|
|
128
|
+
onClear: e[4] || (e[4] = (t) => u("clear-filters")),
|
|
129
|
+
"onUpdate:logic": e[5] || (e[5] = (t) => u("update:filterLogic", t)),
|
|
130
|
+
onClose: e[6] || (e[6] = (t) => k.value = !1)
|
|
131
|
+
}, null, 8, ["conditions", "columns", "logic"])
|
|
132
|
+
], 4)) : s("", !0)
|
|
133
|
+
]))
|
|
134
|
+
], 512)) : s("", !0),
|
|
135
|
+
l.showSort ? (o(), n("div", {
|
|
136
|
+
key: 3,
|
|
137
|
+
ref_key: "sortBtnRef",
|
|
138
|
+
ref: G,
|
|
139
|
+
class: "of-table-toolbar__btn-group"
|
|
140
|
+
}, [
|
|
141
|
+
a("button", {
|
|
142
|
+
class: m(["of-table-toolbar__btn", { "of-table-toolbar__btn--active": (x = l.currentSort) == null ? void 0 : x.field }]),
|
|
143
|
+
onClick: e[8] || (e[8] = d((t) => S("sort"), ["stop"]))
|
|
144
|
+
}, [
|
|
145
|
+
b(w(re), { size: 14 }),
|
|
146
|
+
e[20] || (e[20] = a("span", null, "排序", -1))
|
|
147
|
+
], 2),
|
|
148
|
+
(o(), C(B, { to: "body" }, [
|
|
149
|
+
v.value ? (o(), n("div", {
|
|
150
|
+
key: 0,
|
|
151
|
+
class: "of-table-toolbar__dropdown",
|
|
152
|
+
style: $(P.value),
|
|
153
|
+
onClick: e[10] || (e[10] = d(() => {
|
|
154
|
+
}, ["stop"]))
|
|
155
|
+
}, [
|
|
156
|
+
a("div", ce, [
|
|
157
|
+
e[21] || (e[21] = a("div", { class: "of-table-toolbar__panel-title" }, "排序", -1)),
|
|
158
|
+
(o(!0), n(V, null, L(J.value, (t) => {
|
|
159
|
+
var y, _, M;
|
|
160
|
+
return o(), n("button", {
|
|
161
|
+
key: t.key,
|
|
162
|
+
class: m(["of-table-toolbar__sort-item", { active: ((y = l.currentSort) == null ? void 0 : y.field) === t.key }]),
|
|
163
|
+
onClick: (ge) => {
|
|
164
|
+
u("sort", t.key), v.value = !1;
|
|
165
|
+
}
|
|
166
|
+
}, [
|
|
167
|
+
a("span", null, g(t.label), 1),
|
|
168
|
+
((_ = l.currentSort) == null ? void 0 : _.field) === t.key ? (o(), n("span", me, g(((M = l.currentSort) == null ? void 0 : M.order) === "asc" ? "↑" : "↓"), 1)) : s("", !0)
|
|
169
|
+
], 10, ye);
|
|
170
|
+
}), 128)),
|
|
171
|
+
(K = l.currentSort) != null && K.field ? (o(), n("button", {
|
|
172
|
+
key: 0,
|
|
173
|
+
class: "of-table-toolbar__clear-btn",
|
|
174
|
+
onClick: e[9] || (e[9] = (t) => {
|
|
175
|
+
u("sort", ""), v.value = !1;
|
|
176
|
+
})
|
|
177
|
+
}, " 清除排序 ")) : s("", !0)
|
|
178
|
+
])
|
|
179
|
+
], 4)) : s("", !0)
|
|
180
|
+
]))
|
|
181
|
+
], 512)) : s("", !0),
|
|
182
|
+
l.showGroup ? (o(), n("div", {
|
|
183
|
+
key: 4,
|
|
184
|
+
ref_key: "groupBtnRef",
|
|
185
|
+
ref: A,
|
|
186
|
+
class: "of-table-toolbar__btn-group"
|
|
187
|
+
}, [
|
|
188
|
+
a("button", {
|
|
189
|
+
class: m(["of-table-toolbar__btn", { "of-table-toolbar__btn--active": !!l.currentGroup }]),
|
|
190
|
+
onClick: e[11] || (e[11] = d((t) => S("group"), ["stop"]))
|
|
191
|
+
}, [
|
|
192
|
+
b(w(se), { size: 14 }),
|
|
193
|
+
e[22] || (e[22] = a("span", null, "分组", -1))
|
|
194
|
+
], 2),
|
|
195
|
+
(o(), C(B, { to: "body" }, [
|
|
196
|
+
c.value ? (o(), n("div", {
|
|
197
|
+
key: 0,
|
|
198
|
+
class: "of-table-toolbar__dropdown",
|
|
199
|
+
style: $(U.value),
|
|
200
|
+
onClick: e[13] || (e[13] = d(() => {
|
|
201
|
+
}, ["stop"]))
|
|
202
|
+
}, [
|
|
203
|
+
a("div", we, [
|
|
204
|
+
e[23] || (e[23] = a("div", { class: "of-table-toolbar__panel-title" }, "分组", -1)),
|
|
205
|
+
(o(!0), n(V, null, L(O.value, (t) => (o(), n("button", {
|
|
206
|
+
key: t.key,
|
|
207
|
+
class: m(["of-table-toolbar__sort-item", { active: l.currentGroup === t.key }]),
|
|
208
|
+
onClick: (y) => {
|
|
209
|
+
u("group", l.currentGroup === t.key ? null : t.key), c.value = !1;
|
|
210
|
+
}
|
|
211
|
+
}, g(t.label), 11, ke))), 128)),
|
|
212
|
+
l.currentGroup ? (o(), n("button", {
|
|
213
|
+
key: 0,
|
|
214
|
+
class: "of-table-toolbar__clear-btn",
|
|
215
|
+
onClick: e[12] || (e[12] = (t) => {
|
|
216
|
+
u("group", null), c.value = !1;
|
|
217
|
+
})
|
|
218
|
+
}, " 取消分组 ")) : s("", !0)
|
|
219
|
+
])
|
|
220
|
+
], 4)) : s("", !0)
|
|
221
|
+
]))
|
|
222
|
+
], 512)) : s("", !0),
|
|
223
|
+
l.showColumns ? (o(), n("div", {
|
|
224
|
+
key: 5,
|
|
225
|
+
ref_key: "columnBtnRef",
|
|
226
|
+
ref: z,
|
|
227
|
+
class: "of-table-toolbar__btn-group"
|
|
228
|
+
}, [
|
|
229
|
+
a("button", {
|
|
230
|
+
class: "of-table-toolbar__btn",
|
|
231
|
+
onClick: e[14] || (e[14] = d((t) => S("column"), ["stop"]))
|
|
232
|
+
}, [
|
|
233
|
+
b(w(ae), { size: 14 }),
|
|
234
|
+
e[24] || (e[24] = a("span", null, "列", -1))
|
|
235
|
+
]),
|
|
236
|
+
(o(), C(B, { to: "body" }, [
|
|
237
|
+
p.value ? (o(), n("div", {
|
|
238
|
+
key: 0,
|
|
239
|
+
class: "of-table-toolbar__dropdown",
|
|
240
|
+
style: $(E.value),
|
|
241
|
+
onClick: e[17] || (e[17] = d(() => {
|
|
242
|
+
}, ["stop"]))
|
|
243
|
+
}, [
|
|
244
|
+
b(le, {
|
|
245
|
+
columns: l.columns,
|
|
246
|
+
visible: !0,
|
|
247
|
+
"onUpdate:columns": e[15] || (e[15] = (t) => u("update:columns", t)),
|
|
248
|
+
onClose: e[16] || (e[16] = (t) => p.value = !1)
|
|
249
|
+
}, null, 8, ["columns"])
|
|
250
|
+
], 4)) : s("", !0)
|
|
251
|
+
]))
|
|
252
|
+
], 512)) : s("", !0),
|
|
253
|
+
e[25] || (e[25] = a("div", { class: "of-table-toolbar__spacer" }, null, -1)),
|
|
254
|
+
l.showSearch ? (o(), n("div", pe, [
|
|
255
|
+
b(w(ue), {
|
|
256
|
+
size: 14,
|
|
257
|
+
class: "of-table-toolbar__search-icon"
|
|
258
|
+
}),
|
|
259
|
+
a("input", {
|
|
260
|
+
class: "of-table-toolbar__search-input",
|
|
261
|
+
placeholder: "搜索...",
|
|
262
|
+
value: l.searchKeyword,
|
|
263
|
+
onInput: e[18] || (e[18] = (t) => u("update:searchKeyword", t.target.value))
|
|
264
|
+
}, null, 40, Ce)
|
|
265
|
+
])) : s("", !0),
|
|
266
|
+
Z(r.$slots, "default", {}, void 0, !0)
|
|
267
|
+
]);
|
|
268
|
+
};
|
|
269
|
+
}
|
|
270
|
+
});
|
|
271
|
+
export {
|
|
272
|
+
Ve as default
|
|
273
|
+
};
|
|
@@ -7,3 +7,8 @@ export { default as TableColumnManager } from './TableColumnManager.vue';
|
|
|
7
7
|
export { default as FieldCell } from './FieldCell.vue';
|
|
8
8
|
export type { FieldDef, FieldType, FieldOption, CellValue } from './FieldCell.vue';
|
|
9
9
|
export { default as TableGroupRow } from './TableGroupRow.vue';
|
|
10
|
+
export { default as MobileListView } from './MobileListView.vue';
|
|
11
|
+
export { default as DetailSheet } from './DetailSheet.vue';
|
|
12
|
+
export { default as TableToolbar } from './TableToolbar.vue';
|
|
13
|
+
export { default as FieldTypePicker } from './FieldTypePicker.vue';
|
|
14
|
+
export { default as ColumnHeaderMenu } from './ColumnHeaderMenu.vue';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { defineComponent as o, inject as i, computed as d, withDirectives as c, openBlock as r, createElementBlock as u, renderSlot as v, vShow as m, createCommentVNode as s } from "vue";
|
|
2
|
+
const f = ["id", "aria-labelledby", "hidden"], k = /* @__PURE__ */ o({
|
|
3
|
+
__name: "TabPanel",
|
|
4
|
+
props: {
|
|
5
|
+
name: {},
|
|
6
|
+
keepAlive: { type: Boolean }
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
const l = e, t = i("of-tabs-active"), a = d(() => (t == null ? void 0 : t.value) === l.name);
|
|
10
|
+
return (n, b) => e.keepAlive || a.value ? c((r(), u("div", {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "of-tab-panel",
|
|
13
|
+
role: "tabpanel",
|
|
14
|
+
id: `of-panel-${e.name}`,
|
|
15
|
+
"aria-labelledby": `of-tab-${e.name}`,
|
|
16
|
+
hidden: e.keepAlive && !a.value ? !0 : void 0
|
|
17
|
+
}, [
|
|
18
|
+
v(n.$slots, "default", {}, void 0, !0)
|
|
19
|
+
], 8, f)), [
|
|
20
|
+
[m, e.keepAlive ? a.value : !0]
|
|
21
|
+
]) : s("", !0);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
export {
|
|
25
|
+
k as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { defineComponent as h, ref as V, computed as w, provide as y, openBlock as l, createElementBlock as r, normalizeClass as m, createElementVNode as c, Fragment as D, renderList as x, createBlock as C, resolveDynamicComponent as $, unref as A, createCommentVNode as _, toDisplayString as v, renderSlot as T } from "vue";
|
|
2
|
+
import { resolveIcon as z } from "../../utils/icon.js";
|
|
3
|
+
const B = {
|
|
4
|
+
class: "of-tabs__nav",
|
|
5
|
+
role: "tablist",
|
|
6
|
+
"aria-label": "tabs"
|
|
7
|
+
}, E = ["disabled", "id", "aria-selected", "aria-controls", "aria-disabled", "tabindex", "onClick", "onKeydown"], I = { class: "of-tabs__tab-label" }, K = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "of-tabs__badge"
|
|
10
|
+
}, L = { class: "of-tabs__content" }, F = /* @__PURE__ */ h({
|
|
11
|
+
__name: "Tabs",
|
|
12
|
+
props: {
|
|
13
|
+
modelValue: {},
|
|
14
|
+
defaultValue: {},
|
|
15
|
+
variant: {},
|
|
16
|
+
size: {},
|
|
17
|
+
tabs: {}
|
|
18
|
+
},
|
|
19
|
+
emits: ["update:modelValue", "change"],
|
|
20
|
+
setup(i, { emit: p }) {
|
|
21
|
+
var b;
|
|
22
|
+
const d = i, f = p, u = V(d.defaultValue || ((b = d.tabs[0]) == null ? void 0 : b.key) || ""), o = w({
|
|
23
|
+
get: () => d.modelValue ?? u.value,
|
|
24
|
+
set: (t) => {
|
|
25
|
+
u.value = t, f("update:modelValue", t), f("change", t);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
function s(t) {
|
|
29
|
+
o.value = t;
|
|
30
|
+
}
|
|
31
|
+
function g(t, k) {
|
|
32
|
+
const e = d.tabs.filter((a) => !a.disabled), n = e.findIndex((a) => a.key === k);
|
|
33
|
+
if (t.key === "ArrowRight" || t.key === "ArrowDown") {
|
|
34
|
+
t.preventDefault();
|
|
35
|
+
const a = e[(n + 1) % e.length];
|
|
36
|
+
a && s(a.key);
|
|
37
|
+
} else if (t.key === "ArrowLeft" || t.key === "ArrowUp") {
|
|
38
|
+
t.preventDefault();
|
|
39
|
+
const a = e[(n - 1 + e.length) % e.length];
|
|
40
|
+
a && s(a.key);
|
|
41
|
+
} else if (t.key === "Home") {
|
|
42
|
+
t.preventDefault();
|
|
43
|
+
const a = e[0];
|
|
44
|
+
a && s(a.key);
|
|
45
|
+
} else if (t.key === "End") {
|
|
46
|
+
t.preventDefault();
|
|
47
|
+
const a = e[e.length - 1];
|
|
48
|
+
a && s(a.key);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return y("of-tabs-active", o), y("of-tabs-set", s), (t, k) => (l(), r("div", {
|
|
52
|
+
class: m(["of-tabs", [`of-tabs--${i.variant || "line"}`, `of-tabs--${i.size || "md"}`]])
|
|
53
|
+
}, [
|
|
54
|
+
c("div", B, [
|
|
55
|
+
(l(!0), r(D, null, x(i.tabs, (e) => (l(), r("button", {
|
|
56
|
+
key: e.key,
|
|
57
|
+
class: m(["of-tabs__tab", {
|
|
58
|
+
"of-tabs__tab--active": o.value === e.key,
|
|
59
|
+
"of-tabs__tab--disabled": e.disabled
|
|
60
|
+
}]),
|
|
61
|
+
disabled: e.disabled,
|
|
62
|
+
role: "tab",
|
|
63
|
+
id: `of-tab-${e.key}`,
|
|
64
|
+
"aria-selected": o.value === e.key,
|
|
65
|
+
"aria-controls": `of-panel-${e.key}`,
|
|
66
|
+
"aria-disabled": e.disabled,
|
|
67
|
+
tabindex: o.value === e.key ? 0 : -1,
|
|
68
|
+
onClick: (n) => !e.disabled && s(e.key),
|
|
69
|
+
onKeydown: (n) => g(n, e.key)
|
|
70
|
+
}, [
|
|
71
|
+
e.icon ? (l(), C($(A(z)(e.icon)), {
|
|
72
|
+
key: 0,
|
|
73
|
+
class: "of-tabs__tab-icon"
|
|
74
|
+
})) : _("", !0),
|
|
75
|
+
c("span", I, v(e.label), 1),
|
|
76
|
+
e.badge != null ? (l(), r("span", K, v(e.badge), 1)) : _("", !0)
|
|
77
|
+
], 42, E))), 128))
|
|
78
|
+
]),
|
|
79
|
+
c("div", L, [
|
|
80
|
+
T(t.$slots, "default", {}, void 0, !0)
|
|
81
|
+
])
|
|
82
|
+
], 2));
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
F as default
|
|
87
|
+
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { defineComponent as k, computed as g, openBlock as s, createElementBlock as o, Fragment as f, renderList as m, createElementVNode as e, createCommentVNode as n, normalizeStyle as u, renderSlot as h, toDisplayString as a } from "vue";
|
|
2
|
+
const b = ["aria-busy"], C = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-activity-timeline__skeleton",
|
|
5
|
+
"aria-hidden": "true"
|
|
6
|
+
}, N = { class: "of-activity-timeline__rail" }, $ = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "of-activity-timeline__line"
|
|
9
|
+
}, B = { class: "of-activity-timeline__rail" }, S = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "of-activity-timeline__line"
|
|
12
|
+
}, V = { class: "of-activity-timeline__content" }, w = { class: "of-activity-timeline__header" }, z = { class: "of-activity-timeline__action" }, D = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "of-activity-timeline__actor"
|
|
15
|
+
}, E = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "of-activity-timeline__detail"
|
|
18
|
+
}, M = {
|
|
19
|
+
key: 1,
|
|
20
|
+
class: "of-activity-timeline__progress"
|
|
21
|
+
}, A = { class: "of-activity-timeline__progress-track" }, F = { class: "of-activity-timeline__progress-value" }, I = {
|
|
22
|
+
key: 2,
|
|
23
|
+
class: "of-activity-timeline__time"
|
|
24
|
+
}, P = /* @__PURE__ */ k({
|
|
25
|
+
__name: "ActivityTimeline",
|
|
26
|
+
props: {
|
|
27
|
+
items: {},
|
|
28
|
+
loading: { type: Boolean, default: !1 }
|
|
29
|
+
},
|
|
30
|
+
setup(r) {
|
|
31
|
+
const p = r, d = [0, 1, 2], v = g(
|
|
32
|
+
() => p.items.map((i) => ({
|
|
33
|
+
...i,
|
|
34
|
+
status: i.status ?? "default"
|
|
35
|
+
}))
|
|
36
|
+
);
|
|
37
|
+
function y(i) {
|
|
38
|
+
return i === "done" ? "var(--of-color-success)" : i === "start" ? "var(--of-color-warning)" : "var(--of-color-info)";
|
|
39
|
+
}
|
|
40
|
+
function _(i) {
|
|
41
|
+
return typeof i != "number" || Number.isNaN(i) ? null : Math.min(100, Math.max(0, i));
|
|
42
|
+
}
|
|
43
|
+
return (i, l) => (s(), o("div", {
|
|
44
|
+
class: "of-activity-timeline",
|
|
45
|
+
"aria-busy": r.loading
|
|
46
|
+
}, [
|
|
47
|
+
r.loading ? (s(), o("div", C, [
|
|
48
|
+
(s(), o(f, null, m(d, (t) => e("div", {
|
|
49
|
+
key: t,
|
|
50
|
+
class: "of-activity-timeline__item of-activity-timeline__item--skeleton"
|
|
51
|
+
}, [
|
|
52
|
+
e("div", N, [
|
|
53
|
+
l[0] || (l[0] = e("span", { class: "of-activity-timeline__dot of-activity-timeline__dot--skeleton" }, null, -1)),
|
|
54
|
+
t < d.length - 1 ? (s(), o("span", $)) : n("", !0)
|
|
55
|
+
]),
|
|
56
|
+
l[1] || (l[1] = e("div", { class: "of-activity-timeline__content" }, [
|
|
57
|
+
e("span", { class: "of-activity-timeline__skeleton-bar of-activity-timeline__skeleton-bar--lg" }),
|
|
58
|
+
e("span", { class: "of-activity-timeline__skeleton-bar of-activity-timeline__skeleton-bar--md" }),
|
|
59
|
+
e("span", { class: "of-activity-timeline__skeleton-bar of-activity-timeline__skeleton-bar--sm" })
|
|
60
|
+
], -1))
|
|
61
|
+
])), 64))
|
|
62
|
+
])) : (s(!0), o(f, { key: 1 }, m(v.value, (t, c) => (s(), o("div", {
|
|
63
|
+
key: `${t.action}-${t.time ?? c}-${c}`,
|
|
64
|
+
class: "of-activity-timeline__item"
|
|
65
|
+
}, [
|
|
66
|
+
e("div", B, [
|
|
67
|
+
e("span", {
|
|
68
|
+
class: "of-activity-timeline__dot",
|
|
69
|
+
style: u({ backgroundColor: y(t.status) })
|
|
70
|
+
}, null, 4),
|
|
71
|
+
c < v.value.length - 1 ? (s(), o("span", S)) : n("", !0)
|
|
72
|
+
]),
|
|
73
|
+
e("div", V, [
|
|
74
|
+
h(i.$slots, "item", {
|
|
75
|
+
item: t,
|
|
76
|
+
index: c
|
|
77
|
+
}, () => [
|
|
78
|
+
e("div", w, [
|
|
79
|
+
e("span", z, a(t.action), 1),
|
|
80
|
+
t.actor ? (s(), o("span", D, a(t.actor), 1)) : n("", !0)
|
|
81
|
+
]),
|
|
82
|
+
t.detail ? (s(), o("p", E, a(t.detail), 1)) : n("", !0),
|
|
83
|
+
_(t.progress) !== null ? (s(), o("div", M, [
|
|
84
|
+
e("div", A, [
|
|
85
|
+
e("div", {
|
|
86
|
+
class: "of-activity-timeline__progress-fill",
|
|
87
|
+
style: u({
|
|
88
|
+
width: `${_(t.progress)}%`,
|
|
89
|
+
backgroundColor: y(t.status)
|
|
90
|
+
})
|
|
91
|
+
}, null, 4)
|
|
92
|
+
]),
|
|
93
|
+
e("span", F, a(_(t.progress)) + "% ", 1)
|
|
94
|
+
])) : n("", !0),
|
|
95
|
+
t.time ? (s(), o("p", I, a(t.time), 1)) : n("", !0)
|
|
96
|
+
], !0)
|
|
97
|
+
])
|
|
98
|
+
]))), 128))
|
|
99
|
+
], 8, b));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
export {
|
|
103
|
+
P as default
|
|
104
|
+
};
|