@pisell/materials 1.0.227 → 1.0.229
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 +142 -142
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +29 -20
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +31 -22
- package/es/components/auto-complete/index.d.ts +1 -2
- package/es/components/auto-complete/index.js +1 -2
- package/es/components/input/index.js +4 -5
- package/es/components/page/index.js +10 -0
- package/es/components/picker-view/index.d.ts +2 -0
- package/es/components/picker-view/index.js +2 -0
- package/es/components/select/index.d.ts +1 -1
- package/es/components/select/index.js +5 -5
- package/es/components/table/Table/utils.d.ts +8 -3
- package/es/components/table/Table/utils.js +21 -4
- package/es/components/table/hooks/useMergeColumnSetting.d.ts +1 -0
- package/es/components/table/hooks/useMergeColumnSetting.js +3 -1
- package/es/components/table/hooks/useTableSetting.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.js +4 -2
- package/es/components/table/index.js +12 -2
- package/es/index.d.ts +1 -0
- package/es/index.js +2 -1
- package/lib/components/auto-complete/index.d.ts +1 -2
- package/lib/components/auto-complete/index.js +1 -2
- package/lib/components/input/index.js +4 -5
- package/lib/components/page/index.js +8 -0
- package/lib/components/picker-view/index.d.ts +2 -0
- package/lib/components/picker-view/index.js +36 -0
- package/lib/components/select/index.d.ts +1 -1
- package/lib/components/select/index.js +4 -4
- package/lib/components/table/Table/utils.d.ts +8 -3
- package/lib/components/table/Table/utils.js +23 -3
- package/lib/components/table/hooks/useMergeColumnSetting.d.ts +1 -0
- package/lib/components/table/hooks/useMergeColumnSetting.js +2 -1
- package/lib/components/table/hooks/useTableSetting.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.js +4 -2
- package/lib/components/table/index.js +11 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.js +3 -0
- package/lowcode/menu/utils.ts +1 -1
- package/lowcode/picker-view/__screenshots__/select-1.png +0 -0
- package/lowcode/picker-view/meta.ts +206 -0
- package/lowcode/picker-view/snippets.ts +24 -0
- package/package.json +5 -3
|
@@ -116,6 +116,15 @@ var GridView = (0, import_model.Provider)(
|
|
|
116
116
|
}
|
|
117
117
|
return viewMode || defaultViewMode;
|
|
118
118
|
}, [viewMode, defaultViewMode, multiple]);
|
|
119
|
+
const currentSettingHash = (0, import_react.useMemo)(() => {
|
|
120
|
+
return (0, import_utils.getHash)(columns) || "";
|
|
121
|
+
}, [JSON.stringify(columns)]);
|
|
122
|
+
(0, import_react.useEffect)(() => {
|
|
123
|
+
const setting = (0, import_utils.getTableSettingFromLocalStorage)(tableId);
|
|
124
|
+
if (setting.currentSettingHash !== currentSettingHash) {
|
|
125
|
+
(0, import_utils.clearTableSettingToLocalStorage)(tableId);
|
|
126
|
+
}
|
|
127
|
+
}, [currentSettingHash, tableId]);
|
|
119
128
|
const { setTableSetting, tableSetting } = (0, import_useTableSetting.default)({
|
|
120
129
|
tableId,
|
|
121
130
|
filter,
|
|
@@ -125,7 +134,8 @@ var GridView = (0, import_model.Provider)(
|
|
|
125
134
|
sort,
|
|
126
135
|
view,
|
|
127
136
|
currentViewMode,
|
|
128
|
-
gallery
|
|
137
|
+
gallery,
|
|
138
|
+
currentSettingHash
|
|
129
139
|
});
|
|
130
140
|
const getIsTriggerValuesChange = (0, import_useTriggerValuesChange.default)({
|
|
131
141
|
filter,
|
package/lib/index.d.ts
CHANGED
|
@@ -72,3 +72,4 @@ export { default as List } from "./components/list";
|
|
|
72
72
|
export { default as Sort } from "./components/sort";
|
|
73
73
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
74
74
|
export { default as LowCodePage } from "./components/lowCodePage";
|
|
75
|
+
export { default as PickerView } from "./components/picker-view";
|
package/lib/index.js
CHANGED
|
@@ -69,6 +69,7 @@ __export(src_exports, {
|
|
|
69
69
|
Modal: () => import_modal.default,
|
|
70
70
|
Page: () => import_page.default,
|
|
71
71
|
Pagination: () => import_antd22.Pagination,
|
|
72
|
+
PickerView: () => import_picker_view.default,
|
|
72
73
|
Popconfirm: () => import_antd23.Popconfirm,
|
|
73
74
|
Popover: () => import_antd24.Popover,
|
|
74
75
|
Progress: () => import_antd25.Progress,
|
|
@@ -179,6 +180,7 @@ var import_list = __toESM(require("./components/list"));
|
|
|
179
180
|
var import_sort = __toESM(require("./components/sort"));
|
|
180
181
|
var import_input_number_range = __toESM(require("./components/input-number-range"));
|
|
181
182
|
var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
183
|
+
var import_picker_view = __toESM(require("./components/picker-view"));
|
|
182
184
|
// Annotate the CommonJS export names for ESM import in node:
|
|
183
185
|
0 && (module.exports = {
|
|
184
186
|
Affix,
|
|
@@ -221,6 +223,7 @@ var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
|
221
223
|
Modal,
|
|
222
224
|
Page,
|
|
223
225
|
Pagination,
|
|
226
|
+
PickerView,
|
|
224
227
|
Popconfirm,
|
|
225
228
|
Popover,
|
|
226
229
|
Progress,
|
package/lowcode/menu/utils.ts
CHANGED
|
@@ -15,12 +15,12 @@ export const itemsExtraProps = {
|
|
|
15
15
|
});
|
|
16
16
|
return result;
|
|
17
17
|
});
|
|
18
|
+
console.log(map,'map');
|
|
18
19
|
return map.length === 0 ? fieldValue : map;
|
|
19
20
|
},
|
|
20
21
|
setValue(target, value) {
|
|
21
22
|
const { node } = target;
|
|
22
23
|
const map = {};
|
|
23
|
-
|
|
24
24
|
if (!Array.isArray(value)) {
|
|
25
25
|
value = [];
|
|
26
26
|
}
|
|
Binary file
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
import { uuid } from '../_utils/utils';
|
|
2
|
+
|
|
3
|
+
import snippets from './snippets';
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
snippets,
|
|
7
|
+
componentName: 'PickerView',
|
|
8
|
+
title: '选择器视图',
|
|
9
|
+
category: '表单',
|
|
10
|
+
docUrl: "",
|
|
11
|
+
screenshot: "",
|
|
12
|
+
devMode: "proCode",
|
|
13
|
+
npm: {
|
|
14
|
+
package: "@pisell/materials",
|
|
15
|
+
version: "1.0.1",
|
|
16
|
+
exportName: "PickerView",
|
|
17
|
+
main: "src/index.tsx",
|
|
18
|
+
destructuring: true,
|
|
19
|
+
subName: "",
|
|
20
|
+
},
|
|
21
|
+
props: [
|
|
22
|
+
{
|
|
23
|
+
name: 'defaultValue',
|
|
24
|
+
title: { label: '默认值', tip: '默认选中值' },
|
|
25
|
+
propType: {
|
|
26
|
+
type: 'oneOfType',
|
|
27
|
+
value: [
|
|
28
|
+
{ type: 'arrayOf', value: 'string' },
|
|
29
|
+
{ type: 'arrayOf', value: 'number' },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: 'value',
|
|
35
|
+
title: { label: '当前值', tip: '当前值' },
|
|
36
|
+
propType: {
|
|
37
|
+
type: 'oneOfType',
|
|
38
|
+
value: [
|
|
39
|
+
{ type: 'arrayOf', value: 'string' },
|
|
40
|
+
{ type: 'arrayOf', value: 'number' },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'columns',
|
|
46
|
+
title: { label: '可选项', tip: '可选项' },
|
|
47
|
+
propType: {
|
|
48
|
+
type: 'arrayOf',
|
|
49
|
+
value: {
|
|
50
|
+
type: 'shape',
|
|
51
|
+
value: [
|
|
52
|
+
{
|
|
53
|
+
name: 'label',
|
|
54
|
+
propType: 'string',
|
|
55
|
+
description: '选项名',
|
|
56
|
+
defaultValue: '选项名',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'value',
|
|
60
|
+
propType: ['string', 'number'],
|
|
61
|
+
description: '选项值',
|
|
62
|
+
defaultValue: '选项值',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
setter: {
|
|
68
|
+
componentName: 'ArraySetter',
|
|
69
|
+
props: {
|
|
70
|
+
itemSetter: {
|
|
71
|
+
componentName: 'ObjectSetter',
|
|
72
|
+
props: {
|
|
73
|
+
itemSetter: {
|
|
74
|
+
componentName: 'StringSetter',
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
initialValue: () => {
|
|
78
|
+
return [
|
|
79
|
+
{
|
|
80
|
+
label: '选项名',
|
|
81
|
+
value: uuid(),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
label: '选项名1',
|
|
85
|
+
value: uuid(),
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
label: '选项名2',
|
|
89
|
+
value: uuid(),
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
label: '选项名3',
|
|
93
|
+
value: uuid(),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
label: '选项名4',
|
|
97
|
+
value: uuid(),
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: '选项名5',
|
|
101
|
+
value: uuid(),
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
name: 'className',
|
|
111
|
+
title: { label: '选择器类名', tip: '选择器类名' },
|
|
112
|
+
propType: 'string',
|
|
113
|
+
setter: 'StringSetter'
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
name: 'mouseWheel',
|
|
117
|
+
title: { label: '鼠标滚轮选择', tip: '是否允许通过鼠标滚轮进行选择' },
|
|
118
|
+
propType: 'bool',
|
|
119
|
+
defaultValue: false,
|
|
120
|
+
setter: 'BoolSetter'
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
name: 'onChange',
|
|
124
|
+
title: {
|
|
125
|
+
label: '选中回调函数',
|
|
126
|
+
tip: '选中 option,或 input 的 value 变化时,调用此函数',
|
|
127
|
+
},
|
|
128
|
+
propType: 'func',
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: 'loading',
|
|
132
|
+
title: { label: '加载中', tip: '加载中状态' },
|
|
133
|
+
propType: 'bool',
|
|
134
|
+
defaultValue: false,
|
|
135
|
+
setter: 'BoolSetter'
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
name: 'renderLabel',
|
|
139
|
+
title: { label: '自定义渲染', tip: '自定义渲染每列展示的内容' },
|
|
140
|
+
propType: 'func',
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
name: 'loadingContent',
|
|
144
|
+
title: { label: '加载状态内容', tip: '加载状态下展示的内容' },
|
|
145
|
+
propType: 'func',
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
configure: {
|
|
149
|
+
supports: {
|
|
150
|
+
style: true,
|
|
151
|
+
events: [
|
|
152
|
+
{
|
|
153
|
+
name: 'onBlur',
|
|
154
|
+
template: "onBlur(${extParams}){\n// 失去焦点时回调\nconsole.log('onBlur');}",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
name: 'onChange',
|
|
158
|
+
template:
|
|
159
|
+
"onChange(value,option,${extParams}){\n// 选中 option,或 input 的 value 变化时,调用此函数\nconsole.log('onChange',value,option);}",
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
name: 'onDeselect',
|
|
163
|
+
template:
|
|
164
|
+
"onDeselect(value,${extParams}){\n// 取消选中时调用\nconsole.log('onDeselect',value);}",
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
name: 'onFocus',
|
|
168
|
+
template: "onFocus(${extParams}){\n// 获得焦点时回调\nconsole.log('onFocus');}",
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
name: 'onInputKeyDown',
|
|
172
|
+
template:
|
|
173
|
+
"onInputKeyDown(${extParams}){\n// 按键按下时回调\nconsole.log('onInputKeyDown');}",
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
name: 'onMouseEnter',
|
|
177
|
+
template: "onMouseEnter(${extParams}){\n// 鼠标移入时回调\nconsole.log('onMouseEnter');}",
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
name: 'onMouseLeave',
|
|
181
|
+
template: "onMouseLeave(${extParams}){\n// 鼠标移出时回调\nconsole.log('onMouseLeave');}",
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
name: 'onPopupScroll',
|
|
185
|
+
template:
|
|
186
|
+
"onPopupScroll(${extParams}){\n// 下拉列表滚动时的回调\nconsole.log('onPopupScroll');}",
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
name: 'onSearch',
|
|
190
|
+
template:
|
|
191
|
+
"onSearch(value,${extParams}){\n// 文本框值变化时回调\nconsole.log('onSearch',value);}",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
name: 'onSelect',
|
|
195
|
+
template:
|
|
196
|
+
"onSelect(value,option,${extParams}){\n// 被选中时调用\nconsole.log('onSelect',value,option);}",
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
name: 'onDropdownVisibleChange',
|
|
200
|
+
template:
|
|
201
|
+
"onDropdownVisibleChange(open,${extParams}){\n// 展开下拉菜单的回调\nconsole.log('onDropdownVisibleChange',open);}",
|
|
202
|
+
},
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
},
|
|
206
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default [
|
|
2
|
+
{
|
|
3
|
+
title: '选择器视图',
|
|
4
|
+
screenshot: '',
|
|
5
|
+
schema: {
|
|
6
|
+
componentName: 'PickerView',
|
|
7
|
+
props: {
|
|
8
|
+
columns: [
|
|
9
|
+
[
|
|
10
|
+
{ label: '周一', value: 'Mon' },
|
|
11
|
+
{ label: '周二', value: 'Tues' },
|
|
12
|
+
{ label: '周三', value: 'Wed' },
|
|
13
|
+
{ label: '周四', value: 'Thur' },
|
|
14
|
+
{ label: '周五', value: 'Fri' },
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
{ label: '上午', value: 'am' },
|
|
18
|
+
{ label: '下午', value: 'pm' },
|
|
19
|
+
],
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.229",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -58,11 +58,13 @@
|
|
|
58
58
|
"@dnd-kit/utilities": "^3.2.1",
|
|
59
59
|
"ahooks": "^3.7.6",
|
|
60
60
|
"react-infinite-scroll-component": "^6.1.0",
|
|
61
|
+
"antd-mobile": "^5.34.0",
|
|
61
62
|
"react-window": "^1.8.10",
|
|
62
63
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
|
+
"crypto-js": "^4.2.0",
|
|
63
65
|
"@pisell/utils": "1.0.23",
|
|
64
|
-
"@pisell/
|
|
65
|
-
"@pisell/
|
|
66
|
+
"@pisell/icon": "0.0.8",
|
|
67
|
+
"@pisell/date-picker": "1.0.68"
|
|
66
68
|
},
|
|
67
69
|
"peerDependencies": {
|
|
68
70
|
"react": "^18.0.0",
|