@zyui/components 0.0.11 → 0.0.12
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/es/index.js +85 -144
- package/es/index.mjs +41883 -40704
- package/es/src/components/NodesEditor/Formula/FunctionSelect/const.d.ts +4 -0
- package/es/src/components/NodesEditor/Formula/FunctionSelect/index.vue.d.ts +29 -0
- package/es/src/components/NodesEditor/Formula/const.d.ts +1 -0
- package/es/src/components/NodesEditor/Formula/helper.d.ts +17 -0
- package/es/src/components/NodesEditor/Formula/hooks/useFocus.d.ts +12 -0
- package/es/src/components/NodesEditor/Formula/hooks/useFocusPosition.d.ts +14 -0
- package/es/src/components/NodesEditor/Formula/hooks/useFocusStyle.d.ts +12 -0
- package/es/src/components/NodesEditor/Formula/hooks/useFocusTextNode.d.ts +14 -0
- package/es/src/components/NodesEditor/Formula/hooks/useFormulaEvents.d.ts +11 -0
- package/es/src/components/NodesEditor/Formula/hooks/useSelectFunction.d.ts +12 -0
- package/es/src/components/NodesEditor/Formula/hooks/useSelectNode.d.ts +13 -0
- package/es/src/components/NodesEditor/Formula/index.vue.d.ts +25 -0
- package/es/src/components/NodesEditor/NodeItemDefaultRender/index.vue.d.ts +15 -0
- package/es/src/components/NodesEditor/NodeItemRender/index.vue.d.ts +28 -0
- package/es/src/components/NodesEditor/NodeSelect/hooks/useSelect.d.ts +12 -0
- package/es/src/components/NodesEditor/NodeSelect/index.vue.d.ts +52 -0
- package/es/src/components/NodesEditor/NodesEditUI.vue.d.ts +13 -2
- package/es/src/components/NodesEditor/NodesEnterUI.vue.d.ts +1 -1
- package/es/src/components/NodesEditor/NodesPreviewUI.vue.d.ts +1 -1
- package/es/src/components/NodesEditor/NodesProvider.vue.d.ts +33 -0
- package/es/src/components/NodesEditor/NodesSelectUI.vue.d.ts +13 -2
- package/es/src/components/NodesEditor/NodesText/index.vue.d.ts +16 -0
- package/es/src/components/NodesEditor/NodesUIProvider.vue.d.ts +58 -0
- package/es/src/components/NodesEditor/const.d.ts +3 -1
- package/es/src/components/NodesEditor/context.d.ts +7 -2
- package/es/src/components/NodesEditor/contextUI.d.ts +25 -11
- package/es/src/components/NodesEditor/emitter/index.d.ts +12 -0
- package/es/src/components/NodesEditor/emitter/types.d.ts +26 -0
- package/es/src/components/NodesEditor/helper.d.ts +36 -8
- package/es/src/components/NodesEditor/hooks/deleteNodes.d.ts +1 -0
- package/es/src/components/NodesEditor/hooks/useContentEditable.d.ts +1 -3
- package/es/src/components/NodesEditor/hooks/useFocusPosition.d.ts +5 -8
- package/es/src/components/NodesEditor/hooks/useGetValueByString.d.ts +7 -0
- package/es/src/components/NodesEditor/hooks/useInitNode.d.ts +8 -0
- package/es/src/components/NodesEditor/hooks/useNodesRender.d.ts +3 -34
- package/es/src/components/NodesEditor/hooks/useSelectNodes.d.ts +9 -0
- package/es/src/components/NodesEditor/hooks/useSetCurrentStyle.d.ts +1 -9
- package/es/src/components/NodesEditor/hooks/useTableSelection copy.d.ts +6 -0
- package/es/src/components/NodesEditor/hooks/useTableSelection.d.ts +3 -56
- package/es/src/components/NodesEditor/index.d.ts +3 -0
- package/es/src/components/NodesEditor/index.vue.d.ts +60 -565
- package/es/src/components/NodesEditor/store/editor.d.ts +2 -0
- package/es/src/components/NodesEditor/store/select.d.ts +12 -0
- package/es/src/components/NodesEditor/type.d.ts +2 -3
- package/es/src/components/ProEditor/js/config.d.ts +2 -3
- package/es/src/components/ShadowDomWrap/index.vue.d.ts +1 -0
- package/es/style.css +1 -1
- package/lib/src/components/NodesEditor/Formula/FunctionSelect/const.d.ts +4 -0
- package/lib/src/components/NodesEditor/Formula/FunctionSelect/index.vue.d.ts +29 -0
- package/lib/src/components/NodesEditor/Formula/const.d.ts +1 -0
- package/lib/src/components/NodesEditor/Formula/helper.d.ts +17 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useFocus.d.ts +12 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useFocusPosition.d.ts +14 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useFocusStyle.d.ts +12 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useFocusTextNode.d.ts +14 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useFormulaEvents.d.ts +11 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useSelectFunction.d.ts +12 -0
- package/lib/src/components/NodesEditor/Formula/hooks/useSelectNode.d.ts +13 -0
- package/lib/src/components/NodesEditor/Formula/index.vue.d.ts +25 -0
- package/lib/src/components/NodesEditor/NodeItemDefaultRender/index.vue.d.ts +15 -0
- package/lib/src/components/NodesEditor/NodeItemRender/index.vue.d.ts +28 -0
- package/lib/src/components/NodesEditor/NodeSelect/hooks/useSelect.d.ts +12 -0
- package/lib/src/components/NodesEditor/NodeSelect/index.vue.d.ts +52 -0
- package/lib/src/components/NodesEditor/NodesEditUI.vue.d.ts +13 -2
- package/lib/src/components/NodesEditor/NodesEnterUI.vue.d.ts +1 -1
- package/lib/src/components/NodesEditor/NodesPreviewUI.vue.d.ts +1 -1
- package/lib/src/components/NodesEditor/NodesProvider.vue.d.ts +33 -0
- package/lib/src/components/NodesEditor/NodesSelectUI.vue.d.ts +13 -2
- package/lib/src/components/NodesEditor/NodesText/index.vue.d.ts +16 -0
- package/lib/src/components/NodesEditor/NodesUIProvider.vue.d.ts +58 -0
- package/lib/src/components/NodesEditor/const.d.ts +3 -1
- package/lib/src/components/NodesEditor/context.d.ts +7 -2
- package/lib/src/components/NodesEditor/contextUI.d.ts +25 -11
- package/lib/src/components/NodesEditor/emitter/index.d.ts +12 -0
- package/lib/src/components/NodesEditor/emitter/types.d.ts +26 -0
- package/lib/src/components/NodesEditor/helper.d.ts +36 -8
- package/lib/src/components/NodesEditor/hooks/deleteNodes.d.ts +1 -0
- package/lib/src/components/NodesEditor/hooks/useContentEditable.d.ts +1 -3
- package/lib/src/components/NodesEditor/hooks/useFocusPosition.d.ts +5 -8
- package/lib/src/components/NodesEditor/hooks/useGetValueByString.d.ts +7 -0
- package/lib/src/components/NodesEditor/hooks/useInitNode.d.ts +8 -0
- package/lib/src/components/NodesEditor/hooks/useNodesRender.d.ts +3 -34
- package/lib/src/components/NodesEditor/hooks/useSelectNodes.d.ts +9 -0
- package/lib/src/components/NodesEditor/hooks/useSetCurrentStyle.d.ts +1 -9
- package/lib/src/components/NodesEditor/hooks/useTableSelection copy.d.ts +6 -0
- package/lib/src/components/NodesEditor/hooks/useTableSelection.d.ts +3 -56
- package/lib/src/components/NodesEditor/index.d.ts +3 -0
- package/lib/src/components/NodesEditor/index.vue.d.ts +60 -565
- package/lib/src/components/NodesEditor/store/editor.d.ts +2 -0
- package/lib/src/components/NodesEditor/store/select.d.ts +12 -0
- package/lib/src/components/NodesEditor/type.d.ts +2 -3
- package/lib/src/components/ProEditor/js/config.d.ts +2 -3
- package/lib/src/components/ShadowDomWrap/index.vue.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
type FunctionItem = {
|
|
2
|
+
label: string;
|
|
3
|
+
value: string;
|
|
4
|
+
};
|
|
5
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
|
+
modelValue: import('vue').PropType<any>;
|
|
7
|
+
id: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
functionList: {
|
|
12
|
+
type: ArrayConstructor;
|
|
13
|
+
default: () => FunctionItem[];
|
|
14
|
+
};
|
|
15
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
16
|
+
modelValue: import('vue').PropType<any>;
|
|
17
|
+
id: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
functionList: {
|
|
22
|
+
type: ArrayConstructor;
|
|
23
|
+
default: () => FunctionItem[];
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
id: string;
|
|
27
|
+
functionList: unknown[];
|
|
28
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const colors: string[];
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
interface Token {
|
|
2
|
+
type: 'startOperator' | 'function' | 'number' | 'string' | 'operator' | 'cell' | 'range' | 'paren' | 'separator' | 'plain';
|
|
3
|
+
value: string;
|
|
4
|
+
cellValue?: any[];
|
|
5
|
+
color?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function tokenize(formula: string): Token[];
|
|
8
|
+
export declare const parseFormula: (formula: string) => any;
|
|
9
|
+
export declare const evaluateFormula: (formula: string, getCellValue: (cell: string) => number) => any;
|
|
10
|
+
/**
|
|
11
|
+
* 校验公式正确错误
|
|
12
|
+
* @param formula
|
|
13
|
+
* @returns
|
|
14
|
+
*/
|
|
15
|
+
export declare const verifyFormula: (formula: string) => boolean;
|
|
16
|
+
export declare function parseFormulaWithMap(formula: string, tokenMap: Token[]): Token[];
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
type UseFocusPositionType = {
|
|
4
|
+
element: Ref<HTMLElement | null>;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* 获取当前聚焦元素的聚焦位置
|
|
8
|
+
* @param params
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
export declare const useFocusPosition: (params: UseFocusPositionType) => {
|
|
12
|
+
startOffset: Ref<number, number>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Ref, ComputedRef } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 设置聚焦元素cell的样式
|
|
5
|
+
* @param params
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function useFocusStyle(params: {
|
|
9
|
+
element: Ref<HTMLElement | null>;
|
|
10
|
+
showStr: ComputedRef<any[]>;
|
|
11
|
+
editorId?: string;
|
|
12
|
+
}): Ref<boolean, boolean>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
type UseFocusTextNodeParams = {
|
|
4
|
+
element: Ref<HTMLElement | null>;
|
|
5
|
+
startOffset: Ref<number>;
|
|
6
|
+
value: Ref<string>;
|
|
7
|
+
showStr: ComputedRef<any[]>;
|
|
8
|
+
editorId?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const useFocusTextNode: (params: UseFocusTextNodeParams) => {
|
|
11
|
+
currentItemIndex: Ref<number, number>;
|
|
12
|
+
currentItem: ComputedRef<any>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* 同步公式value和内部div的值
|
|
5
|
+
* @param formulaRef
|
|
6
|
+
* @param valueModel
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function useFormulaEvents(formulaRef: Ref<HTMLElement | null>, valueModel: Ref<string>, startOffset: Ref<number>): {
|
|
10
|
+
getFormulaContent: () => string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
type UseSelectFunctionParams = {
|
|
4
|
+
element: Ref<HTMLElement | null>;
|
|
5
|
+
startOffset: Ref<number>;
|
|
6
|
+
value: Ref<string>;
|
|
7
|
+
showStr: ComputedRef<any[]>;
|
|
8
|
+
currentItemIndex: Ref<number>;
|
|
9
|
+
currentItem: ComputedRef<any>;
|
|
10
|
+
};
|
|
11
|
+
export declare const useSelectFunction: (params: UseSelectFunctionParams) => void;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComputedRef, Ref } from 'vue';
|
|
2
|
+
|
|
3
|
+
type UseSelectNodeParams = {
|
|
4
|
+
element: Ref<HTMLElement | null>;
|
|
5
|
+
startOffset: Ref<number>;
|
|
6
|
+
value: Ref<string>;
|
|
7
|
+
showStr: ComputedRef<any[]>;
|
|
8
|
+
editorId?: string;
|
|
9
|
+
currentItemIndex: Ref<number>;
|
|
10
|
+
currentItem: ComputedRef<any>;
|
|
11
|
+
};
|
|
12
|
+
export declare const useSelectNode: (params: UseSelectNodeParams) => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: import('vue').PropType<any>;
|
|
3
|
+
id: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
editorId: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
default: string;
|
|
10
|
+
};
|
|
11
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
12
|
+
modelValue: import('vue').PropType<any>;
|
|
13
|
+
id: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
default: string;
|
|
16
|
+
};
|
|
17
|
+
editorId: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
}>> & Readonly<{}>, {
|
|
22
|
+
id: string;
|
|
23
|
+
editorId: string;
|
|
24
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
25
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
2
|
+
node: any;
|
|
3
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
4
|
+
node: any;
|
|
5
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
6
|
+
export default _default;
|
|
7
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
8
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
9
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
10
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
11
|
+
} : {
|
|
12
|
+
type: import('vue').PropType<T[K]>;
|
|
13
|
+
required: true;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { NodeItem } from '../type';
|
|
2
|
+
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
nodeItem?(_: {
|
|
5
|
+
node: NodeItem;
|
|
6
|
+
}): any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
9
|
+
node: NodeItem;
|
|
10
|
+
}>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
11
|
+
node: NodeItem;
|
|
12
|
+
}>>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
13
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
16
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
17
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
18
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
19
|
+
} : {
|
|
20
|
+
type: import('vue').PropType<T[K]>;
|
|
21
|
+
required: true;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { SelectNodesMode } from '../../type';
|
|
3
|
+
|
|
4
|
+
type Params = {
|
|
5
|
+
nodes: Ref<any[]>;
|
|
6
|
+
mode: SelectNodesMode;
|
|
7
|
+
};
|
|
8
|
+
export declare function useSelect(params: Params): {
|
|
9
|
+
isSelecting: Ref<boolean, boolean>;
|
|
10
|
+
selectNodes: () => false | undefined;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: import('vue').PropType<any[]>;
|
|
3
|
+
/**
|
|
4
|
+
* 模式
|
|
5
|
+
* single: 单选
|
|
6
|
+
* multiple: 多选
|
|
7
|
+
* line: 行
|
|
8
|
+
*/
|
|
9
|
+
mode: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
color: {
|
|
14
|
+
type: StringConstructor;
|
|
15
|
+
};
|
|
16
|
+
id: {
|
|
17
|
+
type: StringConstructor;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
editorId: {
|
|
21
|
+
type: StringConstructor;
|
|
22
|
+
default: string;
|
|
23
|
+
};
|
|
24
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
25
|
+
modelValue: import('vue').PropType<any[]>;
|
|
26
|
+
/**
|
|
27
|
+
* 模式
|
|
28
|
+
* single: 单选
|
|
29
|
+
* multiple: 多选
|
|
30
|
+
* line: 行
|
|
31
|
+
*/
|
|
32
|
+
mode: {
|
|
33
|
+
type: StringConstructor;
|
|
34
|
+
default: string;
|
|
35
|
+
};
|
|
36
|
+
color: {
|
|
37
|
+
type: StringConstructor;
|
|
38
|
+
};
|
|
39
|
+
id: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
editorId: {
|
|
44
|
+
type: StringConstructor;
|
|
45
|
+
default: string;
|
|
46
|
+
};
|
|
47
|
+
}>> & Readonly<{}>, {
|
|
48
|
+
id: string;
|
|
49
|
+
mode: string;
|
|
50
|
+
editorId: string;
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
52
|
+
export default _default;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { RenderType } from './type';
|
|
2
2
|
|
|
3
|
-
declare
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
nodeItem?(_: {
|
|
5
|
+
node: import('./type').NodeItem;
|
|
6
|
+
}): any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
9
|
pagesize: {
|
|
5
10
|
type: StringConstructor;
|
|
6
11
|
default: string;
|
|
@@ -27,7 +32,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
27
32
|
default: string;
|
|
28
33
|
};
|
|
29
34
|
}>> & Readonly<{}>, {
|
|
30
|
-
pagesize: string;
|
|
31
35
|
renderType: RenderType;
|
|
36
|
+
pagesize: string;
|
|
32
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
33
39
|
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -395,7 +395,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
395
395
|
default: string;
|
|
396
396
|
};
|
|
397
397
|
}>> & Readonly<{}>, {
|
|
398
|
-
pagesize: string;
|
|
399
398
|
renderType: RenderType;
|
|
399
|
+
pagesize: string;
|
|
400
400
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
401
401
|
export default _default;
|
|
@@ -27,7 +27,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
27
27
|
default: string;
|
|
28
28
|
};
|
|
29
29
|
}>> & Readonly<{}>, {
|
|
30
|
-
pagesize: string;
|
|
31
30
|
renderType: RenderType;
|
|
31
|
+
pagesize: string;
|
|
32
32
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
33
33
|
export default _default;
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { RenderType } from './type';
|
|
2
|
+
|
|
1
3
|
declare function __VLS_template(): {
|
|
2
4
|
default?(_: {}): any;
|
|
3
5
|
};
|
|
@@ -11,8 +13,22 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
11
13
|
type: ArrayConstructor;
|
|
12
14
|
default: () => never[];
|
|
13
15
|
};
|
|
16
|
+
renderType: {
|
|
17
|
+
type: () => RenderType;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
inputTypes: {
|
|
21
|
+
type: ArrayConstructor;
|
|
22
|
+
default: () => never[];
|
|
23
|
+
};
|
|
24
|
+
editorId: {
|
|
25
|
+
type: StringConstructor;
|
|
26
|
+
default: string;
|
|
27
|
+
};
|
|
14
28
|
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
29
|
"update:nodes": (...args: any[]) => void;
|
|
30
|
+
"update:selectNodes": (...args: any[]) => void;
|
|
31
|
+
onSelectedNodes: (...args: any[]) => void;
|
|
16
32
|
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
17
33
|
formData: import('vue').PropType<any>;
|
|
18
34
|
modelValue: {
|
|
@@ -23,11 +39,28 @@ declare const __VLS_component: import('vue').DefineComponent<import('vue').Extra
|
|
|
23
39
|
type: ArrayConstructor;
|
|
24
40
|
default: () => never[];
|
|
25
41
|
};
|
|
42
|
+
renderType: {
|
|
43
|
+
type: () => RenderType;
|
|
44
|
+
default: string;
|
|
45
|
+
};
|
|
46
|
+
inputTypes: {
|
|
47
|
+
type: ArrayConstructor;
|
|
48
|
+
default: () => never[];
|
|
49
|
+
};
|
|
50
|
+
editorId: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: string;
|
|
53
|
+
};
|
|
26
54
|
}>> & Readonly<{
|
|
27
55
|
"onUpdate:nodes"?: ((...args: any[]) => any) | undefined;
|
|
56
|
+
"onUpdate:selectNodes"?: ((...args: any[]) => any) | undefined;
|
|
57
|
+
onOnSelectedNodes?: ((...args: any[]) => any) | undefined;
|
|
28
58
|
}>, {
|
|
29
59
|
modelValue: string;
|
|
30
60
|
nodes: unknown[];
|
|
61
|
+
inputTypes: unknown[];
|
|
62
|
+
editorId: string;
|
|
63
|
+
renderType: RenderType;
|
|
31
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
32
65
|
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
33
66
|
export default _default;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { RenderType } from './type';
|
|
2
2
|
|
|
3
|
-
declare
|
|
3
|
+
declare function __VLS_template(): {
|
|
4
|
+
nodeItem?(_: {
|
|
5
|
+
node: import('./type').NodeItem;
|
|
6
|
+
}): any;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
9
|
pagesize: {
|
|
5
10
|
type: StringConstructor;
|
|
6
11
|
default: string;
|
|
@@ -27,7 +32,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
27
32
|
default: string;
|
|
28
33
|
};
|
|
29
34
|
}>> & Readonly<{}>, {
|
|
30
|
-
pagesize: string;
|
|
31
35
|
renderType: RenderType;
|
|
36
|
+
pagesize: string;
|
|
32
37
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
38
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
33
39
|
export default _default;
|
|
40
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
41
|
+
new (): {
|
|
42
|
+
$slots: S;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
2
|
+
modelValue: import('vue').PropType<any[]>;
|
|
3
|
+
editorId: {
|
|
4
|
+
type: StringConstructor;
|
|
5
|
+
default: string;
|
|
6
|
+
};
|
|
7
|
+
}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
8
|
+
modelValue: import('vue').PropType<any[]>;
|
|
9
|
+
editorId: {
|
|
10
|
+
type: StringConstructor;
|
|
11
|
+
default: string;
|
|
12
|
+
};
|
|
13
|
+
}>> & Readonly<{}>, {
|
|
14
|
+
editorId: string;
|
|
15
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
declare function __VLS_template(): {
|
|
2
|
+
default?(_: {}): any;
|
|
3
|
+
};
|
|
4
|
+
declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
5
|
+
nodes: {
|
|
6
|
+
type: ArrayConstructor;
|
|
7
|
+
default: () => never[];
|
|
8
|
+
};
|
|
9
|
+
selectedNodes: {
|
|
10
|
+
type: ArrayConstructor;
|
|
11
|
+
default: () => never[];
|
|
12
|
+
};
|
|
13
|
+
nodesGroups: {
|
|
14
|
+
type: ArrayConstructor;
|
|
15
|
+
default: () => never[];
|
|
16
|
+
};
|
|
17
|
+
editorId: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
}>, {
|
|
22
|
+
setSelectedNodes: (values: any) => void;
|
|
23
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
24
|
+
onSelectedNodes: (...args: any[]) => void;
|
|
25
|
+
"update:selectedNodes": (...args: any[]) => void;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
27
|
+
nodes: {
|
|
28
|
+
type: ArrayConstructor;
|
|
29
|
+
default: () => never[];
|
|
30
|
+
};
|
|
31
|
+
selectedNodes: {
|
|
32
|
+
type: ArrayConstructor;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
35
|
+
nodesGroups: {
|
|
36
|
+
type: ArrayConstructor;
|
|
37
|
+
default: () => never[];
|
|
38
|
+
};
|
|
39
|
+
editorId: {
|
|
40
|
+
type: StringConstructor;
|
|
41
|
+
default: string;
|
|
42
|
+
};
|
|
43
|
+
}>> & Readonly<{
|
|
44
|
+
onOnSelectedNodes?: ((...args: any[]) => any) | undefined;
|
|
45
|
+
"onUpdate:selectedNodes"?: ((...args: any[]) => any) | undefined;
|
|
46
|
+
}>, {
|
|
47
|
+
nodes: unknown[];
|
|
48
|
+
selectedNodes: unknown[];
|
|
49
|
+
editorId: string;
|
|
50
|
+
nodesGroups: unknown[];
|
|
51
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
52
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
|
|
53
|
+
export default _default;
|
|
54
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
55
|
+
new (): {
|
|
56
|
+
$slots: S;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { NodeItem, RenderType } from './type';
|
|
2
3
|
|
|
3
4
|
type NodesEditorContext = {
|
|
4
|
-
|
|
5
|
+
renderType: RenderType;
|
|
5
6
|
modelValue: string;
|
|
7
|
+
inputTypes: any[];
|
|
6
8
|
nodes: Ref<any[]>;
|
|
7
9
|
updateNodes: (nodes: any[]) => void;
|
|
8
10
|
formData: any;
|
|
11
|
+
selectNodes?: NodeItem[];
|
|
12
|
+
updateSelectNodes?: (node: NodeItem[]) => void;
|
|
13
|
+
editorId?: string;
|
|
9
14
|
};
|
|
10
15
|
export declare const nodesEditorKey: unique symbol;
|
|
11
|
-
export declare const
|
|
16
|
+
export declare const useNodesEditorContext: () => NodesEditorContext;
|
|
12
17
|
export {};
|
|
@@ -1,17 +1,31 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
2
|
import { NodeItem } from './type';
|
|
3
3
|
|
|
4
|
-
type NodesUIContext = {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
export type NodesUIContext = {
|
|
5
|
+
/**shadow-host */
|
|
6
|
+
shadowHost?: Ref<HTMLElement | null>;
|
|
7
|
+
/**富文本的dom */
|
|
8
|
+
containerRef: Ref<HTMLElement | null>;
|
|
9
|
+
/**选中的元素 */
|
|
10
|
+
selectedNodes: Ref<NodeItem[]>;
|
|
11
|
+
/**更新选中的元素 */
|
|
12
|
+
setSelectedNodes: (elements: NodeItem[]) => void;
|
|
13
|
+
/**当前聚焦元素 */
|
|
10
14
|
focusedElement: Ref<HTMLElement | null>;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
15
|
+
/**光标位置 */
|
|
16
|
+
cursorPosition: Ref<number>;
|
|
17
|
+
/**当前聚焦元素的索引 */
|
|
18
|
+
focusedNodeIndex: Ref<number>;
|
|
19
|
+
/**上一个元素的索引 */
|
|
20
|
+
preNodeNumber: Ref<number>;
|
|
21
|
+
/**当前选中节点 */
|
|
22
|
+
currentNodes?: Ref<(NodeItem & {
|
|
23
|
+
color: string;
|
|
24
|
+
dataGroupKey: string;
|
|
25
|
+
activated?: boolean;
|
|
26
|
+
})[]>;
|
|
27
|
+
/**当前渲染节点 */
|
|
28
|
+
currentRenderNodes: Ref<NodeItem[]>;
|
|
14
29
|
};
|
|
15
30
|
export declare const nodesUIKey: unique symbol;
|
|
16
|
-
export declare const
|
|
17
|
-
export {};
|
|
31
|
+
export declare const useNodesUIContext: () => NodesUIContext;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Emitter } from 'mitt';
|
|
2
|
+
import { MittEvents } from './types';
|
|
3
|
+
|
|
4
|
+
export declare const emitter: Emitter<MittEvents>;
|
|
5
|
+
/**
|
|
6
|
+
* emitter.on hooks的调用方法
|
|
7
|
+
*/
|
|
8
|
+
export declare const useSubscribe: typeof emitter.on;
|
|
9
|
+
/**
|
|
10
|
+
* emitter.emit hooks的调用方法
|
|
11
|
+
*/
|
|
12
|
+
export declare const usePublish: () => typeof emitter.emit;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { SelectNodesMode } from '../type';
|
|
2
|
+
|
|
3
|
+
type SelectNodesType = {
|
|
4
|
+
mode: SelectNodesMode;
|
|
5
|
+
data?: any;
|
|
6
|
+
callback?: ({ data, type }: {
|
|
7
|
+
data: any;
|
|
8
|
+
type?: string;
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
type SelectFunctionType = {
|
|
12
|
+
data?: any;
|
|
13
|
+
callback?: ({ data }: {
|
|
14
|
+
data: any;
|
|
15
|
+
}) => void;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* 为方便管理 用事件,必须再这里声明
|
|
19
|
+
* 举例:appInit、userLogin,至少“主”,“动”两个单词组成
|
|
20
|
+
*/
|
|
21
|
+
export type MittEvents = {
|
|
22
|
+
selectNodes: SelectNodesType;
|
|
23
|
+
selectFunction: SelectFunctionType;
|
|
24
|
+
[key: string]: any;
|
|
25
|
+
};
|
|
26
|
+
export {};
|