@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.
Files changed (36) hide show
  1. package/README.en.md +219 -0
  2. package/README.md +219 -0
  3. package/dist/components/ai/AiMessageList.vue.js +1 -1
  4. package/dist/components/ai/AiMessageList.vue2.js +28 -27
  5. package/dist/components/common/ThemeScope.vue.d.ts +24 -0
  6. package/dist/components/common/ThemeScope.vue.js +24 -0
  7. package/dist/components/common/ThemeScope.vue2.js +4 -0
  8. package/dist/components/common/index.d.ts +1 -0
  9. package/dist/components/database/DatabaseView.vue.d.ts +4 -4
  10. package/dist/components/database/DatabaseView.vue.js +4 -4
  11. package/dist/components/database/DatabaseView.vue2.js +135 -134
  12. package/dist/components/database/index.d.ts +1 -1
  13. package/dist/components/kanban/KanbanColumn.vue.js +3 -3
  14. package/dist/components/kanban/KanbanColumn.vue2.js +31 -30
  15. package/dist/components/table/DataTable.vue.js +4 -4
  16. package/dist/components/table/DataTable.vue2.js +533 -504
  17. package/dist/components/table/FieldCell.vue.d.ts +6 -0
  18. package/dist/components/table/FieldCell.vue.js +2 -2
  19. package/dist/components/table/FieldCell.vue2.js +48 -41
  20. package/dist/composables/index.d.ts +5 -3
  21. package/dist/composables/useDataTableLayout.d.ts +1 -0
  22. package/dist/composables/useDataTableLayout.js +29 -26
  23. package/dist/composables/useDatabaseView.d.ts +1 -1
  24. package/dist/composables/useDatabaseView.js +311 -284
  25. package/dist/composables/useDatabaseViewMiddleware.d.ts +33 -0
  26. package/dist/composables/useDatabaseViewMiddleware.js +131 -0
  27. package/dist/composables/useVirtualList.d.ts +11 -0
  28. package/dist/composables/useVirtualList.js +146 -104
  29. package/dist/composables.js +71 -0
  30. package/dist/contracts/database.d.ts +23 -0
  31. package/dist/index.d.ts +6 -3
  32. package/dist/index.js +259 -250
  33. package/dist/style.css +1 -1
  34. package/dist/theme.d.ts +1 -0
  35. package/dist/theme.js +4 -0
  36. package/package.json +16 -2
@@ -1,7 +1,7 @@
1
- import o from "./DatabaseView.vue2.js";
1
+ import a from "./DatabaseView.vue2.js";
2
2
  /* empty css */
3
- import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-99f1250c"]]);
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-163a8b49"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,15 +1,15 @@
1
- import { defineComponent as Ze, computed as o, ref as O, watch as m, toRef as T, openBlock as B, createBlock as K, mergeProps as xe, unref as n, withCtx as G, createCommentVNode as Q, createVNode as _e } from "vue";
2
- import { Database as et, AlertCircle as tt } from "lucide-vue-next";
3
- import it from "./DatabaseViewDetailHost.vue.js";
4
- import at from "./DatabaseViewContent.vue.js";
5
- import ot from "./DatabaseViewShell.vue.js";
6
- import lt from "./DatabaseViewToolbar.vue.js";
7
- import { useDatabaseView as dt } from "../../composables/useDatabaseView.js";
8
- import { readWorkspacePreferences as rt, DATABASE_DETAIL_VIEW_ID as h } from "../../composables/useDatabaseWorkspace.js";
9
- import { useDatabaseDetailWorkspace as nt } from "../../composables/useDatabaseDetailWorkspace.js";
10
- import { buildGanttItems as st } from "../../types/index.js";
11
- import { cloneView as X, buildFallbackView as ct, buildVirtualDetailView as ut, convertViewFiltersToToolbarFilters as wt, buildDatabaseViewTabs as ft, buildTableColumns as vt, getVisibleFieldIds as ht, buildRenderedRecords as mt, buildEmptyFilter as pt, convertToolbarFiltersToViewFilters as bt } from "./databaseViewUtils.js";
12
- const yt = "正在加载数据视图", It = "请稍候,页面级编排器正在准备当前视图。", St = "数据视图加载失败", Vt = "暂无记录", Pt = /* @__PURE__ */ Ze({
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: Y }) {
49
- var q, J;
50
- const i = V, d = Y, b = rt(i.tableId), $ = o(() => i.schema ?? null), Z = o(() => i.records ?? []), N = o(() => {
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) => X(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(ct(i.schema, i.records ?? [])), a || e.push(ut(h, i.schema, i.records ?? [])), e;
54
- }), l = dt({
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: Z,
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), x = o(() => l.selectedRecordId.value), R = o(() => l.schema.value ?? $.value), y = o(() => [...l.records.value]), w = o(() => v.value.viewType || "table"), F = O("and"), c = O([]);
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 = wt(e.filters ?? []);
113
+ c.value = ft(e.filters ?? []);
113
114
  },
114
115
  { immediate: !0 }
115
116
  );
