@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.
- package/dist/components/ContextMenu/index.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
- package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
- package/dist/components/Dashboard/index.vue.d.ts +2 -1
- package/dist/components/Dashboard/index.vue.js +2 -2
- package/dist/components/ai/AiSender.vue.js +2 -2
- package/dist/components/ai/AiSender.vue2.js +8 -7
- package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
- package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
- package/dist/components/auxiliary/FileUpload.vue.js +2 -2
- package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
- package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
- package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
- package/dist/components/base/Accordion.vue.js +1 -1
- package/dist/components/base/Avatar.vue.d.ts +3 -0
- package/dist/components/base/Avatar.vue.js +4 -4
- package/dist/components/base/Avatar.vue2.js +8 -8
- package/dist/components/base/Badge.vue.d.ts +2 -0
- package/dist/components/base/Badge.vue.js +2 -2
- package/dist/components/base/Badge.vue2.js +2 -2
- package/dist/components/base/ButtonGroup.vue.js +2 -2
- package/dist/components/base/ButtonGroup.vue2.js +2 -2
- package/dist/components/base/ChainItem.vue.d.ts +6 -0
- package/dist/components/base/ChainItem.vue.js +2 -2
- package/dist/components/base/ChainItem.vue2.js +17 -17
- package/dist/components/base/DropdownMenu.vue.js +2 -2
- package/dist/components/base/DropdownMenu.vue2.js +22 -20
- package/dist/components/base/EmptyState.vue.js +2 -2
- package/dist/components/base/EmptyState.vue2.js +2 -2
- package/dist/components/base/InfoCard.vue.d.ts +9 -0
- package/dist/components/base/InfoCard.vue.js +2 -2
- package/dist/components/base/InfoCard.vue2.js +65 -57
- package/dist/components/base/MonitorItem.vue.js +2 -2
- package/dist/components/base/MonitorItem.vue2.js +33 -25
- package/dist/components/base/PersonaCard.vue.d.ts +5 -0
- package/dist/components/base/PersonaCard.vue.js +3 -3
- package/dist/components/base/PersonaCard.vue2.js +56 -50
- package/dist/components/base/ProgressBar.vue.d.ts +1 -0
- package/dist/components/base/ProgressBar.vue.js +2 -2
- package/dist/components/base/ProgressBar.vue2.js +10 -10
- package/dist/components/base/RangeSlider.vue.d.ts +15 -0
- package/dist/components/base/RangeSlider.vue.js +1 -1
- package/dist/components/base/RangeSlider.vue2.js +22 -15
- package/dist/components/base/RefTag.vue.d.ts +4 -0
- package/dist/components/base/RefTag.vue.js +3 -3
- package/dist/components/base/RefTag.vue2.js +14 -14
- package/dist/components/base/SearchHighlight.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue.js +2 -2
- package/dist/components/base/SectionBlock.vue2.js +54 -48
- package/dist/components/base/SelectBadge.vue.d.ts +5 -0
- package/dist/components/base/SelectBadge.vue.js +3 -3
- package/dist/components/base/SelectBadge.vue2.js +36 -28
- package/dist/components/base/StatisticCard.vue.js +1 -1
- package/dist/components/base/StatusIndicator.vue.js +2 -2
- package/dist/components/base/StatusIndicator.vue2.js +2 -2
- package/dist/components/base/StatusSummary.vue.js +2 -2
- package/dist/components/base/Stepper.vue.js +2 -2
- package/dist/components/base/Switch.vue.js +2 -2
- package/dist/components/base/ToolbarBtn.vue.js +2 -2
- package/dist/components/base/ViewModeGroup.vue.js +1 -1
- package/dist/components/base/ViewModeGroup.vue2.js +3 -3
- package/dist/components/base/ViewSwitcher.vue.js +1 -1
- package/dist/components/base/ViewSwitcher.vue2.js +3 -3
- package/dist/components/base/ViewTab.vue.js +1 -1
- package/dist/components/base/ViewTab.vue2.js +5 -6
- package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
- package/dist/components/detail/PropPanel.vue.js +2 -2
- package/dist/components/detail/PropPanel.vue2.js +34 -30
- package/dist/components/detail/PropRow.vue.d.ts +6 -0
- package/dist/components/detail/PropRow.vue.js +2 -2
- package/dist/components/detail/PropRow.vue2.js +24 -24
- package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
- package/dist/components/editor/BlockQuote.vue.js +1 -1
- package/dist/components/editor/BlockQuote.vue2.js +43 -29
- package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
- package/dist/components/editor/ContentBlock.vue.js +2 -2
- package/dist/components/editor/ContentBlock.vue2.js +54 -33
- package/dist/components/editor/RichTextEditor.vue.js +2 -2
- package/dist/components/editor/RichTextEditor.vue2.js +10 -14
- package/dist/components/field/FieldAttachment.vue.js +2 -2
- package/dist/components/field/FieldAttachment.vue2.js +30 -32
- package/dist/components/field/FieldAutoNumber.vue.js +2 -2
- package/dist/components/field/FieldCheckbox.vue.js +2 -2
- package/dist/components/field/FieldCheckbox.vue2.js +13 -11
- package/dist/components/field/FieldCreator.vue.js +2 -2
- package/dist/components/field/FieldCurrency.vue.js +2 -2
- package/dist/components/field/FieldCurrency.vue2.js +15 -14
- package/dist/components/field/FieldDate.vue.js +1 -1
- package/dist/components/field/FieldDate.vue2.js +14 -16
- package/dist/components/field/FieldDatetime.vue.js +1 -1
- package/dist/components/field/FieldDatetime.vue2.js +12 -11
- package/dist/components/field/FieldEmail.vue.js +2 -2
- package/dist/components/field/FieldEmail.vue2.js +14 -13
- package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldMultiSelect.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
- package/dist/components/field/FieldNumber.vue.js +3 -3
- package/dist/components/field/FieldNumber.vue2.js +19 -18
- package/dist/components/field/FieldPhone.vue.js +2 -2
- package/dist/components/field/FieldPhone.vue2.js +12 -11
- package/dist/components/field/FieldProgress.vue.js +1 -1
- package/dist/components/field/FieldProgress.vue2.js +18 -17
- package/dist/components/field/FieldRating.vue.js +2 -2
- package/dist/components/field/FieldRating.vue2.js +22 -16
- package/dist/components/field/FieldRelation.vue.js +1 -1
- package/dist/components/field/FieldRelation.vue2.js +25 -22
- package/dist/components/field/FieldRichText.vue.js +1 -1
- package/dist/components/field/FieldRichText.vue2.js +10 -7
- package/dist/components/field/FieldSelect.vue.js +2 -2
- package/dist/components/field/FieldSelect.vue2.js +81 -63
- package/dist/components/field/FieldText.vue.js +2 -2
- package/dist/components/field/FieldText.vue2.js +17 -16
- package/dist/components/field/FieldUrl.vue.js +2 -2
- package/dist/components/field/FieldUrl.vue2.js +17 -16
- package/dist/components/form/FormDesigner.vue.js +2 -2
- package/dist/components/form/FormDesigner.vue2.js +83 -78
- package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
- package/dist/components/gallery/GalleryCard.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue2.js +2 -1
- package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
- package/dist/components/kanban/KanbanCard.vue.js +1 -1
- package/dist/components/kanban/KanbanCard.vue2.js +15 -14
- package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
- package/dist/components/kanban/KanbanColumn.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
- package/dist/components/kanban/QuickAddRow.vue.js +2 -2
- package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
- package/dist/components/layout/Navbar.vue.js +3 -3
- package/dist/components/layout/Navbar.vue2.js +5 -4
- package/dist/components/layout/Sidebar.vue.js +2 -2
- package/dist/components/layout/Sidebar.vue2.js +1 -1
- package/dist/components/mermaid/MermaidChart.vue.js +2 -2
- package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
- package/dist/components/overlay/Dialog.vue.d.ts +1 -0
- package/dist/components/overlay/Dialog.vue.js +1 -1
- package/dist/components/overlay/Dialog.vue2.js +9 -9
- package/dist/components/overlay/Drawer.vue.d.ts +1 -0
- package/dist/components/overlay/Drawer.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue2.js +35 -29
- package/dist/components/overlay/Modal.vue.d.ts +1 -0
- package/dist/components/overlay/Modal.vue.js +1 -1
- package/dist/components/overlay/Modal.vue2.js +34 -28
- package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
- package/dist/components/overlay/SidePanel.vue.js +1 -1
- package/dist/components/overlay/SidePanel.vue2.js +6 -6
- package/dist/components/split/SplitPane.vue.js +2 -2
- package/dist/components/split/SplitPane.vue2.js +11 -9
- package/dist/components/table/ColumnHeaderMenu.vue.d.ts +2 -0
- package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
- package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
- package/dist/components/table/DataTable.vue.d.ts +12 -5
- package/dist/components/table/DataTable.vue.js +4 -4
- package/dist/components/table/DataTable.vue2.js +535 -477
- package/dist/components/table/DetailSheet.vue.js +2 -2
- package/dist/components/table/DetailSheet.vue2.js +45 -40
- package/dist/components/table/FieldCell.vue.d.ts +2 -1
- package/dist/components/table/FieldCell.vue.js +1 -1
- package/dist/components/table/FieldCell.vue2.js +57 -48
- package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
- package/dist/components/table/FieldTypePicker.vue.js +4 -4
- package/dist/components/table/FieldTypePicker.vue2.js +1 -1
- package/dist/components/table/MobileListView.vue.d.ts +26 -3
- package/dist/components/table/MobileListView.vue.js +2 -2
- package/dist/components/table/MobileListView.vue2.js +65 -49
- package/dist/components/table/TableColumnManager.vue.js +1 -1
- package/dist/components/table/TableColumnManager.vue2.js +29 -28
- package/dist/components/table/TableDataRow.vue.d.ts +2 -0
- package/dist/components/table/TableDataRow.vue.js +4 -4
- package/dist/components/table/TableDataRow.vue2.js +70 -58
- package/dist/components/table/TableFilterPanel.vue.js +2 -2
- package/dist/components/table/TableFilterPanel.vue2.js +3 -0
- package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
- package/dist/components/table/TableGroupRow.vue.js +2 -2
- package/dist/components/table/TableGroupRow.vue2.js +35 -30
- package/dist/components/table/TableHeaderRow.vue.js +3 -3
- package/dist/components/table/TableHeaderRow.vue2.js +63 -46
- package/dist/components/table/TableToolbar.vue.js +1 -1
- package/dist/components/table/TableToolbar.vue2.js +2 -2
- package/dist/components/tabs/TabPanel.vue.js +4 -4
- package/dist/components/tabs/TabPanel.vue2.js +1 -1
- package/dist/components/tabs/Tabs.vue.js +2 -2
- package/dist/components/tabs/Tabs.vue2.js +2 -2
- package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
- package/dist/components/timeline/GanttRow.vue.js +2 -2
- package/dist/components/timeline/GanttRow.vue2.js +68 -52
- package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
- package/dist/components/timeline/GanttTimeline.vue.js +2 -2
- package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
- package/dist/composables/useKeyboardNavigation.d.ts +1 -1
- package/dist/composables/useRowDrag.d.ts +6 -4
- package/dist/composables/useRowDrag.js +24 -24
- package/dist/composables/useSupabaseProvider.d.ts +8 -1
- package/dist/composables/useTableData.d.ts +5 -3
- package/dist/composables/useTableGroup.d.ts +2 -2
- package/dist/composables/useViewPersistence.d.ts +32 -3
- package/dist/composables/useVirtualList.js +60 -59
- package/dist/plugin.js +103 -102
- package/dist/style.css +1 -1
- package/dist/utils/echarts.d.ts +1 -0
- package/dist/utils/supabaseSchema.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,155 +1,159 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { useInlineEdit as
|
|
9
|
-
import { useVirtualList as
|
|
10
|
-
import { useTable as
|
|
11
|
-
import { useTableGroup as
|
|
12
|
-
import { useTableData as
|
|
13
|
-
import { useTableColumns as
|
|
14
|
-
import { useColumnResize as
|
|
15
|
-
import { useKeyboardNavigation as
|
|
16
|
-
import { useBreakpoint as
|
|
17
|
-
import { useFixedColumns as
|
|
18
|
-
import { useRowDrag as
|
|
19
|
-
import { useDraftRows as
|
|
20
|
-
const
|
|
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
|
-
},
|
|
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
|
-
},
|
|
27
|
+
}, uo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], fo = ["for"], co = ["id", "checked", "onChange"], vo = {
|
|
28
28
|
key: 1,
|
|
29
29
|
class: "of-td-text"
|
|
30
|
-
},
|
|
30
|
+
}, yo = { class: "of-data-table-scroll-body" }, go = {
|
|
31
31
|
key: 0,
|
|
32
32
|
style: { height: "36px" }
|
|
33
|
-
},
|
|
33
|
+
}, bo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], ko = {
|
|
34
34
|
key: 1,
|
|
35
35
|
class: "of-td-text"
|
|
36
|
-
},
|
|
36
|
+
}, wo = {
|
|
37
37
|
key: 0,
|
|
38
38
|
style: { height: "36px" }
|
|
39
|
-
},
|
|
39
|
+
}, po = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], ho = {
|
|
40
40
|
key: 1,
|
|
41
41
|
class: "of-td-text"
|
|
42
|
-
},
|
|
42
|
+
}, mo = {
|
|
43
43
|
key: 1,
|
|
44
44
|
class: "of-td-text"
|
|
45
|
-
},
|
|
45
|
+
}, Co = {
|
|
46
46
|
key: 1,
|
|
47
47
|
class: "of-td-text"
|
|
48
|
-
},
|
|
48
|
+
}, Do = {
|
|
49
49
|
key: 3,
|
|
50
50
|
class: "of-data-table-draft-toolbar"
|
|
51
|
-
},
|
|
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:
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
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
|
-
}),
|
|
92
|
-
const l =
|
|
93
|
-
return l.size === 0 ?
|
|
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:
|
|
104
|
+
sort: K,
|
|
100
105
|
toggleSort: O,
|
|
101
|
-
selectedRows:
|
|
102
|
-
toggleSelectAll:
|
|
103
|
-
toggleRowSelection:
|
|
104
|
-
isAllSelected:
|
|
105
|
-
setData:
|
|
106
|
-
} =
|
|
107
|
-
data:
|
|
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
|
-
|
|
111
|
-
const { groupedItems:
|
|
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:
|
|
114
|
-
groups:
|
|
115
|
-
aggregations:
|
|
116
|
-
}), W =
|
|
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 =
|
|
119
|
-
}),
|
|
120
|
-
fixedColumns:
|
|
121
|
-
scrollableColumns:
|
|
122
|
-
fixedWidth:
|
|
123
|
-
handleScroll:
|
|
124
|
-
handleFixedScroll:
|
|
125
|
-
|
|
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
|
-
} =
|
|
129
|
-
columns:
|
|
130
|
-
fixedColumnKeys:
|
|
132
|
+
} = eo({
|
|
133
|
+
columns: x,
|
|
134
|
+
fixedColumnKeys: k(() => i.fixedColumns ?? []),
|
|
131
135
|
scrollContainerRef: W,
|
|
132
|
-
fixedContainerRef:
|
|
133
|
-
}),
|
|
134
|
-
items:
|
|
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 =
|
|
137
|
-
return
|
|
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
|
-
}),
|
|
143
|
-
columns:
|
|
144
|
-
rows:
|
|
145
|
-
containerRef:
|
|
146
|
-
editingCell:
|
|
147
|
-
enabled:
|
|
148
|
-
onActivateEdit: (l, o) =>
|
|
149
|
-
onCancelEdit: () =>
|
|
150
|
-
onScrollToRow: (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 =
|
|
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
|
-
|
|
165
|
+
pe(Te, (l) => f("active-cell-change", l ?? null));
|
|
162
166
|
const {
|
|
163
|
-
isDragging:
|
|
164
|
-
draggedRowId:
|
|
165
|
-
dropTargetId:
|
|
166
|
-
dropPosition:
|
|
167
|
-
handleDragStart:
|
|
168
|
-
handleDragOver:
|
|
169
|
-
handleDrop:
|
|
170
|
-
handleDragEnd:
|
|
171
|
-
} =
|
|
172
|
-
processedItems:
|
|
173
|
-
enableCrossGroupDrag:
|
|
174
|
-
groupFieldId:
|
|
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
|
|
177
|
-
|
|
180
|
+
function Ke(l, o) {
|
|
181
|
+
i.enableRowDrag && kl(l, o);
|
|
178
182
|
}
|
|
179
|
-
function
|
|
180
|
-
|
|
183
|
+
function Be(l, o) {
|
|
184
|
+
i.enableRowDrag && wl(l, o);
|
|
181
185
|
}
|
|
182
|
-
function
|
|
183
|
-
|
|
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:
|
|
190
|
-
addDraft:
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
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
|
|
210
|
-
|
|
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
|
-
|
|
213
|
-
function ue(l, o) {
|
|
215
|
+
function ce(l, o) {
|
|
214
216
|
var a;
|
|
215
|
-
const e =
|
|
216
|
-
|
|
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
|
|
227
|
+
function ve(l) {
|
|
226
228
|
var e, n;
|
|
227
|
-
const o =
|
|
228
|
-
|
|
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 =
|
|
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
|
|
239
|
+
function $l(l, o) {
|
|
238
240
|
f("schema-rename-field", { fieldId: l, newName: o });
|
|
239
241
|
}
|
|
240
|
-
function
|
|
242
|
+
function Ml(l, o) {
|
|
241
243
|
f("schema-change-field-type", { fieldId: l, newType: o });
|
|
242
244
|
}
|
|
243
|
-
function
|
|
245
|
+
function Fl(l) {
|
|
244
246
|
f("schema-hide-field", l);
|
|
245
247
|
}
|
|
246
|
-
function
|
|
248
|
+
function Tl(l) {
|
|
247
249
|
f("schema-delete-field", l);
|
|
248
250
|
}
|
|
249
|
-
function
|
|
251
|
+
function zl(l) {
|
|
250
252
|
f("schema-duplicate-field", l);
|
|
251
253
|
}
|
|
252
|
-
function
|
|
253
|
-
|
|
254
|
+
function ye() {
|
|
255
|
+
j.value = !0;
|
|
254
256
|
}
|
|
255
|
-
function
|
|
256
|
-
f("schema-add-field", l),
|
|
257
|
+
function Al(l) {
|
|
258
|
+
f("schema-add-field", l), j.value = !1;
|
|
257
259
|
}
|
|
258
|
-
const
|
|
259
|
-
function
|
|
260
|
-
|
|
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
|
|
263
|
-
const o = V.value.find((e) => e[
|
|
264
|
-
o &&
|
|
264
|
+
function X(l) {
|
|
265
|
+
const o = V.value.find((e) => e[i.rowKey] === l);
|
|
266
|
+
o && al(o, 0);
|
|
265
267
|
}
|
|
266
|
-
|
|
267
|
-
function
|
|
268
|
-
const o = l[
|
|
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
|
|
273
|
+
function B(l) {
|
|
272
274
|
var o;
|
|
273
|
-
return ((o =
|
|
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
|
|
280
|
-
|
|
281
|
+
function I(l, o, e) {
|
|
282
|
+
Qe(l, o, e), f("cell-edit", { rowId: l, fieldId: o, value: e });
|
|
281
283
|
}
|
|
282
|
-
function
|
|
283
|
-
if (
|
|
284
|
-
|
|
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
|
|
289
|
-
f("row-click-record", o
|
|
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
|
|
295
|
-
|
|
296
|
+
function U(l, o) {
|
|
297
|
+
l.target === l.currentTarget && (l.key !== "Enter" && l.key !== " " || (l.preventDefault(), T(o)));
|
|
296
298
|
}
|
|
297
|
-
function
|
|
298
|
-
|
|
299
|
+
function h(l, o) {
|
|
300
|
+
return l[o];
|
|
299
301
|
}
|
|
300
|
-
function
|
|
301
|
-
|
|
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
|
-
|
|
320
|
+
Re.value = o.scrollLeft;
|
|
304
321
|
}
|
|
305
|
-
function
|
|
322
|
+
function J(l) {
|
|
306
323
|
return {
|
|
307
324
|
groupKey: l.__groupKey,
|
|
308
325
|
count: l.__groupCount,
|
|
309
|
-
collapsed:
|
|
326
|
+
collapsed: sl.value.has(
|
|
310
327
|
l.__groupPath ? l.__groupPath.join("/") : l.__groupKey
|
|
311
328
|
),
|
|
312
|
-
colorMap:
|
|
313
|
-
selectable:
|
|
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
|
|
335
|
+
function Q(l) {
|
|
319
336
|
return l.__groupPath ? l.__groupPath.join("/") : l.__groupKey;
|
|
320
337
|
}
|
|
321
|
-
function
|
|
338
|
+
function Oe(l) {
|
|
322
339
|
return {
|
|
323
340
|
row: l,
|
|
324
|
-
rowKey:
|
|
325
|
-
selected:
|
|
326
|
-
selectable:
|
|
327
|
-
columns:
|
|
328
|
-
priorityColorMap:
|
|
329
|
-
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
|
|
333
|
-
const e =
|
|
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
|
|
337
|
-
return
|
|
353
|
+
function We(l, o) {
|
|
354
|
+
return vl.value.some((e) => e.rowId === l && e.colKey === o);
|
|
338
355
|
}
|
|
339
|
-
function
|
|
340
|
-
const o =
|
|
356
|
+
function Ye(l) {
|
|
357
|
+
const o = d(l);
|
|
341
358
|
return {
|
|
342
|
-
"of-row-dragging":
|
|
343
|
-
"of-row-drop-target":
|
|
344
|
-
"of-row-drop-before":
|
|
345
|
-
"of-row-drop-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
|
|
349
|
-
|
|
365
|
+
function Il(l) {
|
|
366
|
+
ee.value = l, G.value = !0;
|
|
350
367
|
}
|
|
351
|
-
function
|
|
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(
|
|
356
|
-
|
|
372
|
+
return (l, o) => t(Ce) ? (r(), s(v, { key: 0 }, [
|
|
373
|
+
L(Wl, {
|
|
357
374
|
rows: t(V),
|
|
358
|
-
columns:
|
|
359
|
-
selectable:
|
|
360
|
-
addable:
|
|
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:
|
|
364
|
-
onAddRow: o[
|
|
365
|
-
},
|
|
366
|
-
|
|
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:
|
|
369
|
-
columns:
|
|
393
|
+
row: De.value,
|
|
394
|
+
columns: x.value,
|
|
370
395
|
"field-defs": u.fieldDefs,
|
|
371
396
|
visible: G.value,
|
|
372
|
-
onClose: o[
|
|
373
|
-
onSave:
|
|
374
|
-
onDelete: o[
|
|
375
|
-
onCellEdit: o[
|
|
376
|
-
}, null, 8, ["row", "columns", "field-defs", "visible"])) :
|
|
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:
|
|
405
|
+
ref: te,
|
|
381
406
|
class: "of-data-table",
|
|
382
407
|
role: "grid",
|
|
383
|
-
tabindex:
|
|
384
|
-
onKeydown: o[
|
|
408
|
+
tabindex: "0",
|
|
409
|
+
onKeydown: o[19] || (o[19] = (e) => u.enableKeyboard ? t(yl)(e) : void 0)
|
|
385
410
|
}, [
|
|
386
|
-
|
|
387
|
-
|
|
411
|
+
dl.value ? (r(), s("div", no, [
|
|
412
|
+
c("div", {
|
|
388
413
|
ref_key: "fixedContainerRef",
|
|
389
|
-
ref:
|
|
390
|
-
class:
|
|
391
|
-
style:
|
|
392
|
-
onScroll: o[
|
|
393
|
-
(...e) => t(
|
|
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
|
-
|
|
396
|
-
columns: t(
|
|
397
|
-
selectable:
|
|
398
|
-
"sort-key": t(
|
|
399
|
-
"sort-order": t(
|
|
400
|
-
"all-selected": t(
|
|
401
|
-
indeterminate:
|
|
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:
|
|
407
|
-
onResizeStart:
|
|
408
|
-
onResizeDblclick:
|
|
409
|
-
onHeaderContextmenu:
|
|
410
|
-
onHeaderDblclick:
|
|
411
|
-
onAddField:
|
|
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
|
-
|
|
414
|
-
|
|
438
|
+
c("div", to, [
|
|
439
|
+
se.value ? (r(), s("div", {
|
|
415
440
|
key: 0,
|
|
416
|
-
style:
|
|
441
|
+
style: w({ height: t(ie) + "px", position: "relative" })
|
|
417
442
|
}, [
|
|
418
|
-
|
|
419
|
-
style:
|
|
443
|
+
c("div", {
|
|
444
|
+
style: w({ transform: `translateY(${t(ue)}px)` })
|
|
420
445
|
}, [
|
|
421
|
-
(r(!0), s(
|
|
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(
|
|
449
|
+
t(R)(e) ? (r(), b(_, E({
|
|
425
450
|
key: 0,
|
|
426
451
|
ref_for: !0,
|
|
427
|
-
ref: (a) =>
|
|
428
|
-
}, { ref_for: !0 },
|
|
429
|
-
onToggle: (a) => t(N)(
|
|
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) =>
|
|
434
|
-
class:
|
|
435
|
-
"of-table-row--selected": t(
|
|
436
|
-
"of-table-row--hover": t(Y)(
|
|
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
|
-
|
|
440
|
-
|
|
441
|
-
|
|
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
|
-
|
|
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[
|
|
476
|
+
onClick: o[5] || (o[5] = Z(() => {
|
|
448
477
|
}, ["stop"]))
|
|
449
478
|
}, [
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
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:
|
|
497
|
+
style: w({
|
|
462
498
|
width: (a.width === "fill" ? 200 : a.width) + "px",
|
|
463
499
|
flexShrink: "0"
|
|
464
500
|
})
|
|
465
501
|
}, [
|
|
466
|
-
|
|
502
|
+
z(l.$slots, "cell", {
|
|
467
503
|
row: e,
|
|
468
504
|
col: a
|
|
469
505
|
}, () => {
|
|
470
|
-
var
|
|
506
|
+
var y;
|
|
471
507
|
return [
|
|
472
|
-
(
|
|
508
|
+
(y = u.fieldDefs) != null && y.length ? (r(), b(P, {
|
|
473
509
|
key: 0,
|
|
474
|
-
"row-id":
|
|
475
|
-
field:
|
|
476
|
-
value: e
|
|
477
|
-
onCommit:
|
|
478
|
-
}, null, 8, ["row-id", "field", "value"])) : (r(), s("span",
|
|
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,
|
|
518
|
+
], 42, ao))
|
|
483
519
|
], 64))), 128))
|
|
484
520
|
], 4)
|
|
485
|
-
], 4)) : (r(!0), s(
|
|
521
|
+
], 4)) : (r(!0), s(v, { key: 1 }, m(t(S), (e) => (r(), s(v, {
|
|
486
522
|
key: e.id
|
|
487
523
|
}, [
|
|
488
|
-
t(
|
|
524
|
+
t(R)(e) ? (r(), b(_, E({
|
|
489
525
|
key: 0,
|
|
490
526
|
ref_for: !0
|
|
491
|
-
},
|
|
492
|
-
onToggle: (n) => t(N)(
|
|
527
|
+
}, J(e), {
|
|
528
|
+
onToggle: (n) => t(N)(Q(e))
|
|
493
529
|
}), null, 16, ["onToggle"])) : (r(), s("div", {
|
|
494
530
|
key: 1,
|
|
495
|
-
class:
|
|
496
|
-
"of-table-row--selected": t(
|
|
497
|
-
"of-table-row--hover": t(Y)(
|
|
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
|
-
|
|
501
|
-
|
|
502
|
-
|
|
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
|
-
|
|
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[
|
|
548
|
+
onClick: o[8] || (o[8] = Z(() => {
|
|
509
549
|
}, ["stop"]))
|
|
510
550
|
}, [
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
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:
|
|
569
|
+
style: w({
|
|
523
570
|
width: (n.width === "fill" ? 200 : n.width) + "px",
|
|
524
571
|
flexShrink: "0"
|
|
525
572
|
})
|
|
526
573
|
}, [
|
|
527
|
-
|
|
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(),
|
|
580
|
+
(a = u.fieldDefs) != null && a.length ? (r(), b(P, {
|
|
534
581
|
key: 0,
|
|
535
|
-
"row-id":
|
|
536
|
-
field:
|
|
537
|
-
value: e
|
|
538
|
-
onCommit:
|
|
539
|
-
}, null, 8, ["row-id", "field", "value"])) : (r(), s("span",
|
|
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,
|
|
590
|
+
], 42, uo))
|
|
544
591
|
], 64))), 128))
|
|
545
592
|
])
|
|
546
593
|
], 38),
|
|
547
|
-
|
|
594
|
+
c("div", {
|
|
548
595
|
ref_key: "scrollContainerRef",
|
|
549
596
|
ref: W,
|
|
550
597
|
class: "of-data-table-scroll-region",
|
|
551
|
-
style:
|
|
552
|
-
onScroll:
|
|
598
|
+
style: w({ marginLeft: t($e) + "px" }),
|
|
599
|
+
onScroll: Bl
|
|
553
600
|
}, [
|
|
554
|
-
|
|
555
|
-
columns: t(
|
|
601
|
+
L(me, {
|
|
602
|
+
columns: t(re),
|
|
556
603
|
selectable: !1,
|
|
557
|
-
"sort-key": t(
|
|
558
|
-
"sort-order": t(
|
|
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:
|
|
564
|
-
onResizeDblclick:
|
|
565
|
-
onHeaderContextmenu:
|
|
566
|
-
onHeaderDblclick:
|
|
567
|
-
onAddField:
|
|
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
|
-
|
|
570
|
-
|
|
616
|
+
c("div", yo, [
|
|
617
|
+
se.value ? (r(), s("div", {
|
|
571
618
|
key: 0,
|
|
572
|
-
style:
|
|
619
|
+
style: w({ height: t(ie) + "px", position: "relative" })
|
|
573
620
|
}, [
|
|
574
|
-
|
|
575
|
-
style:
|
|
621
|
+
c("div", {
|
|
622
|
+
style: w({ transform: `translateY(${t(ue)}px)` })
|
|
576
623
|
}, [
|
|
577
|
-
(r(!0), s(
|
|
624
|
+
(r(!0), s(v, null, m(t(de), ({ data: e }) => (r(), s(v, {
|
|
578
625
|
key: e.id
|
|
579
626
|
}, [
|
|
580
|
-
t(
|
|
627
|
+
t(R)(e) ? (r(), s("div", go)) : (r(), s("div", {
|
|
581
628
|
key: 1,
|
|
582
|
-
class:
|
|
583
|
-
"of-table-row--selected": t(
|
|
584
|
-
"of-table-row--hover": t(Y)(
|
|
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
|
-
|
|
588
|
-
|
|
589
|
-
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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(),
|
|
657
|
+
(a = u.fieldDefs) != null && a.length ? (r(), b(P, {
|
|
607
658
|
key: 0,
|
|
608
|
-
"row-id":
|
|
609
|
-
field:
|
|
610
|
-
value: e
|
|
611
|
-
onCommit:
|
|
612
|
-
}, null, 8, ["row-id", "field", "value"])) : (r(), s("span",
|
|
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,
|
|
667
|
+
], 42, bo))
|
|
617
668
|
], 64))), 128))
|
|
618
669
|
], 4)
|
|
619
|
-
], 4)) : (r(!0), s(
|
|
670
|
+
], 4)) : (r(!0), s(v, { key: 1 }, m(t(S), (e) => (r(), s(v, {
|
|
620
671
|
key: e.id
|
|
621
672
|
}, [
|
|
622
|
-
t(
|
|
673
|
+
t(R)(e) ? (r(), s("div", wo)) : (r(), s("div", {
|
|
623
674
|
key: 1,
|
|
624
|
-
class:
|
|
625
|
-
"of-table-row--selected": t(
|
|
626
|
-
"of-table-row--hover": t(Y)(
|
|
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
|
-
|
|
630
|
-
|
|
631
|
-
|
|
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(
|
|
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:
|
|
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
|
-
|
|
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(),
|
|
703
|
+
(a = u.fieldDefs) != null && a.length ? (r(), b(P, {
|
|
649
704
|
key: 0,
|
|
650
|
-
"row-id":
|
|
651
|
-
field:
|
|
652
|
-
value: e
|
|
653
|
-
onCommit:
|
|
654
|
-
}, null, 8, ["row-id", "field", "value"])) : (r(), s("span",
|
|
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,
|
|
713
|
+
], 42, po))
|
|
659
714
|
], 64))), 128))
|
|
660
715
|
])
|
|
661
716
|
], 36)
|
|
662
|
-
])) : (r(), s(
|
|
663
|
-
|
|
664
|
-
columns:
|
|
665
|
-
selectable:
|
|
666
|
-
"sort-key": t(
|
|
667
|
-
"sort-order": t(
|
|
668
|
-
"all-selected": t(
|
|
669
|
-
indeterminate:
|
|
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:
|
|
675
|
-
onResizeStart:
|
|
676
|
-
onResizeDblclick:
|
|
677
|
-
onHeaderContextmenu:
|
|
678
|
-
onHeaderDblclick:
|
|
679
|
-
onAddField:
|
|
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
|
-
|
|
736
|
+
c("div", {
|
|
682
737
|
ref_key: "scrollContainerRef",
|
|
683
738
|
ref: W,
|
|
684
739
|
class: "of-data-table-scroll-container"
|
|
685
740
|
}, [
|
|
686
|
-
|
|
741
|
+
se.value ? (r(), s("div", {
|
|
687
742
|
key: 0,
|
|
688
|
-
style:
|
|
743
|
+
style: w({ height: t(ie) + "px", position: "relative" })
|
|
689
744
|
}, [
|
|
690
|
-
|
|
691
|
-
style:
|
|
745
|
+
c("div", {
|
|
746
|
+
style: w({ transform: `translateY(${t(ue)}px)` })
|
|
692
747
|
}, [
|
|
693
|
-
(r(!0), s(
|
|
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(
|
|
751
|
+
t(R)(e) ? (r(), b(_, E({
|
|
697
752
|
key: 0,
|
|
698
753
|
ref_for: !0,
|
|
699
|
-
ref: (a) =>
|
|
700
|
-
}, { ref_for: !0 },
|
|
701
|
-
onToggle: (a) => t(N)(
|
|
702
|
-
}), null, 16, ["onToggle"])) : (r(),
|
|
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) =>
|
|
706
|
-
}, { ref_for: !0 },
|
|
760
|
+
ref: (a) => q(a, n)
|
|
761
|
+
}, { ref_for: !0 }, Oe(e), {
|
|
707
762
|
draggable: u.enableRowDrag,
|
|
708
|
-
class:
|
|
709
|
-
onSelect:
|
|
710
|
-
onClick: (a) =>
|
|
711
|
-
onDragstart: (a) =>
|
|
712
|
-
onDragover: (a) =>
|
|
713
|
-
onDrop: (a) =>
|
|
714
|
-
onDragend: t(
|
|
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:
|
|
717
|
-
|
|
771
|
+
cell: he(({ row: a, col: y }) => [
|
|
772
|
+
z(l.$slots, "cell", {
|
|
718
773
|
row: a,
|
|
719
|
-
col:
|
|
774
|
+
col: y
|
|
720
775
|
}, () => {
|
|
721
|
-
var
|
|
776
|
+
var ke;
|
|
722
777
|
return [
|
|
723
|
-
(
|
|
778
|
+
(ke = u.fieldDefs) != null && ke.length ? (r(), b(P, {
|
|
724
779
|
key: 0,
|
|
725
|
-
"row-id":
|
|
726
|
-
field:
|
|
727
|
-
value: a[
|
|
728
|
-
class:
|
|
729
|
-
"of-cell--active":
|
|
730
|
-
"of-cell--selected":
|
|
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:
|
|
733
|
-
onClick:
|
|
734
|
-
}, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), s("span",
|
|
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(
|
|
797
|
+
], 4)) : (r(!0), s(v, { key: 1 }, m(t(S), (e) => (r(), s(v, {
|
|
743
798
|
key: e.id
|
|
744
799
|
}, [
|
|
745
|
-
t(
|
|
800
|
+
t(R)(e) ? (r(), b(_, E({
|
|
746
801
|
key: 0,
|
|
747
802
|
ref_for: !0
|
|
748
|
-
},
|
|
749
|
-
onToggle: (n) => t(N)(
|
|
750
|
-
}), null, 16, ["onToggle"])) : (r(),
|
|
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
|
-
},
|
|
808
|
+
}, Oe(e), {
|
|
754
809
|
draggable: u.enableRowDrag,
|
|
755
|
-
class:
|
|
756
|
-
onSelect:
|
|
757
|
-
onClick: (n) =>
|
|
758
|
-
onDragstart: (n) =>
|
|
759
|
-
onDragover: (n) =>
|
|
760
|
-
onDrop: (n) =>
|
|
761
|
-
onDragend: t(
|
|
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:
|
|
764
|
-
|
|
818
|
+
cell: he(({ row: n, col: a }) => [
|
|
819
|
+
z(l.$slots, "cell", {
|
|
765
820
|
row: n,
|
|
766
821
|
col: a
|
|
767
822
|
}, () => {
|
|
768
|
-
var
|
|
823
|
+
var y;
|
|
769
824
|
return [
|
|
770
|
-
(
|
|
825
|
+
(y = u.fieldDefs) != null && y.length ? (r(), b(P, {
|
|
771
826
|
key: 0,
|
|
772
|
-
"row-id":
|
|
773
|
-
field:
|
|
827
|
+
"row-id": d(n),
|
|
828
|
+
field: B(a.key),
|
|
774
829
|
value: n[a.key],
|
|
775
|
-
class:
|
|
776
|
-
"of-cell--active":
|
|
777
|
-
"of-cell--selected":
|
|
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:
|
|
780
|
-
onClick:
|
|
781
|
-
}, null, 8, ["row-id", "field", "value", "class", "onClick"])) : (r(), s("span",
|
|
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(
|
|
845
|
+
t(ll) ? (r(), s("div", {
|
|
791
846
|
key: 2,
|
|
792
847
|
class: "of-resize-indicator",
|
|
793
|
-
style:
|
|
794
|
-
}, null, 4)) :
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
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:
|
|
854
|
+
onClick: Sl
|
|
800
855
|
}, " 全部提交 "),
|
|
801
|
-
|
|
856
|
+
c("button", {
|
|
802
857
|
class: "of-data-table-draft-btn of-data-table-draft-btn--discard",
|
|
803
|
-
onClick:
|
|
858
|
+
onClick: Rl
|
|
804
859
|
}, " 全部放弃 ")
|
|
805
|
-
])) :
|
|
806
|
-
|
|
860
|
+
])) : M("", !0),
|
|
861
|
+
Le.value ? (r(), b(Nl, {
|
|
807
862
|
key: 4,
|
|
808
|
-
onClick:
|
|
809
|
-
})) :
|
|
810
|
-
u.enableFieldManagement ? (r(),
|
|
863
|
+
onClick: xl
|
|
864
|
+
})) : M("", !0),
|
|
865
|
+
u.enableFieldManagement ? (r(), b(t(Ue), {
|
|
811
866
|
key: 5,
|
|
812
|
-
visible:
|
|
813
|
-
"col-key":
|
|
814
|
-
"col-label":
|
|
815
|
-
"field-type":
|
|
816
|
-
x:
|
|
817
|
-
y:
|
|
818
|
-
onClose: o[
|
|
819
|
-
onRename:
|
|
820
|
-
onChangeType:
|
|
821
|
-
onSort: o[
|
|
822
|
-
onHide:
|
|
823
|
-
onDelete:
|
|
824
|
-
onDuplicate:
|
|
825
|
-
}, null, 8, ["visible", "col-key", "col-label", "field-type", "x", "y"])) :
|
|
826
|
-
(r(),
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
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
|
-
])) :
|
|
893
|
+
])) : M("", !0)
|
|
836
894
|
]))
|
|
837
|
-
],
|
|
895
|
+
], 544));
|
|
838
896
|
}
|
|
839
897
|
});
|
|
840
898
|
export {
|
|
841
|
-
|
|
899
|
+
qo as default
|
|
842
900
|
};
|