@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.
Files changed (121) hide show
  1. package/build/lowcode/assets-daily.json +11 -11
  2. package/build/lowcode/assets-dev.json +2 -2
  3. package/build/lowcode/assets-prod.json +11 -11
  4. package/build/lowcode/index.js +1 -1
  5. package/build/lowcode/meta.js +2 -2
  6. package/build/lowcode/preview.js +9 -9
  7. package/build/lowcode/render/default/view.css +1 -1
  8. package/build/lowcode/render/default/view.js +24 -24
  9. package/build/lowcode/view.css +1 -1
  10. package/build/lowcode/view.js +25 -25
  11. package/es/components/buttonGroupEdit/index.d.ts +8 -0
  12. package/es/components/dataSourceComponents/dataSourceMenu/Basic.js +6 -2
  13. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  14. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  15. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  16. package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +1 -1
  17. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  18. package/es/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +4 -12
  19. package/es/components/dataSourceComponents/fields/utils.js +0 -5
  20. package/es/components/div/index.js +45 -8
  21. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -3
  22. package/es/components/pisellDraggable/components/TreeItem/index.js +1 -1
  23. package/es/components/pisellDraggable/index.js +165 -127
  24. package/es/components/pisellDropSort/PisellDropSort.js +10 -3
  25. package/es/components/pisellDropSort/components/SortableItem/index.js +6 -1
  26. package/es/components/pisellDropSort/components/SortableItem/index.less +0 -1
  27. package/es/components/pisellMenu/PisellMenu.js +1 -0
  28. package/es/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  29. package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +79 -11
  30. package/es/components/pisellNavigationMenu/PisellNavigationMenu.less +14 -0
  31. package/es/components/productCard/components/MultiDay/index.d.ts +3 -0
  32. package/es/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  33. package/es/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  34. package/es/components/productCard/components/Packages/utils.d.ts +1 -1
  35. package/es/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  36. package/es/components/table/Table/SelectField/index.d.ts +1 -0
  37. package/es/components/table/Table/fields/index.d.ts +3 -2
  38. package/es/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  39. package/es/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  40. package/es/components/table/Table/utils.d.ts +1 -1
  41. package/es/locales/en-US.js +4 -0
  42. package/es/locales/zh-CN.js +4 -0
  43. package/es/locales/zh-TW.js +4 -0
  44. package/es/utils/index.d.ts +1 -1
  45. package/es/utils/platform.d.ts +1 -1
  46. package/lib/components/buttonGroupEdit/index.d.ts +8 -0
  47. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.js +6 -2
  48. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDataSourceKey.d.ts +2 -2
  49. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +4 -4
  50. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.d.ts +32 -0
  51. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableQuery.js +1 -1
  52. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.d.ts +5 -0
  53. package/lib/components/dataSourceComponents/fields/DatePicker/ReadPretty.js +7 -15
  54. package/lib/components/dataSourceComponents/fields/utils.js +0 -5
  55. package/lib/components/div/index.js +33 -3
  56. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.js +4 -7
  57. package/lib/components/pisellDraggable/components/TreeItem/index.js +12 -2
  58. package/lib/components/pisellDraggable/index.js +114 -80
  59. package/lib/components/pisellDropSort/PisellDropSort.js +9 -3
  60. package/lib/components/pisellDropSort/components/SortableItem/index.js +5 -0
  61. package/lib/components/pisellDropSort/components/SortableItem/index.less +0 -1
  62. package/lib/components/pisellMenu/PisellMenu.js +1 -0
  63. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.d.ts +5 -0
  64. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +64 -9
  65. package/lib/components/pisellNavigationMenu/PisellNavigationMenu.less +14 -0
  66. package/lib/components/productCard/components/MultiDay/index.d.ts +3 -0
  67. package/lib/components/productCard/components/Packages/components/collapsibleList/utils.d.ts +1 -0
  68. package/lib/components/productCard/components/Packages/components/options/index.d.ts +3 -0
  69. package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
  70. package/lib/components/table/Gallery/components/VirtualGrid/useGapSize.d.ts +2 -2
  71. package/lib/components/table/Table/SelectField/index.d.ts +1 -0
  72. package/lib/components/table/Table/fields/index.d.ts +3 -2
  73. package/lib/components/table/Table/fields/select/filterUtil/index.d.ts +1 -1
  74. package/lib/components/table/Table/fields/treeSelect/filterUtil/index.d.ts +1 -1
  75. package/lib/components/table/Table/utils.d.ts +1 -1
  76. package/lib/locales/en-US.js +4 -0
  77. package/lib/locales/zh-CN.js +4 -0
  78. package/lib/locales/zh-TW.js +4 -0
  79. package/lib/utils/index.d.ts +1 -1
  80. package/lib/utils/platform.d.ts +1 -1
  81. package/lowcode/div/meta.ts +39 -4
  82. package/lowcode/pisell-navigation-menu/meta.ts +12 -0
  83. package/package.json +3 -3
  84. package/es/components/appVersionControl/index.d.ts +0 -4
  85. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
  86. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
  87. package/es/components/div/index.d.ts +0 -8
  88. package/es/components/drag-sort-tree/index.d.ts +0 -4
  89. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  90. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -23
  91. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  92. package/es/components/pisellDraggable/index.d.ts +0 -32
  93. package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  94. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -25
  95. package/es/components/pisellDropSort/types.d.ts +0 -52
  96. package/es/components/pisellMenu/PisellMenu.d.ts +0 -9
  97. package/es/components/pisellMenu/types.d.ts +0 -26
  98. package/es/components/pisellNavigationMenu/types.d.ts +0 -64
  99. package/es/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  100. package/es/components/table/Table/index.d.ts +0 -4
  101. package/es/components/table/types.d.ts +0 -251
  102. package/es/components/versionModal/index.d.ts +0 -23
  103. package/lib/components/appVersionControl/index.d.ts +0 -4
  104. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +0 -38
  105. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +0 -78
  106. package/lib/components/div/index.d.ts +0 -8
  107. package/lib/components/drag-sort-tree/index.d.ts +0 -4
  108. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  109. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -23
  110. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  111. package/lib/components/pisellDraggable/index.d.ts +0 -32
  112. package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  113. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -25
  114. package/lib/components/pisellDropSort/types.d.ts +0 -52
  115. package/lib/components/pisellMenu/PisellMenu.d.ts +0 -9
  116. package/lib/components/pisellMenu/types.d.ts +0 -26
  117. package/lib/components/pisellNavigationMenu/types.d.ts +0 -64
  118. package/lib/components/table/Actions/component/ExportImport/index.d.ts +0 -7
  119. package/lib/components/table/Table/index.d.ts +0 -4
  120. package/lib/components/table/types.d.ts +0 -251
  121. 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) => string | number;
