@pisell/materials 3.3.32 → 3.3.34
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/index.js +1 -1
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/preview.js +9 -9
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +24 -24
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +25 -25
- package/es/components/buttonGroupEdit/index.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +6 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +1 -1
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +4 -12
- package/es/components/dataSourceComponents/fields/utils.js +0 -5
- package/es/components/div/index.js +45 -8
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -3
- package/es/components/pisellDraggable/components/TreeItem/index.js +1 -1
- package/es/components/pisellDraggable/index.js +165 -127
- package/es/components/pisellDropSort/PisellDropSort.js +10 -3
- package/es/components/pisellDropSort/components/SortableItem/index.js +6 -1
- package/es/components/pisellDropSort/components/SortableItem/index.less +0 -1
- package/es/components/pisellMenu/PisellMenu.js +1 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +79 -11
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.less +14 -0
- package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/es/components/table/Table/SelectField/index.d.ts +1 -0
- package/es/components/table/Table/fields/index.d.ts +3 -2
- package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/es/components/table/Table/utils.d.ts +1 -1
- package/es/locales/en-US.js +4 -0
- package/es/locales/zh-CN.js +4 -0
- package/es/locales/zh-TW.js +4 -0
- package/es/utils/index.d.ts +1 -1
- package/es/utils/platform.d.ts +1 -1
- package/lib/components/buttonGroupEdit/index.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +6 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +1 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +7 -15
- package/lib/components/dataSourceComponents/fields/utils.js +0 -5
- package/lib/components/div/index.js +33 -3
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -7
- package/lib/components/pisellDraggable/components/TreeItem/index.js +12 -2
- package/lib/components/pisellDraggable/index.js +114 -80
- package/lib/components/pisellDropSort/PisellDropSort.js +9 -3
- package/lib/components/pisellDropSort/components/SortableItem/index.js +5 -0
- package/lib/components/pisellDropSort/components/SortableItem/index.less +0 -1
- package/lib/components/pisellMenu/PisellMenu.js +1 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +64 -9
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.less +14 -0
- package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
- package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
- package/lib/components/table/Table/SelectField/index.d.ts +1 -0
- package/lib/components/table/Table/fields/index.d.ts +3 -2
- package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
- package/lib/components/table/Table/utils.d.ts +1 -1
- package/lib/locales/en-US.js +4 -0
- package/lib/locales/zh-CN.js +4 -0
- package/lib/locales/zh-TW.js +4 -0
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/platform.d.ts +1 -1
- package/lowcode/div/meta.ts +39 -4
- package/lowcode/pisell-navigation-menu/meta.ts +12 -0
- package/package.json +3 -3
- package/es/components/appVersionControl/index.d.ts +0 -4
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/es/components/div/index.d.ts +0 -8
- package/es/components/drag-sort-tree/index.d.ts +0 -4
- package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
- package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -23
- package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
- package/es/components/pisellDraggable/index.d.ts +0 -32
- package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
- package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -25
- package/es/components/pisellDropSort/types.d.ts +0 -52
- package/es/components/pisellMenu/PisellMenu.d.ts +0 -9
- package/es/components/pisellMenu/types.d.ts +0 -26
- package/es/components/pisellNavigationMenu/types.d.ts +0 -64
- package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/es/components/table/Table/index.d.ts +0 -4
- package/es/components/table/types.d.ts +0 -251
- package/es/components/versionModal/index.d.ts +0 -23
- package/lib/components/appVersionControl/index.d.ts +0 -4
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
- package/lib/components/div/index.d.ts +0 -8
- package/lib/components/drag-sort-tree/index.d.ts +0 -4
- package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
- package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -23
- package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
- package/lib/components/pisellDraggable/index.d.ts +0 -32
- package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
- package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -25
- package/lib/components/pisellDropSort/types.d.ts +0 -52
- package/lib/components/pisellMenu/PisellMenu.d.ts +0 -9
- package/lib/components/pisellMenu/types.d.ts +0 -26
- package/lib/components/pisellNavigationMenu/types.d.ts +0 -64
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
- package/lib/components/table/Table/index.d.ts +0 -4
- package/lib/components/table/types.d.ts +0 -251
- package/lib/components/versionModal/index.d.ts +0 -23
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
export declare const fieldMaps: {
|
|
2
3
|
text: {
|
|
3
4
|
field: {
|
|
@@ -197,12 +198,12 @@ export declare const fieldList: ({
|
|
|
197
198
|
field_icon: string;
|
|
198
199
|
field_name: string;
|
|
199
200
|
field_type: string;
|
|
200
|
-
default_value:
|
|
201
|
+
default_value: string;
|
|
201
202
|
} | {
|
|
202
203
|
field_icon: string;
|
|
203
204
|
field_name: string;
|
|
204
205
|
field_type: string;
|
|
205
|
-
default_value:
|
|
206
|
+
default_value: boolean;
|
|
206
207
|
} | {
|
|
207
208
|
field_icon: string;
|
|
208
209
|
field_name: string;
|
|
@@ -155,7 +155,7 @@ export declare const getSettingKeyArrByMode: ({ filter, columnSetting, dataSourc
|
|
|
155
155
|
sort?: SortType | undefined;
|
|
156
156
|
mode: "" | "localStorage" | "remote";
|
|
157
157
|
currentViewMode: ModeType;
|
|
158
|
-
}) => ("
|
|
158
|
+
}) => ("filter_setting" | "view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting")[];
|
|
159
159
|
export declare const omit: (obj: Record<string, any>, keys: string[]) => Record<string, any>;
|
|
160
160
|
export declare const stringify: (obj: Record<string, any>) => string;
|
|
161
161
|
export {};
|
package/lib/locales/en-US.js
CHANGED
|
@@ -274,7 +274,11 @@ var en_US_default = {
|
|
|
274
274
|
"pisell-lowcode-navigation-menu-add-page": "Add page",
|
|
275
275
|
"pisell-lowcode-navigation-menu-add-page-tip": "No navigation found. Please add a submenu or page.",
|
|
276
276
|
"pisell-lowcode-navigation-menu-tag-base": "Base",
|
|
277
|
+
"pisell-lowcode-navigation-menu-tag-proCode": "Pro code",
|
|
277
278
|
"pisell-lowcode-navigation-menu-tag-pisell1": "Pisell 1.0",
|
|
279
|
+
"pisell-lowcode-navigation-menu-tag-group": "Group",
|
|
280
|
+
"pisell-lowcode-navigation-menu-tag-sub-menu": "Submenu",
|
|
281
|
+
"pisell-lowcode-navigation-menu-tag-custom": "Custom",
|
|
278
282
|
// 应用标识符
|
|
279
283
|
"pisell-data-source-form-app-identifier-pattern": "Can only contain lowercase letters, numbers, hyphens, dots, and underscores",
|
|
280
284
|
"pisell-data-source-form-app-identifier-start-with-letter": "Must start with a letter",
|
package/lib/locales/zh-CN.js
CHANGED
|
@@ -271,7 +271,11 @@ var zh_CN_default = {
|
|
|
271
271
|
"pisell-lowcode-navigation-menu-add-page": "添加页面",
|
|
272
272
|
"pisell-lowcode-navigation-menu-add-page-tip": "没有找到导航,请添加子菜单或页面。",
|
|
273
273
|
"pisell-lowcode-navigation-menu-tag-base": "基础",
|
|
274
|
+
"pisell-lowcode-navigation-menu-tag-proCode": "Pro code",
|
|
274
275
|
"pisell-lowcode-navigation-menu-tag-pisell1": "Pisell 1.0",
|
|
276
|
+
"pisell-lowcode-navigation-menu-tag-group": "分组",
|
|
277
|
+
"pisell-lowcode-navigation-menu-tag-sub-menu": "子菜单",
|
|
278
|
+
"pisell-lowcode-navigation-menu-tag-custom": "自定义",
|
|
275
279
|
// 应用标识符
|
|
276
280
|
"pisell-data-source-form-app-identifier-pattern": "只能包含小写字母、数字、连字符、点和下划线",
|
|
277
281
|
"pisell-data-source-form-app-identifier-start-with-letter": "必须以字母开头",
|
package/lib/locales/zh-TW.js
CHANGED
|
@@ -273,7 +273,11 @@ var zh_TW_default = {
|
|
|
273
273
|
"pisell-lowcode-navigation-menu-add-page": "添加頁面",
|
|
274
274
|
"pisell-lowcode-navigation-menu-add-page-tip": "沒有找到導航, 請添加子菜單或頁面。",
|
|
275
275
|
"pisell-lowcode-navigation-menu-tag-base": "基础",
|
|
276
|
+
"pisell-lowcode-navigation-menu-tag-proCode": "Pro code",
|
|
276
277
|
"pisell-lowcode-navigation-menu-tag-pisell1": "Pisell 1.0",
|
|
278
|
+
"pisell-lowcode-navigation-menu-tag-group": "分組",
|
|
279
|
+
"pisell-lowcode-navigation-menu-tag-sub-menu": "子菜單",
|
|
280
|
+
"pisell-lowcode-navigation-menu-tag-custom": "自定義",
|
|
277
281
|
// 应用标识符
|
|
278
282
|
"pisell-data-source-form-app-identifier-pattern": "只能包含小寫字母、數字、連字符、點和下劃線",
|
|
279
283
|
"pisell-data-source-form-app-identifier-start-with-letter": "必須以字母開頭",
|
package/lib/utils/index.d.ts
CHANGED
package/lib/utils/platform.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isMobile: () =>
|
|
1
|
+
export declare const isMobile: () => any;
|
package/lowcode/div/meta.ts
CHANGED
|
@@ -8,7 +8,7 @@ const DivMeta: ComponentMetadata = {
|
|
|
8
8
|
devMode: "proCode",
|
|
9
9
|
npm: {
|
|
10
10
|
package: "@pisell/materials",
|
|
11
|
-
version: "1.0.
|
|
11
|
+
version: "1.0.4",
|
|
12
12
|
exportName: "Div",
|
|
13
13
|
main: "src/index.tsx",
|
|
14
14
|
destructuring: true,
|
|
@@ -16,27 +16,62 @@ const DivMeta: ComponentMetadata = {
|
|
|
16
16
|
},
|
|
17
17
|
props: [
|
|
18
18
|
{
|
|
19
|
-
title: "
|
|
20
|
-
name: "
|
|
21
|
-
|
|
19
|
+
title: "基础类名",
|
|
20
|
+
name: "baseClassName",
|
|
21
|
+
propType: "string",
|
|
22
|
+
setter: ["StringSetter", "VariableSetter"]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
title: "自定义类名",
|
|
26
|
+
name: "className",
|
|
27
|
+
propType: "string",
|
|
28
|
+
setter: ["StringSetter", "VariableSetter"]
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
title: "渲染内容",
|
|
32
|
+
name: "render",
|
|
33
|
+
propType: "func",
|
|
34
|
+
setter: [
|
|
35
|
+
{
|
|
36
|
+
componentName: "FunctionSetter",
|
|
37
|
+
},
|
|
38
|
+
"VariableSetter",
|
|
39
|
+
],
|
|
22
40
|
},
|
|
41
|
+
{
|
|
42
|
+
title: "其他属性",
|
|
43
|
+
name: "others",
|
|
44
|
+
propType: "object",
|
|
45
|
+
setter: ["JsonSetter", "VariableSetter"]
|
|
46
|
+
}
|
|
23
47
|
],
|
|
24
48
|
configure: {
|
|
25
49
|
supports: {
|
|
26
50
|
style: true,
|
|
51
|
+
className: true,
|
|
27
52
|
events: [
|
|
28
53
|
{
|
|
29
54
|
name: "onClick",
|
|
30
55
|
template:
|
|
31
56
|
"onClick(event,${extParams}){\n// 点击时的回调\nconsole.log('onClick', event);}",
|
|
32
57
|
},
|
|
58
|
+
{
|
|
59
|
+
name: "onMouseEnter",
|
|
60
|
+
template: "onMouseEnter(event){\n// 鼠标进入时的回调\n}",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "onMouseLeave",
|
|
64
|
+
template: "onMouseLeave(event){\n// 鼠标离开时的回调\n}",
|
|
65
|
+
},
|
|
33
66
|
],
|
|
67
|
+
loop: true,
|
|
34
68
|
},
|
|
35
69
|
component: {
|
|
36
70
|
isContainer: true,
|
|
37
71
|
},
|
|
38
72
|
},
|
|
39
73
|
};
|
|
74
|
+
|
|
40
75
|
const snippets: Snippet[] = [
|
|
41
76
|
{
|
|
42
77
|
title: "Div",
|
|
@@ -41,6 +41,18 @@ const PisellNavigationMenuMeta = {
|
|
|
41
41
|
propType: 'string',
|
|
42
42
|
setter: 'PisellI18nSetter',
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
title: {
|
|
46
|
+
label: {
|
|
47
|
+
type: 'i18n',
|
|
48
|
+
'en-US': 'Can Drop',
|
|
49
|
+
'zh-CN': '是否可以拖拽',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
name: 'canDrop',
|
|
53
|
+
propType: 'function',
|
|
54
|
+
setter: 'FunctionSetter',
|
|
55
|
+
},
|
|
44
56
|
],
|
|
45
57
|
configure: {
|
|
46
58
|
component: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.34",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"swiper": "^8.4.7",
|
|
72
72
|
"react-barcode": "^1.5.3",
|
|
73
73
|
"vod-js-sdk-v6": "^1.4.11",
|
|
74
|
-
"@pisell/date-picker": "3.0.
|
|
75
|
-
"@pisell/utils": "
|
|
74
|
+
"@pisell/date-picker": "3.0.2",
|
|
75
|
+
"@pisell/utils": "3.0.0",
|
|
76
76
|
"@pisell/icon": "0.0.11"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Drawer } from 'antd';
|
|
2
|
-
import { OperationItem } from '../type';
|
|
3
|
-
declare const useDrawerState: (operationContent?: {
|
|
4
|
-
[key: string]: import("react").ReactNode;
|
|
5
|
-
} | undefined) => {
|
|
6
|
-
drawerVisible: boolean;
|
|
7
|
-
setDrawerVisible: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
8
|
-
openDrawer: (item: OperationItem) => void;
|
|
9
|
-
closeDrawer: () => void;
|
|
10
|
-
drawerContent: import("react").ReactNode;
|
|
11
|
-
Container: {
|
|
12
|
-
(props: import("../../../pisellModal").PisellModalProps): JSX.Element;
|
|
13
|
-
confirm: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
14
|
-
destroy: () => void;
|
|
15
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
16
|
-
};
|
|
17
|
-
info: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
18
|
-
destroy: () => void;
|
|
19
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
20
|
-
};
|
|
21
|
-
error: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
22
|
-
destroy: () => void;
|
|
23
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
24
|
-
};
|
|
25
|
-
warn: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => any;
|
|
26
|
-
warning: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
27
|
-
destroy: () => void;
|
|
28
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
29
|
-
};
|
|
30
|
-
success: (props: import("../../../pisellModal/components/functions").PisellModalFuncProps) => {
|
|
31
|
-
destroy: () => void;
|
|
32
|
-
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
|
33
|
-
};
|
|
34
|
-
Information: (props: import("../../../pisellModal/components/Information").InformationProps) => JSX.Element;
|
|
35
|
-
} | typeof Drawer;
|
|
36
|
-
containerProps: {};
|
|
37
|
-
};
|
|
38
|
-
export default useDrawerState;
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ColumnType } from 'antd/es/table';
|
|
3
|
-
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
4
|
-
export declare type OperationItem = {
|
|
5
|
-
label?: string;
|
|
6
|
-
openMode: 'modal' | 'drawer' | 'custom';
|
|
7
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
8
|
-
openTitle: string;
|
|
9
|
-
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
10
|
-
key: string;
|
|
11
|
-
buttonProps?: any;
|
|
12
|
-
onClick?: (record: any) => void;
|
|
13
|
-
};
|
|
14
|
-
export interface DataSourceTableProps {
|
|
15
|
-
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
16
|
-
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
17
|
-
titleButtons?: {
|
|
18
|
-
show: boolean;
|
|
19
|
-
maxCount: number;
|
|
20
|
-
items: OperationItem[];
|
|
21
|
-
};
|
|
22
|
-
tableButtons?: {
|
|
23
|
-
show: boolean;
|
|
24
|
-
maxCount: number;
|
|
25
|
-
items: OperationItem[];
|
|
26
|
-
};
|
|
27
|
-
buttons?: any[];
|
|
28
|
-
operation?: {
|
|
29
|
-
show: boolean;
|
|
30
|
-
title: string;
|
|
31
|
-
width: number;
|
|
32
|
-
align: 'left' | 'center' | 'right';
|
|
33
|
-
fixed: 'left' | 'right' | false;
|
|
34
|
-
type: 'link' | 'button';
|
|
35
|
-
items: OperationItem[];
|
|
36
|
-
};
|
|
37
|
-
operationContent?: {
|
|
38
|
-
[key: string]: React.ReactNode;
|
|
39
|
-
};
|
|
40
|
-
dataSource: DataSourceType;
|
|
41
|
-
columns: ColumnType<any>[];
|
|
42
|
-
filter: any;
|
|
43
|
-
search?: {
|
|
44
|
-
show: boolean;
|
|
45
|
-
placeholder: string;
|
|
46
|
-
};
|
|
47
|
-
__designMode: string;
|
|
48
|
-
componentId: string;
|
|
49
|
-
clickToDetail?: {
|
|
50
|
-
show: boolean;
|
|
51
|
-
useCustomAction: boolean;
|
|
52
|
-
actionType: string;
|
|
53
|
-
openMode: 'modal' | 'drawer';
|
|
54
|
-
openContentSize: 'small' | 'middle' | 'large';
|
|
55
|
-
openTitle: string;
|
|
56
|
-
key: string;
|
|
57
|
-
};
|
|
58
|
-
onRow?: any;
|
|
59
|
-
filterBy?: Record<string, any>;
|
|
60
|
-
sortBy: string;
|
|
61
|
-
tabs?: {
|
|
62
|
-
show: boolean;
|
|
63
|
-
type: string;
|
|
64
|
-
items: {
|
|
65
|
-
name: string;
|
|
66
|
-
filterBy: Record<string, any>;
|
|
67
|
-
sortBy: string;
|
|
68
|
-
}[];
|
|
69
|
-
};
|
|
70
|
-
onValuesChange?: (changedValues: any, values: any) => void;
|
|
71
|
-
extraParams?: {
|
|
72
|
-
list?: Record<string, any>;
|
|
73
|
-
get?: Record<string, any>;
|
|
74
|
-
update?: Record<string, any>;
|
|
75
|
-
create?: Record<string, any>;
|
|
76
|
-
destroy?: Record<string, any>;
|
|
77
|
-
};
|
|
78
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { UniqueIdentifier } from '@dnd-kit/core';
|
|
3
|
-
import { Props as TreeItemProps } from './TreeItem';
|
|
4
|
-
interface Props extends TreeItemProps {
|
|
5
|
-
id: UniqueIdentifier;
|
|
6
|
-
__designMode?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare function SortableTreeItem({ id, depth, ...props }: Props): JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import React, { HTMLAttributes } from 'react';
|
|
2
|
-
import type { TreeItem as TreeItemType } from '../../types';
|
|
3
|
-
import './TreeItem.less';
|
|
4
|
-
export interface Props extends Omit<HTMLAttributes<HTMLLIElement>, 'id'> {
|
|
5
|
-
childCount?: number;
|
|
6
|
-
clone?: boolean;
|
|
7
|
-
collapsed?: boolean;
|
|
8
|
-
depth: number;
|
|
9
|
-
disableInteraction?: boolean;
|
|
10
|
-
disableSelection?: boolean;
|
|
11
|
-
ghost?: boolean;
|
|
12
|
-
handleProps?: any;
|
|
13
|
-
indicator?: boolean;
|
|
14
|
-
indentationWidth: number;
|
|
15
|
-
onCollapse?(): void;
|
|
16
|
-
onRemove?(): void;
|
|
17
|
-
wrapperRef?(node: HTMLLIElement): void;
|
|
18
|
-
item: TreeItemType;
|
|
19
|
-
renderItem?(item: Props, ref: React.ForwardedRef<HTMLDivElement>): React.ReactNode;
|
|
20
|
-
__designMode?: string;
|
|
21
|
-
isBlocked?: boolean;
|
|
22
|
-
}
|
|
23
|
-
export declare const TreeItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 可拖拽树形组件
|
|
3
|
-
* 基于@dnd-kit库实现,支持拖拽排序、展开折叠、删除等功能
|
|
4
|
-
*/
|
|
5
|
-
import React from 'react';
|
|
6
|
-
import type { TreeItem, TreeItems } from './types';
|
|
7
|
-
import type { Props as TreeItemProps } from './components/TreeItem/TreeItem';
|
|
8
|
-
interface Props {
|
|
9
|
-
/** 是否支持折叠功能 */
|
|
10
|
-
collapsible?: boolean;
|
|
11
|
-
/** 初始树形数据,默认使用 initialItems */
|
|
12
|
-
value?: TreeItems;
|
|
13
|
-
/** 缩进宽度,控制子节点的缩进距离 */
|
|
14
|
-
indentationWidth?: number;
|
|
15
|
-
/** 是否显示拖拽指示器 */
|
|
16
|
-
indicator?: boolean;
|
|
17
|
-
/** 是否支持删除节点功能 */
|
|
18
|
-
removable?: boolean;
|
|
19
|
-
/** 自定义渲染树节点 */
|
|
20
|
-
renderItem?: (item: TreeItemProps, ref: React.RefObject<HTMLDivElement>) => React.ReactNode;
|
|
21
|
-
/** 树形数据变化回调 */
|
|
22
|
-
onChange?: (items: TreeItems) => void;
|
|
23
|
-
/** 删除节点前 */
|
|
24
|
-
onRemoveBefore?: (item: TreeItem) => Promise<boolean>;
|
|
25
|
-
/** 设计模式 */
|
|
26
|
-
__designMode?: string;
|
|
27
|
-
/** 最大层级 */
|
|
28
|
-
maxLevel?: number;
|
|
29
|
-
}
|
|
30
|
-
export declare function SortableTree({ collapsible, value, indicator, indentationWidth, removable, renderItem, onChange, onRemoveBefore, __designMode, maxLevel, }: Props): JSX.Element;
|
|
31
|
-
declare const Demo: (props: Props) => JSX.Element;
|
|
32
|
-
export default Demo;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { Props as TreeItem } from '../../../pisellDraggable/components/TreeItem/TreeItem';
|
|
3
|
-
import './index.less';
|
|
4
|
-
interface SortableItemProps {
|
|
5
|
-
itemProps: TreeItem;
|
|
6
|
-
render?: (itemProps: TreeItem) => React.ReactNode;
|
|
7
|
-
domRef: React.RefObject<HTMLDivElement>;
|
|
8
|
-
allowAddChild?: boolean;
|
|
9
|
-
allowDelete?: boolean;
|
|
10
|
-
allowDrag?: boolean;
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
onAdd?: (itemProps: TreeItem) => void;
|
|
13
|
-
onDelete?: (itemProps: TreeItem) => void;
|
|
14
|
-
showBorder?: boolean;
|
|
15
|
-
spacing?: number;
|
|
16
|
-
maxLevel?: number;
|
|
17
|
-
/** 设计模式 */
|
|
18
|
-
__designMode?: string;
|
|
19
|
-
/** 是否自定义操作 */
|
|
20
|
-
isCustomAction?: boolean;
|
|
21
|
-
/** 获取item样式 */
|
|
22
|
-
getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
|
|
23
|
-
}
|
|
24
|
-
declare const SortableItem: (props: SortableItemProps) => JSX.Element;
|
|
25
|
-
export default SortableItem;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
import type { Props as TreeItem } from '../pisellDraggable/components/TreeItem/TreeItem';
|
|
3
|
-
import type { TreeItem as TreeItemType } from '../pisellDraggable/types';
|
|
4
|
-
export interface DropSortItem extends TreeItemType {
|
|
5
|
-
[key: string]: any;
|
|
6
|
-
}
|
|
7
|
-
export interface PisellDropSortProps {
|
|
8
|
-
/** value */
|
|
9
|
-
value: DropSortItem[];
|
|
10
|
-
/** 允许拖拽 */
|
|
11
|
-
allowDrag?: boolean;
|
|
12
|
-
/** 允许删除 */
|
|
13
|
-
allowDelete?: boolean;
|
|
14
|
-
/** 允许添加子节点 */
|
|
15
|
-
allowAddChild?: boolean;
|
|
16
|
-
/** 允许添加根节点 */
|
|
17
|
-
allowAddRoot?: boolean;
|
|
18
|
-
/** 是否禁用 */
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
/** 节点间距 */
|
|
21
|
-
spacing?: number;
|
|
22
|
-
/** 最大层级数 */
|
|
23
|
-
maxLevel?: number;
|
|
24
|
-
/** 是否显示边框 */
|
|
25
|
-
showBorder?: boolean;
|
|
26
|
-
/** 样式 */
|
|
27
|
-
style?: CSSProperties;
|
|
28
|
-
/** 类名 */
|
|
29
|
-
className?: string;
|
|
30
|
-
/** 数据源变化回调 */
|
|
31
|
-
onChange?: (items: DropSortItem[]) => void;
|
|
32
|
-
/** 删除节点回调 */
|
|
33
|
-
onDelete?: (itemProps: TreeItem) => void;
|
|
34
|
-
/** 添加节点回调 */
|
|
35
|
-
onAdd?: (itemProps: TreeItem) => void;
|
|
36
|
-
/** 自定义渲染节点 */
|
|
37
|
-
renderItem?: (itemProps: TreeItem) => React.ReactNode;
|
|
38
|
-
/** 添加根节点回调 */
|
|
39
|
-
onAddRoot?: () => void;
|
|
40
|
-
/** 左侧自定义内容 */
|
|
41
|
-
leftContent?: React.ReactNode;
|
|
42
|
-
/** 右侧自定义内容 */
|
|
43
|
-
rightContent?: React.ReactNode;
|
|
44
|
-
/** 空状态自定义内容 */
|
|
45
|
-
emptyContent?: React.ReactNode;
|
|
46
|
-
/** 设计模式 */
|
|
47
|
-
__designMode?: string;
|
|
48
|
-
/** 是否自定义操作 */
|
|
49
|
-
isCustomAction?: boolean;
|
|
50
|
-
/** 获取item样式 */
|
|
51
|
-
getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
|
|
52
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import './PisellMenu.less';
|
|
3
|
-
import type { PisellMenuProps } from './types';
|
|
4
|
-
declare const PisellMenu: {
|
|
5
|
-
({ className, style, mode, theme, defaultOpenKeys, defaultSelectedKeys, inlineCollapsed, openKeys, selectedKeys, onOpenChange, onSelect, dataSource, __designMode, children, other, ...restProps }: PisellMenuProps): JSX.Element;
|
|
6
|
-
Item: Omit<React.FunctionComponent<import("antd").MenuItemProps>, ""> & (<T extends import("antd").MenuItemProps>(props: T extends infer U extends import("antd").MenuItemProps ? unknown extends U ? import("antd").MenuItemProps : U : import("antd").MenuItemProps, context?: any) => React.ReactElement<any, any> | null);
|
|
7
|
-
SubMenu: React.FC<import("antd").SubMenuProps>;
|
|
8
|
-
};
|
|
9
|
-
export default PisellMenu;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import type { MenuProps } from 'antd';
|
|
3
|
-
export interface PisellMenuProps extends Omit<MenuProps, 'items'> {
|
|
4
|
-
className?: string;
|
|
5
|
-
style?: React.CSSProperties;
|
|
6
|
-
mode?: 'vertical' | 'horizontal' | 'inline';
|
|
7
|
-
theme?: 'light' | 'dark';
|
|
8
|
-
defaultOpenKeys?: string[];
|
|
9
|
-
defaultSelectedKeys?: string[];
|
|
10
|
-
inlineCollapsed?: boolean;
|
|
11
|
-
openKeys?: string[];
|
|
12
|
-
selectedKeys?: string[];
|
|
13
|
-
onOpenChange?: (openKeys: string[]) => void;
|
|
14
|
-
dataSource?: any;
|
|
15
|
-
__designMode?: string;
|
|
16
|
-
other?: PisellMenuProps;
|
|
17
|
-
}
|
|
18
|
-
export interface MenuItemType {
|
|
19
|
-
key: string;
|
|
20
|
-
label: string;
|
|
21
|
-
path: string;
|
|
22
|
-
children?: MenuItemType[];
|
|
23
|
-
icon?: string | React.ReactNode;
|
|
24
|
-
hide?: boolean;
|
|
25
|
-
type?: 'group' | 'divider';
|
|
26
|
-
}
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
2
|
-
export interface NavigationMenuItem {
|
|
3
|
-
id: string;
|
|
4
|
-
/** 标题 */
|
|
5
|
-
title: string;
|
|
6
|
-
/** 图标 */
|
|
7
|
-
icon?: string;
|
|
8
|
-
/** 描述 */
|
|
9
|
-
description?: string;
|
|
10
|
-
/** 子菜单 */
|
|
11
|
-
children?: NavigationMenuItem[];
|
|
12
|
-
/** 版本 */
|
|
13
|
-
version?: string;
|
|
14
|
-
/** 是否是分组 */
|
|
15
|
-
isGroup?: boolean;
|
|
16
|
-
/** 是否允许添加子菜单 */
|
|
17
|
-
allowAddChild?: boolean;
|
|
18
|
-
/** 是否允许删除 */
|
|
19
|
-
allowDelete?: boolean;
|
|
20
|
-
/** 是否允许编辑 */
|
|
21
|
-
allowEdit?: boolean;
|
|
22
|
-
/** 是否允许添加子菜单 */
|
|
23
|
-
allowAddSubmenu?: boolean;
|
|
24
|
-
/** 是否允许添加页面 */
|
|
25
|
-
allowAddPage?: boolean;
|
|
26
|
-
/** 其他属性 */
|
|
27
|
-
[key: string]: any;
|
|
28
|
-
}
|
|
29
|
-
export interface PisellNavigationMenuProps {
|
|
30
|
-
/** 导航菜单数据 */
|
|
31
|
-
value: NavigationMenuItem[];
|
|
32
|
-
/** 是否允许拖拽排序 */
|
|
33
|
-
allowDrag?: boolean;
|
|
34
|
-
/** 是否允许删除菜单项 */
|
|
35
|
-
allowDelete?: boolean;
|
|
36
|
-
/** 是否允许添加子菜单 */
|
|
37
|
-
allowAddChild?: boolean;
|
|
38
|
-
/** 是否允许添加根菜单 */
|
|
39
|
-
allowAddRoot?: boolean;
|
|
40
|
-
/** 是否禁用 */
|
|
41
|
-
disabled?: boolean;
|
|
42
|
-
/** 菜单项间距 */
|
|
43
|
-
spacing?: number;
|
|
44
|
-
/** 最大层级数 */
|
|
45
|
-
maxLevel?: number;
|
|
46
|
-
/** 样式 */
|
|
47
|
-
style?: CSSProperties;
|
|
48
|
-
/** 类名 */
|
|
49
|
-
className?: string;
|
|
50
|
-
/** 数据变化回调 */
|
|
51
|
-
onChange?: (items: NavigationMenuItem[]) => void;
|
|
52
|
-
/** 设计模式 */
|
|
53
|
-
__designMode?: string;
|
|
54
|
-
/** 标题 */
|
|
55
|
-
title?: string;
|
|
56
|
-
/** 添加子菜单回调 */
|
|
57
|
-
onAddSubMenu?: (item?: NavigationMenuItem) => void;
|
|
58
|
-
/** 添加页面回调 */
|
|
59
|
-
onAddPage?: (item?: NavigationMenuItem) => void;
|
|
60
|
-
/** 编辑回调 */
|
|
61
|
-
onEdit?: (item: NavigationMenuItem) => void;
|
|
62
|
-
/** 删除回调 */
|
|
63
|
-
onDelete?: (item: NavigationMenuItem) => void;
|
|
64
|
-
}
|