@oneflowui/ui 0.6.0 → 0.8.0
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/index.vue.d.ts +3 -1
- package/dist/components/Dashboard/index.vue.js +2 -2
- package/dist/components/Dashboard/index.vue2.js +59 -30
- package/dist/components/database/DatabaseView.vue.js +4 -4
- package/dist/components/database/DatabaseView.vue2.js +597 -442
- package/dist/components/detail/DetailLayout.vue.d.ts +12 -1
- package/dist/components/detail/DetailLayout.vue.js +2 -2
- package/dist/components/detail/DetailLayout.vue2.js +115 -68
- package/dist/components/gallery/GalleryView.vue.d.ts +3 -1
- package/dist/components/gallery/GalleryView.vue.js +2 -2
- package/dist/components/gallery/GalleryView.vue2.js +51 -27
- package/dist/components/overlay/Drawer.vue.d.ts +10 -0
- package/dist/components/overlay/Drawer.vue.js +1 -1
- package/dist/components/overlay/Drawer.vue2.js +74 -48
- package/dist/components/overlay/SidePanel.vue.d.ts +8 -0
- package/dist/components/overlay/SidePanel.vue.js +2 -2
- package/dist/components/overlay/SidePanel.vue2.js +97 -65
- package/dist/components/table/DataTable.vue.d.ts +32 -2
- package/dist/components/table/DataTable.vue.js +3 -3
- package/dist/components/table/DataTable.vue2.js +751 -609
- package/dist/components/table/FieldCell.vue.js +2 -2
- package/dist/components/table/FieldCell.vue2.js +26 -24
- package/dist/components/table/TableDataRow.vue.d.ts +19 -0
- package/dist/components/table/TableDataRow.vue.js +3 -3
- package/dist/components/table/TableDataRow.vue2.js +110 -73
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -20,5 +20,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
20
20
|
columns: number;
|
|
21
21
|
gap: number;
|
|
22
22
|
widgets: DashboardWidget[];
|
|
23
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
23
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
24
|
+
dashboardRef: HTMLElement;
|
|
25
|
+
}, HTMLElement>;
|
|
24
26
|
export default _default;
|
|
@@ -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 m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-eff3b1be"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as M, defineAsyncComponent as o, ref as h, computed as s, onMounted as k, onBeforeUnmount as w, openBlock as d, createElementBlock as u, createElementVNode as c, toDisplayString as D, normalizeStyle as b, Fragment as R, renderList as x, createBlock as C, resolveDynamicComponent as B, mergeProps as E } from "vue";
|
|
2
|
+
const F = { class: "of-dashboard__header" }, T = { class: "of-dashboard__title" }, I = /* @__PURE__ */ M({
|
|
3
3
|
__name: "index",
|
|
4
4
|
props: {
|
|
5
5
|
title: { default: "Dashboard" },
|
|
@@ -7,17 +7,45 @@ const g = { class: "of-dashboard" }, S = { class: "of-dashboard__header" }, v =
|
|
|
7
7
|
columns: { default: 4 },
|
|
8
8
|
gap: { default: 16 }
|
|
9
9
|
},
|
|
10
|
-
setup(
|
|
11
|
-
const
|
|
12
|
-
bar:
|
|
13
|
-
pie:
|
|
14
|
-
doughnut:
|
|
15
|
-
"number-card":
|
|
16
|
-
table:
|
|
17
|
-
},
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
10
|
+
setup(p) {
|
|
11
|
+
const r = p, v = {
|
|
12
|
+
bar: o(() => import("./charts/BarChart.vue.js")),
|
|
13
|
+
pie: o(() => import("./charts/PieChart.vue.js")),
|
|
14
|
+
doughnut: o(() => import("./charts/DoughnutChart.vue2.js")),
|
|
15
|
+
"number-card": o(() => import("./charts/NumberCard.vue.js")),
|
|
16
|
+
table: o(() => import("./charts/TableChart.vue.js"))
|
|
17
|
+
}, l = h(null), i = h(0);
|
|
18
|
+
let a = null;
|
|
19
|
+
const y = s(() => Math.max(1, Math.floor(r.columns))), m = s(() => {
|
|
20
|
+
const e = i.value, t = y.value;
|
|
21
|
+
return e ? e < 560 ? 1 : e < 840 ? Math.min(t, 2) : e < 1120 ? Math.min(t, 3) : t : t;
|
|
22
|
+
}), g = s(() => ({
|
|
23
|
+
"--dashboard-columns": String(m.value),
|
|
24
|
+
gap: `${r.gap}px`
|
|
25
|
+
}));
|
|
26
|
+
function f(e) {
|
|
27
|
+
var t;
|
|
28
|
+
if (e) {
|
|
29
|
+
i.value = Math.round(e.contentRect.width);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
i.value = Math.round(((t = l.value) == null ? void 0 : t.getBoundingClientRect().width) ?? 0);
|
|
33
|
+
}
|
|
34
|
+
k(() => {
|
|
35
|
+
f(), !(typeof ResizeObserver > "u" || !l.value) && (a = new ResizeObserver((e) => {
|
|
36
|
+
e[0] && f(e[0]);
|
|
37
|
+
}), a.observe(l.value));
|
|
38
|
+
}), w(() => {
|
|
39
|
+
a == null || a.disconnect(), a = null;
|
|
40
|
+
});
|
|
41
|
+
function _(e) {
|
|
42
|
+
const t = m.value;
|
|
43
|
+
return {
|
|
44
|
+
gridColumn: `span ${Math.min(e.colSpan ?? 1, t)}`,
|
|
45
|
+
gridRow: `span ${e.rowSpan ?? 1}`
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
const S = s(() => r.widgets.length > 0 ? r.widgets : [
|
|
21
49
|
{
|
|
22
50
|
id: "metric-1",
|
|
23
51
|
type: "number-card",
|
|
@@ -69,31 +97,32 @@ const g = { class: "of-dashboard" }, S = { class: "of-dashboard__header" }, v =
|
|
|
69
97
|
colSpan: 4
|
|
70
98
|
}
|
|
71
99
|
]);
|
|
72
|
-
return (
|
|
73
|
-
|
|
74
|
-
|
|
100
|
+
return (e, t) => (d(), u("section", {
|
|
101
|
+
ref_key: "dashboardRef",
|
|
102
|
+
ref: l,
|
|
103
|
+
class: "of-dashboard"
|
|
104
|
+
}, [
|
|
105
|
+
c("header", F, [
|
|
106
|
+
c("h3", T, D(p.title), 1)
|
|
75
107
|
]),
|
|
76
|
-
|
|
108
|
+
c("div", {
|
|
77
109
|
class: "of-dashboard__grid",
|
|
78
|
-
style:
|
|
110
|
+
style: b(g.value)
|
|
79
111
|
}, [
|
|
80
|
-
(
|
|
81
|
-
key:
|
|
112
|
+
(d(!0), u(R, null, x(S.value, (n) => (d(), u("article", {
|
|
113
|
+
key: n.id,
|
|
82
114
|
class: "of-dashboard__item",
|
|
83
|
-
style:
|
|
84
|
-
gridColumn: `span ${e.colSpan ?? 1}`,
|
|
85
|
-
gridRow: `span ${e.rowSpan ?? 1}`
|
|
86
|
-
})
|
|
115
|
+
style: b(_(n))
|
|
87
116
|
}, [
|
|
88
|
-
(
|
|
89
|
-
title:
|
|
90
|
-
data:
|
|
91
|
-
}, { ref_for: !0 },
|
|
117
|
+
(d(), C(B(v[n.type]), E({
|
|
118
|
+
title: n.title,
|
|
119
|
+
data: n.data
|
|
120
|
+
}, { ref_for: !0 }, n.config ?? {}), null, 16, ["title", "data"]))
|
|
92
121
|
], 4))), 128))
|
|
93
122
|
], 4)
|
|
94
|
-
]));
|
|
123
|
+
], 512));
|
|
95
124
|
}
|
|
96
125
|
});
|
|
97
126
|
export {
|
|
98
|
-
|
|
127
|
+
I as default
|
|
99
128
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./DatabaseView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1e404627"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|