@oneflowui/ui 0.8.4 → 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 +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 +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,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./DatabaseView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-163a8b49"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Database as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { useDatabaseView as
|
|
8
|
-
import { readWorkspacePreferences as
|
|
9
|
-
import { useDatabaseDetailWorkspace as
|
|
10
|
-
import { buildGanttItems as
|
|
11
|
-
import { cloneView as
|
|
12
|
-
const
|
|
1
|
+
import { defineComponent as xe, computed as o, ref as Q, watch as m, toRef as T, openBlock as B, createBlock as K, mergeProps as _e, unref as n, withCtx as G, createCommentVNode as X, createVNode as et } from "vue";
|
|
2
|
+
import { Database as tt, AlertCircle as it } from "lucide-vue-next";
|
|
3
|
+
import at from "./DatabaseViewDetailHost.vue.js";
|
|
4
|
+
import ot from "./DatabaseViewContent.vue.js";
|
|
5
|
+
import lt from "./DatabaseViewShell.vue.js";
|
|
6
|
+
import dt from "./DatabaseViewToolbar.vue.js";
|
|
7
|
+
import { useDatabaseView as rt } from "../../composables/useDatabaseView.js";
|
|
8
|
+
import { readWorkspacePreferences as nt, DATABASE_DETAIL_VIEW_ID as h } from "../../composables/useDatabaseWorkspace.js";
|
|
9
|
+
import { useDatabaseDetailWorkspace as st } from "../../composables/useDatabaseDetailWorkspace.js";
|
|
10
|
+
import { buildGanttItems as ct } from "../../types/index.js";
|
|
11
|
+
import { cloneView as Y, buildFallbackView as ut, buildVirtualDetailView as wt, convertViewFiltersToToolbarFilters as ft, buildDatabaseViewTabs as vt, buildTableColumns as ht, getVisibleFieldIds as mt, buildRenderedRecords as pt, buildEmptyFilter as bt, convertToolbarFiltersToViewFilters as yt } from "./databaseViewUtils.js";
|
|
12
|
+
const It = "正在加载数据视图", St = "请稍候,页面级编排器正在准备当前视图。", Vt = "数据视图加载失败", gt = "暂无记录", Et = /* @__PURE__ */ xe({
|
|
13
13
|
name: "DatabaseView",
|
|
14
14
|
inheritAttrs: !1,
|
|
15
15
|
__name: "DatabaseView",
|
|
@@ -45,17 +45,17 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
45
45
|
autoLoad: { type: Boolean, default: !0 }
|
|
46
46
|
},
|
|
47
47
|
emits: ["update:currentViewId", "update:selectedRecordId", "update:searchKeyword", "update:columns", "update:filterLogic", "update:records", "cell-edit", "select-record", "schema-add-field", "schema-rename-field", "schema-change-field-type", "schema-hide-field", "schema-delete-field", "schema-duplicate-field", "row-click", "card-click", "add", "add-column", "record-change", "load-view", "save-view", "sort", "group", "refresh"],
|
|
48
|
-
setup(V, { emit:
|
|
49
|
-
var q, J;
|
|
50
|
-
const i = V, d =
|
|
48
|
+
setup(V, { emit: Z }) {
|
|
49
|
+
var q, J, O;
|
|
50
|
+
const i = V, d = Z, b = nt(i.tableId), $ = o(() => i.schema ?? null), x = o(() => i.records ?? []), N = o(() => {
|
|
51
51
|
var r, s;
|
|
52
|
-
const e = (i.views ?? []).map((f) =>
|
|
53
|
-
return t || e.unshift(
|
|
54
|
-
}), l =
|
|
52
|
+
const e = (i.views ?? []).map((f) => Y(f)), t = e.some((f) => f.viewType === "table") || (((r = i.schema) == null ? void 0 : r.views) ?? []).some((f) => f.viewType === "table"), a = e.some((f) => f.viewType === "detail") || (((s = i.schema) == null ? void 0 : s.views) ?? []).some((f) => f.viewType === "detail");
|
|
53
|
+
return t || e.unshift(ut(i.schema, i.records ?? [])), a || e.push(wt(h, i.schema, i.records ?? [])), e;
|
|
54
|
+
}), l = rt({
|
|
55
55
|
tableId: i.tableId,
|
|
56
56
|
mode: i.mode,
|
|
57
57
|
schema: $,
|
|
58
|
-
records:
|
|
58
|
+
records: x,
|
|
59
59
|
views: N,
|
|
60
60
|
provider: i.provider,
|
|
61
61
|
defaultView: i.defaultView,
|
|
@@ -64,6 +64,7 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
64
64
|
pageSize: i.pageSize,
|
|
65
65
|
autoLoad: i.autoLoad,
|
|
66
66
|
actions: {
|
|
67
|
+
middleware: (O = i.actions) == null ? void 0 : O.middleware,
|
|
67
68
|
onCellEdit: async (e) => {
|
|
68
69
|
var t, a;
|
|
69
70
|
d("cell-edit", e), await ((a = (t = i.actions) == null ? void 0 : t.onCellEdit) == null ? void 0 : a.call(t, e));
|
|
@@ -105,21 +106,21 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
105
106
|
d("refresh"), await ((t = (e = i.actions) == null ? void 0 : e.onRefresh) == null ? void 0 : t.call(e));
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
}), v = o(() => l.activeView.value), g = o(() => l.activeViewId.value), D = o(() => l.selectedRecord.value),
|
|
109
|
+
}), v = o(() => l.activeView.value), g = o(() => l.activeViewId.value), D = o(() => l.selectedRecord.value), _ = o(() => l.selectedRecordId.value), R = o(() => l.schema.value ?? $.value), y = o(() => [...l.records.value]), w = o(() => v.value.viewType || "table"), F = Q("and"), c = Q([]);
|
|
109
110
|
m(
|
|
110
111
|
v,
|
|
111
112
|
(e) => {
|
|
112
|
-
c.value =
|
|
113
|
+
c.value = ft(e.filters ?? []);
|
|
113
114
|
},
|
|
114
115
|
{ immediate: !0 }
|
|
115
116
|
);
|
|
116
117
|
const W = o(
|
|
117
|
-
() =>
|
|
118
|
+
() => vt({
|
|
118
119
|
providedTabs: i.viewTabs,
|
|
119
120
|
viewList: l.viewList.value,
|
|
120
121
|
detailViewId: h
|
|
121
122
|
})
|
|
122
|
-
), u =
|
|
123
|
+
), u = st({
|
|
123
124
|
tableId: T(i, "tableId"),
|
|
124
125
|
activeViewId: g,
|
|
125
126
|
currentViewId: T(i, "currentViewId"),
|
|
@@ -151,19 +152,19 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
151
152
|
}
|
|
152
153
|
}), {
|
|
153
154
|
searchKeyword: I,
|
|
154
|
-
sidePanelWidth:
|
|
155
|
-
drawerWidth:
|
|
156
|
-
detailWorkspaceRow:
|
|
157
|
-
detailWorkspaceTitle:
|
|
158
|
-
detailWorkspaceDescription:
|
|
159
|
-
detailPropertyItems:
|
|
160
|
-
hasDetailDraftChanges:
|
|
155
|
+
sidePanelWidth: ee,
|
|
156
|
+
drawerWidth: te,
|
|
157
|
+
detailWorkspaceRow: ie,
|
|
158
|
+
detailWorkspaceTitle: ae,
|
|
159
|
+
detailWorkspaceDescription: oe,
|
|
160
|
+
detailPropertyItems: le,
|
|
161
|
+
hasDetailDraftChanges: de,
|
|
161
162
|
showDetailWorkspace: A,
|
|
162
|
-
resolvedDetailPresentation:
|
|
163
|
-
workspaceModes:
|
|
164
|
-
canSwitchDetailPresentation:
|
|
165
|
-
detailEmptyAction:
|
|
166
|
-
setPreferredDetailPresentation:
|
|
163
|
+
resolvedDetailPresentation: re,
|
|
164
|
+
workspaceModes: ne,
|
|
165
|
+
canSwitchDetailPresentation: se,
|
|
166
|
+
detailEmptyAction: ce,
|
|
167
|
+
setPreferredDetailPresentation: ue,
|
|
167
168
|
activateDetailWorkspace: S
|
|
168
169
|
} = u;
|
|
169
170
|
m(
|
|
@@ -198,94 +199,94 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
198
199
|
var a, r;
|
|
199
200
|
d("update:currentViewId", e), e === h && S(), t !== void 0 && e !== t && ((r = (a = i.actions) == null ? void 0 : a.onViewChange) == null || r.call(a, {
|
|
200
201
|
tableId: i.tableId,
|
|
201
|
-
view:
|
|
202
|
+
view: Y(v.value)
|
|
202
203
|
}));
|
|
203
204
|
},
|
|
204
205
|
{ immediate: !0 }
|
|
205
206
|
), m(
|
|
206
|
-
|
|
207
|
+
_,
|
|
207
208
|
(e, t) => {
|
|
208
209
|
d("update:selectedRecordId", e), t !== void 0 && e !== t && d("select-record", D.value ?? null);
|
|
209
210
|
},
|
|
210
211
|
{ immediate: !0 }
|
|
211
212
|
);
|
|
212
|
-
const
|
|
213
|
+
const we = o(
|
|
213
214
|
() => l.viewList.value.map((e) => ({
|
|
214
215
|
id: e.id,
|
|
215
216
|
name: e.name
|
|
216
217
|
}))
|
|
217
|
-
), U = o(() =>
|
|
218
|
+
), U = o(() => ht(v.value, R.value, y.value)), fe = o(() => mt(R.value, y.value)), ve = o(() => w.value === "detail" ? "请选择一条记录,详情工作区会在这里打开。" : w.value === "timeline" ? "当前时间线没有可渲染的起止日期。" : "当前视图没有匹配的数据,或者被筛选条件过滤为空。"), z = o(() => {
|
|
218
219
|
var t;
|
|
219
220
|
const e = (t = v.value.sorts) == null ? void 0 : t[0];
|
|
220
221
|
return {
|
|
221
222
|
field: (e == null ? void 0 : e.fieldId) ?? null,
|
|
222
223
|
order: (e == null ? void 0 : e.direction) ?? null
|
|
223
224
|
};
|
|
224
|
-
}),
|
|
225
|
+
}), he = o(() => {
|
|
225
226
|
var e, t;
|
|
226
227
|
return ((t = (e = v.value.groups) == null ? void 0 : e[0]) == null ? void 0 : t.fieldId) ?? void 0;
|
|
227
|
-
}), L = o(() => c.value),
|
|
228
|
-
() =>
|
|
228
|
+
}), L = o(() => c.value), me = o(() => L.value.length > 0), pe = o(() => i.showToolbar !== !1), be = o(() => i.showViewSwitch !== !1 && W.value.length > 1), ye = o(() => i.showFilter !== !1), Ie = o(() => i.showSort !== !1), Se = o(() => i.showGroup !== !1), Ve = o(() => i.showColumns !== !1), ge = o(() => i.showSearch !== !1), Re = o(() => i.loading ?? l.loading.value), C = o(() => i.error ?? l.error.value), P = o(
|
|
229
|
+
() => pt({
|
|
229
230
|
records: y.value,
|
|
230
231
|
searchKeyword: I.value,
|
|
231
|
-
visibleFieldIds:
|
|
232
|
+
visibleFieldIds: fe.value,
|
|
232
233
|
filterConditions: L.value,
|
|
233
234
|
filterLogic: F.value,
|
|
234
235
|
sort: z.value
|
|
235
236
|
})
|
|
236
|
-
),
|
|
237
|
-
() =>
|
|
237
|
+
), Ce = o(
|
|
238
|
+
() => ct(P.value, {
|
|
238
239
|
startFieldId: w.value === "timeline" ? "startDate" : void 0,
|
|
239
240
|
endFieldId: w.value === "timeline" ? "endDate" : void 0,
|
|
240
241
|
labelFieldId: "title"
|
|
241
242
|
})
|
|
242
|
-
),
|
|
243
|
+
), ke = o(() => Re.value ? "loading" : C.value ? "error" : w.value === "detail" ? A.value ? "normal" : "empty" : w.value === "timeline" ? Ce.value.length > 0 ? "normal" : "empty" : P.value.length > 0 ? "normal" : "empty");
|
|
243
244
|
function E(e) {
|
|
244
245
|
l.setRecords(e), d("update:records", e);
|
|
245
246
|
}
|
|
246
247
|
function M(e) {
|
|
247
248
|
l.viewList.value.some((t) => t.id === e) && (e === h && S(), l.switchView(e));
|
|
248
249
|
}
|
|
249
|
-
function
|
|
250
|
+
function Te(e) {
|
|
250
251
|
M(e);
|
|
251
252
|
}
|
|
252
|
-
function
|
|
253
|
+
function De(e) {
|
|
253
254
|
var t, a;
|
|
254
255
|
l.viewList.value.some((r) => r.id === e) && (e === h && S(), l.switchView(e), d("load-view", e), (a = (t = i.actions) == null ? void 0 : t.onViewLoad) == null || a.call(t, { tableId: i.tableId, viewId: e }));
|
|
255
256
|
}
|
|
256
|
-
function
|
|
257
|
+
function Fe(e) {
|
|
257
258
|
l.saveView({ name: e });
|
|
258
259
|
}
|
|
259
260
|
function k() {
|
|
260
261
|
l.updateActiveView({
|
|
261
|
-
filters:
|
|
262
|
+
filters: yt(c.value)
|
|
262
263
|
});
|
|
263
264
|
}
|
|
264
|
-
function
|
|
265
|
+
function We() {
|
|
265
266
|
var t;
|
|
266
267
|
const e = ((t = U.value.find((a) => !a.hidden)) == null ? void 0 : t.key) ?? "";
|
|
267
|
-
e && (c.value = [...c.value,
|
|
268
|
+
e && (c.value = [...c.value, bt(e)], k());
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
+
function Ae(e) {
|
|
270
271
|
c.value = c.value.filter((t) => t.id !== e), k();
|
|
271
272
|
}
|
|
272
|
-
function
|
|
273
|
+
function Ue(e, t) {
|
|
273
274
|
c.value = c.value.map(
|
|
274
275
|
(a) => a.id === e ? { ...a, ...t } : a
|
|
275
276
|
), k();
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
+
function Le() {
|
|
278
279
|
c.value = [], k();
|
|
279
280
|
}
|
|
280
|
-
function
|
|
281
|
+
function Pe(e) {
|
|
281
282
|
F.value = e, d("update:filterLogic", e);
|
|
282
283
|
}
|
|
283
|
-
function
|
|
284
|
+
function Ee(e) {
|
|
284
285
|
d("update:columns", e), l.updateActiveView({
|
|
285
286
|
visibleFields: e.filter((t) => !t.hidden).map((t) => t.key)
|
|
286
287
|
});
|
|
287
288
|
}
|
|
288
|
-
function
|
|
289
|
+
function Be(e) {
|
|
289
290
|
var r;
|
|
290
291
|
if (!e) {
|
|
291
292
|
l.updateActiveView({ sorts: [] }), d("sort", e);
|
|
@@ -296,18 +297,18 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
296
297
|
sorts: [{ fieldId: e, direction: a }]
|
|
297
298
|
}), d("sort", e);
|
|
298
299
|
}
|
|
299
|
-
function
|
|
300
|
+
function Ke(e) {
|
|
300
301
|
l.updateActiveView({
|
|
301
302
|
groups: e ? [{ fieldId: e }] : []
|
|
302
303
|
}), d("group", e);
|
|
303
304
|
}
|
|
304
|
-
function
|
|
305
|
+
function Ge(e) {
|
|
305
306
|
I.value = e;
|
|
306
307
|
}
|
|
307
308
|
function p(e) {
|
|
308
309
|
l.emitSchemaEvent(e);
|
|
309
310
|
}
|
|
310
|
-
function
|
|
311
|
+
function $e(e, t, a) {
|
|
311
312
|
const r = y.value.map((s) => s.id !== e ? s : {
|
|
312
313
|
...s,
|
|
313
314
|
fields: {
|
|
@@ -318,101 +319,101 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
318
319
|
E(r);
|
|
319
320
|
}
|
|
320
321
|
function H(e) {
|
|
321
|
-
|
|
322
|
+
$e(e.rowId, e.fieldId, e.value), l.emitCellEdit(e);
|
|
322
323
|
}
|
|
323
|
-
function
|
|
324
|
+
function Ne(e) {
|
|
324
325
|
var t, a;
|
|
325
326
|
d("record-change", e), (a = (t = i.actions) == null ? void 0 : t.onRecordChange) == null || a.call(t, { tableId: i.tableId, ...e });
|
|
326
327
|
}
|
|
327
|
-
function
|
|
328
|
+
function ze(e) {
|
|
328
329
|
E(e);
|
|
329
330
|
}
|
|
330
|
-
function
|
|
331
|
+
function Me(e) {
|
|
331
332
|
u.handleRowSelect(e);
|
|
332
333
|
}
|
|
333
|
-
function
|
|
334
|
+
function He(e) {
|
|
334
335
|
d("row-click", e);
|
|
335
336
|
}
|
|
336
|
-
function
|
|
337
|
+
function je(e) {
|
|
337
338
|
if (w.value === "timeline") {
|
|
338
|
-
|
|
339
|
+
Je(e);
|
|
339
340
|
return;
|
|
340
341
|
}
|
|
341
|
-
|
|
342
|
+
He(e);
|
|
342
343
|
}
|
|
343
|
-
function
|
|
344
|
+
function qe(e) {
|
|
344
345
|
d("card-click", e), u.handleCardClick(e);
|
|
345
346
|
}
|
|
346
|
-
function
|
|
347
|
+
function Je(e) {
|
|
347
348
|
d("row-click", e), u.handleTimelineRowClick(e);
|
|
348
349
|
}
|
|
349
350
|
function j() {
|
|
350
351
|
u.handleDetailClose();
|
|
351
352
|
}
|
|
352
|
-
function
|
|
353
|
+
function Oe(e) {
|
|
353
354
|
u.handleDetailDelete(e);
|
|
354
355
|
}
|
|
355
|
-
function
|
|
356
|
+
function Qe(e, t, a) {
|
|
356
357
|
u.handleDetailWorkspaceCommit(e, t, a);
|
|
357
358
|
}
|
|
358
|
-
function
|
|
359
|
+
function Xe() {
|
|
359
360
|
u.handleDetailWorkspaceSave();
|
|
360
361
|
}
|
|
361
|
-
function
|
|
362
|
+
function Ye(e) {
|
|
362
363
|
u.handleSidePanelWidthUpdate(e);
|
|
363
364
|
}
|
|
364
|
-
function
|
|
365
|
+
function Ze(e) {
|
|
365
366
|
u.handleDrawerWidthUpdate(e);
|
|
366
367
|
}
|
|
367
|
-
return (e, t) => (B(), K(
|
|
368
|
-
state:
|
|
369
|
-
"loading-title":
|
|
370
|
-
"loading-description":
|
|
371
|
-
"error-title":
|
|
368
|
+
return (e, t) => (B(), K(lt, _e({
|
|
369
|
+
state: ke.value,
|
|
370
|
+
"loading-title": It,
|
|
371
|
+
"loading-description": St,
|
|
372
|
+
"error-title": Vt,
|
|
372
373
|
"error-description": C.value instanceof Error ? C.value.message : String(C.value),
|
|
373
|
-
"error-icon": n(
|
|
374
|
-
"empty-icon": n(
|
|
375
|
-
"empty-title":
|
|
376
|
-
"empty-description":
|
|
377
|
-
"empty-action": n(
|
|
374
|
+
"error-icon": n(it),
|
|
375
|
+
"empty-icon": n(tt),
|
|
376
|
+
"empty-title": gt,
|
|
377
|
+
"empty-description": ve.value,
|
|
378
|
+
"empty-action": n(ce)
|
|
378
379
|
}, e.$attrs), {
|
|
379
380
|
toolbar: G(() => [
|
|
380
|
-
|
|
381
|
+
pe.value ? (B(), K(dt, {
|
|
381
382
|
key: 0,
|
|
382
383
|
"current-view": g.value,
|
|
383
384
|
"view-tabs": W.value,
|
|
384
385
|
columns: U.value,
|
|
385
386
|
"filter-conditions": L.value,
|
|
386
387
|
"filter-logic": F.value,
|
|
387
|
-
"filter-active":
|
|
388
|
+
"filter-active": me.value,
|
|
388
389
|
"current-sort": z.value,
|
|
389
|
-
"current-group":
|
|
390
|
+
"current-group": he.value,
|
|
390
391
|
"search-keyword": n(I),
|
|
391
|
-
"show-view-switch":
|
|
392
|
-
"show-filter":
|
|
393
|
-
"show-sort":
|
|
394
|
-
"show-group":
|
|
395
|
-
"show-columns":
|
|
396
|
-
"show-search":
|
|
397
|
-
"saved-views":
|
|
398
|
-
"onUpdate:currentView":
|
|
399
|
-
"onUpdate:columns":
|
|
400
|
-
"onUpdate:searchKeyword":
|
|
401
|
-
onAddFilter:
|
|
402
|
-
onRemoveFilter:
|
|
403
|
-
onUpdateFilter:
|
|
404
|
-
onClearFilters:
|
|
405
|
-
"onUpdate:filterLogic":
|
|
406
|
-
onSort:
|
|
407
|
-
onGroup:
|
|
408
|
-
onSaveView:
|
|
409
|
-
onLoadView:
|
|
410
|
-
}, null, 8, ["current-view", "view-tabs", "columns", "filter-conditions", "filter-logic", "filter-active", "current-sort", "current-group", "search-keyword", "show-view-switch", "show-filter", "show-sort", "show-group", "show-columns", "show-search", "saved-views"])) :
|
|
392
|
+
"show-view-switch": be.value,
|
|
393
|
+
"show-filter": ye.value,
|
|
394
|
+
"show-sort": Ie.value,
|
|
395
|
+
"show-group": Se.value,
|
|
396
|
+
"show-columns": Ve.value,
|
|
397
|
+
"show-search": ge.value,
|
|
398
|
+
"saved-views": we.value,
|
|
399
|
+
"onUpdate:currentView": Te,
|
|
400
|
+
"onUpdate:columns": Ee,
|
|
401
|
+
"onUpdate:searchKeyword": Ge,
|
|
402
|
+
onAddFilter: We,
|
|
403
|
+
onRemoveFilter: Ae,
|
|
404
|
+
onUpdateFilter: Ue,
|
|
405
|
+
onClearFilters: Le,
|
|
406
|
+
"onUpdate:filterLogic": Pe,
|
|
407
|
+
onSort: Be,
|
|
408
|
+
onGroup: Ke,
|
|
409
|
+
onSaveView: Fe,
|
|
410
|
+
onLoadView: De
|
|
411
|
+
}, null, 8, ["current-view", "view-tabs", "columns", "filter-conditions", "filter-logic", "filter-active", "current-sort", "current-group", "search-keyword", "show-view-switch", "show-filter", "show-sort", "show-group", "show-columns", "show-search", "saved-views"])) : X("", !0)
|
|
411
412
|
]),
|
|
412
413
|
content: G(() => {
|
|
413
414
|
var a;
|
|
414
415
|
return [
|
|
415
|
-
|
|
416
|
+
et(ot, {
|
|
416
417
|
"view-type": w.value,
|
|
417
418
|
records: P.value,
|
|
418
419
|
schema: R.value,
|
|
@@ -427,43 +428,43 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
427
428
|
onSchemaHideField: t[3] || (t[3] = (r) => p({ type: "schema-hide-field", fieldId: r })),
|
|
428
429
|
onSchemaDeleteField: t[4] || (t[4] = (r) => p({ type: "schema-delete-field", fieldId: r })),
|
|
429
430
|
onSchemaDuplicateField: t[5] || (t[5] = (r) => p({ type: "schema-duplicate-field", fieldId: r })),
|
|
430
|
-
onRowClick:
|
|
431
|
-
onRowClickRecord:
|
|
432
|
-
onCardClick:
|
|
431
|
+
onRowClick: je,
|
|
432
|
+
onRowClickRecord: Me,
|
|
433
|
+
onCardClick: qe,
|
|
433
434
|
onAdd: t[6] || (t[6] = (r) => d("add")),
|
|
434
435
|
onAddColumn: t[7] || (t[7] = (r) => d("add-column")),
|
|
435
|
-
onRecordChange:
|
|
436
|
-
"onUpdate:records":
|
|
436
|
+
onRecordChange: Ne,
|
|
437
|
+
"onUpdate:records": ze
|
|
437
438
|
}, null, 8, ["view-type", "records", "schema", "view", "columns", "readonly", "enable-field-management"])
|
|
438
439
|
];
|
|
439
440
|
}),
|
|
440
441
|
detail: G(() => {
|
|
441
442
|
var a;
|
|
442
443
|
return [
|
|
443
|
-
n(A) ? (B(), K(
|
|
444
|
+
n(A) ? (B(), K(at, {
|
|
444
445
|
key: 0,
|
|
445
446
|
visible: n(A),
|
|
446
|
-
title: n(
|
|
447
|
-
"row-id": n(
|
|
447
|
+
title: n(ae),
|
|
448
|
+
"row-id": n(ie).id,
|
|
448
449
|
"record-id": ((a = D.value) == null ? void 0 : a.id) ?? "",
|
|
449
450
|
"view-type": w.value,
|
|
450
|
-
description: n(
|
|
451
|
-
presentation: n(
|
|
452
|
-
"side-panel-width": n(
|
|
453
|
-
"drawer-width": n(
|
|
454
|
-
"can-switch-presentation": n(
|
|
455
|
-
"workspace-modes": n(
|
|
456
|
-
"property-items": n(
|
|
451
|
+
description: n(oe),
|
|
452
|
+
presentation: n(re),
|
|
453
|
+
"side-panel-width": n(ee),
|
|
454
|
+
"drawer-width": n(te),
|
|
455
|
+
"can-switch-presentation": n(se),
|
|
456
|
+
"workspace-modes": n(ne),
|
|
457
|
+
"property-items": n(le),
|
|
457
458
|
readonly: V.readonly,
|
|
458
|
-
"has-draft-changes": n(
|
|
459
|
-
onCommit:
|
|
460
|
-
onSave:
|
|
461
|
-
onDelete:
|
|
459
|
+
"has-draft-changes": n(de),
|
|
460
|
+
onCommit: Qe,
|
|
461
|
+
onSave: Xe,
|
|
462
|
+
onDelete: Oe,
|
|
462
463
|
onClose: j,
|
|
463
|
-
"onUpdate:sidePanelWidth":
|
|
464
|
-
"onUpdate:drawerWidth":
|
|
465
|
-
"onUpdate:presentation": n(
|
|
466
|
-
}, null, 8, ["visible", "title", "row-id", "record-id", "view-type", "description", "presentation", "side-panel-width", "drawer-width", "can-switch-presentation", "workspace-modes", "property-items", "readonly", "has-draft-changes", "onUpdate:presentation"])) :
|
|
464
|
+
"onUpdate:sidePanelWidth": Ye,
|
|
465
|
+
"onUpdate:drawerWidth": Ze,
|
|
466
|
+
"onUpdate:presentation": n(ue)
|
|
467
|
+
}, null, 8, ["visible", "title", "row-id", "record-id", "view-type", "description", "presentation", "side-panel-width", "drawer-width", "can-switch-presentation", "workspace-modes", "property-items", "readonly", "has-draft-changes", "onUpdate:presentation"])) : X("", !0)
|
|
467
468
|
];
|
|
468
469
|
}),
|
|
469
470
|
_: 1
|
|
@@ -471,5 +472,5 @@ const yt = "正在加载数据视图", It = "请稍候,页面级编排器正
|
|
|
471
472
|
}
|
|
472
473
|
});
|
|
473
474
|
export {
|
|
474
|
-
|
|
475
|
+
Et as default
|
|
475
476
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { default as DatabaseView } from './DatabaseView.vue';
|
|
2
|
-
export type { DatabaseViewComponentActions as DatabaseViewActions, DatabaseViewSchemaEvent, DatabaseViewViewTab, DatabaseViewProps, } from '../../contracts/database';
|
|
2
|
+
export type { DatabaseViewActionContext, DatabaseViewActionErrorContext, DatabaseViewActionMiddleware, DatabaseViewActionMiddlewareList, DatabaseViewComponentActions as DatabaseViewActions, DatabaseViewSchemaEvent, DatabaseViewViewTab, DatabaseViewProps, } from '../../contracts/database';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./KanbanColumn.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03f54429"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Plus as
|
|
1
|
+
import { defineComponent as B, ref as g, watch as k, computed as y, openBlock as r, createElementBlock as d, createElementVNode as n, normalizeStyle as m, toDisplayString as C, createVNode as D, unref as i, createBlock as f, withCtx as E, Fragment as h, renderList as b } from "vue";
|
|
2
|
+
import { Plus as H } from "lucide-vue-next";
|
|
3
3
|
import { VueDraggable as R } from "vue-draggable-plus";
|
|
4
|
-
import {
|
|
4
|
+
import { createVirtualListState as U, useVirtualList as Y } from "../../composables/useVirtualList.js";
|
|
5
5
|
import V from "./KanbanCard.vue.js";
|
|
6
|
-
import { mergeColorMap as
|
|
7
|
-
const
|
|
6
|
+
import { mergeColorMap as w, DEFAULT_STATUS_MAP as F } from "../../composables/useBadge.js";
|
|
7
|
+
const I = { class: "of-kanban-column" }, K = { class: "of-col-header" }, N = { class: "of-col-title" }, P = { class: "of-col-count" }, J = /* @__PURE__ */ B({
|
|
8
8
|
__name: "KanbanColumn",
|
|
9
9
|
props: {
|
|
10
10
|
column: {},
|
|
@@ -13,8 +13,8 @@ const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { c
|
|
|
13
13
|
statusColorMap: { default: void 0 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["add-card", "card-click", "update:column"],
|
|
16
|
-
setup(
|
|
17
|
-
const s =
|
|
16
|
+
setup(c, { emit: S }) {
|
|
17
|
+
const s = c, u = S, l = g([...s.column.tasks]);
|
|
18
18
|
k(
|
|
19
19
|
() => s.column.tasks,
|
|
20
20
|
(a) => {
|
|
@@ -26,67 +26,68 @@ const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { c
|
|
|
26
26
|
), k(l, (a) => {
|
|
27
27
|
u("update:column", { ...s.column, tasks: a });
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
visibleItems:
|
|
31
|
-
totalHeight:
|
|
32
|
-
offsetY:
|
|
33
|
-
} =
|
|
29
|
+
const x = y(() => l.value.length > 50), p = g(null), T = U(), {
|
|
30
|
+
visibleItems: M,
|
|
31
|
+
totalHeight: L,
|
|
32
|
+
offsetY: z
|
|
33
|
+
} = Y({
|
|
34
34
|
items: l,
|
|
35
35
|
itemHeight: 120,
|
|
36
36
|
overscan: 3,
|
|
37
|
-
containerRef: p
|
|
38
|
-
|
|
37
|
+
containerRef: p,
|
|
38
|
+
state: T
|
|
39
|
+
}), A = y(() => {
|
|
39
40
|
if (s.column.color) return s.column.color;
|
|
40
|
-
const a =
|
|
41
|
+
const a = w(F, s.statusColorMap), t = a[s.column.id], o = a[s.column.title], e = t ?? o;
|
|
41
42
|
return (e == null ? void 0 : e.dot) ?? (e == null ? void 0 : e.text) ?? "var(--of-text-tertiary, var(--of-color-gray-400))";
|
|
42
43
|
});
|
|
43
|
-
return (a, t) => (r(), d("div",
|
|
44
|
-
n("div",
|
|
44
|
+
return (a, t) => (r(), d("div", I, [
|
|
45
|
+
n("div", K, [
|
|
45
46
|
n("span", {
|
|
46
47
|
class: "of-col-dot",
|
|
47
|
-
style: m({ background:
|
|
48
|
+
style: m({ background: A.value })
|
|
48
49
|
}, null, 4),
|
|
49
|
-
n("span",
|
|
50
|
-
n("span",
|
|
50
|
+
n("span", N, C(c.column.title), 1),
|
|
51
|
+
n("span", P, C(l.value.length), 1),
|
|
51
52
|
t[4] || (t[4] = n("span", { class: "of-col-spacer" }, null, -1)),
|
|
52
53
|
n("button", {
|
|
53
54
|
class: "of-col-add-btn",
|
|
54
|
-
onClick: t[0] || (t[0] = (o) => u("add-card",
|
|
55
|
+
onClick: t[0] || (t[0] = (o) => u("add-card", c.column.id))
|
|
55
56
|
}, [
|
|
56
|
-
|
|
57
|
+
D(i(H), { size: 14 })
|
|
57
58
|
])
|
|
58
59
|
]),
|
|
59
|
-
|
|
60
|
+
x.value ? (r(), d("div", {
|
|
60
61
|
key: 1,
|
|
61
62
|
ref_key: "cardContainerRef",
|
|
62
63
|
ref: p,
|
|
63
64
|
class: "of-col-cards of-col-cards-virtual"
|
|
64
65
|
}, [
|
|
65
66
|
n("div", {
|
|
66
|
-
style: m({ height:
|
|
67
|
+
style: m({ height: i(L) + "px", position: "relative" })
|
|
67
68
|
}, [
|
|
68
69
|
n("div", {
|
|
69
|
-
style: m({ transform: `translateY(${
|
|
70
|
+
style: m({ transform: `translateY(${i(z)}px)` })
|
|
70
71
|
}, [
|
|
71
|
-
(r(!0), d(h, null, b(
|
|
72
|
+
(r(!0), d(h, null, b(i(M), ({ data: o }) => (r(), f(V, {
|
|
72
73
|
key: o.id,
|
|
73
74
|
task: o,
|
|
74
75
|
onClick: t[3] || (t[3] = (e) => u("card-click", e))
|
|
75
76
|
}, null, 8, ["task"]))), 128))
|
|
76
77
|
], 4)
|
|
77
78
|
], 4)
|
|
78
|
-
], 512)) : (r(), f(
|
|
79
|
+
], 512)) : (r(), f(i(R), {
|
|
79
80
|
key: 0,
|
|
80
81
|
modelValue: l.value,
|
|
81
82
|
"onUpdate:modelValue": t[2] || (t[2] = (o) => l.value = o),
|
|
82
83
|
group: { name: "kanban", pull: !0, put: !0 },
|
|
83
84
|
"item-key": "id",
|
|
84
|
-
"ghost-class":
|
|
85
|
+
"ghost-class": c.ghostClass,
|
|
85
86
|
"chosen-class": "of-chosen",
|
|
86
87
|
animation: 200,
|
|
87
88
|
class: "of-col-cards"
|
|
88
89
|
}, {
|
|
89
|
-
default:
|
|
90
|
+
default: E(() => [
|
|
90
91
|
(r(!0), d(h, null, b(l.value, (o) => (r(), f(V, {
|
|
91
92
|
key: o.id,
|
|
92
93
|
task: o,
|
|
@@ -99,5 +100,5 @@ const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { c
|
|
|
99
100
|
}
|
|
100
101
|
});
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
J as default
|
|
103
104
|
};
|