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