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