@pisell/materials 3.3.41 → 3.3.43

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 (132) 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 +146 -146
  7. package/build/lowcode/render/default/view.js +24 -24
  8. package/build/lowcode/view.js +30 -30
  9. package/dist/umd/materials.min.css +1 -0
  10. package/dist/umd/materials.min.js +1 -0
  11. package/dist/umd/static/DotsSix.57d66266.svg +1 -0
  12. package/dist/umd/static/arrow-left.e542294f.svg +1 -0
  13. package/dist/umd/static/arrow-right.763f03e0.svg +1 -0
  14. package/dist/umd/static/filter-lines.04a54ae9.svg +1 -0
  15. package/dist/umd/static/help-circle.31c9be40.svg +1 -0
  16. package/dist/umd/static/switch-vertical-01.7ebe3ba8.svg +1 -0
  17. package/es/components/DragSortList/index.js +6 -6
  18. package/es/components/appVersionControl/index.d.ts +4 -0
  19. package/es/components/classicLayout/index.js +5 -4
  20. package/es/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  21. package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  22. package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  23. package/es/components/dataSourceComponents/fields/index.d.ts +6 -6
  24. package/es/components/date-picker/index.d.ts +0 -1
  25. package/es/components/drag-sort-tree/index.d.ts +4 -0
  26. package/es/components/icon/index.js +5 -5
  27. package/es/components/list/index.js +6 -6
  28. package/es/components/page/index.d.ts +0 -1
  29. package/es/components/pisell-config-provider/index.d.ts +12 -0
  30. package/es/components/pisellAdjustPrice/index.d.ts +9 -0
  31. package/es/components/pisellEmpty/index.d.ts +19 -0
  32. package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  33. package/es/components/productCard/components/Warning/index.d.ts +7 -0
  34. package/es/components/productCard/components/Warning/index.js +48 -0
  35. package/es/components/productCard/index.js +8 -8
  36. package/es/components/productCard/locales.d.ts +84 -0
  37. package/es/components/productCard/locales.js +6 -3
  38. package/es/components/productCard/status.d.ts +32 -0
  39. package/es/components/productCard/status.js +3 -1
  40. package/es/components/productCard/types.d.ts +84 -0
  41. package/es/components/qrcode/index.js +1 -1
  42. package/es/components/sort/components/InlineMenu/index.js +1 -1
  43. package/es/components/table/Actions/component/ButtonIcon/index.js +5 -5
  44. package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  45. package/es/components/table/Actions/component/ViewMode/index.js +1 -1
  46. package/es/components/table/Gallery/components/GalleryItem/components/RenderFields/index.js +5 -4
  47. package/es/components/table/Header/Buttons/index.js +5 -5
  48. package/es/components/table/Table/AddFieldModal/index.js +6 -6
  49. package/es/components/table/Table/SelectField/index.js +4 -4
  50. package/es/components/table/Table/fields/date/Edit/index.js +1 -1
  51. package/es/components/table/Table/fields/link/Edit/index.js +5 -5
  52. package/es/components/table/Table/fields/rangePicker/filterUtil/index.js +1 -1
  53. package/es/components/table/Table/fields/search/filterUtil/index.js +1 -0
  54. package/es/components/table/Table/fields/text/Show/index.js +4 -4
  55. package/es/components/table/Table/fields/text/filterUtil/index.js +1 -0
  56. package/es/components/table/Table/index.d.ts +4 -0
  57. package/es/components/table/Table/tableConfig/SortRow/index.js +2 -2
  58. package/es/components/table/Table/tableConfig/body/CellContent/index.js +3 -3
  59. package/es/components/table/Table/tableConfig/body/CellProvider/index.js +8 -8
  60. package/es/components/table/Table/utils.d.ts +1 -1
  61. package/es/components/table/hooks/useMergeColumnSetting.js +2 -1
  62. package/es/components/table/hooks/useTransDataSourceGroupSetting.js +5 -5
  63. package/es/components/table/hooks/useTransFilterSetting.js +5 -5
  64. package/es/components/table/types.d.ts +251 -0
  65. package/es/components/translation/utils.js +5 -5
  66. package/es/components/versionModal/index.d.ts +23 -0
  67. package/es/components/virtual-keyboard/Amount/index.d.ts +22 -0
  68. package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  69. package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  70. package/es/hooks/useResponsive.js +2 -2
  71. package/es/utils/hoc.js +1 -1
  72. package/es/utils/miniRedux.js +9 -8
  73. package/lib/components/appVersionControl/index.d.ts +4 -0
  74. package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDrawerState.d.ts +38 -0
  75. package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +78 -0
  76. package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +24 -0
  77. package/lib/components/dataSourceComponents/fields/index.d.ts +6 -6
  78. package/lib/components/date-picker/index.d.ts +0 -1
  79. package/lib/components/drag-sort-tree/index.d.ts +4 -0
  80. package/lib/components/lowCodePage/index.js +2 -1
  81. package/lib/components/page/index.d.ts +0 -1
  82. package/lib/components/pisell-config-provider/index.d.ts +12 -0
  83. package/lib/components/pisellAdjustPrice/index.d.ts +9 -0
  84. package/lib/components/pisellEmpty/index.d.ts +19 -0
  85. package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
  86. package/lib/components/productCard/components/Warning/index.d.ts +7 -0
  87. package/lib/components/productCard/components/Warning/index.js +68 -0
  88. package/lib/components/productCard/index.js +4 -11
  89. package/lib/components/productCard/locales.d.ts +84 -0
  90. package/lib/components/productCard/locales.js +6 -3
  91. package/lib/components/productCard/status.d.ts +32 -0
  92. package/lib/components/productCard/status.js +3 -1
  93. package/lib/components/productCard/types.d.ts +84 -0
  94. package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
  95. package/lib/components/table/Table/fields/date/filterUtil/index.js +6 -3
  96. package/lib/components/table/Table/fields/rangePicker/filterUtil/index.js +8 -4
  97. package/lib/components/table/Table/fields/utils/index.js +2 -1
  98. package/lib/components/table/Table/index.d.ts +4 -0
  99. package/lib/components/table/Table/utils.d.ts +1 -1
  100. package/lib/components/table/types.d.ts +251 -0
  101. package/lib/components/versionModal/index.d.ts +23 -0
  102. package/lib/components/virtual-keyboard/Amount/index.d.ts +22 -0
  103. package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
  104. package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +11 -0
  105. package/lib/hooks/useResponsive.js +6 -3
  106. package/package.json +3 -3
  107. package/es/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  108. package/es/components/div/index.d.ts +0 -19
  109. package/es/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  110. package/es/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  111. package/es/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  112. package/es/components/pisellDraggable/index.d.ts +0 -35
  113. package/es/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  114. package/es/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  115. package/es/components/pisellDropSort/types.d.ts +0 -58
  116. package/es/components/pisellMenu/PisellMenu.d.ts +0 -11
  117. package/es/components/pisellMenu/types.d.ts +0 -27
  118. package/es/components/pisellNavigationMenu/types.d.ts +0 -85
  119. package/es/components/walletCard/Guide/index.d.ts +0 -3
  120. package/lib/components/dataSourceComponents/dataSourceMenu/Basic.d.ts +0 -8
  121. package/lib/components/div/index.d.ts +0 -19
  122. package/lib/components/pisellDraggable/components/TreeItem/SortableTreeItem.d.ts +0 -9
  123. package/lib/components/pisellDraggable/components/TreeItem/TreeItem.d.ts +0 -24
  124. package/lib/components/pisellDraggable/components/TreeItem/index.d.ts +0 -2
  125. package/lib/components/pisellDraggable/index.d.ts +0 -35
  126. package/lib/components/pisellDropSort/PisellDropSort.d.ts +0 -5
  127. package/lib/components/pisellDropSort/components/SortableItem/index.d.ts +0 -26
  128. package/lib/components/pisellDropSort/types.d.ts +0 -58
  129. package/lib/components/pisellMenu/PisellMenu.d.ts +0 -11
  130. package/lib/components/pisellMenu/types.d.ts +0 -27
  131. package/lib/components/pisellNavigationMenu/types.d.ts +0 -85
  132. package/lib/components/walletCard/Guide/index.d.ts +0 -3
