@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
@@ -1,850 +1,972 @@
1
- import { defineComponent as Fl, defineAsyncComponent as be, ref as R, toRef as h, computed as b, watch as ke, unref as t, openBlock as r, createElementBlock as s, Fragment as c, createVNode as E, createSlots as Hl, withCtx as he, renderSlot as T, normalizeProps as Bl, guardReactiveProps as Il, createBlock as y, createCommentVNode as $, createElementVNode as g, normalizeStyle as k, normalizeClass as z, renderList as m, mergeProps as K, withModifiers as P, toDisplayString as A, Teleport as Kl } from "vue";
2
- import me from "./TableHeaderRow.vue.js";
3
- import Ve from "./TableDataRow.vue.js";
4
- import Q from "./TableGroupRow.vue.js";
1
+ import { defineComponent as ql, defineAsyncComponent as me, computed as y, ref as T, toRef as m, watch as Ce, unref as n, openBlock as r, createElementBlock as d, Fragment as g, createVNode as G, normalizeStyle as c, normalizeClass as S, createSlots as Jl, withCtx as xe, renderSlot as K, normalizeProps as Ql, guardReactiveProps as Ul, createBlock as p, createCommentVNode as H, createElementVNode as v, renderList as x, mergeProps as L, withModifiers as le, toDisplayString as P, Teleport as Zl } from "vue";
2
+ import De from "./TableHeaderRow.vue.js";
3
+ import el from "./TableDataRow.vue.js";
4
+ import oe from "./TableGroupRow.vue.js";
5
5
  import _l from "./NewRowBtn.vue.js";
