@formio/js 5.0.0-rc.39 → 5.0.0-rc.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (131) hide show
  1. package/dist/formio.builder.css +2 -2
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +2 -2
  7. package/dist/formio.form.js +5335 -2376
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +23 -5
  11. package/dist/formio.full.css +2 -2
  12. package/dist/formio.full.js +5663 -2696
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +23 -5
  16. package/dist/formio.js +72 -62
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +105 -96
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +4 -4
  22. package/lib/cjs/Element.js +1 -0
  23. package/lib/cjs/Embed.js +131 -131
  24. package/lib/cjs/Webform.js +36 -13
  25. package/lib/cjs/WebformBuilder.js +4 -2
  26. package/lib/cjs/Wizard.js +6 -1
  27. package/lib/cjs/components/_classes/component/Component.js +33 -22
  28. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  29. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +8 -0
  30. package/lib/cjs/components/_classes/component/fixtures/comp5.js +2 -2
  31. package/lib/cjs/components/_classes/multivalue/Multivalue.js +2 -2
  32. package/lib/cjs/components/_classes/nested/NestedComponent.js +2 -2
  33. package/lib/cjs/components/address/fixtures/comp3.js +1 -1
  34. package/lib/cjs/components/builder.js +0 -2
  35. package/lib/cjs/components/button/Button.js +7 -1
  36. package/lib/cjs/components/datagrid/DataGrid.js +16 -3
  37. package/lib/cjs/components/datagrid/fixtures/comp-with-allow-calculate-override.js +68 -0
  38. package/lib/cjs/components/datagrid/fixtures/comp6.js +1 -1
  39. package/lib/cjs/components/datagrid/fixtures/index.js +5 -1
  40. package/lib/cjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.js +104 -0
  41. package/lib/cjs/components/editgrid/EditGrid.js +11 -4
  42. package/lib/cjs/components/editgrid/fixtures/formsWithEditGridAndConditions.js +923 -0
  43. package/lib/cjs/components/file/File.js +2 -2
  44. package/lib/cjs/components/file/editForm/File.edit.file.js +1 -1
  45. package/lib/cjs/components/form/Form.js +1 -1
  46. package/lib/cjs/components/html/HTML.js +11 -2
  47. package/lib/cjs/components/html/fixtures/index.js +1 -3
  48. package/lib/cjs/components/index.js +0 -2
  49. package/lib/cjs/components/recaptcha/ReCaptcha.js +46 -46
  50. package/lib/cjs/components/select/Select.js +3 -1
  51. package/lib/cjs/components/select/fixtures/comp20.js +46 -0
  52. package/lib/cjs/components/select/fixtures/comp21.js +106 -0
  53. package/lib/cjs/components/select/fixtures/index.js +5 -1
  54. package/lib/cjs/components/selectboxes/SelectBoxes.js +1 -1
  55. package/lib/cjs/components/textfield/TextField.js +63 -3
  56. package/lib/cjs/providers/storage/s3.js +5 -3
  57. package/lib/cjs/providers/storage/uploadAdapter.js +1 -1
  58. package/lib/cjs/providers/storage/url.js +19 -13
  59. package/lib/cjs/providers/storage/util.js +2 -2
  60. package/lib/cjs/templates/Templates.js +4 -4
  61. package/lib/cjs/translations/en.js +10 -6
  62. package/lib/cjs/utils/Evaluator.js +1 -1
  63. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +1 -1
  64. package/lib/cjs/utils/formUtils.js +3 -3
  65. package/lib/cjs/utils/utils.js +4 -19
  66. package/lib/cjs/widgets/CalendarWidget.js +1 -1
  67. package/lib/mjs/Element.js +1 -0
  68. package/lib/mjs/Embed.js +1 -2
  69. package/lib/mjs/FormBuilder.js +1 -2
  70. package/lib/mjs/Webform.js +36 -13
  71. package/lib/mjs/WebformBuilder.js +4 -2
  72. package/lib/mjs/Wizard.js +6 -1
  73. package/lib/mjs/builders/Builders.js +1 -2
  74. package/lib/mjs/components/Components.js +1 -2
  75. package/lib/mjs/components/_classes/component/Component.js +33 -24
  76. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +1 -1
  77. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +8 -0
  78. package/lib/mjs/components/_classes/component/fixtures/comp5.js +2 -2
  79. package/lib/mjs/components/_classes/multivalue/Multivalue.js +2 -2
  80. package/lib/mjs/components/_classes/nested/NestedComponent.js +2 -2
  81. package/lib/mjs/components/address/fixtures/comp3.js +1 -1
  82. package/lib/mjs/components/builder.js +0 -2
  83. package/lib/mjs/components/button/Button.js +7 -1
  84. package/lib/mjs/components/datagrid/DataGrid.js +15 -3
  85. package/lib/mjs/components/datagrid/fixtures/comp-with-allow-calculate-override.js +66 -0
  86. package/lib/mjs/components/datagrid/fixtures/comp6.js +1 -1
  87. package/lib/mjs/components/datagrid/fixtures/index.js +3 -1
  88. package/lib/mjs/components/datagrid/fixtures/two-comp-with-allow-calculate-override.js +102 -0
  89. package/lib/mjs/components/editgrid/EditGrid.js +11 -4
  90. package/lib/mjs/components/editgrid/fixtures/formsWithEditGridAndConditions.js +921 -0
  91. package/lib/mjs/components/file/File.js +2 -2
  92. package/lib/mjs/components/file/editForm/File.edit.file.js +1 -1
  93. package/lib/mjs/components/form/Form.js +1 -1
  94. package/lib/mjs/components/html/HTML.js +10 -2
  95. package/lib/mjs/components/html/fixtures/index.js +1 -2
  96. package/lib/mjs/components/index.js +0 -2
  97. package/lib/mjs/components/recaptcha/ReCaptcha.js +32 -43
  98. package/lib/mjs/components/select/Select.js +3 -1
  99. package/lib/mjs/components/select/fixtures/comp20.js +44 -0
  100. package/lib/mjs/components/select/fixtures/comp21.js +104 -0
  101. package/lib/mjs/components/select/fixtures/index.js +3 -1
  102. package/lib/mjs/components/selectboxes/SelectBoxes.js +1 -1
  103. package/lib/mjs/components/textfield/TextField.js +62 -3
  104. package/lib/mjs/displays/Displays.js +1 -2
  105. package/lib/mjs/licenses/Licenses.js +1 -2
  106. package/lib/mjs/providers/Providers.js +1 -2
  107. package/lib/mjs/providers/storage/s3.js +5 -3
  108. package/lib/mjs/providers/storage/uploadAdapter.js +1 -1
  109. package/lib/mjs/providers/storage/url.js +19 -13
  110. package/lib/mjs/templates/Templates.js +1 -1
  111. package/lib/mjs/translations/en.js +10 -6
  112. package/lib/mjs/utils/Evaluator.js +1 -1
  113. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +1 -1
  114. package/lib/mjs/utils/formUtils.js +3 -3
  115. package/lib/mjs/utils/utils.js +2 -16
  116. package/lib/mjs/widgets/CalendarWidget.js +1 -1
  117. package/package.json +21 -20
  118. package/lib/cjs/components/html/fixtures/comp3.js +0 -31
  119. package/lib/cjs/components/resource/Resource.form.js +0 -16
  120. package/lib/cjs/components/resource/Resource.js +0 -39
  121. package/lib/cjs/components/resource/editForm/Resource.edit.display.js +0 -102
  122. package/lib/cjs/components/resource/fixtures/comp1.js +0 -30
  123. package/lib/cjs/components/resource/fixtures/comp2.js +0 -31
  124. package/lib/cjs/components/resource/fixtures/index.js +0 -10
  125. package/lib/mjs/components/html/fixtures/comp3.js +0 -29
  126. package/lib/mjs/components/resource/Resource.form.js +0 -10
  127. package/lib/mjs/components/resource/Resource.js +0 -33
  128. package/lib/mjs/components/resource/editForm/Resource.edit.display.js +0 -100
  129. package/lib/mjs/components/resource/fixtures/comp1.js +0 -28
  130. package/lib/mjs/components/resource/fixtures/comp2.js +0 -29
  131. package/lib/mjs/components/resource/fixtures/index.js +0 -3
