formiojs-eorion 0.1.0 → 0.1.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 (45) hide show
  1. package/Formio.js +1 -1
  2. package/components/CustomTabs/Tabs.form.js +22 -0
  3. package/components/CustomTabs/Tabs.js +355 -0
  4. package/components/CustomTabs/Tabs.unit.js +43 -0
  5. package/components/CustomTabs/editForm/Tabs.edit.display.js +112 -0
  6. package/components/CustomTabs/fixtures/comp1.js +33 -0
  7. package/components/CustomTabs/fixtures/index.js +13 -0
  8. package/components/DataChinaGrid/Data.form.js +19 -0
  9. package/components/DataChinaGrid/Data.js +261 -0
  10. package/components/DataChinaGrid/editForm/Data.edit.display.js +478 -0
  11. package/components/DataChinaGridRow/Data.form.js +19 -0
  12. package/components/DataChinaGridRow/Data.js +266 -0
  13. package/components/DataChinaGridRow/editForm/Data.edit.display.js +485 -0
  14. package/components/FileDownload/FileDownload.js +1 -1
  15. package/components/Flex/editForm/Flex.edit.display.js +12 -0
  16. package/components/builder.js +6 -0
  17. package/components/index.js +7 -1
  18. package/dist/formio.builder.css +23 -0
  19. package/dist/formio.builder.min.css +1 -1
  20. package/dist/formio.contrib.js +76 -3
  21. package/dist/formio.contrib.min.js +1 -1
  22. package/dist/formio.contrib.min.js.LICENSE.txt +1 -1
  23. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  24. package/dist/formio.form.js +179 -7
  25. package/dist/formio.form.min.js +1 -1
  26. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  27. package/dist/formio.full.css +23 -0
  28. package/dist/formio.full.js +179 -7
  29. package/dist/formio.full.min.css +1 -1
  30. package/dist/formio.full.min.js +1 -1
  31. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  32. package/dist/formio.js +1 -1
  33. package/dist/formio.min.js +1 -1
  34. package/dist/formio.min.js.LICENSE.txt +1 -1
  35. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  36. package/package.json +1 -1
  37. package/templates/bootstrap/customTab/flat.ejs.js +19 -0
  38. package/templates/bootstrap/customTab/form.ejs.js +41 -0
  39. package/templates/bootstrap/customTab/index.js +14 -0
  40. package/templates/bootstrap/dataChinaGrid/form.ejs.js +61 -0
  41. package/templates/bootstrap/dataChinaGrid/index.js +12 -0
  42. package/templates/bootstrap/dataChinaGridRow/form.ejs.js +63 -0
  43. package/templates/bootstrap/dataChinaGridRow/index.js +12 -0
  44. package/templates/bootstrap/flex/form.ejs.js +27 -3
  45. package/templates/bootstrap/index.js +7 -1
