@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.
- package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue2.js +9 -9
- package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
- package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
- package/dist/components/Dashboard/charts/PieChart.vue2.js +3 -3
- package/dist/components/Dashboard/charts/TableChart.vue.js +2 -2
- package/dist/components/Dashboard/index.vue.js +2 -2
- package/dist/components/base/InfoCard.vue.js +1 -1
- package/dist/components/base/InfoCard.vue2.js +40 -40
- package/dist/components/base/StatisticCard.vue.js +3 -3
- package/dist/components/base/StatusSummary.vue.js +1 -1
- package/dist/components/base/StatusSummary.vue2.js +5 -5
- package/dist/components/database/DatabaseDetailPresenter.vue.d.ts +41 -0
- package/dist/components/database/DatabaseDetailPresenter.vue.js +76 -0
- package/dist/components/database/DatabaseDetailPresenter.vue2.js +4 -0
- package/dist/components/database/DatabaseDetailWorkspace.vue.d.ts +37 -0
- package/dist/components/database/DatabaseDetailWorkspace.vue.js +7 -0
- package/dist/components/database/DatabaseDetailWorkspace.vue2.js +103 -0
- package/dist/components/database/DatabaseView.vue.d.ts +13 -76
- package/dist/components/database/DatabaseView.vue.js +2 -2
- package/dist/components/database/DatabaseView.vue2.js +322 -921
- package/dist/components/database/DatabaseViewContent.vue.d.ts +74 -0
- package/dist/components/database/DatabaseViewContent.vue.js +79 -0
- package/dist/components/database/DatabaseViewContent.vue2.js +4 -0
- package/dist/components/database/DatabaseViewDetailHost.vue.d.ts +43 -0
- package/dist/components/database/DatabaseViewDetailHost.vue.js +59 -0
- package/dist/components/database/DatabaseViewDetailHost.vue2.js +4 -0
- package/dist/components/database/DatabaseViewShell.vue.d.ts +35 -0
- package/dist/components/database/DatabaseViewShell.vue.js +7 -0
- package/dist/components/database/DatabaseViewShell.vue2.js +71 -0
- package/dist/components/database/DatabaseViewToolbar.vue.d.ts +77 -0
- package/dist/components/database/DatabaseViewToolbar.vue.js +62 -0
- package/dist/components/database/DatabaseViewToolbar.vue2.js +4 -0
- package/dist/components/database/databaseViewUtils.d.ts +91 -0
- package/dist/components/database/databaseViewUtils.js +266 -0
- package/dist/components/database/index.d.ts +1 -1
- package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -2
- package/dist/components/layout/AppLayout.vue.js +1 -1
- package/dist/components/layout/Navbar.vue.js +1 -1
- package/dist/components/layout/Sidebar.vue.js +2 -2
- package/dist/components/layout/StatusBar.vue.js +2 -2
- package/dist/components/overlay/Dialog.vue.d.ts +1 -1
- package/dist/components/table/ColumnHeaderMenu.vue.js +3 -3
- package/dist/components/table/DataTable.vue.d.ts +6 -17
- package/dist/components/table/DataTable.vue.js +2 -2
- package/dist/components/table/DataTable.vue2.js +781 -872
- package/dist/components/table/DataTableDesktopFixedRegion.vue.d.ts +56 -0
- package/dist/components/table/DataTableDesktopFixedRegion.vue.js +7 -0
- package/dist/components/table/DataTableDesktopFixedRegion.vue2.js +67 -0
- package/dist/components/table/DataTableDesktopFrame.vue.d.ts +127 -0
- package/dist/components/table/DataTableDesktopFrame.vue.js +7 -0
- package/dist/components/table/DataTableDesktopFrame.vue2.js +196 -0
- package/dist/components/table/DataTableDesktopScrollRegion.vue.d.ts +55 -0
- package/dist/components/table/DataTableDesktopScrollRegion.vue.js +7 -0
- package/dist/components/table/DataTableDesktopScrollRegion.vue2.js +66 -0
- package/dist/components/table/DataTableDesktopStandardRegion.vue.d.ts +54 -0
- package/dist/components/table/DataTableDesktopStandardRegion.vue.js +7 -0
- package/dist/components/table/DataTableDesktopStandardRegion.vue2.js +65 -0
- package/dist/components/table/DataTableDraftToolbar.vue.d.ts +11 -0
- package/dist/components/table/DataTableDraftToolbar.vue.js +7 -0
- package/dist/components/table/DataTableDraftToolbar.vue2.js +25 -0
- package/dist/components/table/DataTableMobilePanel.vue.d.ts +79 -0
- package/dist/components/table/DataTableMobilePanel.vue.js +60 -0
- package/dist/components/table/DataTableMobilePanel.vue2.js +4 -0
- package/dist/components/table/DataTableSelectionBar.vue.d.ts +11 -0
- package/dist/components/table/DataTableSelectionBar.vue.js +7 -0
- package/dist/components/table/DataTableSelectionBar.vue2.js +33 -0
- package/dist/components/table/DetailSheet.vue.js +1 -1
- package/dist/components/table/DetailSheet.vue2.js +160 -187
- package/dist/components/table/FieldTypePicker.vue.js +3 -3
- package/dist/components/table/MobileListView.vue.js +1 -1
- package/dist/components/table/TableColumnManager.vue.js +3 -3
- package/dist/components/table/TableDataRow.vue.js +4 -4
- package/dist/components/table/TableFilterPanel.vue.js +1 -1
- package/dist/components/table/TableGroupRow.vue.js +2 -2
- package/dist/components/table/TableHeaderRow.vue.js +3 -3
- package/dist/components/table/TableToolbar.vue.js +2 -2
- package/dist/components/table/TableToolbar.vue2.js +126 -138
- package/dist/components/table/dataTableUtils.d.ts +26 -0
- package/dist/components/table/dataTableUtils.js +60 -0
- package/dist/composables/databaseDetailWorkspaceUtils.d.ts +59 -0
- package/dist/composables/databaseDetailWorkspaceUtils.js +160 -0
- package/dist/composables/index.d.ts +5 -0
- package/dist/composables/useDataTableDetailSheet.d.ts +47 -0
- package/dist/composables/useDataTableDetailSheet.js +58 -0
- package/dist/composables/useDataTableLayout.d.ts +16 -0
- package/dist/composables/useDataTableLayout.js +38 -0
- package/dist/composables/useDataTableSelection.d.ts +41 -0
- package/dist/composables/useDataTableSelection.js +73 -0
- package/dist/composables/useDatabaseDetailWorkspace.d.ts +67 -0
- package/dist/composables/useDatabaseDetailWorkspace.js +150 -0
- package/dist/composables/useDatabaseView.d.ts +3 -137
- package/dist/composables/useDatabaseWorkspace.d.ts +31 -0
- package/dist/composables/useDatabaseWorkspace.js +89 -0
- package/dist/composables/useTableToolbarPanels.d.ts +19 -0
- package/dist/composables/useTableToolbarPanels.js +53 -0
- package/dist/contracts/database.d.ts +252 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +261 -248
- package/dist/plugin.d.ts +2 -0
- package/dist/plugin.js +10 -261
- package/dist/registry/plugin-components.d.ts +291 -0
- package/dist/registry/plugin-components.js +114 -0
- package/dist/style.css +1 -1
- package/dist/types/data-table.d.ts +27 -0
- package/dist/types/data-table.js +29 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./BarChart.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-a871c5bc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as d, ref as c, onMounted as
|
|
2
|
-
import * as
|
|
1
|
+
import { defineComponent as d, ref as c, onMounted as f, onUnmounted as u, watch as p, openBlock as m, createElementBlock as x, createElementVNode as y } from "vue";
|
|
2
|
+
import * as v from "echarts/core";
|
|
3
3
|
import "echarts/charts";
|
|
4
4
|
import "echarts/components";
|
|
5
5
|
import "echarts/renderers";
|
|
6
|
-
const
|
|
6
|
+
const h = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
|
|
7
7
|
__name: "BarChart",
|
|
8
8
|
props: {
|
|
9
9
|
title: { default: "" },
|
|
@@ -22,7 +22,7 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
|
|
|
22
22
|
}
|
|
23
23
|
const l = () => {
|
|
24
24
|
if (!a.value) return;
|
|
25
|
-
t || (t =
|
|
25
|
+
t || (t = v.init(a.value));
|
|
26
26
|
const r = e.colors.map(o);
|
|
27
27
|
t.setOption({
|
|
28
28
|
color: r,
|
|
@@ -41,12 +41,12 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
|
|
|
41
41
|
type: "category",
|
|
42
42
|
data: e.xAxisData,
|
|
43
43
|
axisLabel: { color: o("var(--of-text-tertiary)") },
|
|
44
|
-
axisLine: { lineStyle: { color: o("var(--of-border-
|
|
44
|
+
axisLine: { lineStyle: { color: o("var(--of-border-workspace)") } }
|
|
45
45
|
},
|
|
46
46
|
yAxis: {
|
|
47
47
|
type: "value",
|
|
48
48
|
axisLabel: { color: o("var(--of-text-tertiary)") },
|
|
49
|
-
splitLine: { lineStyle: { color: o("var(--of-border-
|
|
49
|
+
splitLine: { lineStyle: { color: o("var(--of-border-divider)") } }
|
|
50
50
|
},
|
|
51
51
|
series: [
|
|
52
52
|
{
|
|
@@ -59,13 +59,13 @@ const v = { class: "of-dashboard-chart" }, w = /* @__PURE__ */ d({
|
|
|
59
59
|
]
|
|
60
60
|
});
|
|
61
61
|
};
|
|
62
|
-
return
|
|
62
|
+
return f(() => {
|
|
63
63
|
l(), a.value && (i = new ResizeObserver(() => t == null ? void 0 : t.resize()), i.observe(a.value));
|
|
64
|
-
}),
|
|
64
|
+
}), u(() => {
|
|
65
65
|
i == null || i.disconnect(), t == null || t.dispose();
|
|
66
66
|
}), p(() => [e.title, e.xAxisData, e.seriesName, e.data, e.colors], l, {
|
|
67
67
|
deep: !0
|
|
68
|
-
}), (r, s) => (m(), x("div",
|
|
68
|
+
}), (r, s) => (m(), x("div", h, [
|
|
69
69
|
y("div", {
|
|
70
70
|
ref_key: "chartRef",
|
|
71
71
|
ref: a,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./NumberCard.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-d92675b9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./PieChart.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-bae87643"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -3,7 +3,7 @@ import * as g from "echarts/core";
|
|
|
3
3
|
import "echarts/charts";
|
|
4
4
|
import "echarts/components";
|
|
5
5
|
import "echarts/renderers";
|
|
6
|
-
const y = { class: "of-dashboard-chart" },
|
|
6
|
+
const y = { class: "of-dashboard-chart" }, k = /* @__PURE__ */ d({
|
|
7
7
|
__name: "PieChart",
|
|
8
8
|
props: {
|
|
9
9
|
title: { default: "" },
|
|
@@ -55,7 +55,7 @@ const y = { class: "of-dashboard-chart" }, C = /* @__PURE__ */ d({
|
|
|
55
55
|
data: e.data,
|
|
56
56
|
label: { formatter: "{b}: {d}%" },
|
|
57
57
|
itemStyle: {
|
|
58
|
-
borderColor: n("var(--of-surface-
|
|
58
|
+
borderColor: n("var(--of-surface-workspace-raised)"),
|
|
59
59
|
borderWidth: 2
|
|
60
60
|
}
|
|
61
61
|
}
|
|
@@ -78,5 +78,5 @@ const y = { class: "of-dashboard-chart" }, C = /* @__PURE__ */ d({
|
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
export {
|
|
81
|
-
|
|
81
|
+
k as default
|
|
82
82
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableChart.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8db5c8d5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./index.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6517a791"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./InfoCard.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-920595cb"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as w, useCssVars as E, computed as y, openBlock as o, createElementBlock as a, mergeProps as L, Fragment as l, renderSlot as s, createCommentVNode as n, createElementVNode as i, toDisplayString as c, normalizeStyle as u, renderList as B } from "vue";
|
|
2
|
+
const P = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "of-info-card__icon-area"
|
|
5
5
|
}, A = { class: "of-info-card__body" }, T = { class: "of-info-card__title" }, V = { class: "of-info-card__footer" }, D = {
|
|
@@ -23,7 +23,7 @@ const w = {
|
|
|
23
23
|
}, j = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "of-info-card__actions"
|
|
26
|
-
}, G = /* @__PURE__ */
|
|
26
|
+
}, G = /* @__PURE__ */ w({
|
|
27
27
|
name: "InfoCard",
|
|
28
28
|
inheritAttrs: !1,
|
|
29
29
|
__name: "InfoCard",
|
|
@@ -44,18 +44,18 @@ const w = {
|
|
|
44
44
|
typeColor: { default: void 0 }
|
|
45
45
|
},
|
|
46
46
|
emits: ["click"],
|
|
47
|
-
setup(t, { emit:
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
setup(t, { emit: k }) {
|
|
48
|
+
E((e) => ({
|
|
49
|
+
v2baa4b58: e.unread ? "var(--of-surface-selected)" : "var(--of-surface-card)"
|
|
50
50
|
}));
|
|
51
|
-
const r = t,
|
|
51
|
+
const r = t, g = k, m = {
|
|
52
52
|
模板: "var(--of-accent-default)",
|
|
53
53
|
template: "var(--of-accent-default)",
|
|
54
54
|
会话: "var(--of-text-strong)",
|
|
55
55
|
session: "var(--of-text-strong)"
|
|
56
|
-
},
|
|
56
|
+
}, h = y(() => r.variant === "memo" ? r.importance === "high" ? "var(--of-border-strong)" : r.borderColor ?? "var(--of-accent-default)" : r.variant === "history" ? r.typeColor ? r.typeColor : r.type && m[r.type] ? m[r.type] : r.borderColor ?? "var(--of-accent-default)" : "transparent"), _ = y(() => {
|
|
57
57
|
const e = {
|
|
58
|
-
"--of-ic-border":
|
|
58
|
+
"--of-ic-border": h.value
|
|
59
59
|
};
|
|
60
60
|
return r.variant === "notify" && (e["--of-ic-unread-dot"] = r.unread ? "var(--of-accent-default)" : "var(--of-text-tertiary)"), e;
|
|
61
61
|
}), v = y(
|
|
@@ -68,12 +68,12 @@ const w = {
|
|
|
68
68
|
{
|
|
69
69
|
bg: "var(--of-surface-muted)",
|
|
70
70
|
color: "var(--of-accent-default)",
|
|
71
|
-
border: "var(--of-border-
|
|
71
|
+
border: "var(--of-border-workspace)"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
bg: "var(--of-surface-panel)",
|
|
75
75
|
color: "var(--of-text-strong)",
|
|
76
|
-
border: "var(--of-border-
|
|
76
|
+
border: "var(--of-border-workspace)"
|
|
77
77
|
},
|
|
78
78
|
{
|
|
79
79
|
bg: "var(--of-surface-selected)",
|
|
@@ -83,12 +83,12 @@ const w = {
|
|
|
83
83
|
{
|
|
84
84
|
bg: "var(--of-surface-panel)",
|
|
85
85
|
color: "var(--of-text-secondary)",
|
|
86
|
-
border: "var(--of-border-
|
|
86
|
+
border: "var(--of-border-workspace)"
|
|
87
87
|
},
|
|
88
88
|
{
|
|
89
89
|
bg: "var(--of-surface-muted)",
|
|
90
90
|
color: "var(--of-text-tertiary)",
|
|
91
|
-
border: "var(--of-border-
|
|
91
|
+
border: "var(--of-border-workspace)"
|
|
92
92
|
}
|
|
93
93
|
], d = f[e % f.length];
|
|
94
94
|
return {
|
|
@@ -98,12 +98,12 @@ const w = {
|
|
|
98
98
|
};
|
|
99
99
|
}
|
|
100
100
|
function b(e) {
|
|
101
|
-
|
|
101
|
+
g("click", e);
|
|
102
102
|
}
|
|
103
103
|
function $(e) {
|
|
104
104
|
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), b(new MouseEvent("click")));
|
|
105
105
|
}
|
|
106
|
-
return (e, f) => (o(), a("div",
|
|
106
|
+
return (e, f) => (o(), a("div", L({
|
|
107
107
|
class: ["of-info-card", `of-info-card--${t.variant}`],
|
|
108
108
|
style: _.value,
|
|
109
109
|
role: "button",
|
|
@@ -113,58 +113,58 @@ const w = {
|
|
|
113
113
|
onKeydown: $
|
|
114
114
|
}), [
|
|
115
115
|
t.variant === "memo" ? (o(), a(l, { key: 0 }, [
|
|
116
|
-
e.$slots.icon ? (o(), a("div",
|
|
117
|
-
|
|
116
|
+
e.$slots.icon ? (o(), a("div", P, [
|
|
117
|
+
s(e.$slots, "icon", {}, void 0, !0)
|
|
118
118
|
])) : n("", !0),
|
|
119
|
-
|
|
120
|
-
|
|
119
|
+
i("div", A, [
|
|
120
|
+
i("div", T, c(t.title), 1),
|
|
121
121
|
t.content ? (o(), a("div", {
|
|
122
122
|
key: 0,
|
|
123
123
|
class: "of-info-card__content of-info-card__content--clamp",
|
|
124
124
|
style: u(v.value)
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
t.tags && t.tags.length ? (o(!0), a(l, { key: 0 },
|
|
125
|
+
}, c(t.content), 5)) : n("", !0),
|
|
126
|
+
i("div", V, [
|
|
127
|
+
t.tags && t.tags.length ? (o(!0), a(l, { key: 0 }, B(t.tags, (d, S) => (o(), a("span", {
|
|
128
128
|
key: d,
|
|
129
129
|
class: "of-info-card__tag",
|
|
130
130
|
style: u(C(S))
|
|
131
|
-
},
|
|
132
|
-
t.author ? (o(), a("span", D,
|
|
133
|
-
t.date ? (o(), a("span", I,
|
|
134
|
-
|
|
131
|
+
}, c(d), 5))), 128)) : n("", !0),
|
|
132
|
+
t.author ? (o(), a("span", D, c(t.author), 1)) : n("", !0),
|
|
133
|
+
t.date ? (o(), a("span", I, c(t.date), 1)) : n("", !0),
|
|
134
|
+
s(e.$slots, "footer", {}, void 0, !0)
|
|
135
135
|
])
|
|
136
136
|
])
|
|
137
137
|
], 64)) : t.variant === "notify" ? (o(), a(l, { key: 1 }, [
|
|
138
|
-
f[0] || (f[0] =
|
|
139
|
-
|
|
140
|
-
|
|
138
|
+
f[0] || (f[0] = i("span", { class: "of-info-card__dot" }, null, -1)),
|
|
139
|
+
i("div", K, [
|
|
140
|
+
i("div", M, c(t.title), 1),
|
|
141
141
|
t.content ? (o(), a("div", {
|
|
142
142
|
key: 0,
|
|
143
143
|
class: "of-info-card__content of-info-card__content--clamp",
|
|
144
144
|
style: u(v.value)
|
|
145
|
-
},
|
|
146
|
-
t.meta ? (o(), a("div", N,
|
|
147
|
-
|
|
145
|
+
}, c(t.content), 5)) : n("", !0),
|
|
146
|
+
t.meta ? (o(), a("div", N, c(t.meta), 1)) : n("", !0),
|
|
147
|
+
s(e.$slots, "footer", {}, void 0, !0)
|
|
148
148
|
]),
|
|
149
149
|
e.$slots.actions ? (o(), a("div", O, [
|
|
150
|
-
|
|
150
|
+
s(e.$slots, "actions", {}, void 0, !0)
|
|
151
151
|
])) : n("", !0)
|
|
152
152
|
], 64)) : t.variant === "history" ? (o(), a(l, { key: 2 }, [
|
|
153
153
|
e.$slots.icon ? (o(), a("div", z, [
|
|
154
|
-
|
|
154
|
+
s(e.$slots, "icon", {}, void 0, !0)
|
|
155
155
|
])) : n("", !0),
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
t.subtitle ? (o(), a("div", Y,
|
|
156
|
+
i("div", F, [
|
|
157
|
+
i("div", R, c(t.title), 1),
|
|
158
|
+
t.subtitle ? (o(), a("div", Y, c(t.subtitle), 1)) : n("", !0),
|
|
159
159
|
t.content ? (o(), a("div", {
|
|
160
160
|
key: 1,
|
|
161
161
|
class: "of-info-card__content of-info-card__content--clamp",
|
|
162
162
|
style: u(v.value)
|
|
163
|
-
},
|
|
164
|
-
|
|
163
|
+
}, c(t.content), 5)) : n("", !0),
|
|
164
|
+
s(e.$slots, "footer", {}, void 0, !0)
|
|
165
165
|
]),
|
|
166
166
|
e.$slots.actions ? (o(), a("div", j, [
|
|
167
|
-
|
|
167
|
+
s(e.$slots, "actions", {}, void 0, !0)
|
|
168
168
|
])) : n("", !0)
|
|
169
169
|
], 64)) : n("", !0)
|
|
170
170
|
], 16));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./StatisticCard.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ o(t, [["__scopeId", "data-v-cfec8086"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./StatusSummary.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ o(t, [["__scopeId", "data-v-23b96e2c"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as _, computed as
|
|
1
|
+
import { defineComponent as _, computed as c, openBlock as s, createElementBlock as a, mergeProps as g, Fragment as i, renderList as S, createCommentVNode as f, createElementVNode as r, normalizeStyle as n, toDisplayString as d, renderSlot as v } from "vue";
|
|
2
2
|
const z = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "of-status-summary__sep",
|
|
@@ -16,17 +16,17 @@ const z = {
|
|
|
16
16
|
separator: { type: Boolean, default: !1 }
|
|
17
17
|
},
|
|
18
18
|
setup(o) {
|
|
19
|
-
const u = o, l =
|
|
19
|
+
const u = o, l = c(() => u.size === "sm" ? "6px" : "7px"), m = c(() => u.size === "sm" ? "10px" : "11px");
|
|
20
20
|
function p(t) {
|
|
21
|
-
return t.color ?? "var(--of-border-
|
|
21
|
+
return t.color ?? "var(--of-border-workspace)";
|
|
22
22
|
}
|
|
23
23
|
function y(t) {
|
|
24
24
|
return t.highlight ? "var(--of-accent-strong)" : "var(--of-text-primary)";
|
|
25
25
|
}
|
|
26
|
-
return (t,
|
|
26
|
+
return (t, C) => (s(), a("div", g({
|
|
27
27
|
class: ["of-status-summary", `of-status-summary--${o.size}`]
|
|
28
28
|
}, t.$attrs), [
|
|
29
|
-
(s(!0), a(
|
|
29
|
+
(s(!0), a(i, null, S(o.items, (e, h) => (s(), a(i, {
|
|
30
30
|
key: e.key
|
|
31
31
|
}, [
|
|
32
32
|
o.separator && h > 0 ? (s(), a("span", z)) : f("", !0),
|
|
@@ -0,0 +1,41 @@
|
|
|
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:width": (value: number) => any;
|
|
25
|
+
"update:presentation": (value: DatabaseViewResolvedDetailPresentation) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
27
|
+
onDelete?: ((rowId: string) => any) | undefined;
|
|
28
|
+
onClose?: (() => any) | undefined;
|
|
29
|
+
onSave?: (() => any) | undefined;
|
|
30
|
+
onCommit?: ((rowId: string, fieldId: string, value: unknown) => any) | undefined;
|
|
31
|
+
"onUpdate:width"?: ((value: number) => any) | undefined;
|
|
32
|
+
"onUpdate:presentation"?: ((value: DatabaseViewResolvedDetailPresentation) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
readonly: boolean;
|
|
35
|
+
recordId: string;
|
|
36
|
+
canSwitchPresentation: boolean;
|
|
37
|
+
workspaceModes: DatabaseWorkspaceModeOption[];
|
|
38
|
+
propertyItems: DatabaseDetailPropertyItem[];
|
|
39
|
+
hasDraftChanges: boolean;
|
|
40
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
41
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { defineComponent as m, computed as n, openBlock as u, createBlock as f, resolveDynamicComponent as w, mergeProps as c, withCtx as y, createVNode as v, createCommentVNode as h } from "vue";
|
|
2
|
+
import C from "../overlay/Drawer.vue.js";
|
|
3
|
+
import D from "../overlay/SidePanel.vue.js";
|
|
4
|
+
import b from "./DatabaseDetailWorkspace.vue.js";
|
|
5
|
+
const I = /* @__PURE__ */ m({
|
|
6
|
+
name: "DatabaseDetailPresenter",
|
|
7
|
+
__name: "DatabaseDetailPresenter",
|
|
8
|
+
props: {
|
|
9
|
+
visible: { type: Boolean },
|
|
10
|
+
title: {},
|
|
11
|
+
rowId: {},
|
|
12
|
+
recordId: { default: "" },
|
|
13
|
+
viewType: {},
|
|
14
|
+
description: {},
|
|
15
|
+
presentation: {},
|
|
16
|
+
sidePanelWidth: {},
|
|
17
|
+
drawerWidth: {},
|
|
18
|
+
canSwitchPresentation: { type: Boolean, default: !1 },
|
|
19
|
+
workspaceModes: { default: () => [] },
|
|
20
|
+
propertyItems: { default: () => [] },
|
|
21
|
+
readonly: { type: Boolean, default: !1 },
|
|
22
|
+
hasDraftChanges: { type: Boolean, default: !1 }
|
|
23
|
+
},
|
|
24
|
+
emits: ["commit", "save", "delete", "close", "update:width", "update:presentation"],
|
|
25
|
+
setup(i, { emit: s }) {
|
|
26
|
+
const e = i, r = s;
|
|
27
|
+
function l(a, t, o) {
|
|
28
|
+
r("commit", a, t, o);
|
|
29
|
+
}
|
|
30
|
+
const d = n(
|
|
31
|
+
() => e.presentation === "side-panel" ? D : C
|
|
32
|
+
), p = n(() => e.presentation === "side-panel" ? {
|
|
33
|
+
modelValue: e.visible,
|
|
34
|
+
title: e.title,
|
|
35
|
+
width: e.sidePanelWidth,
|
|
36
|
+
resizable: !0,
|
|
37
|
+
mode: "persistent"
|
|
38
|
+
} : {
|
|
39
|
+
modelValue: e.visible,
|
|
40
|
+
title: e.title,
|
|
41
|
+
width: e.drawerWidth,
|
|
42
|
+
resizable: e.presentation !== "full-page",
|
|
43
|
+
fullscreen: e.presentation === "full-page",
|
|
44
|
+
maskClosable: !0
|
|
45
|
+
});
|
|
46
|
+
return (a, t) => e.visible ? (u(), f(w(d.value), c({ key: 0 }, p.value, {
|
|
47
|
+
"onUpdate:width": t[4] || (t[4] = (o) => r("update:width", o)),
|
|
48
|
+
"onUpdate:modelValue": t[5] || (t[5] = (o) => r("close"))
|
|
49
|
+
}), {
|
|
50
|
+
default: y(() => [
|
|
51
|
+
v(b, {
|
|
52
|
+
"row-id": e.rowId,
|
|
53
|
+
"record-id": e.recordId,
|
|
54
|
+
title: e.title,
|
|
55
|
+
description: e.description,
|
|
56
|
+
"view-type": e.viewType,
|
|
57
|
+
presentation: e.presentation,
|
|
58
|
+
"can-switch-presentation": e.canSwitchPresentation,
|
|
59
|
+
"workspace-modes": e.workspaceModes,
|
|
60
|
+
"property-items": e.propertyItems,
|
|
61
|
+
readonly: e.readonly,
|
|
62
|
+
"has-draft-changes": e.hasDraftChanges,
|
|
63
|
+
onCommit: l,
|
|
64
|
+
onSave: t[0] || (t[0] = (o) => r("save")),
|
|
65
|
+
onDelete: t[1] || (t[1] = (o) => r("delete", o)),
|
|
66
|
+
onClose: t[2] || (t[2] = (o) => r("close")),
|
|
67
|
+
"onUpdate:presentation": t[3] || (t[3] = (o) => r("update:presentation", o))
|
|
68
|
+
}, null, 8, ["row-id", "record-id", "title", "description", "view-type", "presentation", "can-switch-presentation", "workspace-modes", "property-items", "readonly", "has-draft-changes"])
|
|
69
|
+
]),
|
|
70
|
+
_: 1
|
|
71
|
+
}, 16)) : h("", !0);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
export {
|
|
75
|
+
I as default
|
|
76
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { CellValue as FieldCellValue } from '../table/FieldCell.vue';
|
|
2
|
+
import { DatabaseViewResolvedDetailPresentation } from '../../contracts/database';
|
|
3
|
+
import { DatabaseDetailPropertyItem, DatabaseWorkspaceModeOption } from './databaseViewUtils';
|
|
4
|
+
type __VLS_Props = {
|
|
5
|
+
rowId: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
recordId?: string;
|
|
9
|
+
viewType: string;
|
|
10
|
+
presentation: DatabaseViewResolvedDetailPresentation;
|
|
11
|
+
canSwitchPresentation?: boolean;
|
|
12
|
+
workspaceModes?: DatabaseWorkspaceModeOption[];
|
|
13
|
+
propertyItems?: DatabaseDetailPropertyItem[];
|
|
14
|
+
readonly?: boolean;
|
|
15
|
+
hasDraftChanges?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
18
|
+
delete: (rowId: string) => any;
|
|
19
|
+
close: () => any;
|
|
20
|
+
save: () => any;
|
|
21
|
+
commit: (rowId: string, fieldId: string, value: FieldCellValue) => any;
|
|
22
|
+
"update:presentation": (value: DatabaseViewResolvedDetailPresentation) => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
24
|
+
onDelete?: ((rowId: string) => any) | undefined;
|
|
25
|
+
onClose?: (() => any) | undefined;
|
|
26
|
+
onSave?: (() => any) | undefined;
|
|
27
|
+
onCommit?: ((rowId: string, fieldId: string, value: FieldCellValue) => any) | undefined;
|
|
28
|
+
"onUpdate:presentation"?: ((value: DatabaseViewResolvedDetailPresentation) => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
readonly: boolean;
|
|
31
|
+
recordId: string;
|
|
32
|
+
canSwitchPresentation: boolean;
|
|
33
|
+
workspaceModes: DatabaseWorkspaceModeOption[];
|
|
34
|
+
propertyItems: DatabaseDetailPropertyItem[];
|
|
35
|
+
hasDraftChanges: boolean;
|
|
36
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
37
|
+
export default _default;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent as v, openBlock as s, createBlock as c, withCtx as n, createElementVNode as t, createElementBlock as i, Fragment as p, renderList as _, toDisplayString as l, normalizeClass as u, createCommentVNode as k } from "vue";
|
|
2
|
+
import m from "../detail/DetailLayout.vue.js";
|
|
3
|
+
import y from "../table/FieldCell.vue.js";
|
|
4
|
+
const h = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "of-database-view__workspace-modes",
|
|
7
|
+
"data-role": "workspace-mode-switch"
|
|
8
|
+
}, C = ["data-mode", "onClick"], D = { class: "of-database-view__workspace-chip" }, I = { class: "of-database-view__workspace-chip" }, B = { class: "of-database-view__workspace-chip" }, g = ["data-record-id"], x = { class: "of-database-view__detail-workspace-properties" }, $ = { class: "of-database-view__detail-workspace-label" }, F = { class: "of-database-view__detail-workspace-value" }, S = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "of-database-view__detail-workspace-fallback"
|
|
11
|
+
}, T = ["disabled"], V = /* @__PURE__ */ v({
|
|
12
|
+
name: "DatabaseDetailWorkspace",
|
|
13
|
+
__name: "DatabaseDetailWorkspace",
|
|
14
|
+
props: {
|
|
15
|
+
rowId: {},
|
|
16
|
+
title: {},
|
|
17
|
+
description: {},
|
|
18
|
+
recordId: { default: "" },
|
|
19
|
+
viewType: {},
|
|
20
|
+
presentation: {},
|
|
21
|
+
canSwitchPresentation: { type: Boolean, default: !1 },
|
|
22
|
+
workspaceModes: { default: () => [] },
|
|
23
|
+
propertyItems: { default: () => [] },
|
|
24
|
+
readonly: { type: Boolean, default: !1 },
|
|
25
|
+
hasDraftChanges: { type: Boolean, default: !1 }
|
|
26
|
+
},
|
|
27
|
+
emits: ["commit", "save", "delete", "close", "update:presentation"],
|
|
28
|
+
setup(w, { emit: f }) {
|
|
29
|
+
const a = w, d = f;
|
|
30
|
+
function b(r, o, e) {
|
|
31
|
+
d("commit", r, o, e);
|
|
32
|
+
}
|
|
33
|
+
return (r, o) => (s(), c(m, {
|
|
34
|
+
title: a.title,
|
|
35
|
+
comments: [],
|
|
36
|
+
"description-content": a.description,
|
|
37
|
+
"description-editable": !1
|
|
38
|
+
}, {
|
|
39
|
+
meta: n(() => [
|
|
40
|
+
a.canSwitchPresentation ? (s(), i("div", h, [
|
|
41
|
+
(s(!0), i(p, null, _(a.workspaceModes, (e) => (s(), i("button", {
|
|
42
|
+
key: e.value,
|
|
43
|
+
type: "button",
|
|
44
|
+
class: u(["of-database-view__workspace-mode-btn", { "of-database-view__workspace-mode-btn--active": a.presentation === e.value }]),
|
|
45
|
+
"data-mode": e.value,
|
|
46
|
+
onClick: (E) => d("update:presentation", e.value)
|
|
47
|
+
}, l(e.label), 11, C))), 128))
|
|
48
|
+
])) : k("", !0),
|
|
49
|
+
t("span", D, l(a.recordId || "record"), 1),
|
|
50
|
+
t("span", I, l(a.viewType), 1),
|
|
51
|
+
t("span", B, l(a.presentation), 1)
|
|
52
|
+
]),
|
|
53
|
+
props: n(() => [
|
|
54
|
+
t("div", {
|
|
55
|
+
class: "of-database-view__detail-workspace",
|
|
56
|
+
"data-record-id": a.recordId
|
|
57
|
+
}, [
|
|
58
|
+
t("section", x, [
|
|
59
|
+
(s(!0), i(p, null, _(a.propertyItems, (e) => (s(), i("div", {
|
|
60
|
+
key: e.key,
|
|
61
|
+
class: "of-database-view__detail-workspace-field"
|
|
62
|
+
}, [
|
|
63
|
+
t("span", $, l(e.label), 1),
|
|
64
|
+
t("div", F, [
|
|
65
|
+
e.field ? (s(), c(y, {
|
|
66
|
+
key: 0,
|
|
67
|
+
"row-id": a.rowId,
|
|
68
|
+
field: e.field,
|
|
69
|
+
value: e.value,
|
|
70
|
+
readonly: a.readonly,
|
|
71
|
+
onCommit: b
|
|
72
|
+
}, null, 8, ["row-id", "field", "value", "readonly"])) : (s(), i("span", S, l(e.fallbackText), 1))
|
|
73
|
+
])
|
|
74
|
+
]))), 128))
|
|
75
|
+
])
|
|
76
|
+
], 8, g)
|
|
77
|
+
]),
|
|
78
|
+
footer: n(() => [
|
|
79
|
+
t("button", {
|
|
80
|
+
class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--delete",
|
|
81
|
+
type: "button",
|
|
82
|
+
onClick: o[0] || (o[0] = (e) => d("delete", a.rowId))
|
|
83
|
+
}, " 删除 "),
|
|
84
|
+
o[3] || (o[3] = t("div", { class: "of-database-view__detail-workspace-footer-spacer" }, null, -1)),
|
|
85
|
+
t("button", {
|
|
86
|
+
class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--cancel",
|
|
87
|
+
type: "button",
|
|
88
|
+
onClick: o[1] || (o[1] = (e) => d("close"))
|
|
89
|
+
}, " 取消 "),
|
|
90
|
+
t("button", {
|
|
91
|
+
class: "of-database-view__detail-workspace-btn of-database-view__detail-workspace-btn--save",
|
|
92
|
+
type: "button",
|
|
93
|
+
disabled: a.readonly || !a.hasDraftChanges,
|
|
94
|
+
onClick: o[2] || (o[2] = (e) => d("save"))
|
|
95
|
+
}, " 保存 ", 8, T)
|
|
96
|
+
]),
|
|
97
|
+
_: 1
|
|
98
|
+
}, 8, ["title", "description-content"]));
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
export {
|
|
102
|
+
V as default
|
|
103
|
+
};
|