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