116
117
  const W = o(
117
- () => ft({
118
+ () => vt({
118
119
  providedTabs: i.viewTabs,
119
120
  viewList: l.viewList.value,
120
121
  detailViewId: h
121
122
  })
122
- ), u = nt({
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: ee,
156
- detailWorkspaceRow: te,
157
- detailWorkspaceTitle: ie,
158
- detailWorkspaceDescription: ae,
159
- detailPropertyItems: oe,
160
- hasDetailDraftChanges: le,
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: de,
163
- workspaceModes: re,
164
- canSwitchDetailPresentation: ne,
165
- detailEmptyAction: se,
166
- setPreferredDetailPresentation: ce,
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: X(v.value)
202
+ view: Y(v.value)
202
203
  }));
203
204
  },
204
205
  { immediate: !0 }
205
206
  ), m(
206
- x,
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 ue = o(
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(() => vt(v.value, R.value, y.value)), we = o(() => ht(R.value, y.value)), fe = o(() => w.value === "detail" ? "请选择一条记录,详情工作区会在这里打开。" : w.value === "timeline" ? "当前时间线没有可渲染的起止日期。" : "当前视图没有匹配的数据,或者被筛选条件过滤为空。"), z = 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
- }), ve = o(() => {
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), he = o(() => L.value.length > 0), me = o(() => i.showToolbar !== !1), pe = o(() => i.showViewSwitch !== !1 && W.value.length > 1), be = o(() => i.showFilter !== !1), ye = o(() => i.showSort !== !1), Ie = o(() => i.showGroup !== !1), Se = o(() => i.showColumns !== !1), Ve = o(() => i.showSearch !== !1), ge = o(() => i.loading ?? l.loading.value), C = o(() => i.error ?? l.error.value), P = o(
228
- () => mt({
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: we.value,
232
+ visibleFieldIds: fe.value,
232
233
  filterConditions: L.value,
233
234
  filterLogic: F.value,
234
235
  sort: z.value
235
236
  })
236
- ), Re = o(
237
- () => st(P.value, {
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
- ), Ce = o(() => ge.value ? "loading" : C.value ? "error" : w.value === "detail" ? A.value ? "normal" : "empty" : w.value === "timeline" ? Re.value.length > 0 ? "normal" : "empty" : P.value.length > 0 ? "normal" : "empty");
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 ke(e) {
250
+ function Te(e) {
250
251
  M(e);
251
252
  }
252
- function Te(e) {
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 De(e) {
257
+ function Fe(e) {
257
258
  l.saveView({ name: e });
258
259
  }
259
260
  function k() {
260
261
  l.updateActiveView({
261
- filters: bt(c.value)
262
+ filters: yt(c.value)
262
263
  });
263
264
  }
264
- function Fe() {
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, pt(e)], k());
268
+ e && (c.value = [...c.value, bt(e)], k());
268
269
  }
269
- function We(e) {
270
+ function Ae(e) {
270
271
  c.value = c.value.filter((t) => t.id !== e), k();
271
272
  }
272
- function Ae(e, t) {
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 Ue() {
278
+ function Le() {
278
279
  c.value = [], k();
279
280
  }
280
- function Le(e) {
281
+ function Pe(e) {
281
282
  F.value = e, d("update:filterLogic", e);
282
283
  }
283
- function Pe(e) {
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 Ee(e) {
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 Be(e) {
300
+ function Ke(e) {
300
301
  l.updateActiveView({
301
302
  groups: e ? [{ fieldId: e }] : []
302
303
  }), d("group", e);
303
304
  }
304
- function Ke(e) {
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 Ge(e, t, a) {
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
- Ge(e.rowId, e.fieldId, e.value), l.emitCellEdit(e);
322
+ $e(e.rowId, e.fieldId, e.value), l.emitCellEdit(e);
322
323
  }
323
- function $e(e) {
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 Ne(e) {
328
+ function ze(e) {
328
329
  E(e);
329
330
  }
330
- function ze(e) {
331
+ function Me(e) {
331
332
  u.handleRowSelect(e);
332
333
  }
333
- function Me(e) {
334
+ function He(e) {
334
335
  d("row-click", e);
335
336
  }
336
- function He(e) {
337
+ function je(e) {
337
338
  if (w.value === "timeline") {
338
- qe(e);
339
+ Je(e);
339
340
  return;
340
341
  }
341
- Me(e);
342
+ He(e);
342
343
  }
343
- function je(e) {
344
+ function qe(e) {
344
345
  d("card-click", e), u.handleCardClick(e);
345
346
  }
346
- function qe(e) {
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 Je(e) {
353
+ function Oe(e) {
353
354
  u.handleDetailDelete(e);
354
355
  }
355
- function Oe(e, t, a) {
356
+ function Qe(e, t, a) {
356
357
  u.handleDetailWorkspaceCommit(e, t, a);
357
358
  }
358
- function Qe() {
359
+ function Xe() {
359
360
  u.handleDetailWorkspaceSave();
360
361
  }
361
- function Xe(e) {
362
+ function Ye(e) {
362
363
  u.handleSidePanelWidthUpdate(e);
363
364
  }
364
- function Ye(e) {
365
+ function Ze(e) {
365
366
  u.handleDrawerWidthUpdate(e);
366
367
  }
367
- return (e, t) => (B(), K(ot, xe({
368
- state: Ce.value,
369
- "loading-title": yt,
370
- "loading-description": It,
371
- "error-title": St,
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(tt),
374
- "empty-icon": n(et),
375
- "empty-title": Vt,
376
- "empty-description": fe.value,
377
- "empty-action": n(se)
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
- me.value ? (B(), K(lt, {
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": he.value,
388
+ "filter-active": me.value,
388
389
  "current-sort": z.value,
389
- "current-group": ve.value,
390
+ "current-group": he.value,
390
391
  "search-keyword": n(I),
391
- "show-view-switch": pe.value,
392
- "show-filter": be.value,
393
- "show-sort": ye.value,
394
- "show-group": Ie.value,
395
- "show-columns": Se.value,
396
- "show-search": Ve.value,
397
- "saved-views": ue.value,
398
- "onUpdate:currentView": ke,
399
- "onUpdate:columns": Pe,
400
- "onUpdate:searchKeyword": Ke,
401
- onAddFilter: Fe,
402
- onRemoveFilter: We,
403
- onUpdateFilter: Ae,
404
- onClearFilters: Ue,
405
- "onUpdate:filterLogic": Le,
406
- onSort: Ee,
407
- onGroup: Be,
408
- onSaveView: De,
409
- onLoadView: Te
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"])) : Q("", !0)
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
- _e(at, {
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: He,
431
- onRowClickRecord: ze,
432
- onCardClick: je,
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: $e,
436
- "onUpdate:records": Ne
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(it, {
444
+ n(A) ? (B(), K(at, {
444
445
  key: 0,
445
446
  visible: n(A),
446
- title: n(ie),
447
- "row-id": n(te).id,
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(ae),
451
- presentation: n(de),
452
- "side-panel-width": n(_),
453
- "drawer-width": n(ee),
454
- "can-switch-presentation": n(ne),
455
- "workspace-modes": n(re),
456
- "property-items": n(oe),
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(le),
459
- onCommit: Oe,
460
- onSave: Qe,
461
- onDelete: Je,
459
+ "has-draft-changes": n(de),
460
+ onCommit: Qe,
461
+ onSave: Xe,
462
+ onDelete: Oe,
462
463
  onClose: j,
463
- "onUpdate:sidePanelWidth": Xe,
464
- "onUpdate:drawerWidth": Ye,
465
- "onUpdate:presentation": n(ce)
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"])) : Q("", !0)
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
- Pt as default
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 a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ a(o, [["__scopeId", "data-v-daa8ed09"]]);
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-03f54429"]]);
5
5
  export {
6
- p as default
6
+ f as default
7
7
  };
@@ -1,10 +1,10 @@
1
- import { defineComponent as D, 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 E, unref as c, createBlock as f, withCtx as H, Fragment as h, renderList as b } from "vue";
2
- import { Plus as L } from "lucide-vue-next";
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 { useVirtualList as U } from "../../composables/useVirtualList.js";
4
+ import { createVirtualListState as U, useVirtualList as Y } from "../../composables/useVirtualList.js";
5
5
  import V from "./KanbanCard.vue.js";
6
- import { mergeColorMap as Y, DEFAULT_STATUS_MAP as w } from "../../composables/useBadge.js";
7
- const z = { class: "of-kanban-column" }, F = { class: "of-col-header" }, I = { class: "of-col-title" }, K = { class: "of-col-count" }, q = /* @__PURE__ */ D({
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(i, { emit: x }) {
17
- const s = i, u = x, l = g([...s.column.tasks]);
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 S = y(() => l.value.length > 50), p = g(null), {
30
- visibleItems: T,
31
- totalHeight: M,
32
- offsetY: A
33
- } = U({
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
- }), B = y(() => {
37
+ containerRef: p,
38
+ state: T
39
+ }), A = y(() => {
39
40
  if (s.column.color) return s.column.color;
40
- const a = Y(w, s.statusColorMap), t = a[s.column.id], o = a[s.column.title], e = t ?? o;
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", z, [
44
- n("div", F, [
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: B.value })
48
+ style: m({ background: A.value })
48
49
  }, null, 4),
49
- n("span", I, C(i.column.title), 1),
50
- n("span", K, C(l.value.length), 1),
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", i.column.id))
55
+ onClick: t[0] || (t[0] = (o) => u("add-card", c.column.id))
55
56
  }, [
56
- E(c(L), { size: 14 })
57
+ D(i(H), { size: 14 })
57
58
  ])
58
59
  ]),
59
- S.value ? (r(), d("div", {
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: c(M) + "px", position: "relative" })
67
+ style: m({ height: i(L) + "px", position: "relative" })
67
68
  }, [
68
69
  n("div", {
69
- style: m({ transform: `translateY(${c(A)}px)` })
70
+ style: m({ transform: `translateY(${i(z)}px)` })
70
71
  }, [
71
- (r(!0), d(h, null, b(c(T), ({ data: o }) => (r(), f(V, {
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(c(R), {
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": i.ghostClass,
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: H(() => [
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
- q as default
103
+ J as default
103
104
  };