@teamias/rex-design 0.0.1 → 0.0.2

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 (78) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +3 -3
  3. package/dist/components/action-buttons/action-buttons.d.ts +1 -1
  4. package/dist/components/action-buttons/action-buttons.js +86 -76
  5. package/dist/components/action-buttons/demo/index.js +61 -58
  6. package/dist/components/base-form/base-form.js +218 -215
  7. package/dist/components/base-form/demo/index.js +147 -135
  8. package/dist/components/base-form/modules/renderComponentNode.d.ts +2 -2
  9. package/dist/components/base-form/modules/renderComponentNode.js +135 -130
  10. package/dist/components/base-form/types.d.ts +1 -1
  11. package/dist/components/base-form/types.js +0 -9
  12. package/dist/components/base-list-table/base-list-table.d.ts +2 -2
  13. package/dist/components/base-list-table/base-list-table.js +156 -135
  14. package/dist/components/base-list-table/demo/BasicBaseListTable.js +22 -13
  15. package/dist/components/base-list-table/demo/NoData.js +2 -1
  16. package/dist/components/base-list-table/demo/TableMaxRowCount.js +1669 -1663
  17. package/dist/components/base-list-table/demo/VirtualDemo.js +22 -13
  18. package/dist/components/base-table/base-table.d.ts +2 -2
  19. package/dist/components/base-table/base-table.js +60 -55
  20. package/dist/components/base-table/components/BaseTableRow.js +79 -66
  21. package/dist/components/base-table/demo/BaseTableAll.js +6 -2
  22. package/dist/components/base-table/demo/BaseTableBasic.js +5 -2
  23. package/dist/components/base-table/demo/BaseTableIndex.js +48 -50
  24. package/dist/components/base-table/demo/BaseTableRowSelect.js +2 -1
  25. package/dist/components/data-cell/data-cell.js +5 -4
  26. package/dist/components/data-cell/demo/index.js +327 -309
  27. package/dist/components/data-cell/modules/cellItemMap.d.ts +2 -2
  28. package/dist/components/data-cell/modules/cellItemMap.js +184 -157
  29. package/dist/components/data-cell/types.d.ts +9 -9
  30. package/dist/components/icons/demo/index.js +44 -40
  31. package/dist/components/icons/icons.d.ts +1 -1
  32. package/dist/components/icons/icons.js +36 -26
  33. package/dist/components/index.d.ts +7 -0
  34. package/dist/components/index.js +7 -0
  35. package/dist/components/media-viewer/demo/index.js +24 -20
  36. package/dist/components/media-viewer/media-viewer.d.ts +1 -1
  37. package/dist/components/media-viewer/media-viewer.js +13 -12
  38. package/dist/context/index.d.ts +2 -0
  39. package/dist/context/index.js +2 -0
  40. package/dist/{hooks → context}/request-fields-container/demo/index.js +10 -5
  41. package/dist/{hooks → context}/request-fields-container/index.js +2 -2
  42. package/dist/{hooks → context}/request-fields-container/request-fields-container-context-provider.js +17 -12
  43. package/dist/context/request-fields-container/request-fields-container-hoc.d.ts +4 -0
  44. package/dist/{hooks → context}/request-fields-container/request-fields-container-hoc.js +0 -1
  45. package/dist/{hooks → context}/request-fields-container/use-request-fields-container.js +2 -2
  46. package/dist/{hooks → context}/rex-pro-config-provider/demo/index.js +9 -5
  47. package/dist/{hooks → context}/rex-pro-config-provider/index.js +2 -2
  48. package/dist/{hooks → context}/rex-pro-config-provider/rex-pro-config-context.js +0 -1
  49. package/dist/context/rex-pro-config-provider/rex-pro-config-provider.d.ts +5 -0
  50. package/dist/{hooks → context}/rex-pro-config-provider/rex-pro-config-provider.js +8 -6
  51. package/dist/hooks/index.d.ts +1 -0
  52. package/dist/hooks/index.js +1 -0
  53. package/dist/hooks/use-state-data/use-state-data.js +4 -4
  54. package/dist/index.d.ts +3 -10
  55. package/dist/index.js +3 -10
  56. package/dist/{components/base-form/locales → locales}/en-US.json +30 -21
  57. package/dist/{components/base-form/locales → locales}/zh-CN.json +30 -21
  58. package/dist/types/svg.d.ts +3 -3
  59. package/package.json +38 -33
  60. package/dist/components/base-form/locales.index.d.ts +0 -42
  61. package/dist/components/base-form/locales.index.js +0 -4
  62. package/dist/hooks/request-fields-container/request-fields-container-hoc.d.ts +0 -4
  63. package/dist/hooks/rex-pro-config-provider/rex-pro-config-provider.d.ts +0 -6
  64. package/dist/utils/locales/en-US.json +0 -13
  65. package/dist/utils/locales/index.d.ts +0 -26
  66. package/dist/utils/locales/index.js +0 -4
  67. package/dist/utils/locales/zh-CN.json +0 -13
  68. package/dist/{hooks → context}/request-fields-container/demo/index.d.ts +0 -0
  69. package/dist/{hooks → context}/request-fields-container/index.d.ts +2 -2
  70. package/dist/{hooks → context}/request-fields-container/request-fields-container-context-provider.d.ts +0 -0
  71. package/dist/{hooks → context}/request-fields-container/request-fields-container-context.d.ts +0 -0
  72. package/dist/{hooks → context}/request-fields-container/request-fields-container-context.js +0 -0
  73. package/dist/{hooks → context}/request-fields-container/use-request-fields-container.d.ts +0 -0
  74. package/dist/{hooks → context}/rex-pro-config-provider/demo/index.d.ts +0 -0
  75. package/dist/{hooks → context}/rex-pro-config-provider/index.d.ts +1 -1
  76. /package/dist/{hooks → context}/rex-pro-config-provider/rex-pro-config-context.d.ts +0 -0
  77. /package/dist/{hooks → context}/rex-pro-config-provider/use-rex-pro-config-provider.d.ts +0 -0
  78. /package/dist/{hooks → context}/rex-pro-config-provider/use-rex-pro-config-provider.js +0 -0
