@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,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ChevronUp as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as z, openBlock as o, createElementBlock as i, createElementVNode as r, createCommentVNode as f, Fragment as w, renderList as C, withModifiers as d, normalizeStyle as v, normalizeClass as B, toDisplayString as g, createBlock as u, unref as c, createVNode as D } from "vue";
|
|
2
|
+
import { ChevronUp as K, ChevronDown as k, Plus as S } from "lucide-vue-next";
|
|
3
|
+
const $ = {
|
|
4
4
|
class: "of-table-header",
|
|
5
5
|
role: "row"
|
|
6
6
|
}, F = {
|
|
@@ -8,7 +8,10 @@ const D = {
|
|
|
8
8
|
class: "of-th of-th-checkbox",
|
|
9
9
|
role: "columnheader",
|
|
10
10
|
"aria-label": "选择全部行"
|
|
11
|
-
}, M =
|
|
11
|
+
}, M = {
|
|
12
|
+
class: "of-th-checkbox__label",
|
|
13
|
+
for: "of-table-select-all-checkbox"
|
|
14
|
+
}, p = ["checked", "indeterminate"], O = ["aria-sort", "onClick", "onKeydown", "onContextmenu", "onDblclick"], R = { class: "of-th-label" }, E = { class: "of-th-sort-icon" }, N = ["onMousedown", "onDblclick"], H = /* @__PURE__ */ z({
|
|
12
15
|
__name: "TableHeaderRow",
|
|
13
16
|
props: {
|
|
14
17
|
columns: {},
|
|
@@ -22,76 +25,90 @@ const D = {
|
|
|
22
25
|
enableAddField: { type: Boolean, default: !1 }
|
|
23
26
|
},
|
|
24
27
|
emits: ["sort", "select-all", "resize-start", "resize-dblclick", "header-contextmenu", "header-dblclick", "add-field"],
|
|
25
|
-
setup(e, { emit:
|
|
26
|
-
const a =
|
|
27
|
-
function
|
|
28
|
-
if (
|
|
29
|
-
const
|
|
30
|
-
return { flex: `1 1 ${
|
|
28
|
+
setup(e, { emit: y }) {
|
|
29
|
+
const a = y;
|
|
30
|
+
function b(t) {
|
|
31
|
+
if (t.width === "fill") {
|
|
32
|
+
const n = `${t.minWidth ?? 220}px`;
|
|
33
|
+
return { flex: `1 1 ${n}`, minWidth: n };
|
|
31
34
|
}
|
|
32
|
-
return { width: `${
|
|
35
|
+
return { width: `${t.width}px`, flexShrink: "0", flexGrow: "0" };
|
|
33
36
|
}
|
|
34
|
-
function
|
|
35
|
-
a("sort",
|
|
37
|
+
function h(t) {
|
|
38
|
+
a("sort", t);
|
|
36
39
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
40
|
+
function m(t, n) {
|
|
41
|
+
t.target === t.currentTarget && (t.key !== "Enter" && t.key !== " " || (t.preventDefault(), a("sort", n)));
|
|
39
42
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
43
|
+
function x(t, n) {
|
|
44
|
+
t.stopPropagation(), a("resize-start", t, n);
|
|
45
|
+
}
|
|
46
|
+
return (t, n) => (o(), i("div", $, [
|
|
47
|
+
e.selectable ? (o(), i("div", F, [
|
|
48
|
+
r("label", M, [
|
|
49
|
+
r("input", {
|
|
50
|
+
id: "of-table-select-all-checkbox",
|
|
51
|
+
type: "checkbox",
|
|
52
|
+
class: "of-checkbox",
|
|
53
|
+
checked: e.allSelected,
|
|
54
|
+
indeterminate: e.indeterminate,
|
|
55
|
+
onChange: n[0] || (n[0] = (l) => a("select-all"))
|
|
56
|
+
}, null, 40, p),
|
|
57
|
+
n[3] || (n[3] = r("span", { class: "of-sr-only" }, "选择全部行", -1))
|
|
58
|
+
])
|
|
49
59
|
])) : f("", !0),
|
|
50
|
-
(o(!0),
|
|
51
|
-
key:
|
|
60
|
+
(o(!0), i(w, null, C(e.columns, (l) => (o(), i("div", {
|
|
61
|
+
key: l.key,
|
|
52
62
|
role: "columnheader",
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
63
|
+
tabindex: "0",
|
|
64
|
+
class: B(["of-th", { "of-th--sortable": !0, "of-th--active": e.sortKey === l.key }]),
|
|
65
|
+
style: v(b(l)),
|
|
66
|
+
"aria-sort": e.sortKey === l.key ? e.sortOrder === "asc" ? "ascending" : "descending" : "none",
|
|
67
|
+
onClick: (s) => h(l.key),
|
|
68
|
+
onKeydown: (s) => m(s, l.key),
|
|
69
|
+
onContextmenu: d((s) => e.enableFieldMenu && a("header-contextmenu", s, l.key), ["prevent"]),
|
|
70
|
+
onDblclick: d((s) => e.enableFieldMenu && a("header-dblclick", l.key), ["stop"])
|
|
59
71
|
}, [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
e.sortKey ===
|
|
72
|
+
r("span", R, g(l.label), 1),
|
|
73
|
+
r("span", E, [
|
|
74
|
+
e.sortKey === l.key && e.sortOrder === "asc" ? (o(), u(c(K), {
|
|
63
75
|
key: 0,
|
|
64
76
|
size: 12,
|
|
65
77
|
class: "of-sort-icon-active"
|
|
66
|
-
})) : e.sortKey ===
|
|
78
|
+
})) : e.sortKey === l.key && e.sortOrder === "desc" ? (o(), u(c(k), {
|
|
67
79
|
key: 1,
|
|
68
80
|
size: 12,
|
|
69
81
|
class: "of-sort-icon-active"
|
|
70
|
-
})) : (o(), u(
|
|
82
|
+
})) : (o(), u(c(k), {
|
|
71
83
|
key: 2,
|
|
72
84
|
size: 12,
|
|
73
85
|
class: "of-sort-icon-idle"
|
|
74
86
|
}))
|
|
75
87
|
]),
|
|
76
|
-
e.enableResize ? (o(),
|
|
88
|
+
e.enableResize ? (o(), i("button", {
|
|
77
89
|
key: 0,
|
|
90
|
+
type: "button",
|
|
78
91
|
class: "of-th-resizer",
|
|
79
|
-
|
|
80
|
-
|
|
92
|
+
"aria-label": "调整列宽",
|
|
93
|
+
onClick: n[1] || (n[1] = d(() => {
|
|
94
|
+
}, ["stop"])),
|
|
95
|
+
onMousedown: (s) => x(s, l.key),
|
|
96
|
+
onDblclick: d((s) => a("resize-dblclick", l.key), ["stop"])
|
|
81
97
|
}, null, 40, N)) : f("", !0)
|
|
82
|
-
], 46,
|
|
83
|
-
e.enableAddField ? (o(),
|
|
98
|
+
], 46, O))), 128)),
|
|
99
|
+
e.enableAddField ? (o(), i("button", {
|
|
84
100
|
key: 1,
|
|
101
|
+
type: "button",
|
|
85
102
|
class: "of-th of-th-add",
|
|
86
|
-
|
|
103
|
+
tabindex: "0",
|
|
87
104
|
"aria-label": "添加字段",
|
|
88
|
-
onClick:
|
|
105
|
+
onClick: n[2] || (n[2] = d((l) => a("add-field"), ["stop"]))
|
|
89
106
|
}, [
|
|
90
|
-
|
|
107
|
+
D(c(S), { size: 14 })
|
|
91
108
|
])) : f("", !0)
|
|
92
109
|
]));
|
|
93
110
|
}
|
|
94
111
|
});
|
|
95
112
|
export {
|
|
96
|
-
|
|
113
|
+
H as default
|
|
97
114
|
};
|
|
@@ -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 m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-
|
|
4
|
+
const m = /* @__PURE__ */ a(o, [["__scopeId", "data-v-c3196e5a"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|
|
@@ -40,11 +40,11 @@ const ie = { class: "of-table-toolbar" }, fe = {
|
|
|
40
40
|
},
|
|
41
41
|
emits: ["update:currentView", "update:columns", "update:searchKeyword", "add-filter", "remove-filter", "update-filter", "clear-filters", "update:filterLogic", "sort", "group", "save-view", "load-view"],
|
|
42
42
|
setup(l, { emit: N }) {
|
|
43
|
-
const I = [
|
|
43
|
+
const R = l, u = N, I = [
|
|
44
44
|
{ value: "table", label: "表格", icon: "table-2" },
|
|
45
45
|
{ value: "kanban", label: "看板", icon: "columns-3" },
|
|
46
46
|
{ value: "timeline", label: "时间线", icon: "calendar" }
|
|
47
|
-
],
|
|
47
|
+
], j = T(() => R.viewTabs ?? I), k = i(!1), v = i(!1), c = i(!1), p = i(!1), D = i(null), G = i(null), A = i(null), z = i(null), F = i({}), P = i({}), U = i({}), E = i({});
|
|
48
48
|
function q(r) {
|
|
49
49
|
if (!r) return {};
|
|
50
50
|
const e = r.getBoundingClientRect();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./TabPanel.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const p = /* @__PURE__ */ o(a, [["__scopeId", "data-v-66a21a08"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -9,9 +9,9 @@ const f = ["id", "aria-labelledby", "hidden"], k = /* @__PURE__ */ o({
|
|
|
9
9
|
const l = e, t = i("of-tabs-active"), a = d(() => (t == null ? void 0 : t.value) === l.name);
|
|
10
10
|
return (n, b) => e.keepAlive || a.value ? c((r(), u("div", {
|
|
11
11
|
key: 0,
|
|
12
|
+
id: `of-panel-${e.name}`,
|
|
12
13
|
class: "of-tab-panel",
|
|
13
14
|
role: "tabpanel",
|
|
14
|
-
id: `of-panel-${e.name}`,
|
|
15
15
|
"aria-labelledby": `of-tab-${e.name}`,
|
|
16
16
|
hidden: e.keepAlive && !a.value ? !0 : void 0
|
|
17
17
|
}, [
|
|
@@ -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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-6c4531cc"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -4,7 +4,7 @@ const B = {
|
|
|
4
4
|
class: "of-tabs__nav",
|
|
5
5
|
role: "tablist",
|
|
6
6
|
"aria-label": "tabs"
|
|
7
|
-
}, E = ["
|
|
7
|
+
}, E = ["id", "disabled", "aria-selected", "aria-controls", "aria-disabled", "tabindex", "onClick", "onKeydown"], I = { class: "of-tabs__tab-label" }, K = {
|
|
8
8
|
key: 1,
|
|
9
9
|
class: "of-tabs__badge"
|
|
10
10
|
}, L = { class: "of-tabs__content" }, F = /* @__PURE__ */ h({
|
|
@@ -53,6 +53,7 @@ const B = {
|
|
|
53
53
|
}, [
|
|
54
54
|
c("div", B, [
|
|
55
55
|
(l(!0), r(D, null, x(i.tabs, (e) => (l(), r("button", {
|
|
56
|
+
id: `of-tab-${e.key}`,
|
|
56
57
|
key: e.key,
|
|
57
58
|
class: m(["of-tabs__tab", {
|
|
58
59
|
"of-tabs__tab--active": o.value === e.key,
|
|
@@ -60,7 +61,6 @@ const B = {
|
|
|
60
61
|
}]),
|
|
61
62
|
disabled: e.disabled,
|
|
62
63
|
role: "tab",
|
|
63
|
-
id: `of-tab-${e.key}`,
|
|
64
64
|
"aria-selected": o.value === e.key,
|
|
65
65
|
"aria-controls": `of-panel-${e.key}`,
|
|
66
66
|
"aria-disabled": e.disabled,
|
|
@@ -37,6 +37,8 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
37
37
|
endDate: string;
|
|
38
38
|
}) => any) | undefined;
|
|
39
39
|
}>, {
|
|
40
|
+
priorityColorMap: ColorMap;
|
|
41
|
+
statusColorMap: ColorMap;
|
|
40
42
|
readonly: boolean;
|
|
41
43
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
42
44
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./GanttRow.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-27ccf798"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
f as default
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { resolveBadge as h, mergeColorMap as M, DEFAULT_PRIORITY_MAP as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as T, ref as b, computed as n, openBlock as A, createElementBlock as R, createElementVNode as r, normalizeStyle as l, toDisplayString as m, normalizeClass as _, withModifiers as z } from "vue";
|
|
2
|
+
import { resolveBadge as h, mergeColorMap as M, DEFAULT_PRIORITY_MAP as U, DEFAULT_STATUS_MAP as X } from "../../composables/useBadge.js";
|
|
3
|
+
const F = { class: "gantt-row__label" }, I = { class: "gantt-row__title" }, K = { class: "gantt-row__bar-label" }, N = /* @__PURE__ */ T({
|
|
4
4
|
__name: "GanttRow",
|
|
5
5
|
props: {
|
|
6
6
|
item: {},
|
|
@@ -9,28 +9,28 @@ const U = { class: "gantt-row__label" }, X = { class: "gantt-row__title" }, F =
|
|
|
9
9
|
durationDays: {},
|
|
10
10
|
totalDays: {},
|
|
11
11
|
readonly: { type: Boolean, default: !1 },
|
|
12
|
-
priorityColorMap: {},
|
|
13
|
-
statusColorMap: {}
|
|
12
|
+
priorityColorMap: { default: void 0 },
|
|
13
|
+
statusColorMap: { default: void 0 }
|
|
14
14
|
},
|
|
15
15
|
emits: ["click", "change"],
|
|
16
|
-
setup(
|
|
17
|
-
const t =
|
|
18
|
-
let g = 0,
|
|
19
|
-
const
|
|
16
|
+
setup(i, { emit: k }) {
|
|
17
|
+
const t = i, d = k, s = b(!1), u = b(null);
|
|
18
|
+
let g = 0, f = 0, c = 0;
|
|
19
|
+
const x = n(() => t.totalDays * t.dayWidth), C = n(() => t.offsetDays * t.dayWidth), S = n(() => Math.max(t.durationDays, 1) * t.dayWidth), y = n(
|
|
20
20
|
() => h(
|
|
21
21
|
t.item.priority || "",
|
|
22
|
-
M(
|
|
22
|
+
M(U, t.priorityColorMap)
|
|
23
23
|
)
|
|
24
|
-
),
|
|
25
|
-
background:
|
|
26
|
-
color:
|
|
27
|
-
}),
|
|
24
|
+
), D = n(() => t.item.barColor ? { background: t.item.barColor, color: "var(--of-color-gray-800)" } : {
|
|
25
|
+
background: y.value.style.background,
|
|
26
|
+
color: y.value.style.color
|
|
27
|
+
}), E = n(() => y.value.style), $ = n(() => {
|
|
28
28
|
const e = h(
|
|
29
29
|
t.item.status || "",
|
|
30
|
-
M(
|
|
30
|
+
M(X, t.statusColorMap)
|
|
31
31
|
);
|
|
32
32
|
return e.dot ?? e.style.color;
|
|
33
|
-
}),
|
|
33
|
+
}), L = n(() => {
|
|
34
34
|
const e = (a) => {
|
|
35
35
|
const o = /* @__PURE__ */ new Date(`${a}T00:00:00`);
|
|
36
36
|
return `${String(o.getMonth() + 1).padStart(2, "0")}/${String(o.getDate()).padStart(2, "0")}`;
|
|
@@ -38,73 +38,89 @@ const U = { class: "gantt-row__label" }, X = { class: "gantt-row__title" }, F =
|
|
|
38
38
|
return `${e(t.item.startDate)} - ${e(t.item.endDate)}`;
|
|
39
39
|
});
|
|
40
40
|
function v(e, a) {
|
|
41
|
-
t.readonly || (e.preventDefault(), e.stopPropagation(),
|
|
41
|
+
t.readonly || (e.preventDefault(), e.stopPropagation(), s.value = !0, u.value = a, g = e.clientX, f = t.offsetDays, c = t.durationDays, window.addEventListener("mousemove", p), window.addEventListener("mouseup", w));
|
|
42
42
|
}
|
|
43
43
|
function p(e) {
|
|
44
|
-
if (!
|
|
44
|
+
if (!s.value || !u.value) return;
|
|
45
45
|
const a = Math.round((e.clientX - g) / t.dayWidth);
|
|
46
|
-
if (
|
|
47
|
-
const
|
|
48
|
-
|
|
46
|
+
if (u.value === "move") {
|
|
47
|
+
const B = Math.max(0, Math.min(f + a, t.totalDays - 1));
|
|
48
|
+
d("change", {
|
|
49
49
|
id: t.item.id,
|
|
50
|
-
offsetDays:
|
|
50
|
+
offsetDays: B,
|
|
51
51
|
durationDays: c,
|
|
52
52
|
startDate: t.item.startDate,
|
|
53
53
|
endDate: t.item.endDate
|
|
54
54
|
});
|
|
55
55
|
return;
|
|
56
56
|
}
|
|
57
|
-
const o = Math.max(1, c + a),
|
|
58
|
-
|
|
57
|
+
const o = Math.max(1, c + a), W = Math.max(1, t.totalDays - t.offsetDays);
|
|
58
|
+
d("change", {
|
|
59
59
|
id: t.item.id,
|
|
60
60
|
offsetDays: t.offsetDays,
|
|
61
|
-
durationDays: Math.min(o,
|
|
61
|
+
durationDays: Math.min(o, W),
|
|
62
62
|
startDate: t.item.startDate,
|
|
63
63
|
endDate: t.item.endDate
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
function w() {
|
|
67
|
-
|
|
67
|
+
s.value = !1, u.value = null, window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", w);
|
|
68
68
|
}
|
|
69
|
-
|
|
69
|
+
function P(e) {
|
|
70
|
+
e.key !== "Enter" && e.key !== " " || (e.preventDefault(), d("click", t.item));
|
|
71
|
+
}
|
|
72
|
+
return (e, a) => (A(), R("div", {
|
|
70
73
|
class: "gantt-row",
|
|
71
|
-
|
|
74
|
+
role: "button",
|
|
75
|
+
tabindex: "0",
|
|
76
|
+
onClick: a[2] || (a[2] = (o) => d("click", i.item)),
|
|
77
|
+
onKeydown: P
|
|
72
78
|
}, [
|
|
73
|
-
|
|
74
|
-
|
|
79
|
+
r("div", F, [
|
|
80
|
+
r("span", {
|
|
75
81
|
class: "gantt-row__dot",
|
|
76
|
-
style:
|
|
82
|
+
style: l({ backgroundColor: $.value })
|
|
77
83
|
}, null, 4),
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
r("span", I, m(i.item.title), 1),
|
|
85
|
+
r("span", {
|
|
80
86
|
class: "gantt-row__priority",
|
|
81
|
-
style:
|
|
82
|
-
},
|
|
87
|
+
style: l(E.value)
|
|
88
|
+
}, m(i.item.priority), 5)
|
|
83
89
|
]),
|
|
84
|
-
|
|
90
|
+
r("div", {
|
|
85
91
|
class: "gantt-row__chart",
|
|
86
|
-
style:
|
|
92
|
+
style: l({ width: `${x.value}px` })
|
|
87
93
|
}, [
|
|
88
|
-
|
|
89
|
-
class:
|
|
90
|
-
style:
|
|
91
|
-
left: `${
|
|
92
|
-
width: `${
|
|
93
|
-
|
|
94
|
-
color: f.value.color
|
|
95
|
-
}),
|
|
96
|
-
onMousedown: a[1] || (a[1] = (o) => v(o, "move"))
|
|
94
|
+
r("div", {
|
|
95
|
+
class: _(["gantt-row__bar-shell", { "gantt-row__bar--dragging": s.value }]),
|
|
96
|
+
style: l({
|
|
97
|
+
left: `${C.value}px`,
|
|
98
|
+
width: `${S.value}px`
|
|
99
|
+
})
|
|
97
100
|
}, [
|
|
98
|
-
|
|
99
|
-
|
|
101
|
+
r("button", {
|
|
102
|
+
type: "button",
|
|
103
|
+
class: _(["gantt-row__bar", { "gantt-row__bar--dragging": s.value }]),
|
|
104
|
+
style: l({
|
|
105
|
+
backgroundColor: D.value.background,
|
|
106
|
+
color: D.value.color
|
|
107
|
+
}),
|
|
108
|
+
"aria-label": "拖动时间条",
|
|
109
|
+
onMousedown: a[0] || (a[0] = (o) => v(o, "move"))
|
|
110
|
+
}, [
|
|
111
|
+
r("span", K, m(L.value), 1)
|
|
112
|
+
], 38),
|
|
113
|
+
r("button", {
|
|
114
|
+
type: "button",
|
|
100
115
|
class: "gantt-row__handle",
|
|
101
|
-
|
|
116
|
+
"aria-label": "调整结束时间",
|
|
117
|
+
onMousedown: a[1] || (a[1] = z((o) => v(o, "resize-end"), ["stop"]))
|
|
102
118
|
}, null, 32)
|
|
103
|
-
],
|
|
119
|
+
], 6)
|
|
104
120
|
], 4)
|
|
105
|
-
]));
|
|
121
|
+
], 32));
|
|
106
122
|
}
|
|
107
123
|
});
|
|
108
124
|
export {
|
|
109
|
-
|
|
125
|
+
N as default
|
|
110
126
|
};
|
|
@@ -38,6 +38,12 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
38
38
|
}) => any) | undefined;
|
|
39
39
|
"onUpdate:records"?: ((records: DataRecord[]) => any) | undefined;
|
|
40
40
|
}>, {
|
|
41
|
+
startDate: string;
|
|
42
|
+
items: GanttItem[];
|
|
43
|
+
data: Task[];
|
|
44
|
+
records: DataRecord[];
|
|
45
|
+
schema: TableSchema;
|
|
46
|
+
viewConfig: ViewConfig;
|
|
41
47
|
startFieldId: string;
|
|
42
48
|
endFieldId: string;
|
|
43
49
|
labelFieldId: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import t from "./GanttTimeline.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-2d350e85"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -7,15 +7,15 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
7
7
|
}, f = 40, lt = /* @__PURE__ */ J({
|
|
8
8
|
__name: "GanttTimeline",
|
|
9
9
|
props: {
|
|
10
|
-
records: {},
|
|
11
|
-
schema: {},
|
|
12
|
-
viewConfig: {},
|
|
10
|
+
records: { default: void 0 },
|
|
11
|
+
schema: { default: void 0 },
|
|
12
|
+
viewConfig: { default: void 0 },
|
|
13
13
|
startFieldId: { default: "startDate" },
|
|
14
14
|
endFieldId: { default: "endDate" },
|
|
15
15
|
labelFieldId: { default: "title" },
|
|
16
|
-
items: {},
|
|
17
|
-
data: {},
|
|
18
|
-
startDate: {},
|
|
16
|
+
items: { default: void 0 },
|
|
17
|
+
data: { default: void 0 },
|
|
18
|
+
startDate: { default: void 0 },
|
|
19
19
|
days: { default: 30 }
|
|
20
20
|
},
|
|
21
21
|
emits: ["row-click", "record-change", "update:records"],
|
|
@@ -71,8 +71,8 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
71
71
|
)), O = s(() => {
|
|
72
72
|
var a, r;
|
|
73
73
|
const e = [...m.value], t = (r = (a = n.viewConfig) == null ? void 0 : a.sorts) == null ? void 0 : r[0];
|
|
74
|
-
return t && e.sort((
|
|
75
|
-
const
|
|
74
|
+
return t && e.sort((o, g) => {
|
|
75
|
+
const d = o[t.fieldId] ?? "", q = g[t.fieldId] ?? "", M = String(d).localeCompare(String(q));
|
|
76
76
|
return t.direction === "desc" ? -M : M;
|
|
77
77
|
}), e;
|
|
78
78
|
}), V = s(() => {
|
|
@@ -86,9 +86,9 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
86
86
|
return p(n.startDate || x(), n.days - 1);
|
|
87
87
|
const e = Math.max(...m.value.map((a) => i(a.endDate).getTime())), t = new Date(e);
|
|
88
88
|
return t.setDate(t.getDate() + 1), h(t);
|
|
89
|
-
}), D = s(() => n.startDate || V.value),
|
|
89
|
+
}), D = s(() => n.startDate || V.value), v = s(() => n.startDate ? n.days : Math.max(n.days, y(D.value, Y.value) + 1)), N = s(() => {
|
|
90
90
|
const e = [];
|
|
91
|
-
for (let t = 0; t <
|
|
91
|
+
for (let t = 0; t < v.value; t++)
|
|
92
92
|
e.push(p(D.value, t));
|
|
93
93
|
return e;
|
|
94
94
|
}), u = K([]);
|
|
@@ -100,10 +100,10 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
100
100
|
{ immediate: !0 }
|
|
101
101
|
);
|
|
102
102
|
const C = s(() => {
|
|
103
|
-
const e = D.value, t =
|
|
103
|
+
const e = D.value, t = v.value;
|
|
104
104
|
return u.value.map((a) => {
|
|
105
|
-
const r = Math.max(0, y(e, a.startDate)),
|
|
106
|
-
return { row: a, offsetDays: Math.min(r, t - 1), durationDays:
|
|
105
|
+
const r = Math.max(0, y(e, a.startDate)), o = Math.max(r, y(e, a.endDate)), g = Math.max(1, o - r + 1);
|
|
106
|
+
return { row: a, offsetDays: Math.min(r, t - 1), durationDays: g };
|
|
107
107
|
});
|
|
108
108
|
}), $ = h(/* @__PURE__ */ new Date());
|
|
109
109
|
function A(e) {
|
|
@@ -115,10 +115,10 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
115
115
|
}
|
|
116
116
|
const k = s(() => {
|
|
117
117
|
const e = y(D.value, $);
|
|
118
|
-
return e < 0 || e >
|
|
118
|
+
return e < 0 || e > v.value - 1 ? null : e * f + f / 2;
|
|
119
119
|
});
|
|
120
120
|
function j(e) {
|
|
121
|
-
const t = u.value.findIndex((
|
|
121
|
+
const t = u.value.findIndex((d) => d.id === e.id);
|
|
122
122
|
if (t === -1) return;
|
|
123
123
|
const a = p(D.value, e.offsetDays), r = p(a, e.durationDays - 1);
|
|
124
124
|
u.value[t] = {
|
|
@@ -126,22 +126,22 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
126
126
|
startDate: a,
|
|
127
127
|
endDate: r
|
|
128
128
|
};
|
|
129
|
-
const
|
|
130
|
-
if (!
|
|
129
|
+
const o = u.value[t].sourceRecordId;
|
|
130
|
+
if (!o) return;
|
|
131
131
|
S("record-change", {
|
|
132
|
-
recordId:
|
|
132
|
+
recordId: o,
|
|
133
133
|
startDate: a,
|
|
134
134
|
endDate: r
|
|
135
135
|
});
|
|
136
|
-
const
|
|
137
|
-
...
|
|
136
|
+
const g = F.value.map((d) => d.id !== o ? d : {
|
|
137
|
+
...d,
|
|
138
138
|
fields: {
|
|
139
|
-
...
|
|
139
|
+
...d.fields,
|
|
140
140
|
[n.startFieldId]: a,
|
|
141
141
|
[n.endFieldId]: r
|
|
142
142
|
}
|
|
143
143
|
});
|
|
144
|
-
S("update:records",
|
|
144
|
+
S("update:records", g);
|
|
145
145
|
}
|
|
146
146
|
return (e, t) => (l(), c("div", {
|
|
147
147
|
class: "gantt-timeline",
|
|
@@ -151,7 +151,7 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
151
151
|
t[0] || (t[0] = I("div", { class: "gantt-timeline__header-label" }, "任务", -1)),
|
|
152
152
|
I("div", {
|
|
153
153
|
class: "gantt-timeline__header-dates",
|
|
154
|
-
style: _({ width: `${
|
|
154
|
+
style: _({ width: `${v.value * f}px` })
|
|
155
155
|
}, [
|
|
156
156
|
(l(!0), c(R, null, T(N.value, (a) => (l(), c("div", {
|
|
157
157
|
key: a,
|
|
@@ -172,7 +172,7 @@ const at = { class: "gantt-timeline__header" }, nt = { class: "gantt-timeline__r
|
|
|
172
172
|
"offset-days": a.offsetDays,
|
|
173
173
|
"duration-days": a.durationDays,
|
|
174
174
|
"day-width": f,
|
|
175
|
-
"total-days":
|
|
175
|
+
"total-days": v.value,
|
|
176
176
|
onChange: j,
|
|
177
177
|
onClick: (r) => S("row-click", a.row)
|
|
178
178
|
}, null, 8, ["item", "offset-days", "duration-days", "total-days", "onClick"]))), 128)),
|
|
@@ -5,7 +5,7 @@ export interface UseKeyboardNavigationOptions {
|
|
|
5
5
|
columns: Ref<TableColumn[]>;
|
|
6
6
|
rows: Ref<Array<{
|
|
7
7
|
id: string;
|
|
8
|
-
} & Record<string,
|
|
8
|
+
} & Record<string, unknown>>>;
|
|
9
9
|
containerRef: Ref<HTMLElement | null>;
|
|
10
10
|
editingCell: Ref<EditingCell | null>;
|
|
11
11
|
enabled: Ref<boolean>;
|
|
@@ -17,16 +17,18 @@ export interface RowGroupChangePayload {
|
|
|
17
17
|
groupFieldId: string;
|
|
18
18
|
newValue: unknown;
|
|
19
19
|
}
|
|
20
|
-
|
|
20
|
+
type RowDragItem<T> = T | GroupedListItem<T>;
|
|
21
|
+
export declare function useRowDrag<T extends Record<string, unknown>>(options: UseRowDragOptions<T>): {
|
|
21
22
|
isDragging: Readonly<Ref<boolean, boolean>>;
|
|
22
23
|
draggedRowId: Readonly<Ref<string | null, string | null>>;
|
|
23
24
|
dropTargetId: Readonly<Ref<string | null, string | null>>;
|
|
24
25
|
dropPosition: Readonly<Ref<"before" | "after" | "into-group", "before" | "after" | "into-group">>;
|
|
25
|
-
handleDragStart: (e: DragEvent, item:
|
|
26
|
-
handleDragOver: (e: DragEvent, targetItem:
|
|
27
|
-
handleDrop: (e: DragEvent, targetItem:
|
|
26
|
+
handleDragStart: (e: DragEvent, item: RowDragItem<T>) => void;
|
|
27
|
+
handleDragOver: (e: DragEvent, targetItem: RowDragItem<T>) => void;
|
|
28
|
+
handleDrop: (e: DragEvent, targetItem: RowDragItem<T>, callbacks: {
|
|
28
29
|
onReorder?: (payload: RowReorderPayload) => void;
|
|
29
30
|
onGroupChange?: (payload: RowGroupChangePayload) => void;
|
|
30
31
|
}) => void;
|
|
31
32
|
handleDragEnd: () => void;
|
|
32
33
|
};
|
|
34
|
+
export {};
|