@hmcts/ccd-case-ui-toolkit 4.18.13 → 4.18.14-rc1
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.
- package/dist/index.umd.js +19 -6
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.LICENSE.txt +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/shared/components/palette/complex/ccd-read-fields-filter.pipe.js +14 -3
- package/dist/shared/components/palette/complex/ccd-read-fields-filter.pipe.js.map +1 -1
- package/dist/shared/components/palette/complex/read-complex-field.component.js +4 -2
- package/dist/shared/components/palette/complex/read-complex-field.component.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
|
|
3
|
-
* @version v4.18.
|
|
3
|
+
* @version v4.18.14-rc1
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -29603,12 +29603,21 @@ var ReadFieldsFilterPipe = /** @class */ (function () {
|
|
|
29603
29603
|
}
|
|
29604
29604
|
return ReadFieldsFilterPipe_1.isEmpty(field.value) ? value : field.value;
|
|
29605
29605
|
};
|
|
29606
|
-
ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path) {
|
|
29606
|
+
ReadFieldsFilterPipe.evaluateConditionalShow = function (field, formValue, path, formGroupAvaliable, fieldId) {
|
|
29607
29607
|
if (field.display_context === 'HIDDEN') {
|
|
29608
29608
|
field.hidden = true;
|
|
29609
29609
|
}
|
|
29610
29610
|
else if (field.show_condition) {
|
|
29611
|
-
var cond =
|
|
29611
|
+
var cond = void 0;
|
|
29612
|
+
if (fieldId && field.show_condition.indexOf(fieldId) > -1 && !formGroupAvaliable && !!Object.keys(formValue).length) {
|
|
29613
|
+
var search = fieldId + '.';
|
|
29614
|
+
var searchRegExp = new RegExp(search, 'g');
|
|
29615
|
+
var replaceWith = '';
|
|
29616
|
+
cond = directives_1.ShowCondition.getInstance(field.show_condition.replace(searchRegExp, replaceWith));
|
|
29617
|
+
}
|
|
29618
|
+
else {
|
|
29619
|
+
cond = directives_1.ShowCondition.getInstance(field.show_condition);
|
|
29620
|
+
}
|
|
29612
29621
|
field.hidden = !cond.match(formValue, path);
|
|
29613
29622
|
}
|
|
29614
29623
|
else {
|
|
@@ -29635,8 +29644,10 @@ var ReadFieldsFilterPipe = /** @class */ (function () {
|
|
|
29635
29644
|
var fields = complexField.field_type.complex_fields || [];
|
|
29636
29645
|
var values = complexField.value || {};
|
|
29637
29646
|
var checkConditionalShowAgainst = values;
|
|
29647
|
+
var formGroupAvailable = false;
|
|
29638
29648
|
if (formGroup) {
|
|
29639
29649
|
checkConditionalShowAgainst = formGroup.value;
|
|
29650
|
+
formGroupAvailable = true;
|
|
29640
29651
|
}
|
|
29641
29652
|
return fields
|
|
29642
29653
|
.map(function (f) {
|
|
@@ -29652,7 +29663,7 @@ var ReadFieldsFilterPipe = /** @class */ (function () {
|
|
|
29652
29663
|
f.display_context = complexField.display_context;
|
|
29653
29664
|
}
|
|
29654
29665
|
if (setupHidden) {
|
|
29655
|
-
ReadFieldsFilterPipe_1.evaluateConditionalShow(f, checkConditionalShowAgainst, path);
|
|
29666
|
+
ReadFieldsFilterPipe_1.evaluateConditionalShow(f, checkConditionalShowAgainst, path, formGroupAvailable, complexField.id);
|
|
29656
29667
|
}
|
|
29657
29668
|
return f;
|
|
29658
29669
|
})
|
|
@@ -30401,9 +30412,11 @@ var ReadComplexFieldComponent = /** @class */ (function (_super) {
|
|
|
30401
30412
|
if (this.caseField.display_context_parameter) {
|
|
30402
30413
|
this.context = palette_context_enum_1.PaletteContext.TABLE_VIEW;
|
|
30403
30414
|
}
|
|
30404
|
-
else
|
|
30415
|
+
else {
|
|
30405
30416
|
// default to default views
|
|
30406
|
-
this.
|
|
30417
|
+
if (!this.caseField.display_context_parameter && this.context) {
|
|
30418
|
+
this.context = palette_context_enum_1.PaletteContext.DEFAULT;
|
|
30419
|
+
}
|
|
30407
30420
|
}
|
|
30408
30421
|
if (this.caseField.field_type) {
|
|
30409
30422
|
this.caseField.field_type.complex_fields.map(function (field) {
|