@oneflowui/ui 0.4.2 → 0.4.3

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.
Files changed (233) hide show
  1. package/dist/_virtual/_commonjsHelpers.js +6 -0
  2. package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
  3. package/dist/components/ContextMenu/index.vue.js +7 -0
  4. package/dist/components/ContextMenu/index.vue2.js +91 -0
  5. package/dist/components/Dashboard/charts/BarChart.vue.js +7 -0
  6. package/dist/components/Dashboard/charts/BarChart.vue2.js +43 -0
  7. package/dist/components/Dashboard/charts/DoughnutChart.vue.js +23 -0
  8. package/dist/components/Dashboard/charts/DoughnutChart.vue2.js +4 -0
  9. package/dist/components/Dashboard/charts/NumberCard.vue.js +7 -0
  10. package/dist/components/Dashboard/charts/NumberCard.vue2.js +41 -0
  11. package/dist/components/Dashboard/charts/PieChart.vue.js +7 -0
  12. package/dist/components/Dashboard/charts/PieChart.vue2.js +53 -0
  13. package/dist/components/Dashboard/charts/TableChart.vue.js +7 -0
  14. package/dist/components/Dashboard/charts/TableChart.vue2.js +50 -0
  15. package/dist/components/Dashboard/index.vue.js +7 -0
  16. package/dist/components/Dashboard/index.vue2.js +104 -0
  17. package/dist/components/ai/AiMessageBubble.vue.js +7 -0
  18. package/dist/components/ai/AiMessageBubble.vue2.js +47 -0
  19. package/dist/components/ai/AiMessageList.vue.js +7 -0
  20. package/dist/components/ai/AiMessageList.vue2.js +78 -0
  21. package/dist/components/ai/AiSender.vue.js +7 -0
  22. package/dist/components/ai/AiSender.vue2.js +86 -0
  23. package/dist/components/ai/AiStreamingCursor.vue.js +7 -0
  24. package/dist/components/ai/AiStreamingCursor.vue2.js +16 -0
  25. package/dist/components/ai/AiThinking.vue.js +7 -0
  26. package/dist/components/ai/AiThinking.vue2.js +19 -0
  27. package/dist/components/ai/UserMessageBubble.vue.js +7 -0
  28. package/dist/components/ai/UserMessageBubble.vue2.js +34 -0
  29. package/dist/components/auxiliary/ColorPanel.vue.js +7 -0
  30. package/dist/components/auxiliary/ColorPanel.vue2.js +65 -0
  31. package/dist/components/auxiliary/FileUpload.vue.js +7 -0
  32. package/dist/components/auxiliary/FileUpload.vue2.js +90 -0
  33. package/dist/components/auxiliary/PersonPanel.vue.js +7 -0
  34. package/dist/components/auxiliary/PersonPanel.vue2.js +66 -0
  35. package/dist/components/base/Accordion.vue.js +7 -0
  36. package/dist/components/base/Accordion.vue2.js +78 -0
  37. package/dist/components/base/AddViewBtn.vue.js +7 -0
  38. package/dist/components/base/AddViewBtn.vue2.js +25 -0
  39. package/dist/components/base/Avatar.vue.js +7 -0
  40. package/dist/components/base/Avatar.vue2.js +72 -0
  41. package/dist/components/base/Badge.vue.js +7 -0
  42. package/dist/components/base/Badge.vue2.js +70 -0
  43. package/dist/components/base/ButtonGroup.vue.js +7 -0
  44. package/dist/components/base/ButtonGroup.vue2.js +40 -0
  45. package/dist/components/base/ChainItem.vue.js +7 -0
  46. package/dist/components/base/ChainItem.vue2.js +68 -0
  47. package/dist/components/base/DescBlock.vue.js +7 -0
  48. package/dist/components/base/DescBlock.vue2.js +13 -0
  49. package/dist/components/base/DropdownMenu.vue.js +7 -0
  50. package/dist/components/base/DropdownMenu.vue2.js +92 -0
  51. package/dist/components/base/EmptyState.vue.js +7 -0
  52. package/dist/components/base/EmptyState.vue2.js +38 -0
  53. package/dist/components/base/InfoCard.vue.js +7 -0
  54. package/dist/components/base/InfoCard.vue2.js +167 -0
  55. package/dist/components/base/MonitorItem.vue.js +7 -0
  56. package/dist/components/base/MonitorItem.vue2.js +56 -0
  57. package/dist/components/base/PersonaCard.vue.js +7 -0
  58. package/dist/components/base/PersonaCard.vue2.js +173 -0
  59. package/dist/components/base/ProgressBar.vue.js +7 -0
  60. package/dist/components/base/ProgressBar.vue2.js +49 -0
  61. package/dist/components/base/RangeSlider.vue.js +7 -0
  62. package/dist/components/base/RangeSlider.vue2.js +35 -0
  63. package/dist/components/base/RefTag.vue.js +7 -0
  64. package/dist/components/base/RefTag.vue2.js +52 -0
  65. package/dist/components/base/SectionBlock.vue.js +7 -0
  66. package/dist/components/base/SectionBlock.vue2.js +115 -0
  67. package/dist/components/base/SelectBadge.vue.js +7 -0
  68. package/dist/components/base/SelectBadge.vue2.js +81 -0
  69. package/dist/components/base/StatisticCard.vue.js +7 -0
  70. package/dist/components/base/StatisticCard.vue2.js +57 -0
  71. package/dist/components/base/StatusIndicator.vue.js +7 -0
  72. package/dist/components/base/StatusIndicator.vue2.js +54 -0
  73. package/dist/components/base/StatusSummary.vue.js +7 -0
  74. package/dist/components/base/StatusSummary.vue2.js +64 -0
  75. package/dist/components/base/Stepper.vue.js +7 -0
  76. package/dist/components/base/Stepper.vue2.js +70 -0
  77. package/dist/components/base/Switch.vue.js +7 -0
  78. package/dist/components/base/Switch.vue2.js +43 -0
  79. package/dist/components/base/ToolbarBtn.vue.js +7 -0
  80. package/dist/components/base/ToolbarBtn.vue2.js +30 -0
  81. package/dist/components/base/ViewModeGroup.vue.js +7 -0
  82. package/dist/components/base/ViewModeGroup.vue2.js +32 -0
  83. package/dist/components/base/ViewSwitcher.vue.js +7 -0
  84. package/dist/components/base/ViewSwitcher.vue2.js +73 -0
  85. package/dist/components/base/ViewTab.vue.js +7 -0
  86. package/dist/components/base/ViewTab.vue2.js +42 -0
  87. package/dist/components/breadcrumb/Breadcrumb.vue.js +7 -0
  88. package/dist/components/breadcrumb/Breadcrumb.vue2.js +52 -0
  89. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +7 -0
  90. package/dist/components/breadcrumb/BreadcrumbItem.vue2.js +35 -0
  91. package/dist/components/detail/CommentItem.vue.js +7 -0
  92. package/dist/components/detail/CommentItem.vue2.js +29 -0
  93. package/dist/components/detail/DetailLayout.vue.js +7 -0
  94. package/dist/components/detail/DetailLayout.vue2.js +118 -0
  95. package/dist/components/detail/PropPanel.vue.js +7 -0
  96. package/dist/components/detail/PropPanel.vue2.js +51 -0
  97. package/dist/components/detail/PropRow.vue.js +7 -0
  98. package/dist/components/detail/PropRow.vue2.js +51 -0
  99. package/dist/components/editor/BlockQuote.vue.js +7 -0
  100. package/dist/components/editor/BlockQuote.vue2.js +45 -0
  101. package/dist/components/editor/CodeBlock.vue.js +7 -0
  102. package/dist/components/editor/CodeBlock.vue2.js +48 -0
  103. package/dist/components/editor/ContentBlock.vue.js +7 -0
  104. package/dist/components/editor/ContentBlock.vue2.js +49 -0
  105. package/dist/components/editor/RefLink.vue.js +7 -0
  106. package/dist/components/editor/RefLink.vue2.js +37 -0
  107. package/dist/components/editor/RichTextEditor.vue.js +7 -0
  108. package/dist/components/editor/RichTextEditor.vue2.js +132 -0
  109. package/dist/components/field/FieldCheckbox.vue.js +7 -0
  110. package/dist/{FieldCheckbox-CV3QtQ4Y.js → components/field/FieldCheckbox.vue2.js} +8 -9
  111. package/dist/components/field/FieldDate.vue.js +7 -0
  112. package/dist/{FieldDate-Bljx4jb7.js → components/field/FieldDate.vue2.js} +9 -10
  113. package/dist/components/field/FieldDatetime.vue.js +7 -0
  114. package/dist/{FieldDatetime-B52GfWrK.js → components/field/FieldDatetime.vue2.js} +11 -12
  115. package/dist/components/field/FieldEmail.vue.js +7 -0
  116. package/dist/{FieldEmail-UREMoue-.js → components/field/FieldEmail.vue2.js} +12 -13
  117. package/dist/components/field/FieldMultiSelect.vue.js +7 -0
  118. package/dist/{FieldMultiSelect-Dlay1Fop.js → components/field/FieldMultiSelect.vue2.js} +32 -33
  119. package/dist/components/field/FieldNumber.vue.js +7 -0
  120. package/dist/{FieldNumber-BjhfFhs6.js → components/field/FieldNumber.vue2.js} +8 -9
  121. package/dist/components/field/FieldRating.vue.js +7 -0
  122. package/dist/components/field/FieldRating.vue2.js +31 -0
  123. package/dist/components/field/FieldSelect.vue.js +7 -0
  124. package/dist/{FieldSelect-B39Ad8VH.js → components/field/FieldSelect.vue2.js} +34 -35
  125. package/dist/components/field/FieldText.vue.js +7 -0
  126. package/dist/{FieldText-Ry7f72Ug.js → components/field/FieldText.vue2.js} +13 -14
  127. package/dist/components/field/FieldUrl.vue.js +7 -0
  128. package/dist/components/field/FieldUrl.vue2.js +33 -0
  129. package/dist/components/form/FormDesigner.vue.js +7 -0
  130. package/dist/components/form/FormDesigner.vue2.js +245 -0
  131. package/dist/components/gallery/GalleryCard.vue.js +7 -0
  132. package/dist/components/gallery/GalleryCard.vue2.js +87 -0
  133. package/dist/components/gallery/GalleryView.vue.js +7 -0
  134. package/dist/components/gallery/GalleryView.vue2.js +48 -0
  135. package/dist/components/kanban/KanbanBoard.vue.js +7 -0
  136. package/dist/components/kanban/KanbanBoard.vue2.js +86 -0
  137. package/dist/components/kanban/KanbanCard.vue.js +7 -0
  138. package/dist/components/kanban/KanbanCard.vue2.js +56 -0
  139. package/dist/components/kanban/KanbanColumn.vue.js +7 -0
  140. package/dist/components/kanban/KanbanColumn.vue2.js +103 -0
  141. package/dist/components/kanban/QuickAddRow.vue.js +7 -0
  142. package/dist/components/kanban/QuickAddRow.vue2.js +58 -0
  143. package/dist/components/layout/AppLayout.vue.js +7 -0
  144. package/dist/components/layout/AppLayout.vue2.js +98 -0
  145. package/dist/components/layout/Navbar.vue.js +7 -0
  146. package/dist/components/layout/Navbar.vue2.js +70 -0
  147. package/dist/components/layout/Sidebar.vue.js +7 -0
  148. package/dist/components/layout/Sidebar.vue2.js +88 -0
  149. package/dist/components/layout/StatusBar.vue.js +7 -0
  150. package/dist/components/layout/StatusBar.vue2.js +37 -0
  151. package/dist/components/mermaid/MermaidChart.vue.js +7 -0
  152. package/dist/components/mermaid/MermaidChart.vue2.js +75 -0
  153. package/dist/components/overlay/Dialog.vue.js +7 -0
  154. package/dist/components/overlay/Dialog.vue2.js +89 -0
  155. package/dist/components/overlay/Drawer.vue.js +7 -0
  156. package/dist/components/overlay/Drawer.vue2.js +112 -0
  157. package/dist/components/overlay/Modal.vue.js +7 -0
  158. package/dist/components/overlay/Modal.vue2.js +115 -0
  159. package/dist/components/overlay/SidePanel.vue.js +7 -0
  160. package/dist/components/overlay/SidePanel.vue2.js +137 -0
  161. package/dist/components/split/SplitPane.vue.js +8 -0
  162. package/dist/components/split/SplitPane.vue2.js +68 -0
  163. package/dist/components/table/DataTable.vue.js +7 -0
  164. package/dist/components/table/DataTable.vue2.js +234 -0
  165. package/dist/components/table/FieldCell.vue.js +7 -0
  166. package/dist/components/table/FieldCell.vue2.js +71 -0
  167. package/dist/components/table/NewRowBtn.vue.js +7 -0
  168. package/dist/components/table/NewRowBtn.vue2.js +22 -0
  169. package/dist/components/table/TableColumnManager.vue.js +7 -0
  170. package/dist/components/table/TableColumnManager.vue2.js +100 -0
  171. package/dist/components/table/TableDataRow.vue.js +7 -0
  172. package/dist/components/table/TableDataRow.vue2.js +115 -0
  173. package/dist/components/table/TableFilterPanel.vue.js +7 -0
  174. package/dist/components/table/TableFilterPanel.vue2.js +142 -0
  175. package/dist/components/table/TableGroupRow.vue.js +7 -0
  176. package/dist/components/table/TableGroupRow.vue2.js +48 -0
  177. package/dist/components/table/TableHeaderRow.vue.js +7 -0
  178. package/dist/components/table/TableHeaderRow.vue2.js +69 -0
  179. package/dist/components/tabs/TabPanel.vue.js +7 -0
  180. package/dist/components/tabs/TabPanel.vue2.js +26 -0
  181. package/dist/components/tabs/Tabs.vue.js +7 -0
  182. package/dist/components/tabs/Tabs.vue2.js +87 -0
  183. package/dist/components/timeline/ActivityTimeline.vue.js +7 -0
  184. package/dist/components/timeline/ActivityTimeline.vue2.js +104 -0
  185. package/dist/components/timeline/GanttRow.vue.js +7 -0
  186. package/dist/components/timeline/GanttRow.vue2.js +110 -0
  187. package/dist/components/timeline/GanttTimeline.vue.js +7 -0
  188. package/dist/components/timeline/GanttTimeline.vue2.js +185 -0
  189. package/dist/components/toast/ToastContainer.vue.js +34 -0
  190. package/dist/components/toast/ToastContainer.vue3.js +5 -0
  191. package/dist/components/toast/ToastItem.vue.js +7 -0
  192. package/dist/components/toast/ToastItem.vue2.js +78 -0
  193. package/dist/composables/useAiChat.js +103 -0
  194. package/dist/composables/useBadge.js +76 -0
  195. package/dist/composables/useBreakpoint.js +16 -0
  196. package/dist/composables/useInlineEdit.js +28 -0
  197. package/dist/composables/useMarkdown.js +69 -0
  198. package/dist/composables/useStream.js +80 -0
  199. package/dist/composables/useTable.js +115 -0
  200. package/dist/composables/useTableColumns.js +24 -0
  201. package/dist/composables/useTableData.js +16 -0
  202. package/dist/composables/useTableFilter.js +97 -0
  203. package/dist/composables/useTableGroup.js +46 -0
  204. package/dist/composables/useToast.js +38 -0
  205. package/dist/composables/useTypewriter.js +56 -0
  206. package/dist/composables/useVirtualList.js +117 -0
  207. package/dist/constants/table.js +11 -0
  208. package/dist/index.js +301 -0
  209. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/core.js +5 -0
  210. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/bash.js +377 -0
  211. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/css.js +923 -0
  212. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/go.js +151 -0
  213. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/java.js +240 -0
  214. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/javascript.js +658 -0
  215. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/json.js +38 -0
  216. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/markdown.js +216 -0
  217. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/plaintext.js +13 -0
  218. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/python.js +399 -0
  219. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/rust.js +305 -0
  220. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/sql.js +615 -0
  221. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/typescript.js +753 -0
  222. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/xml.js +219 -0
  223. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/es/languages/yaml.js +183 -0
  224. package/dist/node_modules/.pnpm/highlight.js@11.11.1/node_modules/highlight.js/lib/core.js +1063 -0
  225. package/dist/style.css +1 -1
  226. package/dist/types/index.js +77 -0
  227. package/dist/utils/icon.js +15 -0
  228. package/package.json +13 -6
  229. package/dist/FieldRating-BKHUu-A1.js +0 -32
  230. package/dist/FieldUrl-bv0EB9sh.js +0 -34
  231. package/dist/index-DQph5iTq.js +0 -12936
  232. package/dist/oneflow-ui.js +0 -111
  233. 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,7 @@