20
+ export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => any;
@@ -1,5 +1,5 @@
1
1
  declare const useGapSize: (gap: number | number[]) => {
2
- horizontal: number;
3
- vertical: number;
2
+ horizontal: any;
3
+ vertical: any;
4
4
  };
5
5
  export default useGapSize;
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const SelectField: () => JSX.Element;
2
3
  export default SelectField;
@@ -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: boolean;
201
+ default_value: string;
201
202
  } | {
202
203
  field_icon: string;
203
204
  field_name: string;
204
205
  field_type: string;
205
- default_value: string;
206
+ default_value: boolean;
206
207
  } | {
207
208
  field_icon: string;
208
209
  field_name: string;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -2,4 +2,4 @@ export default function ({ value, key, item, }: {
2
2
  value: string | string[] | Record<string, any>[];
3
3
  key: string | string[];
4
4
  item: Record<string, any>;
5
- }): boolean;
5
+ }): any;
@@ -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
- }) => ("column_setting" | "gallery_setting" | "order_by" | "group_by" | "view_mode" | "filter_setting")[];
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 {};
@@ -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",
@@ -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": "必须以字母开头",
@@ -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": "必須以字母開頭",
@@ -1,4 +1,4 @@
1
1
  export declare const isBrowser: boolean;
2
- export declare const getCssNumber: (val: string | number) => string;
2
+ export declare const getCssNumber: (val: string | number) => string | number;
3
3
  export declare function uuid(): string;
4
4
  export * from './mergeWith';
@@ -1 +1 @@
1
- export declare const isMobile: () => boolean;
1
+ export declare const isMobile: () => any;
@@ -8,7 +8,7 @@ const DivMeta: ComponentMetadata = {
8
8
  devMode: "proCode",
9
9
  npm: {
10
10
  package: "@pisell/materials",
11
- version: "1.0.3",
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: "others",
20
- name: "others",
21
- setter: ["JsonSetter","VariableSetter"],
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.32",
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.4",
75
- "@pisell/utils": "1.0.44",
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,4 +0,0 @@
1
- import { AppVersionControlProps } from './types';
2
- import './index.less';
3
- declare const AppVersionControl: (props: AppVersionControlProps) => JSX.Element;
4
- export default AppVersionControl;
@@ -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,8 +0,0 @@
1
- import React from "react";
2
- export interface DivProps {
3
- children?: React.ReactNode;
4
- style?: React.CSSProperties;
5
- others?: any;
6
- }
7
- declare const Div: (props: DivProps) => JSX.Element;
8
- export default Div;
@@ -1,4 +0,0 @@
1
- import './index.less';
2
- import { SortType } from './types';
3
- declare const DragSortTree: (props: SortType) => JSX.Element;
4
- export default DragSortTree;
@@ -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,2 +0,0 @@
1
- export { TreeItem } from './TreeItem';
2
- export { SortableTreeItem } from './SortableTreeItem';
@@ -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,5 +0,0 @@
1
- import React from 'react';
2
- import { PisellDropSortProps } from './types';
3
- import './PisellDropSort.less';
4
- declare const PisellDropSort: React.FC<PisellDropSortProps>;
5
- export default PisellDropSort;
@@ -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
- }
@@ -1,7 +0,0 @@
1
- import { ExportImportType } from '../../../types';
2
- import './index.less';
3
- declare type ExportImportProps = {
4
- exportImport: ExportImportType;
5
- };
6
- declare const ExportImport: ({ exportImport }: ExportImportProps) => JSX.Element;
7
- export default ExportImport;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import './index.less';
3
- declare const _default: React.NamedExoticComponent<any>;
4
- export default _default;