@oneflowui/ui 0.8.4 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +296 -0
- package/README.md +296 -0
- package/dist/components/ai/AiMessageList.vue.js +1 -1
- package/dist/components/ai/AiMessageList.vue2.js +28 -27
- package/dist/components/common/ThemeScope.vue.d.ts +24 -0
- package/dist/components/common/ThemeScope.vue.js +24 -0
- package/dist/components/common/ThemeScope.vue2.js +4 -0
- package/dist/components/common/ThemeScopeScene.vue.d.ts +31 -0
- package/dist/components/common/ThemeScopeScene.vue.js +7 -0
- package/dist/components/common/ThemeScopeScene.vue2.js +56 -0
- package/dist/components/common/index.d.ts +2 -0
- package/dist/components/database/DatabaseView.vue.d.ts +4 -4
- package/dist/components/database/DatabaseView.vue.js +4 -4
- package/dist/components/database/DatabaseView.vue2.js +135 -134
- package/dist/components/database/index.d.ts +1 -1
- package/dist/components/kanban/KanbanColumn.vue.js +3 -3
- package/dist/components/kanban/KanbanColumn.vue2.js +31 -30
- package/dist/components/table/DataTable.vue.js +2 -2
- package/dist/components/table/DataTable.vue2.js +251 -249
- package/dist/composables/index.d.ts +5 -3
- package/dist/composables/useDataTableLayout.d.ts +1 -0
- package/dist/composables/useDataTableLayout.js +29 -26
- package/dist/composables/useDatabaseView.d.ts +1 -1
- package/dist/composables/useDatabaseView.js +311 -284
- package/dist/composables/useDatabaseViewMiddleware.d.ts +56 -0
- package/dist/composables/useDatabaseViewMiddleware.js +158 -0
- package/dist/composables/useVirtualList.d.ts +11 -0
- package/dist/composables/useVirtualList.js +146 -104
- package/dist/composables.js +74 -0
- package/dist/contracts/database.d.ts +23 -0
- package/dist/index.d.ts +6 -3
- package/dist/index.js +267 -253
- package/dist/style.css +1 -1
- package/dist/theme.d.ts +1 -0
- package/dist/theme.js +4 -0
- package/package.json +16 -2
|
@@ -1,55 +1,56 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useVirtualList as A } from "../../composables/useVirtualList.js";
|
|
1
|
+
import { defineComponent as T, ref as b, computed as x, watch as M, nextTick as L, openBlock as t, createElementBlock as n, createElementVNode as u, normalizeStyle as f, unref as s, Fragment as p, renderList as S, createBlock as r, createCommentVNode as _ } from "vue";
|
|
2
|
+
import { createVirtualListState as V, useVirtualList as A } from "../../composables/useVirtualList.js";
|
|
3
3
|
import E from "./AiMessageBubble.vue.js";
|
|
4
4
|
import H from "./UserMessageBubble.vue.js";
|
|
5
5
|
import R from "./AiThinking.vue.js";
|
|
6
|
-
const
|
|
6
|
+
const F = /* @__PURE__ */ T({
|
|
7
7
|
__name: "AiMessageList",
|
|
8
8
|
props: {
|
|
9
9
|
messages: {},
|
|
10
10
|
isThinking: { type: Boolean }
|
|
11
11
|
},
|
|
12
12
|
setup(o) {
|
|
13
|
-
const
|
|
13
|
+
const a = o, l = b(null), g = V(), h = (m) => {
|
|
14
14
|
var c;
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
if (
|
|
18
|
-
const e = Math.ceil((((c =
|
|
15
|
+
const i = a.messages[m];
|
|
16
|
+
if (!i) return 80;
|
|
17
|
+
if (i.role === "user") return 60;
|
|
18
|
+
const e = Math.ceil((((c = i.content) == null ? void 0 : c.length) ?? 0) / 60);
|
|
19
19
|
return Math.max(80, 48 + e * 24);
|
|
20
20
|
}, {
|
|
21
|
-
visibleItems:
|
|
22
|
-
totalHeight:
|
|
23
|
-
offsetY:
|
|
24
|
-
scrollToBottom:
|
|
21
|
+
visibleItems: v,
|
|
22
|
+
totalHeight: k,
|
|
23
|
+
offsetY: d,
|
|
24
|
+
scrollToBottom: y
|
|
25
25
|
} = A({
|
|
26
|
-
items:
|
|
27
|
-
itemHeight:
|
|
26
|
+
items: x(() => a.messages),
|
|
27
|
+
itemHeight: h,
|
|
28
28
|
overscan: 3,
|
|
29
|
-
containerRef:
|
|
29
|
+
containerRef: l,
|
|
30
|
+
state: g
|
|
30
31
|
});
|
|
31
|
-
function
|
|
32
|
-
|
|
32
|
+
function B() {
|
|
33
|
+
y();
|
|
33
34
|
}
|
|
34
|
-
return
|
|
35
|
-
() => [
|
|
35
|
+
return M(
|
|
36
|
+
() => [a.messages.length, a.isThinking],
|
|
36
37
|
async () => {
|
|
37
|
-
await
|
|
38
|
+
await L(), B();
|
|
38
39
|
},
|
|
39
40
|
{ immediate: !0 }
|
|
40
|
-
), (
|
|
41
|
+
), (m, i) => (t(), n("div", {
|
|
41
42
|
ref_key: "listRef",
|
|
42
|
-
ref:
|
|
43
|
+
ref: l,
|
|
43
44
|
class: "of-ai-message-list"
|
|
44
45
|
}, [
|
|
45
46
|
u("div", {
|
|
46
|
-
style: f({ height: s(
|
|
47
|
+
style: f({ height: s(k) + "px", position: "relative" })
|
|
47
48
|
}, [
|
|
48
49
|
u("div", {
|
|
49
50
|
class: "of-ai-message-list-inner",
|
|
50
|
-
style: f({ transform: `translateY(${s(
|
|
51
|
+
style: f({ transform: `translateY(${s(d)}px)` })
|
|
51
52
|
}, [
|
|
52
|
-
(t(!0), n(p, null,
|
|
53
|
+
(t(!0), n(p, null, S(s(v), ({ data: e }) => (t(), n(p, {
|
|
53
54
|
key: e.id
|
|
54
55
|
}, [
|
|
55
56
|
e.role === "ai" ? (t(), r(E, {
|
|
@@ -69,10 +70,10 @@ const Y = /* @__PURE__ */ B({
|
|
|
69
70
|
], 64))), 128))
|
|
70
71
|
], 4)
|
|
71
72
|
], 4),
|
|
72
|
-
o.isThinking ? (t(), r(R, { key: 0 })) :
|
|
73
|
+
o.isThinking ? (t(), r(R, { key: 0 })) : _("", !0)
|
|
73
74
|
], 512));
|
|
74
75
|
}
|
|
75
76
|
});
|
|
76
77
|
export {
|
|
77
|
-
|
|
78
|
+
F as default
|
|
78
79
|
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
type ThemeScopeTheme = "neutral" | "ops-console";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
theme: ThemeScopeTheme;
|
|
4
|
+
tag?: string;
|
|
5
|
+
};
|
|
6
|
+
declare function __VLS_template(): {
|
|
7
|
+
attrs: Partial<{}>;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(_: {}): any;
|
|
10
|
+
};
|
|
11
|
+
refs: {};
|
|
12
|
+
rootEl: any;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
15
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
16
|
+
tag: string;
|
|
17
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { defineComponent as a, openBlock as m, createBlock as n, resolveDynamicComponent as p, withCtx as c, renderSlot as r } from "vue";
|
|
2
|
+
const f = /* @__PURE__ */ a({
|
|
3
|
+
name: "ThemeScope",
|
|
4
|
+
__name: "ThemeScope",
|
|
5
|
+
props: {
|
|
6
|
+
theme: {},
|
|
7
|
+
tag: { default: "div" }
|
|
8
|
+
},
|
|
9
|
+
setup(t) {
|
|
10
|
+
const e = t;
|
|
11
|
+
return (o, s) => (m(), n(p(e.tag), {
|
|
12
|
+
"data-of-theme": e.theme,
|
|
13
|
+
"data-of-theme-scope": e.theme
|
|
14
|
+
}, {
|
|
15
|
+
default: c(() => [
|
|
16
|
+
r(o.$slots, "default")
|
|
17
|
+
]),
|
|
18
|
+
_: 3
|
|
19
|
+
}, 8, ["data-of-theme", "data-of-theme-scope"]));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
export {
|
|
23
|
+
f as default
|
|
24
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
type ThemeScopeTheme = "neutral" | "ops-console";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
theme: ThemeScopeTheme;
|
|
4
|
+
title: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
eyebrow?: string;
|
|
7
|
+
tag?: string;
|
|
8
|
+
};
|
|
9
|
+
declare function __VLS_template(): {
|
|
10
|
+
attrs: Partial<{}>;
|
|
11
|
+
slots: {
|
|
12
|
+
meta?(_: {}): any;
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
footer?(_: {}): any;
|
|
15
|
+
};
|
|
16
|
+
refs: {};
|
|
17
|
+
rootEl: any;
|
|
18
|
+
};
|
|
19
|
+
type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
20
|
+
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
21
|
+
description: string;
|
|
22
|
+
tag: string;
|
|
23
|
+
eyebrow: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
28
|
+
new (): {
|
|
29
|
+
$slots: S;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { defineComponent as i, openBlock as o, createBlock as d, withCtx as m, createElementVNode as s, createElementBlock as c, toDisplayString as r, createCommentVNode as n, renderSlot as a } from "vue";
|
|
2
|
+
import l from "./ThemeScope.vue.js";
|
|
3
|
+
const h = { class: "of-theme-scope-scene__header" }, p = { class: "of-theme-scope-scene__heading" }, f = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "of-theme-scope-scene__eyebrow"
|
|
6
|
+
}, u = { class: "of-theme-scope-scene__title" }, y = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "of-theme-scope-scene__description"
|
|
9
|
+
}, k = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "of-theme-scope-scene__meta"
|
|
12
|
+
}, g = { class: "of-theme-scope-scene__body" }, v = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "of-theme-scope-scene__footer"
|
|
15
|
+
}, w = /* @__PURE__ */ i({
|
|
16
|
+
name: "ThemeScopeScene",
|
|
17
|
+
__name: "ThemeScopeScene",
|
|
18
|
+
props: {
|
|
19
|
+
theme: {},
|
|
20
|
+
title: {},
|
|
21
|
+
description: { default: "" },
|
|
22
|
+
eyebrow: { default: "" },
|
|
23
|
+
tag: { default: "section" }
|
|
24
|
+
},
|
|
25
|
+
setup(_) {
|
|
26
|
+
const e = _;
|
|
27
|
+
return (t, S) => (o(), d(l, {
|
|
28
|
+
theme: e.theme,
|
|
29
|
+
tag: e.tag,
|
|
30
|
+
class: "of-theme-scope-scene"
|
|
31
|
+
}, {
|
|
32
|
+
default: m(() => [
|
|
33
|
+
s("header", h, [
|
|
34
|
+
s("div", p, [
|
|
35
|
+
e.eyebrow ? (o(), c("p", f, r(e.eyebrow), 1)) : n("", !0),
|
|
36
|
+
s("h3", u, r(e.title), 1),
|
|
37
|
+
e.description ? (o(), c("p", y, r(e.description), 1)) : n("", !0)
|
|
38
|
+
]),
|
|
39
|
+
t.$slots.meta ? (o(), c("div", k, [
|
|
40
|
+
a(t.$slots, "meta", {}, void 0, !0)
|
|
41
|
+
])) : n("", !0)
|
|
42
|
+
]),
|
|
43
|
+
s("div", g, [
|
|
44
|
+
a(t.$slots, "default", {}, void 0, !0)
|
|
45
|
+
]),
|
|
46
|
+
t.$slots.footer ? (o(), c("footer", v, [
|
|
47
|
+
a(t.$slots, "footer", {}, void 0, !0)
|
|
48
|
+
])) : n("", !0)
|
|
49
|
+
]),
|
|
50
|
+
_: 3
|
|
51
|
+
}, 8, ["theme", "tag"]));
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
export {
|
|
55
|
+
w as default
|
|
56
|
+
};
|
|
@@ -36,10 +36,10 @@ declare const _default: import('vue').DefineComponent<DatabaseViewProps, {}, {},
|
|
|
36
36
|
endDate?: string;
|
|
37
37
|
}) => any;
|
|
38
38
|
"update:records": (args_0: DataRecord[]) => any;
|
|
39
|
-
"update:currentViewId": (args_0: string) => any;
|
|
40
|
-
"update:selectedRecordId": (args_0: string | null) => any;
|
|
41
39
|
"select-record": (args_0: DataRecord | null) => any;
|
|
42
40
|
refresh: () => any;
|
|
41
|
+
"update:currentViewId": (args_0: string) => any;
|
|
42
|
+
"update:selectedRecordId": (args_0: string | null) => any;
|
|
43
43
|
}, string, import('vue').PublicProps, Readonly<DatabaseViewProps> & Readonly<{
|
|
44
44
|
onSort?: ((args_0: string) => any) | undefined;
|
|
45
45
|
onAdd?: (() => any) | undefined;
|
|
@@ -75,10 +75,10 @@ declare const _default: import('vue').DefineComponent<DatabaseViewProps, {}, {},
|
|
|
75
75
|
endDate?: string;
|
|
76
76
|
}) => any) | undefined;
|
|
77
77
|
"onUpdate:records"?: ((args_0: DataRecord[]) => any) | undefined;
|
|
78
|
-
"onUpdate:currentViewId"?: ((args_0: string) => any) | undefined;
|
|
79
|
-
"onUpdate:selectedRecordId"?: ((args_0: string | null) => any) | undefined;
|
|
80
78
|
"onSelect-record"?: ((args_0: DataRecord | null) => any) | undefined;
|
|
81
79
|
onRefresh?: (() => any) | undefined;
|
|
80
|
+
"onUpdate:currentViewId"?: ((args_0: string) => any) | undefined;
|
|
81
|
+
"onUpdate:selectedRecordId"?: ((args_0: string | null) => any) | undefined;
|
|
82
82
|
}>, {
|
|
83
83
|
mode: import('../..').DatabaseViewMode;
|
|
84
84
|
error: string | Error | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "./DatabaseView.vue2.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import
|
|
4
|
-
const
|
|
3
|
+
import o from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ o(a, [["__scopeId", "data-v-163a8b49"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|