1
+ import o from "./PropPanel.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7cd73233"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -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,7 @@
1
+ import o from "./PropRow.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-bb8aff62"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -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,7 @@
1
+ import o from "./BlockQuote.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-31b9dc83"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -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,7 @@
1
+ import o from "./CodeBlock.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d72fbc6"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -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,7 @@
1
+ import o from "./ContentBlock.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-0c62a5ac"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -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,7 @@
1
+ import o from "./RefLink.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f83e73bd"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -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,7 @@
1
+ import o from "./RichTextEditor.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-7d0c88f1"]]);
5
+ export {
6
+ i as default
7
+ };
@@ -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,7 @@
1
+ import o from "./FieldCheckbox.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-85298790"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -1,5 +1,4 @@
1
- import { defineComponent as s, computed as f, openBlock as p, createElementBlock as r, withModifiers as d, createElementVNode as m, toDisplayString as _ } from "vue";
2
- import { _ as u } from "./index-DQph5iTq.js";
1
+ import { defineComponent as s, computed as f, openBlock as p, createElementBlock as r, withModifiers as m, createElementVNode as d, toDisplayString as u } from "vue";
3
2
  const k = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
4
3
  __name: "FieldCheckbox",
5
4
  props: {
@@ -7,24 +6,24 @@ const k = { class: "of-field-checkbox__icon" }, x = /* @__PURE__ */ s({
7
6
  field: {}
8
7
  },
9
8
  emits: ["commit", "cancel", "tabNext"],
10
- setup(n, { emit: a }) {
11
- const i = n, t = a, o = f(() => !!i.value);
9
+ setup(n, { emit: i }) {
10
+ const a = n, t = i, o = f(() => !!a.value);
12
11
  function c() {
13
12
  t("commit", !o.value);
14
13
  }
15
14
  function l(e) {
16
15
  (e.key === "Enter" || e.key === " ") && (e.preventDefault(), c()), e.key === "Escape" && (e.preventDefault(), t("cancel")), e.key === "Tab" && (e.preventDefault(), t("tabNext"));
17
16
  }
18
- return (e, v) => (p(), r("div", {
17
+ return (e, _) => (p(), r("div", {
19
18
  class: "of-field-checkbox",
20
19
  tabindex: "0",
21
- onClick: d(c, ["stop"]),
20
+ onClick: m(c, ["stop"]),
22
21
  onKeydown: l
23
22
  }, [
24
- m("span", k, _(o.value ? "☑" : "☐"), 1)
23
+ d("span", k, u(o.value ? "☑" : "☐"), 1)
25
24
  ], 32));
26
25
  }
27
- }), y = /* @__PURE__ */ u(x, [["__scopeId", "data-v-85298790"]]);
26
+ });
28
27
  export {
29
- y as default
28
+ x as default
30
29
  };
@@ -0,0 +1,7 @@
1
+ import o from "./FieldDate.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e0c4ed7c"]]);
5
+ export {
6
+ c as default
7
+ };