@oneflowui/ui 0.5.6 → 0.5.8

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 (213) hide show
  1. package/README.md +11 -0
  2. package/dist/components/ContextMenu/index.vue.js +2 -2
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
  5. package/dist/components/Dashboard/index.vue.d.ts +3 -2
  6. package/dist/components/Dashboard/index.vue.js +2 -2
  7. package/dist/components/ai/AiSender.vue.js +2 -2
  8. package/dist/components/ai/AiSender.vue2.js +8 -7
  9. package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
  10. package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
  11. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  12. package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
  13. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  14. package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
  15. package/dist/components/base/Accordion.vue.js +1 -1
  16. package/dist/components/base/Avatar.vue.d.ts +3 -0
  17. package/dist/components/base/Avatar.vue.js +4 -4
  18. package/dist/components/base/Avatar.vue2.js +8 -8
  19. package/dist/components/base/Badge.vue.d.ts +2 -0
  20. package/dist/components/base/Badge.vue.js +2 -2
  21. package/dist/components/base/Badge.vue2.js +2 -2
  22. package/dist/components/base/ButtonGroup.vue.js +2 -2
  23. package/dist/components/base/ButtonGroup.vue2.js +2 -2
  24. package/dist/components/base/ChainItem.vue.d.ts +6 -0
  25. package/dist/components/base/ChainItem.vue.js +2 -2
  26. package/dist/components/base/ChainItem.vue2.js +17 -17
  27. package/dist/components/base/DropdownMenu.vue.js +2 -2
  28. package/dist/components/base/DropdownMenu.vue2.js +22 -20
  29. package/dist/components/base/EmptyState.vue.js +2 -2
  30. package/dist/components/base/EmptyState.vue2.js +2 -2
  31. package/dist/components/base/InfoCard.vue.d.ts +9 -0
  32. package/dist/components/base/InfoCard.vue.js +2 -2
  33. package/dist/components/base/InfoCard.vue2.js +65 -57
  34. package/dist/components/base/MonitorItem.vue.js +2 -2
  35. package/dist/components/base/MonitorItem.vue2.js +33 -25
  36. package/dist/components/base/PersonaCard.vue.d.ts +5 -0
  37. package/dist/components/base/PersonaCard.vue.js +3 -3
  38. package/dist/components/base/PersonaCard.vue2.js +56 -50
  39. package/dist/components/base/ProgressBar.vue.d.ts +1 -0
  40. package/dist/components/base/ProgressBar.vue.js +2 -2
  41. package/dist/components/base/ProgressBar.vue2.js +10 -10
  42. package/dist/components/base/RangeSlider.vue.d.ts +15 -0
  43. package/dist/components/base/RangeSlider.vue.js +1 -1
  44. package/dist/components/base/RangeSlider.vue2.js +22 -15
  45. package/dist/components/base/RefTag.vue.d.ts +4 -0
  46. package/dist/components/base/RefTag.vue.js +3 -3
  47. package/dist/components/base/RefTag.vue2.js +14 -14
  48. package/dist/components/base/SearchHighlight.vue.js +1 -1
  49. package/dist/components/base/SectionBlock.vue.js +2 -2
  50. package/dist/components/base/SectionBlock.vue2.js +54 -48
  51. package/dist/components/base/SelectBadge.vue.d.ts +5 -0
  52. package/dist/components/base/SelectBadge.vue.js +3 -3
  53. package/dist/components/base/SelectBadge.vue2.js +36 -28
  54. package/dist/components/base/StatisticCard.vue.js +1 -1
  55. package/dist/components/base/StatusIndicator.vue.js +2 -2
  56. package/dist/components/base/StatusIndicator.vue2.js +2 -2
  57. package/dist/components/base/StatusSummary.vue.js +2 -2
  58. package/dist/components/base/Stepper.vue.js +2 -2
  59. package/dist/components/base/Switch.vue.js +2 -2
  60. package/dist/components/base/ToolbarBtn.vue.js +2 -2
  61. package/dist/components/base/ViewModeGroup.vue.js +1 -1
  62. package/dist/components/base/ViewModeGroup.vue2.js +3 -3
  63. package/dist/components/base/ViewSwitcher.vue.js +1 -1
  64. package/dist/components/base/ViewSwitcher.vue2.js +3 -3
  65. package/dist/components/base/ViewTab.vue.js +1 -1
  66. package/dist/components/base/ViewTab.vue2.js +5 -6
  67. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  68. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
  69. package/dist/components/database/DatabaseView.vue.d.ts +6 -1
  70. package/dist/components/database/DatabaseView.vue.js +2 -2
  71. package/dist/components/database/DatabaseView.vue2.js +438 -293
  72. package/dist/components/detail/PropPanel.vue.js +2 -2
  73. package/dist/components/detail/PropPanel.vue2.js +34 -30
  74. package/dist/components/detail/PropRow.vue.d.ts +6 -0
  75. package/dist/components/detail/PropRow.vue.js +2 -2
  76. package/dist/components/detail/PropRow.vue2.js +24 -24
  77. package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
  78. package/dist/components/editor/BlockQuote.vue.js +1 -1
  79. package/dist/components/editor/BlockQuote.vue2.js +43 -29
  80. package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
  81. package/dist/components/editor/ContentBlock.vue.js +2 -2
  82. package/dist/components/editor/ContentBlock.vue2.js +54 -33
  83. package/dist/components/editor/RichTextEditor.vue.js +2 -2
  84. package/dist/components/editor/RichTextEditor.vue2.js +10 -14
  85. package/dist/components/field/FieldAttachment.vue.js +2 -2
  86. package/dist/components/field/FieldAttachment.vue2.js +30 -32
  87. package/dist/components/field/FieldAutoNumber.vue.js +2 -2
  88. package/dist/components/field/FieldCheckbox.vue.js +2 -2
  89. package/dist/components/field/FieldCheckbox.vue2.js +13 -11
  90. package/dist/components/field/FieldCreator.vue.js +2 -2
  91. package/dist/components/field/FieldCurrency.vue.js +2 -2
  92. package/dist/components/field/FieldCurrency.vue2.js +15 -14
  93. package/dist/components/field/FieldDate.vue.js +1 -1
  94. package/dist/components/field/FieldDate.vue2.js +14 -16
  95. package/dist/components/field/FieldDatetime.vue.js +1 -1
  96. package/dist/components/field/FieldDatetime.vue2.js +12 -11
  97. package/dist/components/field/FieldEmail.vue.js +2 -2
  98. package/dist/components/field/FieldEmail.vue2.js +14 -13
  99. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  100. package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
  101. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  102. package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
  103. package/dist/components/field/FieldNumber.vue.js +3 -3
  104. package/dist/components/field/FieldNumber.vue2.js +19 -18
  105. package/dist/components/field/FieldPhone.vue.js +2 -2
  106. package/dist/components/field/FieldPhone.vue2.js +12 -11
  107. package/dist/components/field/FieldProgress.vue.js +1 -1
  108. package/dist/components/field/FieldProgress.vue2.js +18 -17
  109. package/dist/components/field/FieldRating.vue.js +2 -2
  110. package/dist/components/field/FieldRating.vue2.js +22 -16
  111. package/dist/components/field/FieldRelation.vue.js +1 -1
  112. package/dist/components/field/FieldRelation.vue2.js +25 -22
  113. package/dist/components/field/FieldRichText.vue.js +1 -1
  114. package/dist/components/field/FieldRichText.vue2.js +10 -7
  115. package/dist/components/field/FieldSelect.vue.js +2 -2
  116. package/dist/components/field/FieldSelect.vue2.js +81 -63
  117. package/dist/components/field/FieldText.vue.js +2 -2
  118. package/dist/components/field/FieldText.vue2.js +17 -16
  119. package/dist/components/field/FieldUrl.vue.js +2 -2
  120. package/dist/components/field/FieldUrl.vue2.js +17 -16
  121. package/dist/components/form/FormDesigner.vue.js +2 -2
  122. package/dist/components/form/FormDesigner.vue2.js +83 -78
  123. package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
  124. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  125. package/dist/components/gallery/GalleryCard.vue2.js +2 -1
  126. package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
  127. package/dist/components/kanban/KanbanCard.vue.js +1 -1
  128. package/dist/components/kanban/KanbanCard.vue2.js +15 -14
  129. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
  130. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  131. package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
  132. package/dist/components/kanban/QuickAddRow.vue.js +2 -2
  133. package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
  134. package/dist/components/layout/Navbar.vue.js +3 -3
  135. package/dist/components/layout/Navbar.vue2.js +5 -4
  136. package/dist/components/layout/Sidebar.vue.js +2 -2
  137. package/dist/components/layout/Sidebar.vue2.js +1 -1
  138. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  139. package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
  140. package/dist/components/overlay/Dialog.vue.d.ts +1 -0
  141. package/dist/components/overlay/Dialog.vue.js +1 -1
  142. package/dist/components/overlay/Dialog.vue2.js +9 -9
  143. package/dist/components/overlay/Drawer.vue.d.ts +2 -1
  144. package/dist/components/overlay/Drawer.vue.js +2 -2
  145. package/dist/components/overlay/Drawer.vue2.js +35 -29
  146. package/dist/components/overlay/Modal.vue.d.ts +2 -1
  147. package/dist/components/overlay/Modal.vue.js +1 -1
  148. package/dist/components/overlay/Modal.vue2.js +34 -28
  149. package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
  150. package/dist/components/overlay/SidePanel.vue.js +1 -1
  151. package/dist/components/overlay/SidePanel.vue2.js +6 -6
  152. package/dist/components/split/SplitPane.vue.js +2 -2
  153. package/dist/components/split/SplitPane.vue2.js +11 -9
  154. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +4 -2
  155. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  156. package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
  157. package/dist/components/table/DataTable.vue.d.ts +9 -6
  158. package/dist/components/table/DataTable.vue.js +2 -2
  159. package/dist/components/table/DataTable.vue2.js +643 -521
  160. package/dist/components/table/DetailSheet.vue.d.ts +2 -0
  161. package/dist/components/table/DetailSheet.vue.js +2 -2
  162. package/dist/components/table/DetailSheet.vue2.js +154 -70
  163. package/dist/components/table/FieldCell.vue.d.ts +2 -1
  164. package/dist/components/table/FieldCell.vue.js +1 -1
  165. package/dist/components/table/FieldCell.vue2.js +57 -48
  166. package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
  167. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  168. package/dist/components/table/FieldTypePicker.vue2.js +1 -1
  169. package/dist/components/table/MobileListView.vue.d.ts +3 -2
  170. package/dist/components/table/MobileListView.vue.js +2 -2
  171. package/dist/components/table/MobileListView.vue2.js +57 -50
  172. package/dist/components/table/TableColumnManager.vue.js +1 -1
  173. package/dist/components/table/TableColumnManager.vue2.js +29 -28
  174. package/dist/components/table/TableDataRow.vue.d.ts +5 -1
  175. package/dist/components/table/TableDataRow.vue.js +3 -3
  176. package/dist/components/table/TableDataRow.vue2.js +102 -63
  177. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  178. package/dist/components/table/TableFilterPanel.vue2.js +3 -0
  179. package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
  180. package/dist/components/table/TableGroupRow.vue.js +2 -2
  181. package/dist/components/table/TableGroupRow.vue2.js +35 -30
  182. package/dist/components/table/TableHeaderRow.vue.d.ts +3 -1
  183. package/dist/components/table/TableHeaderRow.vue.js +1 -1
  184. package/dist/components/table/TableHeaderRow.vue2.js +111 -58
  185. package/dist/components/table/TableToolbar.vue.js +1 -1
  186. package/dist/components/table/TableToolbar.vue2.js +2 -2
  187. package/dist/components/tabs/TabPanel.vue.js +4 -4
  188. package/dist/components/tabs/TabPanel.vue2.js +1 -1
  189. package/dist/components/tabs/Tabs.vue.js +2 -2
  190. package/dist/components/tabs/Tabs.vue2.js +2 -2
  191. package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
  192. package/dist/components/timeline/GanttRow.vue.js +2 -2
  193. package/dist/components/timeline/GanttRow.vue2.js +68 -52
  194. package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
  195. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  196. package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
  197. package/dist/composables/useColumnResize.d.ts +4 -1
  198. package/dist/composables/useColumnResize.js +114 -45
  199. package/dist/composables/useKeyboardNavigation.d.ts +1 -1
  200. package/dist/composables/useRowDrag.d.ts +7 -5
  201. package/dist/composables/useRowDrag.js +24 -24
  202. package/dist/composables/useSupabaseProvider.d.ts +8 -1
  203. package/dist/composables/useTableData.d.ts +5 -3
  204. package/dist/composables/useTableGroup.d.ts +2 -2
  205. package/dist/composables/useViewPersistence.d.ts +32 -3
  206. package/dist/composables/useVirtualList.d.ts +1 -0
  207. package/dist/composables/useVirtualList.js +94 -81
  208. package/dist/plugin.js +103 -102
  209. package/dist/style.css +1 -1
  210. package/dist/types/index.d.ts +2 -1
  211. package/dist/utils/echarts.d.ts +1 -0
  212. package/dist/utils/supabaseSchema.d.ts +12 -0
  213. package/package.json +1 -1
