@beinformed/ui 1.36.0 → 1.37.0

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 (30) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/esm/constants/LayoutHintConfig.js +3 -3
  3. package/esm/constants/LayoutHintConfig.js.map +1 -1
  4. package/esm/models/attributes/AttributeSetModel.js +32 -0
  5. package/esm/models/attributes/AttributeSetModel.js.map +1 -1
  6. package/esm/models/taskgroup/TaskGroupCollection.js +1 -1
  7. package/esm/models/taskgroup/TaskGroupCollection.js.map +1 -1
  8. package/esm/models/taskgroup/TaskGroupModel.js +8 -0
  9. package/esm/models/taskgroup/TaskGroupModel.js.map +1 -1
  10. package/lib/constants/LayoutHintConfig.js +3 -3
  11. package/lib/constants/LayoutHintConfig.js.flow +3 -3
  12. package/lib/constants/LayoutHintConfig.js.map +1 -1
  13. package/lib/models/attributes/AttributeSetModel.js +32 -0
  14. package/lib/models/attributes/AttributeSetModel.js.flow +44 -0
  15. package/lib/models/attributes/AttributeSetModel.js.map +1 -1
  16. package/lib/models/list/__tests__/ListDetailModel.hierarchy.spec.js.flow +88 -0
  17. package/lib/models/taskgroup/TaskGroupCollection.js +1 -1
  18. package/lib/models/taskgroup/TaskGroupCollection.js.flow +1 -4
  19. package/lib/models/taskgroup/TaskGroupCollection.js.map +1 -1
  20. package/lib/models/taskgroup/TaskGroupModel.js +8 -0
  21. package/lib/models/taskgroup/TaskGroupModel.js.flow +8 -0
  22. package/lib/models/taskgroup/TaskGroupModel.js.map +1 -1
  23. package/package.json +9 -9
  24. package/src/constants/LayoutHintConfig.js +3 -3
  25. package/src/models/attributes/AttributeSetModel.js +44 -0
  26. package/src/models/list/__tests__/ListDetailModel.hierarchy.spec.js +88 -0
  27. package/src/models/list/__tests__/hierarchy.json +185 -0
  28. package/src/models/list/__tests__/hierarchyContributions.json +582 -0
  29. package/src/models/taskgroup/TaskGroupCollection.js +1 -4
  30. package/src/models/taskgroup/TaskGroupModel.js +8 -0
