@oneflowui/ui 0.5.5 → 0.5.7

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 (203) hide show
  1. package/dist/components/ContextMenu/index.vue.js +2 -2
  2. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  3. package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
  4. package/dist/components/Dashboard/index.vue.d.ts +2 -1
  5. package/dist/components/Dashboard/index.vue.js +2 -2
  6. package/dist/components/ai/AiSender.vue.js +2 -2
  7. package/dist/components/ai/AiSender.vue2.js +8 -7
  8. package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
  9. package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
  10. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  11. package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
  12. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  13. package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
  14. package/dist/components/base/Accordion.vue.js +1 -1
  15. package/dist/components/base/Avatar.vue.d.ts +3 -0
  16. package/dist/components/base/Avatar.vue.js +4 -4
  17. package/dist/components/base/Avatar.vue2.js +8 -8
  18. package/dist/components/base/Badge.vue.d.ts +2 -0
  19. package/dist/components/base/Badge.vue.js +2 -2
  20. package/dist/components/base/Badge.vue2.js +2 -2
  21. package/dist/components/base/ButtonGroup.vue.js +2 -2
  22. package/dist/components/base/ButtonGroup.vue2.js +2 -2
  23. package/dist/components/base/ChainItem.vue.d.ts +6 -0
  24. package/dist/components/base/ChainItem.vue.js +2 -2
  25. package/dist/components/base/ChainItem.vue2.js +17 -17
  26. package/dist/components/base/DropdownMenu.vue.js +2 -2
  27. package/dist/components/base/DropdownMenu.vue2.js +22 -20
  28. package/dist/components/base/EmptyState.vue.js +2 -2
  29. package/dist/components/base/EmptyState.vue2.js +2 -2
  30. package/dist/components/base/InfoCard.vue.d.ts +9 -0
  31. package/dist/components/base/InfoCard.vue.js +2 -2
  32. package/dist/components/base/InfoCard.vue2.js +65 -57
  33. package/dist/components/base/MonitorItem.vue.js +2 -2
  34. package/dist/components/base/MonitorItem.vue2.js +33 -25
  35. package/dist/components/base/PersonaCard.vue.d.ts +5 -0
  36. package/dist/components/base/PersonaCard.vue.js +3 -3
  37. package/dist/components/base/PersonaCard.vue2.js +56 -50
  38. package/dist/components/base/ProgressBar.vue.d.ts +1 -0
  39. package/dist/components/base/ProgressBar.vue.js +2 -2
  40. package/dist/components/base/ProgressBar.vue2.js +10 -10
  41. package/dist/components/base/RangeSlider.vue.d.ts +15 -0
  42. package/dist/components/base/RangeSlider.vue.js +1 -1
  43. package/dist/components/base/RangeSlider.vue2.js +22 -15
  44. package/dist/components/base/RefTag.vue.d.ts +4 -0
  45. package/dist/components/base/RefTag.vue.js +3 -3
  46. package/dist/components/base/RefTag.vue2.js +14 -14
  47. package/dist/components/base/SearchHighlight.vue.js +1 -1
  48. package/dist/components/base/SectionBlock.vue.js +2 -2
  49. package/dist/components/base/SectionBlock.vue2.js +54 -48
  50. package/dist/components/base/SelectBadge.vue.d.ts +5 -0
  51. package/dist/components/base/SelectBadge.vue.js +3 -3
  52. package/dist/components/base/SelectBadge.vue2.js +36 -28
  53. package/dist/components/base/StatisticCard.vue.js +1 -1
  54. package/dist/components/base/StatusIndicator.vue.js +2 -2
  55. package/dist/components/base/StatusIndicator.vue2.js +2 -2
  56. package/dist/components/base/StatusSummary.vue.js +2 -2
  57. package/dist/components/base/Stepper.vue.js +2 -2
  58. package/dist/components/base/Switch.vue.js +2 -2
  59. package/dist/components/base/ToolbarBtn.vue.js +2 -2
  60. package/dist/components/base/ViewModeGroup.vue.js +1 -1
  61. package/dist/components/base/ViewModeGroup.vue2.js +3 -3
  62. package/dist/components/base/ViewSwitcher.vue.js +1 -1
  63. package/dist/components/base/ViewSwitcher.vue2.js +3 -3
  64. package/dist/components/base/ViewTab.vue.js +1 -1
  65. package/dist/components/base/ViewTab.vue2.js +5 -6
  66. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  67. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
  68. package/dist/components/detail/PropPanel.vue.js +2 -2
  69. package/dist/components/detail/PropPanel.vue2.js +34 -30
  70. package/dist/components/detail/PropRow.vue.d.ts +6 -0
  71. package/dist/components/detail/PropRow.vue.js +2 -2
  72. package/dist/components/detail/PropRow.vue2.js +24 -24
  73. package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
  74. package/dist/components/editor/BlockQuote.vue.js +1 -1
  75. package/dist/components/editor/BlockQuote.vue2.js +43 -29
  76. package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
  77. package/dist/components/editor/ContentBlock.vue.js +2 -2
  78. package/dist/components/editor/ContentBlock.vue2.js +54 -33
  79. package/dist/components/editor/RichTextEditor.vue.js +2 -2
  80. package/dist/components/editor/RichTextEditor.vue2.js +10 -14
  81. package/dist/components/field/FieldAttachment.vue.js +2 -2
  82. package/dist/components/field/FieldAttachment.vue2.js +30 -32
  83. package/dist/components/field/FieldAutoNumber.vue.js +2 -2
  84. package/dist/components/field/FieldCheckbox.vue.js +2 -2
  85. package/dist/components/field/FieldCheckbox.vue2.js +13 -11
  86. package/dist/components/field/FieldCreator.vue.js +2 -2
  87. package/dist/components/field/FieldCurrency.vue.js +2 -2
  88. package/dist/components/field/FieldCurrency.vue2.js +15 -14
  89. package/dist/components/field/FieldDate.vue.js +1 -1
  90. package/dist/components/field/FieldDate.vue2.js +14 -16
  91. package/dist/components/field/FieldDatetime.vue.js +1 -1
  92. package/dist/components/field/FieldDatetime.vue2.js +12 -11
  93. package/dist/components/field/FieldEmail.vue.js +2 -2
  94. package/dist/components/field/FieldEmail.vue2.js +14 -13
  95. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  96. package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
  97. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  98. package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
  99. package/dist/components/field/FieldNumber.vue.js +3 -3
  100. package/dist/components/field/FieldNumber.vue2.js +19 -18
  101. package/dist/components/field/FieldPhone.vue.js +2 -2
  102. package/dist/components/field/FieldPhone.vue2.js +12 -11
  103. package/dist/components/field/FieldProgress.vue.js +1 -1
  104. package/dist/components/field/FieldProgress.vue2.js +18 -17
  105. package/dist/components/field/FieldRating.vue.js +2 -2
  106. package/dist/components/field/FieldRating.vue2.js +22 -16
  107. package/dist/components/field/FieldRelation.vue.js +1 -1
  108. package/dist/components/field/FieldRelation.vue2.js +25 -22
  109. package/dist/components/field/FieldRichText.vue.js +1 -1
  110. package/dist/components/field/FieldRichText.vue2.js +10 -7
  111. package/dist/components/field/FieldSelect.vue.js +2 -2
  112. package/dist/components/field/FieldSelect.vue2.js +81 -63
  113. package/dist/components/field/FieldText.vue.js +2 -2
  114. package/dist/components/field/FieldText.vue2.js +17 -16
  115. package/dist/components/field/FieldUrl.vue.js +2 -2
  116. package/dist/components/field/FieldUrl.vue2.js +17 -16
  117. package/dist/components/form/FormDesigner.vue.js +2 -2
  118. package/dist/components/form/FormDesigner.vue2.js +83 -78
  119. package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
  120. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  121. package/dist/components/gallery/GalleryCard.vue2.js +2 -1
  122. package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
  123. package/dist/components/kanban/KanbanCard.vue.js +1 -1
  124. package/dist/components/kanban/KanbanCard.vue2.js +15 -14
  125. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
  126. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  127. package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
  128. package/dist/components/kanban/QuickAddRow.vue.js +2 -2
  129. package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
  130. package/dist/components/layout/Navbar.vue.js +3 -3
  131. package/dist/components/layout/Navbar.vue2.js +5 -4
  132. package/dist/components/layout/Sidebar.vue.js +2 -2
  133. package/dist/components/layout/Sidebar.vue2.js +1 -1
  134. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  135. package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
  136. package/dist/components/overlay/Dialog.vue.d.ts +1 -0
  137. package/dist/components/overlay/Dialog.vue.js +1 -1
  138. package/dist/components/overlay/Dialog.vue2.js +9 -9
  139. package/dist/components/overlay/Drawer.vue.d.ts +1 -0
  140. package/dist/components/overlay/Drawer.vue.js +2 -2
  141. package/dist/components/overlay/Drawer.vue2.js +35 -29
  142. package/dist/components/overlay/Modal.vue.d.ts +1 -0
  143. package/dist/components/overlay/Modal.vue.js +1 -1
  144. package/dist/components/overlay/Modal.vue2.js +34 -28
  145. package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
  146. package/dist/components/overlay/SidePanel.vue.js +1 -1
  147. package/dist/components/overlay/SidePanel.vue2.js +6 -6
  148. package/dist/components/split/SplitPane.vue.js +2 -2
  149. package/dist/components/split/SplitPane.vue2.js +11 -9
  150. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +2 -0
  151. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  152. package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
  153. package/dist/components/table/DataTable.vue.d.ts +12 -5
  154. package/dist/components/table/DataTable.vue.js +4 -4
  155. package/dist/components/table/DataTable.vue2.js +535 -477
  156. package/dist/components/table/DetailSheet.vue.js +2 -2
  157. package/dist/components/table/DetailSheet.vue2.js +45 -40
  158. package/dist/components/table/FieldCell.vue.d.ts +2 -1
  159. package/dist/components/table/FieldCell.vue.js +1 -1
  160. package/dist/components/table/FieldCell.vue2.js +57 -48
  161. package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
  162. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  163. package/dist/components/table/FieldTypePicker.vue2.js +1 -1
  164. package/dist/components/table/MobileListView.vue.d.ts +26 -3
  165. package/dist/components/table/MobileListView.vue.js +2 -2
  166. package/dist/components/table/MobileListView.vue2.js +65 -49
  167. package/dist/components/table/TableColumnManager.vue.js +1 -1
  168. package/dist/components/table/TableColumnManager.vue2.js +29 -28
  169. package/dist/components/table/TableDataRow.vue.d.ts +2 -0
  170. package/dist/components/table/TableDataRow.vue.js +4 -4
  171. package/dist/components/table/TableDataRow.vue2.js +70 -58
  172. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  173. package/dist/components/table/TableFilterPanel.vue2.js +3 -0
  174. package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
  175. package/dist/components/table/TableGroupRow.vue.js +2 -2
  176. package/dist/components/table/TableGroupRow.vue2.js +35 -30
  177. package/dist/components/table/TableHeaderRow.vue.js +3 -3
  178. package/dist/components/table/TableHeaderRow.vue2.js +63 -46
  179. package/dist/components/table/TableToolbar.vue.js +1 -1
  180. package/dist/components/table/TableToolbar.vue2.js +2 -2
  181. package/dist/components/tabs/TabPanel.vue.js +4 -4
  182. package/dist/components/tabs/TabPanel.vue2.js +1 -1
  183. package/dist/components/tabs/Tabs.vue.js +2 -2
  184. package/dist/components/tabs/Tabs.vue2.js +2 -2
  185. package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
  186. package/dist/components/timeline/GanttRow.vue.js +2 -2
  187. package/dist/components/timeline/GanttRow.vue2.js +68 -52
  188. package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
  189. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  190. package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
  191. package/dist/composables/useKeyboardNavigation.d.ts +1 -1
  192. package/dist/composables/useRowDrag.d.ts +6 -4
  193. package/dist/composables/useRowDrag.js +24 -24
  194. package/dist/composables/useSupabaseProvider.d.ts +8 -1
  195. package/dist/composables/useTableData.d.ts +5 -3
  196. package/dist/composables/useTableGroup.d.ts +2 -2
  197. package/dist/composables/useViewPersistence.d.ts +32 -3
  198. package/dist/composables/useVirtualList.js +60 -59
  199. package/dist/plugin.js +103 -102
  200. package/dist/style.css +1 -1
  201. package/dist/utils/echarts.d.ts +1 -0
  202. package/dist/utils/supabaseSchema.d.ts +12 -0
  203. 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 f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-63a6599f"]]);
