@pisell/materials 6.11.19 → 6.11.20
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/render/default/view.js +1 -1
- package/build/lowcode/view.js +1 -1
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +290 -0
- package/es/components/PisellCards/components/TextCard/TextCard.d.ts +8 -0
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +26 -0
- package/es/components/PisellCards/components/TextCard/components/TextContent.d.ts +21 -0
- package/es/components/PisellCards/components/TextCard/types.d.ts +270 -0
- package/es/components/PisellCards/index.d.ts +0 -1
- package/es/components/PisellFields/index.d.ts +0 -1
- package/es/components/PisellLayouts/index.d.ts +0 -1
- package/es/components/PisellMetrics/index.d.ts +0 -1
- package/es/components/PisellSteps/PisellSteps.d.ts +14 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +4 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/es/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/es/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/es/components/dataSourceComponents/fields/index.d.ts +15 -16
- package/es/components/date-picker/index.d.ts +0 -1
- package/es/components/drag-sort-tree/index.d.ts +5 -0
- package/es/components/iconfont/index.d.ts +8 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/pisell-config-provider/index.d.ts +13 -0
- package/es/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/es/components/pisellGridPro/index.d.ts +4 -0
- package/es/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/es/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/es/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/es/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/es/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/es/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/es/components/pisellModal/components/index.d.ts +0 -1
- package/es/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/es/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/es/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/es/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/es/components/pisellTimeNavigator/types.d.ts +160 -0
- package/es/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/es/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
- package/es/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
- package/es/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/es/components/productCard/cartSkuCard/locales.d.ts +178 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/status.d.ts +32 -0
- package/es/components/productCard/types.d.ts +95 -0
- package/es/components/select-time/index.js +1 -0
- package/es/components/table/Actions/component/ViewMode/index.d.ts +9 -0
- package/es/components/table/Table/fields/date/index.d.ts +0 -1
- package/es/components/table/Table/fields/index.d.ts +2 -3
- package/es/components/table/Table/fields/link/index.d.ts +0 -1
- package/es/components/table/Table/fields/number/index.d.ts +0 -1
- package/es/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/es/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/es/components/table/Table/fields/search/index.d.ts +0 -1
- package/es/components/table/Table/fields/select/index.d.ts +0 -1
- package/es/components/table/Table/fields/text/index.d.ts +0 -1
- package/es/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/components/table/types.d.ts +268 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/hooks/useResponsive.d.ts +1 -1
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +290 -0
- package/lib/components/PisellCards/components/TextCard/TextCard.d.ts +8 -0
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.d.ts +26 -0
- package/lib/components/PisellCards/components/TextCard/components/TextContent.d.ts +21 -0
- package/lib/components/PisellCards/components/TextCard/types.d.ts +270 -0
- package/lib/components/PisellCards/index.d.ts +0 -1
- package/lib/components/PisellFields/index.d.ts +0 -1
- package/lib/components/PisellLayouts/index.d.ts +0 -1
- package/lib/components/PisellMetrics/index.d.ts +0 -1
- package/lib/components/PisellSteps/PisellSteps.d.ts +14 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceQRCode/index.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +4 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +0 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/lib/components/dataSourceComponents/fields/RecordListWrapper/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/Tabs/index.d.ts +1 -2
- package/lib/components/dataSourceComponents/fields/Upload/utils.d.ts +1 -1
- package/lib/components/dataSourceComponents/fields/index.d.ts +15 -16
- package/lib/components/date-picker/index.d.ts +0 -1
- package/lib/components/drag-sort-tree/index.d.ts +5 -0
- package/lib/components/iconfont/index.d.ts +8 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/pisell-config-provider/index.d.ts +13 -0
- package/lib/components/pisellDataSourceContainer/hooks/useDataSourceKey.d.ts +0 -1
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.d.ts +48 -0
- package/lib/components/pisellGridPro/index.d.ts +4 -0
- package/lib/components/pisellHierarchicalSummaryList/PisellHierarchicalSummaryList.stories.d.ts +10 -0
- package/lib/components/pisellHierarchicalSummaryList/components/index.d.ts +1 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/index.d.ts +2 -0
- package/lib/components/pisellHierarchicalSummaryList/hooks/useExpandedKeys.d.ts +15 -0
- package/lib/components/pisellHierarchicalSummaryList/index.d.ts +5 -0
- package/lib/components/pisellHierarchicalSummaryList/types.d.ts +248 -0
- package/lib/components/pisellLookup/components/LookupTrigger.d.ts +3 -0
- package/lib/components/pisellModal/components/index.d.ts +0 -1
- package/lib/components/pisellTimeNavigator/components/BackgroundLayer.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/hooks/useDragInertia.d.ts +14 -0
- package/lib/components/pisellTimeNavigator/hooks/useRealtime.d.ts +5 -0
- package/lib/components/pisellTimeNavigator/hooks/useTimeAxis.d.ts +27 -0
- package/lib/components/pisellTimeNavigator/types.d.ts +160 -0
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +30 -0
- package/lib/components/productCard/cartSkuCard/components/Gift/types.d.ts +29 -0
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.d.ts +7 -0
- package/lib/components/productCard/cartSkuCard/components/packages/utils.d.ts +1 -1
- package/lib/components/productCard/cartSkuCard/locales.d.ts +178 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +4 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/status.d.ts +32 -0
- package/lib/components/productCard/types.d.ts +95 -0
- package/lib/components/select-time/index.js +1 -0
- package/lib/components/table/Actions/component/ViewMode/index.d.ts +9 -0
- package/lib/components/table/Table/fields/date/index.d.ts +0 -1
- package/lib/components/table/Table/fields/index.d.ts +2 -3
- package/lib/components/table/Table/fields/link/index.d.ts +0 -1
- package/lib/components/table/Table/fields/number/index.d.ts +0 -1
- package/lib/components/table/Table/fields/numberRange/index.d.ts +0 -1
- package/lib/components/table/Table/fields/oldRangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/rangePicker/index.d.ts +0 -1
- package/lib/components/table/Table/fields/search/index.d.ts +0 -1
- package/lib/components/table/Table/fields/select/index.d.ts +0 -1
- package/lib/components/table/Table/fields/text/index.d.ts +0 -1
- package/lib/components/table/Table/fields/treeSelect/index.d.ts +0 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/components/table/types.d.ts +268 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/hooks/useResponsive.d.ts +1 -1
- package/lowcode/floor-map-image-element/meta.ts +1 -1
- package/lowcode/floor-map-layout-provider/meta.ts +1 -1
- package/lowcode/pisell-floor-map-layout/meta.ts +1 -1
- package/lowcode/render-figma-style-round-table-card/meta.ts +1 -1
- package/lowcode/render-figma-style-table-card/meta.ts +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { FilterType } from "../filter/types";
|
|
2
|
+
import { SortItemProps } from "../sort/types";
|
|
3
|
+
import React from "react";
|
|
4
|
+
export declare type StorageMode = "" | "localStorage";
|
|
5
|
+
/**
|
|
6
|
+
* 排序总配置
|
|
7
|
+
*/
|
|
8
|
+
export declare type SortType = {
|
|
9
|
+
/** 排序是否展示 */
|
|
10
|
+
show: boolean;
|
|
11
|
+
/** 排序存储模式 */
|
|
12
|
+
storageMode: StorageMode;
|
|
13
|
+
list: SortItemProps[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* 列展示总配置
|
|
17
|
+
*/
|
|
18
|
+
export declare type ColumnSettingType = {
|
|
19
|
+
/** 列设置是否展示 */
|
|
20
|
+
show: boolean;
|
|
21
|
+
/** 列设置存储模式 */
|
|
22
|
+
storageMode: StorageMode;
|
|
23
|
+
};
|
|
24
|
+
declare type DataSourceListItemType = {
|
|
25
|
+
isCustom: boolean;
|
|
26
|
+
columnKey?: string;
|
|
27
|
+
label?: string;
|
|
28
|
+
name?: string | string[];
|
|
29
|
+
isHidden?: boolean;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* 数据源分组总配置
|
|
33
|
+
*/
|
|
34
|
+
export declare type DataSourceGroupType = {
|
|
35
|
+
/** 分组设置是否展示 */
|
|
36
|
+
show: boolean;
|
|
37
|
+
/** 分组设置存储模式 */
|
|
38
|
+
storageMode: StorageMode;
|
|
39
|
+
/** */
|
|
40
|
+
list: DataSourceListItemType[];
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Gallery封面总配置
|
|
44
|
+
*/
|
|
45
|
+
declare type GalleryCoverType = {
|
|
46
|
+
/** 封面是否展示 */
|
|
47
|
+
show: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 封面图片可以使用的字段
|
|
50
|
+
*/
|
|
51
|
+
fields: string[];
|
|
52
|
+
/**
|
|
53
|
+
* 封面高度
|
|
54
|
+
*/
|
|
55
|
+
height: number;
|
|
56
|
+
/** 图片裁剪方式 */
|
|
57
|
+
objectFit: "fill" | "cover";
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Gallery标题总配置
|
|
61
|
+
*/
|
|
62
|
+
declare type GalleryTitleType = {
|
|
63
|
+
/** 标题使用的字段 */
|
|
64
|
+
field: string;
|
|
65
|
+
/** 标题行数 */
|
|
66
|
+
line: number;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Gallery头部区域总配置
|
|
70
|
+
*/
|
|
71
|
+
declare type GalleryHeaderType = {
|
|
72
|
+
/** 头部区域插槽 */
|
|
73
|
+
slot?: (record: Record<string, any>, index: number) => React.ReactNode;
|
|
74
|
+
/** 头部区域其他字段设置 */
|
|
75
|
+
fields: {
|
|
76
|
+
/** 头部区域其他字段是否展示 */
|
|
77
|
+
show: boolean;
|
|
78
|
+
/** 头部区域其他字段 */
|
|
79
|
+
list: string[];
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Gallery内容区域总配置
|
|
84
|
+
*/
|
|
85
|
+
declare type GalleryContentType = {
|
|
86
|
+
/** 内容区域字段配置 */
|
|
87
|
+
fields: {
|
|
88
|
+
columnKey: string;
|
|
89
|
+
show: boolean;
|
|
90
|
+
}[];
|
|
91
|
+
};
|
|
92
|
+
export declare type GallerySettingValueType = {
|
|
93
|
+
coverField: string | "noCover";
|
|
94
|
+
coverObjectFit: "fill" | "cover";
|
|
95
|
+
compactMode: "default" | "compact";
|
|
96
|
+
isShowLabel: boolean;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Gallery底部区域总配置
|
|
100
|
+
*/
|
|
101
|
+
declare type GalleryFooterType = {
|
|
102
|
+
/** 底部区域自定义渲染 */
|
|
103
|
+
render: (record: Record<string, any>, index: number) => React.ReactNode;
|
|
104
|
+
/** 底部区域高度 */
|
|
105
|
+
height: number;
|
|
106
|
+
};
|
|
107
|
+
/**
|
|
108
|
+
* Gallery模式总配置
|
|
109
|
+
*/
|
|
110
|
+
export declare type GallerySettingType = {
|
|
111
|
+
/** 卡片最小宽度 */
|
|
112
|
+
cardMinWidth: number;
|
|
113
|
+
/** 卡片最大宽度 */
|
|
114
|
+
cardMaxWidth: number;
|
|
115
|
+
/** 水平间隔 */
|
|
116
|
+
horizontalGutter: number;
|
|
117
|
+
/** 垂直间隔 */
|
|
118
|
+
verticalGutter: number;
|
|
119
|
+
/** 封面配置 */
|
|
120
|
+
cover: GalleryCoverType;
|
|
121
|
+
/** 标题配置 */
|
|
122
|
+
title: GalleryTitleType;
|
|
123
|
+
/** 头部区域 */
|
|
124
|
+
header: GalleryHeaderType;
|
|
125
|
+
/** 内容区域 */
|
|
126
|
+
content: GalleryContentType;
|
|
127
|
+
/** 固定高度 */
|
|
128
|
+
fixedHeight: boolean;
|
|
129
|
+
/** 固定的卡片高度 */
|
|
130
|
+
cardHeight: number;
|
|
131
|
+
/** 固定顶部 */
|
|
132
|
+
fixedHeader: boolean;
|
|
133
|
+
/** 固定底部 */
|
|
134
|
+
fixedFooter: boolean;
|
|
135
|
+
/** 底部区域 */
|
|
136
|
+
footer: GalleryFooterType;
|
|
137
|
+
/** 卡片点击时间 */
|
|
138
|
+
onItem: (record: Record<string, any>, index: number) => void;
|
|
139
|
+
};
|
|
140
|
+
/** 视图模式 */
|
|
141
|
+
export declare type ModeType = "grid" | "gallery" | "kanban";
|
|
142
|
+
/**
|
|
143
|
+
* 视图模式总配置
|
|
144
|
+
*/
|
|
145
|
+
export declare type GridViewType = {
|
|
146
|
+
/** 默认视图模式 */
|
|
147
|
+
defaultViewMode: ModeType;
|
|
148
|
+
/** 开启多视图模式可进行页面内转换 */
|
|
149
|
+
multiple: boolean;
|
|
150
|
+
/** 当前可用的视图模式列表 */
|
|
151
|
+
modeList: ModeType[];
|
|
152
|
+
};
|
|
153
|
+
declare type SortDetail = {
|
|
154
|
+
fromIndex: number;
|
|
155
|
+
toIndex: number;
|
|
156
|
+
dataSource: Record<string, any>[];
|
|
157
|
+
fromId: number | string;
|
|
158
|
+
toId: number | string;
|
|
159
|
+
fromItem: Record<string, any>;
|
|
160
|
+
toItem: Record<string, any>;
|
|
161
|
+
};
|
|
162
|
+
/** 导入导出模式 */
|
|
163
|
+
export declare type ExportImportModeType = "import" | "export" | "export_file" | "import_log";
|
|
164
|
+
/**
|
|
165
|
+
* @title: 导出导入api
|
|
166
|
+
* @description:
|
|
167
|
+
* @return {*}
|
|
168
|
+
* @Author: WangHan
|
|
169
|
+
* @Date: 2024-09-11 15:44
|
|
170
|
+
*/
|
|
171
|
+
export declare type ApiProps = {
|
|
172
|
+
export?: string;
|
|
173
|
+
import?: string;
|
|
174
|
+
export_file: string;
|
|
175
|
+
import_log?: string;
|
|
176
|
+
template?: string;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* 导入导出配置
|
|
180
|
+
*/
|
|
181
|
+
export declare type ExportImportType = {
|
|
182
|
+
/** 是否展示 */
|
|
183
|
+
show: boolean;
|
|
184
|
+
/** 当前所选项 */
|
|
185
|
+
selectLists: string[];
|
|
186
|
+
/** 导入模版链接 */
|
|
187
|
+
templateFileUrl: string;
|
|
188
|
+
/** 标题 */
|
|
189
|
+
title: string;
|
|
190
|
+
hiddenKeys?: string[];
|
|
191
|
+
apiUrl?: ApiProps;
|
|
192
|
+
otherParams?: any;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* 设置记忆范围
|
|
196
|
+
*/
|
|
197
|
+
export declare type LocalSettingsScope = "filters" | "sorting" | "columns";
|
|
198
|
+
/**
|
|
199
|
+
* 本地记忆设置
|
|
200
|
+
*/
|
|
201
|
+
export declare type LocalSettingsType = {
|
|
202
|
+
/** 启用设置记忆 */
|
|
203
|
+
enable: boolean;
|
|
204
|
+
/** 记忆范围 */
|
|
205
|
+
scope: LocalSettingsScope[];
|
|
206
|
+
/** 不需要记忆的筛选字段(当 scope 包含 filters 时生效) */
|
|
207
|
+
excludedFilterFields?: string[];
|
|
208
|
+
};
|
|
209
|
+
export declare type GridViewProps = {
|
|
210
|
+
columns: any;
|
|
211
|
+
dataSource: any[];
|
|
212
|
+
dispatch: any;
|
|
213
|
+
/**
|
|
214
|
+
* 画册模式的配置
|
|
215
|
+
*/
|
|
216
|
+
gallery: GallerySettingType;
|
|
217
|
+
/**
|
|
218
|
+
* 视图设置
|
|
219
|
+
*/
|
|
220
|
+
view: GridViewType;
|
|
221
|
+
style: React.CSSProperties;
|
|
222
|
+
pagination: any;
|
|
223
|
+
filter: FilterType;
|
|
224
|
+
buttons: React.ReactNode | any[];
|
|
225
|
+
actionButtons: any;
|
|
226
|
+
sort: SortType;
|
|
227
|
+
title?: React.ReactNode | (() => React.ReactNode);
|
|
228
|
+
showTitle?: boolean;
|
|
229
|
+
subTitle?: React.ReactNode | (() => React.ReactNode);
|
|
230
|
+
showSubTitle?: boolean;
|
|
231
|
+
exportImport: ExportImportType;
|
|
232
|
+
onValuesChange: (changedValues: any, values: any) => void;
|
|
233
|
+
summary: any;
|
|
234
|
+
utils: any;
|
|
235
|
+
rowKey: ((record: Record<string, any>) => string) | string;
|
|
236
|
+
columnSetting?: ColumnSettingType;
|
|
237
|
+
dataSourceGroup?: DataSourceGroupType;
|
|
238
|
+
loading: boolean;
|
|
239
|
+
dragSort: boolean;
|
|
240
|
+
onSortChange?: (detail: SortDetail) => boolean;
|
|
241
|
+
__id?: string;
|
|
242
|
+
__designMode?: "design";
|
|
243
|
+
/**
|
|
244
|
+
* 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
|
|
245
|
+
*/
|
|
246
|
+
currentSettingKey?: string;
|
|
247
|
+
/**
|
|
248
|
+
* 当前本地配置的唯一值, 不填默认使用currentSettingKey
|
|
249
|
+
*/
|
|
250
|
+
currentComponentId?: string;
|
|
251
|
+
/**
|
|
252
|
+
* 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
|
|
253
|
+
* @param currentDataSource
|
|
254
|
+
*/
|
|
255
|
+
onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
|
|
256
|
+
tabs: {
|
|
257
|
+
show: boolean;
|
|
258
|
+
type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
|
|
259
|
+
items: {
|
|
260
|
+
name: string;
|
|
261
|
+
filterBy?: Record<string, any>;
|
|
262
|
+
sortBy?: string;
|
|
263
|
+
}[];
|
|
264
|
+
};
|
|
265
|
+
/** 本地记忆设置 */
|
|
266
|
+
localSettings?: LocalSettingsType;
|
|
267
|
+
};
|
|
268
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Version } from '../versionSelect';
|
|
3
|
+
import './index.less';
|
|
4
|
+
interface PublishVersionModalProps {
|
|
5
|
+
visible: boolean;
|
|
6
|
+
currentVersion: string;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
onConfirm: (data: VersionData) => void;
|
|
9
|
+
isShowNote?: boolean;
|
|
10
|
+
confirmLoading?: boolean;
|
|
11
|
+
versions?: Version[];
|
|
12
|
+
isShowBasedOn?: boolean;
|
|
13
|
+
isShowCurrentVersion?: boolean;
|
|
14
|
+
isValidateVersion?: boolean;
|
|
15
|
+
}
|
|
16
|
+
interface VersionData {
|
|
17
|
+
version: string;
|
|
18
|
+
note: string;
|
|
19
|
+
baseVersion?: string;
|
|
20
|
+
versionType?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const PublishVersionModal: React.FC<PublishVersionModalProps>;
|
|
23
|
+
export default PublishVersionModal;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
declare type ResponsiveConfig = Record<string, number>;
|
|
2
2
|
export declare function configResponsive(config: ResponsiveConfig): void;
|
|
3
|
-
export default function useResponsive(): "
|
|
3
|
+
export default function useResponsive(): "pc" | "ipad" | "phone";
|
|
4
4
|
export {};
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { PisellBasicCardProps } from '../../types';
|
|
3
|
+
import { PisellImageCardProps } from '../PisellImageCard/types';
|
|
4
|
+
/**
|
|
5
|
+
* 样式变体类型
|
|
6
|
+
*/
|
|
7
|
+
export declare type GraphicTextCardVariant = 'vertical-image' | 'vertical-icon' | 'horizontal' | 'card';
|
|
8
|
+
/**
|
|
9
|
+
* 尺寸类型
|
|
10
|
+
*/
|
|
11
|
+
export declare type GraphicTextCardSize = 'small' | 'default' | 'large';
|
|
12
|
+
/**
|
|
13
|
+
* 宽度模式
|
|
14
|
+
*/
|
|
15
|
+
export declare type GraphicTextCardWidthMode = 'auto' | 'fixed' | 'full';
|
|
16
|
+
/**
|
|
17
|
+
* 图形区域配置
|
|
18
|
+
*/
|
|
19
|
+
export interface GraphicConfig extends PisellImageCardProps {
|
|
20
|
+
hidden?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* 图形区域宽度(单位:px)
|
|
23
|
+
* 如不设置,将根据 variant 和 size 自动计算
|
|
24
|
+
*/
|
|
25
|
+
width?: number;
|
|
26
|
+
/**
|
|
27
|
+
* 图形区域高度(单位:px)
|
|
28
|
+
* 如不设置,将根据 variant 和 size 自动计算
|
|
29
|
+
*/
|
|
30
|
+
height?: number;
|
|
31
|
+
/**
|
|
32
|
+
* 图形区域圆角
|
|
33
|
+
*/
|
|
34
|
+
borderRadius?: number | string;
|
|
35
|
+
/**
|
|
36
|
+
* 图形区域背景色
|
|
37
|
+
*/
|
|
38
|
+
background?: string;
|
|
39
|
+
/**
|
|
40
|
+
* 图形区域边框
|
|
41
|
+
*/
|
|
42
|
+
border?: string;
|
|
43
|
+
/**
|
|
44
|
+
* 图形区域阴影
|
|
45
|
+
*/
|
|
46
|
+
boxShadow?: string;
|
|
47
|
+
/**
|
|
48
|
+
* 图形区域内边距
|
|
49
|
+
*/
|
|
50
|
+
padding?: number | string;
|
|
51
|
+
/**
|
|
52
|
+
* 图标大小(当使用 icon 时有效,单位:px)
|
|
53
|
+
*/
|
|
54
|
+
iconSize?: number;
|
|
55
|
+
/**
|
|
56
|
+
* 图标颜色(当使用 icon 时有效)
|
|
57
|
+
*/
|
|
58
|
+
iconColor?: string;
|
|
59
|
+
/**
|
|
60
|
+
* 自定义样式
|
|
61
|
+
*/
|
|
62
|
+
style?: CSSProperties;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* 角标类型
|
|
66
|
+
*/
|
|
67
|
+
export declare type BadgeType = 'dot' | 'number' | 'text';
|
|
68
|
+
/**
|
|
69
|
+
* 角标位置
|
|
70
|
+
*/
|
|
71
|
+
export declare type BadgePosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left';
|
|
72
|
+
/**
|
|
73
|
+
* 角标配置
|
|
74
|
+
*/
|
|
75
|
+
export interface BadgeConfig {
|
|
76
|
+
/**
|
|
77
|
+
* 角标类型
|
|
78
|
+
* @default 'dot'
|
|
79
|
+
*/
|
|
80
|
+
type?: BadgeType;
|
|
81
|
+
/**
|
|
82
|
+
* 角标内容(数字或文本)
|
|
83
|
+
* 当 type 为 'number' 或 'text' 时有效
|
|
84
|
+
*/
|
|
85
|
+
content?: ReactNode;
|
|
86
|
+
/**
|
|
87
|
+
* 角标位置
|
|
88
|
+
* @default 'top-right'
|
|
89
|
+
*/
|
|
90
|
+
position?: BadgePosition;
|
|
91
|
+
/**
|
|
92
|
+
* 角标偏移量 [x, y]
|
|
93
|
+
* 正数向右/下偏移,负数向左/上偏移
|
|
94
|
+
*/
|
|
95
|
+
offset?: [number, number];
|
|
96
|
+
/**
|
|
97
|
+
* 角标颜色
|
|
98
|
+
*/
|
|
99
|
+
color?: string;
|
|
100
|
+
/**
|
|
101
|
+
* 角标自定义样式
|
|
102
|
+
*/
|
|
103
|
+
style?: CSSProperties;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* 文本配置
|
|
107
|
+
*/
|
|
108
|
+
export interface TextConfig {
|
|
109
|
+
/**
|
|
110
|
+
* 字体大小(单位:px)
|
|
111
|
+
*/
|
|
112
|
+
fontSize?: number;
|
|
113
|
+
/**
|
|
114
|
+
* 字体粗细
|
|
115
|
+
*/
|
|
116
|
+
fontWeight?: string | number;
|
|
117
|
+
/**
|
|
118
|
+
* 文本颜色
|
|
119
|
+
*/
|
|
120
|
+
color?: string;
|
|
121
|
+
/**
|
|
122
|
+
* 最大显示行数
|
|
123
|
+
* @default 1
|
|
124
|
+
*/
|
|
125
|
+
maxLines?: number;
|
|
126
|
+
/**
|
|
127
|
+
* 是否显示省略号
|
|
128
|
+
* @default true
|
|
129
|
+
*/
|
|
130
|
+
ellipsis?: boolean;
|
|
131
|
+
/**
|
|
132
|
+
* 文本对齐方式
|
|
133
|
+
* @default 'left'
|
|
134
|
+
*/
|
|
135
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* GraphicTextCard 组件 Props
|
|
139
|
+
* 基于 PisellBasicCardProps 扩展
|
|
140
|
+
* 注意:重写 onClick 为可选属性
|
|
141
|
+
*/
|
|
142
|
+
export interface GraphicTextCardProps extends Omit<PisellBasicCardProps, 'onClick'> {
|
|
143
|
+
/**
|
|
144
|
+
* 卡片显示的文本内容(必填)
|
|
145
|
+
*/
|
|
146
|
+
text: ReactNode;
|
|
147
|
+
/**
|
|
148
|
+
* 卡片样式变体
|
|
149
|
+
* @default 'vertical-image'
|
|
150
|
+
*/
|
|
151
|
+
variant?: GraphicTextCardVariant;
|
|
152
|
+
/**
|
|
153
|
+
* 卡片尺寸
|
|
154
|
+
* @default 'default'
|
|
155
|
+
*/
|
|
156
|
+
size?: GraphicTextCardSize;
|
|
157
|
+
/**
|
|
158
|
+
* 是否可点击
|
|
159
|
+
* @default true
|
|
160
|
+
*/
|
|
161
|
+
clickable?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* 图片地址
|
|
164
|
+
* 与 icon 二选一,优先使用 image
|
|
165
|
+
*/
|
|
166
|
+
image?: string;
|
|
167
|
+
/**
|
|
168
|
+
* 图标
|
|
169
|
+
* 支持 ReactNode(如 antd Icon、svg 等)或图标 URL
|
|
170
|
+
* 与 image 二选一
|
|
171
|
+
*/
|
|
172
|
+
icon?: ReactNode;
|
|
173
|
+
/**
|
|
174
|
+
* 图形区域配置
|
|
175
|
+
* 用于自定义图形区域的样式和尺寸
|
|
176
|
+
*/
|
|
177
|
+
graphicConfig?: GraphicConfig;
|
|
178
|
+
/**
|
|
179
|
+
* 图形区域插槽
|
|
180
|
+
* 用于完全自定义图形区域,优先级高于 image 和 icon
|
|
181
|
+
*/
|
|
182
|
+
graphicSlot?: ReactNode;
|
|
183
|
+
/**
|
|
184
|
+
* 角标配置
|
|
185
|
+
* 用于显示红点、数字或文本提示
|
|
186
|
+
*/
|
|
187
|
+
badge?: BadgeConfig;
|
|
188
|
+
/**
|
|
189
|
+
* 前置插槽
|
|
190
|
+
* 用于在图形区域前添加自定义内容
|
|
191
|
+
*/
|
|
192
|
+
prefixSlot?: ReactNode;
|
|
193
|
+
/**
|
|
194
|
+
* 后置插槽
|
|
195
|
+
* 用于在文本内容后添加自定义内容
|
|
196
|
+
*/
|
|
197
|
+
suffixSlot?: ReactNode;
|
|
198
|
+
/**
|
|
199
|
+
* 文本配置
|
|
200
|
+
* 用于自定义文本样式和显示行为
|
|
201
|
+
*/
|
|
202
|
+
textConfig?: TextConfig;
|
|
203
|
+
/**
|
|
204
|
+
* 宽度模式
|
|
205
|
+
* - auto: 内容撑满,最大宽度 maxWidth
|
|
206
|
+
* - fixed: 固定宽度 width
|
|
207
|
+
* - full: 撑满父容器
|
|
208
|
+
* @default 'auto'
|
|
209
|
+
*/
|
|
210
|
+
widthMode?: GraphicTextCardWidthMode;
|
|
211
|
+
/**
|
|
212
|
+
* 固定宽度值
|
|
213
|
+
* 当 widthMode='fixed' 时有效
|
|
214
|
+
*/
|
|
215
|
+
width?: number | string;
|
|
216
|
+
/**
|
|
217
|
+
* 最大宽度
|
|
218
|
+
* 当 widthMode='auto' 时有效
|
|
219
|
+
* @default 400
|
|
220
|
+
*/
|
|
221
|
+
maxWidth?: number | string;
|
|
222
|
+
/**
|
|
223
|
+
* 点击事件
|
|
224
|
+
* 当 clickable=true 且不在 disabled/loading 状态时触发
|
|
225
|
+
* 注意:PisellBasicCardProps 中的 onClick 是必填的,这里重新定义为可选
|
|
226
|
+
*/
|
|
227
|
+
onClick?: (event: React.MouseEvent<HTMLDivElement>) => void;
|
|
228
|
+
/**
|
|
229
|
+
* 自定义渲染函数
|
|
230
|
+
* 完全自定义组件的渲染内容
|
|
231
|
+
* 当提供此函数时,组件内置的渲染逻辑将被忽略
|
|
232
|
+
*/
|
|
233
|
+
render?: (props: GraphicTextCardProps) => ReactNode;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* GraphicArea 组件 Props
|
|
237
|
+
* 图形区域子组件
|
|
238
|
+
*/
|
|
239
|
+
export interface GraphicAreaProps {
|
|
240
|
+
/**
|
|
241
|
+
* 图片地址
|
|
242
|
+
*/
|
|
243
|
+
image?: string;
|
|
244
|
+
/**
|
|
245
|
+
* 图标内容
|
|
246
|
+
*/
|
|
247
|
+
icon?: ReactNode;
|
|
248
|
+
/**
|
|
249
|
+
* 图形配置
|
|
250
|
+
*/
|
|
251
|
+
config?: GraphicConfig;
|
|
252
|
+
/**
|
|
253
|
+
* 自定义类名
|
|
254
|
+
*/
|
|
255
|
+
className?: string;
|
|
256
|
+
aliWidth?: number;
|
|
257
|
+
}
|
|
258
|
+
/**
|
|
259
|
+
* TextContent 组件 Props
|
|
260
|
+
* 文本内容子组件
|
|
261
|
+
*/
|
|
262
|
+
export interface TextContentProps {
|
|
263
|
+
/**
|
|
264
|
+
* 文本内容
|
|
265
|
+
*/
|
|
266
|
+
text: ReactNode;
|
|
267
|
+
/**
|
|
268
|
+
* 文本配置
|
|
269
|
+
*/
|
|
270
|
+
textConfig?: TextConfig;
|
|
271
|
+
/**
|
|
272
|
+
* 自定义类名
|
|
273
|
+
*/
|
|
274
|
+
className?: string;
|
|
275
|
+
active: PisellBasicCardProps['active'];
|
|
276
|
+
}
|
|
277
|
+
/**
|
|
278
|
+
* BadgeWrapper 组件 Props
|
|
279
|
+
* 角标包装子组件
|
|
280
|
+
*/
|
|
281
|
+
export interface BadgeWrapperProps {
|
|
282
|
+
/**
|
|
283
|
+
* 角标配置
|
|
284
|
+
*/
|
|
285
|
+
badge?: BadgeConfig;
|
|
286
|
+
/**
|
|
287
|
+
* 子元素
|
|
288
|
+
*/
|
|
289
|
+
children: ReactNode;
|
|
290
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BadgeWrapperProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* BadgeWrapper 角标包装组件
|
|
5
|
+
* 负责角标的渲染和定位,支持红点、数字、文本三种类型
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* // 红点角标
|
|
10
|
+
* <BadgeWrapper badge={{ type: 'dot' }}>
|
|
11
|
+
* <TextCard text="Item" />
|
|
12
|
+
* </BadgeWrapper>
|
|
13
|
+
*
|
|
14
|
+
* // 数字角标
|
|
15
|
+
* <BadgeWrapper badge={{ type: 'number', content: 99 }}>
|
|
16
|
+
* <TextCard text="Item" />
|
|
17
|
+
* </BadgeWrapper>
|
|
18
|
+
*
|
|
19
|
+
* // 文本角标
|
|
20
|
+
* <BadgeWrapper badge={{ type: 'text', content: 'New' }}>
|
|
21
|
+
* <TextCard text="Item" />
|
|
22
|
+
* </BadgeWrapper>
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
declare const BadgeWrapper: React.FC<BadgeWrapperProps>;
|
|
26
|
+
export default BadgeWrapper;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextContentProps } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* TextContent 文本内容组件
|
|
5
|
+
* 负责渲染主文本内容,处理文本省略逻辑
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* <TextContent
|
|
10
|
+
* text="这是一段很长的文本内容"
|
|
11
|
+
* textConfig={{
|
|
12
|
+
* maxLines: 2,
|
|
13
|
+
* ellipsis: true,
|
|
14
|
+
* fontSize: 14,
|
|
15
|
+
* color: '#333'
|
|
16
|
+
* }}
|
|
17
|
+
* />
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
declare const TextContent: React.FC<TextContentProps>;
|
|
21
|
+
export default TextContent;
|