@@ -0,0 +1,923 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const form1 = {
4
+ title: 'form1',
5
+ name: 'form1',
6
+ path: 'form1',
7
+ type: 'form',
8
+ display: 'form',
9
+ components: [
10
+ {
11
+ label: 'Checkbox',
12
+ tableView: false,
13
+ key: 'checkbox',
14
+ type: 'checkbox',
15
+ input: true,
16
+ },
17
+ {
18
+ collapsible: false,
19
+ key: 'panel',
20
+ conditional: {
21
+ show: true,
22
+ conjunction: 'all',
23
+ conditions: [
24
+ {
25
+ component: 'checkbox',
26
+ operator: 'isEqual',
27
+ value: true,
28
+ },
29
+ ],
30
+ },
31
+ type: 'panel',
32
+ label: 'Panel',
33
+ input: false,
34
+ tableView: false,
35
+ components: [
36
+ {
37
+ label: 'Radio',
38
+ optionsLabelPosition: 'right',
39
+ inline: false,
40
+ tableView: false,
41
+ values: [
42
+ {
43
+ label: 'yes',
44
+ value: 'yes',
45
+ shortcut: '',
46
+ },
47
+ {
48
+ label: 'no',
49
+ value: 'no',
50
+ shortcut: '',
51
+ },
52
+ ],
53
+ key: 'radio',
54
+ type: 'radio',
55
+ input: true,
56
+ },
57
+ {
58
+ label: 'Edit Grid',
59
+ tableView: false,
60
+ rowDrafts: false,
61
+ key: 'editGrid',
62
+ conditional: {
63
+ show: true,
64
+ conjunction: 'all',
65
+ conditions: [
66
+ {
67
+ component: 'radio',
68
+ operator: 'isEqual',
69
+ value: 'yes',
70
+ },
71
+ ],
72
+ },
73
+ type: 'editgrid',
74
+ displayAsTable: false,
75
+ input: true,
76
+ components: [
77
+ {
78
+ label: 'Text Field',
79
+ applyMaskOn: 'change',
80
+ tableView: true,
81
+ key: 'textField',
82
+ type: 'textfield',
83
+ input: true,
84
+ },
85
+ {
86
+ label: 'Number',
87
+ applyMaskOn: 'change',
88
+ mask: false,
89
+ tableView: true,
90
+ delimiter: false,
91
+ requireDecimal: false,
92
+ inputFormat: 'plain',
93
+ truncateMultipleSpaces: false,
94
+ calculateValue: 'value = row.textField.length;',
95
+ key: 'number',
96
+ type: 'number',
97
+ input: true,
98
+ },
99
+ ],
100
+ },
101
+ ],
102
+ },
103
+ {
104
+ type: 'button',
105
+ label: 'Submit',
106
+ key: 'submit',
107
+ disableOnInvalid: true,
108
+ input: true,
109
+ tableView: false,
110
+ },
111
+ ],
112
+ };
113
+ const form2 = {
114
+ title: 'form2',
115
+ name: 'testyyy',
116
+ path: 'testyyy',
117
+ type: 'form',
118
+ display: 'form',
119
+ components: [
120
+ {
121
+ label: 'Text Area',
122
+ autoExpand: false,
123
+ tableView: true,
124
+ key: 'textArea',
125
+ type: 'textarea',
126
+ input: true,
127
+ },
128
+ {
129
+ label: 'Edit Grid',
130
+ tableView: false,
131
+ rowDrafts: false,
132
+ key: 'editGrid1',
133
+ type: 'editgrid',
134
+ displayAsTable: false,
135
+ input: true,
136
+ components: [
137
+ {
138
+ label: 'Set Panel Value',
139
+ action: 'custom',
140
+ showValidations: false,
141
+ tableView: false,
142
+ key: 'setPanelValue',
143
+ type: 'button',
144
+ custom: "var rowIndex = instance.rowIndex;\nvar rowComponents = instance.parent?.editRows[rowIndex]?.components;\nvar panel = rowComponents?.find(comp => comp.component.key === 'panel');\npanel.setValue({radio: 'a', editGrid: [{textField:'testyyyy' }]});",
145
+ input: true,
146
+ },
147
+ {
148
+ collapsible: false,
149
+ key: 'panel',
150
+ type: 'panel',
151
+ label: 'Panel',
152
+ input: false,
153
+ tableView: false,
154
+ components: [
155
+ {
156
+ label: 'Radio',
157
+ optionsLabelPosition: 'right',
158
+ inline: false,
159
+ tableView: false,
160
+ values: [
161
+ {
162
+ label: 'a',
163
+ value: 'a',
164
+ shortcut: '',
165
+ },
166
+ {
167
+ label: 'b',
168
+ value: 'b',
169
+ shortcut: '',
170
+ },
171
+ ],
172
+ key: 'radio',
173
+ type: 'radio',
174
+ input: true,
175
+ },
176
+ {
177
+ title: 'Grid Panel',
178
+ collapsible: false,
179
+ key: 'panel1',
180
+ customConditional: "show = row.radio === 'a'",
181
+ type: 'panel',
182
+ label: 'Grid Panel',
183
+ input: false,
184
+ tableView: false,
185
+ components: [
186
+ {
187
+ label: 'Edit Grid',
188
+ openWhenEmpty: true,
189
+ disableAddingRemovingRows: true,
190
+ tableView: false,
191
+ rowDrafts: false,
192
+ key: 'editGrid',
193
+ conditional: {
194
+ show: true,
195
+ conjunction: 'all',
196
+ conditions: [
197
+ {
198
+ component: 'radio',
199
+ operator: 'isEqual',
200
+ value: 'a',
201
+ },
202
+ ],
203
+ },
204
+ type: 'editgrid',
205
+ displayAsTable: false,
206
+ input: true,
207
+ components: [
208
+ {
209
+ label: 'Text Field',
210
+ tableView: true,
211
+ key: 'textField',
212
+ type: 'textfield',
213
+ input: true,
214
+ },
215
+ ],
216
+ },
217
+ ],
218
+ },
219
+ ],
220
+ },
221
+ ],
222
+ },
223
+ {
224
+ type: 'button',
225
+ label: 'Submit',
226
+ key: 'submit',
227
+ disableOnInvalid: true,
228
+ input: true,
229
+ tableView: false,
230
+ },
231
+ ],
232
+ };
233
+ const form3 = {
234
+ title: 'form3',
235
+ name: 'form3',
236
+ path: 'form3',
237
+ type: 'form',
238
+ display: 'form',
239
+ components: [
240
+ {
241
+ label: 'Tabs',
242
+ components: [
243
+ {
244
+ label: 'tab1',
245
+ key: 'generalInformationTab',
246
+ components: [
247
+ {
248
+ title: 'Fill first this tab, then the second one',
249
+ theme: 'primary',
250
+ collapsible: false,
251
+ key: 'riskInfo',
252
+ type: 'panel',
253
+ label: 'Risk Information',
254
+ tableView: false,
255
+ input: false,
256
+ components: [
257
+ {
258
+ label: 'Select the second option',
259
+ optionsLabelPosition: 'right',
260
+ tableView: false,
261
+ defaultValue: {
262
+ creditRisk: false,
263
+ marketRisk: false,
264
+ operationalRisk: false,
265
+ counterpartyCreditRisk: false,
266
+ creditValuationRiskAdjustment: false,
267
+ },
268
+ values: [
269
+ {
270
+ label: 'Do not select',
271
+ value: 'creditRisk',
272
+ shortcut: '',
273
+ },
274
+ {
275
+ label: 'Select this one',
276
+ value: 'marketRisk',
277
+ shortcut: '',
278
+ },
279
+ {
280
+ label: 'Do not select',
281
+ value: 'operationalRisk',
282
+ shortcut: '',
283
+ },
284
+ {
285
+ label: 'Do not select',
286
+ value: 'counterpartyCreditRisk',
287
+ shortcut: '',
288
+ },
289
+ {
290
+ label: 'Do not select',
291
+ value: 'creditValuationRiskAdjustment',
292
+ shortcut: '',
293
+ },
294
+ ],
295
+ key: 'affectedRiskTypes',
296
+ type: 'selectboxes',
297
+ input: true,
298
+ inputType: 'checkbox',
299
+ },
300
+ ],
301
+ },
302
+ {
303
+ title: '1.4 Details of change',
304
+ theme: 'primary',
305
+ collapsible: false,
306
+ key: 'changeInformationPanel',
307
+ type: 'panel',
308
+ label: 'Change information',
309
+ input: false,
310
+ tableView: false,
311
+ components: [
312
+ {
313
+ title: 'select options according to the label',
314
+ collapsible: false,
315
+ key: 'rwaImpactPanel',
316
+ type: 'panel',
317
+ label: 'Panel',
318
+ input: false,
319
+ tableView: false,
320
+ components: [
321
+ {
322
+ label: 'here select yes',
323
+ optionsLabelPosition: 'right',
324
+ customClass: 'tooltip-text-left',
325
+ inline: true,
326
+ tableView: true,
327
+ values: [
328
+ {
329
+ label: 'Yes',
330
+ value: 'yes',
331
+ shortcut: '',
332
+ },
333
+ {
334
+ label: 'No',
335
+ value: 'no',
336
+ shortcut: '',
337
+ },
338
+ ],
339
+ key: 'rwaImpact',
340
+ type: 'radio',
341
+ labelWidth: 100,
342
+ input: true,
343
+ },
344
+ {
345
+ label: 'here select the first option, then go to the second tab',
346
+ optionsLabelPosition: 'right',
347
+ customClass: 'ml-3',
348
+ inline: false,
349
+ tableView: false,
350
+ values: [
351
+ {
352
+ label: 'Select this one',
353
+ value: 'EUParent',
354
+ shortcut: '',
355
+ },
356
+ {
357
+ label: 'Do not select',
358
+ value: 'other',
359
+ shortcut: '',
360
+ },
361
+ ],
362
+ key: 'euParentInstitution',
363
+ conditional: {
364
+ show: true,
365
+ conjunction: 'all',
366
+ conditions: [
367
+ {
368
+ component: 'rwaImpact',
369
+ operator: 'isEqual',
370
+ value: 'yes',
371
+ },
372
+ ],
373
+ },
374
+ type: 'radio',
375
+ input: true,
376
+ },
377
+ ],
378
+ },
379
+ ],
380
+ },
381
+ ],
382
+ },
383
+ {
384
+ label: 'tab3',
385
+ key: 'marketRiskTab',
386
+ components: [
387
+ {
388
+ label: 'mr',
389
+ tableView: true,
390
+ key: 'mr',
391
+ conditional: {
392
+ show: true,
393
+ conjunction: 'all',
394
+ conditions: [
395
+ {
396
+ component: 'affectedRiskTypes',
397
+ operator: 'isEqual',
398
+ value: 'marketRisk',
399
+ },
400
+ ],
401
+ },
402
+ type: 'container',
403
+ input: true,
404
+ components: [
405
+ {
406
+ label: 'Quantitative Information',
407
+ tableView: false,
408
+ key: 'quantitativeInformation',
409
+ type: 'container',
410
+ input: true,
411
+ components: [
412
+ {
413
+ title: 'Fill this tab after tab1',
414
+ theme: 'primary',
415
+ customClass: 'tooltip-text-left',
416
+ collapsible: false,
417
+ key: 'quantitativeInformation',
418
+ type: 'panel',
419
+ label: '3.2 Quantitative information',
420
+ input: false,
421
+ tableView: false,
422
+ components: [
423
+ {
424
+ label: 'Here select yes',
425
+ labelPosition: 'left-left',
426
+ optionsLabelPosition: 'right',
427
+ inline: true,
428
+ tableView: false,
429
+ values: [
430
+ {
431
+ label: 'Yes',
432
+ value: 'yes',
433
+ shortcut: '',
434
+ },
435
+ {
436
+ label: 'No',
437
+ value: 'no',
438
+ shortcut: '',
439
+ },
440
+ ],
441
+ key: 'cva',
442
+ customConditional: "show = _.get(data, 'affectedRiskTypes.creditValuationRiskAdjustment') === false && data.rwaImpact === 'yes';",
443
+ type: 'radio',
444
+ labelWidth: 100,
445
+ input: true,
446
+ },
447
+ {
448
+ label: 'Do not select',
449
+ tableView: false,
450
+ defaultValue: false,
451
+ key: 'sameRiskCategories',
452
+ conditional: {
453
+ show: true,
454
+ conjunction: 'all',
455
+ conditions: [
456
+ {
457
+ component: 'rwaImpact',
458
+ operator: 'isEqual',
459
+ value: 'yes',
460
+ },
461
+ ],
462
+ },
463
+ type: 'checkbox',
464
+ input: true,
465
+ },
466
+ {
467
+ label: 'Do not select',
468
+ tableView: true,
469
+ key: 'sameImpactAcrossEntities',
470
+ conditional: {
471
+ show: true,
472
+ conjunction: 'all',
473
+ conditions: [
474
+ {
475
+ component: 'euParentInstitution',
476
+ operator: 'isEqual',
477
+ value: 'EUParent',
478
+ },
479
+ ],
480
+ },
481
+ type: 'checkbox',
482
+ optionsLabelPosition: 'right',
483
+ input: true,
484
+ defaultValue: false,
485
+ },
486
+ {
487
+ label: 'Try to add a row in this grid, it will disappear',
488
+ tableView: true,
489
+ templates: {
490
+ header: '<div class="row">\n <div class="col-sm-4"><strong>Legal entities</strong></div>\n <div class="col-sm-3"><strong>Level of consolidation</strong></div>\n <div class="col-sm-3"><strong>Max change of risk number</strong></div>\n <div class="col-sm-1"></div>\n</div>',
491
+ row: "<div class=\"row\">\r\n <div class=\"col-sm-4\">\r\n {{ _.get(row, 'legalEntity.longName', '') }}\r\n </div>\r\n <div class=\"col-sm-3\">\r\n {{ _.get(row, 'consolidationLevel', '') }}\r\n </div>\r\n <div class=\"col-sm-3\">\r\n <!-- Calculates max absolute value of all risk numbers in the row -->\r\n\t{% \r\n\tvar items = [\r\n _.get(row, 'VaRRelChange1Day', ''),\r\n _.get(row, 'VaRRelChange', ''),\r\n _.get(row, 'sVarRelChange1Day', ''),\r\n _.get(row, 'sVarRelChange', ''),\r\n _.get(row, 'IRCRelChange1Day', ''),\r\n _.get(row, 'IRCRelChange', ''),\r\n _.get(row, 'CRMRelChange1Day', ''),\r\n _.get(row, 'CRMRelChange', ''),\r\n ].filter((i) => typeof i !== 'undefined' && !isNaN(i))\r\n .map((i) => Math.abs(i));\r\n\tif (items.length) { %}\r\n {{Math.max(\r\n ...items).toFixed(3)}}%\r\n {% } else { %}\r\n {{0.000}}%\r\n {% } %}\r\n </div>\r\n <div class=\"col-sm-1\">\r\n {% if (instance.options.readOnly) { %}\r\n <div class=\"btn-group pull-right\">\r\n <div class=\"btn btn-default btn-light btn-sm editRow\">\r\n <i class=\"{{ iconClass('eye') }}\"></i>\r\n </div>\r\n </div>\r\n {% } else { %}\r\n <div class=\"btn-group pull-right\">\r\n <button class=\"btn btn-secondary btn-sm editRow\" title = \"Edit MR figures\">\r\n <i class=\"{{ iconClass('edit') }}\"></i>\r\n </button>\r\n <button class=\"btn btn-danger btn-sm removeRow\" title = \"Delete MR figures\">\r\n <i class=\"{{ iconClass('trash') }}\"></i>\r\n </button>\r\n </div>\r\n {% } %}\r\n </div>\r\n</div>",
492
+ },
493
+ addAnother: 'Add legal entity',
494
+ modal: true,
495
+ saveRow: 'Close',
496
+ rowDrafts: false,
497
+ key: 'impactsPerEntity',
498
+ conditional: {
499
+ show: true,
500
+ conjunction: 'all',
501
+ conditions: [
502
+ {
503
+ component: 'rwaImpact',
504
+ operator: 'isEqual',
505
+ value: 'yes',
506
+ },
507
+ ],
508
+ },
509
+ type: 'editgrid',
510
+ displayAsTable: false,
511
+ alwaysEnabled: true,
512
+ input: true,
513
+ components: [
514
+ {
515
+ title: 'Try to add a row in this grid, it will disappear',
516
+ theme: 'primary',
517
+ collapsible: false,
518
+ key: 'entitiesPanel',
519
+ type: 'panel',
520
+ label: 'Panel',
521
+ input: false,
522
+ tableView: false,
523
+ components: [
524
+ {
525
+ title: 'Try to add a row in this grid, it will disappear',
526
+ collapsible: false,
527
+ key: 'periodImpactEstimationPanel',
528
+ customConditional: "show = (\n (_.get(data, 'mr.quantitativeInformation.sameImpactAcrossEntities') === false) ||\n (_.get(data, 'euParentInstitution') === 'other')\n)",
529
+ type: 'panel',
530
+ label: 'Panel',
531
+ input: false,
532
+ tableView: false,
533
+ components: [
534
+ {
535
+ label: 'Number',
536
+ applyMaskOn: 'change',
537
+ mask: false,
538
+ tableView: true,
539
+ delimiter: false,
540
+ requireDecimal: false,
541
+ inputFormat: 'plain',
542
+ truncateMultipleSpaces: false,
543
+ key: 'number',
544
+ type: 'number',
545
+ input: true,
546
+ },
547
+ ],
548
+ },
549
+ ],
550
+ },
551
+ ],
552
+ path: 'mrEditGrid',
553
+ },
554
+ ],
555
+ },
556
+ ],
557
+ },
558
+ ],
559
+ },
560
+ ],
561
+ },
562
+ ],
563
+ key: 'nmcTab',
564
+ type: 'tabs',
565
+ tableView: false,
566
+ input: false,
567
+ keyModified: true,
568
+ },
569
+ {
570
+ label: 'Submit',
571
+ action: 'saveState',
572
+ showValidations: false,
573
+ tableView: false,
574
+ key: 'submit',
575
+ type: 'button',
576
+ input: true,
577
+ alwaysEnabled: false,
578
+ state: 'draft',
579
+ },
580
+ ],
581
+ };
582
+ const form4 = {
583
+ title: 'form4',
584
+ name: 'form4',
585
+ path: 'form4',
586
+ type: 'form',
587
+ display: 'form',
588
+ components: [
589
+ {
590
+ label: 'Text Field',
591
+ applyMaskOn: 'change',
592
+ tableView: true,
593
+ key: 'textField',
594
+ type: 'textfield',
595
+ input: true,
596
+ },
597
+ {
598
+ label: 'Edit Grid',
599
+ tableView: false,
600
+ calculateValue: 'if (options.server){\r\nvalue = [{ "textArea": "test"}];\r\n}',
601
+ calculateServer: true,
602
+ rowDrafts: false,
603
+ key: 'editGrid',
604
+ type: 'editgrid',
605
+ displayAsTable: false,
606
+ input: true,
607
+ components: [
608
+ {
609
+ label: 'Text Area',
610
+ applyMaskOn: 'change',
611
+ autoExpand: false,
612
+ tableView: true,
613
+ key: 'textArea',
614
+ type: 'textarea',
615
+ input: true,
616
+ },
617
+ ],
618
+ },
619
+ {
620
+ type: 'button',
621
+ label: 'Submit',
622
+ key: 'submit',
623
+ disableOnInvalid: true,
624
+ input: true,
625
+ tableView: false,
626
+ },
627
+ ],
628
+ };
629
+ const form5 = {
630
+ title: 'form5',
631
+ name: 'form5',
632
+ path: 'form5',
633
+ type: 'form',
634
+ display: 'form',
635
+ components: [
636
+ {
637
+ label: 'generalInformation',
638
+ tableView: false,
639
+ key: 'generalInformation',
640
+ type: 'container',
641
+ input: true,
642
+ components: [
643
+ {
644
+ title: 'Select here one entry',
645
+ theme: 'primary',
646
+ collapsible: false,
647
+ key: 'sectionOutsourcingSupervisedEntites',
648
+ type: 'panel',
649
+ label: 'Outsourcing supervised entities',
650
+ tableView: false,
651
+ input: false,
652
+ components: [
653
+ {
654
+ label: 'Select the only option here',
655
+ widget: 'choicesjs',
656
+ description: '<br>',
657
+ tableView: true,
658
+ multiple: true,
659
+ dataSrc: 'json',
660
+ data: {
661
+ json: [
662
+ {
663
+ id: 6256,
664
+ longName: 'Bank_DE',
665
+ leiCode: 'LEI6256',
666
+ countryCode: 'DE',
667
+ },
668
+ ],
669
+ },
670
+ template: '<span>{{ item.longName }} [{{item.countryCode}}] {{item.leiCode}}</span>',
671
+ customOptions: {
672
+ searchResultLimit: 100,
673
+ fuseOptions: {
674
+ threshold: 0.1,
675
+ distance: 9000,
676
+ },
677
+ },
678
+ validate: {
679
+ required: true,
680
+ },
681
+ key: 'listSupervisedEntitiesCovered',
682
+ type: 'select',
683
+ input: true,
684
+ searchThreshold: 0.3,
685
+ },
686
+ ],
687
+ path: 'section12OutsourcingSupervisedEntities',
688
+ },
689
+ {
690
+ title: '1.5 Country-specific questions',
691
+ collapsible: false,
692
+ key: 'countrySpecificQuestionsPanel',
693
+ customConditional: 'var listSupervisedEntitiesCovered = _.get(data, "generalInformation.listSupervisedEntitiesCovered", []);\r\nshow = listSupervisedEntitiesCovered.some(entity => (entity.countryCode == "LU") || (entity.countryCode == "DE"));',
694
+ type: 'panel',
695
+ label: 'Panel',
696
+ input: false,
697
+ tableView: false,
698
+ components: [
699
+ {
700
+ label: 'DE specific questions',
701
+ tableView: false,
702
+ key: 'deSpecific',
703
+ customConditional: 'var listSupervisedEntitiesCovered = _.get(data, "generalInformation.listSupervisedEntitiesCovered", []);\r\nshow = listSupervisedEntitiesCovered.some(entity => entity.countryCode == "DE");',
704
+ type: 'container',
705
+ input: true,
706
+ components: [
707
+ {
708
+ title: 'Additional questions for DE entities',
709
+ collapsible: false,
710
+ key: 'panel',
711
+ type: 'panel',
712
+ label: 'Panel',
713
+ input: false,
714
+ tableView: false,
715
+ components: [
716
+ {
717
+ title: 'Sub-outsourcing',
718
+ collapsible: false,
719
+ key: 'suboutsourcing',
720
+ type: 'panel',
721
+ label: 'Panel',
722
+ input: false,
723
+ tableView: false,
724
+ components: [
725
+ {
726
+ label: 'Here select yes',
727
+ optionsLabelPosition: 'right',
728
+ customClass: 'tooltip-text-left',
729
+ inline: true,
730
+ tableView: false,
731
+ values: [
732
+ {
733
+ label: 'Yes',
734
+ value: 'yes',
735
+ shortcut: '',
736
+ },
737
+ {
738
+ label: 'No',
739
+ value: 'no',
740
+ shortcut: '',
741
+ },
742
+ ],
743
+ validate: {
744
+ required: true,
745
+ },
746
+ key: 'criticalPartsToBeOutsourcedSuboutsourcer',
747
+ type: 'radio',
748
+ labelWidth: 100,
749
+ input: true,
750
+ },
751
+ {
752
+ label: 'add a row, it will be removed upon save',
753
+ customClass: 'ml-3',
754
+ tableView: true,
755
+ templates: {
756
+ header: '<div class="row">\r\n <div class="col-sm-4"><strong>Name</strong></div>\r\n <div class="col-sm-4"><strong>Location</strong></div>\r\n <div class="col-sm-3"><strong>Location of the data</strong></div>\r\n <div class="col-sm-1"></div>\r\n</div>',
757
+ row: '<div class="row">\r\n <div class="col-sm-4">\r\n {{ _.get(row, \'nameSuboutsourcer\', \'\') }}\r\n </div>\r\n <div class="col-sm-4">\r\n {{ _.get(row, \'locationSuboutsourcer.name\', \'\') }}\r\n </div>\r\n <div class="col-sm-3">\r\n {{ _.get(row, \'locationDataSub.name\', \'\') }}\r\n </div> \r\n <div class="col-sm-1">\r\n {% if (instance.options.readOnly) { %}\r\n <div class="btn-group pull-right">\r\n <div class="btn btn-default btn-light btn-sm editRow">\r\n <i class="{{ iconClass(\'eye\') }}"></i>\r\n </div>\r\n </div>\r\n {% } else { %}\r\n <div class="btn-group pull-right">\r\n <button class="btn btn-secondary btn-sm editRow" title = "Edit row">\r\n <i class="{{ iconClass(\'edit\') }}"></i>\r\n </button>\r\n <button class="btn btn-danger btn-sm removeRow" title = "Delete row">\r\n <i class="{{ iconClass(\'trash\') }}"></i>\r\n </button>\r\n </div>\r\n {% } %}\r\n </div>\r\n</div>',
758
+ },
759
+ addAnother: 'Add suboutsourcer',
760
+ modal: true,
761
+ saveRow: 'Close',
762
+ validate: {
763
+ required: true,
764
+ },
765
+ rowDrafts: false,
766
+ key: 'suboutsourcers',
767
+ conditional: {
768
+ show: true,
769
+ conjunction: 'all',
770
+ conditions: [
771
+ {
772
+ component: 'generalInformation.deSpecific.criticalPartsToBeOutsourcedSuboutsourcer',
773
+ operator: 'isEqual',
774
+ value: 'yes',
775
+ },
776
+ ],
777
+ },
778
+ type: 'editgrid',
779
+ displayAsTable: false,
780
+ input: true,
781
+ components: [
782
+ {
783
+ title: 'Sub-outsourcer(s)',
784
+ theme: 'primary',
785
+ collapsible: false,
786
+ key: 'suboutsourcerS',
787
+ type: 'panel',
788
+ label: 'Panel',
789
+ input: false,
790
+ tableView: false,
791
+ components: [
792
+ {
793
+ label: 'This edit grid row will disappear',
794
+ applyMaskOn: 'change',
795
+ tableView: true,
796
+ validate: {
797
+ required: true,
798
+ maxLength: 100,
799
+ },
800
+ key: 'nameSuboutsourcer',
801
+ type: 'textfield',
802
+ input: true,
803
+ },
804
+ ],
805
+ },
806
+ ],
807
+ },
808
+ ],
809
+ },
810
+ ],
811
+ },
812
+ ],
813
+ },
814
+ ],
815
+ },
816
+ ],
817
+ },
818
+ {
819
+ label: 'Submit',
820
+ action: 'saveState',
821
+ showValidations: false,
822
+ tableView: false,
823
+ key: 'submit',
824
+ type: 'button',
825
+ input: true,
826
+ state: 'draft',
827
+ },
828
+ ],
829
+ };
830
+ const form6 = {
831
+ title: 'form6',
832
+ name: 'form6',
833
+ path: 'form6',
834
+ type: 'form',
835
+ display: 'form',
836
+ components: [
837
+ {
838
+ label: 'Text Field',
839
+ applyMaskOn: 'change',
840
+ tableView: true,
841
+ key: 'textField',
842
+ type: 'textfield',
843
+ input: true,
844
+ },
845
+ {
846
+ label: 'Container',
847
+ tableView: false,
848
+ key: 'container',
849
+ type: 'container',
850
+ input: true,
851
+ components: [
852
+ {
853
+ label: 'Edit Grid',
854
+ tableView: false,
855
+ rowDrafts: false,
856
+ key: 'editGrid',
857
+ logic: [
858
+ {
859
+ name: 'ret',
860
+ trigger: {
861
+ type: 'simple',
862
+ simple: {
863
+ show: true,
864
+ conjunction: 'all',
865
+ conditions: [
866
+ {
867
+ component: 'textField',
868
+ operator: 'isEqual',
869
+ value: 'show',
870
+ },
871
+ ],
872
+ },
873
+ },
874
+ actions: [
875
+ {
876
+ name: 'ter',
877
+ type: 'value',
878
+ value: "value = [{number:1, textArea: 'test'}, {number:2, textArea: 'test2'}]",
879
+ },
880
+ ],
881
+ },
882
+ ],
883
+ type: 'editgrid',
884
+ displayAsTable: false,
885
+ input: true,
886
+ components: [
887
+ {
888
+ label: 'Number',
889
+ applyMaskOn: 'change',
890
+ mask: false,
891
+ tableView: false,
892
+ delimiter: false,
893
+ requireDecimal: false,
894
+ inputFormat: 'plain',
895
+ truncateMultipleSpaces: false,
896
+ key: 'number',
897
+ type: 'number',
898
+ input: true,
899
+ },
900
+ {
901
+ label: 'Text Area',
902
+ applyMaskOn: 'change',
903
+ autoExpand: false,
904
+ tableView: true,
905
+ key: 'textArea',
906
+ type: 'textarea',
907
+ input: true,
908
+ },
909
+ ],
910
+ },
911
+ ],
912
+ },
913
+ {
914
+ type: 'button',
915
+ label: 'Submit',
916
+ key: 'submit',
917
+ disableOnInvalid: true,
918
+ input: true,
919
+ tableView: false,
920
+ },
921
+ ],
922
+ };
923
+ exports.default = { form1, form2, form3, form4, form5, form6 };