@@ -0,0 +1,478 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ require("core-js/modules/es.object.to-string.js");
8
+ require("core-js/modules/web.dom-collections.for-each.js");
9
+ var _default = [{
10
+ type: 'panel',
11
+ title: '标题',
12
+ collapsible: true,
13
+ collapsed: false,
14
+ weight: 1,
15
+ components: [{
16
+ type: 'input',
17
+ label: '显示值',
18
+ key: 'title-content',
19
+ tooltip: '可输入html元素 ex:${data.Id}-<a>${data.Name}</a>',
20
+ input: true
21
+ }, {
22
+ type: 'select',
23
+ label: '对齐方式',
24
+ data: {
25
+ values: [{
26
+ label: '居中',
27
+ value: 'center'
28
+ }, {
29
+ label: '左对齐',
30
+ value: 'start'
31
+ }, {
32
+ label: '右对齐',
33
+ value: 'end'
34
+ }]
35
+ },
36
+ key: 'title-align',
37
+ input: true,
38
+ defaultValue: 'center',
39
+ dataSrc: 'values'
40
+ }, {
41
+ key: 'title-color',
42
+ type: 'input',
43
+ input: true,
44
+ defaultValue: '#000000',
45
+ label: '字体颜色'
46
+ }, {
47
+ key: 'title-font-size',
48
+ type: 'input',
49
+ input: true,
50
+ defaultValue: '10px',
51
+ label: '字体大小'
52
+ }, {
53
+ key: 'title-font-weight',
54
+ type: 'input',
55
+ input: true,
56
+ defaultValue: 'bold',
57
+ label: '字体粗细'
58
+ }]
59
+ }, {
60
+ type: 'panel',
61
+ title: '内容',
62
+ collapsible: true,
63
+ collapsed: false,
64
+ weight: 2,
65
+ components: [{
66
+ type: 'input',
67
+ label: '显示值',
68
+ key: 'value-content',
69
+ tooltip: '可输入html元素 ex:${data.Id}-<a>${data.Name}</a>',
70
+ input: true
71
+ }, {
72
+ type: 'select',
73
+ label: '对齐方式',
74
+ data: {
75
+ values: [{
76
+ label: '居中',
77
+ value: 'center'
78
+ }, {
79
+ label: '左对齐',
80
+ value: 'start'
81
+ }, {
82
+ label: '右对齐',
83
+ value: 'end'
84
+ }]
85
+ },
86
+ key: 'value-align',
87
+ input: true,
88
+ defaultValue: 'center',
89
+ dataSrc: 'values'
90
+ }, {
91
+ key: 'value-color',
92
+ type: 'input',
93
+ input: true,
94
+ defaultValue: '#000000',
95
+ label: '字体颜色'
96
+ }, {
97
+ key: 'value-size',
98
+ type: 'input',
99
+ input: true,
100
+ defaultValue: '#000000',
101
+ label: '字体大小'
102
+ }, {
103
+ key: 'value-font-weight',
104
+ type: 'input',
105
+ input: true,
106
+ defaultValue: 'bold',
107
+ label: '字体粗细'
108
+ }]
109
+ }, {
110
+ type: 'panel',
111
+ title: '页脚',
112
+ collapsible: true,
113
+ collapsed: false,
114
+ weight: 3,
115
+ components: [{
116
+ type: 'input',
117
+ label: '显示值1',
118
+ key: 'footer-content1',
119
+ tooltip: '可输入html元素 ex:${data.Id}-<a>${data.Name}</a>',
120
+ input: true
121
+ }, {
122
+ type: 'input',
123
+ label: '显示值2',
124
+ key: 'footer-content2',
125
+ tooltip: '可输入html元素 ex:${data.Id}-<a>${data.Name}</a>',
126
+ input: true
127
+ }, {
128
+ type: 'panel',
129
+ title: '显示值3',
130
+ collapsible: true,
131
+ collapsed: false,
132
+ weight: 3,
133
+ components: [{
134
+ type: 'input',
135
+ label: '内容',
136
+ key: 'footer-content3',
137
+ tooltip: '可输入html元素 ex:${data.Id}-<a>${data.Name}</a>',
138
+ input: true
139
+ }, {
140
+ type: 'select',
141
+ label: '显示样式',
142
+ data: {
143
+ values: [{
144
+ label: '普通文本',
145
+ value: 'text'
146
+ }, {
147
+ label: 'badge',
148
+ value: 'badge'
149
+ }]
150
+ },
151
+ key: 'footer-content3-style',
152
+ input: true,
153
+ defaultValue: 'text',
154
+ dataSrc: 'values'
155
+ }, {
156
+ type: 'input',
157
+ label: '圆角',
158
+ key: 'footer-content3-radius',
159
+ input: true,
160
+ conditional: {
161
+ json: {
162
+ in: [{
163
+ var: 'data.footer-content3-style'
164
+ }, ['badge']]
165
+ }
166
+ }
167
+ }, {
168
+ type: 'input',
169
+ label: '颜色',
170
+ key: 'footer-content3-color',
171
+ input: true
172
+ }]
173
+ }, {
174
+ type: 'select',
175
+ label: '对齐方式',
176
+ data: {
177
+ values: [{
178
+ label: '居中',
179
+ value: 'center'
180
+ }, {
181
+ label: '左对齐',
182
+ value: 'start'
183
+ }, {
184
+ label: '右对齐',
185
+ value: 'end'
186
+ }]
187
+ },
188
+ key: 'footer-align',
189
+ input: true,
190
+ defaultValue: 'center',
191
+ dataSrc: 'values'
192
+ }, {
193
+ key: 'footer-color',
194
+ type: 'input',
195
+ input: true,
196
+ defaultValue: '#000000',
197
+ label: '字体颜色'
198
+ }, {
199
+ key: 'footer-size',
200
+ type: 'input',
201
+ input: true,
202
+ defaultValue: '#000000',
203
+ label: '字体大小'
204
+ }, {
205
+ type: 'panel',
206
+ title: '统计图表',
207
+ collapsible: true,
208
+ collapsed: false,
209
+ components: [{
210
+ type: 'checkbox',
211
+ label: '启用',
212
+ key: 'enable-sparkline',
213
+ defaultValue: false
214
+ }, {
215
+ key: 'sparkLine-type',
216
+ data: {
217
+ values: [{
218
+ label: 'Line Charts',
219
+ value: 'line'
220
+ }, {
221
+ label: 'Pie Charts',
222
+ value: 'pie'
223
+ }, {
224
+ label: 'Donut Charts',
225
+ value: 'donut'
226
+ }, {
227
+ label: 'Bar Charts',
228
+ value: 'bar'
229
+ }]
230
+ },
231
+ type: 'select',
232
+ input: true,
233
+ defaultValue: 'line',
234
+ label: 'Type',
235
+ dataSrc: 'values'
236
+ }, {
237
+ type: 'number',
238
+ label: 'width',
239
+ key: 'sparkLine-width',
240
+ input: true,
241
+ tooltip: '',
242
+ defaultValue: 32
243
+ }, {
244
+ type: 'number',
245
+ label: 'height',
246
+ key: 'sparkLine-height',
247
+ input: true,
248
+ tooltip: '',
249
+ defaultValue: 16
250
+ }, {
251
+ type: 'number',
252
+ label: 'MaxValueCount',
253
+ key: 'sparkLine-max-value-count',
254
+ defaultValue: 10,
255
+ input: true,
256
+ tooltip: ''
257
+ }, {
258
+ type: 'input',
259
+ label: 'Values',
260
+ key: 'sparkLine-value',
261
+ input: true,
262
+ tooltip: ''
263
+ }, {
264
+ type: 'input',
265
+ label: 'FillColor',
266
+ key: 'sparkLine-fill-color',
267
+ input: true,
268
+ tooltip: '多个颜色用逗号隔开',
269
+ placeholder: '#c6d9fd,#000000',
270
+ defaultValue: ''
271
+ }, {
272
+ type: 'input',
273
+ label: 'StrokeColor',
274
+ key: 'sparkLine-stroke-color',
275
+ input: true,
276
+ tooltip: '',
277
+ defaultValue: ''
278
+ }]
279
+ }]
280
+ }, {
281
+ type: 'input',
282
+ label: 'BackgroundColor',
283
+ key: 'bgColor',
284
+ input: true,
285
+ tooltip: '',
286
+ weight: 2,
287
+ defaultValue: '#ffffff'
288
+ }, {
289
+ type: 'panel',
290
+ title: '点击事件',
291
+ collapsible: true,
292
+ collapsed: false,
293
+ weight: 5,
294
+ components: [{
295
+ key: 'click-event-type',
296
+ data: {
297
+ values: [{
298
+ label: '跳转新页面',
299
+ value: 'newPage'
300
+ }, {
301
+ label: '打开弹窗',
302
+ value: 'bottomSheet'
303
+ }, {
304
+ label: '切换标签',
305
+ value: 'setTab'
306
+ }]
307
+ },
308
+ type: 'select',
309
+ input: true,
310
+ label: '事件类型',
311
+ dataSrc: 'values'
312
+ }, {
313
+ type: 'select',
314
+ input: true,
315
+ key: 'click-event-tab-id',
316
+ label: '选择切换的tabs',
317
+ dataSrc: 'custom',
318
+ valueProperty: 'value',
319
+ data: {
320
+ custom: function custom(context) {
321
+ var values = [];
322
+ context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {
323
+ if (component.key !== context.data.key && component.type === 'customTabs') {
324
+ values.push({
325
+ label: component.label || component.key,
326
+ value: path
327
+ });
328
+ }
329
+ }, true);
330
+ return values;
331
+ }
332
+ },
333
+ conditional: {
334
+ json: {
335
+ in: [{
336
+ var: 'data.click-event-type'
337
+ }, ['setTab']]
338
+ }
339
+ }
340
+ }, {
341
+ type: 'select',
342
+ input: true,
343
+ key: 'click-event-tab-key',
344
+ label: '选择切换到的tab位置',
345
+ dataSrc: 'custom',
346
+ valueProperty: 'value',
347
+ data: {
348
+ custom: function custom(context) {
349
+ var values = [];
350
+ context.utils.eachComponent(context.instance.options.editForm.components, function (component, path) {
351
+ if (component.key === context.data['click-event-tab-id']) {
352
+ component.components.forEach(function (tab) {
353
+ values.push({
354
+ label: tab.label || tab.key,
355
+ value: tab.key
356
+ });
357
+ });
358
+ }
359
+ }, true);
360
+ return values;
361
+ }
362
+ },
363
+ conditional: {
364
+ json: {
365
+ in: [{
366
+ var: 'data.click-event-type'
367
+ }, ['setTab']]
368
+ }
369
+ }
370
+ }, {
371
+ type: 'input',
372
+ label: 'FormId',
373
+ key: 'click-event-form-id',
374
+ input: true,
375
+ tooltip: '',
376
+ conditional: {
377
+ json: {
378
+ in: [{
379
+ var: 'data.click-event-type'
380
+ }, ['newPage', 'bottomSheet']]
381
+ }
382
+ },
383
+ validate: {
384
+ required: true
385
+ }
386
+ }, {
387
+ type: 'input',
388
+ label: '流程定义keys',
389
+ key: 'click-event-process-def-keys',
390
+ input: true,
391
+ tooltip: '',
392
+ conditional: {
393
+ json: {
394
+ in: [{
395
+ var: 'data.click-event-type'
396
+ }, ['processDefList', 'taskListPanel']]
397
+ }
398
+ },
399
+ validate: {
400
+ required: true
401
+ }
402
+ }, {
403
+ type: 'input',
404
+ label: '流程定义keys',
405
+ key: 'click-event-task-keys',
406
+ input: true,
407
+ tooltip: '',
408
+ conditional: {
409
+ json: {
410
+ '===': [{
411
+ var: 'data.click-event-type'
412
+ }, 'taskList']
413
+ }
414
+ },
415
+ validate: {
416
+ required: true
417
+ }
418
+ }, {
419
+ type: 'input',
420
+ label: '流程定义key',
421
+ key: 'click-event-process-def-key',
422
+ input: true,
423
+ tooltip: '',
424
+ conditional: {
425
+ json: {
426
+ '===': [{
427
+ var: 'data.click-event-type'
428
+ }, 'newProcessInstance']
429
+ }
430
+ },
431
+ validate: {
432
+ required: true
433
+ }
434
+ }]
435
+ }, {
436
+ key: 'labelPosition',
437
+ ignore: true
438
+ }, {
439
+ key: 'customClass',
440
+ ignore: false
441
+ }, {
442
+ key: 'placeholder',
443
+ ignore: true
444
+ }, {
445
+ key: 'hidden',
446
+ ignore: true
447
+ }, {
448
+ key: 'modalEdit',
449
+ ignore: true
450
+ }, {
451
+ key: 'tableView',
452
+ ignore: true
453
+ }, {
454
+ key: 'description',
455
+ ignore: true
456
+ }, {
457
+ key: 'hideLabel',
458
+ ignore: true
459
+ }, {
460
+ key: 'autofocus',
461
+ ignore: true
462
+ }, {
463
+ key: 'tooltip',
464
+ ignore: true
465
+ }, {
466
+ key: 'tabindex',
467
+ ignore: true
468
+ }, {
469
+ key: 'disabled',
470
+ ignore: true
471
+ }, {
472
+ key: 'label',
473
+ ignore: true
474
+ }, {
475
+ key: 'key',
476
+ ignore: true
477
+ }];
478
+ exports.default = _default;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = _default;
7
+ require("core-js/modules/es.array.concat.js");
8
+ var _NestedComponent = _interopRequireDefault(require("../_classes/nested/NestedComponent.form"));
9
+ var _DataEdit = _interopRequireDefault(require("./editForm/Data.edit.display"));
10
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
+ function _default() {
12
+ for (var _len = arguments.length, extend = new Array(_len), _key = 0; _key < _len; _key++) {
13
+ extend[_key] = arguments[_key];
14
+ }
15
+ return _NestedComponent.default.apply(void 0, [[{
16
+ key: 'display',
17
+ components: _DataEdit.default
18
+ }]].concat(extend));
19
+ }