4
+ const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f18fde43"]]);
5
5
  export {
6
- f as default
6
+ a as default
7
7
  };
@@ -1,13 +1,13 @@
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";
3
- import { useMarkdown as R } from "../../composables/useMarkdown.js";
4
- const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-sheet__label" }, G = { class: "of-detail-sheet__cell" }, I = {
1
+ import { defineComponent as V, ref as L, computed as u, openBlock as o, createBlock as k, Teleport as N, createVNode as E, Transition as H, withCtx as j, createElementBlock as d, normalizeClass as h, createElementVNode as n, Fragment as b, renderList as C, toDisplayString as v, createCommentVNode as p } from "vue";
2
+ import z from "./FieldCell.vue.js";
3
+ import { useMarkdown as O } from "../../composables/useMarkdown.js";
4
+ const R = { class: "of-detail-sheet__properties" }, q = { class: "of-detail-sheet__label" }, A = { class: "of-detail-sheet__cell" }, G = {
5
5
  key: 1,
6
6
  class: "of-detail-sheet__value"
7
- }, J = {
7
+ }, I = {
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
+ }, J = { class: "of-detail-sheet__content-label" }, Q = ["innerHTML"], U = { class: "of-detail-sheet__footer" }, W = ["disabled"], $ = /* @__PURE__ */ V({
11
11
  __name: "DetailSheet",
12
12
  props: {
13
13
  row: {},
@@ -19,50 +19,55 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
19
19
  readonly: { type: Boolean }
20
20
  },
21
21
  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) {
22
+ setup(s, { emit: g }) {
23
+ const a = s, r = g, { renderMarkdown: w } = O({ showCopyButton: !0 }), i = L({}), D = u(() => Object.keys(i.value).length > 0), B = u(() => new Set(a.contentFields ?? []));
24
+ function y(t) {
25
25
  var l;
26
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);
27
+ const e = (l = a.fieldDefs) == null ? void 0 : l.find((f) => f.id === t.key);
28
28
  return (e == null ? void 0 : e.type) === "richtext";
29
29
  }
30
- const F = c(() => i.columns.filter((t) => !m(t))), y = c(() => i.columns.filter((t) => m(t)));
30
+ const F = u(() => a.columns.filter((t) => !y(t))), m = u(() => a.columns.filter((t) => y(t)));
31
31
  function x(t) {
32
32
  var e;
33
- return ((e = i.fieldDefs) == null ? void 0 : e.find((l) => l.id === t)) ?? {
33
+ return ((e = a.fieldDefs) == null ? void 0 : e.find((l) => l.id === t)) ?? {
34
34
  id: t,
35
35
  type: "text",
36
36
  label: t
37
37
  };
38
38
  }
39
- function u(t) {
40
- return t.key in a.value ? a.value[t.key] : i.row[t.key];
39
+ function c(t) {
40
+ return t.key in i.value ? i.value[t.key] : a.row[t.key];
41
41
  }
42
- function M(t) {
43
- const e = u(t);
42
+ function S(t) {
43
+ const e = c(t);
44
44
  return typeof e != "string" || !e ? "" : w(e);
45
45
  }
46
- function S(t, e, l) {
47
- a.value = { ...a.value, [e]: l }, r("cell-edit", { rowId: t, fieldId: e, value: l });
46
+ function M(t, e, l) {
47
+ i.value = { ...i.value, [e]: l }, r("cell-edit", { rowId: t, fieldId: e, value: l });
48
48
  }
49
49
  function P() {
50
- r("save", { rowId: i.row.id, fields: { ...a.value } }), a.value = {}, r("close");
50
+ r("save", { rowId: a.row.id, fields: { ...i.value } }), i.value = {}, r("close");
51
51
  }
52
52
  function _() {
53
- a.value = {}, r("close");
53
+ i.value = {}, r("close");
54
54
  }
55
55
  function T() {
56
- r("delete", i.row.id), r("close");
56
+ r("delete", a.row.id), r("close");
57
57
  }
58
58
  return (t, e) => (o(), k(N, { to: "body" }, [
59
59
  E(H, { name: "of-sheet" }, {
60
60
  default: j(() => [
61
61
  s.visible ? (o(), d("div", {
62
62
  key: 0,
63
- class: h(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": s.fullPage }]),
64
- onClick: z(_, ["self"])
63
+ class: h(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": s.fullPage }])
65
64
  }, [
65
+ n("button", {
66
+ type: "button",
67
+ class: "of-detail-sheet-overlay__hitarea",
68
+ "aria-label": "关闭详情",
69
+ onClick: _
70
+ }),
66
71
  n("div", {
67
72
  class: h(["of-detail-sheet", { "of-detail-sheet--full-page": s.fullPage }])
68
73
  }, [
@@ -77,41 +82,41 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
77
82
  n("div", {
78
83
  class: h(["of-detail-sheet__body", { "of-detail-sheet__body--full-page": s.fullPage }])
79
84
  }, [
80
- n("div", q, [
85
+ n("div", R, [
81
86
  (o(!0), d(b, null, C(F.value, (l) => {
82
87
  var f;
83
88
  return o(), d("div", {
84
89
  key: l.key,
85
90
  class: "of-detail-sheet__field"
86
91
  }, [
87
- n("label", A, v(l.label), 1),
88
- n("div", G, [
89
- (f = s.fieldDefs) != null && f.length ? (o(), k(O, {
92
+ n("span", q, v(l.label), 1),
93
+ n("div", A, [
94
+ (f = s.fieldDefs) != null && f.length ? (o(), k(z, {
90
95
  key: 0,
91
96
  "row-id": s.row.id,
92
97
  field: x(l.key),
93
- value: u(l),
98
+ value: c(l),
94
99
  readonly: s.readonly,
95
- onCommit: S
96
- }, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), d("span", I, v(u(l) ?? "—"), 1))
100
+ onCommit: M
101
+ }, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), d("span", G, v(c(l) ?? "—"), 1))
97
102
  ])
98
103
  ]);
99
104
  }), 128))
100
105
  ]),
101
- y.value.length > 0 ? (o(), d("div", J, [
102
- (o(!0), d(b, null, C(y.value, (l) => (o(), d("div", {
106
+ m.value.length > 0 ? (o(), d("div", I, [
107
+ (o(!0), d(b, null, C(m.value, (l) => (o(), d("div", {
103
108
  key: l.key,
104
109
  class: "of-detail-sheet__content-block"
105
110
  }, [
106
- n("label", Q, v(l.label), 1),
111
+ n("span", J, v(l.label), 1),
107
112
  n("div", {
108
113
  class: "of-detail-sheet__markdown of-markdown",
109
- innerHTML: M(l)
110
- }, null, 8, U)
114
+ innerHTML: S(l)
115
+ }, null, 8, Q)
111
116
  ]))), 128))
112
- ])) : g("", !0)
117
+ ])) : p("", !0)
113
118
  ], 2),
114
- n("div", W, [
119
+ n("div", U, [
115
120
  n("button", {
116
121
  class: "of-detail-sheet__btn of-detail-sheet__btn--delete",
117
122
  onClick: T
@@ -125,10 +130,10 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
125
130
  class: "of-detail-sheet__btn of-detail-sheet__btn--save",
126
131
  disabled: !D.value,
127
132
  onClick: P
128
- }, " 保存 ", 8, X)
133
+ }, " 保存 ", 8, W)
129
134
  ])
130
135
  ], 2)
131
- ], 2)) : g("", !0)
136
+ ], 2)) : p("", !0)
132
137
  ]),
133
138
  _: 1
134
139
  })
@@ -136,5 +141,5 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
136
141
  }
137
142
  });
138
143
  export {
139
- K as default
144
+ $ as default
140
145
  };
@@ -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"],
@@ -10,15 +10,38 @@ type __VLS_Props = {
10
10
  statusColorMap?: ColorMap;
11
11
  readonly?: boolean;
12
12
  };
13
- declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
14
- "row-click": (row: any) => any;
13
+ declare function __VLS_template(): {
14
+ attrs: Partial<{}>;
15
+ slots: {
16
+ cell?(_: {
17
+ row: TableRow;
18
+ col: TableColumn;
19
+ }): any;
20
+ cell?(_: {
21
+ row: TableRow;
22
+ col: TableColumn;
23
+ }): any;
24
+ };
25
+ refs: {};
26
+ rootEl: HTMLDivElement;
27
+ };
28
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
29
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
30
+ "row-click": (row: TableRow) => any;
15
31
  "add-row": () => any;
16
32
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
17
- "onRow-click"?: ((row: any) => any) | undefined;
33
+ "onRow-click"?: ((row: TableRow) => any) | undefined;
18
34
  "onAdd-row"?: (() => any) | undefined;
19
35
  }>, {
20
36
  selectable: boolean;
37
+ statusColorMap: ColorMap;
21
38
  addable: boolean;
22
39
  readonly: boolean;
23
40
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
41
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
42
  export default _default;
43
+ type __VLS_WithTemplateSlots<T, S> = T & {
44
+ new (): {
45
+ $slots: S;
46
+ };
47
+ };
@@ -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-15efc0e6"]]);
4
+ const e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccf7d630"]]);
5
5
  export {
6
- f as default
6
+ e as default
7
7
  };
@@ -1,90 +1,106 @@
1
- import { defineComponent as V, computed as f, ref as g, openBlock as l, createElementBlock as o, Fragment as v, renderList as C, createElementVNode as X, normalizeStyle as M, toDisplayString as d, createCommentVNode as i } from "vue";
2
- import { mergeColorMap as A, DEFAULT_STATUS_MAP as L, resolveBadge as Y } from "../../composables/useBadge.js";
3
- const $ = { class: "of-mobile-list" }, D = ["onClick", "onTouchstart"], F = {
1
+ import { defineComponent as D, computed as v, ref as _, openBlock as a, createElementBlock as n, Fragment as g, renderList as C, createElementVNode as X, normalizeStyle as T, renderSlot as M, createTextVNode as A, toDisplayString as d, createCommentVNode as c } from "vue";
2
+ import { mergeColorMap as K, DEFAULT_STATUS_MAP as L, resolveBadge as N } from "../../composables/useBadge.js";
3
+ const Y = { class: "of-mobile-list" }, w = ["onClick", "onKeydown", "onTouchstart"], F = {
4
4
  key: 0,
5
5
  class: "of-mobile-card__title"
6
- }, N = {
6
+ }, U = {
7
7
  key: 1,
8
8
  class: "of-mobile-card__meta"
9
- }, U = {
9
+ }, z = {
10
10
  key: 1,
11
11
  class: "of-mobile-card__tag"
12
- }, w = {
12
+ }, I = {
13
13
  key: 0,
14
14
  class: "of-mobile-card__action-delete"
15
- }, O = /* @__PURE__ */ V({
15
+ }, R = /* @__PURE__ */ D({
16
16
  __name: "MobileListView",
17
17
  props: {
18
18
  rows: {},
19
19
  columns: {},
20
20
  selectable: { type: Boolean, default: !1 },
21
21
  addable: { type: Boolean, default: !0 },
22
- statusColorMap: {},
22
+ statusColorMap: { default: void 0 },
23
23
  readonly: { type: Boolean, default: !1 }
24
24
  },
25
25
  emits: ["row-click", "add-row"],
26
- setup(r, { emit: S }) {
27
- const m = r, y = S, T = f(() => A(L, m.statusColorMap)), h = f(() => m.columns[0]), _ = f(() => m.columns.slice(1, 4));
28
- function u(a, n) {
29
- const e = a[n.key];
26
+ setup(i, { emit: S }) {
27
+ const m = i, f = S, B = v(() => K(L, m.statusColorMap)), y = v(() => m.columns[0]), h = v(() => m.columns.slice(1, 4));
28
+ function u(t, o) {
29
+ const e = t[o.key];
30
30
  return e != null ? String(e) : "";
31
31
  }
32
- function p(a) {
33
- return Y(a, T.value);
32
+ function b(t) {
33
+ return N(t, B.value);
34
34
  }
35
- let b = 0, k = 0;
36
- const c = g(null), s = g(0);
37
- function B(a, n) {
38
- b = a.touches[0].clientX, k = a.touches[0].clientY, c.value = n, s.value = 0;
35
+ let p = 0, k = 0;
36
+ const r = _(null), s = _(0);
37
+ function x(t, o) {
38
+ p = t.touches[0].clientX, k = t.touches[0].clientY, r.value = o, s.value = 0;
39
39
  }
40
- function x(a) {
41
- if (!c.value) return;
42
- const n = a.touches[0].clientX - b, e = a.touches[0].clientY - k;
43
- if (Math.abs(e) > Math.abs(n)) {
44
- c.value = null;
40
+ function E(t) {
41
+ if (!r.value) return;
42
+ const o = t.touches[0].clientX - p, e = t.touches[0].clientY - k;
43
+ if (Math.abs(e) > Math.abs(o)) {
44
+ r.value = null;
45
45
  return;
46
46
  }
47
- s.value = Math.max(-80, Math.min(0, n));
47
+ s.value = Math.max(-80, Math.min(0, o));
48
+ }
49
+ function V() {
50
+ s.value < -40 ? s.value = -80 : (s.value = 0, r.value = null);
48
51
  }
49
- function E() {
50
- s.value < -40 ? s.value = -80 : (s.value = 0, c.value = null);
52
+ function $(t, o) {
53
+ t.target === t.currentTarget && (t.key !== "Enter" && t.key !== " " || (t.preventDefault(), f("row-click", o)));
51
54
  }
52
- return (a, n) => (l(), o("div", $, [
53
- (l(!0), o(v, null, C(r.rows, (e) => (l(), o("div", {
55
+ return (t, o) => (a(), n("div", Y, [
56
+ (a(!0), n(g, null, C(i.rows, (e) => (a(), n("div", {
54
57
  key: e.id,
55
58
  class: "of-mobile-card-wrapper"
56
59
  }, [
57
60
  X("div", {
58
61
  class: "of-mobile-card",
59
- style: M({ transform: c.value === e.id ? `translateX(${s.value}px)` : "" }),
60
- onClick: (t) => y("row-click", e),
61
- onTouchstart: (t) => B(t, e.id),
62
- onTouchmove: x,
63
- onTouchend: E
62
+ role: "button",
63
+ tabindex: "0",
64
+ style: T({ transform: r.value === e.id ? `translateX(${s.value}px)` : "" }),
65
+ onClick: (l) => f("row-click", e),
66
+ onKeydown: (l) => $(l, e),
67
+ onTouchstart: (l) => x(l, e.id),
68
+ onTouchmove: E,
69
+ onTouchend: V
64
70
  }, [
65
- h.value ? (l(), o("div", F, d(u(e, h.value) || "—"), 1)) : i("", !0),
66
- _.value.length > 0 ? (l(), o("div", N, [
67
- (l(!0), o(v, null, C(_.value, (t) => (l(), o(v, {
68
- key: t.key
69
- }, [
70
- t.key === "status" && u(e, t) ? (l(), o("span", {
71
+ y.value ? (a(), n("div", F, [
72
+ M(t.$slots, "cell", {
73
+ row: e,
74
+ col: y.value
75
+ }, () => [
76
+ A(d(u(e, y.value) || ""), 1)
77
+ ], !0)
78
+ ])) : c("", !0),
79
+ h.value.length > 0 ? (a(), n("div", U, [
80
+ (a(!0), n(g, null, C(h.value, (l) => M(t.$slots, "cell", {
81
+ key: l.key,
82
+ row: e,
83
+ col: l
84
+ }, () => [
85
+ l.key === "status" && u(e, l) ? (a(), n("span", {
71
86
  key: 0,
72
87
  class: "of-mobile-card__badge",
73
- style: M(p(u(e, t)).style)
74
- }, d(p(u(e, t)).label), 5)) : u(e, t) ? (l(), o("span", U, d(t.label) + ": " + d(u(e, t)), 1)) : i("", !0)
75
- ], 64))), 128))
76
- ])) : i("", !0)
77
- ], 44, D),
78
- c.value === e.id && s.value < -40 ? (l(), o("div", w, " 删除 ")) : i("", !0)
88
+ style: T(b(u(e, l)).style)
89
+ }, d(b(u(e, l)).label), 5)) : u(e, l) ? (a(), n("span", z, d(l.label) + ": " + d(u(e, l)), 1)) : c("", !0)
90
+ ], !0)), 128))
91
+ ])) : c("", !0)
92
+ ], 44, w),
93
+ r.value === e.id && s.value < -40 ? (a(), n("div", I, " 删除 ")) : c("", !0)
79
94
  ]))), 128)),
80
- r.addable && !r.readonly ? (l(), o("button", {
95
+ i.addable && !i.readonly ? (a(), n("button", {
81
96
  key: 0,
97
+ type: "button",
82
98
  class: "of-mobile-add-btn",
83
- onClick: n[0] || (n[0] = (e) => y("add-row"))
84
- }, " + 新增记录 ")) : i("", !0)
99
+ onClick: o[0] || (o[0] = (e) => f("add-row"))
100
+ }, " + 新增记录 ")) : c("", !0)
85
101
  ]));
86
102
  }
87
103
  });
88
104
  export {
89
- O as default
105
+ R as default
90
106
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./TableColumnManager.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-785143ae"]]);
4
+ const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-bade90c0"]]);
5
5
  export {
6
6
  m as default
7
7
  };