@@ -0,0 +1,582 @@
1
+ {
2
+ "event": {
3
+ "label": "Hierarchical input and output with root singleton and repeat",
4
+ "resourcetype": "EventListPanelDetail",
5
+ "metadata": {
6
+ "_id": {
7
+ "type": "integer",
8
+ "label": "Id"
9
+ }
10
+ },
11
+ "attributes": [
12
+ {
13
+ "EventType": {
14
+ "type": "string",
15
+ "label": "Event type",
16
+ "readonly": true,
17
+ "optionMode": "dynamic",
18
+ "multiplechoice": false,
19
+ "layouthint": ["title", "combobox"],
20
+ "enumerated": true
21
+ }
22
+ },
23
+ {
24
+ "CreationDateTime": {
25
+ "type": "timestamp",
26
+ "label": "Date/time occurred",
27
+ "readonly": true,
28
+ "format": "dd-MM-yyyy HH:mm"
29
+ }
30
+ },
31
+ {
32
+ "User": {
33
+ "type": "string",
34
+ "label": "User",
35
+ "readonly": true,
36
+ "optionMode": "lookup",
37
+ "multiplechoice": false,
38
+ "layouthint": ["radiobutton"],
39
+ "enumerated": true
40
+ }
41
+ }
42
+ ],
43
+ "eventdata": [
44
+ {
45
+ "Company": {
46
+ "label": "Company",
47
+ "role": "input",
48
+ "repeatable": false,
49
+ "attributes": [
50
+ {
51
+ "Company_Name": {
52
+ "type": "string",
53
+ "label": "Name",
54
+ "mandatory": true,
55
+ "displaysize": 50,
56
+ "maxLength": 20
57
+ }
58
+ }
59
+ ],
60
+ "objects": {
61
+ "CompanyContactDetails": {
62
+ "repeatable": true,
63
+ "label": "Company contact details",
64
+ "attributes": [
65
+ {
66
+ "Company_Type": {
67
+ "type": "string",
68
+ "label": "Type",
69
+ "mandatory": true,
70
+ "optionMode": "static",
71
+ "multiplechoice": false,
72
+ "layouthint": ["combobox"],
73
+ "enumerated": true,
74
+ "options": [
75
+ {
76
+ "code": "Mobile",
77
+ "label": "Mobile",
78
+ "_links": {
79
+ "concept": {
80
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
81
+ }
82
+ }
83
+ },
84
+ {
85
+ "code": "Email",
86
+ "label": "Email",
87
+ "_links": {
88
+ "concept": {
89
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
90
+ }
91
+ }
92
+ }
93
+ ]
94
+ }
95
+ },
96
+ {
97
+ "Company_Value": {
98
+ "type": "string",
99
+ "label": "Value",
100
+ "mandatory": true,
101
+ "displaysize": 50,
102
+ "maxLength": 255
103
+ }
104
+ }
105
+ ]
106
+ },
107
+ "CEO": {
108
+ "repeatable": false,
109
+ "label": "CEO",
110
+ "attributes": [
111
+ {
112
+ "CEO_Name": {
113
+ "type": "string",
114
+ "label": "Name",
115
+ "mandatory": true,
116
+ "displaysize": 50,
117
+ "maxLength": 255,
118
+ "minLength": 5
119
+ }
120
+ }
121
+ ],
122
+ "objects": {
123
+ "CEOBusinessLocation": {
124
+ "repeatable": false,
125
+ "label": "CEO Business location",
126
+ "attributes": [
127
+ {
128
+ "CEOBL_Address": {
129
+ "type": "string",
130
+ "label": "Address",
131
+ "mandatory": false,
132
+ "columns": 50,
133
+ "formatted": false,
134
+ "rows": 5,
135
+ "maxLength": 2000
136
+ }
137
+ }
138
+ ],
139
+ "objects": {
140
+ "CEOBusinessLocationContactDetails": {
141
+ "repeatable": true,
142
+ "label": "CEO Business location contact details",
143
+ "attributes": [
144
+ {
145
+ "CEOBLC_Type": {
146
+ "type": "string",
147
+ "label": "Type",
148
+ "mandatory": true,
149
+ "optionMode": "static",
150
+ "multiplechoice": false,
151
+ "layouthint": ["combobox"],
152
+ "enumerated": true,
153
+ "options": [
154
+ {
155
+ "code": "Mobile",
156
+ "label": "Mobile",
157
+ "_links": {
158
+ "concept": {
159
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
160
+ }
161
+ }
162
+ },
163
+ {
164
+ "code": "Email",
165
+ "label": "Email",
166
+ "_links": {
167
+ "concept": {
168
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
169
+ }
170
+ }
171
+ }
172
+ ]
173
+ }
174
+ },
175
+ {
176
+ "CEOBLC_Value": {
177
+ "type": "string",
178
+ "label": "Value",
179
+ "mandatory": true,
180
+ "displaysize": 50,
181
+ "maxLength": 255
182
+ }
183
+ }
184
+ ]
185
+ }
186
+ }
187
+ }
188
+ }
189
+ }
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "Employee": {
195
+ "label": "Employee",
196
+ "role": "input",
197
+ "repeatable": true,
198
+ "attributes": [
199
+ {
200
+ "Employee_Name": {
201
+ "type": "string",
202
+ "label": "Name",
203
+ "mandatory": true,
204
+ "displaysize": 50,
205
+ "maxLength": 255,
206
+ "minLength": 5
207
+ }
208
+ }
209
+ ],
210
+ "objects": {
211
+ "DurationTemporaryEmploymentContract": {
212
+ "repeatable": false,
213
+ "label": "Duration temporary employment contract",
214
+ "attributes": [
215
+ {
216
+ "DurationContract": {
217
+ "type": "range",
218
+ "label": "Duration contract",
219
+ "mandatory": true,
220
+ "children": [
221
+ {
222
+ "StartDate": {
223
+ "type": "date",
224
+ "label": "Start date",
225
+ "mandatory": true,
226
+ "formatlabel": "dd-MM-yyyy",
227
+ "format": "dd-MM-yyyy"
228
+ }
229
+ },
230
+ {
231
+ "EndDate": {
232
+ "type": "date",
233
+ "label": "End date",
234
+ "mandatory": true,
235
+ "formatlabel": "dd-MM-yyyy",
236
+ "format": "dd-MM-yyyy"
237
+ }
238
+ }
239
+ ]
240
+ }
241
+ }
242
+ ]
243
+ },
244
+ "EmployeeBusinessLocation": {
245
+ "repeatable": false,
246
+ "label": "Employee Business location",
247
+ "attributes": [
248
+ {
249
+ "EmployeeBL_Address": {
250
+ "type": "string",
251
+ "label": "Address",
252
+ "mandatory": false,
253
+ "columns": 50,
254
+ "formatted": false,
255
+ "rows": 5,
256
+ "maxLength": 2000
257
+ }
258
+ }
259
+ ],
260
+ "objects": {
261
+ "EmployeeBusinessLocationContactDetails": {
262
+ "repeatable": true,
263
+ "label": "Employee Business location contact details",
264
+ "attributes": [
265
+ {
266
+ "EmployeeBLC_Type": {
267
+ "type": "string",
268
+ "label": "Type",
269
+ "mandatory": true,
270
+ "optionMode": "static",
271
+ "multiplechoice": false,
272
+ "layouthint": ["combobox"],
273
+ "enumerated": true,
274
+ "options": [
275
+ {
276
+ "code": "Mobile",
277
+ "label": "Mobile",
278
+ "_links": {
279
+ "concept": {
280
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
281
+ }
282
+ }
283
+ },
284
+ {
285
+ "code": "Email",
286
+ "label": "Email",
287
+ "_links": {
288
+ "concept": {
289
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
290
+ }
291
+ }
292
+ }
293
+ ]
294
+ }
295
+ },
296
+ {
297
+ "EmployeeBLC_Value": {
298
+ "type": "string",
299
+ "label": "Value",
300
+ "mandatory": true,
301
+ "displaysize": 50,
302
+ "maxLength": 255
303
+ }
304
+ }
305
+ ]
306
+ }
307
+ }
308
+ }
309
+ }
310
+ }
311
+ },
312
+ {
313
+ "Company_result": {
314
+ "label": "Company",
315
+ "role": "result",
316
+ "repeatable": false,
317
+ "attributes": [
318
+ {
319
+ "Company_Name": {
320
+ "type": "string",
321
+ "label": "Name",
322
+ "mandatory": true,
323
+ "displaysize": 50,
324
+ "maxLength": 20
325
+ }
326
+ }
327
+ ],
328
+ "objects": {
329
+ "CompanyContactDetails": {
330
+ "repeatable": true,
331
+ "label": "Company contact details",
332
+ "attributes": [
333
+ {
334
+ "Company_Type": {
335
+ "type": "string",
336
+ "label": "Type",
337
+ "mandatory": true,
338
+ "optionMode": "static",
339
+ "multiplechoice": false,
340
+ "layouthint": ["combobox"],
341
+ "enumerated": true,
342
+ "options": [
343
+ {
344
+ "code": "Mobile",
345
+ "label": "Mobile",
346
+ "_links": {
347
+ "concept": {
348
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
349
+ }
350
+ }
351
+ },
352
+ {
353
+ "code": "Email",
354
+ "label": "Email",
355
+ "_links": {
356
+ "concept": {
357
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
358
+ }
359
+ }
360
+ }
361
+ ]
362
+ }
363
+ },
364
+ {
365
+ "Company_Value": {
366
+ "type": "string",
367
+ "label": "Value",
368
+ "mandatory": true,
369
+ "displaysize": 50,
370
+ "maxLength": 255
371
+ }
372
+ }
373
+ ]
374
+ },
375
+ "CEO": {
376
+ "repeatable": false,
377
+ "label": "CEO",
378
+ "attributes": [
379
+ {
380
+ "CEO_Name": {
381
+ "type": "string",
382
+ "label": "Name",
383
+ "mandatory": true,
384
+ "displaysize": 50,
385
+ "maxLength": 255,
386
+ "minLength": 5
387
+ }
388
+ }
389
+ ],
390
+ "objects": {
391
+ "CEOBusinessLocation": {
392
+ "repeatable": false,
393
+ "label": "CEO Business location",
394
+ "attributes": [
395
+ {
396
+ "CEOBL_Address": {
397
+ "type": "string",
398
+ "label": "Address",
399
+ "mandatory": false,
400
+ "columns": 50,
401
+ "formatted": false,
402
+ "rows": 5,
403
+ "maxLength": 2000
404
+ }
405
+ }
406
+ ],
407
+ "objects": {
408
+ "CEOBusinessLocationContactDetails": {
409
+ "repeatable": true,
410
+ "label": "CEO Business location contact details",
411
+ "attributes": [
412
+ {
413
+ "CEOBLC_Type": {
414
+ "type": "string",
415
+ "label": "Type",
416
+ "mandatory": true,
417
+ "optionMode": "static",
418
+ "multiplechoice": false,
419
+ "layouthint": ["combobox"],
420
+ "enumerated": true,
421
+ "options": [
422
+ {
423
+ "code": "Mobile",
424
+ "label": "Mobile",
425
+ "_links": {
426
+ "concept": {
427
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
428
+ }
429
+ }
430
+ },
431
+ {
432
+ "code": "Email",
433
+ "label": "Email",
434
+ "_links": {
435
+ "concept": {
436
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
437
+ }
438
+ }
439
+ }
440
+ ]
441
+ }
442
+ },
443
+ {
444
+ "CEOBLC_Value": {
445
+ "type": "string",
446
+ "label": "Value",
447
+ "mandatory": true,
448
+ "displaysize": 50,
449
+ "maxLength": 255
450
+ }
451
+ }
452
+ ]
453
+ }
454
+ }
455
+ }
456
+ }
457
+ }
458
+ }
459
+ }
460
+ },
461
+ {
462
+ "Employee_result": {
463
+ "label": "Employee",
464
+ "role": "result",
465
+ "repeatable": true,
466
+ "attributes": [
467
+ {
468
+ "Employee_Name": {
469
+ "type": "string",
470
+ "label": "Name",
471
+ "mandatory": true,
472
+ "displaysize": 50,
473
+ "maxLength": 255,
474
+ "minLength": 5
475
+ }
476
+ }
477
+ ],
478
+ "objects": {
479
+ "DurationTemporaryEmploymentContract": {
480
+ "repeatable": false,
481
+ "label": "Duration temporary employment contract",
482
+ "attributes": [
483
+ {
484
+ "DurationContract": {
485
+ "type": "range",
486
+ "label": "Duration contract",
487
+ "mandatory": true,
488
+ "children": [
489
+ {
490
+ "StartDate": {
491
+ "type": "date",
492
+ "label": "Start date",
493
+ "mandatory": true,
494
+ "formatlabel": "dd-MM-yyyy",
495
+ "format": "dd-MM-yyyy"
496
+ }
497
+ },
498
+ {
499
+ "EndDate": {
500
+ "type": "date",
501
+ "label": "End date",
502
+ "mandatory": true,
503
+ "formatlabel": "dd-MM-yyyy",
504
+ "format": "dd-MM-yyyy"
505
+ }
506
+ }
507
+ ]
508
+ }
509
+ }
510
+ ]
511
+ },
512
+ "EmployeeBusinessLocation": {
513
+ "repeatable": false,
514
+ "label": "Employee Business location",
515
+ "attributes": [
516
+ {
517
+ "EmployeeBL_Address": {
518
+ "type": "string",
519
+ "label": "Address",
520
+ "mandatory": false,
521
+ "columns": 50,
522
+ "formatted": false,
523
+ "rows": 5,
524
+ "maxLength": 2000
525
+ }
526
+ }
527
+ ],
528
+ "objects": {
529
+ "EmployeeBusinessLocationContactDetails": {
530
+ "repeatable": true,
531
+ "label": "Employee Business location contact details",
532
+ "attributes": [
533
+ {
534
+ "EmployeeBLC_Type": {
535
+ "type": "string",
536
+ "label": "Type",
537
+ "mandatory": true,
538
+ "optionMode": "static",
539
+ "multiplechoice": false,
540
+ "layouthint": ["combobox"],
541
+ "enumerated": true,
542
+ "options": [
543
+ {
544
+ "code": "Mobile",
545
+ "label": "Mobile",
546
+ "_links": {
547
+ "concept": {
548
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Mobile"
549
+ }
550
+ }
551
+ },
552
+ {
553
+ "code": "Email",
554
+ "label": "Email",
555
+ "_links": {
556
+ "concept": {
557
+ "href": "/concepts/REST/Behavior/Service operation/_Case/Choice options/Contact details types.bixml/Email"
558
+ }
559
+ }
560
+ }
561
+ ]
562
+ }
563
+ },
564
+ {
565
+ "EmployeeBLC_Value": {
566
+ "type": "string",
567
+ "label": "Value",
568
+ "mandatory": true,
569
+ "displaysize": 50,
570
+ "maxLength": 255
571
+ }
572
+ }
573
+ ]
574
+ }
575
+ }
576
+ }
577
+ }
578
+ }
579
+ }
580
+ ]
581
+ }
582
+ }
@@ -11,9 +11,6 @@ export default class TaskGroupCollection extends BaseCollection<TaskGroupModel>
11
11
  * Indicates if the taskgroup collection has has tasks
12
12
  */
13
13
  hasTasks(): boolean {
14
- return (
15
- this.hasItems &&
16
- this.collection.some((taskgroup) => taskgroup.actionCollection.length > 0)
17
- );
14
+ return this.collection.some((taskgroup) => taskgroup.hasTasks());
18
15
  }
19
16
  }
@@ -86,4 +86,12 @@ export default class TaskGroupModel extends ResourceModel {
86
86
  get actionCollection(): ActionCollection {
87
87
  return this._actionCollection;
88
88
  }
89
+
90
+ /**
91
+ * Indicates if taskgroup has tasks
92
+ * @returns {boolean}
93
+ */
94
+ hasTasks(): boolean {
95
+ return this.actionCollection.length > 0;
96
+ }
89
97
  }