@@ -40,14 +40,17 @@ function filterUtil_default({
40
40
  key,
41
41
  item
42
42
  }) {
43
- if (!value) return true;
43
+ if (!value)
44
+ return true;
44
45
  const valueDayjsObj = (0, import_dayjs.default)(value);
45
46
  if (!valueDayjsObj.isValid()) {
46
47
  return true;
47
48
  }
48
49
  const dataValue = (0, import_utils2.getValueByKeys)(item, key);
49
- if ((0, import_utils.isUndefined)(dataValue)) return false;
50
+ if ((0, import_utils.isUndefined)(dataValue))
51
+ return false;
50
52
  const dataDayjsObj = (0, import_dayjs.default)(dataValue);
51
- if (!dataDayjsObj.isValid()) return false;
53
+ if (!dataDayjsObj.isValid())
54
+ return false;
52
55
  return dataDayjsObj.isSame(valueDayjsObj, "day");
53
56
  }
@@ -43,15 +43,19 @@ function filterUtil_default({
43
43
  key,
44
44
  item
45
45
  }) {
46
- if (!value) return true;
47
- if ((value == null ? void 0 : value.length) !== 2) return true;
46
+ if (!value)
47
+ return true;
48
+ if ((value == null ? void 0 : value.length) !== 2)
49
+ return true;
48
50
  const valueDayjsObj = value.map((item2) => (0, import_dayjs.default)(item2 || ""));
49
51
  if (valueDayjsObj.some((item2) => !item2.isValid())) {
50
52
  return true;
51
53
  }
52
54
  const dataValue = (0, import_utils2.getValueByKeys)(item, key);
53
- if ((0, import_utils.isUndefined)(dataValue)) return false;
55
+ if ((0, import_utils.isUndefined)(dataValue))
56
+ return false;
54
57
  const dataDayjsObj = (0, import_dayjs.default)(dataValue);
55
- if (!dataDayjsObj.isValid()) return false;
58
+ if (!dataDayjsObj.isValid())
59
+ return false;
56
60
  return isDateInRange(dataDayjsObj, valueDayjsObj);
57
61
  }
