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