@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,11 +1,11 @@
|
|
|
1
1
|
import { ref as c, readonly as D } from "vue";
|
|
2
|
-
function
|
|
2
|
+
function x(i) {
|
|
3
3
|
const I = c(!1), u = c(null), g = c(null), s = c("before");
|
|
4
|
-
let
|
|
4
|
+
let p = null;
|
|
5
5
|
function f(e) {
|
|
6
|
-
return
|
|
6
|
+
return typeof e == "object" && e !== null && "__type" in e && e.__type === "group-header";
|
|
7
7
|
}
|
|
8
|
-
function
|
|
8
|
+
function l(e) {
|
|
9
9
|
return String(e.id ?? "");
|
|
10
10
|
}
|
|
11
11
|
function T(e, r) {
|
|
@@ -13,61 +13,61 @@ function y(i) {
|
|
|
13
13
|
e.preventDefault();
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
|
-
|
|
16
|
+
p = r, u.value = l(r), I.value = !0, e.dataTransfer && (e.dataTransfer.effectAllowed = "move", e.dataTransfer.setData("text/plain", u.value));
|
|
17
17
|
}
|
|
18
18
|
function R(e, r) {
|
|
19
|
-
var
|
|
20
|
-
if (e.preventDefault(), !
|
|
19
|
+
var d;
|
|
20
|
+
if (e.preventDefault(), !p) return;
|
|
21
21
|
if (e.dataTransfer && (e.dataTransfer.dropEffect = "move"), f(r)) {
|
|
22
|
-
(
|
|
22
|
+
(d = i.enableCrossGroupDrag) != null && d.value && (g.value = r.id, s.value = "into-group");
|
|
23
23
|
return;
|
|
24
24
|
}
|
|
25
25
|
const n = e.currentTarget;
|
|
26
26
|
if (!n) return;
|
|
27
|
-
const t = n.getBoundingClientRect(),
|
|
28
|
-
g.value =
|
|
27
|
+
const t = n.getBoundingClientRect(), v = e.clientY - t.top < t.height / 2;
|
|
28
|
+
g.value = l(r), s.value = v ? "before" : "after";
|
|
29
29
|
}
|
|
30
|
-
function
|
|
31
|
-
var o,
|
|
32
|
-
if (e.preventDefault(), !
|
|
30
|
+
function _(e, r, n) {
|
|
31
|
+
var o, v, d, w;
|
|
32
|
+
if (e.preventDefault(), !p || !u.value) {
|
|
33
33
|
h();
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
const t = u.value;
|
|
37
37
|
if (f(r)) {
|
|
38
38
|
const a = (o = i.groupFieldId) == null ? void 0 : o.value;
|
|
39
|
-
a && ((
|
|
39
|
+
a && ((v = i.enableCrossGroupDrag) != null && v.value) && ((d = n.onGroupChange) == null || d.call(n, {
|
|
40
40
|
rowId: t,
|
|
41
41
|
groupFieldId: a,
|
|
42
42
|
newValue: r.__groupKey
|
|
43
43
|
}));
|
|
44
44
|
} else {
|
|
45
|
-
const a =
|
|
45
|
+
const a = l(r);
|
|
46
46
|
t !== a && ((w = n.onReorder) == null || w.call(n, {
|
|
47
47
|
rowId: t,
|
|
48
|
-
beforeRowId: s.value === "before" ? a :
|
|
48
|
+
beforeRowId: s.value === "before" ? a : C(a)
|
|
49
49
|
}));
|
|
50
50
|
}
|
|
51
51
|
h();
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function y() {
|
|
54
54
|
h();
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function C(e) {
|
|
57
57
|
const r = i.processedItems.value;
|
|
58
58
|
for (let n = 0; n < r.length; n++) {
|
|
59
59
|
const t = r[n];
|
|
60
|
-
if (!f(t) &&
|
|
60
|
+
if (!f(t) && l(t) === e) {
|
|
61
61
|
for (let o = n + 1; o < r.length; o++)
|
|
62
62
|
if (!f(r[o]))
|
|
63
|
-
return
|
|
63
|
+
return l(r[o]);
|
|
64
64
|
return null;
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
67
|
return null;
|
|
68
68
|
}
|
|
69
69
|
function h() {
|
|
70
|
-
I.value = !1, u.value = null, g.value = null,
|
|
70
|
+
I.value = !1, u.value = null, g.value = null, p = null;
|
|
71
71
|
}
|
|
72
72
|
return {
|
|
73
73
|
isDragging: D(I),
|
|
@@ -76,10 +76,10 @@ function y(i) {
|
|
|
76
76
|
dropPosition: D(s),
|
|
77
77
|
handleDragStart: T,
|
|
78
78
|
handleDragOver: R,
|
|
79
|
-
handleDrop:
|
|
80
|
-
handleDragEnd:
|
|
79
|
+
handleDrop: _,
|
|
80
|
+
handleDragEnd: y
|
|
81
81
|
};
|
|
82
82
|
}
|
|
83
83
|
export {
|
|
84
|
-
|
|
84
|
+
x as useRowDrag
|
|
85
85
|
};
|
|
@@ -27,7 +27,14 @@ export interface SupabaseFilterBuilder {
|
|
|
27
27
|
type?: "plain" | "phrase" | "websearch";
|
|
28
28
|
}): SupabaseFilterBuilder;
|
|
29
29
|
or(filters: string): SupabaseFilterBuilder;
|
|
30
|
-
then<
|
|
30
|
+
then<TResult1 = SupabaseQueryResult>(onfulfilled?: ((value: SupabaseQueryResult) => TResult1 | PromiseLike<TResult1>) | null, onrejected?: ((reason: unknown) => TResult1 | PromiseLike<TResult1>) | null): Promise<TResult1>;
|
|
31
|
+
}
|
|
32
|
+
export interface SupabaseQueryResult {
|
|
33
|
+
data: Record<string, unknown>[] | null;
|
|
34
|
+
error: {
|
|
35
|
+
message: string;
|
|
36
|
+
} | null;
|
|
37
|
+
count: number | null;
|
|
31
38
|
}
|
|
32
39
|
export interface UseSupabaseProviderOptions {
|
|
33
40
|
/** Supabase client instance (pass your createClient() result) */
|
|
@@ -4,14 +4,16 @@ export interface UseTableDataOptions {
|
|
|
4
4
|
tasks?: Ref<Task[] | undefined>;
|
|
5
5
|
records?: Ref<DataRecord[] | undefined>;
|
|
6
6
|
}
|
|
7
|
+
type TableRowBase = {
|
|
8
|
+
id: string;
|
|
9
|
+
} & Record<string, unknown>;
|
|
7
10
|
/**
|
|
8
11
|
* 将 Task[] 或 DataRecord[] 标准化为统一的行格式 T[]。
|
|
9
12
|
*
|
|
10
13
|
* - 优先使用 records:展开 fields 并保留 createdAt/updatedAt/__record 元信息
|
|
11
14
|
* - 否则使用 tasks(原样透传,不做额外转换)
|
|
12
15
|
*/
|
|
13
|
-
export declare function useTableData<T extends {
|
|
14
|
-
id: string;
|
|
15
|
-
} & Record<string, any>>(options: UseTableDataOptions): {
|
|
16
|
+
export declare function useTableData<T extends TableRowBase>(options: UseTableDataOptions): {
|
|
16
17
|
rows: import('vue').ComputedRef<T[]>;
|
|
17
18
|
};
|
|
19
|
+
export {};
|
|
@@ -25,9 +25,9 @@ export type GroupHeaderItem = {
|
|
|
25
25
|
export type GroupedListItem<T> = (T & {
|
|
26
26
|
__type: "data-row";
|
|
27
27
|
}) | GroupHeaderItem;
|
|
28
|
-
export declare function useTableGroup<T extends Record<string,
|
|
28
|
+
export declare function useTableGroup<T extends Record<string, unknown>>(options: UseTableGroupOptions<T>): {
|
|
29
29
|
groupedItems: import('vue').ComputedRef<GroupedListItem<T>[]>;
|
|
30
30
|
collapsedGroups: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
|
|
31
31
|
toggleGroup: (groupKey: string) => void;
|
|
32
|
-
isGroupHeader: (item:
|
|
32
|
+
isGroupHeader: (item: GroupedListItem<T>) => item is GroupHeaderItem;
|
|
33
33
|
};
|
|
@@ -10,12 +10,40 @@ export interface ViewStorageBackend {
|
|
|
10
10
|
export declare function createLocalStorageBackend(): ViewStorageBackend;
|
|
11
11
|
export interface SupabaseViewBackendOptions {
|
|
12
12
|
/** Supabase client (最小接口:from().select/insert/update/delete) */
|
|
13
|
-
client:
|
|
14
|
-
from(table: string): any;
|
|
15
|
-
};
|
|
13
|
+
client: SupabaseViewClientLike;
|
|
16
14
|
/** 存储视图配置的表名,默认 'view_configs' */
|
|
17
15
|
tableName?: string;
|
|
18
16
|
}
|
|
17
|
+
interface SupabaseMutationResult {
|
|
18
|
+
error: {
|
|
19
|
+
message: string;
|
|
20
|
+
} | null;
|
|
21
|
+
}
|
|
22
|
+
interface SupabaseViewRow {
|
|
23
|
+
config: ViewConfig;
|
|
24
|
+
}
|
|
25
|
+
interface SupabaseViewDeleteBuilder extends PromiseLike<SupabaseMutationResult> {
|
|
26
|
+
eq(column: string, value: string): SupabaseViewDeleteBuilder;
|
|
27
|
+
}
|
|
28
|
+
interface SupabaseViewQueryBuilder {
|
|
29
|
+
select(columns: string): SupabaseViewQueryBuilder;
|
|
30
|
+
eq(column: string, value: string): SupabaseViewQueryBuilder;
|
|
31
|
+
order(column: string, options?: {
|
|
32
|
+
ascending?: boolean;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
data: SupabaseViewRow[] | null;
|
|
35
|
+
error: {
|
|
36
|
+
message: string;
|
|
37
|
+
} | null;
|
|
38
|
+
}>;
|
|
39
|
+
upsert(value: Record<string, unknown>, options?: {
|
|
40
|
+
onConflict?: string;
|
|
41
|
+
}): Promise<SupabaseMutationResult>;
|
|
42
|
+
delete(): SupabaseViewDeleteBuilder;
|
|
43
|
+
}
|
|
44
|
+
interface SupabaseViewClientLike {
|
|
45
|
+
from(table: string): SupabaseViewQueryBuilder;
|
|
46
|
+
}
|
|
19
47
|
export declare function createSupabaseBackend(options: SupabaseViewBackendOptions): ViewStorageBackend;
|
|
20
48
|
export interface UseViewPersistenceOptions {
|
|
21
49
|
/** 表 ID */
|
|
@@ -96,3 +124,4 @@ export declare function useViewPersistence(options: UseViewPersistenceOptions):
|
|
|
96
124
|
duplicateView: (sourceViewId: string, newName: string) => Promise<string>;
|
|
97
125
|
updateActiveView: (patch: Partial<ViewConfig>) => void;
|
|
98
126
|
};
|
|
127
|
+
export {};
|
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import { ref as w, computed as
|
|
2
|
-
function
|
|
3
|
-
var
|
|
4
|
-
const { items: n, itemHeight: c, overscan: V = 5, containerRef: B } = I,
|
|
1
|
+
import { ref as w, computed as p, watch as L, getCurrentScope as Q, onScopeDispose as W } from "vue";
|
|
2
|
+
function Z(I) {
|
|
3
|
+
var F;
|
|
4
|
+
const { items: n, itemHeight: c, overscan: V = 5, containerRef: B } = I, s = w(0), f = w(0), v = typeof c == "number", g = Math.max(0, V), a = /* @__PURE__ */ new Map(), T = w(0);
|
|
5
5
|
let d = null, h = null, r = null;
|
|
6
|
-
function
|
|
7
|
-
return a.has(e) ? a.get(e) :
|
|
6
|
+
function A(e) {
|
|
7
|
+
return a.has(e) ? a.get(e) : v ? c : c(e);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function D() {
|
|
10
10
|
!I.measureRow || typeof ResizeObserver > "u" || (h = new ResizeObserver((e) => {
|
|
11
11
|
let t = !1;
|
|
12
12
|
for (const l of e) {
|
|
13
13
|
const i = l.target.dataset.virtualIndex;
|
|
14
14
|
if (i == null) continue;
|
|
15
|
-
const
|
|
16
|
-
a.get(
|
|
15
|
+
const u = parseInt(i, 10), m = l.contentRect.height;
|
|
16
|
+
a.get(u) !== m && (a.set(u, m), t = !0);
|
|
17
17
|
}
|
|
18
18
|
t && T.value++;
|
|
19
19
|
}));
|
|
20
20
|
}
|
|
21
|
-
|
|
21
|
+
D();
|
|
22
22
|
function P(e, t) {
|
|
23
23
|
!e || !h || (e.dataset.virtualIndex = String(t), h.observe(e));
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
if (T.value,
|
|
25
|
+
const M = p(() => {
|
|
26
|
+
if (T.value, v && a.size === 0) return [];
|
|
27
27
|
const e = new Array(n.value.length + 1).fill(0);
|
|
28
28
|
for (let t = 0; t < n.value.length; t += 1)
|
|
29
|
-
e[t + 1] = e[t] + Math.max(0,
|
|
29
|
+
e[t + 1] = e[t] + Math.max(0, A(t));
|
|
30
30
|
return e;
|
|
31
|
-
}), x =
|
|
32
|
-
function
|
|
31
|
+
}), x = p(() => v && a.size === 0 ? n.value.length * c : M.value[n.value.length] ?? 0);
|
|
32
|
+
function C(e) {
|
|
33
33
|
const t = Math.max(0, Math.min(e, n.value.length));
|
|
34
|
-
return
|
|
34
|
+
return v && a.size === 0 ? t * c : M.value[t] ?? 0;
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function H(e) {
|
|
37
37
|
if (n.value.length === 0) return 0;
|
|
38
|
-
if (
|
|
38
|
+
if (v && a.size === 0) {
|
|
39
39
|
const i = c;
|
|
40
40
|
return Math.max(
|
|
41
41
|
0,
|
|
42
42
|
Math.min(n.value.length - 1, Math.floor(Math.max(0, e) / i))
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
|
-
const t =
|
|
45
|
+
const t = M.value;
|
|
46
46
|
let l = 0, o = n.value.length;
|
|
47
47
|
for (; l < o; ) {
|
|
48
48
|
const i = Math.floor((l + o) / 2);
|
|
@@ -50,23 +50,23 @@ function W(I) {
|
|
|
50
50
|
}
|
|
51
51
|
return Math.max(0, Math.min(l, n.value.length - 1));
|
|
52
52
|
}
|
|
53
|
-
const
|
|
53
|
+
const R = p(() => {
|
|
54
54
|
const e = n.value.length;
|
|
55
55
|
if (e === 0)
|
|
56
56
|
return { start: 0, end: 0 };
|
|
57
|
-
if (
|
|
58
|
-
return { start: 0, end: Math.min(e,
|
|
59
|
-
if (
|
|
60
|
-
const
|
|
61
|
-
return { start:
|
|
57
|
+
if (f.value <= 0)
|
|
58
|
+
return { start: 0, end: Math.min(e, g * 2 + 1) };
|
|
59
|
+
if (v && a.size === 0) {
|
|
60
|
+
const u = c, m = Math.floor(s.value / u), J = Math.ceil(f.value / u), K = Math.max(0, m - g), N = Math.min(e, m + J + g);
|
|
61
|
+
return { start: K, end: N };
|
|
62
62
|
}
|
|
63
|
-
const t = Math.max(0,
|
|
63
|
+
const t = Math.max(0, s.value), l = t + f.value, o = H(t), i = Math.min(e - 1, H(l));
|
|
64
64
|
return {
|
|
65
|
-
start: Math.max(0, o -
|
|
66
|
-
end: Math.min(e, i +
|
|
65
|
+
start: Math.max(0, o - g),
|
|
66
|
+
end: Math.min(e, i + g + 1)
|
|
67
67
|
};
|
|
68
|
-
}),
|
|
69
|
-
const { start: e, end: t } =
|
|
68
|
+
}), U = p(() => C(R.value.start)), Y = p(() => {
|
|
69
|
+
const { start: e, end: t } = R.value;
|
|
70
70
|
return n.value.slice(e, t).map((l, o) => ({
|
|
71
71
|
data: l,
|
|
72
72
|
index: e + o
|
|
@@ -74,67 +74,68 @@ function W(I) {
|
|
|
74
74
|
});
|
|
75
75
|
function b(e) {
|
|
76
76
|
if (!e) {
|
|
77
|
-
|
|
77
|
+
s.value = 0, f.value = 0;
|
|
78
78
|
return;
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
s.value = e.scrollTop, f.value = e.clientHeight;
|
|
81
81
|
}
|
|
82
|
-
function
|
|
83
|
-
r && (
|
|
82
|
+
function z() {
|
|
83
|
+
r && (s.value = r.scrollTop);
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function S() {
|
|
86
86
|
d == null || d.disconnect(), d = null;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
e && e.removeEventListener("scroll",
|
|
88
|
+
function y(e) {
|
|
89
|
+
e && e.removeEventListener("scroll", z);
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function j(e) {
|
|
92
92
|
if (!e) {
|
|
93
93
|
r = null, b(null);
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
96
|
-
r = e, e.addEventListener("scroll",
|
|
96
|
+
r = e, e.addEventListener("scroll", z, { passive: !0 }), b(e), typeof ResizeObserver < "u" && (d = new ResizeObserver(() => {
|
|
97
97
|
b(e);
|
|
98
98
|
}), d.observe(e));
|
|
99
99
|
}
|
|
100
100
|
L(
|
|
101
101
|
B,
|
|
102
102
|
(e, t) => {
|
|
103
|
-
|
|
103
|
+
y(t), S(), j(e);
|
|
104
104
|
},
|
|
105
105
|
{ immediate: !0 }
|
|
106
106
|
);
|
|
107
|
-
let
|
|
107
|
+
let O = n.value.length, E = n.value.length > 0 ? (F = n.value[0]) == null ? void 0 : F.id : void 0;
|
|
108
108
|
L(n, (e) => {
|
|
109
|
-
var
|
|
110
|
-
const t = e.length, l = t > 0 ? (
|
|
111
|
-
if (
|
|
109
|
+
var u;
|
|
110
|
+
const t = e.length, l = t > 0 ? (u = e[0]) == null ? void 0 : u.id : void 0, o = t === O && l === E;
|
|
111
|
+
if (O = t, E = l, o)
|
|
112
112
|
return;
|
|
113
113
|
a.clear();
|
|
114
|
-
const i = Math.max(0, x.value -
|
|
115
|
-
|
|
114
|
+
const i = Math.max(0, x.value - f.value);
|
|
115
|
+
s.value > i && (s.value = i, r && (r.scrollTop = i));
|
|
116
116
|
});
|
|
117
|
-
function
|
|
117
|
+
function k(e) {
|
|
118
118
|
if (!r || n.value.length === 0) return;
|
|
119
|
-
const t = Math.max(0, Math.min(e, n.value.length - 1)), l =
|
|
120
|
-
r.scrollTop = l,
|
|
119
|
+
const t = Math.max(0, Math.min(e, n.value.length - 1)), l = C(t);
|
|
120
|
+
r.scrollTop = l, s.value = l;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function q() {
|
|
123
123
|
if (!r) return;
|
|
124
124
|
const e = Math.max(0, x.value - r.clientHeight);
|
|
125
|
-
r.scrollTop = e,
|
|
125
|
+
r.scrollTop = e, s.value = e;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
}
|
|
130
|
-
|
|
127
|
+
const G = () => {
|
|
128
|
+
y(r), S(), h == null || h.disconnect(), h = null, r = null;
|
|
129
|
+
};
|
|
130
|
+
return Q() && W(G), {
|
|
131
|
+
visibleItems: Y,
|
|
131
132
|
totalHeight: x,
|
|
132
|
-
offsetY:
|
|
133
|
-
scrollToIndex:
|
|
134
|
-
scrollToBottom:
|
|
133
|
+
offsetY: U,
|
|
134
|
+
scrollToIndex: k,
|
|
135
|
+
scrollToBottom: q,
|
|
135
136
|
observeRow: P
|
|
136
137
|
};
|
|
137
138
|
}
|
|
138
139
|
export {
|
|
139
|
-
|
|
140
|
+
Z as useVirtualList
|
|
140
141
|
};
|
package/dist/plugin.js
CHANGED
|
@@ -1,99 +1,98 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import t from "./components/field/FieldMarkdownPreview.vue.js";
|
|
2
|
+
import i from "./components/ContextMenu/index.vue.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
/* empty css */
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
import
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
import
|
|
32
|
-
import
|
|
33
|
-
import
|
|
34
|
-
import
|
|
35
|
-
import
|
|
36
|
-
import
|
|
37
|
-
import
|
|
38
|
-
import
|
|
39
|
-
import
|
|
40
|
-
import
|
|
41
|
-
import
|
|
42
|
-
import
|
|
43
|
-
import
|
|
44
|
-
import
|
|
45
|
-
import
|
|
46
|
-
import
|
|
47
|
-
import
|
|
48
|
-
import
|
|
49
|
-
import
|
|
50
|
-
import
|
|
51
|
-
import
|
|
52
|
-
import
|
|
53
|
-
import
|
|
54
|
-
import
|
|
55
|
-
import
|
|
56
|
-
import
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import
|
|
64
|
-
import
|
|
65
|
-
import
|
|
66
|
-
import
|
|
67
|
-
import
|
|
68
|
-
import
|
|
69
|
-
import
|
|
70
|
-
import
|
|
71
|
-
import
|
|
72
|
-
import
|
|
73
|
-
import
|
|
74
|
-
import
|
|
5
|
+
import p from "./components/base/ViewTab.vue.js";
|
|
6
|
+
import e from "./components/base/ToolbarBtn.vue.js";
|
|
7
|
+
import a from "./components/base/AddViewBtn.vue.js";
|
|
8
|
+
import f from "./components/base/Badge.vue.js";
|
|
9
|
+
import n from "./components/base/RangeSlider.vue.js";
|
|
10
|
+
import l from "./components/base/ProgressBar.vue.js";
|
|
11
|
+
import d from "./components/base/ButtonGroup.vue.js";
|
|
12
|
+
import s from "./components/base/EmptyState.vue.js";
|
|
13
|
+
import b from "./components/base/StatisticCard.vue.js";
|
|
14
|
+
import c from "./components/base/DropdownMenu.vue.js";
|
|
15
|
+
import u from "./components/base/StatusIndicator.vue.js";
|
|
16
|
+
import w from "./components/base/Switch.vue.js";
|
|
17
|
+
import C from "./components/base/Stepper.vue.js";
|
|
18
|
+
import T from "./components/base/Accordion.vue.js";
|
|
19
|
+
import B from "./components/base/Avatar.vue.js";
|
|
20
|
+
import S from "./components/layout/AppLayout.vue.js";
|
|
21
|
+
import g from "./components/layout/Navbar.vue.js";
|
|
22
|
+
import P from "./components/layout/Sidebar.vue.js";
|
|
23
|
+
import h from "./components/layout/StatusBar.vue.js";
|
|
24
|
+
import M from "./components/table/DataTable.vue.js";
|
|
25
|
+
import A from "./components/table/TableHeaderRow.vue.js";
|
|
26
|
+
import R from "./components/table/TableDataRow.vue.js";
|
|
27
|
+
import k from "./components/table/TableGroupRow.vue.js";
|
|
28
|
+
import D from "./components/table/NewRowBtn.vue.js";
|
|
29
|
+
import y from "./components/table/TableFilterPanel.vue.js";
|
|
30
|
+
import I from "./components/table/TableColumnManager.vue.js";
|
|
31
|
+
import G from "./components/table/TableToolbar.vue.js";
|
|
32
|
+
import F from "./components/table/FieldCell.vue.js";
|
|
33
|
+
import V from "./components/table/FieldTypePicker.vue.js";
|
|
34
|
+
import _ from "./components/table/ColumnHeaderMenu.vue.js";
|
|
35
|
+
import v from "./components/kanban/KanbanBoard.vue.js";
|
|
36
|
+
import L from "./components/kanban/KanbanColumn.vue.js";
|
|
37
|
+
import x from "./components/kanban/KanbanCard.vue.js";
|
|
38
|
+
import E from "./components/kanban/QuickAddRow.vue.js";
|
|
39
|
+
import H from "./components/gallery/GalleryView.vue.js";
|
|
40
|
+
import K from "./components/gallery/GalleryCard.vue.js";
|
|
41
|
+
import N from "./components/timeline/ActivityTimeline.vue.js";
|
|
42
|
+
import U from "./components/timeline/GanttTimeline.vue.js";
|
|
43
|
+
import Q from "./components/timeline/GanttRow.vue.js";
|
|
44
|
+
import O from "./components/editor/ContentBlock.vue.js";
|
|
45
|
+
import $ from "./components/editor/BlockQuote.vue.js";
|
|
46
|
+
import j from "./components/editor/CodeBlock.vue.js";
|
|
47
|
+
import q from "./components/editor/RefLink.vue.js";
|
|
48
|
+
import z from "./components/editor/RichTextEditor.vue.js";
|
|
49
|
+
import J from "./components/form/FormDesigner.vue.js";
|
|
50
|
+
import W from "./components/database/DatabaseView.vue.js";
|
|
51
|
+
import X from "./components/auxiliary/ColorPanel.vue.js";
|
|
52
|
+
import Y from "./components/auxiliary/PersonPanel.vue.js";
|
|
53
|
+
import Z from "./components/auxiliary/FileUpload.vue.js";
|
|
54
|
+
import rr from "./components/detail/DetailLayout.vue.js";
|
|
55
|
+
import or from "./components/detail/PropPanel.vue.js";
|
|
56
|
+
import mr from "./components/detail/PropRow.vue.js";
|
|
57
|
+
import tr from "./components/detail/CommentItem.vue.js";
|
|
58
|
+
import ir from "./components/Dashboard/index.vue.js";
|
|
59
|
+
import pr from "./components/Dashboard/charts/BarChart.vue.js";
|
|
60
|
+
import er from "./components/Dashboard/charts/PieChart.vue.js";
|
|
61
|
+
import ar from "./components/Dashboard/charts/DoughnutChart.vue.js";
|
|
62
|
+
import fr from "./components/Dashboard/charts/NumberCard.vue.js";
|
|
63
|
+
import nr from "./components/Dashboard/charts/TableChart.vue.js";
|
|
64
|
+
import lr from "./components/ai/AiThinking.vue.js";
|
|
65
|
+
import dr from "./components/ai/AiStreamingCursor.vue.js";
|
|
66
|
+
import sr from "./components/ai/AiMessageBubble.vue.js";
|
|
67
|
+
import br from "./components/ai/UserMessageBubble.vue.js";
|
|
68
|
+
import cr from "./components/ai/AiMessageList.vue.js";
|
|
69
|
+
import ur from "./components/ai/AiSender.vue.js";
|
|
70
|
+
import wr from "./components/overlay/Modal.vue.js";
|
|
71
|
+
import Cr from "./components/overlay/Dialog.vue.js";
|
|
72
|
+
import Tr from "./components/overlay/Drawer.vue.js";
|
|
73
|
+
import Br from "./components/overlay/SidePanel.vue.js";
|
|
74
|
+
import Sr from "./components/toast/ToastContainer.vue.js";
|
|
75
75
|
/* empty css */
|
|
76
|
-
import
|
|
77
|
-
import
|
|
78
|
-
import
|
|
79
|
-
import
|
|
80
|
-
import
|
|
81
|
-
import
|
|
82
|
-
import
|
|
83
|
-
import
|
|
84
|
-
import
|
|
85
|
-
import
|
|
86
|
-
import
|
|
87
|
-
import
|
|
88
|
-
import
|
|
89
|
-
import
|
|
90
|
-
import
|
|
91
|
-
import
|
|
92
|
-
import
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
const
|
|
96
|
-
i,
|
|
76
|
+
import gr from "./components/toast/ToastItem.vue.js";
|
|
77
|
+
import Pr from "./components/tabs/Tabs.vue.js";
|
|
78
|
+
import hr from "./components/tabs/TabPanel.vue.js";
|
|
79
|
+
import Mr from "./components/breadcrumb/Breadcrumb.vue.js";
|
|
80
|
+
import Ar from "./components/breadcrumb/BreadcrumbItem.vue.js";
|
|
81
|
+
import Rr from "./components/mermaid/MermaidChart.vue.js";
|
|
82
|
+
import kr from "./components/split/SplitPane.vue.js";
|
|
83
|
+
import Dr from "./components/base/RefTag.vue.js";
|
|
84
|
+
import yr from "./components/base/DescBlock.vue.js";
|
|
85
|
+
import Ir from "./components/base/ViewModeGroup.vue.js";
|
|
86
|
+
import Gr from "./components/base/ViewSwitcher.vue.js";
|
|
87
|
+
import Fr from "./components/base/SelectBadge.vue.js";
|
|
88
|
+
import Vr from "./components/base/ChainItem.vue.js";
|
|
89
|
+
import _r from "./components/base/SectionBlock.vue.js";
|
|
90
|
+
import vr from "./components/base/MonitorItem.vue.js";
|
|
91
|
+
import Lr from "./components/base/StatusSummary.vue.js";
|
|
92
|
+
import xr from "./components/base/InfoCard.vue.js";
|
|
93
|
+
import Er from "./components/base/PersonaCard.vue.js";
|
|
94
|
+
import Hr from "./components/base/SearchHighlight.vue.js";
|
|
95
|
+
const Kr = [
|
|
97
96
|
p,
|
|
98
97
|
e,
|
|
99
98
|
a,
|
|
@@ -123,8 +122,8 @@ const Hr = [
|
|
|
123
122
|
G,
|
|
124
123
|
F,
|
|
125
124
|
V,
|
|
126
|
-
m,
|
|
127
125
|
_,
|
|
126
|
+
t,
|
|
128
127
|
v,
|
|
129
128
|
L,
|
|
130
129
|
x,
|
|
@@ -175,23 +174,25 @@ const Hr = [
|
|
|
175
174
|
Dr,
|
|
176
175
|
yr,
|
|
177
176
|
Ir,
|
|
178
|
-
t,
|
|
179
177
|
Gr,
|
|
178
|
+
i,
|
|
180
179
|
Fr,
|
|
181
180
|
Vr,
|
|
182
181
|
_r,
|
|
183
182
|
vr,
|
|
184
183
|
Lr,
|
|
185
184
|
xr,
|
|
186
|
-
Er
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
185
|
+
Er,
|
|
186
|
+
Hr
|
|
187
|
+
], Dm = {
|
|
188
|
+
install(m) {
|
|
189
|
+
Kr.forEach((r) => {
|
|
190
|
+
const o = r;
|
|
191
|
+
m.component(o.name || o.__name || "", r);
|
|
191
192
|
});
|
|
192
193
|
}
|
|
193
194
|
};
|
|
194
195
|
export {
|
|
195
|
-
|
|
196
|
-
|
|
196
|
+
Dm as OneflowUI,
|
|
197
|
+
Dm as default
|
|
197
198
|
};
|