@hmcts/ccd-case-ui-toolkit 4.8.3-rc.4 → 4.8.3-rc.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
3
- * @version v4.8.3-rc.4
3
+ * @version v4.8.3-rc.5
4
4
  * @link undefined
5
5
  * @license MIT
6
6
  */
@@ -17752,11 +17752,11 @@ var CaseEditPageComponent = /** @class */ (function () {
17752
17752
  if (this.currentPageIsNotValid()) {
17753
17753
  this.generateErrorMessage(this.currentPage.case_fields);
17754
17754
  }
17755
- this.showSpinner = true;
17756
17755
  if (!this.isSubmitting && !this.currentPageIsNotValid()) {
17757
17756
  this.isSubmitting = true;
17758
17757
  this.error = null;
17759
17758
  var caseEventData = this.buildCaseEventData();
17759
+ this.showSpinner = true;
17760
17760
  this.caseEdit.validate(caseEventData, this.currentPage.id)
17761
17761
  .subscribe(function (jsonData) {
17762
17762
  if (jsonData) {
@@ -25912,6 +25912,10 @@ var ReadFieldsFilterPipe = /** @class */ (function () {
25912
25912
  return !!hasChildrenWithValue;
25913
25913
  };
25914
25914
  ReadFieldsFilterPipe.isValidCollection = function (field, values) {
25915
+ // if field is collection and it has complex/collection child field; parent field doesnt have value defined
25916
+ if (!Array.isArray(field.value) && values && values.hasOwnProperty(field.id)) {
25917
+ return true;
25918
+ }
25915
25919
  var isNotEmpty = Array.isArray(field.value) && field.value.length > 0;
25916
25920
  if (isNotEmpty && field.field_type.collection_field_type.type === 'Complex') {
25917
25921
  return !!field.value.find(function (item) {