@oneflowui/ui 0.5.9 → 0.7.0

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 (134) hide show
  1. package/README.en.md +19 -0
  2. package/README.md +23 -0
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/BarChart.vue2.js +56 -23
  5. package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
  6. package/dist/components/Dashboard/charts/NumberCard.vue2.js +14 -14
  7. package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
  8. package/dist/components/Dashboard/charts/PieChart.vue2.js +49 -23
  9. package/dist/components/Dashboard/charts/TableChart.vue.js +1 -1
  10. package/dist/components/Dashboard/index.vue.d.ts +3 -1
  11. package/dist/components/Dashboard/index.vue.js +2 -2
  12. package/dist/components/Dashboard/index.vue2.js +59 -30
  13. package/dist/components/ai/AiMessageBubble.vue.js +3 -3
  14. package/dist/components/ai/AiSender.vue.js +2 -2
  15. package/dist/components/ai/AiThinking.vue.js +1 -1
  16. package/dist/components/ai/UserMessageBubble.vue.js +3 -3
  17. package/dist/components/auxiliary/ColorPanel.vue.js +3 -3
  18. package/dist/components/auxiliary/ColorPanel.vue2.js +9 -9
  19. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  20. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  21. package/dist/components/auxiliary/PersonPanel.vue2.js +10 -10
  22. package/dist/components/base/Accordion.vue.js +1 -1
  23. package/dist/components/base/Avatar.vue.js +3 -3
  24. package/dist/components/base/Avatar.vue2.js +43 -43
  25. package/dist/components/base/Badge.vue.js +1 -1
  26. package/dist/components/base/Badge.vue2.js +35 -35
  27. package/dist/components/base/ButtonGroup.vue.js +2 -2
  28. package/dist/components/base/ChainItem.vue.js +2 -2
  29. package/dist/components/base/ChainItem.vue2.js +30 -30
  30. package/dist/components/base/DescBlock.vue.js +3 -3
  31. package/dist/components/base/DropdownMenu.vue.js +2 -2
  32. package/dist/components/base/EmptyState.vue.js +1 -1
  33. package/dist/components/base/InfoCard.vue.js +2 -2
  34. package/dist/components/base/InfoCard.vue2.js +66 -66
  35. package/dist/components/base/MonitorItem.vue.js +1 -1
  36. package/dist/components/base/MonitorItem.vue2.js +16 -16
  37. package/dist/components/base/PersonaCard.vue.js +1 -1
  38. package/dist/components/base/PersonaCard.vue2.js +81 -81
  39. package/dist/components/base/ProgressBar.vue.js +2 -2
  40. package/dist/components/base/ProgressBar.vue2.js +16 -16
  41. package/dist/components/base/RangeSlider.vue.js +1 -1
  42. package/dist/components/base/RefTag.vue.js +2 -2
  43. package/dist/components/base/RefTag.vue2.js +20 -20
  44. package/dist/components/base/SearchHighlight.vue.js +1 -1
  45. package/dist/components/base/SectionBlock.vue.js +1 -1
  46. package/dist/components/base/SectionBlock.vue2.js +44 -44
  47. package/dist/components/base/StatisticCard.vue.js +2 -2
  48. package/dist/components/base/StatisticCard.vue2.js +24 -24
  49. package/dist/components/base/StatusIndicator.vue.js +2 -2
  50. package/dist/components/base/StatusIndicator.vue2.js +30 -30
  51. package/dist/components/base/StatusSummary.vue.js +2 -2
  52. package/dist/components/base/StatusSummary.vue2.js +23 -23
  53. package/dist/components/base/Stepper.vue.js +2 -2
  54. package/dist/components/base/Switch.vue.js +2 -2
  55. package/dist/components/base/ToolbarBtn.vue.js +1 -1
  56. package/dist/components/base/ViewModeGroup.vue.js +3 -3
  57. package/dist/components/base/ViewSwitcher.vue.js +2 -2
  58. package/dist/components/base/ViewTab.vue.js +4 -4
  59. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  60. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +1 -1
  61. package/dist/components/database/DatabaseView.vue.js +2 -2
  62. package/dist/components/database/DatabaseView.vue2.js +482 -412
  63. package/dist/components/detail/CommentItem.vue.js +2 -2
  64. package/dist/components/detail/CommentItem.vue2.js +8 -8
  65. package/dist/components/detail/DetailLayout.vue.d.ts +12 -1
  66. package/dist/components/detail/DetailLayout.vue.js +2 -2
  67. package/dist/components/detail/DetailLayout.vue2.js +115 -68
  68. package/dist/components/editor/BlockQuote.vue.js +2 -2
  69. package/dist/components/editor/CodeBlock.vue.js +2 -2
  70. package/dist/components/editor/ContentBlock.vue.js +2 -2
  71. package/dist/components/editor/RefLink.vue.js +2 -2
  72. package/dist/components/editor/RichTextEditor.vue.js +1 -1
  73. package/dist/components/field/FieldAttachment.vue.js +1 -1
  74. package/dist/components/field/FieldCreator.vue.js +1 -1
  75. package/dist/components/field/FieldCurrency.vue.js +2 -2
  76. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  77. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  78. package/dist/components/field/FieldProgress.vue.js +2 -2
  79. package/dist/components/field/FieldRating.vue.js +2 -2
  80. package/dist/components/field/FieldRelation.vue.js +1 -1
  81. package/dist/components/field/FieldRichText.vue.js +1 -1
  82. package/dist/components/field/FieldSelect.vue.js +2 -2
  83. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  84. package/dist/components/gallery/GalleryCard.vue2.js +34 -30
  85. package/dist/components/gallery/GalleryView.vue.d.ts +3 -1
  86. package/dist/components/gallery/GalleryView.vue.js +1 -1
  87. package/dist/components/gallery/GalleryView.vue2.js +51 -27
  88. package/dist/components/kanban/KanbanBoard.vue.js +4 -4
  89. package/dist/components/kanban/KanbanCard.vue.js +2 -2
  90. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  91. package/dist/components/kanban/KanbanColumn.vue2.js +16 -16
  92. package/dist/components/kanban/QuickAddRow.vue.js +1 -1
  93. package/dist/components/layout/AppLayout.vue.js +2 -2
  94. package/dist/components/layout/Navbar.vue.js +3 -3
  95. package/dist/components/layout/Sidebar.vue.js +2 -2
  96. package/dist/components/layout/StatusBar.vue.js +2 -2
  97. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  98. package/dist/components/overlay/Dialog.vue.js +2 -2
  99. package/dist/components/overlay/Drawer.vue.d.ts +2 -0
  100. package/dist/components/overlay/Drawer.vue.js +2 -2
  101. package/dist/components/overlay/Drawer.vue2.js +25 -24
  102. package/dist/components/overlay/Modal.vue.js +1 -1
  103. package/dist/components/overlay/SidePanel.vue.js +2 -2
  104. package/dist/components/overlay/SidePanel.vue2.js +3 -2
  105. package/dist/components/split/SplitPane.vue.js +2 -2
  106. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  107. package/dist/components/table/DataTable.vue.d.ts +26 -2
  108. package/dist/components/table/DataTable.vue.js +2 -2
  109. package/dist/components/table/DataTable.vue2.js +738 -603
  110. package/dist/components/table/DetailSheet.vue.js +1 -1
  111. package/dist/components/table/FieldCell.vue.js +2 -2
  112. package/dist/components/table/FieldCell.vue2.js +26 -24
  113. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  114. package/dist/components/table/MobileListView.vue.js +2 -2
  115. package/dist/components/table/NewRowBtn.vue.js +2 -2
  116. package/dist/components/table/TableColumnManager.vue.js +2 -2
  117. package/dist/components/table/TableDataRow.vue.d.ts +19 -0
  118. package/dist/components/table/TableDataRow.vue.js +1 -1
  119. package/dist/components/table/TableDataRow.vue2.js +110 -73
  120. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  121. package/dist/components/table/TableGroupRow.vue.js +2 -2
  122. package/dist/components/table/TableHeaderRow.vue.js +2 -2
  123. package/dist/components/table/TableToolbar.vue.js +2 -2
  124. package/dist/components/tabs/Tabs.vue.js +1 -1
  125. package/dist/components/timeline/ActivityTimeline.vue.js +1 -1
  126. package/dist/components/timeline/ActivityTimeline.vue2.js +27 -27
  127. package/dist/components/timeline/GanttRow.vue.js +2 -2
  128. package/dist/components/timeline/GanttRow.vue2.js +21 -18
  129. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  130. package/dist/components/toast/ToastItem.vue.js +2 -2
  131. package/dist/components/toast/ToastItem.vue2.js +39 -39
  132. package/dist/plugin.js +5 -3
  133. package/dist/style.css +1 -1
  134. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  import o from "./CommentItem.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6050ee55"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-378cc0aa"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,22 +1,22 @@
