@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,56 @@
|
|
|
1
|
+
import { defineComponent as A, computed as e, openBlock as r, createElementBlock as i, normalizeClass as T, createElementVNode as s, toDisplayString as l, createCommentVNode as f, normalizeStyle as m } from "vue";
|
|
2
|
+
import { resolveBadge as p, mergeColorMap as g, DEFAULT_PRIORITY_MAP as _, DEFAULT_STATUS_MAP as S } from "../../composables/useBadge.js";
|
|
3
|
+
const h = { class: "of-card-title" }, B = { class: "of-card-meta" }, E = { class: "of-card-id" }, L = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-card-date"
|
|
6
|
+
}, N = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "of-card-role-badge"
|
|
9
|
+
}, P = { class: "of-card-tags" }, z = /* @__PURE__ */ A({
|
|
10
|
+
__name: "KanbanCard",
|
|
11
|
+
props: {
|
|
12
|
+
task: {},
|
|
13
|
+
dragging: { type: Boolean, default: !1 },
|
|
14
|
+
priorityColorMap: {},
|
|
15
|
+
statusColorMap: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["click"],
|
|
18
|
+
setup(a, { emit: k }) {
|
|
19
|
+
const o = a, v = k, c = e(
|
|
20
|
+
() => p(o.task.priority, g(_, o.priorityColorMap))
|
|
21
|
+
), d = e(
|
|
22
|
+
() => p(o.task.status, g(S, o.statusColorMap))
|
|
23
|
+
), y = e(() => c.value.style), b = e(() => d.value.style), C = e(() => d.value.label), D = e(() => c.value.label);
|
|
24
|
+
function M(n) {
|
|
25
|
+
if (!n) return "";
|
|
26
|
+
const t = new Date(n);
|
|
27
|
+
return isNaN(t.getTime()) ? n : `${t.getMonth() + 1}/${t.getDate()}`;
|
|
28
|
+
}
|
|
29
|
+
const u = e(() => M(o.task.updatedAt ?? o.task.endDate));
|
|
30
|
+
return (n, t) => (r(), i("div", {
|
|
31
|
+
class: T(["of-kanban-card", { "of-kanban-card--dragging": a.dragging }]),
|
|
32
|
+
onClick: t[0] || (t[0] = (U) => v("click", a.task))
|
|
33
|
+
}, [
|
|
34
|
+
s("div", h, l(a.task.title), 1),
|
|
35
|
+
s("div", B, [
|
|
36
|
+
s("span", E, l(a.task.id), 1),
|
|
37
|
+
u.value ? (r(), i("span", L, l(u.value), 1)) : f("", !0),
|
|
38
|
+
t[1] || (t[1] = s("span", { class: "of-card-spacer" }, null, -1)),
|
|
39
|
+
a.task.role ? (r(), i("span", N, l(a.task.role), 1)) : f("", !0)
|
|
40
|
+
]),
|
|
41
|
+
s("div", P, [
|
|
42
|
+
s("span", {
|
|
43
|
+
class: "of-badge",
|
|
44
|
+
style: m(y.value)
|
|
45
|
+
}, l(D.value), 5),
|
|
46
|
+
s("span", {
|
|
47
|
+
class: "of-badge",
|
|
48
|
+
style: m(b.value)
|
|
49
|
+
}, l(C.value), 5)
|
|
50
|
+
])
|
|
51
|
+
], 2));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
z as default
|
|
56
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as D, ref as k, watch as v, computed as C, openBlock as r, createElementBlock as d, createElementVNode as n, normalizeStyle as m, toDisplayString as y, createVNode as E, unref as c, createBlock as f, withCtx as H, Fragment as h, renderList as b } from "vue";
|
|
2
|
+
import { Plus as L } from "lucide-vue-next";
|
|
3
|
+
import { VueDraggable as R } from "vue-draggable-plus";
|
|
4
|
+
import { useVirtualList as U } from "../../composables/useVirtualList.js";
|
|
5
|
+
import V from "./KanbanCard.vue.js";
|
|
6
|
+
import { mergeColorMap as Y, DEFAULT_STATUS_MAP as w } from "../../composables/useBadge.js";
|
|
7
|
+
const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { class: "of-col-title" }, K = { class: "of-col-count" }, q = /* @__PURE__ */ D({
|
|
8
|
+
__name: "KanbanColumn",
|
|
9
|
+
props: {
|
|
10
|
+
column: {},
|
|
11
|
+
ghostClass: { default: "of-ghost" },
|
|
12
|
+
priorityColorMap: {},
|
|
13
|
+
statusColorMap: {}
|
|
14
|
+
},
|
|
15
|
+
emits: ["add-card", "card-click", "update:column"],
|
|
16
|
+
setup(i, { emit: x }) {
|
|
17
|
+
const a = i, u = x, l = k([...a.column.tasks]);
|
|
18
|
+
v(
|
|
19
|
+
() => a.column.tasks,
|
|
20
|
+
(s) => {
|
|
21
|
+
s.length === l.value.length && s.every((o, e) => {
|
|
22
|
+
var g;
|
|
23
|
+
return o.id === ((g = l.value[e]) == null ? void 0 : g.id);
|
|
24
|
+
}) || (l.value = [...s]);
|
|
25
|
+
}
|
|
26
|
+
), v(l, (s) => {
|
|
27
|
+
u("update:column", { ...a.column, tasks: s });
|
|
28
|
+
});
|
|
29
|
+
const S = C(() => l.value.length > 50), p = k(null), {
|
|
30
|
+
visibleItems: T,
|
|
31
|
+
totalHeight: M,
|
|
32
|
+
offsetY: A
|
|
33
|
+
} = U({
|
|
34
|
+
items: l,
|
|
35
|
+
itemHeight: 120,
|
|
36
|
+
overscan: 3,
|
|
37
|
+
containerRef: p
|
|
38
|
+
}), B = C(() => {
|
|
39
|
+
if (a.column.color) return a.column.color;
|
|
40
|
+
const s = Y(w, a.statusColorMap), t = s[a.column.id], o = s[a.column.title], e = t ?? o;
|
|
41
|
+
return (e == null ? void 0 : e.dot) ?? (e == null ? void 0 : e.text) ?? "var(--of-color-gray-400)";
|
|
42
|
+
});
|
|
43
|
+
return (s, t) => (r(), d("div", z, [
|
|
44
|
+
n("div", F, [
|
|
45
|
+
n("span", {
|
|
46
|
+
class: "of-col-dot",
|
|
47
|
+
style: m({ background: B.value })
|
|
48
|
+
}, null, 4),
|
|
49
|
+
n("span", I, y(i.column.title), 1),
|
|
50
|
+
n("span", K, y(l.value.length), 1),
|
|
51
|
+
t[4] || (t[4] = n("span", { class: "of-col-spacer" }, null, -1)),
|
|
52
|
+
n("button", {
|
|
53
|
+
class: "of-col-add-btn",
|
|
54
|
+
onClick: t[0] || (t[0] = (o) => u("add-card", i.column.id))
|
|
55
|
+
}, [
|
|
56
|
+
E(c(L), { size: 14 })
|
|
57
|
+
])
|
|
58
|
+
]),
|
|
59
|
+
S.value ? (r(), d("div", {
|
|
60
|
+
key: 1,
|
|
61
|
+
ref_key: "cardContainerRef",
|
|
62
|
+
ref: p,
|
|
63
|
+
class: "of-col-cards of-col-cards-virtual"
|
|
64
|
+
}, [
|
|
65
|
+
n("div", {
|
|
66
|
+
style: m({ height: c(M) + "px", position: "relative" })
|
|
67
|
+
}, [
|
|
68
|
+
n("div", {
|
|
69
|
+
style: m({ transform: `translateY(${c(A)}px)` })
|
|
70
|
+
}, [
|
|
71
|
+
(r(!0), d(h, null, b(c(T), ({ data: o }) => (r(), f(V, {
|
|
72
|
+
key: o.id,
|
|
73
|
+
task: o,
|
|
74
|
+
onClick: t[3] || (t[3] = (e) => u("card-click", e))
|
|
75
|
+
}, null, 8, ["task"]))), 128))
|
|
76
|
+
], 4)
|
|
77
|
+
], 4)
|
|
78
|
+
], 512)) : (r(), f(c(R), {
|
|
79
|
+
key: 0,
|
|
80
|
+
modelValue: l.value,
|
|
81
|
+
"onUpdate:modelValue": t[2] || (t[2] = (o) => l.value = o),
|
|
82
|
+
group: { name: "kanban", pull: !0, put: !0 },
|
|
83
|
+
"item-key": "id",
|
|
84
|
+
"ghost-class": i.ghostClass,
|
|
85
|
+
"chosen-class": "of-chosen",
|
|
86
|
+
animation: 200,
|
|
87
|
+
class: "of-col-cards"
|
|
88
|
+
}, {
|
|
89
|
+
default: H(() => [
|
|
90
|
+
(r(!0), d(h, null, b(l.value, (o) => (r(), f(V, {
|
|
91
|
+
key: o.id,
|
|
92
|
+
task: o,
|
|
93
|
+
onClick: t[1] || (t[1] = (e) => u("card-click", e))
|
|
94
|
+
}, null, 8, ["task"]))), 128))
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["modelValue", "ghost-class"]))
|
|
98
|
+
]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
q as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { defineComponent as v, ref as a, openBlock as c, createElementBlock as i, createVNode as h, unref as y, createElementVNode as _, toDisplayString as x, withDirectives as q, vModelText as w, nextTick as E } from "vue";
|
|
2
|
+
import { Plus as B } from "lucide-vue-next";
|
|
3
|
+
const V = { class: "of-quick-add" }, b = { class: "of-quick-add-placeholder" }, g = ["placeholder"], C = /* @__PURE__ */ v({
|
|
4
|
+
__name: "QuickAddRow",
|
|
5
|
+
props: {
|
|
6
|
+
placeholder: { default: "快速创建任务,按 Enter 提交" }
|
|
7
|
+
},
|
|
8
|
+
emits: ["submit", "cancel"],
|
|
9
|
+
setup(u, { emit: r }) {
|
|
10
|
+
const s = r, n = a(!1), e = a(""), d = a(null);
|
|
11
|
+
async function f() {
|
|
12
|
+
var t;
|
|
13
|
+
n.value = !0, await E(), (t = d.value) == null || t.focus();
|
|
14
|
+
}
|
|
15
|
+
function o() {
|
|
16
|
+
n.value = !1, e.value = "";
|
|
17
|
+
}
|
|
18
|
+
function p(t) {
|
|
19
|
+
if (t.key === "Enter") {
|
|
20
|
+
const l = e.value.trim();
|
|
21
|
+
l && (s("submit", l), e.value = "", o());
|
|
22
|
+
} else t.key === "Escape" && (s("cancel"), o());
|
|
23
|
+
}
|
|
24
|
+
function m() {
|
|
25
|
+
setTimeout(() => {
|
|
26
|
+
e.value.trim() || o();
|
|
27
|
+
}, 150);
|
|
28
|
+
}
|
|
29
|
+
return (t, l) => (c(), i("div", V, [
|
|
30
|
+
n.value ? q((c(), i("input", {
|
|
31
|
+
key: 1,
|
|
32
|
+
ref_key: "inputRef",
|
|
33
|
+
ref: d,
|
|
34
|
+
"onUpdate:modelValue": l[0] || (l[0] = (k) => e.value = k),
|
|
35
|
+
type: "text",
|
|
36
|
+
class: "of-quick-add-input",
|
|
37
|
+
placeholder: u.placeholder,
|
|
38
|
+
onKeydown: p,
|
|
39
|
+
onBlur: m
|
|
40
|
+
}, null, 40, g)), [
|
|
41
|
+
[w, e.value]
|
|
42
|
+
]) : (c(), i("button", {
|
|
43
|
+
key: 0,
|
|
44
|
+
class: "of-quick-add-trigger",
|
|
45
|
+
onClick: f
|
|
46
|
+
}, [
|
|
47
|
+
h(y(B), {
|
|
48
|
+
size: 14,
|
|
49
|
+
class: "of-quick-add-icon"
|
|
50
|
+
}),
|
|
51
|
+
_("span", b, x(u.placeholder), 1)
|
|
52
|
+
]))
|
|
53
|
+
]));
|
|
54
|
+
}
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
C as default
|
|
58
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { defineComponent as h, provide as l, computed as w, ref as g, onBeforeUnmount as E, openBlock as o, createElementBlock as t, normalizeClass as v, createElementVNode as s, unref as c, createCommentVNode as d, renderSlot as r, Fragment as N } from "vue";
|
|
2
|
+
import { useBreakpoint as T } from "../../composables/useBreakpoint.js";
|
|
3
|
+
import { useFocusTrap as C } from "../../composables/useFocusTrap.js";
|
|
4
|
+
const L = { class: "of-app-layout__navbar" }, $ = ["aria-expanded"], B = { class: "of-app-layout__body" }, R = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "of-app-layout__sidebar"
|
|
7
|
+
}, S = { class: "of-app-layout__main" }, F = { class: "of-app-layout__statusbar" }, O = /* @__PURE__ */ h({
|
|
8
|
+
__name: "AppLayout",
|
|
9
|
+
props: {
|
|
10
|
+
density: { default: "comfortable" }
|
|
11
|
+
},
|
|
12
|
+
setup(u) {
|
|
13
|
+
const m = u, { isMobile: n, isTablet: y } = T();
|
|
14
|
+
l("isMobile", n), l("isTablet", y), l(
|
|
15
|
+
"density",
|
|
16
|
+
w(() => m.density)
|
|
17
|
+
);
|
|
18
|
+
const a = g(!1), {
|
|
19
|
+
containerRef: _,
|
|
20
|
+
activate: b,
|
|
21
|
+
deactivate: p
|
|
22
|
+
} = C();
|
|
23
|
+
function k() {
|
|
24
|
+
const e = !a.value;
|
|
25
|
+
a.value = e, e ? (b(), document.addEventListener("keydown", i)) : (p(), document.removeEventListener("keydown", i));
|
|
26
|
+
}
|
|
27
|
+
function f() {
|
|
28
|
+
a.value = !1, p(), document.removeEventListener("keydown", i);
|
|
29
|
+
}
|
|
30
|
+
function i(e) {
|
|
31
|
+
e.key === "Escape" && f();
|
|
32
|
+
}
|
|
33
|
+
return E(() => {
|
|
34
|
+
document.removeEventListener("keydown", i);
|
|
35
|
+
}), (e, M) => (o(), t("div", {
|
|
36
|
+
class: v(["of-app-layout", { "of-density-compact": u.density === "compact" }])
|
|
37
|
+
}, [
|
|
38
|
+
s("header", L, [
|
|
39
|
+
c(n) ? (o(), t("button", {
|
|
40
|
+
key: 0,
|
|
41
|
+
class: "of-app-layout__hamburger",
|
|
42
|
+
"aria-label": "Toggle sidebar",
|
|
43
|
+
"aria-expanded": a.value,
|
|
44
|
+
onClick: k
|
|
45
|
+
}, " ☰ ", 8, $)) : d("", !0),
|
|
46
|
+
r(e.$slots, "navbar", {}, void 0, !0)
|
|
47
|
+
]),
|
|
48
|
+
s("div", B, [
|
|
49
|
+
c(n) ? d("", !0) : (o(), t("aside", R, [
|
|
50
|
+
r(e.$slots, "sidebar", {}, void 0, !0)
|
|
51
|
+
])),
|
|
52
|
+
c(n) ? (o(), t(N, { key: 1 }, [
|
|
53
|
+
a.value ? (o(), t("div", {
|
|
54
|
+
key: 0,
|
|
55
|
+
class: "of-drawer-overlay",
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
onClick: f
|
|
58
|
+
})) : d("", !0),
|
|
59
|
+
s("aside", {
|
|
60
|
+
ref_key: "drawerNavRef",
|
|
61
|
+
ref: _,
|
|
62
|
+
class: v(["of-drawer-sidebar", { "of-drawer-sidebar--open": a.value }]),
|
|
63
|
+
role: "dialog",
|
|
64
|
+
"aria-modal": "true",
|
|
65
|
+
"aria-label": "导航菜单"
|
|
66
|
+
}, [
|
|
67
|
+
r(e.$slots, "sidebar", {}, void 0, !0)
|
|
68
|
+
], 2)
|
|
69
|
+
], 64)) : d("", !0),
|
|
70
|
+
s("main", S, [
|
|
71
|
+
r(e.$slots, "default", {}, void 0, !0)
|
|
72
|
+
])
|
|
73
|
+
]),
|
|
74
|
+
s("footer", F, [
|
|
75
|
+
r(e.$slots, "statusbar", {}, void 0, !0)
|
|
76
|
+
])
|
|
77
|
+
], 2));
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
export {
|
|
81
|
+
O as default
|
|
82
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { defineComponent as p, inject as C, computed as l, openBlock as r, createElementBlock as i, normalizeClass as k, createElementVNode as a, renderSlot as g, createVNode as f, unref as u, toDisplayString as d, createCommentVNode as N } from "vue";
|
|
2
|
+
import { SearchIcon as I, BellIcon as S } from "lucide-vue-next";
|
|
3
|
+
const z = { class: "of-navbar__left" }, B = { class: "of-navbar__center" }, U = { class: "of-navbar__search" }, V = ["placeholder"], x = { class: "of-navbar__right" }, A = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-navbar__notify-badge"
|
|
6
|
+
}, j = /* @__PURE__ */ p({
|
|
7
|
+
__name: "Navbar",
|
|
8
|
+
props: {
|
|
9
|
+
username: { default: "U" },
|
|
10
|
+
searchPlaceholder: { default: "⌘K 搜索..." },
|
|
11
|
+
notifyCount: { default: 0 }
|
|
12
|
+
},
|
|
13
|
+
emits: ["search", "notify-click", "avatar-click"],
|
|
14
|
+
setup(t, { emit: v }) {
|
|
15
|
+
const e = C("density"), _ = l(() => (e == null ? void 0 : e.value) ?? "comfortable"), c = t, n = v, h = l(
|
|
16
|
+
() => c.username ? c.username.charAt(0).toUpperCase() : "U"
|
|
17
|
+
);
|
|
18
|
+
function m(o) {
|
|
19
|
+
n("search", o.target.value);
|
|
20
|
+
}
|
|
21
|
+
function b() {
|
|
22
|
+
n("notify-click");
|
|
23
|
+
}
|
|
24
|
+
function y() {
|
|
25
|
+
n("avatar-click");
|
|
26
|
+
}
|
|
27
|
+
return (o, s) => (r(), i("nav", {
|
|
28
|
+
class: k(["of-navbar", { "of-navbar--compact": _.value === "compact" }])
|
|
29
|
+
}, [
|
|
30
|
+
a("div", z, [
|
|
31
|
+
g(o.$slots, "logo", {}, () => [
|
|
32
|
+
s[0] || (s[0] = a("span", { class: "of-navbar__logo-default" }, "OneFlow", -1))
|
|
33
|
+
], !0)
|
|
34
|
+
]),
|
|
35
|
+
a("div", B, [
|
|
36
|
+
a("div", U, [
|
|
37
|
+
f(u(I), {
|
|
38
|
+
class: "of-navbar__search-icon",
|
|
39
|
+
size: 14
|
|
40
|
+
}),
|
|
41
|
+
a("input", {
|
|
42
|
+
class: "of-navbar__search-input",
|
|
43
|
+
type: "text",
|
|
44
|
+
placeholder: t.searchPlaceholder,
|
|
45
|
+
onInput: m
|
|
46
|
+
}, null, 40, V)
|
|
47
|
+
])
|
|
48
|
+
]),
|
|
49
|
+
a("div", x, [
|
|
50
|
+
a("button", {
|
|
51
|
+
class: "of-navbar__notify-btn",
|
|
52
|
+
onClick: b
|
|
53
|
+
}, [
|
|
54
|
+
f(u(S), {
|
|
55
|
+
class: "of-navbar__notify-icon",
|
|
56
|
+
size: 16
|
|
57
|
+
}),
|
|
58
|
+
t.notifyCount && t.notifyCount > 0 ? (r(), i("span", A, d(t.notifyCount > 99 ? "99+" : t.notifyCount), 1)) : N("", !0)
|
|
59
|
+
]),
|
|
60
|
+
a("button", {
|
|
61
|
+
class: "of-navbar__avatar",
|
|
62
|
+
onClick: y
|
|
63
|
+
}, d(h.value), 1)
|
|
64
|
+
])
|
|
65
|
+
], 2));
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
export {
|
|
69
|
+
j as default
|
|
70
|
+
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { defineComponent as z, inject as E, computed as S, ref as B, openBlock as s, createElementBlock as t, normalizeClass as _, renderSlot as m, createCommentVNode as a, createElementVNode as r, Fragment as f, renderList as k, createBlock as u, resolveDynamicComponent as b, unref as c, toDisplayString as d } from "vue";
|
|
2
|
+
import { ChevronDownIcon as D, ChevronRightIcon as w } from "lucide-vue-next";
|
|
3
|
+
import { resolveIcon as p } from "../../utils/icon.js";
|
|
4
|
+
const N = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "of-sidebar__header"
|
|
7
|
+
}, V = { class: "of-sidebar__nav" }, j = ["onClick"], x = { class: "of-sidebar__item-label" }, F = {
|
|
8
|
+
key: 1,
|
|
9
|
+
class: "of-sidebar__item-badge"
|
|
10
|
+
}, L = {
|
|
11
|
+
key: 0,
|
|
12
|
+
class: "of-sidebar__children"
|
|
13
|
+
}, q = ["onClick"], A = { class: "of-sidebar__item-label" }, G = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "of-sidebar__item-badge"
|
|
16
|
+
}, H = {
|
|
17
|
+
key: 1,
|
|
18
|
+
class: "of-sidebar__footer"
|
|
19
|
+
}, Q = /* @__PURE__ */ z({
|
|
20
|
+
__name: "Sidebar",
|
|
21
|
+
props: {
|
|
22
|
+
items: {}
|
|
23
|
+
},
|
|
24
|
+
emits: ["item-click"],
|
|
25
|
+
setup(g, { emit: y }) {
|
|
26
|
+
const l = E("density"), C = S(() => (l == null ? void 0 : l.value) ?? "comfortable"), v = y, i = B(/* @__PURE__ */ new Set());
|
|
27
|
+
function $(e) {
|
|
28
|
+
i.value.has(e.id) ? i.value.delete(e.id) : i.value.add(e.id);
|
|
29
|
+
}
|
|
30
|
+
function I(e) {
|
|
31
|
+
e.children && e.children.length > 0 && $(e), v("item-click", e);
|
|
32
|
+
}
|
|
33
|
+
function h(e) {
|
|
34
|
+
return i.value.has(e.id);
|
|
35
|
+
}
|
|
36
|
+
return (e, J) => (s(), t("div", {
|
|
37
|
+
class: _(["of-sidebar", { "of-sidebar--compact": C.value === "compact" }])
|
|
38
|
+
}, [
|
|
39
|
+
e.$slots.header ? (s(), t("div", N, [
|
|
40
|
+
m(e.$slots, "header", {}, void 0, !0)
|
|
41
|
+
])) : a("", !0),
|
|
42
|
+
r("nav", V, [
|
|
43
|
+
(s(!0), t(f, null, k(g.items, (o) => (s(), t(f, {
|
|
44
|
+
key: o.id
|
|
45
|
+
}, [
|
|
46
|
+
r("button", {
|
|
47
|
+
class: _(["of-sidebar__item", { "of-sidebar__item--active": o.active }]),
|
|
48
|
+
onClick: (n) => I(o)
|
|
49
|
+
}, [
|
|
50
|
+
o.icon ? (s(), u(b(c(p)(o.icon)), {
|
|
51
|
+
key: 0,
|
|
52
|
+
class: "of-sidebar__item-icon",
|
|
53
|
+
size: 15
|
|
54
|
+
})) : a("", !0),
|
|
55
|
+
r("span", x, d(o.label), 1),
|
|
56
|
+
o.badge !== void 0 ? (s(), t("span", F, d(o.badge), 1)) : a("", !0),
|
|
57
|
+
o.children && o.children.length > 0 ? (s(), u(b(h(o) ? c(D) : c(w)), {
|
|
58
|
+
key: 2,
|
|
59
|
+
class: "of-sidebar__item-chevron",
|
|
60
|
+
size: 13
|
|
61
|
+
})) : a("", !0)
|
|
62
|
+
], 10, j),
|
|
63
|
+
o.children && o.children.length > 0 && h(o) ? (s(), t("div", L, [
|
|
64
|
+
(s(!0), t(f, null, k(o.children, (n) => (s(), t("button", {
|
|
65
|
+
key: n.id,
|
|
66
|
+
class: _(["of-sidebar__item of-sidebar__item--child", { "of-sidebar__item--active": n.active }]),
|
|
67
|
+
onClick: (K) => v("item-click", n)
|
|
68
|
+
}, [
|
|
69
|
+
n.icon ? (s(), u(b(c(p)(n.icon)), {
|
|
70
|
+
key: 0,
|
|
71
|
+
class: "of-sidebar__item-icon",
|
|
72
|
+
size: 14
|
|
73
|
+
})) : a("", !0),
|
|
74
|
+
r("span", A, d(n.label), 1),
|
|
75
|
+
n.badge !== void 0 ? (s(), t("span", G, d(n.badge), 1)) : a("", !0)
|
|
76
|
+
], 10, q))), 128))
|
|
77
|
+
])) : a("", !0)
|
|
78
|
+
], 64))), 128))
|
|
79
|
+
]),
|
|
80
|
+
e.$slots.footer ? (s(), t("div", H, [
|
|
81
|
+
m(e.$slots, "footer", {}, void 0, !0)
|
|
82
|
+
])) : a("", !0)
|
|
83
|
+
], 2));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
export {
|
|
87
|
+
Q as default
|
|
88
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as e, createElementBlock as c, createElementVNode as t, createBlock as n, unref as r, toDisplayString as o, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { CircleCheckIcon as u, CircleAlertIcon as l } from "lucide-vue-next";
|
|
3
|
+
const f = { class: "of-statusbar" }, d = { class: "of-statusbar__left" }, y = { class: "of-statusbar__sync-text" }, b = { class: "of-statusbar__right" }, h = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-statusbar__shortcuts"
|
|
6
|
+
}, m = { class: "of-statusbar__version" }, B = /* @__PURE__ */ i({
|
|
7
|
+
__name: "StatusBar",
|
|
8
|
+
props: {
|
|
9
|
+
synced: { type: Boolean, default: !0 },
|
|
10
|
+
shortcuts: { default: "" },
|
|
11
|
+
version: { default: "v1.0.0" }
|
|
12
|
+
},
|
|
13
|
+
setup(s) {
|
|
14
|
+
return (k, a) => (e(), c("div", f, [
|
|
15
|
+
t("div", d, [
|
|
16
|
+
s.synced ? (e(), n(r(u), {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "of-statusbar__sync-icon of-statusbar__sync-icon--ok",
|
|
19
|
+
size: 13
|
|
20
|
+
})) : (e(), n(r(l), {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "of-statusbar__sync-icon of-statusbar__sync-icon--warn",
|
|
23
|
+
size: 13
|
|
24
|
+
})),
|
|
25
|
+
t("span", y, o(s.synced ? "所有更改已同步" : "同步中..."), 1)
|
|
26
|
+
]),
|
|
27
|
+
a[0] || (a[0] = t("div", { class: "of-statusbar__spacer" }, null, -1)),
|
|
28
|
+
t("div", b, [
|
|
29
|
+
s.shortcuts ? (e(), c("span", h, o(s.shortcuts), 1)) : _("", !0),
|
|
30
|
+
t("span", m, o(s.version), 1)
|
|
31
|
+
])
|
|
32
|
+
]));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
B as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { defineComponent as p, ref as d, onMounted as h, watch as y, openBlock as n, createElementBlock as i, normalizeStyle as g, renderSlot as u, createElementVNode as s, toDisplayString as w, nextTick as k } from "vue";
|
|
2
|
+
const M = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "of-mermaid__loading"
|
|
5
|
+
}, C = {
|
|
6
|
+
key: 1,
|
|
7
|
+
class: "of-mermaid__error"
|
|
8
|
+
}, L = { class: "of-mermaid__error-text" }, S = /* @__PURE__ */ p({
|
|
9
|
+
__name: "MermaidChart",
|
|
10
|
+
props: {
|
|
11
|
+
code: {},
|
|
12
|
+
theme: {},
|
|
13
|
+
width: {}
|
|
14
|
+
},
|
|
15
|
+
setup(c) {
|
|
16
|
+
const t = c;
|
|
17
|
+
let f = 0;
|
|
18
|
+
const _ = `of-mermaid-${Date.now()}-${f++}`, l = d(null), o = d(!0), a = d("");
|
|
19
|
+
async function m() {
|
|
20
|
+
var r;
|
|
21
|
+
if (!((r = t.code) != null && r.trim())) {
|
|
22
|
+
o.value = !1;
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
o.value = !0, a.value = "";
|
|
26
|
+
try {
|
|
27
|
+
let e = window.mermaid;
|
|
28
|
+
e || (e = (await import("mermaid")).default), e.initialize({
|
|
29
|
+
startOnLoad: !1,
|
|
30
|
+
theme: t.theme || "default",
|
|
31
|
+
securityLevel: "loose"
|
|
32
|
+
}), await k();
|
|
33
|
+
const { svg: v } = await e.render(_, t.code);
|
|
34
|
+
l.value && (l.value.innerHTML = v);
|
|
35
|
+
} catch (e) {
|
|
36
|
+
a.value = (e == null ? void 0 : e.message) || "图表渲染失败,请检查 Mermaid 语法";
|
|
37
|
+
} finally {
|
|
38
|
+
o.value = !1;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return h(() => m()), y(
|
|
42
|
+
() => [t.code, t.theme],
|
|
43
|
+
() => m()
|
|
44
|
+
), (r, e) => (n(), i("div", {
|
|
45
|
+
class: "of-mermaid",
|
|
46
|
+
style: g({ width: t.width || "100%" })
|
|
47
|
+
}, [
|
|
48
|
+
o.value ? (n(), i("div", M, [
|
|
49
|
+
u(r.$slots, "loading", {}, () => [
|
|
50
|
+
e[0] || (e[0] = s("span", {
|
|
51
|
+
class: "of-mermaid__spinner",
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
}, null, -1)),
|
|
54
|
+
e[1] || (e[1] = s("span", { class: "of-mermaid__loading-text" }, "图表加载中...", -1))
|
|
55
|
+
], !0)
|
|
56
|
+
])) : a.value ? (n(), i("div", C, [
|
|
57
|
+
u(r.$slots, "error", { message: a.value }, () => [
|
|
58
|
+
e[2] || (e[2] = s("span", {
|
|
59
|
+
class: "of-mermaid__error-icon",
|
|
60
|
+
"aria-hidden": "true"
|
|
61
|
+
}, "!", -1)),
|
|
62
|
+
s("span", L, w(a.value), 1)
|
|
63
|
+
], !0)
|
|
64
|
+
])) : (n(), i("div", {
|
|
65
|
+
key: 2,
|
|
66
|
+
ref_key: "containerRef",
|
|
67
|
+
ref: l,
|
|
68
|
+
class: "of-mermaid__container"
|
|
69
|
+
}, null, 512))
|
|
70
|
+
], 4));
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export {
|
|
74
|
+
S as default
|
|
75
|
+
};
|