@@ -25,7 +25,8 @@ module.exports = __toCommonJS(utils_exports);
25
25
  var import_utils = require("@pisell/utils");
26
26
  var getValueByKeys = (obj, keys) => {
27
27
  var _a;
28
- if (!keys) return keys;
28
+ if (!keys)
29
+ return keys;
29
30
  if ((0, import_utils.isString)(keys)) {
30
31
  keys = [keys];
31
32
  }
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ declare const _default: React.NamedExoticComponent<any>;
4
+ export default _default;
@@ -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
- }) => ("view_mode" | "column_setting" | "order_by" | "group_by" | "gallery_setting" | "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 {};
@@ -0,0 +1,251 @@
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
+ export declare type GridViewProps = {
195
+ columns: any;
196
+ dataSource: any[];
197
+ dispatch: any;
198
+ /**
199
+ * 画册模式的配置
200
+ */
201
+ gallery: GallerySettingType;
202
+ /**
203
+ * 视图设置
204
+ */
205
+ view: GridViewType;
206
+ style: React.CSSProperties;
207
+ pagination: any;
208
+ filter: FilterType;
209
+ buttons: React.ReactNode | any[];
210
+ actionButtons: any;
211
+ sort: SortType;
212
+ title?: React.ReactNode | (() => React.ReactNode);
213
+ showTitle?: boolean;
214
+ subTitle?: React.ReactNode | (() => React.ReactNode);
215
+ showSubTitle?: boolean;
216
+ exportImport: ExportImportType;
217
+ onValuesChange: (changedValues: any, values: any) => void;
218
+ summary: any;
219
+ utils: any;
220
+ rowKey: ((record: Record<string, any>) => string) | string;
221
+ columnSetting?: ColumnSettingType;
222
+ dataSourceGroup?: DataSourceGroupType;
223
+ loading: boolean;
224
+ dragSort: boolean;
225
+ onSortChange?: (detail: SortDetail) => boolean;
226
+ __id?: string;
227
+ __designMode?: "design";
228
+ /**
229
+ * 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
230
+ */
231
+ currentSettingKey?: string;
232
+ /**
233
+ * 当前本地配置的唯一值, 不填默认使用currentSettingKey
234
+ */
235
+ currentComponentId?: string;
236
+ /**
237
+ * 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
238
+ * @param currentDataSource
239
+ */
240
+ onDataSourceChange?: (currentDataSource: Record<string, any>[]) => void;
241
+ tabs: {
242
+ show: boolean;
243
+ type: 'default' | 'button' | 'buttonGroup' | 'dropdown';
244
+ items: {
245
+ name: string;
246
+ filterBy?: Record<string, any>;
247
+ sortBy?: string;
248
+ }[];
249
+ };
250
+ };
251
+ 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;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { BaseNumberKeyboardProps } from '../BaseNumberKeyboard';
3
+ export interface AmountProps {
4
+ max?: number;
5
+ min?: number;
6
+ doneText?: string;
7
+ resetText?: string;
8
+ defaultValue?: string | number;
9
+ placeholder?: string;
10
+ amountProps?: {
11
+ showCurrencySymbol: boolean;
12
+ useThousandsSeparator: boolean;
13
+ };
14
+ presets?: BaseNumberKeyboardProps['presets'];
15
+ value?: string | number;
16
+ onChange?: (val: string | number) => void;
17
+ onEnter?: (val: string | number) => void;
18
+ defaultSelect?: boolean;
19
+ inputFormat?: (_v: string) => React.ReactNode | null;
20
+ }
21
+ declare const Amount: (props: AmountProps) => JSX.Element;
22
+ export default Amount;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import './index.less';
3
+ export declare type ItemValue = string | number;
4
+ export interface Item {
5
+ value: ItemValue;
6
+ label: React.ReactNode;
7
+ disabled: boolean;
8
+ type: 'text' | 'primary';
9
+ style?: React.CSSProperties;
10
+ size?: number;
11
+ }
12
+ export interface KeyboardProps {
13
+ className?: string;
14
+ style?: React.CSSProperties;
15
+ onChange?: (value?: ItemValue) => void;
16
+ items?: Item[];
17
+ rightItems?: Item[];
18
+ keydown?: boolean;
19
+ }
20
+ declare const _default: React.MemoExoticComponent<(props: KeyboardProps) => JSX.Element>;
21
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import { InputProps } from 'antd';
2
+ import './index.less';
3
+ export interface VirtualKeyInputProps extends InputProps {
4
+ previewValue?: string;
5
+ renderInput?: (props: any) => any;
6
+ showDelete?: boolean;
7
+ onValueSelect?: (selected: boolean) => void;
8
+ defaultSelect?: boolean;
9
+ }
10
+ declare const VirtualKeyInput: (props: VirtualKeyInputProps) => JSX.Element;
11
+ export default VirtualKeyInput;
@@ -35,7 +35,8 @@ var responsiveConfig = {
35
35
  function handleResize() {
36
36
  const oldInfo = info;
37
37
  calculate();
38
- if (oldInfo === info) return;
38
+ if (oldInfo === info)
39
+ return;
39
40
  for (const subscriber of subscribers) {
40
41
  subscriber();
41
42
  }
@@ -57,7 +58,8 @@ function calculate() {
57
58
  }
58
59
  function configResponsive(config) {
59
60
  responsiveConfig = config;
60
- if (info) calculate();
61
+ if (info)
62
+ calculate();
61
63
  }
62
64
  function useResponsive() {
63
65
  if (import_utils.isBrowser && !listening) {
@@ -68,7 +70,8 @@ function useResponsive() {
68
70
  }
69
71
  const [state, setState] = (0, import_react.useState)(info);
70
72
  (0, import_react.useEffect)(() => {
71
- if (!import_utils.isBrowser) return;
73
+ if (!import_utils.isBrowser)
74
+ return;
72
75
  if (!listening) {
73
76
  window.addEventListener("resize", handleResize);
74
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pisell/materials",
3
- "version": "3.3.41",
3
+ "version": "3.3.43",
4
4
  "main": "./lib/index.js",
5
5
  "module": "./es/index.js",
6
6
  "types": "./lib/index.d.ts",
@@ -71,9 +71,9 @@
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",
74
75
  "@pisell/utils": "3.0.0",
75
- "@pisell/icon": "0.0.11",
76
- "@pisell/date-picker": "3.0.4"
76
+ "@pisell/icon": "0.0.11"
77
77
  },
78
78
  "peerDependencies": {
79
79
  "react": "^18.0.0",
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- import { PisellMenuProps } from '../../pisellMenu/types';
3
- /**
4
- * @title: 数据源表单组件
5
- * @description: 基于数据源动态生成表单,支持编辑、查看、禁用三种模式
6
- */
7
- declare const DataSourceMenu: React.ForwardRefExoticComponent<PisellMenuProps & React.RefAttributes<any>>;
8
- export default DataSourceMenu;
@@ -1,19 +0,0 @@
1
- import React from "react";
2
- export interface DivProps {
3
- /** 基础类名,默认为 'div' */
4
- baseClassName?: string;
5
- /** 自定义类名,会与 baseClassName 合并 */
6
- className?: string;
7
- /** 渲染函数,优先级高于 children */
8
- render?: () => React.ReactNode;
9
- /** 子元素 */
10
- children?: React.ReactNode;
11
- /** 内联样式 */
12
- style?: React.CSSProperties;
13
- /** 收集其他需要传递给 div 的 props */
14
- others?: any;
15
- /** 其他自定义属性 */
16
- [key: string]: any;
17
- }
18
- declare const _default: React.NamedExoticComponent<DivProps>;
19
- export default _default;
@@ -1,9 +0,0 @@
1
- import type { UniqueIdentifier } from '@dnd-kit/core';
2
- import React from 'react';
3
- import { Props as TreeItemProps } from './TreeItem';
4
- interface Props extends TreeItemProps {
5
- id: UniqueIdentifier;
6
- __designMode?: string;
7
- }
8
- declare const _default: React.MemoExoticComponent<({ id, depth, ...props }: Props) => JSX.Element>;
9
- export default _default;
@@ -1,24 +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
- isError?: boolean;
23
- }
24
- export declare const TreeItem: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
@@ -1,2 +0,0 @@
1
- export { TreeItem } from './TreeItem';
2
- export { default as SortableTreeItem } from './SortableTreeItem';
@@ -1,35 +0,0 @@
1
- /**
2
- * 可拖拽树形组件
3
- * 基于@dnd-kit库实现,支持拖拽排序、展开折叠、删除等功能
4
- */
5
- import { UniqueIdentifier } from '@dnd-kit/core';
6
- import React from 'react';
7
- import type { FlattenedItem, TreeItem, TreeItems } from './types';
8
- import type { Props as TreeItemProps } from './components/TreeItem/TreeItem';
9
- interface Props {
10
- /** 是否支持折叠功能 */
11
- collapsible?: boolean;
12
- /** 初始树形数据,默认使用 initialItems */
13
- value?: TreeItems;
14
- /** 缩进宽度,控制子节点的缩进距离 */
15
- indentationWidth?: number;
16
- /** 是否显示拖拽指示器 */
17
- indicator?: boolean;
18
- /** 是否支持删除节点功能 */
19
- removable?: boolean;
20
- /** 自定义渲染树节点 */
21
- renderItem?: (item: TreeItemProps, ref: React.RefObject<HTMLDivElement>) => React.ReactNode;
22
- /** 树形数据变化回调 */
23
- onChange?: (items: TreeItems) => void;
24
- /** 删除节点前 */
25
- onRemoveBefore?: (item: TreeItem) => Promise<boolean>;
26
- /** 设计模式 */
27
- __designMode?: string;
28
- /** 最大层级 */
29
- maxLevel?: number;
30
- /** 自定义拖拽判断函数,返回false时阻止拖拽 */
31
- canDrop?: (dragItem: FlattenedItem, dropTarget: FlattenedItem, parentId: UniqueIdentifier | null, parentNode: any) => boolean;
32
- }
33
- export declare function SortableTree({ collapsible, value, indicator, indentationWidth, removable, renderItem, onChange, onRemoveBefore, __designMode, maxLevel, canDrop, }: Props): JSX.Element;
34
- declare const Demo: (props: Props) => JSX.Element;
35
- 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,26 +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
- allowIsShow?: boolean;
11
- allowDrag?: boolean;
12
- disabled?: boolean;
13
- onAdd?: (itemProps: TreeItem) => void;
14
- onDelete?: (itemProps: TreeItem) => void;
15
- showBorder?: boolean;
16
- spacing?: number;
17
- maxLevel?: number;
18
- /** 设计模式 */
19
- __designMode?: string;
20
- /** 是否自定义操作 */
21
- isCustomAction?: boolean;
22
- /** 获取item样式 */
23
- getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
24
- }
25
- declare const SortableItem: (props: SortableItemProps) => JSX.Element;
26
- export default SortableItem;
@@ -1,58 +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
- allowIsShow?: boolean;
20
- /** 是否禁用 */
21
- disabled?: boolean;
22
- /** 节点间距 */
23
- spacing?: number;
24
- /** 最大层级数 */
25
- maxLevel?: number;
26
- /** 是否显示边框 */
27
- showBorder?: boolean;
28
- /** 样式 */
29
- style?: CSSProperties;
30
- /** 类名 */
31
- className?: string;
32
- /** 数据源变化回调 */
33
- onChange?: (items: DropSortItem[]) => void;
34
- /** 删除节点回调 */
35
- onDelete?: (itemProps: TreeItem) => void;
36
- /** 添加节点回调 */
37
- onAdd?: (itemProps: TreeItem) => void;
38
- /** 自定义渲染节点 */
39
- renderItem?: (itemProps: TreeItem) => React.ReactNode;
40
- /** 添加根节点回调 */
41
- onAddRoot?: () => void;
42
- /** 左侧自定义内容 */
43
- leftContent?: React.ReactNode;
44
- /** 右侧自定义内容 */
45
- rightContent?: React.ReactNode;
46
- /** 空状态自定义内容 */
47
- emptyContent?: React.ReactNode;
48
- /** 设计模式 */
49
- __designMode?: string;
50
- /** 是否自定义操作 */
51
- isCustomAction?: boolean;
52
- /** 获取item样式 */
53
- getItemStyle?: (itemProps: TreeItem) => React.CSSProperties;
54
- /** 自定义拖拽判断函数,返回false时阻止拖拽 */
55
- canDrop?: (dragItem: DropSortItem, dropTarget: DropSortItem, parentId: string | number | null) => boolean;
56
- /** 节点缩进宽度 */
57
- indentationWidth?: number;
58
- }
@@ -1,11 +0,0 @@
1
- import { Menu as AntdMenu } from 'antd';
2
- import React from 'react';
3
- import './PisellMenu.less';
4
- import type { PisellMenuProps } from './types';
5
- declare type PisellMenuComponent = React.FC<PisellMenuProps> & {
6
- Item: typeof AntdMenu.Item;
7
- SubMenu: typeof AntdMenu.SubMenu;
8
- ItemGroup: typeof AntdMenu.ItemGroup;
9
- };
10
- declare const PisellMenu: PisellMenuComponent;
11
- export default PisellMenu;