@oneflowui/ui 0.5.9 → 0.7.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/README.en.md +19 -0
- package/README.md +23 -0
- package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue2.js +56 -23
- package/dist/components/Dashboard/charts/NumberCard.vue.js +2 -2
- package/dist/components/Dashboard/charts/NumberCard.vue2.js +14 -14
- package/dist/components/Dashboard/charts/PieChart.vue.js +1 -1
- package/dist/components/Dashboard/charts/PieChart.vue2.js +49 -23
- package/dist/components/Dashboard/charts/TableChart.vue.js +1 -1
- 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/ai/AiMessageBubble.vue.js +3 -3
- package/dist/components/ai/AiSender.vue.js +2 -2
- package/dist/components/ai/AiThinking.vue.js +1 -1
- package/dist/components/ai/UserMessageBubble.vue.js +3 -3
- package/dist/components/auxiliary/ColorPanel.vue.js +3 -3
- package/dist/components/auxiliary/ColorPanel.vue2.js +9 -9
- package/dist/components/auxiliary/FileUpload.vue.js +2 -2
- package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
- package/dist/components/auxiliary/PersonPanel.vue2.js +10 -10
- package/dist/components/base/Accordion.vue.js +1 -1
- package/dist/components/base/Avatar.vue.js +3 -3
- package/dist/components/base/Avatar.vue2.js +43 -43
- package/dist/components/base/Badge.vue.js +1 -1
- package/dist/components/base/Badge.vue2.js +35 -35
- package/dist/components/base/ButtonGroup.vue.js +2 -2
- package/dist/components/base/ChainItem.vue.js +2 -2
- package/dist/components/base/ChainItem.vue2.js +30 -30
- package/dist/components/base/DescBlock.vue.js +3 -3
- package/dist/components/base/DropdownMenu.vue.js +2 -2
- package/dist/components/base/EmptyState.vue.js +1 -1
- package/dist/components/base/InfoCard.vue.js +2 -2
- package/dist/components/base/InfoCard.vue2.js +66 -66
- package/dist/components/base/MonitorItem.vue.js +1 -1
- package/dist/components/base/MonitorItem.vue2.js +16 -16
- package/dist/components/base/PersonaCard.vue.js +1 -1
- package/dist/components/base/PersonaCard.vue2.js +81 -81
- package/dist/components/base/ProgressBar.vue.js +2 -2
- package/dist/components/base/ProgressBar.vue2.js +16 -16
- package/dist/components/base/RangeSlider.vue.js +1 -1
- package/dist/components/base/RefTag.vue.js +2 -2
- package/dist/components/base/RefTag.vue2.js +20 -20
- package/dist/components/base/SearchHighlight.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue2.js +44 -44
- package/dist/components/base/StatisticCard.vue.js +2 -2
- package/dist/components/base/StatisticCard.vue2.js +24 -24
- package/dist/components/base/StatusIndicator.vue.js +2 -2
- package/dist/components/base/StatusIndicator.vue2.js +30 -30
- package/dist/components/base/StatusSummary.vue.js +2 -2
- package/dist/components/base/StatusSummary.vue2.js +23 -23
- package/dist/components/base/Stepper.vue.js +2 -2
- package/dist/components/base/Switch.vue.js +2 -2
- package/dist/components/base/ToolbarBtn.vue.js +1 -1
- package/dist/components/base/ViewModeGroup.vue.js +3 -3
- package/dist/components/base/ViewSwitcher.vue.js +2 -2
- package/dist/components/base/ViewTab.vue.js +4 -4
- package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/dist/components/database/DatabaseView.vue.js +2 -2
- package/dist/components/database/DatabaseView.vue2.js +482 -412
- package/dist/components/detail/CommentItem.vue.js +2 -2
- package/dist/components/detail/CommentItem.vue2.js +8 -8
- 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/editor/BlockQuote.vue.js +2 -2
- package/dist/components/editor/CodeBlock.vue.js +2 -2
- package/dist/components/editor/ContentBlock.vue.js +2 -2
- package/dist/components/editor/RefLink.vue.js +2 -2
- package/dist/components/editor/RichTextEditor.vue.js +1 -1
- package/dist/components/field/FieldAttachment.vue.js +1 -1
- package/dist/components/field/FieldCreator.vue.js +1 -1
- package/dist/components/field/FieldCurrency.vue.js +2 -2
- package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue.js +2 -2
- package/dist/components/field/FieldProgress.vue.js +2 -2
- package/dist/components/field/FieldRating.vue.js +2 -2
- package/dist/components/field/FieldRelation.vue.js +1 -1
- package/dist/components/field/FieldRichText.vue.js +1 -1
- package/dist/components/field/FieldSelect.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue2.js +34 -30
- package/dist/components/gallery/GalleryView.vue.d.ts +3 -1
- package/dist/components/gallery/GalleryView.vue.js +1 -1
- package/dist/components/gallery/GalleryView.vue2.js +51 -27
- package/dist/components/kanban/KanbanBoard.vue.js +4 -4
- package/dist/components/kanban/KanbanCard.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue2.js +16 -16
- package/dist/components/kanban/QuickAddRow.vue.js +1 -1
- package/dist/components/layout/AppLayout.vue.js +2 -2
- package/dist/components/layout/Navbar.vue.js +3 -3
- package/dist/components/layout/Sidebar.vue.js +2 -2
- package/dist/components/layout/StatusBar.vue.js +2 -2
- package/dist/components/mermaid/MermaidChart.vue.js +2 -2
- package/dist/components/overlay/Dialog.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue.d.ts +2 -0
- package/dist/components/overlay/Drawer.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue2.js +25 -24
- package/dist/components/overlay/Modal.vue.js +1 -1
- package/dist/components/overlay/SidePanel.vue.js +2 -2
- package/dist/components/overlay/SidePanel.vue2.js +3 -2
- package/dist/components/split/SplitPane.vue.js +2 -2
- package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
- package/dist/components/table/DataTable.vue.d.ts +26 -2
- package/dist/components/table/DataTable.vue.js +2 -2
- package/dist/components/table/DataTable.vue2.js +738 -603
- package/dist/components/table/DetailSheet.vue.js +1 -1
- package/dist/components/table/FieldCell.vue.js +2 -2
- package/dist/components/table/FieldCell.vue2.js +26 -24
- package/dist/components/table/FieldTypePicker.vue.js +4 -4
- package/dist/components/table/MobileListView.vue.js +2 -2
- package/dist/components/table/NewRowBtn.vue.js +2 -2
- package/dist/components/table/TableColumnManager.vue.js +2 -2
- package/dist/components/table/TableDataRow.vue.d.ts +19 -0
- package/dist/components/table/TableDataRow.vue.js +1 -1
- package/dist/components/table/TableDataRow.vue2.js +110 -73
- package/dist/components/table/TableFilterPanel.vue.js +2 -2
- package/dist/components/table/TableGroupRow.vue.js +2 -2
- package/dist/components/table/TableHeaderRow.vue.js +2 -2
- package/dist/components/table/TableToolbar.vue.js +2 -2
- package/dist/components/tabs/Tabs.vue.js +1 -1
- package/dist/components/timeline/ActivityTimeline.vue.js +1 -1
- package/dist/components/timeline/ActivityTimeline.vue2.js +27 -27
- package/dist/components/timeline/GanttRow.vue.js +2 -2
- package/dist/components/timeline/GanttRow.vue2.js +21 -18
- package/dist/components/timeline/GanttTimeline.vue.js +2 -2
- package/dist/components/toast/ToastItem.vue.js +2 -2
- package/dist/components/toast/ToastItem.vue2.js +39 -39
- package/dist/plugin.js +5 -3
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -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-
|
|
4
|
+
const m = /* @__PURE__ */ o(t, [["__scopeId", "data-v-53b37775"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./FieldCell.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-6062f0e7"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as F, computed as a, defineAsyncComponent as e, openBlock as o, createBlock as d, resolveDynamicComponent as s, withKeys as p, withModifiers as v, normalizeClass as K, withCtx as u, Suspense as M, createElementVNode as D, createElementBlock as y, Fragment as T, unref as V, toDisplayString as $ } from "vue";
|
|
2
2
|
import { useInlineEdit as j } from "../../composables/useInlineEdit.js";
|
|
3
3
|
const z = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "of-field-cell__display"
|
|
6
|
-
},
|
|
6
|
+
}, q = /* @__PURE__ */ F({
|
|
7
7
|
__name: "FieldCell",
|
|
8
8
|
props: {
|
|
9
9
|
rowId: {},
|
|
@@ -13,14 +13,14 @@ const z = {
|
|
|
13
13
|
},
|
|
14
14
|
emits: ["commit", "cancel", "tabNext"],
|
|
15
15
|
setup(i, { emit: b }) {
|
|
16
|
-
const t = i, c = b, { isEditing: h, activate: k, commit: w, cancel: x } = j(),
|
|
16
|
+
const t = i, c = b, { isEditing: h, activate: k, commit: w, cancel: x } = j(), r = a(() => h(t.rowId, t.field.id)), n = a(() => t.readonly || t.field.readonly), C = a(() => !n.value);
|
|
17
17
|
function m() {
|
|
18
|
-
|
|
18
|
+
n.value || k(t.rowId, t.field.id);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function g(l) {
|
|
21
21
|
w(t.rowId, t.field.id, l), c("commit", t.rowId, t.field.id, l);
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function A() {
|
|
24
24
|
x(), c("cancel");
|
|
25
25
|
}
|
|
26
26
|
function E() {
|
|
@@ -47,50 +47,52 @@ const z = {
|
|
|
47
47
|
phone: e(() => import("../field/FieldPhone.vue.js"))
|
|
48
48
|
}, N = e(
|
|
49
49
|
() => import("../field/FieldMarkdownPreview.vue.js")
|
|
50
|
-
),
|
|
50
|
+
), B = a(() => I[t.field.type]), S = a(() => {
|
|
51
51
|
const l = t.value;
|
|
52
52
|
return l == null || l === "" ? "—" : Array.isArray(l) ? l.join(", ") : typeof l == "boolean" ? l ? "✓" : "—" : String(l);
|
|
53
53
|
});
|
|
54
|
-
return (l, f) => (
|
|
55
|
-
class:
|
|
56
|
-
"of-field-cell--editing":
|
|
57
|
-
"of-field-cell--readonly":
|
|
54
|
+
return (l, f) => (o(), d(s(n.value || r.value ? "div" : "button"), {
|
|
55
|
+
class: K(["of-field-cell", {
|
|
56
|
+
"of-field-cell--editing": r.value,
|
|
57
|
+
"of-field-cell--readonly": n.value,
|
|
58
|
+
"of-field-cell--actionable": C.value
|
|
58
59
|
}]),
|
|
59
|
-
type:
|
|
60
|
+
type: n.value || r.value ? void 0 : "button",
|
|
60
61
|
"aria-label": `${i.field.label}字段`,
|
|
62
|
+
title: n.value ? void 0 : `点击编辑 ${i.field.label}`,
|
|
61
63
|
onClick: m,
|
|
62
64
|
onKeydown: [
|
|
63
|
-
p(
|
|
64
|
-
p(
|
|
65
|
+
p(v(m, ["prevent"]), ["enter"]),
|
|
66
|
+
p(v(m, ["prevent"]), ["space"])
|
|
65
67
|
]
|
|
66
68
|
}, {
|
|
67
69
|
default: u(() => [
|
|
68
|
-
|
|
70
|
+
r.value ? (o(), d(M, { key: 0 }, {
|
|
69
71
|
fallback: u(() => [...f[0] || (f[0] = [
|
|
70
|
-
|
|
72
|
+
D("span", { class: "of-field-cell__loading" }, "...", -1)
|
|
71
73
|
])]),
|
|
72
74
|
default: u(() => [
|
|
73
|
-
(
|
|
75
|
+
(o(), d(s(B.value), {
|
|
74
76
|
value: i.value,
|
|
75
77
|
field: i.field,
|
|
76
|
-
onCommit:
|
|
77
|
-
onCancel:
|
|
78
|
+
onCommit: g,
|
|
79
|
+
onCancel: A,
|
|
78
80
|
onTabNext: E
|
|
79
81
|
}, null, 40, ["value", "field"]))
|
|
80
82
|
]),
|
|
81
83
|
_: 1
|
|
82
|
-
})) : (
|
|
83
|
-
i.field.type === "richtext" && typeof i.value == "string" && i.value ? (
|
|
84
|
+
})) : (o(), y(T, { key: 1 }, [
|
|
85
|
+
i.field.type === "richtext" && typeof i.value == "string" && i.value ? (o(), d(V(N), {
|
|
84
86
|
key: 0,
|
|
85
87
|
content: i.value,
|
|
86
88
|
"max-lines": 2
|
|
87
|
-
}, null, 8, ["content"])) : (
|
|
89
|
+
}, null, 8, ["content"])) : (o(), y("span", z, $(S.value), 1))
|
|
88
90
|
], 64))
|
|
89
91
|
]),
|
|
90
92
|
_: 1
|
|
91
|
-
}, 40, ["class", "type", "aria-label", "onKeydown"]));
|
|
93
|
+
}, 40, ["class", "type", "aria-label", "title", "onKeydown"]));
|
|
92
94
|
}
|
|
93
95
|
});
|
|
94
96
|
export {
|
|
95
|
-
|
|
97
|
+
q as default
|
|
96
98
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import o from "./FieldTypePicker.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const c = /* @__PURE__ */ e(o, [["__scopeId", "data-v-e50c5383"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./MobileListView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e5391fd2"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./NewRowBtn.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-6a136c2a"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableColumnManager.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-8d96e6ee"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
+
import { Component } from 'vue';
|
|
1
2
|
import { TableColumn, ColorMap, Density } from '../../types';
|
|
2
3
|
type TableRow = Record<string, unknown> & {
|
|
3
4
|
id: string;
|
|
4
5
|
};
|
|
6
|
+
export interface RowActionItem {
|
|
7
|
+
key: string;
|
|
8
|
+
label: string;
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
variant?: "default" | "danger";
|
|
11
|
+
icon?: string | Component;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
}
|
|
5
14
|
type __VLS_Props = {
|
|
6
15
|
row: TableRow;
|
|
7
16
|
rowKey?: string;
|
|
@@ -17,6 +26,8 @@ type __VLS_Props = {
|
|
|
17
26
|
* 状态颜色映射,与内置默认映射合并(传入优先)
|
|
18
27
|
*/
|
|
19
28
|
statusColorMap?: ColorMap;
|
|
29
|
+
showRowActions?: boolean;
|
|
30
|
+
rowActionItems?: RowActionItem[];
|
|
20
31
|
};
|
|
21
32
|
declare function __VLS_template(): {
|
|
22
33
|
attrs: Partial<{}>;
|
|
@@ -25,6 +36,12 @@ declare function __VLS_template(): {
|
|
|
25
36
|
row: TableRow;
|
|
26
37
|
col: TableColumn;
|
|
27
38
|
}): any;
|
|
39
|
+
'row-actions'?(_: {
|
|
40
|
+
row: TableRow;
|
|
41
|
+
rowId: string;
|
|
42
|
+
items: RowActionItem[];
|
|
43
|
+
openDetail: () => void;
|
|
44
|
+
}): any;
|
|
28
45
|
};
|
|
29
46
|
refs: {};
|
|
30
47
|
rootEl: HTMLDivElement;
|
|
@@ -43,6 +60,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
43
60
|
selected: boolean;
|
|
44
61
|
priorityColorMap: ColorMap;
|
|
45
62
|
statusColorMap: ColorMap;
|
|
63
|
+
showRowActions: boolean;
|
|
64
|
+
rowActionItems: RowActionItem[];
|
|
46
65
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
47
66
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
48
67
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableDataRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-c81e54a5"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { mergeColorMap as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as N, computed as c, openBlock as l, createElementBlock as n, normalizeStyle as u, normalizeClass as M, withModifiers as g, createElementVNode as k, createCommentVNode as b, Fragment as m, renderList as A, renderSlot as P, toDisplayString as r, createBlock as L, resolveDynamicComponent as U } from "vue";
|
|
2
|
+
import { mergeColorMap as $, DEFAULT_PRIORITY_MAP as V, DEFAULT_STATUS_MAP as X, resolveBadge as D } from "../../composables/useBadge.js";
|
|
3
|
+
const F = ["aria-selected"], z = ["for"], O = ["id", "checked"], G = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-badge of-badge--role"
|
|
6
|
-
},
|
|
6
|
+
}, _ = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "of-td-empty"
|
|
9
|
-
},
|
|
9
|
+
}, j = {
|
|
10
10
|
key: 3,
|
|
11
11
|
class: "of-td-text"
|
|
12
|
-
},
|
|
12
|
+
}, q = {
|
|
13
13
|
key: 4,
|
|
14
14
|
class: "of-td-id"
|
|
15
|
-
},
|
|
15
|
+
}, J = {
|
|
16
16
|
key: 5,
|
|
17
17
|
class: "of-td-title"
|
|
18
|
-
},
|
|
18
|
+
}, Q = {
|
|
19
19
|
key: 6,
|
|
20
20
|
class: "of-td-text"
|
|
21
|
-
},
|
|
21
|
+
}, Z = ["disabled", "onClick", "onKeydown"], oe = /* @__PURE__ */ N({
|
|
22
22
|
__name: "TableDataRow",
|
|
23
23
|
props: {
|
|
24
24
|
row: {},
|
|
@@ -28,11 +28,13 @@ const I = ["aria-selected"], K = ["for"], L = ["id", "checked"], U = {
|
|
|
28
28
|
columns: {},
|
|
29
29
|
density: { default: "standard" },
|
|
30
30
|
priorityColorMap: { default: void 0 },
|
|
31
|
-
statusColorMap: { default: void 0 }
|
|
31
|
+
statusColorMap: { default: void 0 },
|
|
32
|
+
showRowActions: { type: Boolean, default: !0 },
|
|
33
|
+
rowActionItems: { default: () => [] }
|
|
32
34
|
},
|
|
33
35
|
emits: ["select", "click"],
|
|
34
|
-
setup(i, { emit:
|
|
35
|
-
const
|
|
36
|
+
setup(i, { emit: S }) {
|
|
37
|
+
const a = i, f = S, T = {
|
|
36
38
|
compact: {
|
|
37
39
|
rowHeight: 36,
|
|
38
40
|
cellPaddingX: 10,
|
|
@@ -51,108 +53,143 @@ const I = ["aria-selected"], K = ["for"], L = ["id", "checked"], U = {
|
|
|
51
53
|
cellPaddingY: 10,
|
|
52
54
|
fillMinWidth: 240
|
|
53
55
|
}
|
|
54
|
-
},
|
|
55
|
-
minHeight: `${
|
|
56
|
-
})),
|
|
57
|
-
padding: `${
|
|
56
|
+
}, y = c(() => T[a.density]), B = c(() => ({
|
|
57
|
+
minHeight: `${y.value.rowHeight}px`
|
|
58
|
+
})), p = c(() => ({
|
|
59
|
+
padding: `${y.value.cellPaddingY}px ${y.value.cellPaddingX}px`
|
|
58
60
|
}));
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
+
function I(e) {
|
|
62
|
+
const o = p.value;
|
|
61
63
|
if (e.width === "fill") {
|
|
62
|
-
const t = `${e.minWidth ??
|
|
63
|
-
return { ...
|
|
64
|
+
const t = `${e.minWidth ?? y.value.fillMinWidth}px`;
|
|
65
|
+
return { ...o, flex: `1 1 ${t}`, minWidth: t };
|
|
64
66
|
}
|
|
65
|
-
return { ...
|
|
67
|
+
return { ...o, width: `${e.width}px`, flexShrink: "0", flexGrow: "0" };
|
|
66
68
|
}
|
|
67
|
-
const
|
|
68
|
-
() =>
|
|
69
|
-
),
|
|
70
|
-
function
|
|
71
|
-
return
|
|
69
|
+
const R = c(
|
|
70
|
+
() => $(V, a.priorityColorMap)
|
|
71
|
+
), E = c(() => $(X, a.statusColorMap));
|
|
72
|
+
function h(e) {
|
|
73
|
+
return D(e, R.value);
|
|
72
74
|
}
|
|
73
|
-
function
|
|
74
|
-
return
|
|
75
|
+
function C(e) {
|
|
76
|
+
return D(e, E.value);
|
|
75
77
|
}
|
|
76
|
-
function
|
|
78
|
+
function K(e) {
|
|
77
79
|
if (!e) return "-";
|
|
78
|
-
const
|
|
79
|
-
return isNaN(
|
|
80
|
+
const o = new Date(e);
|
|
81
|
+
return isNaN(o.getTime()) ? e : `${o.getMonth() + 1}/${o.getDate()}`;
|
|
80
82
|
}
|
|
81
|
-
function
|
|
82
|
-
return
|
|
83
|
+
function v(e) {
|
|
84
|
+
return a.row[e.key];
|
|
83
85
|
}
|
|
84
|
-
function
|
|
85
|
-
const
|
|
86
|
-
return
|
|
86
|
+
function x(e) {
|
|
87
|
+
const o = v(e);
|
|
88
|
+
return o != null ? String(o) : "-";
|
|
87
89
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
return typeof
|
|
90
|
+
function s(e) {
|
|
91
|
+
const o = v(e);
|
|
92
|
+
return typeof o == "string" ? o : "";
|
|
91
93
|
}
|
|
92
|
-
function
|
|
93
|
-
const e =
|
|
94
|
+
function d() {
|
|
95
|
+
const e = a.row[a.rowKey];
|
|
94
96
|
return e != null ? String(e) : "";
|
|
95
97
|
}
|
|
96
|
-
function
|
|
97
|
-
e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(),
|
|
98
|
+
function Y(e) {
|
|
99
|
+
e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), f("click", a.row)));
|
|
100
|
+
}
|
|
101
|
+
function W(e, o) {
|
|
102
|
+
o.stopPropagation(), !e.disabled && e.onClick();
|
|
98
103
|
}
|
|
99
|
-
|
|
100
|
-
|
|
104
|
+
function H(e, o) {
|
|
105
|
+
o.stopPropagation(), !e.disabled && (o.key !== "Enter" && o.key !== " " || (o.preventDefault(), e.onClick()));
|
|
106
|
+
}
|
|
107
|
+
return (e, o) => (l(), n("div", {
|
|
108
|
+
class: M(["of-table-row", { "of-table-row--selected": i.selected }]),
|
|
101
109
|
role: "row",
|
|
102
110
|
tabindex: "0",
|
|
103
111
|
"aria-selected": i.selected || void 0,
|
|
104
|
-
style:
|
|
105
|
-
onClick:
|
|
106
|
-
onKeydown:
|
|
112
|
+
style: u(B.value),
|
|
113
|
+
onClick: o[3] || (o[3] = (t) => f("click", i.row)),
|
|
114
|
+
onKeydown: Y
|
|
107
115
|
}, [
|
|
108
|
-
i.selectable ? (
|
|
116
|
+
i.selectable ? (l(), n("div", {
|
|
109
117
|
key: 0,
|
|
110
118
|
class: "of-td of-td-checkbox",
|
|
111
119
|
role: "gridcell",
|
|
112
|
-
style:
|
|
113
|
-
onClick:
|
|
120
|
+
style: u(p.value),
|
|
121
|
+
onClick: o[1] || (o[1] = g(() => {
|
|
114
122
|
}, ["stop"]))
|
|
115
123
|
}, [
|
|
116
|
-
|
|
124
|
+
k("label", {
|
|
117
125
|
class: "of-checkbox-label",
|
|
118
|
-
for: `of-table-row-checkbox-${
|
|
126
|
+
for: `of-table-row-checkbox-${d()}`
|
|
119
127
|
}, [
|
|
120
|
-
|
|
121
|
-
id: `of-table-row-checkbox-${
|
|
128
|
+
k("input", {
|
|
129
|
+
id: `of-table-row-checkbox-${d()}`,
|
|
122
130
|
type: "checkbox",
|
|
123
131
|
class: "of-checkbox",
|
|
124
132
|
checked: i.selected,
|
|
125
|
-
onChange:
|
|
126
|
-
}, null, 40,
|
|
127
|
-
|
|
128
|
-
], 8,
|
|
129
|
-
], 4)) :
|
|
130
|
-
(
|
|
133
|
+
onChange: o[0] || (o[0] = (t) => f("select", d()))
|
|
134
|
+
}, null, 40, O),
|
|
135
|
+
o[4] || (o[4] = k("span", { class: "of-sr-only" }, "选择当前行", -1))
|
|
136
|
+
], 8, z)
|
|
137
|
+
], 4)) : b("", !0),
|
|
138
|
+
(l(!0), n(m, null, A(i.columns, (t) => (l(), n("div", {
|
|
131
139
|
key: t.key,
|
|
132
140
|
class: "of-td",
|
|
133
141
|
role: "gridcell",
|
|
134
|
-
style:
|
|
142
|
+
style: u(I(t))
|
|
135
143
|
}, [
|
|
136
|
-
|
|
144
|
+
P(e.$slots, "cell", {
|
|
137
145
|
row: i.row,
|
|
138
146
|
col: t
|
|
139
147
|
}, () => [
|
|
140
|
-
t.key === "status" ? (
|
|
148
|
+
t.key === "status" ? (l(), n("span", {
|
|
141
149
|
key: 0,
|
|
142
150
|
class: "of-badge",
|
|
143
|
-
style:
|
|
144
|
-
}, r(
|
|
151
|
+
style: u(C(s(t)).style)
|
|
152
|
+
}, r(C(s(t)).label), 5)) : t.key === "priority" ? (l(), n("span", {
|
|
145
153
|
key: 1,
|
|
146
154
|
class: "of-badge",
|
|
147
|
-
style:
|
|
148
|
-
}, r(
|
|
149
|
-
|
|
150
|
-
], 64)) : t.key === "updatedAt" ? (
|
|
155
|
+
style: u(h(s(t)).style)
|
|
156
|
+
}, r(h(s(t)).label), 5)) : t.key === "role" ? (l(), n(m, { key: 2 }, [
|
|
157
|
+
s(t) ? (l(), n("span", G, r(s(t)), 1)) : (l(), n("span", _, "-"))
|
|
158
|
+
], 64)) : t.key === "updatedAt" ? (l(), n("span", j, r(K(s(t))), 1)) : t.key === "id" ? (l(), n("span", q, r(d()), 1)) : t.key === "title" ? (l(), n("span", J, r(x(t)), 1)) : (l(), n("span", Q, r(x(t)), 1))
|
|
159
|
+
], !0)
|
|
160
|
+
], 4))), 128)),
|
|
161
|
+
i.showRowActions && i.rowActionItems.length ? (l(), n("div", {
|
|
162
|
+
key: 1,
|
|
163
|
+
class: "of-table-row__actions",
|
|
164
|
+
"aria-label": "行快捷操作",
|
|
165
|
+
onClick: o[2] || (o[2] = g(() => {
|
|
166
|
+
}, ["stop"]))
|
|
167
|
+
}, [
|
|
168
|
+
P(e.$slots, "row-actions", {
|
|
169
|
+
row: i.row,
|
|
170
|
+
rowId: d(),
|
|
171
|
+
items: i.rowActionItems,
|
|
172
|
+
openDetail: () => f("click", i.row)
|
|
173
|
+
}, () => [
|
|
174
|
+
(l(!0), n(m, null, A(i.rowActionItems, (t) => (l(), n("button", {
|
|
175
|
+
key: t.key,
|
|
176
|
+
type: "button",
|
|
177
|
+
class: M(["of-table-row__action-btn", { "of-table-row__action-btn--danger": t.variant === "danger" }]),
|
|
178
|
+
disabled: t.disabled,
|
|
179
|
+
onClick: g((w) => W(t, w), ["stop"]),
|
|
180
|
+
onKeydown: (w) => H(t, w)
|
|
181
|
+
}, [
|
|
182
|
+
t.icon ? (l(), L(U(t.icon), {
|
|
183
|
+
key: 0,
|
|
184
|
+
class: "of-table-row__action-icon"
|
|
185
|
+
})) : b("", !0),
|
|
186
|
+
k("span", null, r(t.label), 1)
|
|
187
|
+
], 42, Z))), 128))
|
|
151
188
|
], !0)
|
|
152
|
-
]
|
|
153
|
-
], 46,
|
|
189
|
+
])) : b("", !0)
|
|
190
|
+
], 46, F));
|
|
154
191
|
}
|
|
155
192
|
});
|
|
156
193
|
export {
|
|
157
|
-
|
|
194
|
+
oe as default
|
|
158
195
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableFilterPanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-66f74376"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableGroupRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import r from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2d6dc6c9"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableHeaderRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const m = /* @__PURE__ */
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ e(o, [["__scopeId", "data-v-67029c0e"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableToolbar.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import a from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-8aa06fe0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./Tabs.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-43719fd1"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./ActivityTimeline.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-
|
|
4
|
+
const r = /* @__PURE__ */ o(t, [["__scopeId", "data-v-98deb1a5"]]);
|
|
5
5
|
export {
|
|
6
6
|
r as default
|
|
7
7
|
};
|