@pisell/materials 1.0.464 → 1.0.466
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 +19 -2
- package/build/lowcode/preview.js +7 -7
- package/build/lowcode/render/default/view.js +13 -13
- package/build/lowcode/view.js +13 -13
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +3 -1
- package/es/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +4 -1
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.d.ts +4 -1
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.js +4 -1
- package/es/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +21 -4
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +15 -10
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/utils.d.ts +9 -0
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +49 -2
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +8 -7
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +5 -4
- package/es/components/dataSourceComponents/dataSourceTable/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +2 -1
- package/es/components/dataSourceComponents/dataSourceWrapper/index.d.ts +6 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/index.js +6 -0
- package/es/components/dataSourceComponents/fields/Checkbox/index.js +10 -2
- package/es/components/dataSourceComponents/fields/Radio/index.js +10 -2
- package/es/components/dataSourceComponents/fields/Select/index.d.ts +9 -2
- package/es/components/dataSourceComponents/fields/Select/index.js +11 -3
- package/es/components/dataSourceComponents/fields/index.d.ts +8 -1
- package/es/components/dataSourceComponents/hooks/useActions.d.ts +1 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +2 -5
- package/es/components/dataSourceComponents/hooks/useDataSource.d.ts +1 -1
- package/es/components/dataSourceComponents/hooks/useDataSource.js +1 -1
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +2 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesContext.js +2 -0
- package/es/components/dataSourceComponents/provider/variables/VariablesProvider.js +19 -4
- package/es/components/dataSourceComponents/provider/variables/utils.d.ts +10 -0
- package/es/components/dataSourceComponents/provider/variables/utils.js +19 -0
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/provider/hooks/useJsonPrefixPath.d.ts +4 -1
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.d.ts +4 -1
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperContext.js +4 -1
- package/lib/components/dataSourceComponents/dataSourceForm/provider/jsonWrapper/JsonWrapperProvider.js +6 -2
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +8 -6
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/utils.d.ts +9 -0
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +45 -3
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +7 -6
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.d.ts +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useDesignMode.js +11 -5
- package/lib/components/dataSourceComponents/dataSourceTable/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +2 -1
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.d.ts +6 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/index.js +40 -0
- package/lib/components/dataSourceComponents/fields/Checkbox/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/Radio/index.js +3 -1
- package/lib/components/dataSourceComponents/fields/Select/index.d.ts +9 -2
- package/lib/components/dataSourceComponents/fields/Select/index.js +4 -2
- package/lib/components/dataSourceComponents/fields/index.d.ts +8 -1
- package/lib/components/dataSourceComponents/hooks/useActions.d.ts +1 -1
- package/lib/components/dataSourceComponents/hooks/useActions.js +1 -4
- package/lib/components/dataSourceComponents/hooks/useDataSource.d.ts +1 -1
- package/lib/components/dataSourceComponents/hooks/useDataSource.js +1 -1
- package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.js +1 -1
- package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.js +1 -1
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.d.ts +2 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesContext.js +4 -0
- package/lib/components/dataSourceComponents/provider/variables/VariablesProvider.js +24 -3
- package/lib/components/dataSourceComponents/provider/variables/utils.d.ts +10 -0
- package/lib/components/dataSourceComponents/provider/variables/utils.js +48 -0
- package/lowcode/_utils/defaultSchema.ts +674 -6
- package/lowcode/_utils/utils.ts +9 -0
- package/lowcode/data-source-form/meta.ts +10 -3
- package/lowcode/data-source-form/utils.ts +65 -6
- package/lowcode/data-source-table/meta.ts +18 -6
- package/lowcode/data-source-table/utils.tsx +5 -0
- package/lowcode/date-picker.range-picker/meta.ts +20 -0
- package/lowcode/form-group/meta.ts +2 -3
- package/lowcode/form-item-checkbox/snippets.ts +2 -0
- package/lowcode/form-item-checkbox.group/meta.ts +47 -22
- package/lowcode/form-item-color-picker/meta.ts +27 -14
- package/lowcode/form-item-input/meta.ts +23 -2
- package/lowcode/form-item-radio/snippets.ts +6 -3
- package/lowcode/form-item-radio.group/meta.ts +20 -2
- package/lowcode/form-item-select/meta.ts +64 -33
- package/lowcode/form-item-select/snippets.ts +1 -0
- package/package.json +1 -1
- /package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.d.ts +0 -0
- /package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.js +0 -0
- /package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.d.ts +0 -0
- /package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.js +0 -0
- /package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.d.ts +0 -0
- /package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.d.ts +0 -0
|
@@ -1,26 +1,49 @@
|
|
|
1
1
|
import { uuid } from '../_utils/utils';
|
|
2
2
|
|
|
3
3
|
import snippets from './snippets';
|
|
4
|
-
import {
|
|
4
|
+
import {
|
|
5
|
+
formItemGeneralDataGroup,
|
|
6
|
+
generalItemMap,
|
|
7
|
+
getFormItemGeneralInfoGroup,
|
|
8
|
+
formItemGeneralOptionTypeGroup,
|
|
9
|
+
getFormItemValidateGroup,
|
|
10
|
+
getFormItemGeneralAppearanceGroup,
|
|
11
|
+
} from '../_utils/defaultSchema';
|
|
5
12
|
|
|
6
13
|
export default {
|
|
7
14
|
snippets,
|
|
8
15
|
componentName: 'FormItemSelect',
|
|
9
16
|
title: '选择器',
|
|
10
17
|
category: '表单',
|
|
11
|
-
group:
|
|
12
|
-
docUrl:
|
|
13
|
-
screenshot:
|
|
14
|
-
devMode:
|
|
18
|
+
group: '无代码组件',
|
|
19
|
+
docUrl: '',
|
|
20
|
+
screenshot: '',
|
|
21
|
+
devMode: 'proCode',
|
|
15
22
|
npm: {
|
|
16
|
-
package:
|
|
17
|
-
version:
|
|
18
|
-
exportName:
|
|
19
|
-
main:
|
|
23
|
+
package: '@pisell/materials',
|
|
24
|
+
version: '1.0.1',
|
|
25
|
+
exportName: 'FormItemSelect',
|
|
26
|
+
main: 'src/index.tsx',
|
|
20
27
|
destructuring: true,
|
|
21
|
-
subName:
|
|
28
|
+
subName: '',
|
|
22
29
|
},
|
|
23
|
-
generalProps:
|
|
30
|
+
generalProps: [
|
|
31
|
+
// 数据分组
|
|
32
|
+
formItemGeneralDataGroup,
|
|
33
|
+
// 信息分组
|
|
34
|
+
getFormItemGeneralInfoGroup([
|
|
35
|
+
generalItemMap['label'],
|
|
36
|
+
generalItemMap['tooltip'],
|
|
37
|
+
generalItemMap['extra'],
|
|
38
|
+
generalItemMap['noStyle'],
|
|
39
|
+
generalItemMap['mode'],
|
|
40
|
+
generalItemMap['defaultValue'],
|
|
41
|
+
]),
|
|
42
|
+
// 选项类型分组
|
|
43
|
+
formItemGeneralOptionTypeGroup,
|
|
44
|
+
// 校验分组
|
|
45
|
+
getFormItemValidateGroup([generalItemMap['requiredobj']]),
|
|
46
|
+
],
|
|
24
47
|
props: [
|
|
25
48
|
{
|
|
26
49
|
name: 'defaultValue',
|
|
@@ -89,13 +112,13 @@ export default {
|
|
|
89
112
|
name: 'label',
|
|
90
113
|
title: '选项名',
|
|
91
114
|
setter: ['PisellI18nSetter', 'VariableSetter'],
|
|
92
|
-
isRequired: true
|
|
115
|
+
isRequired: true,
|
|
93
116
|
},
|
|
94
117
|
{
|
|
95
118
|
name: 'value',
|
|
96
119
|
title: '选项值',
|
|
97
120
|
setter: ['StringSetter', 'NumberSetter', 'VariableSetter'],
|
|
98
|
-
isRequired: true
|
|
121
|
+
isRequired: true,
|
|
99
122
|
},
|
|
100
123
|
{
|
|
101
124
|
name: 'disabled',
|
|
@@ -121,34 +144,34 @@ export default {
|
|
|
121
144
|
title: { label: '支持清除', tip: '是否允许清除' },
|
|
122
145
|
propType: 'bool',
|
|
123
146
|
defaultValue: false,
|
|
124
|
-
setter: 'BoolSetter'
|
|
147
|
+
setter: 'BoolSetter',
|
|
125
148
|
},
|
|
126
149
|
{
|
|
127
150
|
name: 'className',
|
|
128
151
|
title: { label: '选择器类名', tip: '选择器类名' },
|
|
129
152
|
propType: 'string',
|
|
130
|
-
setter: 'StringSetter'
|
|
153
|
+
setter: 'StringSetter',
|
|
131
154
|
},
|
|
132
155
|
{
|
|
133
156
|
name: 'autoFocus',
|
|
134
157
|
title: { label: '自动聚焦', tip: '默认获取焦点' },
|
|
135
158
|
propType: 'bool',
|
|
136
159
|
defaultValue: false,
|
|
137
|
-
setter: 'BoolSetter'
|
|
160
|
+
setter: 'BoolSetter',
|
|
138
161
|
},
|
|
139
162
|
{
|
|
140
163
|
name: 'defaultActiveFirstOption',
|
|
141
164
|
title: { label: '高亮首个选项', tip: '是否默认高亮第一个选项' },
|
|
142
165
|
propType: 'bool',
|
|
143
166
|
defaultValue: true,
|
|
144
|
-
setter: 'BoolSetter'
|
|
167
|
+
setter: 'BoolSetter',
|
|
145
168
|
},
|
|
146
169
|
{
|
|
147
170
|
name: 'disabled',
|
|
148
171
|
title: { label: '是否禁用', tip: '是否为禁用状态' },
|
|
149
172
|
propType: 'bool',
|
|
150
173
|
defaultValue: false,
|
|
151
|
-
setter: 'BoolSetter'
|
|
174
|
+
setter: 'BoolSetter',
|
|
152
175
|
},
|
|
153
176
|
{
|
|
154
177
|
name: 'labelInValue',
|
|
@@ -158,7 +181,7 @@ export default {
|
|
|
158
181
|
},
|
|
159
182
|
propType: 'bool',
|
|
160
183
|
defaultValue: false,
|
|
161
|
-
setter: 'BoolSetter'
|
|
184
|
+
setter: 'BoolSetter',
|
|
162
185
|
},
|
|
163
186
|
{
|
|
164
187
|
name: 'mode',
|
|
@@ -188,7 +211,9 @@ export default {
|
|
|
188
211
|
name: 'maxTagCount',
|
|
189
212
|
title: { label: '最大tag数', tip: '最多显示多少个tag' },
|
|
190
213
|
condition(target) {
|
|
191
|
-
return ['tags','multiple'].includes(
|
|
214
|
+
return ['tags', 'multiple'].includes(
|
|
215
|
+
target.getProps().getPropValue('mode')
|
|
216
|
+
);
|
|
192
217
|
},
|
|
193
218
|
propType: 'number',
|
|
194
219
|
},
|
|
@@ -196,7 +221,9 @@ export default {
|
|
|
196
221
|
name: 'maxTagTextLength',
|
|
197
222
|
title: { label: 'tag文本长度', tip: '最大显示的tag文本长度' },
|
|
198
223
|
condition(target) {
|
|
199
|
-
return ['tags','multiple'].includes(
|
|
224
|
+
return ['tags', 'multiple'].includes(
|
|
225
|
+
target.getProps().getPropValue('mode')
|
|
226
|
+
);
|
|
200
227
|
},
|
|
201
228
|
propType: 'number',
|
|
202
229
|
},
|
|
@@ -204,13 +231,13 @@ export default {
|
|
|
204
231
|
name: 'notFoundContent',
|
|
205
232
|
title: { label: '搜索为空提示文案', tip: '搜索为空提示文案' },
|
|
206
233
|
propType: 'string',
|
|
207
|
-
setter: 'PisellI18nSetter'
|
|
234
|
+
setter: 'PisellI18nSetter',
|
|
208
235
|
},
|
|
209
236
|
{
|
|
210
237
|
name: 'placeholder',
|
|
211
238
|
title: { label: '选择框默认文字', tip: '选择框默认文字' },
|
|
212
239
|
propType: 'string',
|
|
213
|
-
setter: 'PisellI18nSetter'
|
|
240
|
+
setter: 'PisellI18nSetter',
|
|
214
241
|
},
|
|
215
242
|
{
|
|
216
243
|
name: 'placement',
|
|
@@ -224,14 +251,14 @@ export default {
|
|
|
224
251
|
name: 'showArrow',
|
|
225
252
|
title: { label: '是否显示下拉箭头', tip: '是否显示下拉小箭头' },
|
|
226
253
|
propType: 'bool',
|
|
227
|
-
setter: 'BoolSetter'
|
|
254
|
+
setter: 'BoolSetter',
|
|
228
255
|
},
|
|
229
256
|
{
|
|
230
257
|
name: 'showSearch',
|
|
231
258
|
title: { label: '是否可搜索', tip: '是否可搜索' },
|
|
232
259
|
propType: 'bool',
|
|
233
260
|
defaultValue: false,
|
|
234
|
-
setter: 'BoolSetter'
|
|
261
|
+
setter: 'BoolSetter',
|
|
235
262
|
},
|
|
236
263
|
{
|
|
237
264
|
name: 'size',
|
|
@@ -263,14 +290,14 @@ export default {
|
|
|
263
290
|
title: { label: '加载中', tip: '加载中状态' },
|
|
264
291
|
propType: 'bool',
|
|
265
292
|
defaultValue: false,
|
|
266
|
-
setter: 'BoolSetter'
|
|
293
|
+
setter: 'BoolSetter',
|
|
267
294
|
},
|
|
268
295
|
{
|
|
269
296
|
name: 'bordered',
|
|
270
297
|
title: { label: '显示边框', tip: '是否有边框' },
|
|
271
298
|
propType: 'bool',
|
|
272
299
|
defaultValue: true,
|
|
273
|
-
setter: 'BoolSetter'
|
|
300
|
+
setter: 'BoolSetter',
|
|
274
301
|
},
|
|
275
302
|
{
|
|
276
303
|
name: 'filterOption',
|
|
@@ -388,12 +415,12 @@ export default {
|
|
|
388
415
|
propType: 'func',
|
|
389
416
|
},
|
|
390
417
|
{
|
|
391
|
-
name:
|
|
418
|
+
name: 'isShowDropdown',
|
|
392
419
|
title: { label: '开启操作栏', tip: 'isShowDropdown |开启操作栏' },
|
|
393
420
|
propType: 'bool',
|
|
394
421
|
},
|
|
395
422
|
{
|
|
396
|
-
name:
|
|
423
|
+
name: 'FormItemSelectAll',
|
|
397
424
|
title: { label: '全选', tip: 'FormItemSelectAll |全选' },
|
|
398
425
|
propType: 'bool',
|
|
399
426
|
condition: {
|
|
@@ -408,7 +435,8 @@ export default {
|
|
|
408
435
|
events: [
|
|
409
436
|
{
|
|
410
437
|
name: 'onBlur',
|
|
411
|
-
template:
|
|
438
|
+
template:
|
|
439
|
+
"onBlur(${extParams}){\n// 失去焦点时回调\nconsole.log('onBlur');}",
|
|
412
440
|
},
|
|
413
441
|
{
|
|
414
442
|
name: 'onChange',
|
|
@@ -422,7 +450,8 @@ export default {
|
|
|
422
450
|
},
|
|
423
451
|
{
|
|
424
452
|
name: 'onFocus',
|
|
425
|
-
template:
|
|
453
|
+
template:
|
|
454
|
+
"onFocus(${extParams}){\n// 获得焦点时回调\nconsole.log('onFocus');}",
|
|
426
455
|
},
|
|
427
456
|
{
|
|
428
457
|
name: 'onInputKeyDown',
|
|
@@ -431,11 +460,13 @@ export default {
|
|
|
431
460
|
},
|
|
432
461
|
{
|
|
433
462
|
name: 'onMouseEnter',
|
|
434
|
-
template:
|
|
463
|
+
template:
|
|
464
|
+
"onMouseEnter(${extParams}){\n// 鼠标移入时回调\nconsole.log('onMouseEnter');}",
|
|
435
465
|
},
|
|
436
466
|
{
|
|
437
467
|
name: 'onMouseLeave',
|
|
438
|
-
template:
|
|
468
|
+
template:
|
|
469
|
+
"onMouseLeave(${extParams}){\n// 鼠标移出时回调\nconsole.log('onMouseLeave');}",
|
|
439
470
|
},
|
|
440
471
|
{
|
|
441
472
|
name: 'onPopupScroll',
|
package/package.json
CHANGED
/package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.d.ts
RENAMED
|
File without changes
|
/package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.js
RENAMED
|
File without changes
|
/package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.d.ts
RENAMED
|
File without changes
|
/package/es/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.js
RENAMED
|
File without changes
|
/package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceContext.d.ts
RENAMED
|
File without changes
|
/package/lib/components/dataSourceComponents/provider/{fields → dataSource}/DataSourceProvider.d.ts
RENAMED
|
File without changes
|