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