@hmcts/ccd-case-ui-toolkit 6.19.16-rc2 → 6.19.16-rc3

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.
@@ -4113,6 +4113,11 @@
4113
4113
  var FieldsUtils = /** @class */ (function () {
4114
4114
  function FieldsUtils() {
4115
4115
  }
4116
+ FieldsUtils.isValidDisplayContext = function (ctx) {
4117
+ return (ctx === 'MANDATORY' || ctx === 'READONLY'
4118
+ || ctx === 'OPTIONAL' || ctx === 'HIDDEN'
4119
+ || ctx === 'COMPLEX');
4120
+ };
4116
4121
  FieldsUtils.convertToCaseField = function (obj) {
4117
4122
  if (!(obj instanceof CaseField)) {
4118
4123
  return classTransformer.plainToClassFromExist(new CaseField(), obj);
@@ -14171,8 +14176,7 @@
14171
14176
  .filter(function (f) { return keepEmpty || FieldsFilterPipe.keepField(f); })
14172
14177
  .map(function (f) {
14173
14178
  if (!f.display_context) {
14174
- if (complexField.display_context === 'MANDATORY' || complexField.display_context === 'READONLY'
14175
- || complexField.display_context === 'OPTIONAL' || complexField.display_context === 'HIDDEN') {
14179
+ if (FieldsUtils.isValidDisplayContext(complexField.display_context)) {
14176
14180
  f.display_context = complexField.display_context;
14177
14181
  }
14178
14182
  }
@@ -26591,8 +26595,7 @@
26591
26595
  })
26592
26596
  .map(function (f) {
26593
26597
  if (!f.display_context) {
26594
- if (complexField.display_context === 'MANDATORY' || complexField.display_context === 'READONLY'
26595
- || complexField.display_context === 'OPTIONAL' || complexField.display_context === 'HIDDEN') {
26598
+ if (FieldsUtils.isValidDisplayContext(complexField.display_context)) {
26596
26599
  f.display_context = complexField.display_context;
26597
26600
  }
26598
26601
  }