@farris/x-ui 0.4.1 → 0.4.3
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/components.d.ts +4 -1
- package/farris.x-ui.esm.js +3769 -3562
- package/farris.x-ui.umd.cjs +52 -52
- package/index.css +1 -1
- package/knowledge-trace/index.d.ts +9 -0
- package/knowledge-trace/src/aggregate.d.ts +3 -0
- package/knowledge-trace/src/knowledge-trace-panel.component.d.ts +38 -0
- package/knowledge-trace/src/knowledge-trace-strip.component.d.ts +17 -0
- package/knowledge-trace/src/test/aggregate.spec.d.ts +1 -0
- package/knowledge-trace/src/types.d.ts +20 -0
- package/package.json +1 -1
- package/popover/src/composition/use-popup.d.ts +1 -1
- package/popover/src/popover.component.d.ts +4 -1
- package/popover/src/popover.props.d.ts +9 -0
- package/popover/test/popover.spec.d.ts +1 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Plugin } from '../../vue';
|
|
2
|
+
import { default as FXKnowledgeTraceStrip } from '../../src/knowledge-trace-strip.component';
|
|
3
|
+
import { default as FXKnowledgeTracePanel } from '../../src/knowledge-trace-panel.component';
|
|
4
|
+
|
|
5
|
+
export * from '../../src/types';
|
|
6
|
+
export * from '../../src/aggregate';
|
|
7
|
+
export { FXKnowledgeTraceStrip, FXKnowledgeTracePanel };
|
|
8
|
+
declare const _default: typeof FXKnowledgeTraceStrip & Plugin;
|
|
9
|
+
export default _default;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { PropType } from '../../../vue';
|
|
2
|
+
import { KnowledgeTraceChunk } from '../../../types';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
|
|
5
|
+
chunks: {
|
|
6
|
+
type: PropType<KnowledgeTraceChunk[]>;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
isShow: {
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
default: boolean;
|
|
12
|
+
};
|
|
13
|
+
selectedContentId: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: undefined;
|
|
16
|
+
};
|
|
17
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, ("close" | "update:isShow")[], "close" | "update:isShow", import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
|
|
18
|
+
chunks: {
|
|
19
|
+
type: PropType<KnowledgeTraceChunk[]>;
|
|
20
|
+
default: () => never[];
|
|
21
|
+
};
|
|
22
|
+
isShow: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
selectedContentId: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
};
|
|
30
|
+
}>> & Readonly<{
|
|
31
|
+
onClose?: ((...args: any[]) => any) | undefined;
|
|
32
|
+
"onUpdate:isShow"?: ((...args: any[]) => any) | undefined;
|
|
33
|
+
}>, {
|
|
34
|
+
isShow: boolean;
|
|
35
|
+
chunks: KnowledgeTraceChunk[];
|
|
36
|
+
selectedContentId: string;
|
|
37
|
+
}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { PropType } from '../../../vue';
|
|
2
|
+
import { MessageContentKnowledgeTrace } from '../../../types';
|
|
3
|
+
|
|
4
|
+
declare const _default: import('../../../vue').DefineComponent<import('../../../vue').ExtractPropTypes<{
|
|
5
|
+
content: {
|
|
6
|
+
type: PropType<MessageContentKnowledgeTrace>;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}>, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, "open"[], "open", import('../../../vue').PublicProps, Readonly<import('../../../vue').ExtractPropTypes<{
|
|
10
|
+
content: {
|
|
11
|
+
type: PropType<MessageContentKnowledgeTrace>;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
}>> & Readonly<{
|
|
15
|
+
onOpen?: ((...args: any[]) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
|
|
17
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface KnowledgeTraceChunk {
|
|
2
|
+
contentId: string;
|
|
3
|
+
content: string;
|
|
4
|
+
docId: string;
|
|
5
|
+
docName: string;
|
|
6
|
+
score?: number;
|
|
7
|
+
/** 有值时可点击标题/文档名外链打开(对齐 farris ReferenceSource) */
|
|
8
|
+
url?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface MessageContentKnowledgeTrace {
|
|
11
|
+
type: 'KnowledgeTrace';
|
|
12
|
+
chunks: KnowledgeTraceChunk[];
|
|
13
|
+
}
|
|
14
|
+
export interface KnowledgeTraceDocGroup {
|
|
15
|
+
key: string;
|
|
16
|
+
docName: string;
|
|
17
|
+
chunkCount: number;
|
|
18
|
+
contentIds: string[];
|
|
19
|
+
url?: string;
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -2,4 +2,4 @@ import { Ref, SetupContext } from '../../../../vue';
|
|
|
2
2
|
import { PopoverProps } from '../../../../../popover.props';
|
|
3
3
|
import { UsePopup, UsePosition } from '../../../../types';
|
|
4
4
|
|
|
5
|
-
export declare function usePopup(props: PopoverProps, context: SetupContext, arrowRef: Ref<any>, popoverRef: Ref<any>, reference: Ref<any>, shouldFitWidthToReference: Ref<boolean>, usePositionComposition: UsePosition): UsePopup;
|
|
5
|
+
export declare function usePopup(props: PopoverProps, context: SetupContext, arrowRef: Ref<any>, popoverRef: Ref<any>, reference: Ref<any>, shouldFitWidthToReference: Ref<boolean>, usePositionComposition: UsePosition, shouldRender: Ref<boolean>): UsePopup;
|
|
@@ -15,6 +15,7 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
15
15
|
zIndex: number;
|
|
16
16
|
limitContentBySpace: boolean;
|
|
17
17
|
enableDrag: boolean;
|
|
18
|
+
renderWhenShown: boolean;
|
|
18
19
|
title?: string | undefined;
|
|
19
20
|
id?: string | undefined;
|
|
20
21
|
host?: any;
|
|
@@ -22,7 +23,7 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
22
23
|
reference?: any;
|
|
23
24
|
rightBoundary?: any;
|
|
24
25
|
beforeClose?: (() => Promise<boolean> | boolean) | undefined;
|
|
25
|
-
}, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<{
|
|
26
|
+
}, () => import("vue/jsx-runtime").JSX.Element | null, {}, {}, {}, import('../../../vue').ComponentOptionsMixin, import('../../../vue').ComponentOptionsMixin, {}, string, import('../../../vue').PublicProps, Readonly<{
|
|
26
27
|
class: string;
|
|
27
28
|
arrowOffsetX: number;
|
|
28
29
|
customStyles: Record<string, any>;
|
|
@@ -39,6 +40,7 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
39
40
|
zIndex: number;
|
|
40
41
|
limitContentBySpace: boolean;
|
|
41
42
|
enableDrag: boolean;
|
|
43
|
+
renderWhenShown: boolean;
|
|
42
44
|
title?: string | undefined;
|
|
43
45
|
id?: string | undefined;
|
|
44
46
|
host?: any;
|
|
@@ -63,5 +65,6 @@ declare const _default: import('../../../vue').DefineComponent<{
|
|
|
63
65
|
zIndex: number;
|
|
64
66
|
limitContentBySpace: boolean;
|
|
65
67
|
enableDrag: boolean;
|
|
68
|
+
renderWhenShown: boolean;
|
|
66
69
|
}, {}, {}, {}, string, import('../../../vue').ComponentProvideOptions, true, {}, any>;
|
|
67
70
|
export default _default;
|
|
@@ -115,5 +115,14 @@ export declare const popoverProps: {
|
|
|
115
115
|
type: BooleanConstructor;
|
|
116
116
|
default: boolean;
|
|
117
117
|
};
|
|
118
|
+
/**
|
|
119
|
+
* 是否在显示时才创建 DOM,隐藏时销毁 DOM。
|
|
120
|
+
* 适用于循环列表等场景,避免大量未使用的 popover 实例占用 DOM 节点。
|
|
121
|
+
* 默认 false,保持原有行为(挂载即创建,v-show 控制显隐)。
|
|
122
|
+
*/
|
|
123
|
+
renderWhenShown: {
|
|
124
|
+
type: BooleanConstructor;
|
|
125
|
+
default: boolean;
|
|
126
|
+
};
|
|
118
127
|
};
|
|
119
128
|
export type PopoverProps = ExtractPropTypes<typeof popoverProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|