@pisell/materials 1.0.69 → 1.0.72

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 (62) 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/meta.js +2 -2
  5. package/build/lowcode/render/default/view.js +1 -1
  6. package/build/lowcode/view.js +1 -1
  7. package/lowcode/affix/meta.ts +29 -29
  8. package/lowcode/alert/meta.ts +3 -0
  9. package/lowcode/anchor.link/meta.ts +1 -0
  10. package/lowcode/auto-complete/meta.ts +133 -133
  11. package/lowcode/avatar/meta.ts +51 -50
  12. package/lowcode/badge/meta.ts +67 -66
  13. package/lowcode/breadcrumb/meta.ts +2 -3
  14. package/lowcode/button/meta.ts +1 -1
  15. package/lowcode/calendar/meta.ts +92 -92
  16. package/lowcode/card/meta.ts +67 -65
  17. package/lowcode/carousel/meta.ts +110 -110
  18. package/lowcode/cascader/meta.ts +135 -135
  19. package/lowcode/checkbox/meta.ts +1 -1
  20. package/lowcode/checkbox.group/meta.ts +1 -0
  21. package/lowcode/collapse/meta.ts +172 -172
  22. package/lowcode/collapse.pane/meta.ts +1 -0
  23. package/lowcode/date-picker/meta.ts +1 -1
  24. package/lowcode/date-picker.range-picker/meta.ts +1 -1
  25. package/lowcode/descriptions/meta.ts +197 -193
  26. package/lowcode/descriptions.item/meta.ts +1 -0
  27. package/lowcode/divider/meta.ts +44 -44
  28. package/lowcode/drawer/meta.ts +1 -1
  29. package/lowcode/dropdown/meta.ts +104 -104
  30. package/lowcode/empty/meta.ts +1 -0
  31. package/lowcode/filter/meta.ts +5 -4
  32. package/lowcode/form.item/meta.ts +8 -5
  33. package/lowcode/image/meta.ts +1 -0
  34. package/lowcode/input/meta.ts +5 -1
  35. package/lowcode/input-number/meta.ts +104 -98
  36. package/lowcode/input.password/meta.ts +4 -1
  37. package/lowcode/input.search/meta.ts +99 -92
  38. package/lowcode/input.text-area/meta.ts +1 -1
  39. package/lowcode/menu/meta.ts +1 -1
  40. package/lowcode/menu/snippets.ts +1 -1
  41. package/lowcode/modal/meta.ts +137 -131
  42. package/lowcode/popconfirm/meta.ts +3 -4
  43. package/lowcode/popover/meta.ts +2 -2
  44. package/lowcode/radio/meta.ts +1 -1
  45. package/lowcode/rate/meta.ts +1 -0
  46. package/lowcode/select/meta.ts +3 -3
  47. package/lowcode/spin/meta.ts +1 -0
  48. package/lowcode/steps/meta.ts +3 -3
  49. package/lowcode/switch/meta.ts +2 -2
  50. package/lowcode/table/meta.ts +4 -4
  51. package/lowcode/tabs/meta.ts +1 -1
  52. package/lowcode/tag/meta.ts +1 -0
  53. package/lowcode/time-picker/meta.ts +1 -0
  54. package/lowcode/timeline/meta.ts +1 -1
  55. package/lowcode/tooltip/meta.ts +1 -1
  56. package/lowcode/transfer/meta.ts +3 -2
  57. package/lowcode/tree-select/meta.ts +1 -1
  58. package/lowcode/typography.link/meta.ts +3 -1
  59. package/lowcode/typography.paragraph/meta.ts +3 -1
  60. package/lowcode/typography.text/meta.ts +3 -1
  61. package/lowcode/typography.title/meta.ts +3 -1
  62. package/package.json +2 -2
@@ -134,7 +134,7 @@ export default {
134
134
  tip: "placeholder | 输入框提示文字",
135
135
  },
136
136
  propType: "string",
137
- setter: "StringSetter",
137
+ setter: "PisellI18nSetter",
138
138
  },
