@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 t from "./DetailSheet.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-bac586d2"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53b37775"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./FieldCell.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-8e46c20b"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6062f0e7"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as S, computed as r, defineAsyncComponent as e, openBlock as n, createBlock as d, resolveDynamicComponent as s, withKeys as p, withModifiers as y, normalizeClass as F, withCtx as u, Suspense as K, createElementVNode as M, createElementBlock as v, Fragment as D, unref as T, toDisplayString as V } from "vue";
1
+ import { defineComponent as F, computed as a, defineAsyncComponent as e, openBlock as o, createBlock as d, resolveDynamicComponent as s, withKeys as p, withModifiers as v, normalizeClass as K, withCtx as u, Suspense as M, createElementVNode as D, createElementBlock as y, Fragment as T, unref as V, toDisplayString as $ } from "vue";
2
2
  import { useInlineEdit as j } from "../../composables/useInlineEdit.js";
3
3
  const z = {
4
4
  key: 1,
5
5
  class: "of-field-cell__display"
6
- }, $ = /* @__PURE__ */ S({
6
+ }, q = /* @__PURE__ */ F({
7
7
  __name: "FieldCell",
8
8
  props: {
9
9
  rowId: {},
@@ -13,14 +13,14 @@ const z = {
13
13
  },
14
14
  emits: ["commit", "cancel", "tabNext"],
15
15
  setup(i, { emit: b }) {
16
- const t = i, c = b, { isEditing: h, activate: k, commit: w, cancel: x } = j(), o = r(() => h(t.rowId, t.field.id)), a = r(() => t.readonly || t.field.readonly);
16
+ const t = i, c = b, { isEditing: h, activate: k, commit: w, cancel: x } = j(), r = a(() => h(t.rowId, t.field.id)), n = a(() => t.readonly || t.field.readonly), C = a(() => !n.value);
17
17
  function m() {
18
- a.value || k(t.rowId, t.field.id);
18
+ n.value || k(t.rowId, t.field.id);
19
19
  }
20
- function C(l) {
20
+ function g(l) {
21
21
  w(t.rowId, t.field.id, l), c("commit", t.rowId, t.field.id, l);
22
22
  }
23
- function g() {
23
+ function A() {
24
24
  x(), c("cancel");
25
25
  }
26
26
  function E() {
@@ -47,50 +47,52 @@ const z = {
47
47
  phone: e(() => import("../field/FieldPhone.vue.js"))
48
48
  }, N = e(
49
49
  () => import("../field/FieldMarkdownPreview.vue.js")
50
- ), A = r(() => I[t.field.type]), B = r(() => {
50
+ ), B = a(() => I[t.field.type]), S = a(() => {
51
51
  const l = t.value;
52
52
  return l == null || l === "" ? "—" : Array.isArray(l) ? l.join(", ") : typeof l == "boolean" ? l ? "✓" : "—" : String(l);
53
53
  });
54
- return (l, f) => (n(), d(s(a.value || o.value ? "div" : "button"), {
55
- class: F(["of-field-cell", {
56
- "of-field-cell--editing": o.value,
57
- "of-field-cell--readonly": a.value
54
+ return (l, f) => (o(), d(s(n.value || r.value ? "div" : "button"), {
55
+ class: K(["of-field-cell", {
56
+ "of-field-cell--editing": r.value,
57
+ "of-field-cell--readonly": n.value,
58
+ "of-field-cell--actionable": C.value
58
59
  }]),
59
- type: a.value || o.value ? void 0 : "button",
60
+ type: n.value || r.value ? void 0 : "button",
60
61
  "aria-label": `${i.field.label}字段`,
62
+ title: n.value ? void 0 : `点击编辑 ${i.field.label}`,
61
63
  onClick: m,
62
64
  onKeydown: [
63
- p(y(m, ["prevent"]), ["enter"]),
64
- p(y(m, ["prevent"]), ["space"])
65
+ p(v(m, ["prevent"]), ["enter"]),
66
+ p(v(m, ["prevent"]), ["space"])
65
67
  ]
66
68
  }, {
67
69
  default: u(() => [
68
- o.value ? (n(), d(K, { key: 0 }, {
70
+ r.value ? (o(), d(M, { key: 0 }, {
69
71
  fallback: u(() => [...f[0] || (f[0] = [
70
- M("span", { class: "of-field-cell__loading" }, "...", -1)
72
+ D("span", { class: "of-field-cell__loading" }, "...", -1)
71
73
  ])]),
72
74
  default: u(() => [
73
- (n(), d(s(A.value), {
75
+ (o(), d(s(B.value), {
74
76
  value: i.value,
75
77
  field: i.field,
76
- onCommit: C,
77
- onCancel: g,
78
+ onCommit: g,
79
+ onCancel: A,
78
80
  onTabNext: E
79
81
  }, null, 40, ["value", "field"]))
80
82
  ]),
81
83
  _: 1
82
- })) : (n(), v(D, { key: 1 }, [
83
- i.field.type === "richtext" && typeof i.value == "string" && i.value ? (n(), d(T(N), {
84
+ })) : (o(), y(T, { key: 1 }, [
85
+ i.field.type === "richtext" && typeof i.value == "string" && i.value ? (o(), d(V(N), {
84
86
  key: 0,
85
87
  content: i.value,
86
88
  "max-lines": 2
87
- }, null, 8, ["content"])) : (n(), v("span", z, V(B.value), 1))
89
+ }, null, 8, ["content"])) : (o(), y("span", z, $(S.value), 1))
88
90
  ], 64))
89
91
  ]),
90
92
  _: 1
91
- }, 40, ["class", "type", "aria-label", "onKeydown"]));
93
+ }, 40, ["class", "type", "aria-label", "title", "onKeydown"]));
92
94
  }
93
95
  });
94
96
  export {
95
- $ as default
97
+ q as default
96
98
  };
@@ -1,7 +1,7 @@
1
- import e from "./FieldTypePicker.vue2.js";
1
+ import o from "./FieldTypePicker.vue2.js";
2
2
  /* empty css */
3
- import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8b7ffaee"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e50c5383"]]);
5
5
  export {
6
- p as default
6
+ c as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./MobileListView.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccf7d630"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e5391fd2"]]);
5
5
  export {
6
- e as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./NewRowBtn.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-612639d1"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6a136c2a"]]);
5
5
  export {
6
- _ as default
6
+ p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableColumnManager.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-bade90c0"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-8d96e6ee"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,16 @@
1
+ import { Component } from 'vue';
1
2
  import { TableColumn, ColorMap, Density } from '../../types';
2
3
  type TableRow = Record<string, unknown> & {
3
4
  id: string;
4
5
  };
6
+ export interface RowActionItem {
7
+ key: string;
8
+ label: string;
9
+ onClick: () => void;
10
+ variant?: "default" | "danger";
11
+ icon?: string | Component;
12
+ disabled?: boolean;
13
+ }
5
14
  type __VLS_Props = {
6
15
  row: TableRow;
7
16
  rowKey?: string;
@@ -17,6 +26,8 @@ type __VLS_Props = {
17
26
  * 状态颜色映射,与内置默认映射合并(传入优先)
18
27
  */
19
28
  statusColorMap?: ColorMap;
29
+ showRowActions?: boolean;
30
+ rowActionItems?: RowActionItem[];
20
31
  };
21
32
  declare function __VLS_template(): {
22
33
  attrs: Partial<{}>;
@@ -25,6 +36,12 @@ declare function __VLS_template(): {
25
36
  row: TableRow;
26
37
  col: TableColumn;
27
38
  }): any;
39
+ 'row-actions'?(_: {
40
+ row: TableRow;
41
+ rowId: string;
42
+ items: RowActionItem[];
43
+ openDetail: () => void;
44
+ }): any;
28
45
  };
29
46
  refs: {};
30
47
  rootEl: HTMLDivElement;
@@ -43,6 +60,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
43
60
  selected: boolean;
44
61
  priorityColorMap: ColorMap;
45
62
  statusColorMap: ColorMap;
63
+ showRowActions: boolean;
64
+ rowActionItems: RowActionItem[];
46
65
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
47
66
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
48
67
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./TableDataRow.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-4ecab060"]]);
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-c81e54a5"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,24 +1,24 @@
1
- import { defineComponent as B, computed as d, openBlock as o, createElementBlock as n, normalizeStyle as c, normalizeClass as Y, withModifiers as E, createElementVNode as g, createCommentVNode as R, Fragment as b, renderList as W, renderSlot as _, toDisplayString as r } from "vue";
2
- import { mergeColorMap as v, DEFAULT_PRIORITY_MAP as H, DEFAULT_STATUS_MAP as N, resolveBadge as x } from "../../composables/useBadge.js";
3
- const I = ["aria-selected"], K = ["for"], L = ["id", "checked"], U = {
1
+ import { defineComponent as N, computed as c, openBlock as l, createElementBlock as n, normalizeStyle as u, normalizeClass as M, withModifiers as g, createElementVNode as k, createCommentVNode as b, Fragment as m, renderList as A, renderSlot as P, toDisplayString as r, createBlock as L, resolveDynamicComponent as U } from "vue";
2
+ import { mergeColorMap as $, DEFAULT_PRIORITY_MAP as V, DEFAULT_STATUS_MAP as X, resolveBadge as D } from "../../composables/useBadge.js";
3
+ const F = ["aria-selected"], z = ["for"], O = ["id", "checked"], G = {
4
4
  key: 0,
5
5
  class: "of-badge of-badge--role"
6
- }, V = {
6
+ }, _ = {
7
7
  key: 1,
8
8
  class: "of-td-empty"
9
- }, X = {
9
+ }, j = {
10
10
  key: 3,
11
11
  class: "of-td-text"
12
- }, F = {
12
+ }, q = {
13
13
  key: 4,
14
14
  class: "of-td-id"
15
- }, z = {
15
+ }, J = {
16
16
  key: 5,
17
17
  class: "of-td-title"
18
- }, O = {
18
+ }, Q = {
19
19
  key: 6,
20
20
  class: "of-td-text"
21
- }, q = /* @__PURE__ */ B({
21
+ }, Z = ["disabled", "onClick", "onKeydown"], oe = /* @__PURE__ */ N({
22
22
  __name: "TableDataRow",
23
23
  props: {
24
24
  row: {},
@@ -28,11 +28,13 @@ const I = ["aria-selected"], K = ["for"], L = ["id", "checked"], U = {
28
28
  columns: {},
29
29
  density: { default: "standard" },
30
30
  priorityColorMap: { default: void 0 },
31
- statusColorMap: { default: void 0 }
31
+ statusColorMap: { default: void 0 },
32
+ showRowActions: { type: Boolean, default: !0 },
33
+ rowActionItems: { default: () => [] }
32
34
  },
33
35
  emits: ["select", "click"],
34
- setup(i, { emit: M }) {
35
- const s = i, y = M, C = {
36
+ setup(i, { emit: S }) {
37
+ const a = i, f = S, T = {
36
38
  compact: {
37
39
  rowHeight: 36,
38
40
  cellPaddingX: 10,
@@ -51,108 +53,143 @@ const I = ["aria-selected"], K = ["for"], L = ["id", "checked"], U = {
51
53
  cellPaddingY: 10,
52
54
  fillMinWidth: 240
53
55
  }
54
- }, u = d(() => C[s.density]), P = d(() => ({
55
- minHeight: `${u.value.rowHeight}px`
56
- })), k = d(() => ({
57
- padding: `${u.value.cellPaddingY}px ${u.value.cellPaddingX}px`
56
+ }, y = c(() => T[a.density]), B = c(() => ({
57
+ minHeight: `${y.value.rowHeight}px`
58
+ })), p = c(() => ({
59
+ padding: `${y.value.cellPaddingY}px ${y.value.cellPaddingX}px`
58
60
  }));
59
- function S(e) {
60
- const l = k.value;
61
+ function I(e) {
62
+ const o = p.value;
61
63
  if (e.width === "fill") {
62
- const t = `${e.minWidth ?? u.value.fillMinWidth}px`;
63
- return { ...l, flex: `1 1 ${t}`, minWidth: t };
64
+ const t = `${e.minWidth ?? y.value.fillMinWidth}px`;
65
+ return { ...o, flex: `1 1 ${t}`, minWidth: t };
64
66
  }
65
- return { ...l, width: `${e.width}px`, flexShrink: "0", flexGrow: "0" };
67
+ return { ...o, width: `${e.width}px`, flexShrink: "0", flexGrow: "0" };
66
68
  }
67
- const $ = d(
68
- () => v(H, s.priorityColorMap)
69
- ), D = d(() => v(N, s.statusColorMap));
70
- function p(e) {
71
- return x(e, $.value);
69
+ const R = c(
70
+ () => $(V, a.priorityColorMap)
71
+ ), E = c(() => $(X, a.statusColorMap));
72
+ function h(e) {
73
+ return D(e, R.value);
72
74
  }
73
- function m(e) {
74
- return x(e, D.value);
75
+ function C(e) {
76
+ return D(e, E.value);
75
77
  }
76
- function T(e) {
78
+ function K(e) {
77
79
  if (!e) return "-";
78
- const l = new Date(e);
79
- return isNaN(l.getTime()) ? e : `${l.getMonth() + 1}/${l.getDate()}`;
80
+ const o = new Date(e);
81
+ return isNaN(o.getTime()) ? e : `${o.getMonth() + 1}/${o.getDate()}`;
80
82
  }
81
- function w(e) {
82
- return s.row[e.key];
83
+ function v(e) {
84
+ return a.row[e.key];
83
85
  }
84
- function h(e) {
85
- const l = w(e);
86
- return l != null ? String(l) : "-";
86
+ function x(e) {
87
+ const o = v(e);
88
+ return o != null ? String(o) : "-";
87
89
  }
88
- function a(e) {
89
- const l = w(e);
90
- return typeof l == "string" ? l : "";
90
+ function s(e) {
91
+ const o = v(e);
92
+ return typeof o == "string" ? o : "";
91
93
  }
92
- function f() {
93
- const e = s.row[s.rowKey];
94
+ function d() {
95
+ const e = a.row[a.rowKey];
94
96
  return e != null ? String(e) : "";
95
97
  }
96
- function A(e) {
97
- e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), y("click", s.row)));
98
+ function Y(e) {
99
+ e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), f("click", a.row)));
100
+ }
101
+ function W(e, o) {
102
+ o.stopPropagation(), !e.disabled && e.onClick();
98
103
  }
99
- return (e, l) => (o(), n("div", {
100
- class: Y(["of-table-row", { "of-table-row--selected": i.selected }]),
104
+ function H(e, o) {
105
+ o.stopPropagation(), !e.disabled && (o.key !== "Enter" && o.key !== " " || (o.preventDefault(), e.onClick()));
106
+ }
107
+ return (e, o) => (l(), n("div", {
108
+ class: M(["of-table-row", { "of-table-row--selected": i.selected }]),
101
109
  role: "row",
102
110
  tabindex: "0",
103
111
  "aria-selected": i.selected || void 0,
104
- style: c(P.value),
105
- onClick: l[2] || (l[2] = (t) => y("click", i.row)),
106
- onKeydown: A
112
+ style: u(B.value),
113
+ onClick: o[3] || (o[3] = (t) => f("click", i.row)),
114
+ onKeydown: Y
107
115
  }, [
108
- i.selectable ? (o(), n("div", {
116
+ i.selectable ? (l(), n("div", {
109
117
  key: 0,
110
118
  class: "of-td of-td-checkbox",
111
119
  role: "gridcell",
112
- style: c(k.value),
113
- onClick: l[1] || (l[1] = E(() => {
120
+ style: u(p.value),
121
+ onClick: o[1] || (o[1] = g(() => {
114
122
  }, ["stop"]))
115
123
  }, [
116
- g("label", {
124
+ k("label", {
117
125
  class: "of-checkbox-label",
118
- for: `of-table-row-checkbox-${f()}`
126
+ for: `of-table-row-checkbox-${d()}`
119
127
  }, [
120
- g("input", {
121
- id: `of-table-row-checkbox-${f()}`,
128
+ k("input", {
129
+ id: `of-table-row-checkbox-${d()}`,
122
130
  type: "checkbox",
123
131
  class: "of-checkbox",
124
132
  checked: i.selected,
125
- onChange: l[0] || (l[0] = (t) => y("select", f()))
126
- }, null, 40, L),
127
- l[3] || (l[3] = g("span", { class: "of-sr-only" }, "选择当前行", -1))
128
- ], 8, K)
129
- ], 4)) : R("", !0),
130
- (o(!0), n(b, null, W(i.columns, (t) => (o(), n("div", {
133
+ onChange: o[0] || (o[0] = (t) => f("select", d()))
134
+ }, null, 40, O),
135
+ o[4] || (o[4] = k("span", { class: "of-sr-only" }, "选择当前行", -1))
136
+ ], 8, z)
137
+ ], 4)) : b("", !0),
138
+ (l(!0), n(m, null, A(i.columns, (t) => (l(), n("div", {
131
139
  key: t.key,
132
140
  class: "of-td",
133
141
  role: "gridcell",
134
- style: c(S(t))
142
+ style: u(I(t))
135
143
  }, [
136
- _(e.$slots, "cell", {
144
+ P(e.$slots, "cell", {
137
145
  row: i.row,
138
146
  col: t
139
147
  }, () => [
140
- t.key === "status" ? (o(), n("span", {
148
+ t.key === "status" ? (l(), n("span", {
141
149
  key: 0,
142
150
  class: "of-badge",
143
- style: c(m(a(t)).style)
144
- }, r(m(a(t)).label), 5)) : t.key === "priority" ? (o(), n("span", {
151
+ style: u(C(s(t)).style)
152
+ }, r(C(s(t)).label), 5)) : t.key === "priority" ? (l(), n("span", {
145
153
  key: 1,
146
154
  class: "of-badge",
147
- style: c(p(a(t)).style)
148
- }, r(p(a(t)).label), 5)) : t.key === "role" ? (o(), n(b, { key: 2 }, [
149
- a(t) ? (o(), n("span", U, r(a(t)), 1)) : (o(), n("span", V, "-"))
150
- ], 64)) : t.key === "updatedAt" ? (o(), n("span", X, r(T(a(t))), 1)) : t.key === "id" ? (o(), n("span", F, r(f()), 1)) : t.key === "title" ? (o(), n("span", z, r(h(t)), 1)) : (o(), n("span", O, r(h(t)), 1))
155
+ style: u(h(s(t)).style)
156
+ }, r(h(s(t)).label), 5)) : t.key === "role" ? (l(), n(m, { key: 2 }, [
157
+ s(t) ? (l(), n("span", G, r(s(t)), 1)) : (l(), n("span", _, "-"))
158
+ ], 64)) : t.key === "updatedAt" ? (l(), n("span", j, r(K(s(t))), 1)) : t.key === "id" ? (l(), n("span", q, r(d()), 1)) : t.key === "title" ? (l(), n("span", J, r(x(t)), 1)) : (l(), n("span", Q, r(x(t)), 1))
159
+ ], !0)
160
+ ], 4))), 128)),
161
+ i.showRowActions && i.rowActionItems.length ? (l(), n("div", {
162
+ key: 1,
163
+ class: "of-table-row__actions",
164
+ "aria-label": "行快捷操作",
165
+ onClick: o[2] || (o[2] = g(() => {
166
+ }, ["stop"]))
167
+ }, [
168
+ P(e.$slots, "row-actions", {
169
+ row: i.row,
170
+ rowId: d(),
171
+ items: i.rowActionItems,
172
+ openDetail: () => f("click", i.row)
173
+ }, () => [
174
+ (l(!0), n(m, null, A(i.rowActionItems, (t) => (l(), n("button", {
175
+ key: t.key,
176
+ type: "button",
177
+ class: M(["of-table-row__action-btn", { "of-table-row__action-btn--danger": t.variant === "danger" }]),
178
+ disabled: t.disabled,
179
+ onClick: g((w) => W(t, w), ["stop"]),
180
+ onKeydown: (w) => H(t, w)
181
+ }, [
182
+ t.icon ? (l(), L(U(t.icon), {
183
+ key: 0,
184
+ class: "of-table-row__action-icon"
185
+ })) : b("", !0),
186
+ k("span", null, r(t.label), 1)
187
+ ], 42, Z))), 128))
151
188
  ], !0)
152
- ], 4))), 128))
153
- ], 46, I));
189
+ ])) : b("", !0)
190
+ ], 46, F));
154
191
  }
155
192
  });
156
193
  export {
157
- q as default
194
+ oe as default
158
195
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableFilterPanel.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-3e9c57c5"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-66f74376"]]);
5
5
  export {
6
- c as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableGroupRow.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-42db94c3"]]);
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2d6dc6c9"]]);
5
5
  export {
6
- m as default
6
+ c as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableHeaderRow.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-9b7b027a"]]);
3
+ import e from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-67029c0e"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableToolbar.vue2.js";
2
2
  /* empty css */
3
3
  import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-c3196e5a"]]);
4
+ const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-8aa06fe0"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./Tabs.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-6c4531cc"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-43719fd1"]]);
5
5
  export {
6
6
  m as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import t from "./ActivityTimeline.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-a9a57957"]]);
4
+ const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-98deb1a5"]]);
5
5
  export {
6
6
  r as default
7
7
  };