@@ -8,6 +8,8 @@ type __VLS_Props = {
8
8
  columns: TableColumn[];
9
9
  fieldDefs?: CellFieldDef[];
10
10
  visible: boolean;
11
+ /** 作为右侧工作区内嵌时,不渲染 Teleport / 遮罩层 */
12
+ embedded?: boolean;
11
13
  /** 标记哪些字段是 content 字段(全宽 markdown 渲染) */
12
14
  contentFields?: string[];
13
15
  /** 是否显示为全屏模式(桌面端宽面板) */
@@ -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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-63a6599f"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-bac586d2"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,5 +1,5 @@
1
- import { defineComponent as V, ref as L, computed as c, openBlock as o, createBlock as k, Teleport as N, createVNode as E, Transition as H, withCtx as j, createElementBlock as d, withModifiers as z, normalizeClass as h, createElementVNode as n, Fragment as b, renderList as C, toDisplayString as v, createCommentVNode as g } from "vue";
2
- import O from "./FieldCell.vue.js";
1
+ import { defineComponent as H, ref as N, computed as h, openBlock as o, createBlock as C, Teleport as E, createVNode as j, Transition as z, withCtx as O, createElementBlock as a, normalizeClass as v, createElementVNode as e, Fragment as y, renderList as k, toDisplayString as _, createCommentVNode as m } from "vue";
2
+ import x from "./FieldCell.vue.js";
3
3
  import { useMarkdown as R } from "../../composables/useMarkdown.js";
4
4
  const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-sheet__label" }, G = { class: "of-detail-sheet__cell" }, I = {
5
5
  key: 1,
@@ -7,128 +7,212 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
7
7
  }, J = {
8
8
  key: 0,
9
9
  class: "of-detail-sheet__content"
10
- }, Q = { class: "of-detail-sheet__content-label" }, U = ["innerHTML"], W = { class: "of-detail-sheet__footer" }, X = ["disabled"], K = /* @__PURE__ */ V({
10
+ }, Q = { class: "of-detail-sheet__content-label" }, U = ["innerHTML"], W = { class: "of-detail-sheet__footer" }, X = ["disabled"], Y = {
11
+ key: 1,
12
+ class: "of-detail-sheet-shell of-detail-sheet-shell--embedded"
13
+ }, Z = { class: "of-detail-sheet__properties" }, $ = { class: "of-detail-sheet__label" }, K = { class: "of-detail-sheet__cell" }, ee = {
14
+ key: 1,
15
+ class: "of-detail-sheet__value"
16
+ }, te = {
17
+ key: 0,
18
+ class: "of-detail-sheet__content"
19
+ }, le = { class: "of-detail-sheet__content-label" }, se = ["innerHTML"], oe = { class: "of-detail-sheet__footer" }, ae = ["disabled"], fe = /* @__PURE__ */ H({
11
20
  __name: "DetailSheet",
12
21
  props: {
13
22
  row: {},
14
23
  columns: {},
15
24
  fieldDefs: {},
16
25
  visible: { type: Boolean },
26
+ embedded: { type: Boolean },
17
27
  contentFields: {},
18
28
  fullPage: { type: Boolean },
19
29
  readonly: { type: Boolean }
20
30
  },
21
31
  emits: ["close", "save", "delete", "cell-edit"],
22
- setup(s, { emit: p }) {
23
- const i = s, r = p, { renderMarkdown: w } = R({ showCopyButton: !0 }), a = L({}), D = c(() => Object.keys(a.value).length > 0), B = c(() => new Set(i.contentFields ?? []));
24
- function m(t) {
25
- var l;
26
- if (B.value.has(t.key)) return !0;
27
- const e = (l = i.fieldDefs) == null ? void 0 : l.find((f) => f.id === t.key);
28
- return (e == null ? void 0 : e.type) === "richtext";
32
+ setup(n, { emit: L }) {
33
+ const i = n, r = L, { renderMarkdown: S } = R({ showCopyButton: !0 }), d = N({}), g = h(() => Object.keys(d.value).length > 0), p = h(() => i.embedded || i.visible), V = h(() => new Set(i.contentFields ?? []));
34
+ function w(s) {
35
+ var t;
36
+ if (V.value.has(s.key)) return !0;
37
+ const l = (t = i.fieldDefs) == null ? void 0 : t.find((f) => f.id === s.key);
38
+ return (l == null ? void 0 : l.type) === "richtext";
29
39
  }
30
- const F = c(() => i.columns.filter((t) => !m(t))), y = c(() => i.columns.filter((t) => m(t)));
31
- function x(t) {
32
- var e;
33
- return ((e = i.fieldDefs) == null ? void 0 : e.find((l) => l.id === t)) ?? {
34
- id: t,
40
+ const D = h(() => i.columns.filter((s) => !w(s))), b = h(() => i.columns.filter((s) => w(s)));
41
+ function B(s) {
42
+ var l;
43
+ return ((l = i.fieldDefs) == null ? void 0 : l.find((t) => t.id === s)) ?? {
44
+ id: s,
35
45
  type: "text",
36
- label: t
46
+ label: s
37
47
  };
38
48
  }
39
- function u(t) {
40
- return t.key in a.value ? a.value[t.key] : i.row[t.key];
49
+ function u(s) {
50
+ return s.key in d.value ? d.value[s.key] : i.row[s.key];
41
51
  }
42
- function M(t) {
43
- const e = u(t);
44
- return typeof e != "string" || !e ? "" : w(e);
52
+ function F(s) {
53
+ const l = u(s);
54
+ return typeof l != "string" || !l ? "" : S(l);
45
55
  }
46
- function S(t, e, l) {
47
- a.value = { ...a.value, [e]: l }, r("cell-edit", { rowId: t, fieldId: e, value: l });
56
+ function M(s, l, t) {
57
+ d.value = { ...d.value, [l]: t }, r("cell-edit", { rowId: s, fieldId: l, value: t });
48
58
  }
49
59
  function P() {
50
- r("save", { rowId: i.row.id, fields: { ...a.value } }), a.value = {}, r("close");
60
+ r("save", { rowId: i.row.id, fields: { ...d.value } }), d.value = {}, r("close");
51
61
  }
52
- function _() {
53
- a.value = {}, r("close");
62
+ function c() {
63
+ d.value = {}, r("close");
54
64
  }
55
65
  function T() {
56
66
  r("delete", i.row.id), r("close");
57
67
  }
58
- return (t, e) => (o(), k(N, { to: "body" }, [
59
- E(H, { name: "of-sheet" }, {
60
- default: j(() => [
61
- s.visible ? (o(), d("div", {
68
+ return (s, l) => n.embedded ? p.value ? (o(), a("div", Y, [
69
+ e("div", {
70
+ class: v(["of-detail-sheet", { "of-detail-sheet--full-page": n.fullPage }])
71
+ }, [
72
+ e("div", { class: "of-detail-sheet__header" }, [
73
+ e("button", {
74
+ class: "of-detail-sheet__close",
75
+ onClick: c
76
+ }, "✕"),
77
+ l[3] || (l[3] = e("h3", { class: "of-detail-sheet__title" }, "记录详情", -1)),
78
+ l[4] || (l[4] = e("div", { class: "of-detail-sheet__header-spacer" }, null, -1))
79
+ ]),
80
+ e("div", {
81
+ class: v(["of-detail-sheet__body", { "of-detail-sheet__body--full-page": n.fullPage }])
82
+ }, [
83
+ e("div", Z, [
84
+ (o(!0), a(y, null, k(D.value, (t) => {
85
+ var f;
86
+ return o(), a("div", {
87
+ key: t.key,
88
+ class: "of-detail-sheet__field"
89
+ }, [
90
+ e("span", $, _(t.label), 1),
91
+ e("div", K, [
92
+ (f = n.fieldDefs) != null && f.length ? (o(), C(x, {
93
+ key: 0,
94
+ "row-id": n.row.id,
95
+ field: B(t.key),
96
+ value: u(t),
97
+ readonly: n.readonly,
98
+ onCommit: M
99
+ }, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), a("span", ee, _(u(t) ?? "—"), 1))
100
+ ])
101
+ ]);
102
+ }), 128))
103
+ ]),
104
+ b.value.length > 0 ? (o(), a("div", te, [
105
+ (o(!0), a(y, null, k(b.value, (t) => (o(), a("div", {
106
+ key: t.key,
107
+ class: "of-detail-sheet__content-block"
108
+ }, [
109
+ e("span", le, _(t.label), 1),
110
+ e("div", {
111
+ class: "of-detail-sheet__markdown of-markdown",
112
+ innerHTML: F(t)
113
+ }, null, 8, se)
114
+ ]))), 128))
115
+ ])) : m("", !0)
116
+ ], 2),
117
+ e("div", oe, [
118
+ e("button", {
119
+ class: "of-detail-sheet__btn of-detail-sheet__btn--delete",
120
+ onClick: T
121
+ }, " 删除 "),
122
+ l[5] || (l[5] = e("div", { class: "of-detail-sheet__footer-spacer" }, null, -1)),
123
+ e("button", {
124
+ class: "of-detail-sheet__btn of-detail-sheet__btn--cancel",
125
+ onClick: c
126
+ }, " 取消 "),
127
+ e("button", {
128
+ class: "of-detail-sheet__btn of-detail-sheet__btn--save",
129
+ disabled: !g.value,
130
+ onClick: P
131
+ }, " 保存 ", 8, ae)
132
+ ])
133
+ ], 2)
134
+ ])) : m("", !0) : (o(), C(E, {
135
+ key: 0,
136
+ to: "body"
137
+ }, [
138
+ j(z, { name: "of-sheet" }, {
139
+ default: O(() => [
140
+ p.value ? (o(), a("div", {
62
141
  key: 0,
63
- class: h(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": s.fullPage }]),
64
- onClick: z(_, ["self"])
142
+ class: v(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": n.fullPage }])
65
143
  }, [
66
- n("div", {
67
- class: h(["of-detail-sheet", { "of-detail-sheet--full-page": s.fullPage }])
144
+ e("button", {
145
+ type: "button",
146
+ class: "of-detail-sheet-overlay__hitarea",
147
+ "aria-label": "关闭详情",
148
+ onClick: c
149
+ }),
150
+ e("div", {
151
+ class: v(["of-detail-sheet", { "of-detail-sheet--full-page": n.fullPage }])
68
152
  }, [
69
- n("div", { class: "of-detail-sheet__header" }, [
70
- n("button", {
153
+ e("div", { class: "of-detail-sheet__header" }, [
154
+ e("button", {
71
155
  class: "of-detail-sheet__close",
72
- onClick: _
156
+ onClick: c
73
157
  }, "✕"),
74
- e[0] || (e[0] = n("h3", { class: "of-detail-sheet__title" }, "记录详情", -1)),
75
- e[1] || (e[1] = n("div", { class: "of-detail-sheet__header-spacer" }, null, -1))
158
+ l[0] || (l[0] = e("h3", { class: "of-detail-sheet__title" }, "记录详情", -1)),
159
+ l[1] || (l[1] = e("div", { class: "of-detail-sheet__header-spacer" }, null, -1))
76
160
  ]),
77
- n("div", {
78
- class: h(["of-detail-sheet__body", { "of-detail-sheet__body--full-page": s.fullPage }])
161
+ e("div", {
162
+ class: v(["of-detail-sheet__body", { "of-detail-sheet__body--full-page": n.fullPage }])
79
163
  }, [
80
- n("div", q, [
81
- (o(!0), d(b, null, C(F.value, (l) => {
164
+ e("div", q, [
165
+ (o(!0), a(y, null, k(D.value, (t) => {
82
166
  var f;
83
- return o(), d("div", {
84
- key: l.key,
167
+ return o(), a("div", {
168
+ key: t.key,
85
169
  class: "of-detail-sheet__field"
86
170
  }, [
87
- n("label", A, v(l.label), 1),
88
- n("div", G, [
89
- (f = s.fieldDefs) != null && f.length ? (o(), k(O, {
171
+ e("span", A, _(t.label), 1),
172
+ e("div", G, [
173
+ (f = n.fieldDefs) != null && f.length ? (o(), C(x, {
90
174
  key: 0,
91
- "row-id": s.row.id,
92
- field: x(l.key),
93
- value: u(l),
94
- readonly: s.readonly,
95
- onCommit: S
96
- }, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), d("span", I, v(u(l) ?? "—"), 1))
175
+ "row-id": n.row.id,
176
+ field: B(t.key),
177
+ value: u(t),
178
+ readonly: n.readonly,
179
+ onCommit: M
180
+ }, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), a("span", I, _(u(t) ?? "—"), 1))
97
181
  ])
98
182
  ]);
99
183
  }), 128))
100
184
  ]),
101
- y.value.length > 0 ? (o(), d("div", J, [
102
- (o(!0), d(b, null, C(y.value, (l) => (o(), d("div", {
103
- key: l.key,
185
+ b.value.length > 0 ? (o(), a("div", J, [
186
+ (o(!0), a(y, null, k(b.value, (t) => (o(), a("div", {
187
+ key: t.key,
104
188
  class: "of-detail-sheet__content-block"
105
189
  }, [
106
- n("label", Q, v(l.label), 1),
107
- n("div", {
190
+ e("span", Q, _(t.label), 1),
191
+ e("div", {
108
192
  class: "of-detail-sheet__markdown of-markdown",
109
- innerHTML: M(l)
193
+ innerHTML: F(t)
110
194
  }, null, 8, U)
111
195
  ]))), 128))
112
- ])) : g("", !0)
196
+ ])) : m("", !0)
113
197
  ], 2),
114
- n("div", W, [
115
- n("button", {
198
+ e("div", W, [
199
+ e("button", {
116
200
  class: "of-detail-sheet__btn of-detail-sheet__btn--delete",
117
201
  onClick: T
118
202
  }, " 删除 "),
119
- e[2] || (e[2] = n("div", { class: "of-detail-sheet__footer-spacer" }, null, -1)),
120
- n("button", {
203
+ l[2] || (l[2] = e("div", { class: "of-detail-sheet__footer-spacer" }, null, -1)),
204
+ e("button", {
121
205
  class: "of-detail-sheet__btn of-detail-sheet__btn--cancel",
122
- onClick: _
206
+ onClick: c
123
207
  }, " 取消 "),
124
- n("button", {
208
+ e("button", {
125
209
  class: "of-detail-sheet__btn of-detail-sheet__btn--save",
126
- disabled: !D.value,
210
+ disabled: !g.value,
127
211
  onClick: P
128
212
  }, " 保存 ", 8, X)
129
213
  ])
130
214
  ], 2)
131
- ], 2)) : g("", !0)
215
+ ], 2)) : m("", !0)
132
216
  ]),
133
217
  _: 1
134
218
  })
@@ -136,5 +220,5 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
136
220
  }
137
221
  });
138
222
  export {
139
- K as default
223
+ fe as default
140
224
  };
@@ -28,6 +28,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
28
28
  onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
29
29
  onTabNext?: (() => any) | undefined;
30
30
  }>, {
31
+ value: string | number | boolean | string[] | null;
31
32
  readonly: boolean;
32
- }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
33
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
33
34
  export default _default;
@@ -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-545cb874"]]);
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8e46c20b"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,32 +1,32 @@
1
- import { defineComponent as N, computed as o, defineAsyncComponent as e, openBlock as n, createElementBlock as a, normalizeClass as A, createBlock as c, Suspense as B, withCtx as f, resolveDynamicComponent as S, createElementVNode as F, Fragment as D, unref as M, toDisplayString as T } from "vue";
2
- import { useInlineEdit as V } from "../../composables/useInlineEdit.js";
3
- const j = {
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";
2
+ import { useInlineEdit as j } from "../../composables/useInlineEdit.js";
3
+ const z = {
4
4
  key: 1,
5
5
  class: "of-field-cell__display"
6
- }, R = /* @__PURE__ */ N({
6
+ }, $ = /* @__PURE__ */ S({
7
7
  __name: "FieldCell",
8
8
  props: {
9
9
  rowId: {},
10
10
  field: {},
11
- value: { type: [String, Number, Boolean, Array, null] },
11
+ value: { type: [String, Number, Boolean, Array, null], default: void 0 },
12
12
  readonly: { type: Boolean, default: !1 }
13
13
  },
14
14
  emits: ["commit", "cancel", "tabNext"],
15
- setup(l, { emit: s }) {
16
- const t = l, r = s, { isEditing: p, activate: y, commit: v, cancel: k } = V(), d = o(() => p(t.rowId, t.field.id)), m = o(() => t.readonly || t.field.readonly);
17
- function x() {
18
- m.value || y(t.rowId, t.field.id);
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);
17
+ function m() {
18
+ a.value || k(t.rowId, t.field.id);
19
19
  }
20
- function C(i) {
21
- v(t.rowId, t.field.id, i), r("commit", t.rowId, t.field.id, i);
20
+ function C(l) {
21
+ w(t.rowId, t.field.id, l), c("commit", t.rowId, t.field.id, l);
22
22
  }
23
23
  function g() {
24
- k(), r("cancel");
24
+ x(), c("cancel");
25
25
  }
26
- function b() {
27
- r("tabNext");
26
+ function E() {
27
+ c("tabNext");
28
28
  }
29
- const h = {
29
+ const I = {
30
30
  text: e(() => import("../field/FieldText.vue.js")),
31
31
  number: e(() => import("../field/FieldNumber.vue.js")),
32
32
  checkbox: e(() => import("../field/FieldCheckbox.vue.js")),
@@ -45,43 +45,52 @@ const j = {
45
45
  relation: e(() => import("../field/FieldRelation.vue.js")),
46
46
  attachment: e(() => import("../field/FieldAttachment.vue.js")),
47
47
  phone: e(() => import("../field/FieldPhone.vue.js"))
48
- }, w = e(
48
+ }, N = e(
49
49
  () => import("../field/FieldMarkdownPreview.vue.js")
50
- ), E = o(() => h[t.field.type]), I = o(() => {
51
- const i = t.value;
52
- return i == null || i === "" ? "—" : Array.isArray(i) ? i.join(", ") : typeof i == "boolean" ? i ? "✓" : "—" : String(i);
50
+ ), A = r(() => I[t.field.type]), B = r(() => {
51
+ const l = t.value;
52
+ return l == null || l === "" ? "—" : Array.isArray(l) ? l.join(", ") : typeof l == "boolean" ? l ? "✓" : "—" : String(l);
53
53
  });
54
- return (i, u) => (n(), a("div", {
55
- class: A(["of-field-cell", {
56
- "of-field-cell--editing": d.value,
57
- "of-field-cell--readonly": m.value
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
58
58
  }]),
59
- onClick: x
60
- }, [
61
- d.value ? (n(), c(B, { key: 0 }, {
62
- fallback: f(() => [...u[0] || (u[0] = [
63
- F("span", { class: "of-field-cell__loading" }, "...", -1)
64
- ])]),
65
- default: f(() => [
66
- (n(), c(S(E.value), {
67
- value: l.value,
68
- field: l.field,
69
- onCommit: C,
70
- onCancel: g,
71
- onTabNext: b
72
- }, null, 40, ["value", "field"]))
73
- ]),
74
- _: 1
75
- })) : (n(), a(D, { key: 1 }, [
76
- l.field.type === "richtext" && typeof l.value == "string" && l.value ? (n(), c(M(w), {
77
- key: 0,
78
- content: l.value,
79
- "max-lines": 2
80
- }, null, 8, ["content"])) : (n(), a("span", j, T(I.value), 1))
81
- ], 64))
82
- ], 2));
59
+ type: a.value || o.value ? void 0 : "button",
60
+ "aria-label": `${i.field.label}字段`,
61
+ onClick: m,
62
+ onKeydown: [
63
+ p(y(m, ["prevent"]), ["enter"]),
64
+ p(y(m, ["prevent"]), ["space"])
65
+ ]
66
+ }, {
67
+ default: u(() => [
68
+ o.value ? (n(), d(K, { key: 0 }, {
69
+ fallback: u(() => [...f[0] || (f[0] = [
70
+ M("span", { class: "of-field-cell__loading" }, "...", -1)
71
+ ])]),
72
+ default: u(() => [
73
+ (n(), d(s(A.value), {
74
+ value: i.value,
75
+ field: i.field,
76
+ onCommit: C,
77
+ onCancel: g,
78
+ onTabNext: E
79
+ }, null, 40, ["value", "field"]))
80
+ ]),
81
+ _: 1
82
+ })) : (n(), v(D, { key: 1 }, [
83
+ i.field.type === "richtext" && typeof i.value == "string" && i.value ? (n(), d(T(N), {
84
+ key: 0,
85
+ content: i.value,
86
+ "max-lines": 2
87
+ }, null, 8, ["content"])) : (n(), v("span", z, V(B.value), 1))
88
+ ], 64))
89
+ ]),
90
+ _: 1
91
+ }, 40, ["class", "type", "aria-label", "onKeydown"]));
83
92
  }
84
93
  });
85
94
  export {
86
- R as default
95
+ $ as default
87
96
  };
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
10
10
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
11
11
  onSelect?: ((type: FieldType) => any) | undefined;
12
12
  }>, {
13
+ currentType: FieldType;
13
14
  searchable: boolean;
14
15
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
15
16
  export default _default;
@@ -1,7 +1,7 @@
1
- import o from "./FieldTypePicker.vue2.js";
1
+ import e from "./FieldTypePicker.vue2.js";
2
2
  /* empty css */
3
- import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const a = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a1d48545"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ o(e, [["__scopeId", "data-v-8b7ffaee"]]);
5
5
  export {
6
- a as default
6
+ p as default
7
7
  };
@@ -6,7 +6,7 @@ const j = { class: "of-field-type-picker" }, A = {
6
6
  }, J = { class: "of-field-type-picker__list" }, K = { class: "of-field-type-picker__group-label" }, R = ["onClick"], ee = /* @__PURE__ */ k({
7
7
  __name: "FieldTypePicker",
8
8
  props: {
9
- currentType: {},
9
+ currentType: { default: void 0 },
10
10
  searchable: { type: Boolean, default: !0 }
11
11
  },
12
12
  emits: ["select"],
@@ -27,13 +27,14 @@ declare function __VLS_template(): {
27
27
  };
28
28
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
29
  declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
- "row-click": (row: any) => any;
30
+ "row-click": (row: TableRow) => any;
31
31
  "add-row": () => any;
32
32
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
33
- "onRow-click"?: ((row: any) => any) | undefined;
33
+ "onRow-click"?: ((row: TableRow) => any) | undefined;
34
34
  "onAdd-row"?: (() => any) | undefined;
35
35
  }>, {
36
36
  selectable: boolean;
37
+ statusColorMap: ColorMap;
37
38
  addable: boolean;
38
39
  readonly: boolean;
39
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
@@ -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 f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e312b60f"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccf7d630"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };