@oneflowui/ui 0.5.5 → 0.5.7
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/ContextMenu/index.vue.js +2 -2
- package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
- package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
- package/dist/components/Dashboard/index.vue.d.ts +2 -1
- package/dist/components/Dashboard/index.vue.js +2 -2
- package/dist/components/ai/AiSender.vue.js +2 -2
- package/dist/components/ai/AiSender.vue2.js +8 -7
- package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
- package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
- package/dist/components/auxiliary/FileUpload.vue.js +2 -2
- package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
- package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
- package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
- package/dist/components/base/Accordion.vue.js +1 -1
- package/dist/components/base/Avatar.vue.d.ts +3 -0
- package/dist/components/base/Avatar.vue.js +4 -4
- package/dist/components/base/Avatar.vue2.js +8 -8
- package/dist/components/base/Badge.vue.d.ts +2 -0
- package/dist/components/base/Badge.vue.js +2 -2
- package/dist/components/base/Badge.vue2.js +2 -2
- package/dist/components/base/ButtonGroup.vue.js +2 -2
- package/dist/components/base/ButtonGroup.vue2.js +2 -2
- package/dist/components/base/ChainItem.vue.d.ts +6 -0
- package/dist/components/base/ChainItem.vue.js +2 -2
- package/dist/components/base/ChainItem.vue2.js +17 -17
- package/dist/components/base/DropdownMenu.vue.js +2 -2
- package/dist/components/base/DropdownMenu.vue2.js +22 -20
- package/dist/components/base/EmptyState.vue.js +2 -2
- package/dist/components/base/EmptyState.vue2.js +2 -2
- package/dist/components/base/InfoCard.vue.d.ts +9 -0
- package/dist/components/base/InfoCard.vue.js +2 -2
- package/dist/components/base/InfoCard.vue2.js +65 -57
- package/dist/components/base/MonitorItem.vue.js +2 -2
- package/dist/components/base/MonitorItem.vue2.js +33 -25
- package/dist/components/base/PersonaCard.vue.d.ts +5 -0
- package/dist/components/base/PersonaCard.vue.js +3 -3
- package/dist/components/base/PersonaCard.vue2.js +56 -50
- package/dist/components/base/ProgressBar.vue.d.ts +1 -0
- package/dist/components/base/ProgressBar.vue.js +2 -2
- package/dist/components/base/ProgressBar.vue2.js +10 -10
- package/dist/components/base/RangeSlider.vue.d.ts +15 -0
- package/dist/components/base/RangeSlider.vue.js +1 -1
- package/dist/components/base/RangeSlider.vue2.js +22 -15
- package/dist/components/base/RefTag.vue.d.ts +4 -0
- package/dist/components/base/RefTag.vue.js +3 -3
- package/dist/components/base/RefTag.vue2.js +14 -14
- package/dist/components/base/SearchHighlight.vue.js +1 -1
- package/dist/components/base/SectionBlock.vue.js +2 -2
- package/dist/components/base/SectionBlock.vue2.js +54 -48
- package/dist/components/base/SelectBadge.vue.d.ts +5 -0
- package/dist/components/base/SelectBadge.vue.js +3 -3
- package/dist/components/base/SelectBadge.vue2.js +36 -28
- package/dist/components/base/StatisticCard.vue.js +1 -1
- package/dist/components/base/StatusIndicator.vue.js +2 -2
- package/dist/components/base/StatusIndicator.vue2.js +2 -2
- package/dist/components/base/StatusSummary.vue.js +2 -2
- 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 +2 -2
- package/dist/components/base/ViewModeGroup.vue.js +1 -1
- package/dist/components/base/ViewModeGroup.vue2.js +3 -3
- package/dist/components/base/ViewSwitcher.vue.js +1 -1
- package/dist/components/base/ViewSwitcher.vue2.js +3 -3
- package/dist/components/base/ViewTab.vue.js +1 -1
- package/dist/components/base/ViewTab.vue2.js +5 -6
- package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
- package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
- package/dist/components/detail/PropPanel.vue.js +2 -2
- package/dist/components/detail/PropPanel.vue2.js +34 -30
- package/dist/components/detail/PropRow.vue.d.ts +6 -0
- package/dist/components/detail/PropRow.vue.js +2 -2
- package/dist/components/detail/PropRow.vue2.js +24 -24
- package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
- package/dist/components/editor/BlockQuote.vue.js +1 -1
- package/dist/components/editor/BlockQuote.vue2.js +43 -29
- package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
- package/dist/components/editor/ContentBlock.vue.js +2 -2
- package/dist/components/editor/ContentBlock.vue2.js +54 -33
- package/dist/components/editor/RichTextEditor.vue.js +2 -2
- package/dist/components/editor/RichTextEditor.vue2.js +10 -14
- package/dist/components/field/FieldAttachment.vue.js +2 -2
- package/dist/components/field/FieldAttachment.vue2.js +30 -32
- package/dist/components/field/FieldAutoNumber.vue.js +2 -2
- package/dist/components/field/FieldCheckbox.vue.js +2 -2
- package/dist/components/field/FieldCheckbox.vue2.js +13 -11
- package/dist/components/field/FieldCreator.vue.js +2 -2
- package/dist/components/field/FieldCurrency.vue.js +2 -2
- package/dist/components/field/FieldCurrency.vue2.js +15 -14
- package/dist/components/field/FieldDate.vue.js +1 -1
- package/dist/components/field/FieldDate.vue2.js +14 -16
- package/dist/components/field/FieldDatetime.vue.js +1 -1
- package/dist/components/field/FieldDatetime.vue2.js +12 -11
- package/dist/components/field/FieldEmail.vue.js +2 -2
- package/dist/components/field/FieldEmail.vue2.js +14 -13
- package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
- package/dist/components/field/FieldMultiSelect.vue.js +2 -2
- package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
- package/dist/components/field/FieldNumber.vue.js +3 -3
- package/dist/components/field/FieldNumber.vue2.js +19 -18
- package/dist/components/field/FieldPhone.vue.js +2 -2
- package/dist/components/field/FieldPhone.vue2.js +12 -11
- package/dist/components/field/FieldProgress.vue.js +1 -1
- package/dist/components/field/FieldProgress.vue2.js +18 -17
- package/dist/components/field/FieldRating.vue.js +2 -2
- package/dist/components/field/FieldRating.vue2.js +22 -16
- package/dist/components/field/FieldRelation.vue.js +1 -1
- package/dist/components/field/FieldRelation.vue2.js +25 -22
- package/dist/components/field/FieldRichText.vue.js +1 -1
- package/dist/components/field/FieldRichText.vue2.js +10 -7
- package/dist/components/field/FieldSelect.vue.js +2 -2
- package/dist/components/field/FieldSelect.vue2.js +81 -63
- package/dist/components/field/FieldText.vue.js +2 -2
- package/dist/components/field/FieldText.vue2.js +17 -16
- package/dist/components/field/FieldUrl.vue.js +2 -2
- package/dist/components/field/FieldUrl.vue2.js +17 -16
- package/dist/components/form/FormDesigner.vue.js +2 -2
- package/dist/components/form/FormDesigner.vue2.js +83 -78
- package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
- package/dist/components/gallery/GalleryCard.vue.js +2 -2
- package/dist/components/gallery/GalleryCard.vue2.js +2 -1
- package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
- package/dist/components/kanban/KanbanCard.vue.js +1 -1
- package/dist/components/kanban/KanbanCard.vue2.js +15 -14
- package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
- package/dist/components/kanban/KanbanColumn.vue.js +2 -2
- package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
- package/dist/components/kanban/QuickAddRow.vue.js +2 -2
- package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
- package/dist/components/layout/Navbar.vue.js +3 -3
- package/dist/components/layout/Navbar.vue2.js +5 -4
- package/dist/components/layout/Sidebar.vue.js +2 -2
- package/dist/components/layout/Sidebar.vue2.js +1 -1
- package/dist/components/mermaid/MermaidChart.vue.js +2 -2
- package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
- package/dist/components/overlay/Dialog.vue.d.ts +1 -0
- package/dist/components/overlay/Dialog.vue.js +1 -1
- package/dist/components/overlay/Dialog.vue2.js +9 -9
- package/dist/components/overlay/Drawer.vue.d.ts +1 -0
- package/dist/components/overlay/Drawer.vue.js +2 -2
- package/dist/components/overlay/Drawer.vue2.js +35 -29
- package/dist/components/overlay/Modal.vue.d.ts +1 -0
- package/dist/components/overlay/Modal.vue.js +1 -1
- package/dist/components/overlay/Modal.vue2.js +34 -28
- package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
- package/dist/components/overlay/SidePanel.vue.js +1 -1
- package/dist/components/overlay/SidePanel.vue2.js +6 -6
- package/dist/components/split/SplitPane.vue.js +2 -2
- package/dist/components/split/SplitPane.vue2.js +11 -9
- package/dist/components/table/ColumnHeaderMenu.vue.d.ts +2 -0
- package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
- package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
- package/dist/components/table/DataTable.vue.d.ts +12 -5
- package/dist/components/table/DataTable.vue.js +4 -4
- package/dist/components/table/DataTable.vue2.js +535 -477
- package/dist/components/table/DetailSheet.vue.js +2 -2
- package/dist/components/table/DetailSheet.vue2.js +45 -40
- package/dist/components/table/FieldCell.vue.d.ts +2 -1
- package/dist/components/table/FieldCell.vue.js +1 -1
- package/dist/components/table/FieldCell.vue2.js +57 -48
- package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
- package/dist/components/table/FieldTypePicker.vue.js +4 -4
- package/dist/components/table/FieldTypePicker.vue2.js +1 -1
- package/dist/components/table/MobileListView.vue.d.ts +26 -3
- package/dist/components/table/MobileListView.vue.js +2 -2
- package/dist/components/table/MobileListView.vue2.js +65 -49
- package/dist/components/table/TableColumnManager.vue.js +1 -1
- package/dist/components/table/TableColumnManager.vue2.js +29 -28
- package/dist/components/table/TableDataRow.vue.d.ts +2 -0
- package/dist/components/table/TableDataRow.vue.js +4 -4
- package/dist/components/table/TableDataRow.vue2.js +70 -58
- package/dist/components/table/TableFilterPanel.vue.js +2 -2
- package/dist/components/table/TableFilterPanel.vue2.js +3 -0
- package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
- package/dist/components/table/TableGroupRow.vue.js +2 -2
- package/dist/components/table/TableGroupRow.vue2.js +35 -30
- package/dist/components/table/TableHeaderRow.vue.js +3 -3
- package/dist/components/table/TableHeaderRow.vue2.js +63 -46
- package/dist/components/table/TableToolbar.vue.js +1 -1
- package/dist/components/table/TableToolbar.vue2.js +2 -2
- package/dist/components/tabs/TabPanel.vue.js +4 -4
- package/dist/components/tabs/TabPanel.vue2.js +1 -1
- package/dist/components/tabs/Tabs.vue.js +2 -2
- package/dist/components/tabs/Tabs.vue2.js +2 -2
- package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
- package/dist/components/timeline/GanttRow.vue.js +2 -2
- package/dist/components/timeline/GanttRow.vue2.js +68 -52
- package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
- package/dist/components/timeline/GanttTimeline.vue.js +2 -2
- package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
- package/dist/composables/useKeyboardNavigation.d.ts +1 -1
- package/dist/composables/useRowDrag.d.ts +6 -4
- package/dist/composables/useRowDrag.js +24 -24
- package/dist/composables/useSupabaseProvider.d.ts +8 -1
- package/dist/composables/useTableData.d.ts +5 -3
- package/dist/composables/useTableGroup.d.ts +2 -2
- package/dist/composables/useViewPersistence.d.ts +32 -3
- package/dist/composables/useVirtualList.js +60 -59
- package/dist/plugin.js +103 -102
- package/dist/style.css +1 -1
- package/dist/utils/echarts.d.ts +1 -0
- package/dist/utils/supabaseSchema.d.ts +12 -0
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { X as N, Eye as B, EyeOff as D, GripVertical as
|
|
3
|
-
import { VueDraggable as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as v, ref as k, watch as C, openBlock as r, createElementBlock as d, createElementVNode as n, createVNode as l, unref as s, createTextVNode as u, withCtx as V, Fragment as y, renderList as E, normalizeClass as x, toDisplayString as z, createCommentVNode as w } from "vue";
|
|
2
|
+
import { X as N, Eye as B, EyeOff as D, GripVertical as $ } from "lucide-vue-next";
|
|
3
|
+
import { VueDraggable as A } from "vue-draggable-plus";
|
|
4
|
+
const T = {
|
|
5
5
|
key: 0,
|
|
6
6
|
class: "of-col-manager"
|
|
7
|
-
},
|
|
7
|
+
}, U = { class: "of-col-manager__header" }, F = { class: "of-col-manager__actions" }, G = { class: "of-col-manager__drag" }, L = ["aria-label", "checked", "onChange"], j = /* @__PURE__ */ v({
|
|
8
8
|
__name: "TableColumnManager",
|
|
9
9
|
props: {
|
|
10
10
|
columns: {},
|
|
@@ -15,35 +15,35 @@ const U = {
|
|
|
15
15
|
const _ = c, m = f, t = k([]);
|
|
16
16
|
C(
|
|
17
17
|
() => _.columns,
|
|
18
|
-
(
|
|
19
|
-
t.value =
|
|
18
|
+
(a) => {
|
|
19
|
+
t.value = a.map((e) => ({ ...e }));
|
|
20
20
|
},
|
|
21
21
|
{ immediate: !0, deep: !0 }
|
|
22
22
|
);
|
|
23
23
|
function i() {
|
|
24
24
|
m(
|
|
25
25
|
"update:columns",
|
|
26
|
-
t.value.map((
|
|
26
|
+
t.value.map((a) => ({ ...a }))
|
|
27
27
|
);
|
|
28
28
|
}
|
|
29
|
-
function g(
|
|
30
|
-
|
|
29
|
+
function g(a) {
|
|
30
|
+
a.hidden = !a.hidden, i();
|
|
31
31
|
}
|
|
32
32
|
function p() {
|
|
33
|
-
t.value.forEach((
|
|
33
|
+
t.value.forEach((a) => a.hidden = !1), i();
|
|
34
34
|
}
|
|
35
|
-
function
|
|
36
|
-
t.value.forEach((
|
|
35
|
+
function b() {
|
|
36
|
+
t.value.forEach((a) => a.hidden = !0), i();
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function h() {
|
|
39
39
|
i();
|
|
40
40
|
}
|
|
41
|
-
return (
|
|
42
|
-
n("div",
|
|
41
|
+
return (a, e) => c.visible ? (r(), d("div", T, [
|
|
42
|
+
n("div", U, [
|
|
43
43
|
e[2] || (e[2] = n("span", { class: "of-col-manager__title" }, "管理列", -1)),
|
|
44
44
|
n("button", {
|
|
45
45
|
class: "of-col-manager__close",
|
|
46
|
-
onClick: e[0] || (e[0] = (
|
|
46
|
+
onClick: e[0] || (e[0] = (o) => m("close"))
|
|
47
47
|
}, [
|
|
48
48
|
l(s(N), { size: 14 })
|
|
49
49
|
])
|
|
@@ -58,36 +58,37 @@ const U = {
|
|
|
58
58
|
]),
|
|
59
59
|
n("button", {
|
|
60
60
|
class: "of-col-manager__action-btn",
|
|
61
|
-
onClick:
|
|
61
|
+
onClick: b
|
|
62
62
|
}, [
|
|
63
63
|
l(s(D), { size: 12 }),
|
|
64
64
|
e[4] || (e[4] = u(" 隐藏全部 ", -1))
|
|
65
65
|
])
|
|
66
66
|
]),
|
|
67
|
-
l(s(
|
|
67
|
+
l(s(A), {
|
|
68
68
|
modelValue: t.value,
|
|
69
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
69
|
+
"onUpdate:modelValue": e[1] || (e[1] = (o) => t.value = o),
|
|
70
70
|
handle: ".of-col-manager__drag",
|
|
71
71
|
animation: 150,
|
|
72
|
-
onEnd:
|
|
72
|
+
onEnd: h
|
|
73
73
|
}, {
|
|
74
74
|
default: V(() => [
|
|
75
|
-
(r(!0), d(y, null, E(t.value, (
|
|
76
|
-
key:
|
|
75
|
+
(r(!0), d(y, null, E(t.value, (o) => (r(), d("div", {
|
|
76
|
+
key: o.key,
|
|
77
77
|
class: "of-col-manager__row"
|
|
78
78
|
}, [
|
|
79
79
|
n("span", G, [
|
|
80
|
-
l(s(
|
|
80
|
+
l(s($), { size: 14 })
|
|
81
81
|
]),
|
|
82
82
|
n("input", {
|
|
83
83
|
type: "checkbox",
|
|
84
84
|
class: "of-col-manager__checkbox",
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
"aria-label": `显示列 ${o.label}`,
|
|
86
|
+
checked: !o.hidden,
|
|
87
|
+
onChange: (M) => g(o)
|
|
87
88
|
}, null, 40, L),
|
|
88
89
|
n("span", {
|
|
89
|
-
class: x(["of-col-manager__label", { dimmed:
|
|
90
|
-
}, z(
|
|
90
|
+
class: x(["of-col-manager__label", { dimmed: o.hidden }])
|
|
91
|
+
}, z(o.label), 3)
|
|
91
92
|
]))), 128))
|
|
92
93
|
]),
|
|
93
94
|
_: 1
|
|
@@ -39,6 +39,8 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
39
39
|
selectable: boolean;
|
|
40
40
|
rowKey: string;
|
|
41
41
|
selected: boolean;
|
|
42
|
+
priorityColorMap: ColorMap;
|
|
43
|
+
statusColorMap: ColorMap;
|
|
42
44
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
43
45
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
44
46
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./TableDataRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-1b2affaf"]]);
|
|
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 D, computed as p, openBlock as n, createElementBlock as r, normalizeClass as T, withModifiers as B, createElementVNode as u, createCommentVNode as A, Fragment as w, renderList as R, normalizeStyle as f, renderSlot as E, toDisplayString as a } from "vue";
|
|
2
|
+
import { mergeColorMap as b, DEFAULT_PRIORITY_MAP as P, DEFAULT_STATUS_MAP as _, resolveBadge as h } from "../../composables/useBadge.js";
|
|
3
|
+
const K = ["aria-selected"], N = ["for"], V = ["id", "checked"], F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-badge of-badge--role"
|
|
6
|
-
},
|
|
6
|
+
}, I = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "of-td-empty"
|
|
9
|
-
},
|
|
9
|
+
}, L = {
|
|
10
10
|
key: 3,
|
|
11
11
|
class: "of-td-text"
|
|
12
|
-
},
|
|
12
|
+
}, U = {
|
|
13
13
|
key: 4,
|
|
14
14
|
class: "of-td-id"
|
|
15
|
-
},
|
|
15
|
+
}, z = {
|
|
16
16
|
key: 5,
|
|
17
17
|
class: "of-td-title"
|
|
18
|
-
},
|
|
18
|
+
}, W = {
|
|
19
19
|
key: 6,
|
|
20
20
|
class: "of-td-text"
|
|
21
|
-
},
|
|
21
|
+
}, Y = /* @__PURE__ */ D({
|
|
22
22
|
__name: "TableDataRow",
|
|
23
23
|
props: {
|
|
24
24
|
row: {},
|
|
@@ -26,94 +26,106 @@ const E = ["aria-selected"], N = ["checked"], V = {
|
|
|
26
26
|
selected: { type: Boolean, default: !1 },
|
|
27
27
|
selectable: { type: Boolean, default: !0 },
|
|
28
28
|
columns: {},
|
|
29
|
-
priorityColorMap: {},
|
|
30
|
-
statusColorMap: {}
|
|
29
|
+
priorityColorMap: { default: void 0 },
|
|
30
|
+
statusColorMap: { default: void 0 }
|
|
31
31
|
},
|
|
32
32
|
emits: ["select", "click"],
|
|
33
|
-
setup(l, { emit:
|
|
34
|
-
const i = l,
|
|
33
|
+
setup(l, { emit: x }) {
|
|
34
|
+
const i = l, c = x;
|
|
35
35
|
function C(e) {
|
|
36
36
|
if (e.width === "fill") {
|
|
37
|
-
const
|
|
38
|
-
return { flex: `1 1 ${
|
|
37
|
+
const t = `${e.minWidth ?? 220}px`;
|
|
38
|
+
return { flex: `1 1 ${t}`, minWidth: t };
|
|
39
39
|
}
|
|
40
40
|
return { width: `${e.width}px`, flexShrink: "0", flexGrow: "0" };
|
|
41
41
|
}
|
|
42
|
-
const v =
|
|
43
|
-
() =>
|
|
44
|
-
),
|
|
45
|
-
function
|
|
42
|
+
const v = p(
|
|
43
|
+
() => b(P, i.priorityColorMap)
|
|
44
|
+
), M = p(() => b(_, i.statusColorMap));
|
|
45
|
+
function y(e) {
|
|
46
46
|
return h(e, v.value);
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return h(e,
|
|
48
|
+
function k(e) {
|
|
49
|
+
return h(e, M.value);
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function S(e) {
|
|
52
52
|
if (!e) return "-";
|
|
53
|
-
const
|
|
54
|
-
return isNaN(
|
|
53
|
+
const t = new Date(e);
|
|
54
|
+
return isNaN(t.getTime()) ? e : `${t.getMonth() + 1}/${t.getDate()}`;
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function g(e) {
|
|
57
57
|
return i.row[e.key];
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
const
|
|
61
|
-
return
|
|
59
|
+
function m(e) {
|
|
60
|
+
const t = g(e);
|
|
61
|
+
return t != null ? String(t) : "-";
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
const
|
|
65
|
-
return typeof
|
|
63
|
+
function s(e) {
|
|
64
|
+
const t = g(e);
|
|
65
|
+
return typeof t == "string" ? t : "";
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function d() {
|
|
68
68
|
const e = i.row[i.rowKey];
|
|
69
69
|
return e != null ? String(e) : "";
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
71
|
+
function $(e) {
|
|
72
|
+
e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), c("click", i.row)));
|
|
73
|
+
}
|
|
74
|
+
return (e, t) => (n(), r("div", {
|
|
75
|
+
class: T(["of-table-row", { "of-table-row--selected": l.selected }]),
|
|
73
76
|
role: "row",
|
|
77
|
+
tabindex: "0",
|
|
74
78
|
"aria-selected": l.selected || void 0,
|
|
75
|
-
onClick:
|
|
79
|
+
onClick: t[2] || (t[2] = (o) => c("click", l.row)),
|
|
80
|
+
onKeydown: $
|
|
76
81
|
}, [
|
|
77
|
-
l.selectable ? (n(),
|
|
82
|
+
l.selectable ? (n(), r("div", {
|
|
78
83
|
key: 0,
|
|
79
84
|
class: "of-td of-td-checkbox",
|
|
80
85
|
role: "gridcell",
|
|
81
|
-
onClick:
|
|
86
|
+
onClick: t[1] || (t[1] = B(() => {
|
|
82
87
|
}, ["stop"]))
|
|
83
88
|
}, [
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
89
|
+
u("label", {
|
|
90
|
+
class: "of-checkbox-label",
|
|
91
|
+
for: `of-table-row-checkbox-${d()}`
|
|
92
|
+
}, [
|
|
93
|
+
u("input", {
|
|
94
|
+
id: `of-table-row-checkbox-${d()}`,
|
|
95
|
+
type: "checkbox",
|
|
96
|
+
class: "of-checkbox",
|
|
97
|
+
checked: l.selected,
|
|
98
|
+
onChange: t[0] || (t[0] = (o) => c("select", d()))
|
|
99
|
+
}, null, 40, V),
|
|
100
|
+
t[3] || (t[3] = u("span", { class: "of-sr-only" }, "选择当前行", -1))
|
|
101
|
+
], 8, N)
|
|
102
|
+
])) : A("", !0),
|
|
103
|
+
(n(!0), r(w, null, R(l.columns, (o) => (n(), r("div", {
|
|
104
|
+
key: o.key,
|
|
93
105
|
class: "of-td",
|
|
94
106
|
role: "gridcell",
|
|
95
|
-
style:
|
|
107
|
+
style: f(C(o))
|
|
96
108
|
}, [
|
|
97
|
-
|
|
109
|
+
E(e.$slots, "cell", {
|
|
98
110
|
row: l.row,
|
|
99
|
-
col:
|
|
111
|
+
col: o
|
|
100
112
|
}, () => [
|
|
101
|
-
|
|
113
|
+
o.key === "status" ? (n(), r("span", {
|
|
102
114
|
key: 0,
|
|
103
115
|
class: "of-badge",
|
|
104
|
-
style:
|
|
105
|
-
}, a(
|
|
116
|
+
style: f(k(s(o)).style)
|
|
117
|
+
}, a(k(s(o)).label), 5)) : o.key === "priority" ? (n(), r("span", {
|
|
106
118
|
key: 1,
|
|
107
119
|
class: "of-badge",
|
|
108
|
-
style:
|
|
109
|
-
}, a(
|
|
110
|
-
|
|
111
|
-
], 64)) :
|
|
120
|
+
style: f(y(s(o)).style)
|
|
121
|
+
}, a(y(s(o)).label), 5)) : o.key === "role" ? (n(), r(w, { key: 2 }, [
|
|
122
|
+
s(o) ? (n(), r("span", F, a(s(o)), 1)) : (n(), r("span", I, "-"))
|
|
123
|
+
], 64)) : o.key === "updatedAt" ? (n(), r("span", L, a(S(s(o))), 1)) : o.key === "id" ? (n(), r("span", U, a(d()), 1)) : o.key === "title" ? (n(), r("span", z, a(m(o)), 1)) : (n(), r("span", W, a(m(o)), 1))
|
|
112
124
|
], !0)
|
|
113
125
|
], 4))), 128))
|
|
114
|
-
],
|
|
126
|
+
], 42, K));
|
|
115
127
|
}
|
|
116
128
|
});
|
|
117
129
|
export {
|
|
118
|
-
|
|
130
|
+
Y as default
|
|
119
131
|
};
|
|
@@ -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 c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-3e9c57c5"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
c as default
|
|
7
7
|
};
|
|
@@ -85,6 +85,7 @@ const x = {
|
|
|
85
85
|
])),
|
|
86
86
|
i("select", {
|
|
87
87
|
class: "of-filter-condition__select of-filter-condition__select--field",
|
|
88
|
+
"aria-label": "筛选字段",
|
|
88
89
|
value: l.field,
|
|
89
90
|
onChange: (t) => a("update-condition", l.id, { field: t.target.value })
|
|
90
91
|
}, [
|
|
@@ -95,6 +96,7 @@ const x = {
|
|
|
95
96
|
], 40, w),
|
|
96
97
|
i("select", {
|
|
97
98
|
class: "of-filter-condition__select",
|
|
99
|
+
"aria-label": "筛选条件",
|
|
98
100
|
value: l.operator,
|
|
99
101
|
onChange: (t) => a("update-condition", l.id, {
|
|
100
102
|
operator: t.target.value
|
|
@@ -108,6 +110,7 @@ const x = {
|
|
|
108
110
|
h(l.operator) ? (o(), n("span", L)) : (o(), n("input", {
|
|
109
111
|
key: 2,
|
|
110
112
|
class: "of-filter-condition__input",
|
|
113
|
+
"aria-label": "筛选值",
|
|
111
114
|
value: l.value,
|
|
112
115
|
placeholder: "输入值...",
|
|
113
116
|
onInput: (t) => a("update-condition", l.id, { value: t.target.value })
|
|
@@ -17,6 +17,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
17
17
|
}>, {
|
|
18
18
|
collapsed: boolean;
|
|
19
19
|
selectable: boolean;
|
|
20
|
+
colorMap: ColorMap;
|
|
20
21
|
level: number;
|
|
22
|
+
aggregations: Record<string, number>;
|
|
21
23
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
22
24
|
export default _default;
|
|
@@ -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 m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-42db94c3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,62 +1,67 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as k, computed as c, openBlock as a, createElementBlock as r, normalizeStyle as d, createElementVNode as g, createCommentVNode as p, normalizeClass as x, createTextVNode as h, toDisplayString as u, Fragment as B, renderList as K } from "vue";
|
|
2
2
|
import { resolveBadge as C } from "../../composables/useBadge.js";
|
|
3
|
-
const N = {
|
|
3
|
+
const N = ["aria-expanded"], T = {
|
|
4
4
|
class: "of-table-group-row__cell",
|
|
5
5
|
role: "gridcell"
|
|
6
|
-
},
|
|
6
|
+
}, D = {
|
|
7
7
|
key: 0,
|
|
8
8
|
class: "of-table-group-row__checkbox-spacer"
|
|
9
|
-
},
|
|
9
|
+
}, E = {
|
|
10
10
|
key: 2,
|
|
11
11
|
class: "of-table-group-row__label"
|
|
12
|
-
},
|
|
13
|
-
name: "TableGroupRow",
|
|
12
|
+
}, L = { class: "of-table-group-row__count" }, V = /* @__PURE__ */ k({
|
|
14
13
|
__name: "TableGroupRow",
|
|
15
14
|
props: {
|
|
16
15
|
groupKey: {},
|
|
17
16
|
count: {},
|
|
18
17
|
collapsed: { type: Boolean, default: !1 },
|
|
19
|
-
colorMap: {},
|
|
18
|
+
colorMap: { default: void 0 },
|
|
20
19
|
selectable: { type: Boolean, default: !0 },
|
|
21
20
|
level: { default: 0 },
|
|
22
|
-
aggregations: {}
|
|
21
|
+
aggregations: { default: void 0 }
|
|
23
22
|
},
|
|
24
23
|
emits: ["toggle"],
|
|
25
|
-
setup(n, { emit:
|
|
26
|
-
const
|
|
27
|
-
const [,
|
|
28
|
-
return { key:
|
|
24
|
+
setup(n, { emit: f }) {
|
|
25
|
+
const t = n, i = f, s = c(() => t.colorMap ? C(t.groupKey, t.colorMap) : null), b = c(() => t.groupKey || "(空)"), m = c(() => t.level * 16), _ = c(() => t.aggregations ? Object.entries(t.aggregations).map(([e, l]) => {
|
|
26
|
+
const [, o] = e.split(":"), v = o === "sum" ? "总计" : o === "avg" ? "平均" : o === "min" ? "最小" : o === "max" ? "最大" : "计数", w = typeof l == "number" && !Number.isInteger(l) ? l.toFixed(2) : String(l);
|
|
27
|
+
return { key: e, label: v, value: w };
|
|
29
28
|
}) : []);
|
|
30
|
-
|
|
29
|
+
function y(e) {
|
|
30
|
+
e.target === e.currentTarget && (e.key !== "Enter" && e.key !== " " || (e.preventDefault(), i("toggle")));
|
|
31
|
+
}
|
|
32
|
+
return (e, l) => (a(), r("div", {
|
|
31
33
|
class: "of-table-group-row",
|
|
32
34
|
role: "row",
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
tabindex: "0",
|
|
36
|
+
"aria-expanded": !n.collapsed,
|
|
37
|
+
style: d({ paddingLeft: `${12 + m.value}px` }),
|
|
38
|
+
onClick: l[0] || (l[0] = (o) => i("toggle")),
|
|
39
|
+
onKeydown: y
|
|
35
40
|
}, [
|
|
36
|
-
g("div",
|
|
37
|
-
n.selectable ? (
|
|
41
|
+
g("div", T, [
|
|
42
|
+
n.selectable ? (a(), r("div", D)) : p("", !0),
|
|
38
43
|
g("span", {
|
|
39
|
-
class:
|
|
44
|
+
class: x(["of-table-group-row__chevron", { "of-table-group-row__chevron--collapsed": n.collapsed }])
|
|
40
45
|
}, "▼", 2),
|
|
41
|
-
|
|
46
|
+
s.value ? (a(), r("span", {
|
|
42
47
|
key: 1,
|
|
43
48
|
class: "of-table-group-row__badge",
|
|
44
|
-
style:
|
|
49
|
+
style: d(s.value.style)
|
|
45
50
|
}, [
|
|
46
|
-
|
|
51
|
+
s.value.dot ? (a(), r("span", {
|
|
47
52
|
key: 0,
|
|
48
53
|
class: "of-table-group-row__badge-dot",
|
|
49
|
-
style:
|
|
50
|
-
}, null, 4)) :
|
|
51
|
-
|
|
52
|
-
], 4)) : (
|
|
53
|
-
g("span",
|
|
54
|
-
(
|
|
55
|
-
key:
|
|
54
|
+
style: d({ background: s.value.dot })
|
|
55
|
+
}, null, 4)) : p("", !0),
|
|
56
|
+
h(" " + u(s.value.label), 1)
|
|
57
|
+
], 4)) : (a(), r("span", E, u(b.value), 1)),
|
|
58
|
+
g("span", L, "(" + u(n.count) + ")", 1),
|
|
59
|
+
(a(!0), r(B, null, K(_.value, (o) => (a(), r("span", {
|
|
60
|
+
key: o.key,
|
|
56
61
|
class: "of-table-group-row__agg"
|
|
57
|
-
},
|
|
62
|
+
}, u(o.label) + ": " + u(o.value), 1))), 128))
|
|
58
63
|
])
|
|
59
|
-
],
|
|
64
|
+
], 44, N));
|
|
60
65
|
}
|
|
61
66
|
});
|
|
62
67
|
export {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableHeaderRow.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import e from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const f = /* @__PURE__ */ e(o, [["__scopeId", "data-v-55ef62f3"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|