139
139
  {
140
140
  name: "allowClear",
@@ -181,7 +181,7 @@ export default {
181
181
  tip: "placeholder | 输入框提示文字",
182
182
  },
183
183
  propType: "string",
184
- setter: "StringSetter",
184
+ setter: "PisellI18nSetter",
185
185
  },
186
186
  {
187
187
  name: "allowClear",
@@ -1,12 +1,12 @@
1
- import { uuid } from '../_utils/utils';
1
+ import { uuid } from "../_utils/utils";
2
2
 
3
- import snippets from './snippets';
3
+ import snippets from "./snippets";
4
4
 
5
5
  export default {
6
6
  snippets,
7
- componentName: 'Descriptions',
8
- title: '描述列表',
9
- category: '数据展示',
7
+ componentName: "Descriptions",
8
+ title: "描述列表",
9
+ category: "数据展示",
10
10
  docUrl: "",
11
11
  screenshot: "",
12
12
  devMode: "proCode",
@@ -18,213 +18,217 @@ export default {
18
18
  destructuring: true,
19
19
  subName: "",
20
20
  },
21
- configure: {
22
- props: [
23
- {
24
- name: 'title',
25
- title: {
26
- label: '标题',
27
- tip: '描述列表的标题,显示在最顶部',
28
- },
29
- propType: {
30
- type: 'oneOfType',
31
- value: ['string', 'node'],
32
- },
21
+ props: [
22
+ {
23
+ name: "title",
24
+ title: {
25
+ label: "标题",
26
+ tip: "描述列表的标题,显示在最顶部",
33
27
  },
34
- {
35
- name: 'items',
36
- title: {
37
- label: '列表项',
38
- tip: '列表项',
39
- },
40
- setter: {
41
- componentName: 'ArraySetter',
42
- props: {
43
- itemSetter: {
44
- componentName: 'ObjectSetter',
45
- props: {
46
- config: {
47
- items: [
48
- {
49
- name: 'key',
50
- title: 'key',
51
- setter: 'StringSetter',
52
- initialValue: (val) => val || uuid(),
53
- condition: () => false,
54
- },
55
- {
56
- name: 'label',
57
- title: '标题',
58
- setter: 'StringSetter',
59
- initialValue: '列表项',
60
- },
61
- {
62
- name: 'span',
63
- title: '所占列数',
64
- setter: 'NumberSetter',
65
- initialValue: 1,
66
- },
67
- {
68
- name: 'children',
69
- title: '内容',
70
- setter: {
71
- componentName: 'SlotSetter',
72
- initialValue: {
73
- type: 'JSSlot',
74
- value: [],
75
- },
28
+ propType: {
29
+ type: "oneOfType",
30
+ value: ["string", "node"],
31
+ },
32
+ setter: ["PisellI18nSetter", "SlotSetter"],
33
+ },
34
+ {
35
+ name: "items",
36
+ title: {
37
+ label: "列表项",
38
+ tip: "列表项",
39
+ },
40
+ setter: {
41
+ componentName: "ArraySetter",
42
+ props: {
43
+ itemSetter: {
44
+ componentName: "ObjectSetter",
45
+ props: {
46
+ config: {
47
+ items: [
48
+ {
49
+ name: "key",
50
+ title: "key",
51
+ setter: "StringSetter",
52
+ initialValue: (val) => val || uuid(),
53
+ condition: () => false,
54
+ },
55
+ {
56
+ name: "label",
57
+ title: "标题",
58
+ setter: "PisellI18nSetter",
59
+ initialValue: "列表项",
60
+ },
61
+ {
62
+ name: "span",
63
+ title: "所占列数",
64
+ setter: "NumberSetter",
65
+ initialValue: 1,
66
+ },
67
+ {
68
+ name: "children",
69
+ title: "内容",
70
+ setter: {
71
+ componentName: "SlotSetter",
72
+ initialValue: {
73
+ type: "JSSlot",
74
+ value: [],
76
75
  },
77
76
  },
78
- ],
79
- },
80
- },
81
- initialValue: () => {
82
- return {
83
- key: uuid(),
84
- label: '标签项',
85
- span: 1,
86
- children: {
87
- type: 'JSSlot',
88
- value: [],
89
77
  },
90
- };
78
+ ],
91
79
  },
92
80
  },
93
- },
94
- },
95
- extraProps: {
96
- getValue(target, fieldValue) {
97
- const map = target.node.children.map((child) => {
98
- const key = child.getPropValue('key') ? String(child.getPropValue('key')) : child.id;
81
+ initialValue: () => {
99
82
  return {
100
- key,
101
- label: child.getPropValue('label'),
102
- span: child.getPropValue('span'),
103
- children: child.getPropValue('children'),
83
+ key: uuid(),
84
+ label: "标签项",
85
+ span: 1,
86
+ children: {
87
+ type: "JSSlot",
88
+ value: [],
89
+ },
104
90
  };
105
- });
106
- return map;
91
+ },
107
92
  },
108
- setValue(target, value) {
109
- const { node } = target;
110
- const map = {};
93
+ },
94
+ },
95
+ extraProps: {
96
+ getValue(target, fieldValue) {
97
+ const map = target.node.children.map((child) => {
98
+ const key = child.getPropValue("key")
99
+ ? String(child.getPropValue("key"))
100
+ : child.id;
101
+ return {
102
+ key,
103
+ label: child.getPropValue("label"),
104
+ span: child.getPropValue("span"),
105
+ children: child.getPropValue("children"),
106
+ };
107
+ });
108
+ return map;
109
+ },
110
+ setValue(target, value) {
111
+ const { node } = target;
112
+ const map = {};
111
113
 
112
- if (!Array.isArray(value)) {
113
- value = [];
114
- }
115
- value.forEach((item) => {
116
- const tabItem = Object.assign({}, item);
117
- map[item.key] = tabItem;
118
- });
114
+ if (!Array.isArray(value)) {
115
+ value = [];
116
+ }
117
+ value.forEach((item) => {
118
+ const tabItem = Object.assign({}, item);
119
+ map[item.key] = tabItem;
120
+ });
119
121
 
120
- node.children.mergeChildren(
121
- (child) => {
122
- const key = String(child.getPropValue('key'));
122
+ node.children.mergeChildren(
123
+ (child) => {
124
+ const key = String(child.getPropValue("key"));
125
+ if (Object.hasOwnProperty.call(map, key)) {
126
+ child.setPropValue("label", map[key].label);
127
+ child.setPropValue("span", map[key].span);
128
+ child.setPropValue("children", map[key].children);
129
+ delete map[key];
130
+ return false;
131
+ }
132
+ return true;
133
+ },
134
+ () => {
135
+ const items = [];
136
+ for (const key in map) {
123
137
  if (Object.hasOwnProperty.call(map, key)) {
124
- child.setPropValue('label', map[key].label);
125
- child.setPropValue('span', map[key].span);
126
- child.setPropValue('children', map[key].children);
127
- delete map[key];
128
- return false;
129
- }
130
- return true;
131
- },
132
- () => {
133
- const items = [];
134
- for (const key in map) {
135
- if (Object.hasOwnProperty.call(map, key)) {
136
- items.push({
137
- componentName: 'Descriptions.Item',
138
- props: map[key],
139
- });
140
- }
138
+ items.push({
139
+ componentName: "Descriptions.Item",
140
+ props: map[key],
141
+ });
141
142
  }
142
- return items;
143
- },
144
- (child1, child2) => {
145
- const a = value.findIndex(
146
- (item) => String(item.key) === String(child1.getPropValue('key')),
147
- );
148
- const b = value.findIndex(
149
- (item) => String(item.key) === String(child2.getPropValue('key')),
150
- );
151
- return a - b;
152
- },
153
- );
154
- },
155
- // getValue(target, fieldValue) {
156
- // // const node = target.nodes[0];
157
- // // const children = node.getChildren();
158
- // const map = target.node.children.map(child => {
159
- // return {
160
- // key: child.getPropValue('key') || uuid(),
161
- // label: child.getPropValue('label'),
162
- // span: child.getPropValue('span'),
163
- // children: child.getPropValue('children'),
164
- // };
165
- // });
166
- // return map;
167
- // },
168
- // setValue(target, value) {
169
- // const node = target.node;
143
+ }
144
+ return items;
145
+ },
146
+ (child1, child2) => {
147
+ const a = value.findIndex(
148
+ (item) =>
149
+ String(item.key) === String(child1.getPropValue("key"))
150
+ );
151
+ const b = value.findIndex(
152
+ (item) =>
153
+ String(item.key) === String(child2.getPropValue("key"))
154
+ );
155
+ return a - b;
156
+ }
157
+ );
158
+ },
159
+ // getValue(target, fieldValue) {
160
+ // // const node = target.nodes[0];
161
+ // // const children = node.getChildren();
162
+ // const map = target.node.children.map(child => {
163
+ // return {
164
+ // key: child.getPropValue('key') || uuid(),
165
+ // label: child.getPropValue('label'),
166
+ // span: child.getPropValue('span'),
167
+ // children: child.getPropValue('children'),
168
+ // };
169
+ // });
170
+ // return map;
171
+ // },
172
+ // setValue(target, value) {
173
+ // const node = target.node;
170
174
 
171
- // if (!Array.isArray(value)) {
172
- // value = [];
173
- // }
175
+ // if (!Array.isArray(value)) {
176
+ // value = [];
177
+ // }
174
178
 
175
- // node.children.mergeChildren(
176
- // () => true,
177
- // () => {
178
- // return value.map(item => ({
179
- // componentName: 'Descriptions.Item',
180
- // props: Object.assign({}, item),
181
- // }));
182
- // }
183
- // );
184
- // },
185
- },
179
+ // node.children.mergeChildren(
180
+ // () => true,
181
+ // () => {
182
+ // return value.map(item => ({
183
+ // componentName: 'Descriptions.Item',
184
+ // props: Object.assign({}, item),
185
+ // }));
186
+ // }
187
+ // );
188
+ // },
186
189
  },
187
- {
188
- name: 'bordered',
189
- title: { label: '显示边框', tip: '是否展示边框' },
190
- propType: 'bool',
191
- defaultValue: false,
190
+ },
191
+ {
192
+ name: "bordered",
193
+ title: { label: "显示边框", tip: "是否展示边框" },
194
+ propType: "bool",
195
+ defaultValue: false,
196
+ },
197
+ {
198
+ name: "column",
199
+ title: {
200
+ label: "列数",
201
+ tip: "一行的列表项数量",
192
202
  },
193
- {
194
- name: 'column',
195
- title: {
196
- label: '列数',
197
- tip: '一行的列表项数量',
198
- },
199
- propType: 'number',
200
- defaultValue: 3,
203
+ propType: "number",
204
+ defaultValue: 3,
205
+ },
206
+ {
207
+ name: "size",
208
+ title: {
209
+ label: "尺寸",
210
+ tip: "设置列表的大小。可以设置为 `middle` 、`small`, 或不填(只有设置 `bordered={true}` 生效)",
201
211
  },
202
- {
203
- name: 'size',
204
- title: {
205
- label: '尺寸',
206
- tip:
207
- '设置列表的大小。可以设置为 `middle` 、`small`, 或不填(只有设置 `bordered={true}` 生效)',
208
- },
209
- propType: { type: 'oneOf', value: ['default', 'middle', 'small'] },
210
- defaultValue: 'middle',
212
+ propType: { type: "oneOf", value: ["default", "middle", "small"] },
213
+ defaultValue: "middle",
214
+ },
215
+ {
216
+ name: "layout",
217
+ title: { label: "布局方向", tip: "描述布局" },
218
+ propType: { type: "oneOf", value: ["horizontal", "vertical"] },
219
+ defaultValue: "horizontal",
220
+ },
221
+ {
222
+ name: "colon",
223
+ title: {
224
+ label: "展示冒号",
225
+ tip: "配置 `Descriptions.Item` 的 `colon` 的默认值",
211
226
  },
212
- {
213
- name: 'layout',
214
- title: { label: '布局方向', tip: '描述布局' },
215
- propType: { type: 'oneOf', value: ['horizontal', 'vertical'] },
216
- defaultValue: 'horizontal',
217
- },
218
- {
219
- name: 'colon',
220
- title: {
221
- label: '展示冒号',
222
- tip: '配置 `Descriptions.Item` 的 `colon` 的默认值',
223
- },
224
- propType: 'bool',
225
- defaultValue: true,
226
- },
227
- ],
227
+ propType: "bool",
228
+ defaultValue: true,
229
+ },
230
+ ],
231
+ configure: {
228
232
  supports: { style: true },
229
233
  },
230
234
  };
@@ -29,6 +29,7 @@ export default {
29
29
  tip: '标题',
30
30
  },
31
31
  propType: 'string',
32
+ setter: 'PisellI18nSetter',
32
33
  },
33
34
  ],
34
35
  component: { isContainer: true },
@@ -16,52 +16,52 @@ export default {
16
16
  destructuring: true,
17
17
  subName: "",
18
18
  },
19
- configure: {
20
- props: [
21
- {
22
- name: "className",
23
- title: { label: "分割线样式类", tip: "分割线样式类" },
24
- propType: "string",
25
- },
26
- {
27
- name: "dashed",
28
- title: { label: "是否虚线", tip: "是否虚线" },
29
- propType: "bool",
30
- defaultValue: false,
31
- },
32
- {
33
- name: "orientation",
34
- title: { label: "标题位置", tip: "分割线标题的位置" },
35
- propType: { type: "oneOf", value: ["left", "right", "center"] },
36
- },
37
- {
38
- name: "orientationMargin",
39
- title: {
40
- label: "标题边距",
41
- tip: "标题和最近 left/right 边框之间的距离,去除了分割线,同时 orientation 必须为 left 或 right",
42
- },
43
- propType: { type: "oneOfType", value: ["string", "number"] },
44
- },
45
- {
46
- name: "style",
47
- title: { label: "分割线样式对象", tip: "分割线样式对象" },
48
- propType: "object",
49
- },
50
- {
51
- name: "type",
52
- title: { label: "方向", tip: "水平还是垂直类型" },
53
- propType: { type: "oneOf", value: ["horizontal", "vertical"] },
19
+ props: [
20
+ {
21
+ name: "className",
22
+ title: { label: "分割线样式类", tip: "分割线样式类" },
23
+ propType: "string",
24
+ },
25
+ {
26
+ name: "dashed",
27
+ title: { label: "是否虚线", tip: "是否虚线" },
28
+ propType: "bool",
29
+ defaultValue: false,
30
+ },
31
+ {
32
+ name: "orientation",
33
+ title: { label: "标题位置", tip: "分割线标题的位置" },
34
+ propType: { type: "oneOf", value: ["left", "right", "center"] },
35
+ },
36
+ {
37
+ name: "orientationMargin",
38
+ title: {
39
+ label: "标题边距",
40
+ tip: "标题和最近 left/right 边框之间的距离,去除了分割线,同时 orientation 必须为 left 或 right",
54
41
  },
55
- {
56
- name: "plain",
57
- title: {
58
- label: "普通正文样式",
59
- tip: "文字是否显示为普通正文样式",
60
- },
61
- propType: "bool",
62
- defaultValue: false,
42
+ propType: { type: "oneOfType", value: ["string", "number"] },
43
+ },
44
+ {
45
+ name: "style",
46
+ title: { label: "分割线样式对象", tip: "分割线样式对象" },
47
+ propType: "object",
48
+ },
49
+ {
50
+ name: "type",
51
+ title: { label: "方向", tip: "水平还是垂直类型" },
52
+ propType: { type: "oneOf", value: ["horizontal", "vertical"] },
53
+ },
54
+ {
55
+ name: "plain",
56
+ title: {
57
+ label: "普通正文样式",
58
+ tip: "文字是否显示为普通正文样式",
63
59
  },
64
- ],
60
+ propType: "bool",
61
+ defaultValue: false,
62
+ },
63
+ ],
64
+ configure: {
65
65
  component: {
66
66
  isContainer: true,
67
67
  },
@@ -34,7 +34,7 @@ export default {
34
34
  title: { label: '标题', tip: 'title | 标题' },
35
35
  propType: { type: 'oneOfType', value: ['string', 'node'] },
36
36
  setter: [
37
- 'StringSetter',
37
+ 'PisellI18nSetter',
38
38
  {
39
39
  componentName: 'SlotSetter',
40
40
  title: '标题插槽',