@oneflowui/ui 0.8.1 → 0.8.3

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 (107) hide show
  1. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  2. package/dist/components/Dashboard/charts/BarChart.vue2.js +9 -9
  3. package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
  5. package/dist/components/Dashboard/charts/PieChart.vue2.js +3 -3
  6. package/dist/components/Dashboard/charts/TableChart.vue.js +2 -2
  7. package/dist/components/Dashboard/index.vue.js +2 -2
  8. package/dist/components/base/InfoCard.vue.js +1 -1
  9. package/dist/components/base/InfoCard.vue2.js +40 -40
  10. package/dist/components/base/StatisticCard.vue.js +3 -3
  11. package/dist/components/base/StatusSummary.vue.js +1 -1
  12. package/dist/components/base/StatusSummary.vue2.js +5 -5
  13. package/dist/components/database/DatabaseDetailPresenter.vue.d.ts +41 -0
  14. package/dist/components/database/DatabaseDetailPresenter.vue.js +76 -0
  15. package/dist/components/database/DatabaseDetailPresenter.vue2.js +4 -0
  16. package/dist/components/database/DatabaseDetailWorkspace.vue.d.ts +37 -0
  17. package/dist/components/database/DatabaseDetailWorkspace.vue.js +7 -0
  18. package/dist/components/database/DatabaseDetailWorkspace.vue2.js +103 -0
  19. package/dist/components/database/DatabaseView.vue.d.ts +13 -76
  20. package/dist/components/database/DatabaseView.vue.js +2 -2
  21. package/dist/components/database/DatabaseView.vue2.js +322 -921
  22. package/dist/components/database/DatabaseViewContent.vue.d.ts +74 -0
  23. package/dist/components/database/DatabaseViewContent.vue.js +79 -0
  24. package/dist/components/database/DatabaseViewContent.vue2.js +4 -0
  25. package/dist/components/database/DatabaseViewDetailHost.vue.d.ts +43 -0
  26. package/dist/components/database/DatabaseViewDetailHost.vue.js +59 -0
  27. package/dist/components/database/DatabaseViewDetailHost.vue2.js +4 -0
  28. package/dist/components/database/DatabaseViewShell.vue.d.ts +35 -0
  29. package/dist/components/database/DatabaseViewShell.vue.js +7 -0
  30. package/dist/components/database/DatabaseViewShell.vue2.js +71 -0
  31. package/dist/components/database/DatabaseViewToolbar.vue.d.ts +77 -0
  32. package/dist/components/database/DatabaseViewToolbar.vue.js +62 -0
  33. package/dist/components/database/DatabaseViewToolbar.vue2.js +4 -0
  34. package/dist/components/database/databaseViewUtils.d.ts +91 -0
  35. package/dist/components/database/databaseViewUtils.js +266 -0
  36. package/dist/components/database/index.d.ts +1 -1
  37. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -2
  38. package/dist/components/layout/AppLayout.vue.js +1 -1
  39. package/dist/components/layout/Navbar.vue.js +1 -1
  40. package/dist/components/layout/Sidebar.vue.js +2 -2
  41. package/dist/components/layout/StatusBar.vue.js +2 -2
  42. package/dist/components/overlay/Dialog.vue.d.ts +1 -1
  43. package/dist/components/table/ColumnHeaderMenu.vue.js +3 -3
  44. package/dist/components/table/DataTable.vue.d.ts +6 -17
  45. package/dist/components/table/DataTable.vue.js +2 -2
  46. package/dist/components/table/DataTable.vue2.js +781 -872
  47. package/dist/components/table/DataTableDesktopFixedRegion.vue.d.ts +56 -0
  48. package/dist/components/table/DataTableDesktopFixedRegion.vue.js +7 -0
  49. package/dist/components/table/DataTableDesktopFixedRegion.vue2.js +67 -0
  50. package/dist/components/table/DataTableDesktopFrame.vue.d.ts +127 -0
  51. package/dist/components/table/DataTableDesktopFrame.vue.js +7 -0
  52. package/dist/components/table/DataTableDesktopFrame.vue2.js +196 -0
  53. package/dist/components/table/DataTableDesktopScrollRegion.vue.d.ts +55 -0
  54. package/dist/components/table/DataTableDesktopScrollRegion.vue.js +7 -0
  55. package/dist/components/table/DataTableDesktopScrollRegion.vue2.js +66 -0
  56. package/dist/components/table/DataTableDesktopStandardRegion.vue.d.ts +54 -0
  57. package/dist/components/table/DataTableDesktopStandardRegion.vue.js +7 -0
  58. package/dist/components/table/DataTableDesktopStandardRegion.vue2.js +65 -0
  59. package/dist/components/table/DataTableDraftToolbar.vue.d.ts +11 -0
  60. package/dist/components/table/DataTableDraftToolbar.vue.js +7 -0
  61. package/dist/components/table/DataTableDraftToolbar.vue2.js +25 -0
  62. package/dist/components/table/DataTableMobilePanel.vue.d.ts +79 -0
  63. package/dist/components/table/DataTableMobilePanel.vue.js +60 -0
  64. package/dist/components/table/DataTableMobilePanel.vue2.js +4 -0
  65. package/dist/components/table/DataTableSelectionBar.vue.d.ts +11 -0
  66. package/dist/components/table/DataTableSelectionBar.vue.js +7 -0
  67. package/dist/components/table/DataTableSelectionBar.vue2.js +33 -0
  68. package/dist/components/table/DetailSheet.vue.js +1 -1
  69. package/dist/components/table/DetailSheet.vue2.js +160 -187
  70. package/dist/components/table/FieldTypePicker.vue.js +3 -3
  71. package/dist/components/table/MobileListView.vue.js +1 -1
  72. package/dist/components/table/TableColumnManager.vue.js +3 -3
  73. package/dist/components/table/TableDataRow.vue.js +4 -4
  74. package/dist/components/table/TableFilterPanel.vue.js +1 -1
  75. package/dist/components/table/TableGroupRow.vue.js +2 -2
  76. package/dist/components/table/TableHeaderRow.vue.js +3 -3
  77. package/dist/components/table/TableToolbar.vue.js +2 -2
  78. package/dist/components/table/TableToolbar.vue2.js +126 -138
  79. package/dist/components/table/dataTableUtils.d.ts +26 -0
  80. package/dist/components/table/dataTableUtils.js +60 -0
  81. package/dist/composables/databaseDetailWorkspaceUtils.d.ts +59 -0
  82. package/dist/composables/databaseDetailWorkspaceUtils.js +160 -0
  83. package/dist/composables/index.d.ts +5 -0
  84. package/dist/composables/useDataTableDetailSheet.d.ts +47 -0
  85. package/dist/composables/useDataTableDetailSheet.js +58 -0
  86. package/dist/composables/useDataTableLayout.d.ts +16 -0
  87. package/dist/composables/useDataTableLayout.js +38 -0
  88. package/dist/composables/useDataTableSelection.d.ts +41 -0
  89. package/dist/composables/useDataTableSelection.js +73 -0
  90. package/dist/composables/useDatabaseDetailWorkspace.d.ts +67 -0
  91. package/dist/composables/useDatabaseDetailWorkspace.js +150 -0
  92. package/dist/composables/useDatabaseView.d.ts +3 -137
  93. package/dist/composables/useDatabaseWorkspace.d.ts +31 -0
  94. package/dist/composables/useDatabaseWorkspace.js +89 -0
  95. package/dist/composables/useTableToolbarPanels.d.ts +19 -0
  96. package/dist/composables/useTableToolbarPanels.js +53 -0
  97. package/dist/contracts/database.d.ts +252 -0
  98. package/dist/index.d.ts +6 -0
  99. package/dist/index.js +261 -248
  100. package/dist/plugin.d.ts +2 -0
  101. package/dist/plugin.js +10 -261
  102. package/dist/registry/plugin-components.d.ts +291 -0
  103. package/dist/registry/plugin-components.js +114 -0
  104. package/dist/style.css +1 -1
  105. package/dist/types/data-table.d.ts +27 -0
  106. package/dist/types/data-table.js +29 -0
  107. package/package.json +1 -1
