@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 { defineComponent as h, computed as d, openBlock as s, createElementBlock as a, createElementVNode as e, toDisplayString as i, Fragment as g, normalizeStyle as v, createCommentVNode as r, renderSlot as c, createVNode as C, unref as B, renderList as P, createBlock as b } from "vue";
|
|
2
|
+
import I from "./PropPanel.vue.js";
|
|
3
|
+
import S from "./CommentItem.vue.js";
|
|
4
|
+
import $ from "../editor/ContentBlock.vue.js";
|
|
5
|
+
const E = { class: "detail-layout" }, D = { class: "detail-layout__main" }, L = { class: "detail-layout__title" }, N = { class: "detail-layout__meta" }, V = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "detail-layout__badge detail-layout__badge--role"
|
|
8
|
+
}, M = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "detail-layout__meta-text"
|
|
11
|
+
}, U = { class: "detail-layout__section" }, z = { class: "detail-layout__description" }, F = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "detail-layout__desc-placeholder"
|
|
14
|
+
}, T = { class: "detail-layout__section" }, j = { class: "detail-layout__comments" }, q = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "detail-layout__comment-list"
|
|
17
|
+
}, w = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "detail-layout__empty-hint"
|
|
20
|
+
}, A = { class: "detail-layout__sidebar" }, O = /* @__PURE__ */ h({
|
|
21
|
+
__name: "DetailLayout",
|
|
22
|
+
props: {
|
|
23
|
+
task: {},
|
|
24
|
+
comments: { default: () => [] },
|
|
25
|
+
propItems: { default: () => [] },
|
|
26
|
+
descriptionContent: { default: "" },
|
|
27
|
+
descriptionEditable: { type: Boolean, default: !1 }
|
|
28
|
+
},
|
|
29
|
+
emits: ["update:descriptionContent"],
|
|
30
|
+
setup(t, { emit: _ }) {
|
|
31
|
+
const l = t, f = _, u = d(() => ({
|
|
32
|
+
todo: { text: "var(--of-status-todo-text)", bg: "var(--of-status-todo-bg)" },
|
|
33
|
+
in_progress: {
|
|
34
|
+
text: "var(--of-status-in-progress-text)",
|
|
35
|
+
bg: "var(--of-status-in-progress-bg)"
|
|
36
|
+
},
|
|
37
|
+
blocked: { text: "var(--of-status-blocked-text)", bg: "var(--of-status-blocked-bg)" },
|
|
38
|
+
done: { text: "var(--of-status-done-text)", bg: "var(--of-status-done-bg)" }
|
|
39
|
+
})[l.task.status] ?? {
|
|
40
|
+
text: "var(--of-color-text-secondary)",
|
|
41
|
+
bg: "var(--of-color-gray-100)"
|
|
42
|
+
}), m = d(() => ({
|
|
43
|
+
P0: { text: "var(--of-priority-p0-text)", bg: "var(--of-priority-p0-bg)" },
|
|
44
|
+
P1: { text: "var(--of-priority-p1-text)", bg: "var(--of-priority-p1-bg)" },
|
|
45
|
+
P2: { text: "var(--of-priority-p2-text)", bg: "var(--of-priority-p2-bg)" },
|
|
46
|
+
P3: { text: "var(--of-priority-p3-text)", bg: "var(--of-priority-p3-bg)" }
|
|
47
|
+
})[l.task.priority] ?? {
|
|
48
|
+
text: "var(--of-color-text-secondary)",
|
|
49
|
+
bg: "var(--of-color-gray-100)"
|
|
50
|
+
}), k = d(() => ({
|
|
51
|
+
todo: "待处理",
|
|
52
|
+
in_progress: "进行中",
|
|
53
|
+
blocked: "阻塞",
|
|
54
|
+
done: "已完成"
|
|
55
|
+
})[l.task.status] ?? l.task.status), p = d(() => l.descriptionContent || l.task.description || "");
|
|
56
|
+
function x(o) {
|
|
57
|
+
f("update:descriptionContent", o);
|
|
58
|
+
}
|
|
59
|
+
return (o, n) => (s(), a("div", E, [
|
|
60
|
+
e("div", D, [
|
|
61
|
+
e("h1", L, i(t.task.title), 1),
|
|
62
|
+
e("div", N, [
|
|
63
|
+
o.$slots.meta ? r("", !0) : (s(), a(g, { key: 0 }, [
|
|
64
|
+
e("span", {
|
|
65
|
+
class: "detail-layout__badge",
|
|
66
|
+
style: v({ color: u.value.text, backgroundColor: u.value.bg })
|
|
67
|
+
}, i(k.value), 5),
|
|
68
|
+
e("span", {
|
|
69
|
+
class: "detail-layout__badge",
|
|
70
|
+
style: v({ color: m.value.text, backgroundColor: m.value.bg })
|
|
71
|
+
}, i(t.task.priority), 5),
|
|
72
|
+
t.task.role ? (s(), a("span", V, i(t.task.role), 1)) : r("", !0),
|
|
73
|
+
t.task.assignee ? (s(), a("span", M, i(t.task.assignee), 1)) : r("", !0)
|
|
74
|
+
], 64)),
|
|
75
|
+
c(o.$slots, "meta", {}, void 0, !0)
|
|
76
|
+
]),
|
|
77
|
+
e("div", U, [
|
|
78
|
+
n[0] || (n[0] = e("div", { class: "detail-layout__section-title" }, "描述", -1)),
|
|
79
|
+
e("div", z, [
|
|
80
|
+
c(o.$slots, "description", {}, () => [
|
|
81
|
+
C(B($), {
|
|
82
|
+
content: p.value,
|
|
83
|
+
editable: t.descriptionEditable,
|
|
84
|
+
"onUpdate:content": x
|
|
85
|
+
}, null, 8, ["content", "editable"]),
|
|
86
|
+
p.value ? r("", !0) : (s(), a("p", F, "暂无描述"))
|
|
87
|
+
], !0)
|
|
88
|
+
])
|
|
89
|
+
]),
|
|
90
|
+
e("div", T, [
|
|
91
|
+
n[1] || (n[1] = e("div", { class: "detail-layout__section-title" }, "活动记录", -1)),
|
|
92
|
+
e("div", j, [
|
|
93
|
+
c(o.$slots, "comments", {}, () => [
|
|
94
|
+
t.comments && t.comments.length > 0 ? (s(), a("div", q, [
|
|
95
|
+
(s(!0), a(g, null, P(t.comments, (y) => (s(), b(S, {
|
|
96
|
+
key: y.id,
|
|
97
|
+
comment: y
|
|
98
|
+
}, null, 8, ["comment"]))), 128))
|
|
99
|
+
])) : (s(), a("p", w, "暂无活动记录"))
|
|
100
|
+
], !0)
|
|
101
|
+
])
|
|
102
|
+
])
|
|
103
|
+
]),
|
|
104
|
+
e("div", A, [
|
|
105
|
+
c(o.$slots, "props", {}, () => [
|
|
106
|
+
t.propItems && t.propItems.length > 0 ? (s(), b(I, {
|
|
107
|
+
key: 0,
|
|
108
|
+
items: t.propItems,
|
|
109
|
+
title: "属性"
|
|
110
|
+
}, null, 8, ["items"])) : r("", !0)
|
|
111
|
+
], !0)
|
|
112
|
+
])
|
|
113
|
+
]));
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export {
|
|
117
|
+
O as default
|
|
118
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as d, ref as v, openBlock as o, createElementBlock as r, createElementVNode as t, normalizeClass as n, toDisplayString as _, createBlock as p, unref as f, createCommentVNode as c, withDirectives as h, Fragment as m, renderList as k, renderSlot as y, vShow as b } from "vue";
|
|
2
|
+
import { ChevronDownIcon as C } from "lucide-vue-next";
|
|
3
|
+
import g from "./PropRow.vue.js";
|
|
4
|
+
const B = { class: "prop-panel" }, w = { class: "prop-panel__title" }, x = { class: "prop-panel__body" }, D = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "prop-panel__extra"
|
|
7
|
+
}, N = /* @__PURE__ */ d({
|
|
8
|
+
__name: "PropPanel",
|
|
9
|
+
props: {
|
|
10
|
+
items: {},
|
|
11
|
+
title: { default: "属性" },
|
|
12
|
+
collapsible: { type: Boolean, default: !1 }
|
|
13
|
+
},
|
|
14
|
+
setup(l) {
|
|
15
|
+
const i = l, a = v(!1);
|
|
16
|
+
function u() {
|
|
17
|
+
i.collapsible && (a.value = !a.value);
|
|
18
|
+
}
|
|
19
|
+
return (s, P) => (o(), r("div", B, [
|
|
20
|
+
t("div", {
|
|
21
|
+
class: n(["prop-panel__header", { "prop-panel__header--collapsible": l.collapsible }]),
|
|
22
|
+
onClick: u
|
|
23
|
+
}, [
|
|
24
|
+
t("span", w, _(l.title), 1),
|
|
25
|
+
l.collapsible ? (o(), p(f(C), {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: n(["prop-panel__chevron", { "prop-panel__chevron--up": !a.value }]),
|
|
28
|
+
size: 14
|
|
29
|
+
}, null, 8, ["class"])) : c("", !0)
|
|
30
|
+
], 2),
|
|
31
|
+
h(t("div", x, [
|
|
32
|
+
(o(!0), r(m, null, k(l.items, (e) => (o(), p(g, {
|
|
33
|
+
key: e.key,
|
|
34
|
+
"prop-key": e.key,
|
|
35
|
+
value: e.value,
|
|
36
|
+
"value-color": e.valueColor,
|
|
37
|
+
"value-bg": e.valueBg,
|
|
38
|
+
"dot-color": e.dotColor
|
|
39
|
+
}, null, 8, ["prop-key", "value", "value-color", "value-bg", "dot-color"]))), 128)),
|
|
40
|
+
s.$slots.extra ? (o(), r("div", D, [
|
|
41
|
+
y(s.$slots, "extra", {}, void 0, !0)
|
|
42
|
+
])) : c("", !0)
|
|
43
|
+
], 512), [
|
|
44
|
+
[b, !a.value]
|
|
45
|
+
])
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
N as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { defineComponent as C, computed as t, openBlock as a, createElementBlock as l, createElementVNode as v, toDisplayString as p, normalizeStyle as d, createCommentVNode as f, createTextVNode as g } from "vue";
|
|
2
|
+
import { resolveBadge as u, mergeColorMap as i, DEFAULT_STATUS_MAP as M, DEFAULT_PRIORITY_MAP as b } from "../../composables/useBadge.js";
|
|
3
|
+
const k = { class: "prop-row" }, w = { class: "prop-row__key" }, x = { class: "prop-row__value-area" }, T = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "prop-row__plain-text"
|
|
6
|
+
}, P = /* @__PURE__ */ C({
|
|
7
|
+
__name: "PropRow",
|
|
8
|
+
props: {
|
|
9
|
+
propKey: {},
|
|
10
|
+
value: {},
|
|
11
|
+
type: { default: "text" },
|
|
12
|
+
statusColorMap: {},
|
|
13
|
+
priorityColorMap: {},
|
|
14
|
+
customColorMap: {},
|
|
15
|
+
valueColor: {},
|
|
16
|
+
valueBg: {},
|
|
17
|
+
dotColor: {}
|
|
18
|
+
},
|
|
19
|
+
setup(s) {
|
|
20
|
+
const e = s, n = t(() => !e.type || e.type === "date" || e.type === "text"), r = t(() => n.value ? null : e.type === "status" ? u(e.value, i(M, e.statusColorMap)) : e.type === "priority" ? u(e.value, i(b, e.priorityColorMap)) : e.type === "badge" && e.customColorMap ? u(e.value, e.customColorMap) : null), y = t(() => r.value ? r.value.style : {
|
|
21
|
+
color: e.valueColor ?? "var(--of-color-gray-700)",
|
|
22
|
+
background: e.valueBg ?? "var(--of-color-gray-100)"
|
|
23
|
+
}), _ = t(() => {
|
|
24
|
+
var o;
|
|
25
|
+
return ((o = r.value) == null ? void 0 : o.label) ?? e.value;
|
|
26
|
+
}), c = t(() => {
|
|
27
|
+
var o;
|
|
28
|
+
return ((o = r.value) == null ? void 0 : o.dot) ?? e.dotColor;
|
|
29
|
+
}), m = t(() => !!c.value);
|
|
30
|
+
return (o, h) => (a(), l("div", k, [
|
|
31
|
+
v("span", w, p(s.propKey), 1),
|
|
32
|
+
v("div", x, [
|
|
33
|
+
n.value ? (a(), l("span", T, p(s.value), 1)) : (a(), l("span", {
|
|
34
|
+
key: 1,
|
|
35
|
+
class: "prop-row__badge",
|
|
36
|
+
style: d(y.value)
|
|
37
|
+
}, [
|
|
38
|
+
m.value ? (a(), l("span", {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "prop-row__dot",
|
|
41
|
+
style: d({ backgroundColor: c.value })
|
|
42
|
+
}, null, 4)) : f("", !0),
|
|
43
|
+
g(" " + p(_.value), 1)
|
|
44
|
+
], 4))
|
|
45
|
+
])
|
|
46
|
+
]));
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export {
|
|
50
|
+
P as default
|
|
51
|
+
};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { defineComponent as k, ref as s, openBlock as o, createElementBlock as n, normalizeClass as b, withDirectives as v, withKeys as p, vModelText as _, Fragment as h, createElementVNode as x, toDisplayString as u, createCommentVNode as y } from "vue";
|
|
2
|
+
const q = ["rows"], w = { class: "block-quote__text" }, B = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "block-quote__cite"
|
|
5
|
+
}, C = /* @__PURE__ */ k({
|
|
6
|
+
__name: "BlockQuote",
|
|
7
|
+
props: {
|
|
8
|
+
content: {},
|
|
9
|
+
cite: {},
|
|
10
|
+
editable: { type: Boolean, default: !1 }
|
|
11
|
+
},
|
|
12
|
+
emits: ["update:content"],
|
|
13
|
+
setup(e, { emit: r }) {
|
|
14
|
+
const a = e, d = r, l = s(!1), t = s("");
|
|
15
|
+
function m() {
|
|
16
|
+
a.editable && (t.value = a.content, l.value = !0);
|
|
17
|
+
}
|
|
18
|
+
function c() {
|
|
19
|
+
l.value = !1, d("update:content", t.value);
|
|
20
|
+
}
|
|
21
|
+
return (E, i) => (o(), n("blockquote", {
|
|
22
|
+
class: b(["block-quote", { "block-quote--editable": e.editable }]),
|
|
23
|
+
onClick: m
|
|
24
|
+
}, [
|
|
25
|
+
l.value ? v((o(), n("textarea", {
|
|
26
|
+
key: 0,
|
|
27
|
+
"onUpdate:modelValue": i[0] || (i[0] = (f) => t.value = f),
|
|
28
|
+
class: "block-quote__textarea",
|
|
29
|
+
rows: Math.max(2, t.value.split(`
|
|
30
|
+
`).length),
|
|
31
|
+
autofocus: "",
|
|
32
|
+
onBlur: c,
|
|
33
|
+
onKeydown: p(c, ["escape"])
|
|
34
|
+
}, null, 40, q)), [
|
|
35
|
+
[_, t.value]
|
|
36
|
+
]) : (o(), n(h, { key: 1 }, [
|
|
37
|
+
x("p", w, u(e.content), 1),
|
|
38
|
+
e.cite ? (o(), n("footer", B, "— " + u(e.cite), 1)) : y("", !0)
|
|
39
|
+
], 64))
|
|
40
|
+
], 2));
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
export {
|
|
44
|
+
C as default
|
|
45
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { defineComponent as r, ref as _, openBlock as t, createElementBlock as l, createElementVNode as o, toDisplayString as a, normalizeClass as u, createBlock as s, unref as n, createCommentVNode as p } from "vue";
|
|
2
|
+
import { CheckIcon as k, CopyIcon as b } from "lucide-vue-next";
|
|
3
|
+
const y = { class: "code-block" }, f = { class: "code-block__header" }, h = { class: "code-block__lang" }, m = ["title"], v = { class: "code-block__copy-label" }, C = { class: "code-block__pre" }, g = { class: "code-block__code" }, E = /* @__PURE__ */ r({
|
|
4
|
+
__name: "CodeBlock",
|
|
5
|
+
props: {
|
|
6
|
+
code: {},
|
|
7
|
+
language: { default: "bash" },
|
|
8
|
+
copyable: { type: Boolean, default: !0 }
|
|
9
|
+
},
|
|
10
|
+
setup(c) {
|
|
11
|
+
const d = c, e = _(!1);
|
|
12
|
+
async function i() {
|
|
13
|
+
if (!e.value)
|
|
14
|
+
try {
|
|
15
|
+
await navigator.clipboard.writeText(d.code), e.value = !0, setTimeout(() => {
|
|
16
|
+
e.value = !1;
|
|
17
|
+
}, 2e3);
|
|
18
|
+
} catch {
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return (B, x) => (t(), l("div", y, [
|
|
22
|
+
o("div", f, [
|
|
23
|
+
o("span", h, a(c.language), 1),
|
|
24
|
+
c.copyable ? (t(), l("button", {
|
|
25
|
+
key: 0,
|
|
26
|
+
class: u(["code-block__copy-btn", { "code-block__copy-btn--copied": e.value }]),
|
|
27
|
+
title: e.value ? "已复制" : "复制代码",
|
|
28
|
+
onClick: i
|
|
29
|
+
}, [
|
|
30
|
+
e.value ? (t(), s(n(k), {
|
|
31
|
+
key: 0,
|
|
32
|
+
size: 13
|
|
33
|
+
})) : (t(), s(n(b), {
|
|
34
|
+
key: 1,
|
|
35
|
+
size: 13
|
|
36
|
+
})),
|
|
37
|
+
o("span", v, a(e.value ? "已复制" : "复制"), 1)
|
|
38
|
+
], 10, m)) : p("", !0)
|
|
39
|
+
]),
|
|
40
|
+
o("pre", C, [
|
|
41
|
+
o("code", g, a(c.code), 1)
|
|
42
|
+
])
|
|
43
|
+
]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export {
|
|
47
|
+
E as default
|
|
48
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { defineComponent as b, ref as d, computed as h, openBlock as t, createElementBlock as n, normalizeClass as _, withDirectives as y, withKeys as g, vModelText as w, renderSlot as x, Fragment as B, renderList as C, toDisplayString as p, createCommentVNode as E } from "vue";
|
|
2
|
+
const V = ["rows"], D = {
|
|
3
|
+
key: 0,
|
|
4
|
+
class: "content-block__placeholder"
|
|
5
|
+
}, M = /* @__PURE__ */ b({
|
|
6
|
+
__name: "ContentBlock",
|
|
7
|
+
props: {
|
|
8
|
+
content: {},
|
|
9
|
+
editable: { type: Boolean, default: !1 }
|
|
10
|
+
},
|
|
11
|
+
emits: ["update:content"],
|
|
12
|
+
setup(l, { emit: f }) {
|
|
13
|
+
const o = l, m = f, a = d(!1), e = d("");
|
|
14
|
+
function k() {
|
|
15
|
+
o.editable && (e.value = o.content ?? "", a.value = !0);
|
|
16
|
+
}
|
|
17
|
+
function c() {
|
|
18
|
+
a.value = !1, m("update:content", e.value);
|
|
19
|
+
}
|
|
20
|
+
const i = h(() => o.content ? o.content.split(`
|
|
21
|
+
`).filter((s) => s.trim().length > 0) : []);
|
|
22
|
+
return (s, u) => (t(), n("div", {
|
|
23
|
+
class: _(["content-block", { "content-block--editable": l.editable }]),
|
|
24
|
+
onClick: k
|
|
25
|
+
}, [
|
|
26
|
+
a.value ? y((t(), n("textarea", {
|
|
27
|
+
key: 0,
|
|
28
|
+
"onUpdate:modelValue": u[0] || (u[0] = (r) => e.value = r),
|
|
29
|
+
class: "content-block__textarea",
|
|
30
|
+
rows: Math.max(3, e.value.split(`
|
|
31
|
+
`).length),
|
|
32
|
+
autofocus: "",
|
|
33
|
+
onBlur: c,
|
|
34
|
+
onKeydown: g(c, ["escape"])
|
|
35
|
+
}, null, 40, V)), [
|
|
36
|
+
[w, e.value]
|
|
37
|
+
]) : x(s.$slots, "default", { key: 1 }, () => [
|
|
38
|
+
(t(!0), n(B, null, C(i.value, (r, v) => (t(), n("p", {
|
|
39
|
+
key: v,
|
|
40
|
+
class: "content-block__para"
|
|
41
|
+
}, p(r), 1))), 128)),
|
|
42
|
+
i.value.length === 0 ? (t(), n("span", D, p(l.editable ? "点击编辑内容..." : ""), 1)) : E("", !0)
|
|
43
|
+
], !0)
|
|
44
|
+
], 2));
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
export {
|
|
48
|
+
M as default
|
|
49
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { defineComponent as i, computed as m, openBlock as n, createBlock as o, resolveDynamicComponent as s, withCtx as d, createTextVNode as h, toDisplayString as k, unref as u, createCommentVNode as p } from "vue";
|
|
2
|
+
import { ExternalLinkIcon as C } from "lucide-vue-next";
|
|
3
|
+
const y = /* @__PURE__ */ i({
|
|
4
|
+
__name: "RefLink",
|
|
5
|
+
props: {
|
|
6
|
+
refId: {},
|
|
7
|
+
label: {},
|
|
8
|
+
href: {}
|
|
9
|
+
},
|
|
10
|
+
emits: ["click"],
|
|
11
|
+
setup(e, { emit: l }) {
|
|
12
|
+
const r = e, a = l, c = m(() => r.label ?? r.refId);
|
|
13
|
+
function f(t) {
|
|
14
|
+
r.href || t.preventDefault(), a("click", r.refId);
|
|
15
|
+
}
|
|
16
|
+
return (t, v) => (n(), o(s(e.href ? "a" : "span"), {
|
|
17
|
+
class: "ref-link",
|
|
18
|
+
href: e.href,
|
|
19
|
+
target: e.href ? "_blank" : void 0,
|
|
20
|
+
rel: e.href ? "noopener noreferrer" : void 0,
|
|
21
|
+
onClick: f
|
|
22
|
+
}, {
|
|
23
|
+
default: d(() => [
|
|
24
|
+
h(k(c.value) + " ", 1),
|
|
25
|
+
e.href ? (n(), o(u(C), {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "ref-link__icon",
|
|
28
|
+
size: 10
|
|
29
|
+
})) : p("", !0)
|
|
30
|
+
]),
|
|
31
|
+
_: 1
|
|
32
|
+
}, 8, ["href", "target", "rel"]));
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
export {
|
|
36
|
+
y as default
|
|
37
|
+
};
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { defineComponent as E, ref as d, watch as T, computed as B, openBlock as H, createElementBlock as L, normalizeStyle as M, normalizeClass as R, createElementVNode as o, createVNode as b, unref as S, withCtx as h, withDirectives as _, vModelText as k } from "vue";
|
|
2
|
+
import { QuillEditor as q } from "@vueup/vue-quill";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import z from "../overlay/Modal.vue.js";
|
|
5
|
+
import { useToast as N } from "../../composables/useToast.js";
|
|
6
|
+
const Q = { class: "of-rich-editor__toolbar-actions" }, $ = ["disabled"], D = ["disabled"], I = { class: "of-rich-editor__form" }, J = /* @__PURE__ */ E({
|
|
7
|
+
__name: "RichTextEditor",
|
|
8
|
+
props: {
|
|
9
|
+
modelValue: { default: "" },
|
|
10
|
+
placeholder: { default: "请输入内容..." },
|
|
11
|
+
editable: { type: Boolean, default: !0 },
|
|
12
|
+
minHeight: { default: 220 }
|
|
13
|
+
},
|
|
14
|
+
emits: ["update:modelValue", "change", "save"],
|
|
15
|
+
setup(c, { emit: x }) {
|
|
16
|
+
const f = c, m = x, y = N(), n = d(f.modelValue), a = d(!1), i = d(""), s = d(""), p = d(null), V = {
|
|
17
|
+
toolbar: {
|
|
18
|
+
container: [
|
|
19
|
+
["bold", "italic", "underline", "strike"],
|
|
20
|
+
[{ header: [1, 2, 3, !1] }],
|
|
21
|
+
[{ list: "ordered" }, { list: "bullet" }],
|
|
22
|
+
[{ align: [] }],
|
|
23
|
+
["blockquote", "code-block"],
|
|
24
|
+
["link", "image"],
|
|
25
|
+
["clean"]
|
|
26
|
+
]
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
T(
|
|
30
|
+
() => f.modelValue,
|
|
31
|
+
(t) => {
|
|
32
|
+
t !== n.value && (n.value = t);
|
|
33
|
+
}
|
|
34
|
+
);
|
|
35
|
+
const r = B(() => f.editable);
|
|
36
|
+
function g(t) {
|
|
37
|
+
n.value = t, m("update:modelValue", t), m("change", t);
|
|
38
|
+
}
|
|
39
|
+
function C() {
|
|
40
|
+
var u, v;
|
|
41
|
+
const t = (v = (u = p.value) == null ? void 0 : u.getQuill) == null ? void 0 : v.call(u);
|
|
42
|
+
if (!t) return;
|
|
43
|
+
const e = t.getSelection(!0), l = (s.value || "").trim();
|
|
44
|
+
l && (i.value.trim() ? (t.insertText(e.index, i.value.trim(), "link", l), t.setSelection(e.index + i.value.trim().length, 0)) : t.format("link", l), a.value = !1, i.value = "", s.value = "");
|
|
45
|
+
}
|
|
46
|
+
function U() {
|
|
47
|
+
r.value && (a.value = !0);
|
|
48
|
+
}
|
|
49
|
+
function w() {
|
|
50
|
+
m("save", n.value || ""), y.success("内容已保存");
|
|
51
|
+
}
|
|
52
|
+
return (t, e) => (H(), L("div", {
|
|
53
|
+
class: R(["of-rich-editor", { "is-readonly": !r.value }]),
|
|
54
|
+
style: M({ "--of-rich-editor-min-height": `${c.minHeight}px` })
|
|
55
|
+
}, [
|
|
56
|
+
o("div", Q, [
|
|
57
|
+
o("button", {
|
|
58
|
+
type: "button",
|
|
59
|
+
class: "of-rich-editor__btn",
|
|
60
|
+
disabled: !r.value,
|
|
61
|
+
onClick: U
|
|
62
|
+
}, " 插入链接 ", 8, $),
|
|
63
|
+
o("button", {
|
|
64
|
+
type: "button",
|
|
65
|
+
class: "of-rich-editor__btn of-rich-editor__btn--primary",
|
|
66
|
+
disabled: !r.value,
|
|
67
|
+
onClick: w
|
|
68
|
+
}, " 保存 ", 8, D)
|
|
69
|
+
]),
|
|
70
|
+
b(S(q), {
|
|
71
|
+
ref_key: "editorRef",
|
|
72
|
+
ref: p,
|
|
73
|
+
theme: "snow",
|
|
74
|
+
"content-type": "html",
|
|
75
|
+
content: n.value,
|
|
76
|
+
options: { readOnly: !r.value, placeholder: c.placeholder, modules: V },
|
|
77
|
+
"onUpdate:content": g
|
|
78
|
+
}, null, 8, ["content", "options"]),
|
|
79
|
+
b(z, {
|
|
80
|
+
modelValue: a.value,
|
|
81
|
+
"onUpdate:modelValue": e[3] || (e[3] = (l) => a.value = l),
|
|
82
|
+
title: "插入链接",
|
|
83
|
+
width: "480px"
|
|
84
|
+
}, {
|
|
85
|
+
footer: h(() => [
|
|
86
|
+
o("button", {
|
|
87
|
+
type: "button",
|
|
88
|
+
class: "of-rich-editor__btn",
|
|
89
|
+
onClick: e[2] || (e[2] = (l) => a.value = !1)
|
|
90
|
+
}, " 取消 "),
|
|
91
|
+
o("button", {
|
|
92
|
+
type: "button",
|
|
93
|
+
class: "of-rich-editor__btn of-rich-editor__btn--primary",
|
|
94
|
+
onClick: C
|
|
95
|
+
}, " 确认 ")
|
|
96
|
+
]),
|
|
97
|
+
default: h(() => [
|
|
98
|
+
o("div", I, [
|
|
99
|
+
e[4] || (e[4] = o("label", {
|
|
100
|
+
class: "of-rich-editor__label",
|
|
101
|
+
for: "link-text"
|
|
102
|
+
}, "链接文本", -1)),
|
|
103
|
+
_(o("input", {
|
|
104
|
+
id: "link-text",
|
|
105
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => i.value = l),
|
|
106
|
+
class: "of-rich-editor__input",
|
|
107
|
+
placeholder: "请输入链接文本"
|
|
108
|
+
}, null, 512), [
|
|
109
|
+
[k, i.value]
|
|
110
|
+
]),
|
|
111
|
+
e[5] || (e[5] = o("label", {
|
|
112
|
+
class: "of-rich-editor__label",
|
|
113
|
+
for: "link-url"
|
|
114
|
+
}, "链接地址", -1)),
|
|
115
|
+
_(o("input", {
|
|
116
|
+
id: "link-url",
|
|
117
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => s.value = l),
|
|
118
|
+
class: "of-rich-editor__input",
|
|
119
|
+
placeholder: "https://example.com"
|
|
120
|
+
}, null, 512), [
|
|
121
|
+
[k, s.value]
|
|
122
|
+
])
|
|
123
|
+
])
|
|
124
|
+
]),
|
|
125
|
+
_: 1
|
|
126
|
+
}, 8, ["modelValue"])
|
|
127
|
+
], 6));
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
export {
|
|
131
|
+
J as default
|
|
132
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CellValue, FieldDef } from '../table/FieldCell.vue';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
value?: CellValue;
|
|
4
|
+
field: FieldDef;
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
7
|
+
cancel: () => any;
|
|
8
|
+
commit: (value: CellValue) => any;
|
|
9
|
+
tabNext: () => any;
|
|
10
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
|
+
onCancel?: (() => any) | undefined;
|
|
12
|
+
onCommit?: ((value: CellValue) => any) | undefined;
|
|
13
|
+
onTabNext?: (() => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
15
|
+
fileInputRef: HTMLInputElement;
|
|
16
|
+
}, HTMLDivElement>;
|
|
17
|
+
export default _default;
|