@@ -1,332 +1,350 @@
1
- import React from "react";
2
1
  import { DataCell } from "../../..";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Fragment as _Fragment } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
3
5
  export default (function () {
4
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(DataCell, {
5
- items: [{
6
- "type": "text",
7
- "props": {
8
- "label": "中文",
9
- "value": 1075
10
- }
11
- }, {
12
- "type": "img",
13
- "props": {
14
- "label": "ssss",
15
- value: 'http://'
16
- }
17
- }, {
18
- "type": "tag",
19
- "props": {
20
- "label": "ssss",
21
- value: 'http://'
22
- }
23
- }, {
24
- "type": "link",
25
- "props": {
26
- "label": "ssss",
27
- value: 'http://'
28
- }
29
- }, {
30
- "type": "icon",
31
- "props": {
32
- "label": "iconify",
33
- value: 'svg-spinners:ring-resize'
34
- }
35
- }, {
36
- "type": "link-group",
37
- "props": {
38
- items: [{
39
- "label": "ssss",
40
- value: 'http://',
41
- action: 'url',
6
+ return /*#__PURE__*/_jsxs(_Fragment, {
7
+ children: [/*#__PURE__*/_jsx(DataCell, {
8
+ items: [{
9
+ type: 'text',
10
+ props: {
11
+ label: '中文',
12
+ value: 1075
13
+ }
14
+ }, {
15
+ type: 'img',
16
+ props: {
17
+ label: 'ssss',
18
+ value: 'http://'
19
+ }
20
+ }, {
21
+ type: 'tag',
22
+ props: {
23
+ label: 'ssss',
24
+ value: 'http://'
25
+ }
26
+ }, {
27
+ type: 'link',
28
+ props: {
29
+ label: 'ssss',
30
+ value: 'http://'
31
+ }
32
+ }, {
33
+ type: 'icon',
34
+ props: {
35
+ label: 'iconify',
36
+ value: 'svg-spinners:ring-resize'
37
+ }
38
+ }, {
39
+ type: 'link-group',
40
+ props: {
41
+ items: [{
42
+ label: 'ssss',
43
+ value: 'http://',
44
+ action: 'url',
45
+ style: {
46
+ color: 'red'
47
+ }
48
+ }, {
49
+ label: 'ssss',
50
+ value: 'http://',
51
+ action: 'url'
52
+ }]
53
+ }
54
+ }, {
55
+ type: 'group',
56
+ props: {
42
57
  style: {
43
- color: 'red'
44
- }
45
- }, {
46
- "label": "ssss",
47
- value: 'http://',
48
- action: 'url'
49
- }]
50
- }
51
- }, {
52
- type: 'group',
53
- props: {
54
- style: {
55
- display: 'inline-flex',
56
- flexDirection: 'column',
57
- gap: 10
58
- },
59
- items: [{
60
- "type": "icon",
61
- "props": {
62
- "label": "iconify",
63
- value: 'svg-spinners:ring-resize'
64
- }
65
- }, {
66
- "type": "text",
67
- "props": {
68
- "label": "中文",
69
- "value": 1075
70
- }
71
- }]
72
- }
73
- }]
74
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
75
- items: [{
76
- "type": "text",
77
- "props": {
78
- "label": "中文",
79
- "value": 1075,
80
- copyable: true
81
- }
82
- }, {
83
- "type": "text",
84
- "props": {
85
- "label": "中文2",
86
- "value": {
87
- "type": "img",
88
- "props": {
89
- "label": "ssss",
90
- value: 'http://'
58
+ display: 'inline-flex',
59
+ flexDirection: 'column',
60
+ gap: 10
61
+ },
62
+ items: [{
63
+ type: 'icon',
64
+ props: {
65
+ label: 'iconify',
66
+ value: 'svg-spinners:ring-resize'
67
+ }
68
+ }, {
69
+ type: 'text',
70
+ props: {
71
+ label: '中文',
72
+ value: 1075
73
+ }
74
+ }]
75
+ }
76
+ }]
77
+ }), /*#__PURE__*/_jsx("span", {
78
+ children: "-------------------------------------"
79
+ }), /*#__PURE__*/_jsx(DataCell, {
80
+ items: [{
81
+ type: 'text',
82
+ props: {
83
+ label: '中文',
84
+ value: 1075,
85
+ copyable: true
86
+ }
87
+ }, {
88
+ type: 'text',
89
+ props: {
90
+ label: '中文2',
91
+ value: {
92
+ type: 'img',
93
+ props: {
94
+ label: 'ssss',
95
+ value: 'http://'
96
+ }
91
97
  }
92
98
  }
93
- }
94
- }, {
95
- "type": "text",
96
- "props": {
97
- "label": "中文2",
98
- "value": {
99
- "type": "tag",
100
- "props": {
101
- "label": "ssss",
102
- value: 'http://'
99
+ }, {
100
+ type: 'text',
101
+ props: {
102
+ label: '中文2',
103
+ value: {
104
+ type: 'tag',
105
+ props: {
106
+ label: 'ssss',
107
+ value: 'http://'
108
+ }
103
109
  }
104
110
  }
105
- }
106
- }, {
107
- "type": "text",
108
- "props": {
109
- "label": "中文2",
110
- "value": {
111
- "type": "link",
112
- "props": {
113
- "label": "ssss",
114
- value: 'http://',
115
- copyable: "自定义内容"
111
+ }, {
112
+ type: 'text',
113
+ props: {
114
+ label: '中文2',
115
+ value: {
116
+ type: 'link',
117
+ props: {
118
+ label: 'ssss',
119
+ value: 'http://',
120
+ copyable: '自定义内容'
121
+ }
116
122
  }
117
123
  }
118
- }
119
- }, {
120
- "type": "text",
121
- "props": {
122
- "label": "中文2",
123
- "value": {
124
- "type": "icon",
125
- "props": {
126
- "label": "iconify",
127
- value: 'svg-spinners:ring-resize'
124
+ }, {
125
+ type: 'text',
126
+ props: {
127
+ label: '中文2',
128
+ value: {
129
+ type: 'icon',
130
+ props: {
131
+ label: 'iconify',
132
+ value: 'svg-spinners:ring-resize'
133
+ }
128
134
  }
129
135
  }
130
- }
131
- }, {
132
- "type": "text",
133
- "props": {
134
- "label": "中文2",
135
- "value": {
136
- "type": "link-group",
137
- "props": {
138
- items: [{
139
- "label": "ssss",
140
- value: 'http://',
141
- action: 'url',
142
- style: {
143
- color: 'red'
144
- }
145
- }, {
146
- "label": "ssss",
147
- value: 'http://',
148
- action: 'url'
149
- }]
136
+ }, {
137
+ type: 'text',
138
+ props: {
139
+ label: '中文2',
140
+ value: {
141
+ type: 'link-group',
142
+ props: {
143
+ items: [{
144
+ label: 'ssss',
145
+ value: 'http://',
146
+ action: 'url',
147
+ style: {
148
+ color: 'red'
149
+ }
150
+ }, {
151
+ label: 'ssss',
152
+ value: 'http://',
153
+ action: 'url'
154
+ }]
155
+ }
150
156
  }
151
157
  }
152
- }
153
- }, {
154
- "type": "text",
155
- "props": {
156
- "label": "中文2",
157
- "value": {
158
- type: 'group',
159
- props: {
160
- items: [{
161
- "type": "icon",
162
- "props": {
163
- "label": "iconify",
164
- value: 'svg-spinners:ring-resize'
165
- }
166
- }, {
167
- "type": "text",
168
- "props": {
169
- "label": "中文",
170
- "value": 1075
171
- }
172
- }]
158
+ }, {
159
+ type: 'text',
160
+ props: {
161
+ label: '中文2',
162
+ value: {
163
+ type: 'group',
164
+ props: {
165
+ items: [{
166
+ type: 'icon',
167
+ props: {
168
+ label: 'iconify',
169
+ value: 'svg-spinners:ring-resize'
170
+ }
171
+ }, {
172
+ type: 'text',
173
+ props: {
174
+ label: '中文',
175
+ value: 1075
176
+ }
177
+ }]
178
+ }
173
179
  }
174
180
  }
175
- }
176
- }]
177
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
178
- items: [{
179
- "type": "img",
180
- "props": {
181
- "label": "ssss",
182
- value: 'http://'
183
- }
184
- }]
185
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
186
- items: [{
187
- "type": "tag",
188
- "props": {
189
- "label": "ssss",
190
- value: 'http://'
191
- }
192
- }]
193
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
194
- items: [{
195
- "type": "link",
196
- "props": {
197
- "label": "ssss",
198
- value: 'http://',
199
- action: 'url'
200
- }
201
- }, {
202
- "type": "link",
203
- "props": {
204
- "label": "ssss",
205
- value: 'http://',
206
- action: 'default',
207
- tooltip: '进7天数据',
208
- style: {
209
- color: 'red'
181
+ }]
182
+ }), /*#__PURE__*/_jsx("span", {
183
+ children: "-------------------------------------"
184
+ }), /*#__PURE__*/_jsx(DataCell, {
185
+ items: [{
186
+ type: 'img',
187
+ props: {
188
+ label: 'ssss',
189
+ value: 'http://'
190
+ }
191
+ }]
192
+ }), /*#__PURE__*/_jsx("span", {
193
+ children: "-------------------------------------"
194
+ }), /*#__PURE__*/_jsx(DataCell, {
195
+ items: [{
196
+ type: 'tag',
197
+ props: {
198
+ label: 'ssss',
199
+ value: 'http://'
200
+ }
201
+ }]
202
+ }), /*#__PURE__*/_jsx("span", {
203
+ children: "-------------------------------------"
204
+ }), /*#__PURE__*/_jsx(DataCell, {
205
+ items: [{
206
+ type: 'link',
207
+ props: {
208
+ label: 'ssss',
209
+ value: 'http://',
210
+ action: 'url'
210
211
  }
211
- }
212
- }, {
213
- "type": "link",
214
- "props": {
215
- "label": "ssss",
216
- value: 'http://',
217
- action: 'custom'
218
- }
219
- }]
220
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
221
- items: [{
222
- "type": "icon",
223
- "props": {
224
- "label": "iconify",
225
- value: 'svg-spinners:ring-resize'
226
- }
227
- }]
228
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
229
- items: [{
230
- "type": "link-group",
231
- "props": {
232
- items: [{
233
- "label": "ssss",
212
+ }, {
213
+ type: 'link',
214
+ props: {
215
+ label: 'ssss',
234
216
  value: 'http://',
235
- action: 'url',
217
+ action: 'default',
218
+ tooltip: '进7天数据',
236
219
  style: {
237
220
  color: 'red'
238
- },
239
- tooltip: '进7天数据'
240
- }, {
241
- "label": "ssss",
242
- value: 'http://',
243
- action: 'url'
244
- }]
245
- }
246
- }]
247
- }), /*#__PURE__*/React.createElement("span", null, "-------------------------------------"), /*#__PURE__*/React.createElement(DataCell, {
248
- items: [{
249
- type: 'group',
250
- props: {
251
- style: {
252
- display: 'inline-flex',
253
- flexDirection: 'column',
254
- gap: 10
255
- },
256
- items: [{
257
- "type": "icon",
258
- "props": {
259
- "label": "iconify",
260
- value: 'svg-spinners:ring-resize'
261
- }
262
- }, {
263
- "type": "text",
264
- "props": {
265
- "label": "中文",
266
- "value": 1075
267
- }
268
- }, {
269
- "type": "link-group",
270
- "props": {
271
- items: [{
272
- "label": "ssss",
273
- value: 'http://',
274
- action: 'url',
275
- style: {
276
- color: 'red'
277
- },
278
- tooltip: '进7天数据'
279
- }, {
280
- "label": "ssss",
281
- value: 'http://',
282
- action: 'url'
283
- }]
284
- }
285
- }]
286
- }
287
- }, {
288
- "type": "group",
289
- props: {
290
- "style": {
291
- "display": "inline-flex",
292
- "alignItems": "center",
293
- gap: 10
294
- },
295
- "items": [{
296
- "type": "img",
297
- "props": {
298
- "value": "http://image.spocoo.com/a5160c8d2dc02477ba82dd4f41b9cc6bjpg",
299
- "width": 50
300
221
  }
301
- }, {
302
- "type": "group",
303
- "props": {
222
+ }
223
+ }, {
224
+ type: 'link',
225
+ props: {
226
+ label: 'ssss',
227
+ value: 'http://',
228
+ action: 'custom'
229
+ }
230
+ }]
231
+ }), /*#__PURE__*/_jsx("span", {
232
+ children: "-------------------------------------"
233
+ }), /*#__PURE__*/_jsx(DataCell, {
234
+ items: [{
235
+ type: 'icon',
236
+ props: {
237
+ label: 'iconify',
238
+ value: 'svg-spinners:ring-resize'
239
+ }
240
+ }]
241
+ }), /*#__PURE__*/_jsx("span", {
242
+ children: "-------------------------------------"
243
+ }), /*#__PURE__*/_jsx(DataCell, {
244
+ items: [{
245
+ type: 'link-group',
246
+ props: {
247
+ items: [{
248
+ label: 'ssss',
249
+ value: 'http://',
250
+ action: 'url',
304
251
  style: {
305
- width: 140
252
+ color: 'red'
306
253
  },
307
- "items": [{
308
- "type": "text",
309
- "props": {
310
- "label": "类目",
311
- "value": "-",
312
- "width": 200
313
- }
314
- }, {
315
- "type": "text",
316
- "props": {
317
- "label": "开发员",
318
- "value": "0 (陈梦珂)"
319
- }
320
- }, {
321
- "type": "text",
322
- "props": {
323
- "label": "发布",
324
- "value": "2024-05-21"
325
- }
326
- }]
327
- }
328
- }]
329
- }
330
- }]
331
- }));
254
+ tooltip: '进7天数据'
255
+ }, {
256
+ label: 'ssss',
257
+ value: 'http://',
258
+ action: 'url'
259
+ }]
260
+ }
261
+ }]
262
+ }), /*#__PURE__*/_jsx("span", {
263
+ children: "-------------------------------------"
264
+ }), /*#__PURE__*/_jsx(DataCell, {
265
+ items: [{
266
+ type: 'group',
267
+ props: {
268
+ style: {
269
+ display: 'inline-flex',
270
+ flexDirection: 'column',
271
+ gap: 10
272
+ },
273
+ items: [{
274
+ type: 'icon',
275
+ props: {
276
+ label: 'iconify',
277
+ value: 'svg-spinners:ring-resize'
278
+ }
279
+ }, {
280
+ type: 'text',
281
+ props: {
282
+ label: '中文',
283
+ value: 1075
284
+ }
285
+ }, {
286
+ type: 'link-group',
287
+ props: {
288
+ items: [{
289
+ label: 'ssss',
290
+ value: 'http://',
291
+ action: 'url',
292
+ style: {
293
+ color: 'red'
294
+ },
295
+ tooltip: '进7天数据'
296
+ }, {
297
+ label: 'ssss',
298
+ value: 'http://',
299
+ action: 'url'
300
+ }]
301
+ }
302
+ }]
303
+ }
304
+ }, {
305
+ type: 'group',
306
+ props: {
307
+ style: {
308
+ display: 'inline-flex',
309
+ alignItems: 'center',
310
+ gap: 10
311
+ },
312
+ items: [{
313
+ type: 'img',
314
+ props: {
315
+ value: 'http://image.spocoo.com/a5160c8d2dc02477ba82dd4f41b9cc6bjpg',
316
+ width: 50
317
+ }
318
+ }, {
319
+ type: 'group',
320
+ props: {
321
+ style: {
322
+ width: 140
323
+ },
324
+ items: [{
325
+ type: 'text',
326
+ props: {
327
+ label: '类目',
328
+ value: '-',
329
+ width: 200
330
+ }
331
+ }, {
332
+ type: 'text',
333
+ props: {
334
+ label: '开发员',
335
+ value: '0 (陈梦珂)'
336
+ }
337
+ }, {
338
+ type: 'text',
339
+ props: {
340
+ label: '发布',
341
+ value: '2024-05-21'
342
+ }
343
+ }]
344
+ }
345
+ }]
346
+ }
347
+ }]
348
+ })]
349
+ });
332
350
  });
@@ -1,3 +1,3 @@
1
- import React from "react";
2
- import { TDataCellType, IDataCellProps, TGroupV2 } from "../types";
1
+ import React from 'react';
2
+ import { IDataCellProps, TDataCellType, TGroupV2 } from '../types';
3
3
  export declare const cellItemMap: Record<TDataCellType, (item: IDataCellProps['items'][number], click?: (rawItem: IDataCellProps['items'][number], subItem?: Exclude<TGroupV2['props'], undefined>['items'][number]) => void) => React.ReactNode>;