@@ -0,0 +1,74 @@
1
+ import { DataRecord, TableColumn, TableSchema, ViewConfig } from '../../types';
2
+ type __VLS_Props = {
3
+ viewType: ViewConfig["viewType"];
4
+ records: DataRecord[];
5
+ schema?: TableSchema | null;
6
+ view: ViewConfig;
7
+ columns: TableColumn[];
8
+ readonly?: boolean;
9
+ enableFieldManagement?: boolean;
10
+ };
11
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
12
+ add: () => any;
13
+ "row-click": (payload: unknown) => any;
14
+ "cell-edit": (payload: {
15
+ rowId: string;
16
+ fieldId: string;
17
+ value: unknown;
18
+ }) => any;
19
+ "row-click-record": (record: DataRecord) => any;
20
+ "schema-add-field": (fieldType: string) => any;
21
+ "schema-rename-field": (payload: {
22
+ fieldId: string;
23
+ newName: string;
24
+ }) => any;
25
+ "schema-change-field-type": (payload: {
26
+ fieldId: string;
27
+ newType: string;
28
+ }) => any;
29
+ "schema-hide-field": (fieldId: string) => any;
30
+ "schema-delete-field": (fieldId: string) => any;
31
+ "schema-duplicate-field": (fieldId: string) => any;
32
+ "card-click": (payload: unknown) => any;
33
+ "add-column": () => any;
34
+ "record-change": (payload: {
35
+ recordId: string;
36
+ startDate?: string;
37
+ endDate?: string;
38
+ }) => any;
39
+ "update:records": (records: DataRecord[]) => any;
40
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
41
+ onAdd?: (() => any) | undefined;
42
+ "onRow-click"?: ((payload: unknown) => any) | undefined;
43
+ "onCell-edit"?: ((payload: {
44
+ rowId: string;
45
+ fieldId: string;
46
+ value: unknown;
47
+ }) => any) | undefined;
48
+ "onRow-click-record"?: ((record: DataRecord) => any) | undefined;
49
+ "onSchema-add-field"?: ((fieldType: string) => any) | undefined;
50
+ "onSchema-rename-field"?: ((payload: {
51
+ fieldId: string;
52
+ newName: string;
53
+ }) => any) | undefined;
54
+ "onSchema-change-field-type"?: ((payload: {
55
+ fieldId: string;
56
+ newType: string;
57
+ }) => any) | undefined;
58
+ "onSchema-hide-field"?: ((fieldId: string) => any) | undefined;
59
+ "onSchema-delete-field"?: ((fieldId: string) => any) | undefined;
60
+ "onSchema-duplicate-field"?: ((fieldId: string) => any) | undefined;
61
+ "onCard-click"?: ((payload: unknown) => any) | undefined;
62
+ "onAdd-column"?: (() => any) | undefined;
63
+ "onRecord-change"?: ((payload: {
64
+ recordId: string;
65
+ startDate?: string;
66
+ endDate?: string;
67
+ }) => any) | undefined;
68
+ "onUpdate:records"?: ((records: DataRecord[]) => any) | undefined;
69
+ }>, {
70
+ readonly: boolean;
71
+ schema: TableSchema | null;
72
+ enableFieldManagement: boolean;
73
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
74
+ export default _default;
@@ -0,0 +1,79 @@
1
+ import { defineComponent as t, openBlock as o, createElementBlock as n, createBlock as l } from "vue";
2
+ import m from "../table/DataTable.vue.js";
3
+ import w from "../kanban/KanbanBoard.vue.js";
4
+ import c from "../gallery/GalleryView.vue.js";
5
+ import v from "../timeline/GanttTimeline.vue.js";
6
+ const f = ["data-view"], p = {
7
+ key: 4,
8
+ class: "of-database-view__detail-anchor"
9
+ }, h = /* @__PURE__ */ t({
10
+ name: "DatabaseViewContent",
11
+ __name: "DatabaseViewContent",
12
+ props: {
13
+ viewType: {},
14
+ records: {},
15
+ schema: { default: null },
16
+ view: {},
17
+ columns: {},
18
+ readonly: { type: Boolean, default: !1 },
19
+ enableFieldManagement: { type: Boolean, default: !1 }
20
+ },
21
+ emits: ["cell-edit", "schema-add-field", "schema-rename-field", "schema-change-field-type", "schema-hide-field", "schema-delete-field", "schema-duplicate-field", "row-click", "row-click-record", "card-click", "add", "add-column", "record-change", "update:records"],
22
+ setup(s, { emit: r }) {
23
+ const i = s, d = r;
24
+ return (u, e) => (o(), n("div", {
25
+ class: "of-database-view__content",
26
+ "data-view": i.viewType
27
+ }, [
28
+ i.viewType === "table" ? (o(), l(m, {
29
+ key: 0,
30
+ class: "of-database-view__view of-database-view__view--table",
31
+ records: i.records,
32
+ schema: i.schema ?? void 0,
33
+ view: i.view,
34
+ columns: i.columns,
35
+ readonly: i.readonly,
36
+ "enable-field-management": i.enableFieldManagement,
37
+ onCellEdit: e[0] || (e[0] = (a) => d("cell-edit", a)),
38
+ onSchemaAddField: e[1] || (e[1] = (a) => d("schema-add-field", a)),
39
+ onSchemaRenameField: e[2] || (e[2] = (a) => d("schema-rename-field", a)),
40
+ onSchemaChangeFieldType: e[3] || (e[3] = (a) => d("schema-change-field-type", a)),
41
+ onSchemaHideField: e[4] || (e[4] = (a) => d("schema-hide-field", a)),
42
+ onSchemaDeleteField: e[5] || (e[5] = (a) => d("schema-delete-field", a)),
43
+ onSchemaDuplicateField: e[6] || (e[6] = (a) => d("schema-duplicate-field", a)),
44
+ onRowClick: e[7] || (e[7] = (a) => d("row-click", a)),
45
+ onRowClickRecord: e[8] || (e[8] = (a) => d("row-click-record", a))
46
+ }, null, 8, ["records", "schema", "view", "columns", "readonly", "enable-field-management"])) : i.viewType === "kanban" ? (o(), l(w, {
47
+ key: 1,
48
+ class: "of-database-view__view of-database-view__view--kanban",
49
+ records: i.records,
50
+ schema: i.schema ?? void 0,
51
+ view: i.view,
52
+ onCardClick: e[9] || (e[9] = (a) => d("card-click", a)),
53
+ "onUpdate:columns": e[10] || (e[10] = () => {
54
+ }),
55
+ onAddColumn: e[11] || (e[11] = (a) => d("add-column"))
56
+ }, null, 8, ["records", "schema", "view"])) : i.viewType === "gallery" ? (o(), l(c, {
57
+ key: 2,
58
+ class: "of-database-view__view of-database-view__view--gallery",
59
+ records: i.records,
60
+ schema: i.schema ?? void 0,
61
+ view: i.view,
62
+ onCardClick: e[12] || (e[12] = (a) => d("card-click", a)),
63
+ onAdd: e[13] || (e[13] = (a) => d("add"))
64
+ }, null, 8, ["records", "schema", "view"])) : i.viewType === "timeline" ? (o(), l(v, {
65
+ key: 3,
66
+ class: "of-database-view__view of-database-view__view--timeline",
67
+ records: i.records,
68
+ schema: i.schema ?? void 0,
69
+ "view-config": i.view,
70
+ onRowClick: e[14] || (e[14] = (a) => d("row-click", a)),
71
+ onRecordChange: e[15] || (e[15] = (a) => d("record-change", a)),
72
+ "onUpdate:records": e[16] || (e[16] = (a) => d("update:records", a))
73
+ }, null, 8, ["records", "schema", "view-config"])) : (o(), n("div", p))
74
+ ], 8, f));
75
+ }
76
+ });
77
+ export {
78
+ h as default
79
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DatabaseViewContent.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,43 @@
1
+ import { DatabaseViewResolvedDetailPresentation } from '../../contracts/database';
2
+ import { DatabaseDetailPropertyItem, DatabaseWorkspaceModeOption } from './databaseViewUtils';
3
+ type __VLS_Props = {
4
+ visible: boolean;
5
+ title: string;
6
+ rowId: string;
7
+ recordId?: string;
8
+ viewType: string;
9
+ description: string;
10
+ presentation: DatabaseViewResolvedDetailPresentation;
11
+ sidePanelWidth: number;
12
+ drawerWidth: number;
13
+ canSwitchPresentation?: boolean;
14
+ workspaceModes?: DatabaseWorkspaceModeOption[];
15
+ propertyItems?: DatabaseDetailPropertyItem[];
16
+ readonly?: boolean;
17
+ hasDraftChanges?: boolean;
18
+ };
19
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
20
+ delete: (rowId: string) => any;
21
+ close: () => any;
22
+ save: () => any;
23
+ commit: (rowId: string, fieldId: string, value: unknown) => any;
24
+ "update:presentation": (value: DatabaseViewResolvedDetailPresentation) => any;
25
+ "update:side-panel-width": (width: number) => any;
26
+ "update:drawer-width": (width: number) => any;
27
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
28
+ onDelete?: ((rowId: string) => any) | undefined;
29
+ onClose?: (() => any) | undefined;
30
+ onSave?: (() => any) | undefined;
31
+ onCommit?: ((rowId: string, fieldId: string, value: unknown) => any) | undefined;
32
+ "onUpdate:presentation"?: ((value: DatabaseViewResolvedDetailPresentation) => any) | undefined;
33
+ "onUpdate:side-panel-width"?: ((width: number) => any) | undefined;
34
+ "onUpdate:drawer-width"?: ((width: number) => any) | undefined;
35
+ }>, {
36
+ readonly: boolean;
37
+ recordId: string;
38
+ canSwitchPresentation: boolean;
39
+ workspaceModes: DatabaseWorkspaceModeOption[];
40
+ propertyItems: DatabaseDetailPropertyItem[];
41
+ hasDraftChanges: boolean;
42
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
43
+ export default _default;
@@ -0,0 +1,59 @@
1
+ import { defineComponent as l, openBlock as w, createBlock as m, createCommentVNode as f } from "vue";
2
+ import u from "./DatabaseDetailPresenter.vue.js";
3
+ const y = /* @__PURE__ */ l({
4
+ name: "DatabaseViewDetailHost",
5
+ __name: "DatabaseViewDetailHost",
6
+ props: {
7
+ visible: { type: Boolean },
8
+ title: {},
9
+ rowId: {},
10
+ recordId: { default: "" },
11
+ viewType: {},
12
+ description: {},
13
+ presentation: {},
14
+ sidePanelWidth: {},
15
+ drawerWidth: {},
16
+ canSwitchPresentation: { type: Boolean, default: !1 },
17
+ workspaceModes: { default: () => [] },
18
+ propertyItems: { default: () => [] },
19
+ readonly: { type: Boolean, default: !1 },
20
+ hasDraftChanges: { type: Boolean, default: !1 }
21
+ },
22
+ emits: ["commit", "save", "delete", "close", "update:side-panel-width", "update:drawer-width", "update:presentation"],
23
+ setup(n, { emit: r }) {
24
+ const e = n, i = r;
25
+ function d(o) {
26
+ if (e.presentation === "side-panel") {
27
+ i("update:side-panel-width", o);
28
+ return;
29
+ }
30
+ i("update:drawer-width", o);
31
+ }
32
+ return (o, t) => e.visible ? (w(), m(u, {
33
+ key: 0,
34
+ visible: e.visible,
35
+ title: e.title,
36
+ "row-id": e.rowId,
37
+ "record-id": e.recordId,
38
+ "view-type": e.viewType,
39
+ description: e.description,
40
+ presentation: e.presentation,
41
+ "side-panel-width": e.sidePanelWidth,
42
+ "drawer-width": e.drawerWidth,
43
+ "can-switch-presentation": e.canSwitchPresentation,
44
+ "workspace-modes": e.workspaceModes,
45
+ "property-items": e.propertyItems,
46
+ readonly: e.readonly,
47
+ "has-draft-changes": e.hasDraftChanges,
48
+ onCommit: t[0] || (t[0] = (a, s, p) => i("commit", a, s, p)),
49
+ onSave: t[1] || (t[1] = (a) => i("save")),
50
+ onDelete: t[2] || (t[2] = (a) => i("delete", a)),
51
+ onClose: t[3] || (t[3] = (a) => i("close")),
52
+ "onUpdate:width": d,
53
+ "onUpdate:presentation": t[4] || (t[4] = (a) => i("update:presentation", a))
54
+ }, 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"])) : f("", !0);
55
+ }
56
+ });
57
+ export {
58
+ y as default
59
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DatabaseViewDetailHost.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,35 @@
1
+ import { Component } from 'vue';
2
+ import { EmptyStateAction } from '../base/EmptyState.vue';
3
+ type __VLS_Props = {
4
+ state: "loading" | "error" | "empty" | "normal";
5
+ loadingTitle: string;
6
+ loadingDescription: string;
7
+ errorTitle: string;
8
+ errorDescription: string;
9
+ errorIcon: Component;
10
+ emptyIcon: Component;
11
+ emptyTitle: string;
12
+ emptyDescription: string;
13
+ emptyAction?: EmptyStateAction;
14
+ };
15
+ declare function __VLS_template(): {
16
+ attrs: Partial<{}>;
17
+ slots: {
18
+ toolbar?(_: {}): any;
19
+ content?(_: {}): any;
20
+ detail?(_: {}): any;
21
+ };
22
+ refs: {};
23
+ rootEl: any;
24
+ };
25
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
26
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
27
+ emptyAction: EmptyStateAction;
28
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
29
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
30
+ export default _default;
31
+ type __VLS_WithTemplateSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,7 @@
1
+ import e from "./DatabaseViewShell.vue2.js";
2
+ /* empty css */
3
+ import a from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ a(e, [["__scopeId", "data-v-8eae2f2e"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,71 @@
1
+ import { defineComponent as c, openBlock as t, createElementBlock as a, mergeProps as p, createVNode as i, unref as _, createElementVNode as s, toDisplayString as n, Fragment as m, renderSlot as r } from "vue";
2
+ import { Loader2 as v } from "lucide-vue-next";
3
+ import d from "../base/EmptyState.vue.js";
4
+ const f = {
5
+ key: 0,
6
+ class: "of-database-view__state of-database-view__state--loading",
7
+ "data-role": "loading-state"
8
+ }, y = { class: "of-database-view__state-text" }, b = { class: "of-database-view__state-title" }, w = { class: "of-database-view__state-description" }, u = {
9
+ key: 1,
10
+ class: "of-database-view__state",
11
+ "data-role": "error-state"
12
+ }, h = {
13
+ key: 0,
14
+ class: "of-database-view__state of-database-view__state--empty",
15
+ "data-role": "empty-state"
16
+ }, S = /* @__PURE__ */ c({
17
+ name: "DatabaseViewShell",
18
+ inheritAttrs: !1,
19
+ __name: "DatabaseViewShell",
20
+ props: {
21
+ state: {},
22
+ loadingTitle: {},
23
+ loadingDescription: {},
24
+ errorTitle: {},
25
+ errorDescription: {},
26
+ errorIcon: {},
27
+ emptyIcon: {},
28
+ emptyTitle: {},
29
+ emptyDescription: {},
30
+ emptyAction: { default: void 0 }
31
+ },
32
+ setup(l) {
33
+ const e = l;
34
+ return (o, g) => (t(), a("section", p({
35
+ class: "of-database-view",
36
+ "data-role": "database-view"
37
+ }, o.$attrs), [
38
+ e.state === "loading" ? (t(), a("div", f, [
39
+ i(_(v), {
40
+ class: "of-database-view__spinner",
41
+ size: 20,
42
+ "aria-hidden": "true"
43
+ }),
44
+ s("div", y, [
45
+ s("div", b, n(e.loadingTitle), 1),
46
+ s("div", w, n(e.loadingDescription), 1)
47
+ ])
48
+ ])) : e.state === "error" ? (t(), a("div", u, [
49
+ i(d, {
50
+ icon: e.errorIcon,
51
+ title: e.errorTitle,
52
+ description: e.errorDescription
53
+ }, null, 8, ["icon", "title", "description"])
54
+ ])) : (t(), a(m, { key: 2 }, [
55
+ r(o.$slots, "toolbar", {}, void 0, !0),
56
+ e.state === "empty" ? (t(), a("div", h, [
57
+ i(d, {
58
+ icon: e.emptyIcon,
59
+ title: e.emptyTitle,
60
+ description: e.emptyDescription,
61
+ action: e.emptyAction
62
+ }, null, 8, ["icon", "title", "description", "action"])
63
+ ])) : r(o.$slots, "content", { key: 1 }, void 0, !0)
64
+ ], 64)),
65
+ r(o.$slots, "detail", {}, void 0, !0)
66
+ ], 16));
67
+ }
68
+ });
69
+ export {
70
+ S as default
71
+ };
@@ -0,0 +1,77 @@
1
+ import { TableColumn } from '../../types';
2
+ import { FilterCondition, FilterLogic } from '../../composables/useTableFilter';
3
+ import { ViewSwitcherTab } from '../table/TableToolbar.vue';
4
+ type __VLS_Props = {
5
+ currentView?: string;
6
+ viewTabs?: ViewSwitcherTab[];
7
+ columns: TableColumn[];
8
+ filterConditions?: readonly FilterCondition[];
9
+ filterLogic?: FilterLogic;
10
+ filterActive?: boolean;
11
+ currentSort?: {
12
+ field: string | null;
13
+ order: "asc" | "desc" | null;
14
+ };
15
+ currentGroup?: string;
16
+ searchKeyword?: string;
17
+ showViewSwitch?: boolean;
18
+ showFilter?: boolean;
19
+ showSort?: boolean;
20
+ showGroup?: boolean;
21
+ showColumns?: boolean;
22
+ showSearch?: boolean;
23
+ savedViews?: {
24
+ id: string;
25
+ name: string;
26
+ }[];
27
+ };
28
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
29
+ sort: (field: string) => any;
30
+ group: (field: string | null) => any;
31
+ "update:columns": (columns: TableColumn[]) => any;
32
+ "update:currentView": (view: string) => any;
33
+ "update:searchKeyword": (keyword: string) => any;
34
+ "add-filter": () => any;
35
+ "remove-filter": (id: string) => any;
36
+ "update-filter": (id: string, update: Partial<FilterCondition>) => any;
37
+ "clear-filters": () => any;
38
+ "update:filterLogic": (logic: FilterLogic) => any;
39
+ "save-view": (name: string) => any;
40
+ "load-view": (viewId: string) => any;
41
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
42
+ onSort?: ((field: string) => any) | undefined;
43
+ onGroup?: ((field: string | null) => any) | undefined;
44
+ "onUpdate:columns"?: ((columns: TableColumn[]) => any) | undefined;
45
+ "onUpdate:currentView"?: ((view: string) => any) | undefined;
46
+ "onUpdate:searchKeyword"?: ((keyword: string) => any) | undefined;
47
+ "onAdd-filter"?: (() => any) | undefined;
48
+ "onRemove-filter"?: ((id: string) => any) | undefined;
49
+ "onUpdate-filter"?: ((id: string, update: Partial<FilterCondition>) => any) | undefined;
50
+ "onClear-filters"?: (() => any) | undefined;
51
+ "onUpdate:filterLogic"?: ((logic: FilterLogic) => any) | undefined;
52
+ "onSave-view"?: ((name: string) => any) | undefined;
53
+ "onLoad-view"?: ((viewId: string) => any) | undefined;
54
+ }>, {
55
+ showFilter: boolean;
56
+ showGroup: boolean;
57
+ showSort: boolean;
58
+ showSearch: boolean;
59
+ currentView: string;
60
+ viewTabs: ViewSwitcherTab[];
61
+ filterConditions: readonly FilterCondition[];
62
+ filterLogic: FilterLogic;
63
+ filterActive: boolean;
64
+ currentSort: {
65
+ field: string | null;
66
+ order: "asc" | "desc" | null;
67
+ };
68
+ currentGroup: string;
69
+ searchKeyword: string;
70
+ showViewSwitch: boolean;
71
+ showColumns: boolean;
72
+ savedViews: {
73
+ id: string;
74
+ name: string;
75
+ }[];
76
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
77
+ export default _default;
@@ -0,0 +1,62 @@
1
+ import { defineComponent as u, openBlock as a, createBlock as n } from "vue";
2
+ import d from "../table/TableToolbar.vue.js";
3
+ const v = /* @__PURE__ */ u({
4
+ name: "DatabaseViewToolbar",
5
+ __name: "DatabaseViewToolbar",
6
+ props: {
7
+ currentView: { default: "table" },
8
+ viewTabs: { default: void 0 },
9
+ columns: {},
10
+ filterConditions: { default: void 0 },
11
+ filterLogic: { default: "and" },
12
+ filterActive: { type: Boolean, default: !1 },
13
+ currentSort: { default: void 0 },
14
+ currentGroup: { default: void 0 },
15
+ searchKeyword: { default: "" },
16
+ showViewSwitch: { type: Boolean, default: !0 },
17
+ showFilter: { type: Boolean, default: !0 },
18
+ showSort: { type: Boolean, default: !0 },
19
+ showGroup: { type: Boolean, default: !0 },
20
+ showColumns: { type: Boolean, default: !0 },
21
+ showSearch: { type: Boolean, default: !0 },
22
+ savedViews: { default: void 0 }
23
+ },
24
+ emits: ["update:currentView", "update:columns", "update:searchKeyword", "add-filter", "remove-filter", "update-filter", "clear-filters", "update:filterLogic", "sort", "group", "save-view", "load-view"],
25
+ setup(i, { emit: s }) {
26
+ const t = i, r = s;
27
+ return (w, e) => (a(), n(d, {
28
+ class: "of-database-view__toolbar",
29
+ "current-view": t.currentView,
30
+ "view-tabs": t.viewTabs,
31
+ columns: t.columns,
32
+ "filter-conditions": t.filterConditions,
33
+ "filter-logic": t.filterLogic,
34
+ "filter-active": t.filterActive,
35
+ "current-sort": t.currentSort,
36
+ "current-group": t.currentGroup,
37
+ "search-keyword": t.searchKeyword,
38
+ "show-view-switch": t.showViewSwitch,
39
+ "show-filter": t.showFilter,
40
+ "show-sort": t.showSort,
41
+ "show-group": t.showGroup,
42
+ "show-columns": t.showColumns,
43
+ "show-search": t.showSearch,
44
+ "saved-views": t.savedViews,
45
+ "onUpdate:currentView": e[0] || (e[0] = (o) => r("update:currentView", o)),
46
+ "onUpdate:columns": e[1] || (e[1] = (o) => r("update:columns", o)),
47
+ "onUpdate:searchKeyword": e[2] || (e[2] = (o) => r("update:searchKeyword", o)),
48
+ onAddFilter: e[3] || (e[3] = (o) => r("add-filter")),
49
+ onRemoveFilter: e[4] || (e[4] = (o) => r("remove-filter", o)),
50
+ onUpdateFilter: e[5] || (e[5] = (o, l) => r("update-filter", o, l)),
51
+ onClearFilters: e[6] || (e[6] = (o) => r("clear-filters")),
52
+ "onUpdate:filterLogic": e[7] || (e[7] = (o) => r("update:filterLogic", o)),
53
+ onSort: e[8] || (e[8] = (o) => r("sort", o)),
54
+ onGroup: e[9] || (e[9] = (o) => r("group", o)),
55
+ onSaveView: e[10] || (e[10] = (o) => r("save-view", o)),
56
+ onLoadView: e[11] || (e[11] = (o) => r("load-view", o))
57
+ }, 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"]));
58
+ }
59
+ });
60
+ export {
61
+ v as default
62
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DatabaseViewToolbar.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,91 @@
1
+ import { FieldDef as CellFieldDef } from '../table/FieldCell.vue';
2
+ import { DatabaseViewDetailPresentation, DatabaseViewResolvedDetailPresentation, DatabaseViewViewTab } from '../../contracts/database';
3
+ import { FilterCondition as ToolbarFilterCondition, FilterLogic } from '../../composables/useTableFilter';
4
+ import { CellValue, DataRecord, FieldDef as SchemaFieldDef, TableColumn, TableSchema, ViewConfig } from '../../types';
5
+ export interface DatabaseViewListItem {
6
+ id: string;
7
+ name: string;
8
+ type: ViewConfig["viewType"];
9
+ }
10
+ export interface DatabaseViewCurrentSort {
11
+ field: string | null;
12
+ order: "asc" | "desc" | null;
13
+ }
14
+ export interface DatabaseWorkspaceModeOption {
15
+ value: DatabaseViewResolvedDetailPresentation;
16
+ label: string;
17
+ }
18
+ export interface DatabaseDetailPropertyItem {
19
+ key: string;
20
+ label: string;
21
+ field: CellFieldDef | null;
22
+ value: CellValue | undefined;
23
+ fallbackText: string;
24
+ }
25
+ export declare function cloneView(view: ViewConfig): ViewConfig;
26
+ export declare function inferFieldIdsFromRecords(records: DataRecord[]): string[];
27
+ export declare function getViewTypeIcon(viewType: ViewConfig["viewType"]): string;
28
+ export declare function buildDatabaseViewTabs(options: {
29
+ providedTabs?: DatabaseViewViewTab[];
30
+ viewList: DatabaseViewListItem[];
31
+ detailViewId: string;
32
+ }): DatabaseViewViewTab[];
33
+ export declare function getVisibleFieldIds(schema?: TableSchema | null, records?: DataRecord[]): string[];
34
+ export declare function buildFallbackView(schema?: TableSchema | null, records?: DataRecord[]): ViewConfig;
35
+ export declare function buildVirtualDetailView(detailViewId: string, schema?: TableSchema | null, records?: DataRecord[]): ViewConfig;
36
+ export declare function getFieldLabel(fieldId: string, schema?: TableSchema | null): string;
37
+ export declare function resolveColumnType(field?: SchemaFieldDef): TableColumn["type"];
38
+ export declare function resolveCellFieldType(field?: SchemaFieldDef): CellFieldDef["type"];
39
+ export declare function buildTableColumns(view: ViewConfig, schema?: TableSchema | null, records?: DataRecord[]): {
40
+ key: string;
41
+ label: string;
42
+ type: "string" | "number" | "date" | "status" | "priority" | undefined;
43
+ hidden: boolean;
44
+ width: number | undefined;
45
+ }[];
46
+ export declare function buildDetailColumns(schema?: TableSchema | null, records?: DataRecord[]): {
47
+ key: string;
48
+ label: string;
49
+ type: "string" | "number" | "date" | "status" | "priority" | undefined;
50
+ hidden: boolean;
51
+ width: number | undefined;
52
+ }[];
53
+ export declare function buildDetailFieldDefs(schema?: TableSchema | null, records?: DataRecord[]): {
54
+ id: string;
55
+ type: import('../table').FieldType;
56
+ label: string;
57
+ }[];
58
+ export declare function normalizeCellValue(value: CellValue | undefined): string;
59
+ export declare function compareCellValues(a: CellValue | undefined, b: CellValue | undefined): number;
60
+ export declare function evaluateFilterCondition(value: CellValue | undefined, condition: ToolbarFilterCondition): boolean;
61
+ export declare function buildEmptyFilter(fieldId: string): ToolbarFilterCondition;
62
+ export declare function convertViewFiltersToToolbarFilters(filters?: ViewConfig["filters"]): ToolbarFilterCondition[];
63
+ export declare function convertToolbarFiltersToViewFilters(filters: ToolbarFilterCondition[]): NonNullable<ViewConfig["filters"]>;
64
+ export declare function toDetailRow(record: DataRecord | null): Record<string, unknown> & {
65
+ id: string;
66
+ };
67
+ export declare function buildRenderedRecords(options: {
68
+ records: DataRecord[];
69
+ searchKeyword: string;
70
+ visibleFieldIds: string[];
71
+ filterConditions: ToolbarFilterCondition[];
72
+ filterLogic: FilterLogic;
73
+ sort: DatabaseViewCurrentSort;
74
+ }): DataRecord[];
75
+ export declare function buildDetailWorkspaceTitle(record: DataRecord | null): string;
76
+ export declare function partitionDetailColumns(columns: TableColumn[], fieldDefs: CellFieldDef[]): {
77
+ propertyColumns: TableColumn[];
78
+ contentColumns: TableColumn[];
79
+ };
80
+ export declare function buildDetailWorkspaceDescription(columns: TableColumn[], row: Record<string, unknown>): string;
81
+ export declare function buildDetailPropertyItems(options: {
82
+ columns: TableColumn[];
83
+ fieldDefs: CellFieldDef[];
84
+ row: Record<string, unknown>;
85
+ }): DatabaseDetailPropertyItem[];
86
+ export declare function resolveDetailPresentation(options: {
87
+ requested: DatabaseViewDetailPresentation;
88
+ preferred: DatabaseViewResolvedDetailPresentation | null;
89
+ isMobileViewport: boolean;
90
+ }): DatabaseViewResolvedDetailPresentation;
91
+ export declare function buildWorkspaceModes(isMobileViewport: boolean): DatabaseWorkspaceModeOption[];