@oneflowui/ui 0.8.1 → 0.8.2

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,65 @@
1
+ import { defineComponent as m, openBlock as y, createElementBlock as b, normalizeStyle as p, normalizeClass as v, renderSlot as n, normalizeProps as s, guardReactiveProps as r, createElementVNode as R } from "vue";
2
+ const h = { class: "of-data-table-desktop-frame__standard-body" }, w = /* @__PURE__ */ m({
3
+ name: "DataTableDesktopStandardRegion",
4
+ __name: "DataTableDesktopStandardRegion",
5
+ props: {
6
+ containerClass: { type: [Boolean, null, String, Object, Array], default: void 0 },
7
+ containerStyle: { default: void 0 },
8
+ columns: { default: () => [] },
9
+ allColumns: { default: () => [] },
10
+ selectable: { type: Boolean, default: !0 },
11
+ showRowActions: { type: Boolean, default: !0 },
12
+ useVirtual: { type: Boolean, default: !1 },
13
+ totalHeight: { default: 0 },
14
+ offsetY: { default: 0 },
15
+ resolveRowId: { type: Function, default: void 0 },
16
+ setContainerRef: { type: Function, default: void 0 }
17
+ },
18
+ emits: ["scroll"],
19
+ setup(o, { emit: i }) {
20
+ const t = o, d = i;
21
+ function u(e) {
22
+ if (e instanceof HTMLElement)
23
+ return e;
24
+ if (e && "$el" in e) {
25
+ const l = e.$el;
26
+ return l instanceof HTMLElement ? l : null;
27
+ }
28
+ return null;
29
+ }
30
+ function f(e) {
31
+ var l;
32
+ (l = t.setContainerRef) == null || l.call(t, u(e));
33
+ }
34
+ function c(e) {
35
+ d("scroll", e);
36
+ }
37
+ function a() {
38
+ return {
39
+ branch: "standard",
40
+ columns: t.columns,
41
+ allColumns: t.allColumns,
42
+ selectable: t.selectable,
43
+ showRowActions: t.showRowActions,
44
+ useVirtual: t.useVirtual,
45
+ totalHeight: t.totalHeight,
46
+ offsetY: t.offsetY,
47
+ resolveRowId: t.resolveRowId
48
+ };
49
+ }
50
+ return (e, l) => (y(), b("div", {
51
+ ref: f,
52
+ class: v(["of-data-table-scroll-container of-data-table-desktop-frame__standard", o.containerClass]),
53
+ style: p([o.containerStyle]),
54
+ onScroll: c
55
+ }, [
56
+ n(e.$slots, "header", s(r(a())), void 0, !0),
57
+ R("div", h, [
58
+ n(e.$slots, "body", s(r(a())), void 0, !0)
59
+ ])
60
+ ], 38));
61
+ }
62
+ });
63
+ export {
64
+ w as default
65
+ };
@@ -0,0 +1,11 @@
1
+ type __VLS_Props = {
2
+ draftCount: number;
3
+ };
4
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
5
+ "commit-all": () => any;
6
+ "discard-all": () => any;
7
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onCommit-all"?: (() => any) | undefined;
9
+ "onDiscard-all"?: (() => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import a from "./DataTableDraftToolbar.vue2.js";
2
+ /* empty css */
3
+ import o from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ o(a, [["__scopeId", "data-v-f76e6a0e"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,25 @@
1
+ import { defineComponent as r, openBlock as s, createElementBlock as f, createElementVNode as a, toDisplayString as i } from "vue";
2
+ const c = { class: "of-data-table-draft-toolbar" }, m = { class: "of-data-table-draft-count" }, u = /* @__PURE__ */ r({
3
+ __name: "DataTableDraftToolbar",
4
+ props: {
5
+ draftCount: {}
6
+ },
7
+ emits: ["commit-all", "discard-all"],
8
+ setup(e, { emit: n }) {
9
+ const l = e, o = n;
10
+ return (b, t) => (s(), f("div", c, [
11
+ a("span", m, i(l.draftCount) + " 条草稿", 1),
12
+ a("button", {
13
+ class: "of-data-table-draft-btn of-data-table-draft-btn--commit",
14
+ onClick: t[0] || (t[0] = (d) => o("commit-all"))
15
+ }, " 全部提交 "),
16
+ a("button", {
17
+ class: "of-data-table-draft-btn of-data-table-draft-btn--discard",
18
+ onClick: t[1] || (t[1] = (d) => o("discard-all"))
19
+ }, " 全部放弃 ")
20
+ ]));
21
+ }
22
+ });
23
+ export {
24
+ u as default
25
+ };
@@ -0,0 +1,79 @@
1
+ import { CSSProperties } from 'vue';
2
+ import { FieldDef as CellFieldDef } from './FieldCell.vue';
3
+ import { ColorMap, TableColumn } from '../../types';
4
+ type TableRowRecord = Record<string, unknown> & {
5
+ id: string;
6
+ };
7
+ type __VLS_Props = {
8
+ rows: TableRowRecord[];
9
+ columns: TableColumn[];
10
+ fieldDefs?: CellFieldDef[];
11
+ selectable?: boolean;
12
+ addable?: boolean;
13
+ statusColorMap?: ColorMap;
14
+ readonly?: boolean;
15
+ densityClass?: string;
16
+ densityStyle?: CSSProperties;
17
+ detailVisible?: boolean;
18
+ detailRow?: TableRowRecord | null;
19
+ };
20
+ declare function __VLS_template(): {
21
+ attrs: Partial<{}>;
22
+ slots: {
23
+ cell?(_: {
24
+ row: Record<string, unknown> & {
25
+ id: string;
26
+ };
27
+ col: TableColumn;
28
+ }): any;
29
+ };
30
+ refs: {};
31
+ rootEl: HTMLDivElement;
32
+ };
33
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
34
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
35
+ "row-click": (row: TableRowRecord) => any;
36
+ "add-row": () => any;
37
+ "cell-edit": (payload: {
38
+ rowId: string;
39
+ fieldId: string;
40
+ value: unknown;
41
+ }) => any;
42
+ "close-detail": () => any;
43
+ "detail-save": (payload: {
44
+ rowId: string;
45
+ fields: Record<string, unknown>;
46
+ }) => any;
47
+ "row-delete": (rowId: string) => any;
48
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
49
+ "onRow-click"?: ((row: TableRowRecord) => any) | undefined;
50
+ "onAdd-row"?: (() => any) | undefined;
51
+ "onCell-edit"?: ((payload: {
52
+ rowId: string;
53
+ fieldId: string;
54
+ value: unknown;
55
+ }) => any) | undefined;
56
+ "onClose-detail"?: (() => any) | undefined;
57
+ "onDetail-save"?: ((payload: {
58
+ rowId: string;
59
+ fields: Record<string, unknown>;
60
+ }) => any) | undefined;
61
+ "onRow-delete"?: ((rowId: string) => any) | undefined;
62
+ }>, {
63
+ selectable: boolean;
64
+ statusColorMap: ColorMap;
65
+ addable: boolean;
66
+ readonly: boolean;
67
+ fieldDefs: CellFieldDef[];
68
+ densityClass: string;
69
+ densityStyle: CSSProperties;
70
+ detailVisible: boolean;
71
+ detailRow: TableRowRecord | null;
72
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
73
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
74
+ export default _default;
75
+ type __VLS_WithTemplateSlots<T, S> = T & {
76
+ new (): {
77
+ $slots: S;
78
+ };
79
+ };
@@ -0,0 +1,60 @@
1
+ import { defineComponent as n, openBlock as a, createElementBlock as r, normalizeStyle as u, normalizeClass as m, createVNode as f, createSlots as p, withCtx as w, renderSlot as y, normalizeProps as c, guardReactiveProps as b, createBlock as v, createCommentVNode as C } from "vue";
2
+ import k from "./MobileListView.vue.js";
3
+ import B from "./DetailSheet.vue.js";
4
+ const V = /* @__PURE__ */ n({
5
+ __name: "DataTableMobilePanel",
6
+ props: {
7
+ rows: {},
8
+ columns: {},
9
+ fieldDefs: { default: () => [] },
10
+ selectable: { type: Boolean, default: !0 },
11
+ addable: { type: Boolean, default: !0 },
12
+ statusColorMap: { default: void 0 },
13
+ readonly: { type: Boolean, default: !1 },
14
+ densityClass: { default: "" },
15
+ densityStyle: { default: void 0 },
16
+ detailVisible: { type: Boolean, default: !1 },
17
+ detailRow: { default: null }
18
+ },
19
+ emits: ["row-click", "add-row", "close-detail", "detail-save", "row-delete", "cell-edit"],
20
+ setup(d, { emit: i }) {
21
+ const e = d, t = i;
22
+ return (s, l) => (a(), r("div", {
23
+ class: m(e.densityClass),
24
+ style: u(e.densityStyle)
25
+ }, [
26
+ f(k, {
27
+ rows: e.rows,
28
+ columns: e.columns,
29
+ selectable: e.selectable,
30
+ addable: e.addable,
31
+ "status-color-map": e.statusColorMap,
32
+ readonly: e.readonly,
33
+ onRowClick: l[0] || (l[0] = (o) => t("row-click", o)),
34
+ onAddRow: l[1] || (l[1] = (o) => t("add-row"))
35
+ }, p({ _: 2 }, [
36
+ s.$slots.cell ? {
37
+ name: "cell",
38
+ fn: w((o) => [
39
+ y(s.$slots, "cell", c(b(o)))
40
+ ]),
41
+ key: "0"
42
+ } : void 0
43
+ ]), 1032, ["rows", "columns", "selectable", "addable", "status-color-map", "readonly"]),
44
+ e.detailRow ? (a(), v(B, {
45
+ key: 0,
46
+ row: e.detailRow,
47
+ columns: e.columns,
48
+ "field-defs": e.fieldDefs,
49
+ visible: e.detailVisible,
50
+ onClose: l[2] || (l[2] = (o) => t("close-detail")),
51
+ onSave: l[3] || (l[3] = (o) => t("detail-save", o)),
52
+ onDelete: l[4] || (l[4] = (o) => t("row-delete", o)),
53
+ onCellEdit: l[5] || (l[5] = (o) => t("cell-edit", o))
54
+ }, null, 8, ["row", "columns", "field-defs", "visible"])) : C("", !0)
55
+ ], 6));
56
+ }
57
+ });
58
+ export {
59
+ V as default
60
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./DataTableMobilePanel.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,11 @@
1
+ import { ResolvedBulkActionItem } from '../../types/data-table';
2
+ type __VLS_Props = {
3
+ selectionCount: number;
4
+ items: ResolvedBulkActionItem[];
5
+ };
6
+ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ action: (action: ResolvedBulkActionItem) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onAction?: ((action: ResolvedBulkActionItem) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
11
+ export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./DataTableSelectionBar.vue2.js";
2
+ /* empty css */
3
+ import t from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-90228d0f"]]);
5
+ export {
6
+ f as default
7
+ };
@@ -0,0 +1,33 @@
1
+ import { defineComponent as c, openBlock as a, createElementBlock as s, createElementVNode as t, toDisplayString as l, Fragment as d, renderList as b, normalizeClass as _ } from "vue";
2
+ const m = {
3
+ class: "of-data-table-selection-bar",
4
+ "data-role": "selection-bar"
5
+ }, u = { class: "of-data-table-selection-bar__summary" }, f = { class: "of-data-table-selection-bar__count" }, p = { class: "of-data-table-selection-bar__actions" }, v = ["disabled", "onClick"], g = /* @__PURE__ */ c({
6
+ __name: "DataTableSelectionBar",
7
+ props: {
8
+ selectionCount: {},
9
+ items: {}
10
+ },
11
+ emits: ["action"],
12
+ setup(o, { emit: i }) {
13
+ const r = i;
14
+ return (k, n) => (a(), s("div", m, [
15
+ t("div", u, [
16
+ t("span", f, l(o.selectionCount), 1),
17
+ n[0] || (n[0] = t("span", { class: "of-data-table-selection-bar__text" }, "条记录已选中", -1))
18
+ ]),
19
+ t("div", p, [
20
+ (a(!0), s(d, null, b(o.items, (e) => (a(), s("button", {
21
+ key: e.key,
22
+ type: "button",
23
+ class: _(["of-data-table-selection-bar__btn", { "of-data-table-selection-bar__btn--danger": e.variant === "danger" }]),
24
+ disabled: e.resolvedDisabled,
25
+ onClick: (C) => r("action", e)
26
+ }, l(e.resolvedLabel), 11, v))), 128))
27
+ ])
28
+ ]));
29
+ }
30
+ });
31
+ export {
32
+ g as default
33
+ };
@@ -1,7 +1,7 @@
1
1
  import t from "./DetailSheet.vue2.js";
2
2
  /* empty css */
3
3
  import o from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53b37775"]]);
4
+ const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-3245718b"]]);
5
5
  export {
6
6
  m as default
7
7
  };