@oneflowui/ui 0.8.4 → 0.8.6
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 +296 -0
- package/README.md +296 -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/ThemeScopeScene.vue.d.ts +31 -0
- package/dist/components/common/ThemeScopeScene.vue.js +7 -0
- package/dist/components/common/ThemeScopeScene.vue2.js +56 -0
- package/dist/components/common/index.d.ts +2 -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 +2 -2
- package/dist/components/table/DataTable.vue2.js +251 -249
- 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 +56 -0
- package/dist/composables/useDatabaseViewMiddleware.js +158 -0
- package/dist/composables/useVirtualList.d.ts +11 -0
- package/dist/composables/useVirtualList.js +146 -104
- package/dist/composables.js +74 -0
- package/dist/contracts/database.d.ts +23 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +267 -253
- 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
|
|
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
2
|
import xe from "./TableHeaderRow.vue.js";
|
|
3
|
-
import
|
|
3
|
+
import nl from "./TableDataRow.vue.js";
|
|
4
4
|
import ve from "./TableGroupRow.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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
9
|
import Y from "./FieldCell.vue.js";
|
|
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
|
|
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,34 +78,35 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["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 d = u, c =
|
|
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
84
|
densityMetrics: H,
|
|
85
|
-
densityClass:
|
|
86
|
-
containerWidthClass:
|
|
87
|
-
densityStyle:
|
|
88
|
-
} =
|
|
85
|
+
densityClass: Me,
|
|
86
|
+
containerWidthClass: dl,
|
|
87
|
+
densityStyle: Ae
|
|
88
|
+
} = Lo({
|
|
89
89
|
tableContainerRef: J,
|
|
90
|
-
density:
|
|
90
|
+
density: sl,
|
|
91
91
|
containerResponsive: k(() => d.containerResponsive ?? !0),
|
|
92
|
-
isMobile: be
|
|
92
|
+
isMobile: be,
|
|
93
|
+
onContainerWidthChange: Fe.invalidate
|
|
93
94
|
}), {
|
|
94
|
-
detailSheetVisible:
|
|
95
|
-
detailSheetTableRow:
|
|
96
|
-
handleRowClick:
|
|
97
|
-
handleMobileRowClick:
|
|
98
|
-
buildDetailSavePayloads:
|
|
99
|
-
closeDetailSheet:
|
|
100
|
-
} =
|
|
95
|
+
detailSheetVisible: ul,
|
|
96
|
+
detailSheetTableRow: cl,
|
|
97
|
+
handleRowClick: fl,
|
|
98
|
+
handleMobileRowClick: yl,
|
|
99
|
+
buildDetailSavePayloads: vl,
|
|
100
|
+
closeDetailSheet: bl
|
|
101
|
+
} = Go(), gl = k(
|
|
101
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
107
|
readonly: d.readonly,
|
|
107
108
|
columns: D.value,
|
|
108
|
-
editableFieldKeys:
|
|
109
|
+
editableFieldKeys: gl.value
|
|
109
110
|
});
|
|
110
111
|
}
|
|
111
112
|
function Q(e) {
|
|
@@ -115,93 +116,93 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
115
116
|
label: "详情",
|
|
116
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 = s(e), t = o ??
|
|
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
|
+
o === "edit" && Ke(e);
|
|
139
140
|
}
|
|
140
|
-
const I =
|
|
141
|
+
const I = $o(), { commit: kl, editingCell: U } = I, { rows: ge } = Ko({
|
|
141
142
|
tasks: w(d, "tasks"),
|
|
142
143
|
records: w(d, "records")
|
|
143
|
-
}), { columns:
|
|
144
|
+
}), { columns: Be } = zo({
|
|
144
145
|
columns: w(d, "columns"),
|
|
145
146
|
schema: w(d, "schema"),
|
|
146
147
|
view: w(d, "view")
|
|
147
148
|
}), {
|
|
148
|
-
startResize:
|
|
149
|
-
columnWidthOverrides:
|
|
150
|
-
showResizeIndicator:
|
|
151
|
-
resizeIndicatorX:
|
|
152
|
-
autoFitColumn:
|
|
153
|
-
resolvedWidth:
|
|
154
|
-
} =
|
|
155
|
-
columns:
|
|
149
|
+
startResize: wl,
|
|
150
|
+
columnWidthOverrides: hl,
|
|
151
|
+
showResizeIndicator: pl,
|
|
152
|
+
resizeIndicatorX: ml,
|
|
153
|
+
autoFitColumn: Cl,
|
|
154
|
+
resolvedWidth: Ee
|
|
155
|
+
} = Bo({
|
|
156
|
+
columns: Be,
|
|
156
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
166
|
minWidth: o.minWidth ?? H.value.fillMinWidth
|
|
166
|
-
} : typeof o.width == "number" ? o : { ...o, width:
|
|
167
|
+
} : typeof o.width == "number" ? o : { ...o, width: Ee(o.key) };
|
|
167
168
|
});
|
|
168
169
|
}), {
|
|
169
170
|
data: ke,
|
|
170
171
|
sort: P,
|
|
171
172
|
toggleSort: Z,
|
|
172
173
|
selectedRows: R,
|
|
173
|
-
clearSelection:
|
|
174
|
-
toggleSelectAll:
|
|
175
|
-
toggleRowSelection:
|
|
176
|
-
isAllSelected:
|
|
177
|
-
setData:
|
|
178
|
-
} =
|
|
174
|
+
clearSelection: Dl,
|
|
175
|
+
toggleSelectAll: Rl,
|
|
176
|
+
toggleRowSelection: Sl,
|
|
177
|
+
isAllSelected: He,
|
|
178
|
+
setData: xl
|
|
179
|
+
} = Ao({
|
|
179
180
|
data: ge.value,
|
|
180
181
|
pageSize: 999999
|
|
181
182
|
});
|
|
182
|
-
|
|
183
|
-
const { groupedItems: T, collapsedGroups:
|
|
183
|
+
ol(ge, (e) => xl(e), { deep: !1 });
|
|
184
|
+
const { groupedItems: T, collapsedGroups: $l, toggleGroup: _, isGroupHeader: K } = To({
|
|
184
185
|
data: ke,
|
|
185
186
|
groupBy: w(d, "groupBy"),
|
|
186
187
|
groups: w(d, "groups"),
|
|
187
188
|
aggregations: w(d, "aggregations")
|
|
188
|
-
}),
|
|
189
|
+
}), Fl = k(() => {
|
|
189
190
|
var e;
|
|
190
191
|
return (((e = d.fixedColumns) == null ? void 0 : e.length) ?? 0) > 0;
|
|
191
|
-
}),
|
|
192
|
+
}), Ie = N(0), Ml = k(() => Ie.value > 0), {
|
|
192
193
|
fixedColumns: ee,
|
|
193
194
|
scrollableColumns: le,
|
|
194
|
-
fixedWidth:
|
|
195
|
-
handleScroll:
|
|
196
|
-
handleFixedScroll:
|
|
195
|
+
fixedWidth: Al,
|
|
196
|
+
handleScroll: Tl,
|
|
197
|
+
handleFixedScroll: Kl,
|
|
197
198
|
syncHover: b,
|
|
198
199
|
isRowHovered: oe
|
|
199
|
-
} =
|
|
200
|
+
} = Io({
|
|
200
201
|
columns: D,
|
|
201
202
|
fixedColumnKeys: k(() => d.fixedColumns ?? []),
|
|
202
203
|
scrollContainerRef: X,
|
|
203
204
|
fixedContainerRef: $e
|
|
204
|
-
}), ne = k(() => d.virtual !== void 0 ? d.virtual : T.value.length >= d.virtualThreshold), { visibleItems: we, totalHeight: te, offsetY: ae, scrollToIndex:
|
|
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];
|
|
@@ -210,18 +211,19 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
210
211
|
overscan: 5,
|
|
211
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:
|
|
218
|
+
rows: Pe,
|
|
217
219
|
containerRef: J,
|
|
218
220
|
editingCell: U,
|
|
219
221
|
enabled: k(() => d.enableKeyboard),
|
|
220
222
|
onActivateEdit: (e, o) => I.activate(e, o),
|
|
221
223
|
onCancelEdit: () => I.cancel(),
|
|
222
|
-
onScrollToRow: (e) =>
|
|
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,51 +232,51 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["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
|
+
isDragging: Il,
|
|
238
|
+
draggedRowId: Pl,
|
|
237
239
|
dropTargetId: he,
|
|
238
|
-
dropPosition:
|
|
239
|
-
handleDragStart:
|
|
240
|
-
handleDragOver:
|
|
241
|
-
handleDrop:
|
|
242
|
-
handleDragEnd:
|
|
243
|
-
} =
|
|
240
|
+
dropPosition: Le,
|
|
241
|
+
handleDragStart: ql,
|
|
242
|
+
handleDragOver: Ll,
|
|
243
|
+
handleDrop: Wl,
|
|
244
|
+
handleDragEnd: We
|
|
245
|
+
} = Po({
|
|
244
246
|
processedItems: T,
|
|
245
247
|
enableCrossGroupDrag: k(() => d.enableCrossGroupDrag),
|
|
246
248
|
groupFieldId: w(d, "groupBy")
|
|
247
249
|
});
|
|
248
|
-
function We(e, o) {
|
|
249
|
-
d.enableRowDrag && Pl(e, o);
|
|
250
|
-
}
|
|
251
250
|
function Ge(e, o) {
|
|
252
251
|
d.enableRowDrag && ql(e, o);
|
|
253
252
|
}
|
|
254
253
|
function Ve(e, o) {
|
|
255
|
-
d.enableRowDrag && Ll(e, o
|
|
254
|
+
d.enableRowDrag && Ll(e, o);
|
|
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
|
-
} =
|
|
263
|
+
drafts: Oe,
|
|
264
|
+
addDraft: Gl,
|
|
265
|
+
commitAll: Vl,
|
|
266
|
+
discardAll: Nl
|
|
267
|
+
} = qo({
|
|
266
268
|
schema: w(d, "schema"),
|
|
267
269
|
groupFieldId: w(d, "groupBy")
|
|
268
|
-
}),
|
|
269
|
-
function Ol() {
|
|
270
|
-
d.schema ? Wl() : c("add-row");
|
|
271
|
-
}
|
|
270
|
+
}), Ol = k(() => Oe.value.size > 0);
|
|
272
271
|
function Yl() {
|
|
273
|
-
|
|
274
|
-
e.length > 0 && c("drafts-commit-all", { records: e });
|
|
272
|
+
d.schema ? Gl() : c("add-row");
|
|
275
273
|
}
|
|
276
274
|
function jl() {
|
|
277
|
-
Vl();
|
|
275
|
+
const e = Vl();
|
|
276
|
+
e.length > 0 && c("drafts-commit-all", { records: e });
|
|
277
|
+
}
|
|
278
|
+
function Xl() {
|
|
279
|
+
Nl();
|
|
278
280
|
}
|
|
279
281
|
const S = N({ visible: !1, colKey: "", colLabel: "", x: 0, y: 0 }), ie = N(!1);
|
|
280
282
|
function pe(e, o) {
|
|
@@ -284,7 +286,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
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
|
};
|
|
@@ -296,33 +298,33 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
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
321
|
function Ce() {
|
|
320
322
|
ie.value = !0;
|
|
321
323
|
}
|
|
322
|
-
function
|
|
324
|
+
function eo(e) {
|
|
323
325
|
c("schema-add-field", e), ie.value = !1;
|
|
324
326
|
}
|
|
325
|
-
const x = k(() => d.readonly ? !1 : d.selectable),
|
|
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({
|
|
326
328
|
rows: ke,
|
|
327
329
|
selectedRows: R,
|
|
328
330
|
rowKey: w(d, "rowKey"),
|
|
@@ -330,19 +332,19 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
330
332
|
bulkActionItems: w(d, "bulkActionItems"),
|
|
331
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
340
|
function s(e) {
|
|
339
|
-
return
|
|
341
|
+
return mo(e, d.rowKey);
|
|
340
342
|
}
|
|
341
343
|
function q(e) {
|
|
342
|
-
return
|
|
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
349
|
function W(e, o) {
|
|
348
350
|
I.activate(e, o), d.enableKeyboard && re(e, o);
|
|
@@ -351,7 +353,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
351
353
|
I.cancel();
|
|
352
354
|
}
|
|
353
355
|
function m(e) {
|
|
354
|
-
const o =
|
|
356
|
+
const o = fl({
|
|
355
357
|
row: e,
|
|
356
358
|
isMobile: be.value
|
|
357
359
|
});
|
|
@@ -367,54 +369,54 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
367
369
|
function C(e, o) {
|
|
368
370
|
return e[o];
|
|
369
371
|
}
|
|
370
|
-
function
|
|
372
|
+
function to(e) {
|
|
371
373
|
if (!e) return null;
|
|
372
374
|
if (e instanceof HTMLElement) return e;
|
|
373
375
|
const o = e.$el;
|
|
374
376
|
return o instanceof HTMLElement ? o : null;
|
|
375
377
|
}
|
|
376
378
|
function ue(e, o) {
|
|
377
|
-
|
|
379
|
+
Bl(to(e), o);
|
|
378
380
|
}
|
|
379
381
|
function De(e, o) {
|
|
380
|
-
|
|
382
|
+
wl(e, o);
|
|
381
383
|
}
|
|
382
384
|
function Re(e) {
|
|
383
|
-
|
|
385
|
+
Cl(e, J.value);
|
|
384
386
|
}
|
|
385
|
-
function
|
|
386
|
-
return
|
|
387
|
+
function Je() {
|
|
388
|
+
return Do(H.value.rowHeight);
|
|
387
389
|
}
|
|
388
390
|
function ce(e) {
|
|
389
|
-
return
|
|
391
|
+
return Ro({
|
|
390
392
|
density: A.value,
|
|
391
393
|
col: e,
|
|
392
|
-
resolvedWidth:
|
|
394
|
+
resolvedWidth: Ee(e.key),
|
|
393
395
|
fillMinWidth: H.value.fillMinWidth
|
|
394
396
|
});
|
|
395
397
|
}
|
|
396
|
-
function
|
|
397
|
-
return
|
|
398
|
+
function Qe() {
|
|
399
|
+
return So(H.value.groupRowHeight);
|
|
398
400
|
}
|
|
399
|
-
function
|
|
400
|
-
|
|
401
|
+
function ao(e) {
|
|
402
|
+
Tl(e);
|
|
401
403
|
const o = e.target;
|
|
402
|
-
|
|
404
|
+
Ie.value = o.scrollLeft;
|
|
403
405
|
}
|
|
404
|
-
function
|
|
406
|
+
function ro(e) {
|
|
405
407
|
$e.value = e;
|
|
406
408
|
}
|
|
407
|
-
function
|
|
409
|
+
function io(e) {
|
|
408
410
|
X.value = e;
|
|
409
411
|
}
|
|
410
|
-
function
|
|
412
|
+
function so(e) {
|
|
411
413
|
X.value = e;
|
|
412
414
|
}
|
|
413
415
|
function fe(e) {
|
|
414
416
|
return {
|
|
415
417
|
groupKey: e.__groupKey,
|
|
416
418
|
count: e.__groupCount,
|
|
417
|
-
collapsed:
|
|
419
|
+
collapsed: $l.value.has(
|
|
418
420
|
e.__groupPath ? e.__groupPath.join("/") : e.__groupKey
|
|
419
421
|
),
|
|
420
422
|
colorMap: d.groupColorMap,
|
|
@@ -426,7 +428,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
426
428
|
function ye(e) {
|
|
427
429
|
return e.__groupPath ? e.__groupPath.join("/") : e.__groupKey;
|
|
428
430
|
}
|
|
429
|
-
function
|
|
431
|
+
function Ue(e) {
|
|
430
432
|
return {
|
|
431
433
|
row: e,
|
|
432
434
|
rowKey: d.rowKey,
|
|
@@ -437,56 +439,56 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
437
439
|
statusColorMap: d.statusColorMap
|
|
438
440
|
};
|
|
439
441
|
}
|
|
440
|
-
function
|
|
441
|
-
const l =
|
|
442
|
+
function Ze(e, o) {
|
|
443
|
+
const l = qe.value;
|
|
442
444
|
return l !== null && l.rowId === e && l.colKey === o;
|
|
443
445
|
}
|
|
444
|
-
function
|
|
445
|
-
return
|
|
446
|
+
function _e(e, o) {
|
|
447
|
+
return El.value.some((l) => l.rowId === e && l.colKey === o);
|
|
446
448
|
}
|
|
447
449
|
function V(e, o) {
|
|
448
450
|
return U.value !== null && U.value.rowId === e && U.value.fieldId === o;
|
|
449
451
|
}
|
|
450
|
-
function
|
|
452
|
+
function el(e) {
|
|
451
453
|
const o = s(e);
|
|
452
454
|
return {
|
|
453
|
-
"of-row-dragging":
|
|
455
|
+
"of-row-dragging": Il.value && Pl.value === o,
|
|
454
456
|
"of-row-drop-target": he.value === o,
|
|
455
|
-
"of-row-drop-before": he.value === o &&
|
|
456
|
-
"of-row-drop-after": 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"
|
|
457
459
|
};
|
|
458
460
|
}
|
|
459
|
-
function so(e) {
|
|
460
|
-
fl(e);
|
|
461
|
-
}
|
|
462
461
|
function uo(e) {
|
|
463
|
-
|
|
462
|
+
yl(e);
|
|
463
|
+
}
|
|
464
|
+
function co(e) {
|
|
465
|
+
for (const o of vl(e))
|
|
464
466
|
c("cell-edit", o);
|
|
465
467
|
}
|
|
466
|
-
return (e, o) => n(be) ? (r(), v(
|
|
468
|
+
return (e, o) => n(be) ? (r(), v(ho, {
|
|
467
469
|
key: 0,
|
|
468
470
|
rows: n(ke),
|
|
469
471
|
columns: D.value,
|
|
470
472
|
"field-defs": u.fieldDefs,
|
|
471
473
|
selectable: x.value,
|
|
472
|
-
addable:
|
|
474
|
+
addable: Ye.value,
|
|
473
475
|
"status-color-map": u.statusColorMap,
|
|
474
476
|
readonly: u.readonly,
|
|
475
|
-
"density-class": n(
|
|
476
|
-
"density-style": n(
|
|
477
|
-
"detail-visible": n(
|
|
478
|
-
"detail-row": n(
|
|
479
|
-
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)),
|
|
480
482
|
onAddRow: o[1] || (o[1] = (l) => c("add-row")),
|
|
481
|
-
onCloseDetail: n(
|
|
482
|
-
onDetailSave:
|
|
483
|
+
onCloseDetail: n(bl),
|
|
484
|
+
onDetailSave: co,
|
|
483
485
|
onRowDelete: o[2] || (o[2] = (l) => c("row-delete", l)),
|
|
484
486
|
onCellEdit: o[3] || (o[3] = (l) => c("cell-edit", l))
|
|
485
|
-
},
|
|
487
|
+
}, yo({ _: 2 }, [
|
|
486
488
|
e.$slots.cell ? {
|
|
487
489
|
name: "cell",
|
|
488
490
|
fn: $((l) => [
|
|
489
|
-
E(e.$slots, "cell",
|
|
491
|
+
E(e.$slots, "cell", vo(bo(l)), void 0, !0)
|
|
490
492
|
]),
|
|
491
493
|
key: "0"
|
|
492
494
|
} : void 0
|
|
@@ -494,19 +496,19 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
494
496
|
key: 1,
|
|
495
497
|
ref_key: "tableContainerRef",
|
|
496
498
|
ref: J,
|
|
497
|
-
class: F(["of-data-table", [n(
|
|
498
|
-
style: g(n(
|
|
499
|
+
class: F(["of-data-table", [n(Me), n(dl)]]),
|
|
500
|
+
style: g(n(Ae)),
|
|
499
501
|
role: "grid",
|
|
500
502
|
tabindex: "0",
|
|
501
|
-
onKeydown: o[19] || (o[19] = (l) => u.enableKeyboard ? n(
|
|
503
|
+
onKeydown: o[19] || (o[19] = (l) => u.enableKeyboard ? n(Hl)(l) : void 0)
|
|
502
504
|
}, [
|
|
503
|
-
j(
|
|
504
|
-
"has-fixed-columns":
|
|
505
|
-
"show-selection-bar": n(
|
|
505
|
+
j(po, {
|
|
506
|
+
"has-fixed-columns": Fl.value,
|
|
507
|
+
"show-selection-bar": n(lo),
|
|
506
508
|
"selection-count": n(R).size,
|
|
507
|
-
"selection-items": n(
|
|
508
|
-
"fixed-width": n(
|
|
509
|
-
"show-fixed-shadow":
|
|
509
|
+
"selection-items": n(oo),
|
|
510
|
+
"fixed-width": n(Al),
|
|
511
|
+
"show-fixed-shadow": Ml.value,
|
|
510
512
|
columns: D.value,
|
|
511
513
|
"fixed-columns": n(ee),
|
|
512
514
|
"scrollable-columns": n(le),
|
|
@@ -515,12 +517,12 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
515
517
|
"use-virtual": ne.value,
|
|
516
518
|
"total-height": n(te),
|
|
517
519
|
"offset-y": n(ae),
|
|
518
|
-
"set-fixed-region-ref":
|
|
519
|
-
"set-scroll-region-ref":
|
|
520
|
-
"set-standard-scroll-ref":
|
|
521
|
-
onSelectionAction: n(
|
|
522
|
-
onFixedScroll: n(
|
|
523
|
-
onScroll:
|
|
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
|
|
524
526
|
}, {
|
|
525
527
|
"fixed-header": $(() => [
|
|
526
528
|
j(xe, {
|
|
@@ -528,14 +530,14 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
528
530
|
selectable: x.value,
|
|
529
531
|
"sort-key": n(P).field ?? "",
|
|
530
532
|
"sort-order": n(P).order ?? "asc",
|
|
531
|
-
"all-selected": n(
|
|
532
|
-
indeterminate: n(
|
|
533
|
+
"all-selected": n(He),
|
|
534
|
+
indeterminate: n(je),
|
|
533
535
|
"enable-resize": u.enableResize,
|
|
534
536
|
"enable-field-menu": u.enableFieldManagement,
|
|
535
537
|
"enable-add-field": u.enableFieldManagement,
|
|
536
538
|
density: n(A),
|
|
537
539
|
onSort: n(Z),
|
|
538
|
-
onSelectAll: n(
|
|
540
|
+
onSelectAll: n(Xe),
|
|
539
541
|
onResizeStart: De,
|
|
540
542
|
onResizeDblclick: Re,
|
|
541
543
|
onHeaderContextmenu: pe,
|
|
@@ -570,7 +572,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
570
572
|
}]),
|
|
571
573
|
role: "row",
|
|
572
574
|
tabindex: "0",
|
|
573
|
-
style: g(
|
|
575
|
+
style: g(Je()),
|
|
574
576
|
onMouseenter: (a) => n(b)(s(l)),
|
|
575
577
|
onMouseleave: o[6] || (o[6] = (a) => n(b)(null)),
|
|
576
578
|
onFocusin: (a) => n(b)(s(l)),
|
|
@@ -595,9 +597,9 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
595
597
|
class: "of-checkbox",
|
|
596
598
|
checked: n(R).has(s(l)),
|
|
597
599
|
onChange: (a) => n(se)(s(l))
|
|
598
|
-
}, null, 40,
|
|
600
|
+
}, null, 40, Oo),
|
|
599
601
|
o[20] || (o[20] = h("span", { class: "of-sr-only" }, "选择当前行", -1))
|
|
600
|
-
], 8,
|
|
602
|
+
], 8, No)
|
|
601
603
|
])) : M("", !0),
|
|
602
604
|
(r(!0), i(y, null, p(n(ee), (a) => (r(), i("div", {
|
|
603
605
|
key: a.key,
|
|
@@ -620,7 +622,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
620
622
|
onCommit: L,
|
|
621
623
|
onRequestEdit: W,
|
|
622
624
|
onRequestCancel: G
|
|
623
|
-
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span",
|
|
625
|
+
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span", Yo, B(C(l, a.key) ?? "-"), 1))
|
|
624
626
|
];
|
|
625
627
|
}, !0)
|
|
626
628
|
], 4))), 128)),
|
|
@@ -636,12 +638,12 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
636
638
|
type: "button",
|
|
637
639
|
class: F(["of-table-row__action-btn", { "of-table-row__action-btn--danger": a.variant === "danger" }]),
|
|
638
640
|
disabled: a.disabled,
|
|
639
|
-
onClick: z((f) =>
|
|
641
|
+
onClick: z((f) => ze(l, a.key), ["stop"])
|
|
640
642
|
}, [
|
|
641
643
|
h("span", null, B(a.label), 1)
|
|
642
|
-
], 10,
|
|
644
|
+
], 10, jo))), 128))
|
|
643
645
|
])) : M("", !0)
|
|
644
|
-
], 46,
|
|
646
|
+
], 46, Vo))
|
|
645
647
|
], 64))), 128))
|
|
646
648
|
], 4)
|
|
647
649
|
], 4)) : (r(!0), i(y, { key: 1 }, p(n(T), (l) => (r(), i(y, {
|
|
@@ -660,7 +662,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
660
662
|
}]),
|
|
661
663
|
role: "row",
|
|
662
664
|
tabindex: "0",
|
|
663
|
-
style: g(
|
|
665
|
+
style: g(Je()),
|
|
664
666
|
onMouseenter: (t) => n(b)(s(l)),
|
|
665
667
|
onMouseleave: o[10] || (o[10] = (t) => n(b)(null)),
|
|
666
668
|
onFocusin: (t) => n(b)(s(l)),
|
|
@@ -685,9 +687,9 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
685
687
|
class: "of-checkbox",
|
|
686
688
|
checked: n(R).has(s(l)),
|
|
687
689
|
onChange: (t) => n(se)(s(l))
|
|
688
|
-
}, null, 40,
|
|
690
|
+
}, null, 40, Qo),
|
|
689
691
|
o[21] || (o[21] = h("span", { class: "of-sr-only" }, "选择当前行", -1))
|
|
690
|
-
], 8,
|
|
692
|
+
], 8, Jo)
|
|
691
693
|
])) : M("", !0),
|
|
692
694
|
(r(!0), i(y, null, p(n(ee), (t) => (r(), i("div", {
|
|
693
695
|
key: t.key,
|
|
@@ -710,7 +712,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
710
712
|
onCommit: L,
|
|
711
713
|
onRequestEdit: W,
|
|
712
714
|
onRequestCancel: G
|
|
713
|
-
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span",
|
|
715
|
+
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span", Uo, B(C(l, t.key) ?? "-"), 1))
|
|
714
716
|
];
|
|
715
717
|
}, !0)
|
|
716
718
|
], 4))), 128)),
|
|
@@ -726,12 +728,12 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
726
728
|
type: "button",
|
|
727
729
|
class: F(["of-table-row__action-btn", { "of-table-row__action-btn--danger": t.variant === "danger" }]),
|
|
728
730
|
disabled: t.disabled,
|
|
729
|
-
onClick: z((a) =>
|
|
731
|
+
onClick: z((a) => ze(l, t.key), ["stop"])
|
|
730
732
|
}, [
|
|
731
733
|
h("span", null, B(t.label), 1)
|
|
732
|
-
], 10,
|
|
734
|
+
], 10, Zo))), 128))
|
|
733
735
|
])) : M("", !0)
|
|
734
|
-
], 46,
|
|
736
|
+
], 46, Xo))
|
|
735
737
|
], 64))), 128))
|
|
736
738
|
]),
|
|
737
739
|
"scroll-header": $(() => [
|
|
@@ -765,7 +767,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
765
767
|
}, [
|
|
766
768
|
n(K)(l) ? (r(), i("div", {
|
|
767
769
|
key: 0,
|
|
768
|
-
style: g(
|
|
770
|
+
style: g(Qe())
|
|
769
771
|
}, null, 4)) : (r(), i("div", {
|
|
770
772
|
key: 1,
|
|
771
773
|
class: F(["of-table-row", {
|
|
@@ -802,11 +804,11 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
802
804
|
onCommit: L,
|
|
803
805
|
onRequestEdit: W,
|
|
804
806
|
onRequestCancel: G
|
|
805
|
-
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span",
|
|
807
|
+
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span", en, B(C(l, t.key) ?? "-"), 1))
|
|
806
808
|
];
|
|
807
809
|
}, !0)
|
|
808
810
|
], 4))), 128))
|
|
809
|
-
], 42,
|
|
811
|
+
], 42, _o))
|
|
810
812
|
], 64))), 128))
|
|
811
813
|
], 4)
|
|
812
814
|
], 4)) : (r(!0), i(y, { key: 1 }, p(n(T), (l) => (r(), i(y, {
|
|
@@ -814,7 +816,7 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
814
816
|
}, [
|
|
815
817
|
n(K)(l) ? (r(), i("div", {
|
|
816
818
|
key: 0,
|
|
817
|
-
style: g(
|
|
819
|
+
style: g(Qe())
|
|
818
820
|
}, null, 4)) : (r(), i("div", {
|
|
819
821
|
key: 1,
|
|
820
822
|
class: F(["of-table-row", {
|
|
@@ -851,11 +853,11 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
851
853
|
onCommit: L,
|
|
852
854
|
onRequestEdit: W,
|
|
853
855
|
onRequestCancel: G
|
|
854
|
-
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span",
|
|
856
|
+
}, null, 8, ["row-id", "field", "value", "editing"])) : (r(), i("span", on, B(C(l, t.key) ?? "-"), 1))
|
|
855
857
|
];
|
|
856
858
|
}, !0)
|
|
857
859
|
], 4))), 128))
|
|
858
|
-
], 42,
|
|
860
|
+
], 42, ln))
|
|
859
861
|
], 64))), 128))
|
|
860
862
|
]),
|
|
861
863
|
"standard-header": $(() => [
|
|
@@ -864,14 +866,14 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
864
866
|
selectable: x.value,
|
|
865
867
|
"sort-key": n(P).field ?? "",
|
|
866
868
|
"sort-order": n(P).order ?? "asc",
|
|
867
|
-
"all-selected": n(
|
|
868
|
-
indeterminate: n(
|
|
869
|
+
"all-selected": n(He),
|
|
870
|
+
indeterminate: n(je),
|
|
869
871
|
"enable-resize": u.enableResize,
|
|
870
872
|
"enable-field-menu": u.enableFieldManagement,
|
|
871
873
|
"enable-add-field": u.enableFieldManagement,
|
|
872
874
|
density: n(A),
|
|
873
875
|
onSort: n(Z),
|
|
874
|
-
onSelectAll: n(
|
|
876
|
+
onSelectAll: n(Xe),
|
|
875
877
|
onResizeStart: De,
|
|
876
878
|
onResizeDblclick: Re,
|
|
877
879
|
onHeaderContextmenu: pe,
|
|
@@ -896,22 +898,22 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
896
898
|
ref: (a) => ue(a, t)
|
|
897
899
|
}, { ref_for: !0 }, fe(l), {
|
|
898
900
|
onToggle: (a) => n(_)(ye(l))
|
|
899
|
-
}), null, 16, ["onToggle"])) : (r(), v(
|
|
901
|
+
}), null, 16, ["onToggle"])) : (r(), v(nl, O({
|
|
900
902
|
key: 1,
|
|
901
903
|
ref_for: !0,
|
|
902
904
|
ref: (a) => ue(a, t)
|
|
903
|
-
}, { ref_for: !0 },
|
|
905
|
+
}, { ref_for: !0 }, Ue(l), {
|
|
904
906
|
density: n(A),
|
|
905
907
|
"show-row-actions": u.showRowActions,
|
|
906
908
|
"row-action-items": Q(l),
|
|
907
909
|
draggable: u.enableRowDrag,
|
|
908
|
-
class:
|
|
910
|
+
class: el(l),
|
|
909
911
|
onSelect: n(se),
|
|
910
912
|
onClick: (a) => m(l),
|
|
911
|
-
onDragstart: (a) =>
|
|
912
|
-
onDragover: (a) =>
|
|
913
|
-
onDrop: (a) =>
|
|
914
|
-
onDragend: n(
|
|
913
|
+
onDragstart: (a) => Ge(a, l),
|
|
914
|
+
onDragover: (a) => Ve(a, l),
|
|
915
|
+
onDrop: (a) => Ne(a, l),
|
|
916
|
+
onDragend: n(We)
|
|
915
917
|
}), {
|
|
916
918
|
cell: $(({ row: a, col: f }) => [
|
|
917
919
|
E(e.$slots, "cell", {
|
|
@@ -927,14 +929,14 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
927
929
|
value: a[f.key],
|
|
928
930
|
editing: V(s(a), f.key),
|
|
929
931
|
class: F({
|
|
930
|
-
"of-cell--active":
|
|
931
|
-
"of-cell--selected":
|
|
932
|
+
"of-cell--active": Ze(s(a), f.key),
|
|
933
|
+
"of-cell--selected": _e(s(a), f.key)
|
|
932
934
|
}),
|
|
933
935
|
onCommit: L,
|
|
934
936
|
onRequestEdit: W,
|
|
935
937
|
onRequestCancel: G,
|
|
936
|
-
onClick: z((
|
|
937
|
-
}, null, 8, ["row-id", "field", "value", "editing", "class", "onClick"])) : (r(), i("span",
|
|
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))
|
|
938
940
|
];
|
|
939
941
|
}, !0)
|
|
940
942
|
]),
|
|
@@ -950,21 +952,21 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
950
952
|
ref_for: !0
|
|
951
953
|
}, fe(l), {
|
|
952
954
|
onToggle: (t) => n(_)(ye(l))
|
|
953
|
-
}), null, 16, ["onToggle"])) : (r(), v(
|
|
955
|
+
}), null, 16, ["onToggle"])) : (r(), v(nl, O({
|
|
954
956
|
key: 1,
|
|
955
957
|
ref_for: !0
|
|
956
|
-
},
|
|
958
|
+
}, Ue(l), {
|
|
957
959
|
density: n(A),
|
|
958
960
|
"show-row-actions": u.showRowActions,
|
|
959
961
|
"row-action-items": Q(l),
|
|
960
962
|
draggable: u.enableRowDrag,
|
|
961
|
-
class:
|
|
963
|
+
class: el(l),
|
|
962
964
|
onSelect: n(se),
|
|
963
965
|
onClick: (t) => m(l),
|
|
964
|
-
onDragstart: (t) =>
|
|
965
|
-
onDragover: (t) =>
|
|
966
|
-
onDrop: (t) =>
|
|
967
|
-
onDragend: n(
|
|
966
|
+
onDragstart: (t) => Ge(t, l),
|
|
967
|
+
onDragover: (t) => Ve(t, l),
|
|
968
|
+
onDrop: (t) => Ne(t, l),
|
|
969
|
+
onDragend: n(We)
|
|
968
970
|
}), {
|
|
969
971
|
cell: $(({ row: t, col: a }) => [
|
|
970
972
|
E(e.$slots, "cell", {
|
|
@@ -980,14 +982,14 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
980
982
|
value: t[a.key],
|
|
981
983
|
editing: V(s(t), a.key),
|
|
982
984
|
class: F({
|
|
983
|
-
"of-cell--active":
|
|
984
|
-
"of-cell--selected":
|
|
985
|
+
"of-cell--active": Ze(s(t), a.key),
|
|
986
|
+
"of-cell--selected": _e(s(t), a.key)
|
|
985
987
|
}),
|
|
986
988
|
onCommit: L,
|
|
987
989
|
onRequestEdit: W,
|
|
988
990
|
onRequestCancel: G,
|
|
989
991
|
onClick: z((Se) => u.enableKeyboard && n(re)(s(t), a.key), ["stop"])
|
|
990
|
-
}, null, 8, ["row-id", "field", "value", "editing", "class", "onClick"])) : (r(), i("span",
|
|
992
|
+
}, null, 8, ["row-id", "field", "value", "editing", "class", "onClick"])) : (r(), i("span", tn, B(C(t, a.key) ?? "-"), 1))
|
|
991
993
|
];
|
|
992
994
|
}, !0)
|
|
993
995
|
]),
|
|
@@ -997,22 +999,22 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
997
999
|
]),
|
|
998
1000
|
_: 3
|
|
999
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"]),
|
|
1000
|
-
n(
|
|
1002
|
+
n(pl) ? (r(), i("div", {
|
|
1001
1003
|
key: 0,
|
|
1002
1004
|
class: "of-resize-indicator",
|
|
1003
|
-
style: g({ left: n(
|
|
1005
|
+
style: g({ left: n(ml) + "px" })
|
|
1004
1006
|
}, null, 4)) : M("", !0),
|
|
1005
|
-
|
|
1007
|
+
Ol.value ? (r(), v(wo, {
|
|
1006
1008
|
key: 1,
|
|
1007
|
-
"draft-count": n(
|
|
1008
|
-
onCommitAll:
|
|
1009
|
-
onDiscardAll:
|
|
1009
|
+
"draft-count": n(Oe).size,
|
|
1010
|
+
onCommitAll: jl,
|
|
1011
|
+
onDiscardAll: Xl
|
|
1010
1012
|
}, null, 8, ["draft-count"])) : M("", !0),
|
|
1011
|
-
|
|
1013
|
+
Ye.value ? (r(), v(ko, {
|
|
1012
1014
|
key: 2,
|
|
1013
|
-
onClick:
|
|
1015
|
+
onClick: Yl
|
|
1014
1016
|
})) : M("", !0),
|
|
1015
|
-
u.enableFieldManagement ? (r(), v(n(
|
|
1017
|
+
u.enableFieldManagement ? (r(), v(n(rl), {
|
|
1016
1018
|
key: 3,
|
|
1017
1019
|
visible: S.value.visible,
|
|
1018
1020
|
"col-key": S.value.colKey,
|
|
@@ -1021,15 +1023,15 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
1021
1023
|
x: S.value.x,
|
|
1022
1024
|
y: S.value.y,
|
|
1023
1025
|
onClose: o[16] || (o[16] = (l) => S.value.visible = !1),
|
|
1024
|
-
onRename:
|
|
1025
|
-
onChangeType:
|
|
1026
|
+
onRename: Jl,
|
|
1027
|
+
onChangeType: Ql,
|
|
1026
1028
|
onSort: o[17] || (o[17] = (l, t) => n(Z)(l)),
|
|
1027
|
-
onHide:
|
|
1028
|
-
onDelete:
|
|
1029
|
-
onDuplicate:
|
|
1029
|
+
onHide: Ul,
|
|
1030
|
+
onDelete: Zl,
|
|
1031
|
+
onDuplicate: _l
|
|
1030
1032
|
}, null, 8, ["visible", "col-key", "col-label", "field-type", "x", "y"])) : M("", !0),
|
|
1031
|
-
(r(), v(
|
|
1032
|
-
ie.value ? (r(), i("div",
|
|
1033
|
+
(r(), v(go, { to: "body" }, [
|
|
1034
|
+
ie.value ? (r(), i("div", an, [
|
|
1033
1035
|
h("button", {
|
|
1034
1036
|
type: "button",
|
|
1035
1037
|
class: "of-add-field-overlay__backdrop",
|
|
@@ -1037,8 +1039,8 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
1037
1039
|
"aria-hidden": "true",
|
|
1038
1040
|
onClick: o[18] || (o[18] = (l) => ie.value = !1)
|
|
1039
1041
|
}),
|
|
1040
|
-
h("div",
|
|
1041
|
-
j(n(
|
|
1042
|
+
h("div", rn, [
|
|
1043
|
+
j(n(il), { onSelect: eo })
|
|
1042
1044
|
])
|
|
1043
1045
|
])) : M("", !0)
|
|
1044
1046
|
]))
|
|
@@ -1046,5 +1048,5 @@ const Wo = ["onMouseenter", "onFocusin", "onClick", "onKeydown"], Go = ["for"],
|
|
|
1046
1048
|
}
|
|
1047
1049
|
});
|
|
1048
1050
|
export {
|
|
1049
|
-
|
|
1051
|
+
Bn as default
|
|
1050
1052
|
};
|