@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,6 @@
1
+ function e(t) {
2
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
3
+ }
4
+ export {
5
+ e as getDefaultExportFromCjs
6
+ };
@@ -0,0 +1,9 @@
1
+ const s = (t, e) => {
2
+ const o = t.__vccOpts || t;
3
+ for (const [r, c] of e)
4
+ o[r] = c;
5
+ return o;
6
+ };
7
+ export {
8
+ s as default
9
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./index.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e1a1d45d"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,91 @@
1
+ import { defineComponent as x, ref as h, computed as w, watch as g, onBeforeUnmount as E, openBlock as t, createBlock as L, Teleport as C, createElementBlock as o, withModifiers as B, normalizeStyle as D, Fragment as p, renderList as M, normalizeClass as S, toDisplayString as y, createCommentVNode as a, createElementVNode as $ } from "vue";
2
+ const z = {
3
+ key: 0,
4
+ class: "of-context-menu__sep"
5
+ }, N = ["disabled", "onClick"], R = {
6
+ key: 0,
7
+ class: "of-context-menu__icon"
8
+ }, V = { class: "of-context-menu__label" }, F = {
9
+ key: 1,
10
+ class: "of-context-menu__submenu-indicator"
11
+ }, U = /* @__PURE__ */ x({
12
+ name: "ContextMenu",
13
+ __name: "index",
14
+ props: {
15
+ x: {},
16
+ y: {},
17
+ items: {},
18
+ visible: { type: Boolean, default: !0 }
19
+ },
20
+ emits: ["select", "close"],
21
+ setup(l, { emit: _ }) {
22
+ const i = l, c = _, r = h(null), k = w(() => ({
23
+ position: "fixed",
24
+ left: `${i.x}px`,
25
+ top: `${i.y}px`
26
+ }));
27
+ function b(e) {
28
+ e.disabled || e.separator || (c("select", e.key), c("close"));
29
+ }
30
+ function d(e) {
31
+ const s = e.target;
32
+ r.value && s && !r.value.contains(s) && c("close");
33
+ }
34
+ function u(e) {
35
+ e.key === "Escape" && c("close");
36
+ }
37
+ function v() {
38
+ document.addEventListener("mousedown", d), document.addEventListener("keydown", u);
39
+ }
40
+ function m() {
41
+ document.removeEventListener("mousedown", d), document.removeEventListener("keydown", u);
42
+ }
43
+ return g(
44
+ () => i.visible,
45
+ (e) => {
46
+ if (e) {
47
+ v();
48
+ return;
49
+ }
50
+ m();
51
+ },
52
+ { immediate: !0 }
53
+ ), E(() => {
54
+ m();
55
+ }), (e, s) => (t(), L(C, { to: "body" }, [
56
+ l.visible ? (t(), o("div", {
57
+ key: 0,
58
+ ref_key: "menuRef",
59
+ ref: r,
60
+ class: "of-context-menu",
61
+ style: D(k.value),
62
+ role: "menu",
63
+ onMousedown: s[0] || (s[0] = B(() => {
64
+ }, ["stop"]))
65
+ }, [
66
+ (t(!0), o(p, null, M(l.items, (n) => {
67
+ var f;
68
+ return t(), o(p, {
69
+ key: n.key
70
+ }, [
71
+ n.separator ? (t(), o("hr", z)) : (t(), o("button", {
72
+ key: 1,
73
+ type: "button",
74
+ class: S(["of-context-menu__item", { "is-disabled": n.disabled, "is-danger": n.danger }]),
75
+ disabled: n.disabled,
76
+ role: "menuitem",
77
+ onClick: (K) => b(n)
78
+ }, [
79
+ n.icon ? (t(), o("span", R, y(n.icon), 1)) : a("", !0),
80
+ $("span", V, y(n.label), 1),
81
+ (f = n.children) != null && f.length ? (t(), o("span", F, "›")) : a("", !0)
82
+ ], 10, N))
83
+ ], 64);
84
+ }), 128))
85
+ ], 36)) : a("", !0)
86
+ ]));
87
+ }
88
+ });
89
+ export {
90
+ U as default
91
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./BarChart.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-314d77da"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,43 @@
1
+ import { defineComponent as i, ref as l, onMounted as n, onUnmounted as d, watch as c, openBlock as u, createElementBlock as f, createElementVNode as p } from "vue";
2
+ import * as x from "echarts";
3
+ const m = { class: "of-dashboard-chart" }, b = /* @__PURE__ */ i({
4
+ __name: "BarChart",
5
+ props: {
6
+ title: { default: "" },
7
+ xAxisData: { default: () => ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] },
8
+ seriesName: { default: "Value" },
9
+ data: { default: () => [120, 200, 150, 80, 70, 110, 130] },
10
+ colors: { default: () => ["#3b82f6"] }
11
+ },
12
+ setup(s) {
13
+ const e = s, a = l(null);
14
+ let t = null, o = null;
15
+ const r = () => {
16
+ a.value && (t || (t = x.init(a.value)), t.setOption({
17
+ color: e.colors,
18
+ title: e.title ? { text: e.title, left: "center", textStyle: { fontSize: 14, fontWeight: 600 } } : void 0,
19
+ tooltip: { trigger: "axis", axisPointer: { type: "shadow" } },
20
+ grid: { left: 12, right: 12, top: e.title ? 42 : 16, bottom: 8, containLabel: !0 },
21
+ xAxis: { type: "category", data: e.xAxisData },
22
+ yAxis: { type: "value" },
23
+ series: [{ name: e.seriesName, type: "bar", barMaxWidth: 36, data: e.data }]
24
+ }));
25
+ };
26
+ return n(() => {
27
+ r(), a.value && (o = new ResizeObserver(() => t == null ? void 0 : t.resize()), o.observe(a.value));
28
+ }), d(() => {
29
+ o == null || o.disconnect(), t == null || t.dispose();
30
+ }), c(() => [e.title, e.xAxisData, e.seriesName, e.data, e.colors], r, {
31
+ deep: !0
32
+ }), (h, _) => (u(), f("div", m, [
33
+ p("div", {
34
+ ref_key: "chartRef",
35
+ ref: a,
36
+ class: "of-dashboard-chart__canvas"
37
+ }, null, 512)
38
+ ]));
39
+ }
40
+ });
41
+ export {
42
+ b as default
43
+ };
@@ -0,0 +1,23 @@
1
+ import { defineComponent as t, openBlock as o, createBlock as a } from "vue";
2
+ import n from "./PieChart.vue.js";
3
+ const s = /* @__PURE__ */ t({
4
+ __name: "DoughnutChart",
5
+ props: {
6
+ title: {},
7
+ data: {},
8
+ colors: {},
9
+ showLegend: { type: Boolean }
10
+ },
11
+ setup(e) {
12
+ return (l, r) => (o(), a(n, {
13
+ title: e.title,
14
+ data: e.data,
15
+ colors: e.colors,
16
+ "show-legend": e.showLegend,
17
+ doughnut: ""
18
+ }, null, 8, ["title", "data", "colors", "show-legend"]));
19
+ }
20
+ });
21
+ export {
22
+ s as default
23
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DoughnutChart.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./NumberCard.vue2.js";
2
+ /* empty css */
3
+ import r from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2287094b"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,41 @@
1
+ import { defineComponent as s, computed as i, openBlock as o, createElementBlock as a, createElementVNode as r, toDisplayString as n, normalizeStyle as m, createBlock as c, unref as l, createCommentVNode as u } from "vue";
2
+ import { TrendingUpIcon as f, TrendingDownIcon as _ } from "lucide-vue-next";
3
+ const p = { class: "of-number-card" }, v = { class: "of-number-card__title" }, b = { class: "of-number-card__value-row" }, y = {
4
+ key: 0,
5
+ class: "of-number-card__compare"
6
+ }, g = /* @__PURE__ */ s({
7
+ __name: "NumberCard",
8
+ props: {
9
+ title: { default: "Metric" },
10
+ value: { default: 0 },
11
+ unit: { default: "" },
12
+ compare: { default: "" },
13
+ trend: { default: void 0 },
14
+ color: { default: "var(--of-color-blue-600)" }
15
+ },
16
+ setup(e) {
17
+ const t = e, d = i(() => t.value >= 1e4 ? `${(t.value / 1e4).toFixed(1)}w${t.unit}` : `${t.value}${t.unit}`);
18
+ return (k, h) => (o(), a("div", p, [
19
+ r("p", v, n(e.title), 1),
20
+ r("div", b, [
21
+ r("p", {
22
+ class: "of-number-card__value",
23
+ style: m({ color: e.color })
24
+ }, n(d.value), 5),
25
+ e.trend === "up" ? (o(), c(l(f), {
26
+ key: 0,
27
+ class: "of-number-card__trend up",
28
+ size: 16
29
+ })) : e.trend === "down" ? (o(), c(l(_), {
30
+ key: 1,
31
+ class: "of-number-card__trend down",
32
+ size: 16
33
+ })) : u("", !0)
34
+ ]),
35
+ e.compare ? (o(), a("p", y, "环比 " + n(e.compare), 1)) : u("", !0)
36
+ ]));
37
+ }
38
+ });
39
+ export {
40
+ g as default
41
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./PieChart.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d60e9301"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,53 @@
1
+ import { defineComponent as r, ref as s, onMounted as d, onUnmounted as i, watch as u, openBlock as f, createElementBlock as c, createElementVNode as p } from "vue";
2
+ import * as h from "echarts";
3
+ const m = { class: "of-dashboard-chart" }, b = /* @__PURE__ */ r({
4
+ __name: "PieChart",
5
+ props: {
6
+ title: { default: "" },
7
+ data: { default: () => [
8
+ { name: "Todo", value: 12 },
9
+ { name: "In Progress", value: 9 },
10
+ { name: "Done", value: 18 }
11
+ ] },
12
+ colors: { default: () => ["#3b82f6", "#10b981", "#f59e0b", "#8b5cf6", "#ef4444"] },
13
+ doughnut: { type: Boolean, default: !1 },
14
+ showLegend: { type: Boolean, default: !0 }
15
+ },
16
+ setup(l) {
17
+ const e = l, o = s(null);
18
+ let t = null, n = null;
19
+ const a = () => {
20
+ o.value && (t || (t = h.init(o.value)), t.setOption({
21
+ color: e.colors,
22
+ title: e.title ? { text: e.title, left: "center", textStyle: { fontSize: 14, fontWeight: 600 } } : void 0,
23
+ tooltip: { trigger: "item" },
24
+ legend: e.showLegend ? { bottom: 0 } : void 0,
25
+ series: [
26
+ {
27
+ type: "pie",
28
+ radius: e.doughnut ? ["45%", "70%"] : "65%",
29
+ center: ["50%", e.showLegend ? "45%" : "50%"],
30
+ data: e.data,
31
+ label: { formatter: "{b}: {d}%" }
32
+ }
33
+ ]
34
+ }));
35
+ };
36
+ return d(() => {
37
+ a(), o.value && (n = new ResizeObserver(() => t == null ? void 0 : t.resize()), n.observe(o.value));
38
+ }), i(() => {
39
+ n == null || n.disconnect(), t == null || t.dispose();
40
+ }), u(() => [e.title, e.data, e.colors, e.doughnut, e.showLegend], a, {
41
+ deep: !0
42
+ }), (v, g) => (f(), c("div", m, [
43
+ p("div", {
44
+ ref_key: "chartRef",
45
+ ref: o,
46
+ class: "of-dashboard-chart__canvas"
47
+ }, null, 512)
48
+ ]));
49
+ }
50
+ });
51
+ export {
52
+ b as default
53
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./TableChart.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2b60cfd2"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,50 @@
1
+ import { defineComponent as d, openBlock as e, createElementBlock as t, toDisplayString as r, createCommentVNode as m, createElementVNode as n, Fragment as u, renderList as i, normalizeStyle as o } from "vue";
2
+ const y = { class: "of-table-chart" }, h = {
3
+ key: 0,
4
+ class: "of-table-chart__title"
5
+ }, f = { class: "of-table-chart__wrapper" }, b = { class: "of-table-chart__table" }, v = /* @__PURE__ */ d({
6
+ __name: "TableChart",
7
+ props: {
8
+ title: { default: "" },
9
+ columns: { default: () => [
10
+ { key: "name", label: "Name" },
11
+ { key: "status", label: "Status", align: "center" },
12
+ { key: "value", label: "Value", align: "right" }
13
+ ] },
14
+ rows: { default: () => [
15
+ { id: 1, name: "Alpha", status: "In Progress", value: 120 },
16
+ { id: 2, name: "Beta", status: "Done", value: 86 },
17
+ { id: 3, name: "Gamma", status: "Todo", value: 42 }
18
+ ] }
19
+ },
20
+ setup(a) {
21
+ return (k, _) => (e(), t("div", y, [
22
+ a.title ? (e(), t("p", h, r(a.title), 1)) : m("", !0),
23
+ n("div", f, [
24
+ n("table", b, [
25
+ n("thead", null, [
26
+ n("tr", null, [
27
+ (e(!0), t(u, null, i(a.columns, (l) => (e(), t("th", {
28
+ key: l.key,
29
+ style: o({ textAlign: l.align ?? "left" })
30
+ }, r(l.label), 5))), 128))
31
+ ])
32
+ ]),
33
+ n("tbody", null, [
34
+ (e(!0), t(u, null, i(a.rows, (l, c) => (e(), t("tr", {
35
+ key: l.id ?? c
36
+ }, [
37
+ (e(!0), t(u, null, i(a.columns, (s) => (e(), t("td", {
38
+ key: s.key,
39
+ style: o({ textAlign: s.align ?? "left" })
40
+ }, r(l[s.key] ?? "-"), 5))), 128))
41
+ ]))), 128))
42
+ ])
43
+ ])
44
+ ])
45
+ ]));
46
+ }
47
+ });
48
+ export {
49
+ v as default
50
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./index.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-b4680c55"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,104 @@
1
+ import { defineComponent as m, computed as l, openBlock as t, createElementBlock as r, createElementVNode as o, toDisplayString as p, normalizeStyle as s, Fragment as u, renderList as f, createBlock as b, resolveDynamicComponent as h, mergeProps as _ } from "vue";
2
+ import y from "./charts/BarChart.vue.js";
3
+ import g from "./charts/PieChart.vue.js";
4
+ import S from "./charts/DoughnutChart.vue.js";
5
+ import v from "./charts/NumberCard.vue.js";
6
+ import k from "./charts/TableChart.vue.js";
7
+ const C = { class: "of-dashboard" }, D = { class: "of-dashboard__header" }, x = { class: "of-dashboard__title" }, M = /* @__PURE__ */ m({
8
+ __name: "index",
9
+ props: {
10
+ title: { default: "Dashboard" },
11
+ widgets: { default: () => [] },
12
+ columns: { default: 4 },
13
+ gap: { default: 16 }
14
+ },
15
+ setup(n) {
16
+ const a = n, i = {
17
+ bar: y,
18
+ pie: g,
19
+ doughnut: S,
20
+ "number-card": v,
21
+ table: k
22
+ }, d = l(() => ({
23
+ gridTemplateColumns: `repeat(${a.columns}, minmax(0, 1fr))`,
24
+ gap: `${a.gap}px`
25
+ })), c = l(() => a.widgets.length > 0 ? a.widgets : [
26
+ {
27
+ id: "metric-1",
28
+ type: "number-card",
29
+ title: "总任务",
30
+ data: { value: 128, trend: "up", compare: "+12%" },
31
+ colSpan: 1
32
+ },
33
+ {
34
+ id: "metric-2",
35
+ type: "number-card",
36
+ title: "已完成",
37
+ data: { value: 84, trend: "up", compare: "+8%" },
38
+ colSpan: 1
39
+ },
40
+ {
41
+ id: "bar-1",
42
+ type: "bar",
43
+ title: "周趋势",
44
+ data: [12, 17, 14, 20, 23, 16, 19],
45
+ colSpan: 2
46
+ },
47
+ {
48
+ id: "pie-1",
49
+ type: "pie",
50
+ title: "状态分布",
51
+ data: [
52
+ { name: "Todo", value: 34 },
53
+ { name: "In Progress", value: 52 },
54
+ { name: "Done", value: 42 }
55
+ ],
56
+ colSpan: 2
57
+ },
58
+ {
59
+ id: "table-1",
60
+ type: "table",
61
+ title: "关键任务",
62
+ data: {
63
+ columns: [
64
+ { key: "name", label: "任务" },
65
+ { key: "owner", label: "负责人" },
66
+ { key: "status", label: "状态" }
67
+ ],
68
+ rows: [
69
+ { name: "Migrate Dashboard", owner: "FE", status: "In Progress" },
70
+ { name: "Type Definition", owner: "FE", status: "Done" },
71
+ { name: "Integrate RichText", owner: "FE", status: "Todo" }
72
+ ]
73
+ },
74
+ colSpan: 4
75
+ }
76
+ ]);
77
+ return (T, E) => (t(), r("section", C, [
78
+ o("header", D, [
79
+ o("h3", x, p(n.title), 1)
80
+ ]),
81
+ o("div", {
82
+ class: "of-dashboard__grid",
83
+ style: s(d.value)
84
+ }, [
85
+ (t(!0), r(u, null, f(c.value, (e) => (t(), r("article", {
86
+ key: e.id,
87
+ class: "of-dashboard__item",
88
+ style: s({
89
+ gridColumn: `span ${e.colSpan ?? 1}`,
90
+ gridRow: `span ${e.rowSpan ?? 1}`
91
+ })
92
+ }, [
93
+ (t(), b(h(i[e.type]), _({
94
+ title: e.title,
95
+ data: e.data
96
+ }, { ref_for: !0 }, e.config ?? {}), null, 16, ["title", "data"]))
97
+ ], 4))), 128))
98
+ ], 4)
99
+ ]));
100
+ }
101
+ });
102
+ export {
103
+ M as default
104
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AiMessageBubble.vue2.js";
2
+ /* empty css */
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ e(o, [["__scopeId", "data-v-8ed0bf6d"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent as m, openBlock as a, createElementBlock as s, createElementVNode as t, toDisplayString as o, createCommentVNode as i, normalizeClass as n, createBlock as c } from "vue";
2
+ import r from "./AiStreamingCursor.vue.js";
3
+ const l = { class: "of-ai-message" }, _ = { class: "of-ai-message__avatar" }, d = ["src", "alt"], g = {
4
+ key: 1,
5
+ class: "of-ai-message__avatar-emoji"
6
+ }, f = { class: "of-ai-message__body" }, u = {
7
+ key: 0,
8
+ class: "of-ai-message__name"
9
+ }, v = { class: "of-ai-message__content" }, b = {
10
+ key: 1,
11
+ class: "of-ai-message__timestamp"
12
+ }, C = /* @__PURE__ */ m({
13
+ __name: "AiMessageBubble",
14
+ props: {
15
+ content: {},
16
+ isStreaming: { type: Boolean },
17
+ isError: { type: Boolean },
18
+ avatar: {},
19
+ name: {},
20
+ timestamp: {}
21
+ },
22
+ setup(e) {
23
+ return (h, y) => (a(), s("div", l, [
24
+ t("div", _, [
25
+ e.avatar ? (a(), s("img", {
26
+ key: 0,
27
+ src: e.avatar,
28
+ alt: e.name || "AI",
29
+ class: "of-ai-message__avatar-img"
30
+ }, null, 8, d)) : (a(), s("span", g, "🤖"))
31
+ ]),
32
+ t("div", f, [
33
+ e.name ? (a(), s("div", u, o(e.name), 1)) : i("", !0),
34
+ t("div", {
35
+ class: n(["of-ai-message__bubble", { "of-ai-message__bubble--error": e.isError }])
36
+ }, [
37
+ t("span", v, o(e.content), 1),
38
+ e.isStreaming ? (a(), c(r, { key: 0 })) : i("", !0)
39
+ ], 2),
40
+ e.timestamp ? (a(), s("div", b, o(e.timestamp), 1)) : i("", !0)
41
+ ])
42
+ ]));
43
+ }
44
+ });
45
+ export {
46
+ C as default
47
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AiMessageList.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const a = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d42e9b32"]]);
5
+ export {
6
+ a as default
7
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as B, ref as T, computed as b, watch as x, nextTick as M, openBlock as t, createElementBlock as n, createElementVNode as u, normalizeStyle as f, unref as s, Fragment as p, renderList as _, createBlock as r, createCommentVNode as L } from "vue";
2
+ import { useVirtualList as A } from "../../composables/useVirtualList.js";
3
+ import E from "./AiMessageBubble.vue.js";
4
+ import H from "./UserMessageBubble.vue.js";
5
+ import R from "./AiThinking.vue.js";
6
+ const Y = /* @__PURE__ */ B({
7
+ __name: "AiMessageList",
8
+ props: {
9
+ messages: {},
10
+ isThinking: { type: Boolean }
11
+ },
12
+ setup(o) {
13
+ const i = o, m = T(null), g = (l) => {
14
+ var c;
15
+ const a = i.messages[l];
16
+ if (!a) return 80;
17
+ if (a.role === "user") return 60;
18
+ const e = Math.ceil((((c = a.content) == null ? void 0 : c.length) ?? 0) / 60);
19
+ return Math.max(80, 48 + e * 24);
20
+ }, {
21
+ visibleItems: h,
22
+ totalHeight: v,
23
+ offsetY: k,
24
+ scrollToBottom: d
25
+ } = A({
26
+ items: b(() => i.messages),
27
+ itemHeight: g,
28
+ overscan: 3,
29
+ containerRef: m
30
+ });
31
+ function y() {
32
+ d();
33
+ }
34
+ return x(
35
+ () => [i.messages.length, i.isThinking],
36
+ async () => {
37
+ await M(), y();
38
+ },
39
+ { immediate: !0 }
40
+ ), (l, a) => (t(), n("div", {
41
+ ref_key: "listRef",
42
+ ref: m,
43
+ class: "of-ai-message-list"
44
+ }, [
45
+ u("div", {
46
+ style: f({ height: s(v) + "px", position: "relative" })
47
+ }, [
48
+ u("div", {
49
+ class: "of-ai-message-list-inner",
50
+ style: f({ transform: `translateY(${s(k)}px)` })
51
+ }, [
52
+ (t(!0), n(p, null, _(s(h), ({ data: e }) => (t(), n(p, {
53
+ key: e.id
54
+ }, [
55
+ e.role === "ai" ? (t(), r(E, {
56
+ key: 0,
57
+ content: e.content,
58
+ "is-streaming": e.isStreaming,
59
+ "is-error": e.isError,
60
+ avatar: e.avatar,
61
+ name: e.name,
62
+ timestamp: e.timestamp
63
+ }, null, 8, ["content", "is-streaming", "is-error", "avatar", "name", "timestamp"])) : (t(), r(H, {
64
+ key: 1,
65
+ content: e.content,
66
+ avatar: e.avatar,
67
+ timestamp: e.timestamp
68
+ }, null, 8, ["content", "avatar", "timestamp"]))
69
+ ], 64))), 128))
70
+ ], 4)
71
+ ], 4),
72
+ o.isThinking ? (t(), r(R, { key: 0 })) : L("", !0)
73
+ ], 512));
74
+ }
75
+ });
76
+ export {
77
+ Y as default
78
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./AiSender.vue2.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2b036e27"]]);
5
+ export {
6
+ p as default
7
+ };