1
- import { defineComponent as c, openBlock as o, createElementBlock as n, createElementVNode as e, normalizeStyle as a, toDisplayString as m, createCommentVNode as i } from "vue";
2
- const s = { class: "comment-item" }, _ = { class: "comment-item__content" }, l = { class: "comment-item__header" }, r = { class: "comment-item__author" }, d = {
1
+ import { defineComponent as c, openBlock as o, createElementBlock as n, createElementVNode as e, normalizeStyle as a, toDisplayString as m, createCommentVNode as s } from "vue";
2
+ const i = { class: "comment-item" }, _ = { class: "comment-item__content" }, l = { class: "comment-item__header" }, d = { class: "comment-item__author" }, r = {
3
3
  key: 0,
4
4
  class: "comment-item__action"
5
- }, h = { class: "comment-item__time" }, u = { class: "comment-item__text" }, C = /* @__PURE__ */ c({
5
+ }, h = { class: "comment-item__time" }, u = { class: "comment-item__text" }, k = /* @__PURE__ */ c({
6
6
  __name: "CommentItem",
7
7
  props: {
8
8
  comment: {}
9
9
  },
10
10
  setup(t) {
11
- return (v, f) => (o(), n("div", s, [
11
+ return (v, f) => (o(), n("div", i, [
12
12
  e("div", {
13
13
  class: "comment-item__avatar",
14
- style: a({ backgroundColor: t.comment.avatarColor ?? "var(--of-color-primary-500)" })
14
+ style: a({ backgroundColor: t.comment.avatarColor ?? "var(--of-accent-default)" })
15
15
  }, m(t.comment.authorInitial), 5),
16
16
  e("div", _, [
17
17
  e("div", l, [
18
- e("span", r, m(t.comment.author), 1),
19
- t.comment.action ? (o(), n("span", d, m(t.comment.action), 1)) : i("", !0),
18
+ e("span", d, m(t.comment.author), 1),
19
+ t.comment.action ? (o(), n("span", r, m(t.comment.action), 1)) : s("", !0),
20
20
  e("span", h, m(t.comment.time), 1)
21
21
  ]),
22
22
  e("div", u, m(t.comment.content), 1)
@@ -25,5 +25,5 @@ const s = { class: "comment-item" }, _ = { class: "comment-item__content" }, l =
25
25
  }
26
26
  });
27
27
  export {
28
- C as default
28
+ k as default
29
29
  };
@@ -1,10 +1,15 @@
1
1
  import { Task, CommentData, PropItem } from '../../types';
2
+ type DetailLayoutState = "ready" | "loading" | "empty" | "error";
2
3
  type __VLS_Props = {
3
- task: Task;
4
+ task?: Task | null;
5
+ title?: string;
4
6
  comments?: CommentData[];
5
7
  propItems?: PropItem[];
6
8
  descriptionContent?: string;
7
9
  descriptionEditable?: boolean;
10
+ state?: DetailLayoutState;
11
+ stateTitle?: string;
12
+ stateDescription?: string;
8
13
  };
9
14
  declare function __VLS_template(): {
10
15
  attrs: Partial<{}>;
@@ -12,6 +17,7 @@ declare function __VLS_template(): {
12
17
  meta?(_: {}): any;
13
18
  description?(_: {}): any;
14
19
  comments?(_: {}): any;
20
+ footer?(_: {}): any;
15
21
  props?(_: {}): any;
16
22
  };
17
23
  refs: {};
@@ -23,10 +29,15 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
23
29
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
24
30
  "onUpdate:descriptionContent"?: ((value: string) => any) | undefined;
25
31
  }>, {
32
+ title: string;
33
+ task: Task | null;
26
34
  comments: CommentData[];
27
35
  propItems: PropItem[];
28
36
  descriptionContent: string;
29
37
  descriptionEditable: boolean;
38
+ state: DetailLayoutState;
39
+ stateTitle: string;
40
+ stateDescription: string;
30
41
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
31
42
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
32
43
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./DetailLayout.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-dedb9066"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c18fe8bd"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,34 +1,48 @@
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 = {
1
+ import { defineComponent as T, computed as s, openBlock as o, createElementBlock as r, createElementVNode as a, toDisplayString as i, Fragment as c, normalizeStyle as k, createCommentVNode as n, renderSlot as d, createBlock as p, resolveDynamicComponent as E, createVNode as N, unref as V, renderList as z } from "vue";
2
+ import { Loader2 as A, AlertCircle as M, Inbox as R } from "lucide-vue-next";
3
+ import U from "./PropPanel.vue.js";
4
+ import F from "./CommentItem.vue.js";
5
+ import j from "../editor/ContentBlock.vue.js";
6
+ const q = { class: "detail-layout" }, w = { class: "detail-layout__main" }, G = { class: "detail-layout__title" }, H = { class: "detail-layout__meta" }, J = {
6
7
  key: 0,
7
8
  class: "detail-layout__badge detail-layout__badge--role"
8
- }, M = {
9
+ }, K = {
9
10
  key: 1,
10
11
  class: "detail-layout__meta-text"
11
- }, U = { class: "detail-layout__section" }, z = { class: "detail-layout__description" }, F = {
12
+ }, O = ["data-role"], Q = { class: "detail-layout__state-copy" }, W = { class: "detail-layout__state-title" }, X = { class: "detail-layout__state-description" }, Y = { class: "detail-layout__section" }, Z = { class: "detail-layout__description" }, tt = {
12
13
  key: 0,
13
14
  class: "detail-layout__desc-placeholder"
14
- }, T = { class: "detail-layout__section" }, j = { class: "detail-layout__comments" }, q = {
15
+ }, et = { class: "detail-layout__section" }, ot = { class: "detail-layout__comments" }, at = {
15
16
  key: 0,
16
17
  class: "detail-layout__comment-list"
17
- }, w = {
18
+ }, st = {
18
19
  key: 1,
19
20
  class: "detail-layout__empty-hint"
20
- }, A = { class: "detail-layout__sidebar" }, O = /* @__PURE__ */ h({
21
+ }, rt = {
22
+ key: 0,
23
+ class: "detail-layout__footer"
24
+ }, lt = {
25
+ key: 0,
26
+ class: "detail-layout__sidebar"
27
+ }, pt = /* @__PURE__ */ T({
21
28
  __name: "DetailLayout",
22
29
  props: {
23
- task: {},
30
+ task: { default: null },
31
+ title: { default: "" },
24
32
  comments: { default: () => [] },
25
33
  propItems: { default: () => [] },
26
34
  descriptionContent: { default: "" },
27
- descriptionEditable: { type: Boolean, default: !1 }
35
+ descriptionEditable: { type: Boolean, default: !1 },
36
+ state: { default: "ready" },
37
+ stateTitle: { default: "" },
38
+ stateDescription: { default: "" }
28
39
  },
29
40
  emits: ["update:descriptionContent"],
30
- setup(t, { emit: _ }) {
31
- const l = t, f = _, u = d(() => ({
41
+ setup(l, { emit: x }) {
42
+ const t = l, h = x, C = s(() => {
43
+ var e;
44
+ return t.title || ((e = t.task) == null ? void 0 : e.title) || "未命名工作区";
45
+ }), y = s(() => t.state === "ready"), D = s(() => t.state === "loading" ? A : t.state === "error" ? M : R), L = s(() => t.stateTitle ? t.stateTitle : t.state === "loading" ? "正在准备工作区" : t.state === "error" ? "工作区加载失败" : t.state === "empty" ? "暂无详情内容" : ""), $ = s(() => t.stateDescription ? t.stateDescription : t.state === "loading" ? "请稍候,当前记录的详情数据正在整理。" : t.state === "error" ? "暂时无法展示当前详情,请稍后重试。" : t.state === "empty" ? "当前记录还没有可展示的描述、属性或活动记录。" : ""), _ = s(() => t.task ? {
32
46
  todo: { text: "var(--of-status-todo-text)", bg: "var(--of-status-todo-bg)" },
33
47
  in_progress: {
34
48
  text: "var(--of-status-in-progress-text)",
@@ -36,83 +50,116 @@ const E = { class: "detail-layout" }, D = { class: "detail-layout__main" }, L =
36
50
  },
37
51
  blocked: { text: "var(--of-status-blocked-text)", bg: "var(--of-status-blocked-bg)" },
38
52
  done: { text: "var(--of-status-done-text)", bg: "var(--of-status-done-bg)" }
39
- })[l.task.status] ?? {
53
+ }[t.task.status] ?? {
54
+ text: "var(--of-color-text-secondary)",
55
+ bg: "var(--of-color-gray-100)"
56
+ } : {
40
57
  text: "var(--of-color-text-secondary)",
41
58
  bg: "var(--of-color-gray-100)"
42
- }), m = d(() => ({
59
+ }), f = s(() => t.task ? {
43
60
  P0: { text: "var(--of-priority-p0-text)", bg: "var(--of-priority-p0-bg)" },
44
61
  P1: { text: "var(--of-priority-p1-text)", bg: "var(--of-priority-p1-bg)" },
45
62
  P2: { text: "var(--of-priority-p2-text)", bg: "var(--of-priority-p2-bg)" },
46
63
  P3: { text: "var(--of-priority-p3-text)", bg: "var(--of-priority-p3-bg)" }
47
- })[l.task.priority] ?? {
64
+ }[t.task.priority] ?? {
48
65
  text: "var(--of-color-text-secondary)",
49
66
  bg: "var(--of-color-gray-100)"
50
- }), k = d(() => ({
67
+ } : {
68
+ text: "var(--of-color-text-secondary)",
69
+ bg: "var(--of-color-gray-100)"
70
+ }), B = s(() => t.task ? {
51
71
  todo: "待处理",
52
72
  in_progress: "进行中",
53
73
  blocked: "阻塞",
54
74
  done: "已完成"
55
- })[l.task.status] ?? l.task.status), p = d(() => l.descriptionContent || l.task.description || "");
56
- function x(o) {
57
- f("update:descriptionContent", o);
75
+ }[t.task.status] ?? t.task.status : ""), I = s(() => t.task ? B.value : ""), P = s(() => t.task ? t.task.priority : ""), v = s(() => {
76
+ var e;
77
+ return ((e = t.task) == null ? void 0 : e.role) ?? "";
78
+ }), m = s(() => {
79
+ var e;
80
+ return ((e = t.task) == null ? void 0 : e.assignee) ?? "";
81
+ }), g = s(() => {
82
+ var e;
83
+ return t.descriptionContent || ((e = t.task) == null ? void 0 : e.description) || "";
84
+ });
85
+ function S(e) {
86
+ h("update:descriptionContent", e);
58
87
  }
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", {
88
+ return (e, u) => (o(), r("div", q, [
89
+ a("div", w, [
90
+ a("h1", G, i(C.value), 1),
91
+ a("div", H, [
92
+ t.task && !e.$slots.meta ? (o(), r(c, { key: 0 }, [
93
+ a("span", {
65
94
  class: "detail-layout__badge",
66
- style: v({ color: u.value.text, backgroundColor: u.value.bg })
67
- }, i(k.value), 5),
68
- e("span", {
95
+ style: k({ color: _.value.text, backgroundColor: _.value.bg })
96
+ }, i(I.value), 5),
97
+ a("span", {
69
98
  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
- ])
99
+ style: k({ color: f.value.text, backgroundColor: f.value.bg })
100
+ }, i(P.value), 5),
101
+ v.value ? (o(), r("span", J, i(v.value), 1)) : n("", !0),
102
+ m.value ? (o(), r("span", K, i(m.value), 1)) : n("", !0)
103
+ ], 64)) : n("", !0),
104
+ d(e.$slots, "meta", {}, void 0, !0)
89
105
  ]),
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)
106
+ y.value ? (o(), r(c, { key: 1 }, [
107
+ a("div", Y, [
108
+ u[0] || (u[0] = a("div", { class: "detail-layout__section-title" }, "描述", -1)),
109
+ a("div", Z, [
110
+ d(e.$slots, "description", {}, () => [
111
+ N(V(j), {
112
+ content: g.value,
113
+ editable: l.descriptionEditable,
114
+ "onUpdate:content": S
115
+ }, null, 8, ["content", "editable"]),
116
+ g.value ? n("", !0) : (o(), r("p", tt, "暂无描述"))
117
+ ], !0)
118
+ ])
119
+ ]),
120
+ a("div", et, [
121
+ u[1] || (u[1] = a("div", { class: "detail-layout__section-title" }, "活动记录", -1)),
122
+ a("div", ot, [
123
+ d(e.$slots, "comments", {}, () => [
124
+ l.comments && l.comments.length > 0 ? (o(), r("div", at, [
125
+ (o(!0), r(c, null, z(l.comments, (b) => (o(), p(F, {
126
+ key: b.id,
127
+ comment: b
128
+ }, null, 8, ["comment"]))), 128))
129
+ ])) : (o(), r("p", st, "暂无活动记录"))
130
+ ], !0)
131
+ ])
132
+ ]),
133
+ e.$slots.footer ? (o(), r("div", rt, [
134
+ d(e.$slots, "footer", {}, void 0, !0)
135
+ ])) : n("", !0)
136
+ ], 64)) : (o(), r("div", {
137
+ key: 0,
138
+ class: "detail-layout__state",
139
+ "data-role": `detail-state-${t.state}`
140
+ }, [
141
+ (o(), p(E(D.value), {
142
+ class: "detail-layout__state-icon",
143
+ size: 20
144
+ })),
145
+ a("div", Q, [
146
+ a("div", W, i(L.value), 1),
147
+ a("p", X, i($.value), 1)
101
148
  ])
102
- ])
149
+ ], 8, O))
103
150
  ]),
104
- e("div", A, [
105
- c(o.$slots, "props", {}, () => [
106
- t.propItems && t.propItems.length > 0 ? (s(), b(I, {
151
+ y.value ? (o(), r("div", lt, [
152
+ d(e.$slots, "props", {}, () => [
153
+ l.propItems && l.propItems.length > 0 ? (o(), p(U, {
107
154
  key: 0,
108
- items: t.propItems,
155
+ items: l.propItems,
109
156
  title: "属性"
110
- }, null, 8, ["items"])) : r("", !0)
157
+ }, null, 8, ["items"])) : n("", !0)
111
158
  ], !0)
112
- ])
159
+ ])) : n("", !0)
113
160
  ]));
114
161
  }
115
162
  });
116
163
  export {
117
- O as default
164
+ pt as default
118
165
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./BlockQuote.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-cc957432"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-74634abe"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./CodeBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5d72fbc6"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-badd36eb"]]);
5
5
  export {
6
- m as default
6
+ e as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./ContentBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4899d060"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5458915e"]]);
5
5
  export {
6
- _ as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./RefLink.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f83e73bd"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a6ed683d"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./RichTextEditor.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a112a005"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-75bad3b7"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./FieldAttachment.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-416bbf0b"]]);
4
+ const e = /* @__PURE__ */ o(t, [["__scopeId", "data-v-b073b716"]]);
5
5
  export {
6
6
  e as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCreator.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e68ff06a"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-812bc12f"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCurrency.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-891caf93"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-392a09d7"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldMarkdownPreview.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-f0714bc5"]]);
4
+ const d = /* @__PURE__ */ r(o, [["__scopeId", "data-v-7b782dfb"]]);
5
5
  export {
6
- f as default
6
+ d as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./FieldMultiSelect.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-a4e34f12"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-0b439976"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldProgress.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-35c4fb4c"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-0321305d"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRating.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-40f59bfd"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d9b295b6"]]);
5
5
  export {
6
- i as default
6
+ m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRelation.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-30a94df6"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-a6bb4f81"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldRichText.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-062bed7a"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-5641f071"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldSelect.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-31d8cba6"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-f5b2319c"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./GalleryCard.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-e54afcc3"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-5bdeb1c6"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,65 +1,69 @@
1
- import { defineComponent as D, computed as i, openBlock as r, createElementBlock as l, normalizeStyle as _, createElementVNode as t, toDisplayString as c, createCommentVNode as u, Fragment as I, renderList as S, createBlock as B, resolveDynamicComponent as F, createTextVNode as w } from "vue";
2
- import { CircleIcon as g, FolderIcon as x, CalendarIcon as $, UserIcon as E, TagIcon as N } from "lucide-vue-next";
3
- const V = ["src"], z = { class: "gallery-card__body" }, A = { class: "gallery-card__title" }, L = {
1
+ import { defineComponent as h, computed as d, openBlock as r, createElementBlock as l, normalizeStyle as y, createElementVNode as t, toDisplayString as c, createCommentVNode as g, Fragment as I, renderList as D, createBlock as S, resolveDynamicComponent as $, createTextVNode as w } from "vue";
2
+ import { CircleIcon as u, FolderIcon as B, CalendarIcon as F, UserIcon as N, TagIcon as V } from "lucide-vue-next";
3
+ const z = ["src"], A = { class: "gallery-card__body" }, E = { class: "gallery-card__title" }, L = {
4
4
  key: 0,
5
5
  class: "gallery-card__desc"
6
6
  }, M = {
7
7
  key: 1,
8
8
  class: "gallery-card__props"
9
- }, P = { class: "gallery-card__prop-key" }, T = { class: "gallery-card__prop-value" }, G = { class: "gallery-card__footer" }, U = { class: "gallery-card__task-id" }, Y = { class: "gallery-card__date" }, H = /* @__PURE__ */ D({
9
+ }, P = { class: "gallery-card__prop-key" }, T = { class: "gallery-card__prop-value" }, G = { class: "gallery-card__footer" }, U = { class: "gallery-card__task-id" }, Y = { class: "gallery-card__date" }, H = /* @__PURE__ */ h({
10
10
  __name: "GalleryCard",
11
11
  props: {
12
12
  item: {}
13
13
  },
14
14
  emits: ["click"],
15
- setup(o, { emit: y }) {
16
- const a = o, m = y, v = i(() => a.item.bannerColor ?? "#BFDBFE"), p = i(
15
+ setup(o, { emit: _ }) {
16
+ const a = o, v = _, m = d(
17
+ () => a.item.bannerColor ?? "var(--of-surface-selected, var(--of-color-gray-100, #f3f4f6))"
18
+ ), f = d(
17
19
  () => typeof a.item.cover == "string" && /^https?:\/\//.test(a.item.cover)
18
- ), d = i(() => (a.item.extraProps ?? []).slice(0, 2)), f = {
19
- tag: N,
20
- user: E,
21
- calendar: $,
22
- folder: x
20
+ ), i = d(() => (a.item.extraProps ?? []).slice(0, 2)), p = {
21
+ tag: V,
22
+ user: N,
23
+ calendar: F,
24
+ folder: B
23
25
  };
24
26
  function k(s) {
25
- return s ? f[s.toLowerCase()] ?? g : g;
27
+ return s ? p[s.toLowerCase()] ?? u : u;
26
28
  }
27
- const C = i(() => {
29
+ const C = d(() => {
28
30
  const s = a.item.updatedAt ?? a.item.createdAt;
29
31
  if (!s) return "";
30
32
  const e = new Date(s);
31
33
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
32
34
  }), b = {
33
- todo: "var(--of-color-gray-400)",
34
- in_progress: "var(--of-color-info)",
35
- blocked: "var(--of-color-warning)",
36
- done: "var(--of-color-success)"
37
- }, h = i(() => b[a.item.status] ?? "var(--of-color-gray-400)");
35
+ todo: "var(--of-text-tertiary, var(--of-color-gray-400))",
36
+ in_progress: "var(--of-accent-default, var(--of-text-secondary, var(--of-color-gray-500)))",
37
+ blocked: "var(--of-accent-strong, var(--of-color-error, #dc2626))",
38
+ done: "var(--of-text-strong, var(--of-color-gray-700, #374151))"
39
+ }, x = d(
40
+ () => b[a.item.status] ?? "var(--of-text-tertiary, var(--of-color-gray-400))"
41
+ );
38
42
  return (s, e) => (r(), l("button", {
39
43
  class: "gallery-card",
40
44
  type: "button",
41
- onClick: e[0] || (e[0] = (n) => m("click", o.item))
45
+ onClick: e[0] || (e[0] = (n) => v("click", o.item))
42
46
  }, [
43
- p.value ? (r(), l("img", {
47
+ f.value ? (r(), l("img", {
44
48
  key: 0,
45
49
  class: "gallery-card__cover",
46
50
  src: o.item.cover,
47
51
  alt: ""
48
- }, null, 8, V)) : (r(), l("div", {
52
+ }, null, 8, z)) : (r(), l("div", {
49
53
  key: 1,
50
54
  class: "gallery-card__banner",
51
- style: _({ backgroundColor: v.value })
55
+ style: y({ backgroundColor: m.value })
52
56
  }, null, 4)),
53
- t("div", z, [
54
- t("div", A, c(o.item.title), 1),
55
- o.item.description ? (r(), l("div", L, c(o.item.description), 1)) : u("", !0),
57
+ t("div", A, [
58
+ t("div", E, c(o.item.title), 1),
59
+ o.item.description ? (r(), l("div", L, c(o.item.description), 1)) : g("", !0),
56
60
  e[3] || (e[3] = t("div", { class: "gallery-card__divider" }, null, -1)),
57
- d.value.length > 0 ? (r(), l("div", M, [
58
- (r(!0), l(I, null, S(d.value, (n) => (r(), l("div", {
61
+ i.value.length > 0 ? (r(), l("div", M, [
62
+ (r(!0), l(I, null, D(i.value, (n) => (r(), l("div", {
59
63
  key: n.key,
60
64
  class: "gallery-card__prop-row"
61
65
  }, [
62
- (r(), B(F(k(n.icon)), {
66
+ (r(), S($(k(n.icon)), {
63
67
  class: "gallery-card__prop-icon",
64
68
  size: 12
65
69
  })),
@@ -67,12 +71,12 @@ const V = ["src"], z = { class: "gallery-card__body" }, A = { class: "gallery-ca
67
71
  e[1] || (e[1] = t("span", { class: "gallery-card__prop-spacer" }, null, -1)),
68
72
  t("span", T, c(n.value), 1)
69
73
  ]))), 128))
70
- ])) : u("", !0),
74
+ ])) : g("", !0),
71
75
  t("div", G, [
72
76
  t("span", U, [
73
77
  t("span", {
74
78
  class: "gallery-card__status-dot",
75
- style: _({ backgroundColor: h.value })
79
+ style: y({ backgroundColor: x.value })
76
80
  }, null, 4),
77
81
  w(" " + c(o.item.id), 1)
78
82
  ]),
@@ -24,5 +24,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
24
24
  schema: TableSchema;
25
25
  coverFieldId: string;
26
26
  cardFieldIds: string[];
27
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
27
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
28
+ galleryRef: HTMLDivElement;
29
+ }, HTMLDivElement>;
28
30
  export default _default;