@quickbi/bi-types 3.0.49 → 3.0.50
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/cjs/index.d.ts +5455 -30
- package/cjs/index.js +67 -4
- package/esm/index.d.ts +5455 -30
- package/esm/index.mjs +67 -4
- package/package.json +4 -2
- package/cjs/chart-config.d.ts +0 -378
- package/cjs/component-type.d.ts +0 -488
- package/cjs/cross-table.d.ts +0 -151
- package/cjs/cube/cube-blend.d.ts +0 -22
- package/cjs/cube/cube-links.d.ts +0 -35
- package/cjs/cube/cube-model.d.ts +0 -611
- package/cjs/cube/data-source.d.ts +0 -180
- package/cjs/cube/index.d.ts +0 -9
- package/cjs/cube/table-schema.d.ts +0 -43
- package/cjs/data-panel/base.d.ts +0 -159
- package/cjs/data-panel/data-config.d.ts +0 -236
- package/cjs/data-panel/data-schema-item.d.ts +0 -734
- package/cjs/data-panel/data-schema.d.ts +0 -101
- package/cjs/data-panel/index.d.ts +0 -9
- package/cjs/etl.d.ts +0 -76
- package/cjs/open/common/event-types.d.ts +0 -22
- package/cjs/open/common/misc.d.ts +0 -11
- package/cjs/open/common/page-types.d.ts +0 -19
- package/cjs/open/common/tools.d.ts +0 -23
- package/cjs/open/components/component-lifecycle.d.ts +0 -36
- package/cjs/open/components/component-meta.d.ts +0 -27
- package/cjs/open/components/component-props.d.ts +0 -148
- package/cjs/open/components/data-schema.d.ts +0 -53
- package/cjs/open/components/style-schema.d.ts +0 -161
- package/cjs/open/embed/core.d.ts +0 -65
- package/cjs/open/events/event-props.d.ts +0 -33
- package/cjs/open/events/event-schema.d.ts +0 -12
- package/cjs/open/menus/menu-props.d.ts +0 -178
- package/cjs/open/menus/menu-schema.d.ts +0 -35
- package/cjs/router/route-key.d.ts +0 -523
- package/cjs/router/route-tree.d.ts +0 -17
- package/cjs/standard-model.d.ts +0 -497
- package/cjs/ui/page-header.d.ts +0 -14
- package/esm/chart-config.d.ts +0 -378
- package/esm/component-type.d.ts +0 -488
- package/esm/cross-table.d.ts +0 -151
- package/esm/cube/cube-blend.d.ts +0 -22
- package/esm/cube/cube-links.d.ts +0 -35
- package/esm/cube/cube-model.d.ts +0 -611
- package/esm/cube/data-source.d.ts +0 -180
- package/esm/cube/index.d.ts +0 -9
- package/esm/cube/table-schema.d.ts +0 -43
- package/esm/data-panel/base.d.ts +0 -159
- package/esm/data-panel/data-config.d.ts +0 -236
- package/esm/data-panel/data-schema-item.d.ts +0 -734
- package/esm/data-panel/data-schema.d.ts +0 -101
- package/esm/data-panel/index.d.ts +0 -9
- package/esm/etl.d.ts +0 -76
- package/esm/open/common/event-types.d.ts +0 -22
- package/esm/open/common/misc.d.ts +0 -11
- package/esm/open/common/page-types.d.ts +0 -19
- package/esm/open/common/tools.d.ts +0 -23
- package/esm/open/components/component-lifecycle.d.ts +0 -36
- package/esm/open/components/component-meta.d.ts +0 -27
- package/esm/open/components/component-props.d.ts +0 -148
- package/esm/open/components/data-schema.d.ts +0 -53
- package/esm/open/components/style-schema.d.ts +0 -161
- package/esm/open/embed/core.d.ts +0 -65
- package/esm/open/events/event-props.d.ts +0 -33
- package/esm/open/events/event-schema.d.ts +0 -12
- package/esm/open/menus/menu-props.d.ts +0 -178
- package/esm/open/menus/menu-schema.d.ts +0 -35
- package/esm/router/route-key.d.ts +0 -523
- package/esm/router/route-tree.d.ts +0 -17
- package/esm/standard-model.d.ts +0 -497
- package/esm/ui/page-header.d.ts +0 -14
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 样式面板配置
|
|
4
|
-
*/
|
|
5
|
-
export type StyleSchemaDependId = number | string;
|
|
6
|
-
/** depend 类型 */
|
|
7
|
-
interface ValueDepend {
|
|
8
|
-
id: StyleSchemaDependId;
|
|
9
|
-
value: any | any[];
|
|
10
|
-
}
|
|
11
|
-
interface PatternDepend {
|
|
12
|
-
id?: StyleSchemaDependId;
|
|
13
|
-
pattern?: string;
|
|
14
|
-
}
|
|
15
|
-
type StyleSchemaBaseDepend = ValueDepend | PatternDepend;
|
|
16
|
-
interface StyleSchemaAndDepend {
|
|
17
|
-
$and?: StyleSchemaDepend[];
|
|
18
|
-
}
|
|
19
|
-
interface StyleSchemaOrDepend {
|
|
20
|
-
$or?: StyleSchemaDepend[];
|
|
21
|
-
}
|
|
22
|
-
export type StyleSchemaDepend = StyleSchemaBaseDepend & StyleSchemaAndDepend & StyleSchemaOrDepend;
|
|
23
|
-
/** 校验规则配置项类型定义 */
|
|
24
|
-
export interface StyleSchemaValidationRule {
|
|
25
|
-
/** 必要属性(除存在代理校验属性外的情况下 必须声明):校验错误信息 */
|
|
26
|
-
message?: string;
|
|
27
|
-
/** 校验属性(除存在代理校验属性外的情况下 必须且仅可声明其中一个 参考 `async-validator`) */
|
|
28
|
-
[rule: string]: any;
|
|
29
|
-
/** 代理校验属性(当此属性有效时 其他属性无效 可不声明):代理校验函数名 */
|
|
30
|
-
funcName?: string;
|
|
31
|
-
}
|
|
32
|
-
/** 校验结果类型定义(用于 `onChange` 函数) */
|
|
33
|
-
export interface StyleSchemaValidationResult {
|
|
34
|
-
/** 是否通过校验 */
|
|
35
|
-
pass: boolean;
|
|
36
|
-
/** 不通过校验时 返回详细字段名和信息 若校验通过则空 */
|
|
37
|
-
details: {
|
|
38
|
-
field: string;
|
|
39
|
-
message: string;
|
|
40
|
-
}[];
|
|
41
|
-
}
|
|
42
|
-
export interface StyleSchemaValidation {
|
|
43
|
-
[validateFuncName: string]: (rule?: any, currentValue?: any, extras?: {
|
|
44
|
-
data?: any;
|
|
45
|
-
schema?: Schema;
|
|
46
|
-
keyPaths?: string[];
|
|
47
|
-
}) => string | Promise<any> | void;
|
|
48
|
-
}
|
|
49
|
-
export interface StyleSchema {
|
|
50
|
-
/** styleSchema 配置 */
|
|
51
|
-
schema: StyleSchemaBase;
|
|
52
|
-
/** 自定义编辑器 */
|
|
53
|
-
localEditors?: {
|
|
54
|
-
[key: string]: React.ComponentType<any>;
|
|
55
|
-
};
|
|
56
|
-
/** 自定义校验函数 */
|
|
57
|
-
validation?: StyleSchemaValidation;
|
|
58
|
-
/** 事件处理函数 */
|
|
59
|
-
onChange?: (data?: any, currentSchema?: Schema, keyPaths?: string[], validation?: StyleSchemaValidationResult) => void;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* `schema` 配置接口
|
|
63
|
-
* */
|
|
64
|
-
export interface StyleSchemaBase<P = any, T = string> {
|
|
65
|
-
/** 使用的子组件类型 */
|
|
66
|
-
type: T;
|
|
67
|
-
/** 标题文案 */
|
|
68
|
-
title?: string;
|
|
69
|
-
/** 标题后备注信息 */
|
|
70
|
-
info?: string;
|
|
71
|
-
/** 标题对齐方式 */
|
|
72
|
-
titleAlign?: 'left' | 'center' | 'right';
|
|
73
|
-
/** 子字段 */
|
|
74
|
-
properties?: StyleSchemaProperties;
|
|
75
|
-
/** 容器类名 */
|
|
76
|
-
className?: string;
|
|
77
|
-
/** 描述文案 */
|
|
78
|
-
description?: string;
|
|
79
|
-
/** 显示顺序 */
|
|
80
|
-
propertyOrder?: number;
|
|
81
|
-
/** 字段的 id 标识符 */
|
|
82
|
-
id?: StyleSchemaDependId;
|
|
83
|
-
/** 是否隐藏 */
|
|
84
|
-
hide?: boolean;
|
|
85
|
-
/** 显隐依赖 */
|
|
86
|
-
visibleDepends?: StyleSchemaDepend[];
|
|
87
|
-
/** 是否禁用 */
|
|
88
|
-
disabled?: boolean;
|
|
89
|
-
/** 禁用依赖 */
|
|
90
|
-
disableDepends?: StyleSchemaDepend[];
|
|
91
|
-
/** 依赖于自身的子节点 Id */
|
|
92
|
-
childrenIds?: string[];
|
|
93
|
-
/** 校验规则 */
|
|
94
|
-
validation?: StyleSchemaValidationRule[];
|
|
95
|
-
/** 是否显示必填星号标记 */
|
|
96
|
-
showRequiredMark?: boolean;
|
|
97
|
-
/** 是否显示校验错误信息 */
|
|
98
|
-
hideValidateTips?: boolean;
|
|
99
|
-
/** 自定义默认值 */
|
|
100
|
-
defaultValue?: any;
|
|
101
|
-
/**
|
|
102
|
-
* 【继承型属性】默认值继承清单(用于自动继承数据集配置:https://aone.alibaba-inc.com/v2/project/447571/req/43247438)
|
|
103
|
-
* 注:这里keyPaths是相对路径(相对于每个Schema配置),例如用于fieldSettingMap中则为:['test-field-id', 'aliasName']
|
|
104
|
-
*/
|
|
105
|
-
defaultValueInheritProps?: {
|
|
106
|
-
keyPaths: (string | number)[];
|
|
107
|
-
isInherited: boolean;
|
|
108
|
-
propUuid: string;
|
|
109
|
-
}[];
|
|
110
|
-
/** 子组件的 `props` */
|
|
111
|
-
props?: P;
|
|
112
|
-
/** 字段重定向(点分字符串) */
|
|
113
|
-
redirect?: string;
|
|
114
|
-
/** 关联 data */
|
|
115
|
-
relatedToData?: boolean;
|
|
116
|
-
/** 后缀 比如 xx: [select/input 组件] 天 */
|
|
117
|
-
suffix?: string;
|
|
118
|
-
/** 布局属性 */
|
|
119
|
-
grid?: {
|
|
120
|
-
row: number;
|
|
121
|
-
col: number;
|
|
122
|
-
};
|
|
123
|
-
/** 表单布局 */
|
|
124
|
-
layout?: 'horizontal' | 'vertical' | 'inline';
|
|
125
|
-
/** 是否有重置功能 */
|
|
126
|
-
hasReset?: boolean;
|
|
127
|
-
/** 自定义 title 渲染, 优先级高于ui-schema整体props的labelRender */
|
|
128
|
-
labelRenderer?: (schema: StyleSchemaBase) => React.ReactNode;
|
|
129
|
-
/** 点击触发回调,对于 collapse 组件,可以获取到当前折叠状态 */
|
|
130
|
-
onClick?: (v?: any) => void;
|
|
131
|
-
}
|
|
132
|
-
/** type 为 object 的配置 */
|
|
133
|
-
export interface StyleSchemaObject extends StyleSchemaBase {
|
|
134
|
-
type: 'object';
|
|
135
|
-
props?: {
|
|
136
|
-
/** 分组类型 */
|
|
137
|
-
mode?: 'tabs' | 'collapse';
|
|
138
|
-
/** 分组组件渲染的props */
|
|
139
|
-
modeRendererProps?: {
|
|
140
|
-
/** 默认展开的面板 */
|
|
141
|
-
defaultActiveKey?: string | number | (string | number)[];
|
|
142
|
-
/** 具有开关的 collapse 面板 key */
|
|
143
|
-
switchModeKeys?: string[];
|
|
144
|
-
[key: string]: any;
|
|
145
|
-
};
|
|
146
|
-
};
|
|
147
|
-
/** 分组提示气泡, 仅在 collapse 下生效 */
|
|
148
|
-
info?: string;
|
|
149
|
-
}
|
|
150
|
-
/** type 为 array 的配置 */
|
|
151
|
-
export interface StyleSchemaArray extends StyleSchemaBase {
|
|
152
|
-
type: 'array';
|
|
153
|
-
/** 数组元素默认值 */
|
|
154
|
-
arrayItemDefaultValue?: any;
|
|
155
|
-
}
|
|
156
|
-
type Schema = StyleSchemaObject | StyleSchemaArray | StyleSchemaBase;
|
|
157
|
-
/** properties 属性 */
|
|
158
|
-
export type StyleSchemaProperties = {
|
|
159
|
-
[key: string]: Schema;
|
|
160
|
-
} | string;
|
|
161
|
-
export {};
|
package/cjs/open/embed/core.d.ts
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 嵌入通用类型定义
|
|
4
|
-
*/
|
|
5
|
-
import type { RouteKey } from '../../router/route-key';
|
|
6
|
-
/** 通用页面来源信息 */
|
|
7
|
-
export type EmbedBaseSrc = {
|
|
8
|
-
/** 嵌入页面 */
|
|
9
|
-
page: RouteKey;
|
|
10
|
-
/** 域名信息 */
|
|
11
|
-
origin?: string;
|
|
12
|
-
/** 额外的 url 参数 */
|
|
13
|
-
search?: Record<string, string> & {
|
|
14
|
-
/** 空间 id */
|
|
15
|
-
workspaceId?: string;
|
|
16
|
-
/** 作品 id */
|
|
17
|
-
id?: string;
|
|
18
|
-
/** 嵌入 token */
|
|
19
|
-
accessTicket?: string;
|
|
20
|
-
};
|
|
21
|
-
/** 额外的路径参数 */
|
|
22
|
-
pathParams?: Record<string, string>;
|
|
23
|
-
/** 额外的哈希值 */
|
|
24
|
-
hash?: string;
|
|
25
|
-
};
|
|
26
|
-
/** 嵌入特性项取值类型, 只能是基本类型 */
|
|
27
|
-
export type EmbedBaseFeatureValue = string | number | boolean | null | undefined;
|
|
28
|
-
/** 嵌入特性配置项 */
|
|
29
|
-
export interface EmbedBaseFeatureItem extends Record<string, EmbedBaseFeatureValue | EmbedBaseFeatureItem> {
|
|
30
|
-
/** 特性是否显示 */
|
|
31
|
-
show?: boolean;
|
|
32
|
-
}
|
|
33
|
-
/** 嵌入特性配置 */
|
|
34
|
-
export type EmbedBaseFeature = Partial<Record<RouteKey, EmbedBaseFeatureItem>>;
|
|
35
|
-
/** postMessage 事件 data 传参格式 */
|
|
36
|
-
export type EmbedBaseEventMessageDTO<T extends EmbedBaseEventMessageContent = EmbedBaseEventMessageContent> = {
|
|
37
|
-
/** 事件会话 id */
|
|
38
|
-
sessionId: string;
|
|
39
|
-
/** 事件消息 id */
|
|
40
|
-
messageId: string;
|
|
41
|
-
/** 事件数据真实内容 */
|
|
42
|
-
content: T;
|
|
43
|
-
};
|
|
44
|
-
/** 嵌入消息统一格式 */
|
|
45
|
-
export type EmbedBaseEventMessageContent<T = any, K = string> = {
|
|
46
|
-
/** 行为类型 */
|
|
47
|
-
type: K;
|
|
48
|
-
/** 行为传参, 必须能序列化 */
|
|
49
|
-
payload: T;
|
|
50
|
-
};
|
|
51
|
-
/** 页面事件对应的监听函数返回值 */
|
|
52
|
-
export type EmbedBaseEventListenerReturn<T extends EmbedBaseEventMessageContent, R = any> = {
|
|
53
|
-
content: T;
|
|
54
|
-
return: R;
|
|
55
|
-
};
|
|
56
|
-
/** 页面事件对应的监听函数 */
|
|
57
|
-
export type EmbedBaseEventListener<U extends EmbedBaseEventMessageContent, T extends EmbedBaseEventListenerReturn<U>> = {
|
|
58
|
-
[K in U['type']]: (payload: Extract<U, {
|
|
59
|
-
type: K;
|
|
60
|
-
}>) => Promise<T extends {
|
|
61
|
-
content: {
|
|
62
|
-
type: K;
|
|
63
|
-
};
|
|
64
|
-
} ? T['return'] : any>;
|
|
65
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 唯毅
|
|
3
|
-
* @description 自定义事件-props 类型定义
|
|
4
|
-
*/
|
|
5
|
-
import type { CommonPageConfig, CommonModalPayload, CommonOpenModalAction, CommonCloseModalAction, CommonShowMessageAction, CommonUtils } from '../menus/menu-props';
|
|
6
|
-
/** 自定义事件弹窗参数 */
|
|
7
|
-
export type CustomEventModalPayload = CommonModalPayload;
|
|
8
|
-
export type CustomEventPageConfig = CommonPageConfig;
|
|
9
|
-
/**
|
|
10
|
-
* 自定义事件 dispatch 属性
|
|
11
|
-
*/
|
|
12
|
-
export type CustomEventPropsDispatch = (param: CommonOpenModalAction | CommonCloseModalAction | CommonShowMessageAction) => void;
|
|
13
|
-
export declare enum CustomEventType {
|
|
14
|
-
/** 自定义事件-下载前 */
|
|
15
|
-
beforeDownloadEvent = "before-download-event",
|
|
16
|
-
/** 自定义事件-页面加载前 */
|
|
17
|
-
beforePageLoadEvent = "before-page-loaded-event",
|
|
18
|
-
/** 自定义事件-发布前 */
|
|
19
|
-
beforePublishEvent = "before-publish-event"
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* 自定义事件 props 接口
|
|
23
|
-
*/
|
|
24
|
-
export interface CustomEventProps {
|
|
25
|
-
/** 事件类型 */
|
|
26
|
-
type: CustomEventType;
|
|
27
|
-
/** 页面信息 */
|
|
28
|
-
pageConfig: CustomEventPageConfig;
|
|
29
|
-
/** 操作 */
|
|
30
|
-
dispatch?: CustomEventPropsDispatch;
|
|
31
|
-
/** 自定义菜单展示模式 */
|
|
32
|
-
utils?: CommonUtils;
|
|
33
|
-
}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 自定义菜单 props 接口
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentProps } from '../components/component-props';
|
|
6
|
-
import type { ChartType, ComponentType } from '../../component-type';
|
|
7
|
-
import type { EnumAsUnion } from '../common/tools';
|
|
8
|
-
import type { OpenPageTypeEnum } from '../common/page-types';
|
|
9
|
-
import type { OpenDeviceTypeEnum } from '../common/misc';
|
|
10
|
-
/**
|
|
11
|
-
* 事件/菜单通用的页面信息
|
|
12
|
-
*/
|
|
13
|
-
export interface CommonPageConfig {
|
|
14
|
-
/** 页面工作空间 id */
|
|
15
|
-
workspaceId: string;
|
|
16
|
-
/** 页面 id */
|
|
17
|
-
id: string;
|
|
18
|
-
/** 页面模式, 编辑态/预览态/截图态(仅仪表板和电子表格有)/公开态(数据大屏) */
|
|
19
|
-
mode: 'preview' | 'edit' | 'snapshot' | 'public';
|
|
20
|
-
/** 当前设备 */
|
|
21
|
-
device: EnumAsUnion<typeof OpenDeviceTypeEnum>;
|
|
22
|
-
/** 当前访问者 id */
|
|
23
|
-
userId: string;
|
|
24
|
-
/** 当前访问者 id */
|
|
25
|
-
userName: string;
|
|
26
|
-
/** 页面创建者 id */
|
|
27
|
-
ownerUserId: string;
|
|
28
|
-
/** 页面创建者 id */
|
|
29
|
-
ownerUserName: string;
|
|
30
|
-
/** 页面标题 */
|
|
31
|
-
title: string;
|
|
32
|
-
/** 页面类型 */
|
|
33
|
-
pageType: EnumAsUnion<typeof OpenPageTypeEnum>;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* 事件/菜单通用的工具方法
|
|
37
|
-
*/
|
|
38
|
-
export interface CommonUtils {
|
|
39
|
-
/** 获取 cookie */
|
|
40
|
-
getCookie: (key: string) => string;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* 自定义菜单的页面信息
|
|
44
|
-
*/
|
|
45
|
-
export type MenuPageConfig = CommonPageConfig;
|
|
46
|
-
/**
|
|
47
|
-
* 自定义菜单 props 接口
|
|
48
|
-
*/
|
|
49
|
-
export interface MenuComponentProps {
|
|
50
|
-
/** 页面信息 */
|
|
51
|
-
pageConfig: MenuPageConfig;
|
|
52
|
-
/** 操作 */
|
|
53
|
-
dispatch?: MenuComponentPropsDispatch;
|
|
54
|
-
/** 自定义菜单展示模式 */
|
|
55
|
-
menuMode?: CustomMenuMode;
|
|
56
|
-
/** 自定义菜单展示模式 */
|
|
57
|
-
utils?: CommonUtils;
|
|
58
|
-
}
|
|
59
|
-
/** 事件/菜单通用的弹窗唤起方法 */
|
|
60
|
-
export interface CommonModalPayload {
|
|
61
|
-
/** PC端弹窗宽度 */
|
|
62
|
-
width?: string | number;
|
|
63
|
-
/** PC端和移动端点击取消按钮时的回调 */
|
|
64
|
-
onCancel?: (...args: any[]) => any;
|
|
65
|
-
/** 弹窗关闭 icon */
|
|
66
|
-
closeIcon?: React.ReactNode;
|
|
67
|
-
/** 内容 */
|
|
68
|
-
content?: React.ReactNode;
|
|
69
|
-
/** 标题 */
|
|
70
|
-
title?: string;
|
|
71
|
-
/** PC端点击确定回调,返回 promise 可以延迟关闭。 */
|
|
72
|
-
onOk?: (...args: any[]) => any;
|
|
73
|
-
/** PC端确认按钮文字 */
|
|
74
|
-
okText?: React.ReactNode;
|
|
75
|
-
/** PC端取消按钮文字 */
|
|
76
|
-
cancelText?: React.ReactNode;
|
|
77
|
-
/** PC端确认按钮属性 */
|
|
78
|
-
okButtonProps?: {
|
|
79
|
-
style?: React.CSSProperties;
|
|
80
|
-
disabled?: boolean | undefined;
|
|
81
|
-
};
|
|
82
|
-
/** PC端取消按属性 */
|
|
83
|
-
cancelButtonProps?: {
|
|
84
|
-
style?: React.CSSProperties;
|
|
85
|
-
disabled?: boolean | undefined;
|
|
86
|
-
};
|
|
87
|
-
/** body 样式 */
|
|
88
|
-
bodyStyle?: React.CSSProperties;
|
|
89
|
-
/** 点击浮层关闭弹窗 */
|
|
90
|
-
maskClosable?: boolean;
|
|
91
|
-
/** 底部按钮 */
|
|
92
|
-
footer?: {
|
|
93
|
-
text?: string;
|
|
94
|
-
onClick?: React.MouseEventHandler<HTMLElement>;
|
|
95
|
-
type?: 'default' | 'primary';
|
|
96
|
-
}[];
|
|
97
|
-
/** 设置Modal的z-index */
|
|
98
|
-
zIndex?: number;
|
|
99
|
-
/** 是否展示遮罩 */
|
|
100
|
-
mask?: boolean;
|
|
101
|
-
}
|
|
102
|
-
/** 事件/菜单通用的 message 传参 */
|
|
103
|
-
export interface CommonMessagePayload {
|
|
104
|
-
/** 内容 */
|
|
105
|
-
content?: React.ReactNode;
|
|
106
|
-
/** 类型 */
|
|
107
|
-
type: 'info' | 'success' | 'error' | 'warn';
|
|
108
|
-
}
|
|
109
|
-
/** 自定义菜单弹窗参数 */
|
|
110
|
-
export type CustomMenuModalPayload = CommonModalPayload;
|
|
111
|
-
/**
|
|
112
|
-
* 唤起菜单弹窗
|
|
113
|
-
*/
|
|
114
|
-
export interface CommonOpenModalAction<T = CustomMenuModalPayload> {
|
|
115
|
-
type: 'openModal';
|
|
116
|
-
payload: T;
|
|
117
|
-
}
|
|
118
|
-
/**
|
|
119
|
-
* 手动关闭弹窗
|
|
120
|
-
*/
|
|
121
|
-
export interface CommonCloseModalAction {
|
|
122
|
-
type: 'closeModal';
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* 唤起 message 提示
|
|
126
|
-
*/
|
|
127
|
-
export interface CommonShowMessageAction {
|
|
128
|
-
type: 'showMessage';
|
|
129
|
-
payload: CommonMessagePayload;
|
|
130
|
-
}
|
|
131
|
-
export type MenuComponentPropsDispatch = (param: CommonOpenModalAction | CommonCloseModalAction | CommonShowMessageAction) => void;
|
|
132
|
-
/**
|
|
133
|
-
* 自定义图表卡片菜单 props 接口
|
|
134
|
-
*/
|
|
135
|
-
export interface MenuComponentChartProps extends MenuComponentProps {
|
|
136
|
-
/** 卡片菜单 */
|
|
137
|
-
chart: MenuChart;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* 仪表板图表自定义菜单接口
|
|
141
|
-
*/
|
|
142
|
-
export interface MenuChart extends ComponentProps {
|
|
143
|
-
/** 图表类型 */
|
|
144
|
-
componentType: ComponentType;
|
|
145
|
-
/** 自定义组件类型, 当组件是自定义组件时传入 */
|
|
146
|
-
customComponentType?: ChartType;
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* 电子表格自定义菜单
|
|
150
|
-
*/
|
|
151
|
-
export interface MenuComponentExcelProps extends MenuComponentProps {
|
|
152
|
-
sheets: MenuSheet[];
|
|
153
|
-
}
|
|
154
|
-
/**
|
|
155
|
-
* 仪表板自定义菜单
|
|
156
|
-
*/
|
|
157
|
-
export type MenuComponentDashboardProps = MenuComponentProps;
|
|
158
|
-
export interface MenuSheet {
|
|
159
|
-
/** 标签 id */
|
|
160
|
-
sheetId: string;
|
|
161
|
-
/** 标签名称 */
|
|
162
|
-
sheetName: string;
|
|
163
|
-
/** 标签顺序 */
|
|
164
|
-
sheetOrder: number;
|
|
165
|
-
}
|
|
166
|
-
/**
|
|
167
|
-
* 自定义菜单展示模式
|
|
168
|
-
*/
|
|
169
|
-
export declare enum CustomMenuMode {
|
|
170
|
-
/**
|
|
171
|
-
* 平铺,直接展示在界面上
|
|
172
|
-
*/
|
|
173
|
-
tile = 1,
|
|
174
|
-
/**
|
|
175
|
-
* 收起,隐藏至 更多下拉框 中
|
|
176
|
-
*/
|
|
177
|
-
pack = 2
|
|
178
|
-
}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @author 海狸
|
|
3
|
-
* @description 自定义菜单配置
|
|
4
|
-
*/
|
|
5
|
-
import type { ComponentProps } from '../components/component-props';
|
|
6
|
-
export interface MenuSchema {
|
|
7
|
-
schema: MenuSchemaBase;
|
|
8
|
-
}
|
|
9
|
-
/** styleSchema 配置, 仅供自定义组件内部使用 */
|
|
10
|
-
export interface MenuSchemaBase {
|
|
11
|
-
[menuKey: string]: MenuSchemaItem;
|
|
12
|
-
}
|
|
13
|
-
/** styleSchema 配置, 仅供自定义组件内部使用 */
|
|
14
|
-
export interface MenuSchemaItem {
|
|
15
|
-
/** 菜单项标题 */
|
|
16
|
-
title: string;
|
|
17
|
-
/** 菜单项图标 */
|
|
18
|
-
icon?: string;
|
|
19
|
-
/** 点击事件回调 */
|
|
20
|
-
onClick?: (props: ComponentProps) => void;
|
|
21
|
-
/** 是否禁用菜单项 */
|
|
22
|
-
disabled?: boolean | ((props: ComponentProps) => boolean);
|
|
23
|
-
/** 是否隐藏菜单项 */
|
|
24
|
-
hidden?: boolean | ((props: ComponentProps) => boolean);
|
|
25
|
-
}
|
|
26
|
-
export interface MenuProps {
|
|
27
|
-
customProps: ComponentProps;
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* 自定义菜单配置, 供所有图标使用
|
|
31
|
-
*/
|
|
32
|
-
export interface MenuMeta {
|
|
33
|
-
/** @deprecated[已废弃属性] 从上到下的顺序 */
|
|
34
|
-
order?: number;
|
|
35
|
-
}
|