@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,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
|
|
4
|
+
const a = /* @__PURE__ */ o(t, [["__scopeId", "data-v-f18fde43"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
a as default
|
|
7
7
|
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as V, ref as L, computed as
|
|
2
|
-
import
|
|
3
|
-
import { useMarkdown as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as V, ref as L, computed as u, openBlock as o, createBlock as k, Teleport as N, createVNode as E, Transition as H, withCtx as j, createElementBlock as d, normalizeClass as h, createElementVNode as n, Fragment as b, renderList as C, toDisplayString as v, createCommentVNode as p } from "vue";
|
|
2
|
+
import z from "./FieldCell.vue.js";
|
|
3
|
+
import { useMarkdown as O } from "../../composables/useMarkdown.js";
|
|
4
|
+
const R = { class: "of-detail-sheet__properties" }, q = { class: "of-detail-sheet__label" }, A = { class: "of-detail-sheet__cell" }, G = {
|
|
5
5
|
key: 1,
|
|
6
6
|
class: "of-detail-sheet__value"
|
|
7
|
-
},
|
|
7
|
+
}, I = {
|
|
8
8
|
key: 0,
|
|
9
9
|
class: "of-detail-sheet__content"
|
|
10
|
-
},
|
|
10
|
+
}, J = { class: "of-detail-sheet__content-label" }, Q = ["innerHTML"], U = { class: "of-detail-sheet__footer" }, W = ["disabled"], $ = /* @__PURE__ */ V({
|
|
11
11
|
__name: "DetailSheet",
|
|
12
12
|
props: {
|
|
13
13
|
row: {},
|
|
@@ -19,50 +19,55 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
|
|
|
19
19
|
readonly: { type: Boolean }
|
|
20
20
|
},
|
|
21
21
|
emits: ["close", "save", "delete", "cell-edit"],
|
|
22
|
-
setup(s, { emit:
|
|
23
|
-
const
|
|
24
|
-
function
|
|
22
|
+
setup(s, { emit: g }) {
|
|
23
|
+
const a = s, r = g, { renderMarkdown: w } = O({ showCopyButton: !0 }), i = L({}), D = u(() => Object.keys(i.value).length > 0), B = u(() => new Set(a.contentFields ?? []));
|
|
24
|
+
function y(t) {
|
|
25
25
|
var l;
|
|
26
26
|
if (B.value.has(t.key)) return !0;
|
|
27
|
-
const e = (l =
|
|
27
|
+
const e = (l = a.fieldDefs) == null ? void 0 : l.find((f) => f.id === t.key);
|
|
28
28
|
return (e == null ? void 0 : e.type) === "richtext";
|
|
29
29
|
}
|
|
30
|
-
const F =
|
|
30
|
+
const F = u(() => a.columns.filter((t) => !y(t))), m = u(() => a.columns.filter((t) => y(t)));
|
|
31
31
|
function x(t) {
|
|
32
32
|
var e;
|
|
33
|
-
return ((e =
|
|
33
|
+
return ((e = a.fieldDefs) == null ? void 0 : e.find((l) => l.id === t)) ?? {
|
|
34
34
|
id: t,
|
|
35
35
|
type: "text",
|
|
36
36
|
label: t
|
|
37
37
|
};
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return t.key in
|
|
39
|
+
function c(t) {
|
|
40
|
+
return t.key in i.value ? i.value[t.key] : a.row[t.key];
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
const e =
|
|
42
|
+
function S(t) {
|
|
43
|
+
const e = c(t);
|
|
44
44
|
return typeof e != "string" || !e ? "" : w(e);
|
|
45
45
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
46
|
+
function M(t, e, l) {
|
|
47
|
+
i.value = { ...i.value, [e]: l }, r("cell-edit", { rowId: t, fieldId: e, value: l });
|
|
48
48
|
}
|
|
49
49
|
function P() {
|
|
50
|
-
r("save", { rowId:
|
|
50
|
+
r("save", { rowId: a.row.id, fields: { ...i.value } }), i.value = {}, r("close");
|
|
51
51
|
}
|
|
52
52
|
function _() {
|
|
53
|
-
|
|
53
|
+
i.value = {}, r("close");
|
|
54
54
|
}
|
|
55
55
|
function T() {
|
|
56
|
-
r("delete",
|
|
56
|
+
r("delete", a.row.id), r("close");
|
|
57
57
|
}
|
|
58
58
|
return (t, e) => (o(), k(N, { to: "body" }, [
|
|
59
59
|
E(H, { name: "of-sheet" }, {
|
|
60
60
|
default: j(() => [
|
|
61
61
|
s.visible ? (o(), d("div", {
|
|
62
62
|
key: 0,
|
|
63
|
-
class: h(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": s.fullPage }])
|
|
64
|
-
onClick: z(_, ["self"])
|
|
63
|
+
class: h(["of-detail-sheet-overlay", { "of-detail-sheet-overlay--full-page": s.fullPage }])
|
|
65
64
|
}, [
|
|
65
|
+
n("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
class: "of-detail-sheet-overlay__hitarea",
|
|
68
|
+
"aria-label": "关闭详情",
|
|
69
|
+
onClick: _
|
|
70
|
+
}),
|
|
66
71
|
n("div", {
|
|
67
72
|
class: h(["of-detail-sheet", { "of-detail-sheet--full-page": s.fullPage }])
|
|
68
73
|
}, [
|
|
@@ -77,41 +82,41 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
|
|
|
77
82
|
n("div", {
|
|
78
83
|
class: h(["of-detail-sheet__body", { "of-detail-sheet__body--full-page": s.fullPage }])
|
|
79
84
|
}, [
|
|
80
|
-
n("div",
|
|
85
|
+
n("div", R, [
|
|
81
86
|
(o(!0), d(b, null, C(F.value, (l) => {
|
|
82
87
|
var f;
|
|
83
88
|
return o(), d("div", {
|
|
84
89
|
key: l.key,
|
|
85
90
|
class: "of-detail-sheet__field"
|
|
86
91
|
}, [
|
|
87
|
-
n("
|
|
88
|
-
n("div",
|
|
89
|
-
(f = s.fieldDefs) != null && f.length ? (o(), k(
|
|
92
|
+
n("span", q, v(l.label), 1),
|
|
93
|
+
n("div", A, [
|
|
94
|
+
(f = s.fieldDefs) != null && f.length ? (o(), k(z, {
|
|
90
95
|
key: 0,
|
|
91
96
|
"row-id": s.row.id,
|
|
92
97
|
field: x(l.key),
|
|
93
|
-
value:
|
|
98
|
+
value: c(l),
|
|
94
99
|
readonly: s.readonly,
|
|
95
|
-
onCommit:
|
|
96
|
-
}, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), d("span",
|
|
100
|
+
onCommit: M
|
|
101
|
+
}, null, 8, ["row-id", "field", "value", "readonly"])) : (o(), d("span", G, v(c(l) ?? "—"), 1))
|
|
97
102
|
])
|
|
98
103
|
]);
|
|
99
104
|
}), 128))
|
|
100
105
|
]),
|
|
101
|
-
|
|
102
|
-
(o(!0), d(b, null, C(
|
|
106
|
+
m.value.length > 0 ? (o(), d("div", I, [
|
|
107
|
+
(o(!0), d(b, null, C(m.value, (l) => (o(), d("div", {
|
|
103
108
|
key: l.key,
|
|
104
109
|
class: "of-detail-sheet__content-block"
|
|
105
110
|
}, [
|
|
106
|
-
n("
|
|
111
|
+
n("span", J, v(l.label), 1),
|
|
107
112
|
n("div", {
|
|
108
113
|
class: "of-detail-sheet__markdown of-markdown",
|
|
109
|
-
innerHTML:
|
|
110
|
-
}, null, 8,
|
|
114
|
+
innerHTML: S(l)
|
|
115
|
+
}, null, 8, Q)
|
|
111
116
|
]))), 128))
|
|
112
|
-
])) :
|
|
117
|
+
])) : p("", !0)
|
|
113
118
|
], 2),
|
|
114
|
-
n("div",
|
|
119
|
+
n("div", U, [
|
|
115
120
|
n("button", {
|
|
116
121
|
class: "of-detail-sheet__btn of-detail-sheet__btn--delete",
|
|
117
122
|
onClick: T
|
|
@@ -125,10 +130,10 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
|
|
|
125
130
|
class: "of-detail-sheet__btn of-detail-sheet__btn--save",
|
|
126
131
|
disabled: !D.value,
|
|
127
132
|
onClick: P
|
|
128
|
-
}, " 保存 ", 8,
|
|
133
|
+
}, " 保存 ", 8, W)
|
|
129
134
|
])
|
|
130
135
|
], 2)
|
|
131
|
-
], 2)) :
|
|
136
|
+
], 2)) : p("", !0)
|
|
132
137
|
]),
|
|
133
138
|
_: 1
|
|
134
139
|
})
|
|
@@ -136,5 +141,5 @@ const q = { class: "of-detail-sheet__properties" }, A = { class: "of-detail-shee
|
|
|
136
141
|
}
|
|
137
142
|
});
|
|
138
143
|
export {
|
|
139
|
-
|
|
144
|
+
$ as default
|
|
140
145
|
};
|
|
@@ -28,6 +28,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
28
28
|
onCommit?: ((rowId: string, fieldId: string, value: CellValue) => any) | undefined;
|
|
29
29
|
onTabNext?: (() => any) | undefined;
|
|
30
30
|
}>, {
|
|
31
|
+
value: string | number | boolean | string[] | null;
|
|
31
32
|
readonly: boolean;
|
|
32
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {},
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
33
34
|
export default _default;
|
|
@@ -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 p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8e46c20b"]]);
|
|
5
5
|
export {
|
|
6
6
|
p as default
|
|
7
7
|
};
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useInlineEdit as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as S, computed as r, defineAsyncComponent as e, openBlock as n, createBlock as d, resolveDynamicComponent as s, withKeys as p, withModifiers as y, normalizeClass as F, withCtx as u, Suspense as K, createElementVNode as M, createElementBlock as v, Fragment as D, unref as T, toDisplayString as V } from "vue";
|
|
2
|
+
import { useInlineEdit as j } from "../../composables/useInlineEdit.js";
|
|
3
|
+
const z = {
|
|
4
4
|
key: 1,
|
|
5
5
|
class: "of-field-cell__display"
|
|
6
|
-
},
|
|
6
|
+
}, $ = /* @__PURE__ */ S({
|
|
7
7
|
__name: "FieldCell",
|
|
8
8
|
props: {
|
|
9
9
|
rowId: {},
|
|
10
10
|
field: {},
|
|
11
|
-
value: { type: [String, Number, Boolean, Array, null] },
|
|
11
|
+
value: { type: [String, Number, Boolean, Array, null], default: void 0 },
|
|
12
12
|
readonly: { type: Boolean, default: !1 }
|
|
13
13
|
},
|
|
14
14
|
emits: ["commit", "cancel", "tabNext"],
|
|
15
|
-
setup(
|
|
16
|
-
const t =
|
|
17
|
-
function
|
|
18
|
-
|
|
15
|
+
setup(i, { emit: b }) {
|
|
16
|
+
const t = i, c = b, { isEditing: h, activate: k, commit: w, cancel: x } = j(), o = r(() => h(t.rowId, t.field.id)), a = r(() => t.readonly || t.field.readonly);
|
|
17
|
+
function m() {
|
|
18
|
+
a.value || k(t.rowId, t.field.id);
|
|
19
19
|
}
|
|
20
|
-
function C(
|
|
21
|
-
|
|
20
|
+
function C(l) {
|
|
21
|
+
w(t.rowId, t.field.id, l), c("commit", t.rowId, t.field.id, l);
|
|
22
22
|
}
|
|
23
23
|
function g() {
|
|
24
|
-
|
|
24
|
+
x(), c("cancel");
|
|
25
25
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
26
|
+
function E() {
|
|
27
|
+
c("tabNext");
|
|
28
28
|
}
|
|
29
|
-
const
|
|
29
|
+
const I = {
|
|
30
30
|
text: e(() => import("../field/FieldText.vue.js")),
|
|
31
31
|
number: e(() => import("../field/FieldNumber.vue.js")),
|
|
32
32
|
checkbox: e(() => import("../field/FieldCheckbox.vue.js")),
|
|
@@ -45,43 +45,52 @@ const j = {
|
|
|
45
45
|
relation: e(() => import("../field/FieldRelation.vue.js")),
|
|
46
46
|
attachment: e(() => import("../field/FieldAttachment.vue.js")),
|
|
47
47
|
phone: e(() => import("../field/FieldPhone.vue.js"))
|
|
48
|
-
},
|
|
48
|
+
}, N = e(
|
|
49
49
|
() => import("../field/FieldMarkdownPreview.vue.js")
|
|
50
|
-
),
|
|
51
|
-
const
|
|
52
|
-
return
|
|
50
|
+
), A = r(() => I[t.field.type]), B = r(() => {
|
|
51
|
+
const l = t.value;
|
|
52
|
+
return l == null || l === "" ? "—" : Array.isArray(l) ? l.join(", ") : typeof l == "boolean" ? l ? "✓" : "—" : String(l);
|
|
53
53
|
});
|
|
54
|
-
return (
|
|
55
|
-
class:
|
|
56
|
-
"of-field-cell--editing":
|
|
57
|
-
"of-field-cell--readonly":
|
|
54
|
+
return (l, f) => (n(), d(s(a.value || o.value ? "div" : "button"), {
|
|
55
|
+
class: F(["of-field-cell", {
|
|
56
|
+
"of-field-cell--editing": o.value,
|
|
57
|
+
"of-field-cell--readonly": a.value
|
|
58
58
|
}]),
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
])])
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
59
|
+
type: a.value || o.value ? void 0 : "button",
|
|
60
|
+
"aria-label": `${i.field.label}字段`,
|
|
61
|
+
onClick: m,
|
|
62
|
+
onKeydown: [
|
|
63
|
+
p(y(m, ["prevent"]), ["enter"]),
|
|
64
|
+
p(y(m, ["prevent"]), ["space"])
|
|
65
|
+
]
|
|
66
|
+
}, {
|
|
67
|
+
default: u(() => [
|
|
68
|
+
o.value ? (n(), d(K, { key: 0 }, {
|
|
69
|
+
fallback: u(() => [...f[0] || (f[0] = [
|
|
70
|
+
M("span", { class: "of-field-cell__loading" }, "...", -1)
|
|
71
|
+
])]),
|
|
72
|
+
default: u(() => [
|
|
73
|
+
(n(), d(s(A.value), {
|
|
74
|
+
value: i.value,
|
|
75
|
+
field: i.field,
|
|
76
|
+
onCommit: C,
|
|
77
|
+
onCancel: g,
|
|
78
|
+
onTabNext: E
|
|
79
|
+
}, null, 40, ["value", "field"]))
|
|
80
|
+
]),
|
|
81
|
+
_: 1
|
|
82
|
+
})) : (n(), v(D, { key: 1 }, [
|
|
83
|
+
i.field.type === "richtext" && typeof i.value == "string" && i.value ? (n(), d(T(N), {
|
|
84
|
+
key: 0,
|
|
85
|
+
content: i.value,
|
|
86
|
+
"max-lines": 2
|
|
87
|
+
}, null, 8, ["content"])) : (n(), v("span", z, V(B.value), 1))
|
|
88
|
+
], 64))
|
|
89
|
+
]),
|
|
90
|
+
_: 1
|
|
91
|
+
}, 40, ["class", "type", "aria-label", "onKeydown"]));
|
|
83
92
|
}
|
|
84
93
|
});
|
|
85
94
|
export {
|
|
86
|
-
|
|
95
|
+
$ as default
|
|
87
96
|
};
|
|
@@ -10,6 +10,7 @@ declare const _default: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {
|
|
|
10
10
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
11
11
|
onSelect?: ((type: FieldType) => any) | undefined;
|
|
12
12
|
}>, {
|
|
13
|
+
currentType: FieldType;
|
|
13
14
|
searchable: boolean;
|
|
14
15
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
15
16
|
export default _default;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "./FieldTypePicker.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(e, [["__scopeId", "data-v-8b7ffaee"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -6,7 +6,7 @@ const j = { class: "of-field-type-picker" }, A = {
|
|
|
6
6
|
}, J = { class: "of-field-type-picker__list" }, K = { class: "of-field-type-picker__group-label" }, R = ["onClick"], ee = /* @__PURE__ */ k({
|
|
7
7
|
__name: "FieldTypePicker",
|
|
8
8
|
props: {
|
|
9
|
-
currentType: {},
|
|
9
|
+
currentType: { default: void 0 },
|
|
10
10
|
searchable: { type: Boolean, default: !0 }
|
|
11
11
|
},
|
|
12
12
|
emits: ["select"],
|
|
@@ -10,15 +10,38 @@ type __VLS_Props = {
|
|
|
10
10
|
statusColorMap?: ColorMap;
|
|
11
11
|
readonly?: boolean;
|
|
12
12
|
};
|
|
13
|
-
declare
|
|
14
|
-
|
|
13
|
+
declare function __VLS_template(): {
|
|
14
|
+
attrs: Partial<{}>;
|
|
15
|
+
slots: {
|
|
16
|
+
cell?(_: {
|
|
17
|
+
row: TableRow;
|
|
18
|
+
col: TableColumn;
|
|
19
|
+
}): any;
|
|
20
|
+
cell?(_: {
|
|
21
|
+
row: TableRow;
|
|
22
|
+
col: TableColumn;
|
|
23
|
+
}): any;
|
|
24
|
+
};
|
|
25
|
+
refs: {};
|
|
26
|
+
rootEl: HTMLDivElement;
|
|
27
|
+
};
|
|
28
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
29
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
30
|
+
"row-click": (row: TableRow) => any;
|
|
15
31
|
"add-row": () => any;
|
|
16
32
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
17
|
-
"onRow-click"?: ((row:
|
|
33
|
+
"onRow-click"?: ((row: TableRow) => any) | undefined;
|
|
18
34
|
"onAdd-row"?: (() => any) | undefined;
|
|
19
35
|
}>, {
|
|
20
36
|
selectable: boolean;
|
|
37
|
+
statusColorMap: ColorMap;
|
|
21
38
|
addable: boolean;
|
|
22
39
|
readonly: boolean;
|
|
23
40
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLDivElement>;
|
|
41
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
24
42
|
export default _default;
|
|
43
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
44
|
+
new (): {
|
|
45
|
+
$slots: S;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -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 e = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ccf7d630"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
e as default
|
|
7
7
|
};
|
|
@@ -1,90 +1,106 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { mergeColorMap as
|
|
3
|
-
const
|
|
1
|
+
import { defineComponent as D, computed as v, ref as _, openBlock as a, createElementBlock as n, Fragment as g, renderList as C, createElementVNode as X, normalizeStyle as T, renderSlot as M, createTextVNode as A, toDisplayString as d, createCommentVNode as c } from "vue";
|
|
2
|
+
import { mergeColorMap as K, DEFAULT_STATUS_MAP as L, resolveBadge as N } from "../../composables/useBadge.js";
|
|
3
|
+
const Y = { class: "of-mobile-list" }, w = ["onClick", "onKeydown", "onTouchstart"], F = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "of-mobile-card__title"
|
|
6
|
-
},
|
|
6
|
+
}, U = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "of-mobile-card__meta"
|
|
9
|
-
},
|
|
9
|
+
}, z = {
|
|
10
10
|
key: 1,
|
|
11
11
|
class: "of-mobile-card__tag"
|
|
12
|
-
},
|
|
12
|
+
}, I = {
|
|
13
13
|
key: 0,
|
|
14
14
|
class: "of-mobile-card__action-delete"
|
|
15
|
-
},
|
|
15
|
+
}, R = /* @__PURE__ */ D({
|
|
16
16
|
__name: "MobileListView",
|
|
17
17
|
props: {
|
|
18
18
|
rows: {},
|
|
19
19
|
columns: {},
|
|
20
20
|
selectable: { type: Boolean, default: !1 },
|
|
21
21
|
addable: { type: Boolean, default: !0 },
|
|
22
|
-
statusColorMap: {},
|
|
22
|
+
statusColorMap: { default: void 0 },
|
|
23
23
|
readonly: { type: Boolean, default: !1 }
|
|
24
24
|
},
|
|
25
25
|
emits: ["row-click", "add-row"],
|
|
26
|
-
setup(
|
|
27
|
-
const m =
|
|
28
|
-
function u(
|
|
29
|
-
const e =
|
|
26
|
+
setup(i, { emit: S }) {
|
|
27
|
+
const m = i, f = S, B = v(() => K(L, m.statusColorMap)), y = v(() => m.columns[0]), h = v(() => m.columns.slice(1, 4));
|
|
28
|
+
function u(t, o) {
|
|
29
|
+
const e = t[o.key];
|
|
30
30
|
return e != null ? String(e) : "";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return
|
|
32
|
+
function b(t) {
|
|
33
|
+
return N(t, B.value);
|
|
34
34
|
}
|
|
35
|
-
let
|
|
36
|
-
const
|
|
37
|
-
function
|
|
38
|
-
|
|
35
|
+
let p = 0, k = 0;
|
|
36
|
+
const r = _(null), s = _(0);
|
|
37
|
+
function x(t, o) {
|
|
38
|
+
p = t.touches[0].clientX, k = t.touches[0].clientY, r.value = o, s.value = 0;
|
|
39
39
|
}
|
|
40
|
-
function
|
|
41
|
-
if (!
|
|
42
|
-
const
|
|
43
|
-
if (Math.abs(e) > Math.abs(
|
|
44
|
-
|
|
40
|
+
function E(t) {
|
|
41
|
+
if (!r.value) return;
|
|
42
|
+
const o = t.touches[0].clientX - p, e = t.touches[0].clientY - k;
|
|
43
|
+
if (Math.abs(e) > Math.abs(o)) {
|
|
44
|
+
r.value = null;
|
|
45
45
|
return;
|
|
46
46
|
}
|
|
47
|
-
s.value = Math.max(-80, Math.min(0,
|
|
47
|
+
s.value = Math.max(-80, Math.min(0, o));
|
|
48
|
+
}
|
|
49
|
+
function V() {
|
|
50
|
+
s.value < -40 ? s.value = -80 : (s.value = 0, r.value = null);
|
|
48
51
|
}
|
|
49
|
-
function
|
|
50
|
-
|
|
52
|
+
function $(t, o) {
|
|
53
|
+
t.target === t.currentTarget && (t.key !== "Enter" && t.key !== " " || (t.preventDefault(), f("row-click", o)));
|
|
51
54
|
}
|
|
52
|
-
return (
|
|
53
|
-
(
|
|
55
|
+
return (t, o) => (a(), n("div", Y, [
|
|
56
|
+
(a(!0), n(g, null, C(i.rows, (e) => (a(), n("div", {
|
|
54
57
|
key: e.id,
|
|
55
58
|
class: "of-mobile-card-wrapper"
|
|
56
59
|
}, [
|
|
57
60
|
X("div", {
|
|
58
61
|
class: "of-mobile-card",
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
role: "button",
|
|
63
|
+
tabindex: "0",
|
|
64
|
+
style: T({ transform: r.value === e.id ? `translateX(${s.value}px)` : "" }),
|
|
65
|
+
onClick: (l) => f("row-click", e),
|
|
66
|
+
onKeydown: (l) => $(l, e),
|
|
67
|
+
onTouchstart: (l) => x(l, e.id),
|
|
68
|
+
onTouchmove: E,
|
|
69
|
+
onTouchend: V
|
|
64
70
|
}, [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
}, [
|
|
70
|
-
|
|
71
|
+
y.value ? (a(), n("div", F, [
|
|
72
|
+
M(t.$slots, "cell", {
|
|
73
|
+
row: e,
|
|
74
|
+
col: y.value
|
|
75
|
+
}, () => [
|
|
76
|
+
A(d(u(e, y.value) || "—"), 1)
|
|
77
|
+
], !0)
|
|
78
|
+
])) : c("", !0),
|
|
79
|
+
h.value.length > 0 ? (a(), n("div", U, [
|
|
80
|
+
(a(!0), n(g, null, C(h.value, (l) => M(t.$slots, "cell", {
|
|
81
|
+
key: l.key,
|
|
82
|
+
row: e,
|
|
83
|
+
col: l
|
|
84
|
+
}, () => [
|
|
85
|
+
l.key === "status" && u(e, l) ? (a(), n("span", {
|
|
71
86
|
key: 0,
|
|
72
87
|
class: "of-mobile-card__badge",
|
|
73
|
-
style:
|
|
74
|
-
}, d(
|
|
75
|
-
],
|
|
76
|
-
])) :
|
|
77
|
-
], 44,
|
|
78
|
-
|
|
88
|
+
style: T(b(u(e, l)).style)
|
|
89
|
+
}, d(b(u(e, l)).label), 5)) : u(e, l) ? (a(), n("span", z, d(l.label) + ": " + d(u(e, l)), 1)) : c("", !0)
|
|
90
|
+
], !0)), 128))
|
|
91
|
+
])) : c("", !0)
|
|
92
|
+
], 44, w),
|
|
93
|
+
r.value === e.id && s.value < -40 ? (a(), n("div", I, " 删除 ")) : c("", !0)
|
|
79
94
|
]))), 128)),
|
|
80
|
-
|
|
95
|
+
i.addable && !i.readonly ? (a(), n("button", {
|
|
81
96
|
key: 0,
|
|
97
|
+
type: "button",
|
|
82
98
|
class: "of-mobile-add-btn",
|
|
83
|
-
onClick:
|
|
84
|
-
}, " + 新增记录 ")) :
|
|
99
|
+
onClick: o[0] || (o[0] = (e) => f("add-row"))
|
|
100
|
+
}, " + 新增记录 ")) : c("", !0)
|
|
85
101
|
]));
|
|
86
102
|
}
|
|
87
103
|
});
|
|
88
104
|
export {
|
|
89
|
-
|
|
105
|
+
R as default
|
|
90
106
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./TableColumnManager.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-bade90c0"]]);
|
|
5
5
|
export {
|
|
6
6
|
m as default
|
|
7
7
|
};
|