6
- import El from "./MobileListView.vue.js";
7
- import _ from "./FieldCell.vue.js";
8
- import { useInlineEdit as Pl } from "../../composables/useInlineEdit.js";
9
- import { useVirtualList as Ll } from "../../composables/useVirtualList.js";
10
- import { useTable as Gl } from "../../composables/useTable.js";
11
- import { useTableGroup as Vl } from "../../composables/useTableGroup.js";
12
- import { useTableData as Ol } from "../../composables/useTableData.js";
13
- import { useTableColumns as Nl } from "../../composables/useTableColumns.js";
14
- import { useColumnResize as Wl } from "../../composables/useColumnResize.js";
15
- import { useKeyboardNavigation as Yl } from "../../composables/useKeyboardNavigation.js";
16
- import { useBreakpoint as jl } from "../../composables/useBreakpoint.js";
17
- import { useFixedColumns as Xl } from "../../composables/useFixedColumns.js";
18
- import { useRowDrag as Ul } from "../../composables/useRowDrag.js";
19
- import { useDraftRows as ql } from "../../composables/useDraftRows.js";
20
- const Jl = ["tabindex"], Ql = {
6
+ import eo from "./MobileListView.vue.js";
7
+ import W from "./FieldCell.vue.js";
8
+ import { useInlineEdit as lo } from "../../composables/useInlineEdit.js";
9
+ import { useVirtualList as oo } from "../../composables/useVirtualList.js";
10
+ import { useTable as no } from "../../composables/useTable.js";
11
+ import { useTableGroup as to } from "../../composables/useTableGroup.js";
12
+ import { useTableData as ao } from "../../composables/useTableData.js";
13
+ import { useTableColumns as ro } from "../../composables/useTableColumns.js";
14
+ import { useColumnResize as io } from "../../composables/useColumnResize.js";
15
+ import { useKeyboardNavigation as so } from "../../composables/useKeyboardNavigation.js";
16
+ import { useBreakpoint as uo } from "../../composables/useBreakpoint.js";
17
+ import { useFixedColumns as fo } from "../../composables/useFixedColumns.js";
18
+ import { useRowDrag as co } from "../../composables/useRowDrag.js";
19
+ import { useDraftRows as vo } from "../../composables/useDraftRows.js";
20
+ const yo = {
21
21
  key: 0,
22
22
  class: "of-data-table-body",
23
23
  style: { position: "relative" }
24
- }, Zl = { class: "of-data-table-fixed-body" }, eo = ["onMouseenter", "onClick"], lo = ["checked", "onChange"], oo = {
24
+ }, go = { class: "of-data-table-fixed-body" }, bo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], ko = ["for"], po = ["id", "checked", "onChange"], wo = {
25
25
  key: 1,
26
26
  class: "of-td-text"
27
- }, to = ["onMouseenter", "onClick"], no = ["checked", "onChange"], ao = {
27
+ }, ho = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], mo = ["for"], Co = ["id", "checked", "onChange"], xo = {
28
28
  key: 1,
29
29
  class: "of-td-text"
30
- }, ro = { class: "of-data-table-scroll-body" }, so = {
31
- key: 0,
32
- style: { height: "36px" }
33
- }, io = ["onMouseenter", "onClick"], uo = {
30
+ }, Do = { class: "of-data-table-scroll-body" }, $o = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], So = {
34
31
  key: 1,
35
32
  class: "of-td-text"
36
- }, fo = {
37
- key: 0,
38
- style: { height: "36px" }
39
- }, co = ["onMouseenter", "onClick"], vo = {
33
+ }, Ro = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Mo = {
40
34
  key: 1,
41
35
  class: "of-td-text"
42
- }, yo = {
36
+ }, Fo = {
43
37
  key: 1,
44
38
  class: "of-td-text"
45
- }, go = {
39
+ }, To = {
46
40
  key: 1,
47
41
  class: "of-td-text"
48
- }, bo = {
42
+ }, Ho = {
49
43
  key: 3,
50
44
  class: "of-data-table-draft-toolbar"
51
- }, ko = { class: "of-data-table-draft-count" }, ho = { class: "of-add-field-popup" }, mo = 36, po = 44, jo = /* @__PURE__ */ Fl({
45
+ }, zo = { class: "of-data-table-draft-count" }, Ao = {
46
+ key: 0,
47
+ class: "of-add-field-overlay"
48
+ }, Ko = { class: "of-add-field-popup" }, ln = /* @__PURE__ */ ql({
52
49
  __name: "DataTable",
53
50
  props: {
54
- tasks: {},
55
- records: {},
56
- schema: {},
57
- view: {},
58
- columns: {},
59
- fieldDefs: {},
51
+ tasks: { default: () => [] },
52
+ records: { default: () => [] },
53
+ schema: { default: void 0 },
54
+ view: { default: void 0 },
55
+ columns: { default: () => [] },
56
+ fieldDefs: { default: () => [] },
60
57
  rowKey: { default: "id" },
61
58
  selectable: { type: Boolean, default: !0 },
62
59
  addable: { type: Boolean, default: !0 },
63
- priorityColorMap: {},
64
- statusColorMap: {},
65
- groupBy: {},
66
- groupColorMap: {},
67
- virtual: { type: Boolean },
60
+ priorityColorMap: { default: void 0 },
61
+ statusColorMap: { default: void 0 },
62
+ groupBy: { default: void 0 },
63
+ groupColorMap: { default: void 0 },
64
+ virtual: { type: Boolean, default: void 0 },
68
65
  virtualThreshold: { default: 100 },
69
66
  readonly: { type: Boolean, default: !1 },
70
- fixedColumns: {},
67
+ fixedColumns: { default: () => [] },
71
68
  enableResize: { type: Boolean, default: !1 },
72
69
  enableKeyboard: { type: Boolean, default: !1 },
73
70
  enableRowDrag: { type: Boolean, default: !1 },
74
71
  enableCrossGroupDrag: { type: Boolean, default: !1 },
75
- groups: {},
76
- aggregations: {},
77
- enableFieldManagement: { type: Boolean, default: !1 }
72
+ groups: { default: () => [] },
73
+ aggregations: { default: () => [] },
74
+ enableFieldManagement: { type: Boolean, default: !1 },
75
+ density: { default: "standard" }
78
76
  },
79
- emits: ["row-click", "row-click-record", "add-row", "selection-change", "cell-edit", "column-resize", "active-cell-change", "row-reorder", "row-group-change", "draft-commit", "draft-discard", "drafts-commit-all", "paste", "schema-add-field", "schema-rename-field", "schema-change-field-type", "schema-hide-field", "schema-delete-field", "schema-duplicate-field"],
80
- setup(u, { emit: Oe }) {
81
- const Ne = be(() => import("./ColumnHeaderMenu.vue.js")), We = be(() => import("./FieldTypePicker.vue.js")), Ye = be(() => import("./DetailSheet.vue.js")), d = u, f = Oe, { isMobile: pe } = jl(), L = R(!1), G = R(null), Z = Pl(), { commit: je, editingCell: Xe } = Z, { rows: we } = Ol({
82
- tasks: h(d, "tasks"),
83
- records: h(d, "records")
84
- }), { columns: ee } = Nl({
85
- columns: h(d, "columns"),
86
- schema: h(d, "schema"),
87
- view: h(d, "view")
88
- }), { startResize: Ue, columnWidthOverrides: qe, showResizeIndicator: Je, resizeIndicatorX: Qe, autoFitColumn: Ze } = Wl({
89
- columns: ee,
77
+ emits: ["row-click", "row-click-record", "add-row", "selection-change", "cell-edit", "column-resize", "active-cell-change", "row-reorder", "row-group-change", "draft-commit", "draft-discard", "drafts-commit-all", "paste", "row-delete", "schema-add-field", "schema-rename-field", "schema-change-field-type", "schema-hide-field", "schema-delete-field", "schema-duplicate-field"],
78
+ setup(u, { emit: ll }) {
79
+ const s = u, f = ll, ol = me(() => import("./ColumnHeaderMenu.vue.js")), nl = me(() => import("./FieldTypePicker.vue.js")), tl = me(() => import("./DetailSheet.vue.js")), al = {
80
+ compact: {
81
+ headerHeight: 32,
82
+ rowHeight: 36,
83
+ groupRowHeight: 32,
84
+ mobileCardPaddingX: 12,
85
+ mobileCardPaddingY: 10,
86
+ fillMinWidth: 180
87
+ },
88
+ standard: {
89
+ headerHeight: 36,
90
+ rowHeight: 44,
91
+ groupRowHeight: 36,
92
+ mobileCardPaddingX: 16,
93
+ mobileCardPaddingY: 12,
94
+ fillMinWidth: 220
95
+ },
96
+ comfortable: {
97
+ headerHeight: 40,
98
+ rowHeight: 52,
99
+ groupRowHeight: 40,
100
+ mobileCardPaddingX: 18,
101
+ mobileCardPaddingY: 14,
102
+ fillMinWidth: 240
103
+ }
104
+ }, h = y(() => s.density ?? "standard"), w = y(() => al[h.value]), $e = y(() => `of-data-table--${h.value}`), Se = y(() => ({
105
+ "--of-data-table-group-row-height": `${w.value.groupRowHeight}px`,
106
+ "--of-data-table-mobile-card-padding-x": `${w.value.mobileCardPaddingX}px`,
107
+ "--of-data-table-mobile-card-padding-y": `${w.value.mobileCardPaddingY}px`,
108
+ "--of-data-table-new-row-padding-x": `${w.value.mobileCardPaddingX}px`,
109
+ "--of-data-table-new-row-padding-y": `${w.value.mobileCardPaddingY}px`,
110
+ "--of-data-table-fill-min-width": `${w.value.fillMinWidth}px`
111
+ })), { isMobile: Re } = uo(), Y = T(!1), ne = T(null), Me = y(
112
+ () => ne.value
113
+ ), te = lo(), { commit: rl, editingCell: dl } = te, { rows: ae } = ao({
114
+ tasks: m(s, "tasks"),
115
+ records: m(s, "records")
116
+ }), { columns: Fe } = ro({
117
+ columns: m(s, "columns"),
118
+ schema: m(s, "schema"),
119
+ view: m(s, "view")
120
+ }), {
121
+ startResize: il,
122
+ columnWidthOverrides: sl,
123
+ showResizeIndicator: ul,
124
+ resizeIndicatorX: fl,
125
+ autoFitColumn: cl,
126
+ resolvedWidth: Te
127
+ } = io({
128
+ columns: Fe,
129
+ rows: ae,
130
+ density: h,
90
131
  onResize: (l, o) => f("column-resize", { colKey: l, width: o })
91
- }), C = b(() => {
92
- const l = qe.value;
93
- return l.size === 0 ? ee.value : ee.value.map((o) => {
132
+ }), R = y(() => {
133
+ const l = sl.value;
134
+ return Fe.value.map((o) => {
94
135
  const e = l.get(o.key);
95
- return e !== void 0 ? { ...o, width: e } : o;
136
+ return e !== void 0 ? { ...o, width: e } : o.width === "fill" ? {
137
+ ...o,
138
+ minWidth: o.minWidth ?? w.value.fillMinWidth
139
+ } : typeof o.width == "number" ? o : { ...o, width: Te(o.key) };
96
140
  });
97
141
  }), {
98
142
  data: V,
99
- sort: F,
100
- toggleSort: O,
101
- selectedRows: p,
102
- toggleSelectAll: el,
103
- toggleRowSelection: ll,
104
- isAllSelected: le,
105
- setData: ol
106
- } = Gl({
107
- data: we.value,
143
+ sort: B,
144
+ toggleSort: X,
145
+ selectedRows: D,
146
+ toggleSelectAll: vl,
147
+ toggleRowSelection: yl,
148
+ isAllSelected: re,
149
+ setData: gl
150
+ } = no({
151
+ data: ae.value,
108
152
  pageSize: 999999
109
153
  });
110
- ke(we, (l) => ol(l), { deep: !1 });
111
- const { groupedItems: D, collapsedGroups: tl, toggleGroup: N, isGroupHeader: x } = Vl({
154
+ Ce(ae, (l) => gl(l), { deep: !1 });
155
+ const { groupedItems: M, collapsedGroups: bl, toggleGroup: N, isGroupHeader: F } = to({
112
156
  data: V,
113
- groupBy: h(d, "groupBy"),
114
- groups: h(d, "groups"),
115
- aggregations: h(d, "aggregations")
116
- }), W = R(null), oe = R(null), Ce = R(null), nl = b(() => {
157
+ groupBy: m(s, "groupBy"),
158
+ groups: m(s, "groups"),
159
+ aggregations: m(s, "aggregations")
160
+ }), O = T(null), de = T(null), He = T(null), kl = y(() => {
117
161
  var l;
118
- return (((l = d.fixedColumns) == null ? void 0 : l.length) ?? 0) > 0;
119
- }), De = R(0), al = b(() => De.value > 0), {
120
- fixedColumns: te,
121
- scrollableColumns: ne,
122
- fixedWidth: xe,
123
- handleScroll: rl,
124
- handleFixedScroll: Se,
125
- scrollLeft: wo,
126
- syncHover: S,
127
- isRowHovered: Y
128
- } = Xl({
129
- columns: C,
130
- fixedColumnKeys: b(() => d.fixedColumns ?? []),
131
- scrollContainerRef: W,
132
- fixedContainerRef: Ce
133
- }), ae = b(() => d.virtual !== void 0 ? d.virtual : D.value.length >= d.virtualThreshold), { visibleItems: re, totalHeight: se, offsetY: de, scrollToIndex: sl, observeRow: j } = Ll({
134
- items: D,
162
+ return (((l = s.fixedColumns) == null ? void 0 : l.length) ?? 0) > 0;
163
+ }), ze = T(0), pl = y(() => ze.value > 0), {
164
+ fixedColumns: ie,
165
+ scrollableColumns: se,
166
+ fixedWidth: Ae,
167
+ handleScroll: wl,
168
+ handleFixedScroll: Ke,
169
+ syncHover: k,
170
+ isRowHovered: j
171
+ } = fo({
172
+ columns: R,
173
+ fixedColumnKeys: y(() => s.fixedColumns ?? []),
174
+ scrollContainerRef: O,
175
+ fixedContainerRef: He
176
+ }), ue = y(() => s.virtual !== void 0 ? s.virtual : M.value.length >= s.virtualThreshold), { visibleItems: fe, totalHeight: ce, offsetY: ve, scrollToIndex: hl, observeRow: ml } = oo({
177
+ items: M,
135
178
  itemHeight: (l) => {
136
- const o = D.value[l];
137
- return x(o) ? mo : po;
179
+ const o = M.value[l];
180
+ return F(o) ? w.value.groupRowHeight : w.value.rowHeight;
138
181
  },
139
182
  overscan: 5,
140
- containerRef: W,
183
+ containerRef: O,
184
+ invalidateKey: h,
141
185
  measureRow: !0
142
- }), Re = b(() => D.value.filter((l) => !x(l))), { activeCell: $e, selectedRange: dl, setActiveCell: Me, handleKeyDown: il } = Yl({
143
- columns: C,
144
- rows: Re,
145
- containerRef: oe,
146
- editingCell: Xe,
147
- enabled: b(() => d.enableKeyboard),
148
- onActivateEdit: (l, o) => Z.activate(l, o),
149
- onCancelEdit: () => Z.cancel(),
150
- onScrollToRow: (l) => sl(l),
186
+ }), Pe = y(() => M.value.filter((l) => !F(l))), { activeCell: Be, selectedRange: Cl, setActiveCell: Ie, handleKeyDown: xl } = so({
187
+ columns: R,
188
+ rows: Pe,
189
+ containerRef: de,
190
+ editingCell: dl,
191
+ enabled: y(() => s.enableKeyboard),
192
+ onActivateEdit: (l, o) => te.activate(l, o),
193
+ onCancelEdit: () => te.cancel(),
194
+ onScrollToRow: (l) => hl(l),
151
195
  getCellValue: (l, o) => {
152
- const e = Re.value.find((a) => a.id === l);
196
+ const e = Pe.value.find((a) => a.id === l);
153
197
  if (!e) return "";
154
- const n = e[o];
155
- return n != null ? String(n) : "";
198
+ const t = e[o];
199
+ return t != null ? String(t) : "";
156
200
  },
157
201
  onPaste: (l, o, e) => {
158
202
  f("paste", { startRowId: l, startColKey: o, data: e });
159
203
  }
160
204
  });
161
- ke($e, (l) => f("active-cell-change", l ?? null));
205
+ Ce(Be, (l) => f("active-cell-change", l ?? null));
162
206
  const {
163
- isDragging: ul,
164
- draggedRowId: fl,
165
- dropTargetId: ie,
166
- dropPosition: Te,
167
- handleDragStart: cl,
168
- handleDragOver: vl,
169
- handleDrop: yl,
170
- handleDragEnd: ze
171
- } = Ul({
172
- processedItems: D,
173
- enableCrossGroupDrag: b(() => d.enableCrossGroupDrag),
174
- groupFieldId: h(d, "groupBy")
207
+ isDragging: Dl,
208
+ draggedRowId: $l,
209
+ dropTargetId: ye,
210
+ dropPosition: Ee,
211
+ handleDragStart: Sl,
212
+ handleDragOver: Rl,
213
+ handleDrop: Ml,
214
+ handleDragEnd: Le
215
+ } = co({
216
+ processedItems: M,
217
+ enableCrossGroupDrag: y(() => s.enableCrossGroupDrag),
218
+ groupFieldId: m(s, "groupBy")
175
219
  });
176
- function Ae(l, o) {
177
- d.enableRowDrag && cl(l, o);
220
+ function We(l, o) {
221
+ s.enableRowDrag && Sl(l, o);
178
222
  }
179
- function Fe(l, o) {
180
- d.enableRowDrag && vl(l, o);
223
+ function Ge(l, o) {
224
+ s.enableRowDrag && Rl(l, o);
181
225
  }
182
- function He(l, o) {
183
- d.enableRowDrag && yl(l, o, {
226
+ function Ye(l, o) {
227
+ s.enableRowDrag && Ml(l, o, {
184
228
  onReorder: (e) => f("row-reorder", e),
185
229
  onGroupChange: (e) => f("row-group-change", e)
186
230
  });
187
231
  }
188
232
  const {
189
- drafts: Be,
190
- addDraft: gl,
191
- updateDraftField: Co,
192
- removeDraft: Do,
193
- commitDraft: xo,
194
- commitAll: bl,
195
- discardAll: kl,
196
- isDraft: So,
197
- getDraftErrors: Ro
198
- } = ql({
199
- schema: h(d, "schema"),
200
- groupFieldId: h(d, "groupBy")
201
- }), hl = b(() => Be.value.size > 0);
202
- function ml() {
203
- d.schema ? gl() : f("add-row");
204
- }
205
- function pl() {
206
- const l = bl();
233
+ drafts: Ve,
234
+ addDraft: Fl,
235
+ commitAll: Tl,
236
+ discardAll: Hl
237
+ } = vo({
238
+ schema: m(s, "schema"),
239
+ groupFieldId: m(s, "groupBy")
240
+ }), zl = y(() => Ve.value.size > 0);
241
+ function Al() {
242
+ s.schema ? Fl() : f("add-row");
243
+ }
244
+ function Kl() {
245
+ const l = Tl();
207
246
  l.length > 0 && f("drafts-commit-all", { records: l });
208
247
  }
209
- function wl() {
210
- kl();
248
+ function Pl() {
249
+ Hl();
250
+ }
251
+ const $ = T({ visible: !1, colKey: "", colLabel: "", x: 0, y: 0 }), q = T(!1);
252
+ function Xe(l) {
253
+ return l === "multiselect" ? "multi_select" : l;
211
254
  }
212
- const w = R({ visible: !1, colKey: "", colLabel: "", x: 0, y: 0 }), X = R(!1);
213
- function ue(l, o) {
255
+ function ge(l, o) {
214
256
  var a;
215
- const e = C.value.find((v) => v.key === o), n = (a = d.fieldDefs) == null ? void 0 : a.find((v) => v.id === o);
216
- w.value = {
257
+ const e = R.value.find((b) => b.key === o), t = (a = s.fieldDefs) == null ? void 0 : a.find((b) => b.id === o);
258
+ $.value = {
217
259
  visible: !0,
218
260
  colKey: o,
219
261
  colLabel: (e == null ? void 0 : e.label) ?? o,
220
- fieldType: n == null ? void 0 : n.type,
262
+ fieldType: Xe(t == null ? void 0 : t.type),
221
263
  x: l.clientX,
222
264
  y: l.clientY
223
265
  };
224
266
  }
225
- function fe(l) {
226
- var e, n;
227
- const o = C.value.find((a) => a.key === l);
228
- w.value = {
267
+ function be(l) {
268
+ var e, t;
269
+ const o = R.value.find((a) => a.key === l);
270
+ $.value = {
229
271
  visible: !0,
230
272
  colKey: l,
231
273
  colLabel: (o == null ? void 0 : o.label) ?? l,
232
- fieldType: (n = (e = d.fieldDefs) == null ? void 0 : e.find((a) => a.id === l)) == null ? void 0 : n.type,
274
+ fieldType: Xe((t = (e = s.fieldDefs) == null ? void 0 : e.find((a) => a.id === l)) == null ? void 0 : t.type),
233
275
  x: 200,
234
276
  y: 100
235
277
  };
236
278
  }
237
- function Cl(l, o) {
279
+ function Bl(l, o) {
238
280
  f("schema-rename-field", { fieldId: l, newName: o });
239
281
  }
240
- function Dl(l, o) {
282
+ function Il(l, o) {
241
283
  f("schema-change-field-type", { fieldId: l, newType: o });
242
284
  }
243
- function xl(l) {
285
+ function El(l) {
244
286
  f("schema-hide-field", l);
245
287
  }
246
- function Sl(l) {
288
+ function Ll(l) {
247
289
  f("schema-delete-field", l);
248
290
  }
249
- function Rl(l) {
291
+ function Wl(l) {
250
292
  f("schema-duplicate-field", l);
251
293
  }
252
- function ce() {
253
- X.value = !0;
294
+ function ke() {
295
+ q.value = !0;
254
296
  }
255
- function $l(l) {
256
- f("schema-add-field", l), X.value = !1;
297
+ function Gl(l) {
298
+ f("schema-add-field", l), q.value = !1;
257
299
  }
258
- const M = b(() => d.readonly ? !1 : d.selectable), Ie = b(() => d.readonly ? !1 : d.addable), Ml = b(() => Array.from(p.value)), Ke = b(() => p.value.size > 0 && !le.value);
259
- function _e() {
260
- el(V.value);
300
+ const z = y(() => s.readonly ? !1 : s.selectable), Ne = y(() => s.readonly ? !1 : s.addable), Yl = y(() => Array.from(D.value)), Oe = y(() => D.value.size > 0 && !re.value);
301
+ function je() {
302
+ vl(V.value);
261
303
  }
262
- function U(l) {
263
- const o = V.value.find((e) => e[d.rowKey] === l);
264
- o && ll(o, 0);
304
+ function J(l) {
305
+ const o = V.value.find((e) => e[s.rowKey] === l);
306
+ o && yl(o, 0);
265
307
  }
266
- ke(Ml, (l) => f("selection-change", l), { immediate: !1 });
308
+ Ce(Yl, (l) => f("selection-change", l), { immediate: !1 });
267
309
  function i(l) {
268
- const o = l[d.rowKey];
310
+ const o = l[s.rowKey];
269
311
  return o != null ? String(o) : "";
270
312
  }
271
- function H(l) {
313
+ function I(l) {
272
314
  var o;
273
- return ((o = d.fieldDefs) == null ? void 0 : o.find((e) => e.id === l)) ?? {
315
+ return ((o = s.fieldDefs) == null ? void 0 : o.find((e) => e.id === l)) ?? {
274
316
  id: l,
275
317
  type: "text",
276
318
  label: l
277
319
  };
278
320
  }
279
- function B(l, o, e) {
280
- je(l, o, e), f("cell-edit", { rowId: l, fieldId: o, value: e });
321
+ function E(l, o, e) {
322
+ rl(l, o, e), f("cell-edit", { rowId: l, fieldId: o, value: e });
281
323
  }
282
- function I(l) {
283
- if (pe.value) {
284
- G.value = l, L.value = !0;
324
+ function A(l) {
325
+ if (Re.value) {
326
+ ne.value = l, Y.value = !0;
285
327
  return;
286
328
  }
287
- const o = l;
288
- if (o.__record) {
289
- f("row-click-record", o.__record), f("row-click", o.__record);
329
+ const o = l.__record;
330
+ if (o) {
331
+ f("row-click-record", o), f("row-click", o);
290
332
  return;
291
333
  }
292
334
  f("row-click", l);
293
335
  }
294
- function ve(l, o) {
295
- Ue(l, o);
336
+ function Q(l, o) {
337
+ l.target === l.currentTarget && (l.key !== "Enter" && l.key !== " " || (l.preventDefault(), A(o)));
338
+ }
339
+ function C(l, o) {
340
+ return l[o];
341
+ }
342
+ function Vl(l) {
343
+ if (!l) return null;
344
+ if (l instanceof HTMLElement) return l;
345
+ const o = l.$el;
346
+ return o instanceof HTMLElement ? o : null;
347
+ }
348
+ function U(l, o) {
349
+ ml(Vl(l), o);
350
+ }
351
+ function pe(l, o) {
352
+ il(l, o);
353
+ }
354
+ function we(l) {
355
+ cl(l, de.value);
296
356
  }
297
- function ye(l) {
298
- Ze(l, oe.value);
357
+ function Xl() {
358
+ return h.value === "compact" ? { x: 10, y: 6 } : h.value === "comfortable" ? { x: 14, y: 10 } : { x: 12, y: 8 };
299
359
  }
300
- function Tl(l) {
301
- rl(l);
360
+ function qe() {
361
+ return {
362
+ minHeight: `${w.value.rowHeight}px`
363
+ };
364
+ }
365
+ function Z(l) {
366
+ const { x: o, y: e } = Xl(), t = {
367
+ padding: `${e}px ${o}px`
368
+ };
369
+ if (l.width === "fill") {
370
+ const a = `${l.minWidth ?? w.value.fillMinWidth}px`;
371
+ return { ...t, flex: `1 1 ${a}`, minWidth: a };
372
+ }
373
+ return typeof l.width == "number" ? { ...t, width: `${l.width}px`, flexShrink: "0", flexGrow: "0" } : {
374
+ ...t,
375
+ width: `${Te(l.key)}px`,
376
+ flexShrink: "0",
377
+ flexGrow: "0"
378
+ };
379
+ }
380
+ function Je() {
381
+ return {
382
+ height: `${w.value.groupRowHeight}px`
383
+ };
384
+ }
385
+ function Nl(l) {
386
+ wl(l);
302
387
  const o = l.target;
303
- De.value = o.scrollLeft;
388
+ ze.value = o.scrollLeft;
304
389
  }
305
- function q(l) {
390
+ function _(l) {
306
391
  return {
307
392
  groupKey: l.__groupKey,
308
393
  count: l.__groupCount,
309
- collapsed: tl.value.has(
394
+ collapsed: bl.value.has(
310
395
  l.__groupPath ? l.__groupPath.join("/") : l.__groupKey
311
396
  ),
312
- colorMap: d.groupColorMap,
313
- selectable: M.value,
397
+ colorMap: s.groupColorMap,
398
+ selectable: z.value,
314
399
  level: l.__groupLevel ?? 0,
315
400
  aggregations: l.__aggregations
316
401
  };
317
402
  }
318
- function J(l) {
403
+ function ee(l) {
319
404
  return l.__groupPath ? l.__groupPath.join("/") : l.__groupKey;
320
405
  }
321
- function Ee(l) {
406
+ function Qe(l) {
322
407
  return {
323
408
  row: l,
324
- rowKey: d.rowKey,
325
- selected: p.value.has(i(l)),
326
- selectable: M.value,
327
- columns: C.value,
328
- priorityColorMap: d.priorityColorMap,
329
- statusColorMap: d.statusColorMap
409
+ rowKey: s.rowKey,
410
+ selected: D.value.has(i(l)),
411
+ selectable: z.value,
412
+ columns: R.value,
413
+ priorityColorMap: s.priorityColorMap,
414
+ statusColorMap: s.statusColorMap
330
415
  };
331
416
  }
332
- function Pe(l, o) {
333
- const e = $e.value;
417
+ function Ue(l, o) {
418
+ const e = Be.value;
334
419
  return e !== null && e.rowId === l && e.colKey === o;
335
420
  }
336
- function Le(l, o) {
337
- return dl.value.some((e) => e.rowId === l && e.colKey === o);
421
+ function Ze(l, o) {
422
+ return Cl.value.some((e) => e.rowId === l && e.colKey === o);
338
423
  }
339
- function Ge(l) {
424
+ function _e(l) {
340
425
  const o = i(l);
341
426
  return {
342
- "of-row-dragging": ul.value && fl.value === o,
343
- "of-row-drop-target": ie.value === o,
344
- "of-row-drop-before": ie.value === o && Te.value === "before",
345
- "of-row-drop-after": ie.value === o && Te.value === "after"
427
+ "of-row-dragging": Dl.value && $l.value === o,
428
+ "of-row-drop-target": ye.value === o,
429
+ "of-row-drop-before": ye.value === o && Ee.value === "before",
430
+ "of-row-drop-after": ye.value === o && Ee.value === "after"
346
431
  };
347
432
  }
348
- function zl(l) {
349
- G.value = l, L.value = !0;
433
+ function Ol(l) {
434
+ ne.value = l, Y.value = !0;
350
435
  }
351
- function Al(l) {
436
+ function jl(l) {
352
437
  for (const [o, e] of Object.entries(l.fields))
353
438
  f("cell-edit", { rowId: l.rowId, fieldId: o, value: e });
354
439
  }
355
- return (l, o) => t(pe) ? (r(), s(c, { key: 0 }, [
356
- E(El, {
357
- rows: t(V),
358
- columns: C.value,
359
- selectable: M.value,
360
- addable: Ie.value,
440
+ return (l, o) => n(Re) ? (r(), d(g, { key: 0 }, [
441
+ G(eo, {
442
+ rows: n(V),
443
+ columns: R.value,
444
+ selectable: z.value,
445
+ addable: Ne.value,
361
446
  "status-color-map": u.statusColorMap,
362
447
  readonly: u.readonly,
363
- onRowClick: zl,
364
- onAddRow: o[0] || (o[0] = (e) => f("add-row"))
365
- }, Hl({ _: 2 }, [
448
+ class: S($e.value),
449
+ style: c(Se.value),
450
+ onRowClick: o[0] || (o[0] = (e) => Ol(e)),
451
+ onAddRow: o[1] || (o[1] = (e) => f("add-row"))
452
+ }, Jl({ _: 2 }, [
366
453
  l.$slots.cell ? {
367
454
  name: "cell",
368
- fn: he((e) => [
369
- T(l.$slots, "cell", Bl(Il(e)), void 0, !0)
455
+ fn: xe((e) => [
456
+ K(l.$slots, "cell", Ql(Ul(e)), void 0, !0)
370
457
  ]),
371
458
  key: "0"
372
459
  } : void 0
373
- ]), 1032, ["rows", "columns", "selectable", "addable", "status-color-map", "readonly"]),
374
- G.value ? (r(), y(t(Ye), {
460
+ ]), 1032, ["rows", "columns", "selectable", "addable", "status-color-map", "readonly", "class", "style"]),
461
+ Me.value ? (r(), p(n(tl), {
375
462
  key: 0,
376
- row: G.value,
377
- columns: C.value,
463
+ row: Me.value,
464
+ columns: R.value,
378
465
  "field-defs": u.fieldDefs,
379
- visible: L.value,
380
- onClose: o[1] || (o[1] = (e) => L.value = !1),
381
- onSave: Al,
382
- onDelete: o[2] || (o[2] = (e) => f("row-click", { id: e, __action: "delete" })),
383
- onCellEdit: o[3] || (o[3] = (e) => f("cell-edit", e))
384
- }, null, 8, ["row", "columns", "field-defs", "visible"])) : $("", !0)
385
- ], 64)) : (r(), s("div", {
466
+ visible: Y.value,
467
+ onClose: o[2] || (o[2] = (e) => Y.value = !1),
468
+ onSave: jl,
469
+ onDelete: o[3] || (o[3] = (e) => f("row-delete", e)),
470
+ onCellEdit: o[4] || (o[4] = (e) => f("cell-edit", e))
471
+ }, null, 8, ["row", "columns", "field-defs", "visible"])) : H("", !0)
472
+ ], 64)) : (r(), d("div", {
386
473
  key: 1,
387
474
  ref_key: "tableContainerRef",
388
- ref: oe,
389
- class: "of-data-table",
475
+ ref: de,
476
+ class: S(["of-data-table", $e.value]),
477
+ style: c(Se.value),
390
478
  role: "grid",
391
- tabindex: u.enableKeyboard ? 0 : void 0,
392
- onKeydown: o[14] || (o[14] = (e) => u.enableKeyboard ? t(il)(e) : void 0)
479
+ tabindex: "0",
480
+ onKeydown: o[19] || (o[19] = (e) => u.enableKeyboard ? n(xl)(e) : void 0)
393
481
  }, [
394
- nl.value ? (r(), s("div", Ql, [
395
- g("div", {
482
+ kl.value ? (r(), d("div", yo, [
483
+ v("div", {
396
484
  ref_key: "fixedContainerRef",
397
- ref: Ce,
398
- class: z(["of-data-table-fixed-region", { "of-fixed-shadow": al.value }]),
399
- style: k({ width: t(xe) + "px" }),
400
- onScroll: o[8] || (o[8] = //@ts-ignore
401
- (...e) => t(Se) && t(Se)(...e))
485
+ ref: He,
486
+ class: S(["of-data-table-fixed-region", { "of-fixed-shadow": pl.value }]),
487
+ style: c({ width: n(Ae) + "px" }),
488
+ onScroll: o[11] || (o[11] = //@ts-ignore
489
+ (...e) => n(Ke) && n(Ke)(...e))
402
490
  }, [
403
- E(me, {
404
- columns: t(te),
405
- selectable: M.value,
406
- "sort-key": t(F).field ?? "",
407
- "sort-order": t(F).order ?? "asc",
408
- "all-selected": t(le),
409
- indeterminate: Ke.value,
491
+ G(De, {
492
+ columns: n(ie),
493
+ selectable: z.value,
494
+ "sort-key": n(B).field ?? "",
495
+ "sort-order": n(B).order ?? "asc",
496
+ "all-selected": n(re),
497
+ indeterminate: Oe.value,
410
498
  "enable-resize": u.enableResize,
411
499
  "enable-field-menu": u.enableFieldManagement,
412
500
  "enable-add-field": u.enableFieldManagement,
413
- onSort: t(O),
414
- onSelectAll: _e,
415
- onResizeStart: ve,
416
- onResizeDblclick: ye,
417
- onHeaderContextmenu: ue,
418
- onHeaderDblclick: fe,
419
- onAddField: ce
420
- }, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
421
- g("div", Zl, [
422
- ae.value ? (r(), s("div", {
501
+ density: h.value,
502
+ onSort: n(X),
503
+ onSelectAll: je,
504
+ onResizeStart: pe,
505
+ onResizeDblclick: we,
506
+ onHeaderContextmenu: ge,
507
+ onHeaderDblclick: be,
508
+ onAddField: ke
509
+ }, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "density", "onSort"]),
510
+ v("div", go, [
511
+ ue.value ? (r(), d("div", {
423
512
  key: 0,
424
- style: k({ height: t(se) + "px", position: "relative" })
513
+ style: c({ height: n(ce) + "px", position: "relative" })
425
514
  }, [
426
- g("div", {
427
- style: k({ transform: `translateY(${t(de)}px)` })
515
+ v("div", {
516
+ style: c({ transform: `translateY(${n(ve)}px)` })
428
517
  }, [
429
- (r(!0), s(c, null, m(t(re), ({ data: e, index: n }) => (r(), s(c, {
518
+ (r(!0), d(g, null, x(n(fe), ({ data: e, index: t }) => (r(), d(g, {
430
519
  key: e.id
431
520
  }, [
432
- t(x)(e) ? (r(), y(Q, K({
521
+ n(F)(e) ? (r(), p(oe, L({
433
522
  key: 0,
434
523
  ref_for: !0,
435
- ref: (a) => t(j)((a == null ? void 0 : a.$el) ?? a, n)
436
- }, { ref_for: !0 }, q(e), {
437
- onToggle: (a) => t(N)(J(e))
438
- }), null, 16, ["onToggle"])) : (r(), s("div", {
524
+ ref: (a) => U(a, t)
525
+ }, { ref_for: !0 }, _(e), {
526
+ onToggle: (a) => n(N)(ee(e))
527
+ }), null, 16, ["onToggle"])) : (r(), d("div", {
439
528
  key: 1,
440
529
  ref_for: !0,
441
- ref: (a) => t(j)(a, n),
442
- class: z(["of-table-row", {
443
- "of-table-row--selected": t(p).has(i(e)),
444
- "of-table-row--hover": t(Y)(i(e))
530
+ ref: (a) => U(a, t),
531
+ class: S(["of-table-row", {
532
+ "of-table-row--selected": n(D).has(i(e)),
533
+ "of-table-row--hover": n(j)(i(e))
445
534
  }]),
446
535
  role: "row",
447
- onMouseenter: (a) => t(S)(i(e)),
448
- onMouseleave: o[5] || (o[5] = (a) => t(S)(null)),
449
- onClick: (a) => I(e)
536
+ tabindex: "0",
537
+ style: c(qe()),
538
+ onMouseenter: (a) => n(k)(i(e)),
539
+ onMouseleave: o[6] || (o[6] = (a) => n(k)(null)),
540
+ onFocusin: (a) => n(k)(i(e)),
541
+ onFocusout: o[7] || (o[7] = (a) => n(k)(null)),
542
+ onClick: (a) => A(e),
543
+ onKeydown: (a) => Q(a, e)
450
544
  }, [
451
- M.value ? (r(), s("div", {
545
+ z.value ? (r(), d("div", {
452
546
  key: 0,
453
547
  class: "of-td of-td-checkbox",
454
548
  role: "gridcell",
455
- onClick: o[4] || (o[4] = P(() => {
549
+ onClick: o[5] || (o[5] = le(() => {
456
550
  }, ["stop"]))
457
551
  }, [
458
- g("input", {
459
- type: "checkbox",
460
- class: "of-checkbox",
461
- checked: t(p).has(i(e)),
462
- onChange: (a) => U(i(e))
463
- }, null, 40, lo)
464
- ])) : $("", !0),
465
- (r(!0), s(c, null, m(t(te), (a) => (r(), s("div", {
552
+ v("label", {
553
+ class: "of-checkbox-label",
554
+ for: `fixed-row-select-${i(e)}`
555
+ }, [
556
+ v("input", {
557
+ id: `fixed-row-select-${i(e)}`,
558
+ type: "checkbox",
559
+ class: "of-checkbox",
560
+ checked: n(D).has(i(e)),
561
+ onChange: (a) => J(i(e))
562
+ }, null, 40, po),
563
+ o[20] || (o[20] = v("span", { class: "of-sr-only" }, "选择当前行", -1))
564
+ ], 8, ko)
565
+ ])) : H("", !0),
566
+ (r(!0), d(g, null, x(n(ie), (a) => (r(), d("div", {
466
567
  key: a.key,
467
568
  class: "of-td",
468
569
  role: "gridcell",
469
- style: k({
470
- width: (a.width === "fill" ? 200 : a.width) + "px",
471
- flexShrink: "0"
472
- })
570
+ style: c(Z(a))
473
571
  }, [
474
- T(l.$slots, "cell", {
572
+ K(l.$slots, "cell", {
475
573
  row: e,
476
574
  col: a
477
575
  }, () => {
478
- var v;
576
+ var b;
479
577
  return [
480
- (v = u.fieldDefs) != null && v.length ? (r(), y(_, {
578
+ (b = u.fieldDefs) != null && b.length ? (r(), p(W, {
481
579
  key: 0,
482
580
  "row-id": i(e),
483
- field: H(a.key),
484
- value: e[a.key],
485
- onCommit: B
486
- }, null, 8, ["row-id", "field", "value"])) : (r(), s("span", oo, A(e[a.key] ?? "-"), 1))
581
+ field: I(a.key),
582
+ value: C(e, a.key),
583
+ onCommit: E
584
+ }, null, 8, ["row-id", "field", "value"])) : (r(), d("span", wo, P(C(e, a.key) ?? "-"), 1))
487
585
  ];
488
586
  }, !0)
489
587
  ], 4))), 128))
490
- ], 42, eo))
588
+ ], 46, bo))
491
589
  ], 64))), 128))
492
590
  ], 4)
493
- ], 4)) : (r(!0), s(c, { key: 1 }, m(t(D), (e) => (r(), s(c, {
591
+ ], 4)) : (r(!0), d(g, { key: 1 }, x(n(M), (e) => (r(), d(g, {
494
592
  key: e.id
495
593
  }, [
496
- t(x)(e) ? (r(), y(Q, K({
594
+ n(F)(e) ? (r(), p(oe, L({
497
595
  key: 0,
498
596
  ref_for: !0
499
- }, q(e), {
500
- onToggle: (n) => t(N)(J(e))
501
- }), null, 16, ["onToggle"])) : (r(), s("div", {
597
+ }, _(e), {
598
+ onToggle: (t) => n(N)(ee(e))
599
+ }), null, 16, ["onToggle"])) : (r(), d("div", {
502
600
  key: 1,
503
- class: z(["of-table-row", {
504
- "of-table-row--selected": t(p).has(i(e)),
505
- "of-table-row--hover": t(Y)(i(e))
601
+ class: S(["of-table-row", {
602
+ "of-table-row--selected": n(D).has(i(e)),
603
+ "of-table-row--hover": n(j)(i(e))
506
604
  }]),
507
605
  role: "row",
508
- onMouseenter: (n) => t(S)(i(e)),
509
- onMouseleave: o[7] || (o[7] = (n) => t(S)(null)),
510
- onClick: (n) => I(e)
606
+ tabindex: "0",
607
+ style: c(qe()),
608
+ onMouseenter: (t) => n(k)(i(e)),
609
+ onMouseleave: o[9] || (o[9] = (t) => n(k)(null)),
610
+ onFocusin: (t) => n(k)(i(e)),
611
+ onFocusout: o[10] || (o[10] = (t) => n(k)(null)),
612
+ onClick: (t) => A(e),
613
+ onKeydown: (t) => Q(t, e)
511
614
  }, [
512
- M.value ? (r(), s("div", {
615
+ z.value ? (r(), d("div", {
513
616
  key: 0,
514
617
  class: "of-td of-td-checkbox",
515
618
  role: "gridcell",
516
- onClick: o[6] || (o[6] = P(() => {
619
+ onClick: o[8] || (o[8] = le(() => {
517
620
  }, ["stop"]))
518
621
  }, [
519
- g("input", {
520
- type: "checkbox",
521
- class: "of-checkbox",
522
- checked: t(p).has(i(e)),
523
- onChange: (n) => U(i(e))
524
- }, null, 40, no)
525
- ])) : $("", !0),
526
- (r(!0), s(c, null, m(t(te), (n) => (r(), s("div", {
527
- key: n.key,
622
+ v("label", {
623
+ class: "of-checkbox-label",
624
+ for: `row-select-${i(e)}`
625
+ }, [
626
+ v("input", {
627
+ id: `row-select-${i(e)}`,
628
+ type: "checkbox",
629
+ class: "of-checkbox",
630
+ checked: n(D).has(i(e)),
631
+ onChange: (t) => J(i(e))
632
+ }, null, 40, Co),
633
+ o[21] || (o[21] = v("span", { class: "of-sr-only" }, "选择当前行", -1))
634
+ ], 8, mo)
635
+ ])) : H("", !0),
636
+ (r(!0), d(g, null, x(n(ie), (t) => (r(), d("div", {
637
+ key: t.key,
528
638
  class: "of-td",
529
639
  role: "gridcell",
530
- style: k({
531
- width: (n.width === "fill" ? 200 : n.width) + "px",
532
- flexShrink: "0"
533
- })
640
+ style: c(Z(t))
534
641
  }, [
535
- T(l.$slots, "cell", {
642
+ K(l.$slots, "cell", {
536
643
  row: e,
537
- col: n
644
+ col: t
538
645
  }, () => {
539
646
  var a;
540
647
  return [
541
- (a = u.fieldDefs) != null && a.length ? (r(), y(_, {
648
+ (a = u.fieldDefs) != null && a.length ? (r(), p(W, {
542
649
  key: 0,
543
650
  "row-id": i(e),
544
- field: H(n.key),
545
- value: e[n.key],
546
- onCommit: B
547
- }, null, 8, ["row-id", "field", "value"])) : (r(), s("span", ao, A(e[n.key] ?? "-"), 1))
651
+ field: I(t.key),
652
+ value: C(e, t.key),
653
+ onCommit: E
654
+ }, null, 8, ["row-id", "field", "value"])) : (r(), d("span", xo, P(C(e, t.key) ?? "-"), 1))
548
655
  ];
549
656
  }, !0)
550
657
  ], 4))), 128))
551
- ], 42, to))
658
+ ], 46, ho))
552
659
  ], 64))), 128))
553
660
  ])
554
661
  ], 38),
555
- g("div", {
662
+ v("div", {
556
663
  ref_key: "scrollContainerRef",
557
- ref: W,
664
+ ref: O,
558
665
  class: "of-data-table-scroll-region",
559
- style: k({ marginLeft: t(xe) + "px" }),
560
- onScroll: Tl
666
+ style: c({ marginLeft: n(Ae) + "px" }),
667
+ onScroll: Nl
561
668
  }, [
562
- E(me, {
563
- columns: t(ne),
669
+ G(De, {
670
+ columns: n(se),
564
671
  selectable: !1,
565
- "sort-key": t(F).field ?? "",
566
- "sort-order": t(F).order ?? "asc",
672
+ "sort-key": n(B).field ?? "",
673
+ "sort-order": n(B).order ?? "asc",
567
674
  "enable-resize": u.enableResize,
568
675
  "enable-field-menu": u.enableFieldManagement,
569
676
  "enable-add-field": u.enableFieldManagement,
570
- onSort: t(O),
571
- onResizeStart: ve,
572
- onResizeDblclick: ye,
573
- onHeaderContextmenu: ue,
574
- onHeaderDblclick: fe,
575
- onAddField: ce
576
- }, null, 8, ["columns", "sort-key", "sort-order", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
577
- g("div", ro, [
578
- ae.value ? (r(), s("div", {
677
+ density: h.value,
678
+ onSort: n(X),
679
+ onResizeStart: pe,
680
+ onResizeDblclick: we,
681
+ onHeaderContextmenu: ge,
682
+ onHeaderDblclick: be,
683
+ onAddField: ke
684
+ }, null, 8, ["columns", "sort-key", "sort-order", "enable-resize", "enable-field-menu", "enable-add-field", "density", "onSort"]),
685
+ v("div", Do, [
686
+ ue.value ? (r(), d("div", {
579
687
  key: 0,
580
- style: k({ height: t(se) + "px", position: "relative" })
688
+ style: c({ height: n(ce) + "px", position: "relative" })
581
689
  }, [
582
- g("div", {
583
- style: k({ transform: `translateY(${t(de)}px)` })
690
+ v("div", {
691
+ style: c({ transform: `translateY(${n(ve)}px)` })
584
692
  }, [
585
- (r(!0), s(c, null, m(t(re), ({ data: e }) => (r(), s(c, {
693
+ (r(!0), d(g, null, x(n(fe), ({ data: e }) => (r(), d(g, {
586
694
  key: e.id
587
695
  }, [
588
- t(x)(e) ? (r(), s("div", so)) : (r(), s("div", {
696
+ n(F)(e) ? (r(), d("div", {
697
+ key: 0,
698
+ style: c(Je())
699
+ }, null, 4)) : (r(), d("div", {
589
700
  key: 1,
590
- class: z(["of-table-row", {
591
- "of-table-row--selected": t(p).has(i(e)),
592
- "of-table-row--hover": t(Y)(i(e))
701
+ class: S(["of-table-row", {
702
+ "of-table-row--selected": n(D).has(i(e)),
703
+ "of-table-row--hover": n(j)(i(e))
593
704
  }]),
594
705
  role: "row",
595
- onMouseenter: (n) => t(S)(i(e)),
596
- onMouseleave: o[9] || (o[9] = (n) => t(S)(null)),
597
- onClick: (n) => I(e)
706
+ tabindex: "0",
707
+ onMouseenter: (t) => n(k)(i(e)),
708
+ onMouseleave: o[12] || (o[12] = (t) => n(k)(null)),
709
+ onFocusin: (t) => n(k)(i(e)),
710
+ onFocusout: o[13] || (o[13] = (t) => n(k)(null)),
711
+ onClick: (t) => A(e),
712
+ onKeydown: (t) => Q(t, e)
598
713
  }, [
599
- (r(!0), s(c, null, m(t(ne), (n) => (r(), s("div", {
600
- key: n.key,
714
+ (r(!0), d(g, null, x(n(se), (t) => (r(), d("div", {
715
+ key: t.key,
601
716
  class: "of-td",
602
717
  role: "gridcell",
603
- style: k({
604
- width: n.width === "fill" ? void 0 : n.width + "px",
605
- flex: n.width === "fill" ? "1 1 " + (n.minWidth ?? 220) + "px" : "0 0 auto"
606
- })
718
+ style: c(Z(t))
607
719
  }, [
608
- T(l.$slots, "cell", {
720
+ K(l.$slots, "cell", {
609
721
  row: e,
610
- col: n
722
+ col: t
611
723
  }, () => {
612
724
  var a;
613
725
  return [
614
- (a = u.fieldDefs) != null && a.length ? (r(), y(_, {
726
+ (a = u.fieldDefs) != null && a.length ? (r(), p(W, {
615
727
  key: 0,
616
728
  "row-id": i(e),
617
- field: H(n.key),
618
- value: e[n.key],
619
- onCommit: B
620
- }, null, 8, ["row-id", "field", "value"])) : (r(), s("span", uo, A(e[n.key] ?? "-"), 1))
729
+ field: I(t.key),
730
+ value: C(e, t.key),
731
+ onCommit: E
732
+ }, null, 8, ["row-id", "field", "value"])) : (r(), d("span", So, P(C(e, t.key) ?? "-"), 1))
621
733
  ];
622
734
  }, !0)
623
735
  ], 4))), 128))
624
- ], 42, io))
736
+ ], 42, $o))
625
737
  ], 64))), 128))
626
738
  ], 4)
627
- ], 4)) : (r(!0), s(c, { key: 1 }, m(t(D), (e) => (r(), s(c, {
739
+ ], 4)) : (r(!0), d(g, { key: 1 }, x(n(M), (e) => (r(), d(g, {
628
740
  key: e.id
629
741
  }, [
630
- t(x)(e) ? (r(), s("div", fo)) : (r(), s("div", {
742
+ n(F)(e) ? (r(), d("div", {
743
+ key: 0,
744
+ style: c(Je())
745
+ }, null, 4)) : (r(), d("div", {
631
746
  key: 1,
632
- class: z(["of-table-row", {
633
- "of-table-row--selected": t(p).has(i(e)),
634
- "of-table-row--hover": t(Y)(i(e))
747
+ class: S(["of-table-row", {
748
+ "of-table-row--selected": n(D).has(i(e)),
749
+ "of-table-row--hover": n(j)(i(e))
635
750
  }]),
636
751
  role: "row",
637
- onMouseenter: (n) => t(S)(i(e)),
638
- onMouseleave: o[10] || (o[10] = (n) => t(S)(null)),
639
- onClick: (n) => I(e)
752
+ tabindex: "0",
753
+ onMouseenter: (t) => n(k)(i(e)),
754
+ onMouseleave: o[14] || (o[14] = (t) => n(k)(null)),
755
+ onFocusin: (t) => n(k)(i(e)),
756
+ onFocusout: o[15] || (o[15] = (t) => n(k)(null)),
757
+ onClick: (t) => A(e),
758
+ onKeydown: (t) => Q(t, e)
640
759
  }, [
641
- (r(!0), s(c, null, m(t(ne), (n) => (r(), s("div", {
642
- key: n.key,
760
+ (r(!0), d(g, null, x(n(se), (t) => (r(), d("div", {
761
+ key: t.key,
643
762
  class: "of-td",
644
763
  role: "gridcell",
645
- style: k({
646
- width: n.width === "fill" ? void 0 : n.width + "px",
647
- flex: n.width === "fill" ? "1 1 " + (n.minWidth ?? 220) + "px" : "0 0 auto"
648
- })
764
+ style: c(Z(t))
649
765
  }, [
650
- T(l.$slots, "cell", {
766
+ K(l.$slots, "cell", {
651
767
  row: e,
652
- col: n
768
+ col: t
653
769
  }, () => {
654
770
  var a;
655
771
  return [
656
- (a = u.fieldDefs) != null && a.length ? (r(), y(_, {
772
+ (a = u.fieldDefs) != null && a.length ? (r(), p(W, {
657
773
  key: 0,
658
774
  "row-id": i(e),
659
- field: H(n.key),
660
- value: e[n.key],
661
- onCommit: B
662
- }, null, 8, ["row-id", "field", "value"])) : (r(), s("span", vo, A(e[n.key] ?? "-"), 1))
775
+ field: I(t.key),
776
+ value: C(e, t.key),
777
+ onCommit: E
778
+ }, null, 8, ["row-id", "field", "value"])) : (r(), d("span", Mo, P(C(e, t.key) ?? "-"), 1))
663
779
  ];
664
780
  }, !0)
665
781
  ], 4))), 128))
666
- ], 42, co))
782
+ ], 42, Ro))
667
783
  ], 64))), 128))
668
784
  ])
669
785
  ], 36)
670
- ])) : (r(), s(c, { key: 1 }, [
671
- E(me, {
672
- columns: C.value,
673
- selectable: M.value,
674
- "sort-key": t(F).field ?? "",
675
- "sort-order": t(F).order ?? "asc",
676
- "all-selected": t(le),
677
- indeterminate: Ke.value,
786
+ ])) : (r(), d(g, { key: 1 }, [
787
+ G(De, {
788
+ columns: R.value,
789
+ selectable: z.value,
790
+ "sort-key": n(B).field ?? "",
791
+ "sort-order": n(B).order ?? "asc",
792
+ "all-selected": n(re),
793
+ indeterminate: Oe.value,
678
794
  "enable-resize": u.enableResize,
679
795
  "enable-field-menu": u.enableFieldManagement,
680
796
  "enable-add-field": u.enableFieldManagement,
681
- onSort: t(O),
682
- onSelectAll: _e,
683
- onResizeStart: ve,
684
- onResizeDblclick: ye,
685
- onHeaderContextmenu: ue,
686
- onHeaderDblclick: fe,
687
- onAddField: ce
688
- }, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "onSort"]),
689
- g("div", {
797
+ density: h.value,
798
+ onSort: n(X),
799
+ onSelectAll: je,
800
+ onResizeStart: pe,
801
+ onResizeDblclick: we,
802
+ onHeaderContextmenu: ge,
803
+ onHeaderDblclick: be,
804
+ onAddField: ke
805
+ }, null, 8, ["columns", "selectable", "sort-key", "sort-order", "all-selected", "indeterminate", "enable-resize", "enable-field-menu", "enable-add-field", "density", "onSort"]),
806
+ v("div", {
690
807
  ref_key: "scrollContainerRef",
691
- ref: W,
808
+ ref: O,
692
809
  class: "of-data-table-scroll-container"
693
810
  }, [
694
- ae.value ? (r(), s("div", {
811
+ ue.value ? (r(), d("div", {
695
812
  key: 0,
696
- style: k({ height: t(se) + "px", position: "relative" })
813
+ style: c({ height: n(ce) + "px", position: "relative" })
697
814
  }, [
698
- g("div", {
699
- style: k({ transform: `translateY(${t(de)}px)` })
815
+ v("div", {
816
+ style: c({ transform: `translateY(${n(ve)}px)` })
700
817
  }, [
701
- (r(!0), s(c, null, m(t(re), ({ data: e, index: n }) => (r(), s(c, {
818
+ (r(!0), d(g, null, x(n(fe), ({ data: e, index: t }) => (r(), d(g, {
702
819
  key: e.id
703
820
  }, [
704
- t(x)(e) ? (r(), y(Q, K({
821
+ n(F)(e) ? (r(), p(oe, L({
705
822
  key: 0,
706
823
  ref_for: !0,
707
- ref: (a) => t(j)((a == null ? void 0 : a.$el) ?? a, n)
708
- }, { ref_for: !0 }, q(e), {
709
- onToggle: (a) => t(N)(J(e))
710
- }), null, 16, ["onToggle"])) : (r(), y(Ve, K({
824
+ ref: (a) => U(a, t)
825
+ }, { ref_for: !0 }, _(e), {
826
+ onToggle: (a) => n(N)(ee(e))
827
+ }), null, 16, ["onToggle"])) : (r(), p(el, L({
711
828
  key: 1,
712
829
  ref_for: !0,
713
- ref: (a) => t(j)((a == null ? void 0 : a.$el) ?? a, n)
714
- }, { ref_for: !0 }, Ee(e), {
830
+ ref: (a) => U(a, t)
831
+ }, { ref_for: !0 }, Qe(e), {
832
+ density: h.value,
715
833
  draggable: u.enableRowDrag,
716
- class: Ge(e),
717
- onSelect: U,
718
- onClick: (a) => I(e),
719
- onDragstart: (a) => Ae(a, e),
720
- onDragover: (a) => Fe(a, e),
721
- onDrop: (a) => He(a, e),
722
- onDragend: t(ze)
834
+ class: _e(e),
835
+ onSelect: J,
836
+ onClick: (a) => A(e),
837
+ onDragstart: (a) => We(a, e),
838
+ onDragover: (a) => Ge(a, e),
839
+ onDrop: (a) => Ye(a, e),
840
+ onDragend: n(Le)
723
841
  }), {
724
- cell: he(({ row: a, col: v }) => [
725
- T(l.$slots, "cell", {
842
+ cell: xe(({ row: a, col: b }) => [
843
+ K(l.$slots, "cell", {
726
844
  row: a,
727
- col: v
845
+ col: b
728
846
  }, () => {
729
- var ge;
847
+ var he;
730
848
  return [
731
- (ge = u.fieldDefs) != null && ge.length ? (r(), y(_, {
849
+ (he = u.fieldDefs) != null && he.length ? (r(), p(W, {
732
850
  key: 0,
733
851
  "row-id": i(a),
734
- field: H(v.key),
735
- value: a[v.key],
736
- class: z({
737
- "of-cell--active": Pe(i(a), v.key),
738
- "of-cell--selected": Le(i(a), v.key)
852
+ field: I(b.key),
853
+ value: a[b.key],
854
+ class: S({
855
+ "of-cell--active": Ue(i(a), b.key),
856
+ "of-cell--selected": Ze(i(a), b.key)
739
857
  }),
740
- onCommit: B,
741
- onClick: P(($o) => u.enableKeyboard && t(Me)(i(a), v.key), ["stop"])
742
- }, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), s("span", yo, A(a[v.key] ?? "-"), 1))
858
+ onCommit: E,
859
+ onClick: le((Po) => u.enableKeyboard && n(Ie)(i(a), b.key), ["stop"])
860
+ }, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), d("span", Fo, P(C(a, b.key) ?? "-"), 1))
743
861
  ];
744
862
  }, !0)
745
863
  ]),
746
864
  _: 3
747
- }, 16, ["draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
865
+ }, 16, ["density", "draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
748
866
  ], 64))), 128))
749
867
  ], 4)
750
- ], 4)) : (r(!0), s(c, { key: 1 }, m(t(D), (e) => (r(), s(c, {
868
+ ], 4)) : (r(!0), d(g, { key: 1 }, x(n(M), (e) => (r(), d(g, {
751
869
  key: e.id
752
870
  }, [
753
- t(x)(e) ? (r(), y(Q, K({
871
+ n(F)(e) ? (r(), p(oe, L({
754
872
  key: 0,
755
873
  ref_for: !0
756
- }, q(e), {
757
- onToggle: (n) => t(N)(J(e))
758
- }), null, 16, ["onToggle"])) : (r(), y(Ve, K({
874
+ }, _(e), {
875
+ onToggle: (t) => n(N)(ee(e))
876
+ }), null, 16, ["onToggle"])) : (r(), p(el, L({
759
877
  key: 1,
760
878
  ref_for: !0
761
- }, Ee(e), {
879
+ }, Qe(e), {
880
+ density: h.value,
762
881
  draggable: u.enableRowDrag,
763
- class: Ge(e),
764
- onSelect: U,
765
- onClick: (n) => I(e),
766
- onDragstart: (n) => Ae(n, e),
767
- onDragover: (n) => Fe(n, e),
768
- onDrop: (n) => He(n, e),
769
- onDragend: t(ze)
882
+ class: _e(e),
883
+ onSelect: J,
884
+ onClick: (t) => A(e),
885
+ onDragstart: (t) => We(t, e),
886
+ onDragover: (t) => Ge(t, e),
887
+ onDrop: (t) => Ye(t, e),
888
+ onDragend: n(Le)
770
889
  }), {
771
- cell: he(({ row: n, col: a }) => [
772
- T(l.$slots, "cell", {
773
- row: n,
890
+ cell: xe(({ row: t, col: a }) => [
891
+ K(l.$slots, "cell", {
892
+ row: t,
774
893
  col: a
775
894
  }, () => {
776
- var v;
895
+ var b;
777
896
  return [
778
- (v = u.fieldDefs) != null && v.length ? (r(), y(_, {
897
+ (b = u.fieldDefs) != null && b.length ? (r(), p(W, {
779
898
  key: 0,
780
- "row-id": i(n),
781
- field: H(a.key),
782
- value: n[a.key],
783
- class: z({
784
- "of-cell--active": Pe(i(n), a.key),
785
- "of-cell--selected": Le(i(n), a.key)
899
+ "row-id": i(t),
900
+ field: I(a.key),
901
+ value: t[a.key],
902
+ class: S({
903
+ "of-cell--active": Ue(i(t), a.key),
904
+ "of-cell--selected": Ze(i(t), a.key)
786
905
  }),
787
- onCommit: B,
788
- onClick: P((ge) => u.enableKeyboard && t(Me)(i(n), a.key), ["stop"])
789
- }, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), s("span", go, A(n[a.key] ?? "-"), 1))
906
+ onCommit: E,
907
+ onClick: le((he) => u.enableKeyboard && n(Ie)(i(t), a.key), ["stop"])
908
+ }, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), d("span", To, P(C(t, a.key) ?? "-"), 1))
790
909
  ];
791
910
  }, !0)
792
911
  ]),
793
912
  _: 3
794
- }, 16, ["draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
913
+ }, 16, ["density", "draggable", "class", "onClick", "onDragstart", "onDragover", "onDrop", "onDragend"]))
795
914
  ], 64))), 128))
796
915
  ], 512)
797
916
  ], 64)),
798
- t(Je) ? (r(), s("div", {
917
+ n(ul) ? (r(), d("div", {
799
918
  key: 2,
800
919
  class: "of-resize-indicator",
801
- style: k({ left: t(Qe) + "px" })
802
- }, null, 4)) : $("", !0),
803
- hl.value ? (r(), s("div", bo, [
804
- g("span", ko, A(t(Be).size) + " 条草稿", 1),
805
- g("button", {
920
+ style: c({ left: n(fl) + "px" })
921
+ }, null, 4)) : H("", !0),
922
+ zl.value ? (r(), d("div", Ho, [
923
+ v("span", zo, P(n(Ve).size) + " 条草稿", 1),
924
+ v("button", {
806
925
  class: "of-data-table-draft-btn of-data-table-draft-btn--commit",
807
- onClick: pl
926
+ onClick: Kl
808
927
  }, " 全部提交 "),
809
- g("button", {
928
+ v("button", {
810
929
  class: "of-data-table-draft-btn of-data-table-draft-btn--discard",
811
- onClick: wl
930
+ onClick: Pl
812
931
  }, " 全部放弃 ")
813
- ])) : $("", !0),
814
- Ie.value ? (r(), y(_l, {
932
+ ])) : H("", !0),
933
+ Ne.value ? (r(), p(_l, {
815
934
  key: 4,
816
- onClick: ml
817
- })) : $("", !0),
818
- u.enableFieldManagement ? (r(), y(t(Ne), {
935
+ onClick: Al
936
+ })) : H("", !0),
937
+ u.enableFieldManagement ? (r(), p(n(ol), {
819
938
  key: 5,
820
- visible: w.value.visible,
821
- "col-key": w.value.colKey,
822
- "col-label": w.value.colLabel,
823
- "field-type": w.value.fieldType,
824
- x: w.value.x,
825
- y: w.value.y,
826
- onClose: o[11] || (o[11] = (e) => w.value.visible = !1),
827
- onRename: Cl,
828
- onChangeType: Dl,
829
- onSort: o[12] || (o[12] = (e, n) => t(O)(e)),
830
- onHide: xl,
831
- onDelete: Sl,
832
- onDuplicate: Rl
833
- }, null, 8, ["visible", "col-key", "col-label", "field-type", "x", "y"])) : $("", !0),
834
- (r(), y(Kl, { to: "body" }, [
835
- X.value ? (r(), s("div", {
836
- key: 0,
837
- class: "of-add-field-overlay",
838
- onClick: o[13] || (o[13] = P((e) => X.value = !1, ["self"]))
839
- }, [
840
- g("div", ho, [
841
- E(t(We), { onSelect: $l })
939
+ visible: $.value.visible,
940
+ "col-key": $.value.colKey,
941
+ "col-label": $.value.colLabel,
942
+ "field-type": $.value.fieldType,
943
+ x: $.value.x,
944
+ y: $.value.y,
945
+ onClose: o[16] || (o[16] = (e) => $.value.visible = !1),
946
+ onRename: Bl,
947
+ onChangeType: Il,
948
+ onSort: o[17] || (o[17] = (e, t) => n(X)(e)),
949
+ onHide: El,
950
+ onDelete: Ll,
951
+ onDuplicate: Wl
952
+ }, null, 8, ["visible", "col-key", "col-label", "field-type", "x", "y"])) : H("", !0),
953
+ (r(), p(Zl, { to: "body" }, [
954
+ q.value ? (r(), d("div", Ao, [
955
+ v("button", {
956
+ type: "button",
957
+ class: "of-add-field-overlay__backdrop",
958
+ tabindex: "-1",
959
+ "aria-hidden": "true",
960
+ onClick: o[18] || (o[18] = (e) => q.value = !1)
961
+ }),
962
+ v("div", Ko, [
963
+ G(n(nl), { onSelect: Gl })
842
964
  ])
843
- ])) : $("", !0)
965
+ ])) : H("", !0)
844
966
  ]))
845
- ], 40, Jl));
967
+ ], 38));
846
968
  }
847
969
  });
848
970
  export {
849
- jo as default
971
+ ln as default
850
972
  };