@pisell/materials 1.0.229 → 3.0.1
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 +20 -29
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +20 -29
- package/es/components/table/hooks/useGenScroll.js +1 -1
- package/es/index.d.ts +0 -1
- package/es/index.js +1 -2
- package/lib/components/table/hooks/useGenScroll.js +1 -1
- package/lib/index.d.ts +0 -1
- package/lib/index.js +0 -3
- package/lowcode/menu/utils.ts +1 -1
- package/package.json +3 -4
- package/es/components/picker-view/index.d.ts +0 -2
- package/es/components/picker-view/index.js +0 -2
- package/lib/components/picker-view/index.d.ts +0 -2
- package/lib/components/picker-view/index.js +0 -36
- package/lowcode/picker-view/__screenshots__/select-1.png +0 -0
- package/lowcode/picker-view/meta.ts +0 -206
- package/lowcode/picker-view/snippets.ts +0 -24
|
@@ -8,7 +8,7 @@ var useGenScroll = function useGenScroll(params) {
|
|
|
8
8
|
return {
|
|
9
9
|
x: (propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.x) || columns.reduce(function (p, c) {
|
|
10
10
|
return p + (c.width || 250);
|
|
11
|
-
}, 0),
|
|
11
|
+
}, 0) || 2000,
|
|
12
12
|
y: (propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - 50 - 24, 100),
|
|
13
13
|
scrollToFirstRowOnChange: propsScroll === null || propsScroll === void 0 ? void 0 : propsScroll.scrollToFirstRowOnChange
|
|
14
14
|
};
|
package/es/index.d.ts
CHANGED
|
@@ -72,4 +72,3 @@ 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/es/index.js
CHANGED
|
@@ -91,5 +91,4 @@ export { default as ClassicLayout } from "./components/classicLayout";
|
|
|
91
91
|
export { default as List } from "./components/list";
|
|
92
92
|
export { default as Sort } from "./components/sort";
|
|
93
93
|
export { default as InputNumberRange } from "./components/input-number-range";
|
|
94
|
-
export { default as LowCodePage } from "./components/lowCodePage";
|
|
95
|
-
export { default as PickerView } from "./components/picker-view";
|
|
94
|
+
export { default as LowCodePage } from "./components/lowCodePage";
|
|
@@ -30,7 +30,7 @@ var useGenScroll = (params) => {
|
|
|
30
30
|
return {
|
|
31
31
|
x: (propsScroll == null ? void 0 : propsScroll.x) || columns.reduce((p, c) => {
|
|
32
32
|
return p + (c.width || 250);
|
|
33
|
-
}, 0),
|
|
33
|
+
}, 0) || 2e3,
|
|
34
34
|
y: (propsScroll == null ? void 0 : propsScroll.y) || Math.max(wrapHeight - 48 - 50 - 24, 100),
|
|
35
35
|
scrollToFirstRowOnChange: propsScroll == null ? void 0 : propsScroll.scrollToFirstRowOnChange
|
|
36
36
|
};
|
package/lib/index.d.ts
CHANGED
|
@@ -72,4 +72,3 @@ 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,7 +69,6 @@ __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,
|
|
73
72
|
Popconfirm: () => import_antd23.Popconfirm,
|
|
74
73
|
Popover: () => import_antd24.Popover,
|
|
75
74
|
Progress: () => import_antd25.Progress,
|
|
@@ -180,7 +179,6 @@ var import_list = __toESM(require("./components/list"));
|
|
|
180
179
|
var import_sort = __toESM(require("./components/sort"));
|
|
181
180
|
var import_input_number_range = __toESM(require("./components/input-number-range"));
|
|
182
181
|
var import_lowCodePage = __toESM(require("./components/lowCodePage"));
|
|
183
|
-
var import_picker_view = __toESM(require("./components/picker-view"));
|
|
184
182
|
// Annotate the CommonJS export names for ESM import in node:
|
|
185
183
|
0 && (module.exports = {
|
|
186
184
|
Affix,
|
|
@@ -223,7 +221,6 @@ var import_picker_view = __toESM(require("./components/picker-view"));
|
|
|
223
221
|
Modal,
|
|
224
222
|
Page,
|
|
225
223
|
Pagination,
|
|
226
|
-
PickerView,
|
|
227
224
|
Popconfirm,
|
|
228
225
|
Popover,
|
|
229
226
|
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');
|
|
19
18
|
return map.length === 0 ? fieldValue : map;
|
|
20
19
|
},
|
|
21
20
|
setValue(target, value) {
|
|
22
21
|
const { node } = target;
|
|
23
22
|
const map = {};
|
|
23
|
+
|
|
24
24
|
if (!Array.isArray(value)) {
|
|
25
25
|
value = [];
|
|
26
26
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pisell/materials",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"module": "./es/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -58,13 +58,12 @@
|
|
|
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",
|
|
62
61
|
"react-window": "^1.8.10",
|
|
63
62
|
"react-virtualized-auto-sizer": "^1.0.20",
|
|
64
63
|
"crypto-js": "^4.2.0",
|
|
65
64
|
"@pisell/utils": "1.0.23",
|
|
66
|
-
"@pisell/
|
|
67
|
-
"@pisell/
|
|
65
|
+
"@pisell/date-picker": "1.0.68",
|
|
66
|
+
"@pisell/icon": "0.0.8"
|
|
68
67
|
},
|
|
69
68
|
"peerDependencies": {
|
|
70
69
|
"react": "^18.0.0",
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
var __create = Object.create;
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
28
|
-
|
|
29
|
-
// src/components/picker-view/index.tsx
|
|
30
|
-
var picker_view_exports = {};
|
|
31
|
-
__export(picker_view_exports, {
|
|
32
|
-
default: () => picker_view_default
|
|
33
|
-
});
|
|
34
|
-
module.exports = __toCommonJS(picker_view_exports);
|
|
35
|
-
var import_picker_view = __toESM(require("antd-mobile/es/components/picker-view"));
|
|
36
|
-
var picker_view_default = import_picker_view.default;
|
|
Binary file
|
|
@@ -1,206 +0,0 @@
|
|
|
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
|
-
};
|
|
@@ -1,24 +0,0 @@
|
|
|
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
|
-
];
|