@hmcts/ccd-case-ui-toolkit 6.19.6-case-file-view-document-upload-date → 6.19.6-case-file-view-document-upload-date-v2

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.
@@ -8753,32 +8753,8 @@ WorkAllocationService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkAllocationSe
8753
8753
  type: Injectable
8754
8754
  }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null); })();
8755
8755
 
8756
- class ValidPageListCaseFieldsService {
8757
- deleteNonValidatedFields(validPageList, data, notFromEventSubmit, fromPreviousPage = false) {
8758
- const validPageListCaseFields = [];
8759
- validPageList.forEach(page => {
8760
- if (notFromEventSubmit || ShowCondition.getInstance(page.show_condition).match(data)) {
8761
- page.case_fields.forEach(field => validPageListCaseFields.push(field));
8762
- }
8763
- });
8764
- if (!fromPreviousPage && validPageListCaseFields.length > 0) {
8765
- Object.keys(data).forEach(key => {
8766
- if (validPageListCaseFields.findIndex((element) => element.id === key) < 0) {
8767
- delete data[key];
8768
- ;
8769
- }
8770
- });
8771
- }
8772
- }
8773
- }
8774
- ValidPageListCaseFieldsService.ɵfac = function ValidPageListCaseFieldsService_Factory(t) { return new (t || ValidPageListCaseFieldsService)(); };
8775
- ValidPageListCaseFieldsService.ɵprov = i0.ɵɵdefineInjectable({ token: ValidPageListCaseFieldsService, factory: ValidPageListCaseFieldsService.ɵfac });
8776
- (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ValidPageListCaseFieldsService, [{
8777
- type: Injectable
8778
- }], null, null); })();
8779
-
8780
8756
  class CaseEditComponent {
8781
- constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService) {
8757
+ constructor(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService) {
8782
8758
  this.fb = fb;
8783
8759
  this.caseNotifier = caseNotifier;
8784
8760
  this.router = router;
@@ -8792,7 +8768,6 @@ class CaseEditComponent {
8792
8768
  this.formValueService = formValueService;
8793
8769
  this.formErrorService = formErrorService;
8794
8770
  this.loadingService = loadingService;
8795
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
8796
8771
  this.cancelled = new EventEmitter();
8797
8772
  this.submitted = new EventEmitter();
8798
8773
  this.isEventCompletionChecksRequired = false;
@@ -8800,7 +8775,6 @@ class CaseEditComponent {
8800
8775
  this.ignoreWarning = false;
8801
8776
  this.isLinkedCasesSubmission = false;
8802
8777
  this.callbackErrorsSubject = new Subject();
8803
- this.validPageList = [];
8804
8778
  }
8805
8779
  ngOnInit() {
8806
8780
  this.wizard = this.wizardFactory.create(this.eventTrigger);
@@ -8961,8 +8935,6 @@ class CaseEditComponent {
8961
8935
  this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
8962
8936
  // Remove "Launcher"-type fields (these have no values and are not intended to be persisted)
8963
8937
  this.formValueService.removeCaseFieldsOfType(caseEventData.data, eventTrigger.case_fields, ['FlagLauncher', 'ComponentLauncher']);
8964
- // delete fields which are not part of the case event journey wizard pages case fields
8965
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.validPageList, caseEventData.data, false);
8966
8938
  caseEventData.event_token = eventTrigger.event_token;
8967
8939
  caseEventData.ignore_warning = this.ignoreWarning;
8968
8940
  if (this.confirmation) {
@@ -9063,9 +9035,7 @@ class CaseEditComponent {
9063
9035
  rawFormValueData[key] = parentField.formatted_value[caseField.id];
9064
9036
  }
9065
9037
  else {
9066
- if (!(caseField.hidden && caseField.retain_hidden_value)) {
9067
- rawFormValueData[key] = caseField.formatted_value;
9068
- }
9038
+ rawFormValueData[key] = caseField.formatted_value;
9069
9039
  }
9070
9040
  }
9071
9041
  }
@@ -9127,7 +9097,7 @@ class CaseEditComponent {
9127
9097
  }
9128
9098
  CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
9129
9099
  CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
9130
- CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
9100
+ CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0.ɵɵdirectiveInject(i2$1.FormBuilder), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FieldsUtils), i0.ɵɵdirectiveInject(FieldsPurger), i0.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0.ɵɵdirectiveInject(WizardFactoryService), i0.ɵɵdirectiveInject(SessionStorageService), i0.ɵɵdirectiveInject(WindowService), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(LoadingService)); };
9131
9101
  CaseEditComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditComponent, selectors: [["ccd-case-edit"]], inputs: { eventTrigger: "eventTrigger", submit: "submit", validate: "validate", saveDraft: "saveDraft", caseDetails: "caseDetails" }, outputs: { cancelled: "cancelled", submitted: "submitted" }, features: [i0.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) { if (rf & 1) {
9132
9102
  i0.ɵɵelement(0, "router-outlet");
9133
9103
  } }, directives: [i1$1.RouterOutlet], styles: ["#fieldset-case-data[_ngcontent-%COMP%]{margin-bottom:30px}#fieldset-case-data[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}#confirmation-header[_ngcontent-%COMP%]{width:630px;background-color:#17958b;border:1px solid #979797;color:#fff;text-align:center}#confirmation-body[_ngcontent-%COMP%]{width:630px;background-color:#fff}.valign-top[_ngcontent-%COMP%]{vertical-align:top}.summary-fields[_ngcontent-%COMP%]{margin-bottom:30px}.summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .summary-fields[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:0}a.disabled[_ngcontent-%COMP%]{pointer-events:none;cursor:default}.case-field-label[_ngcontent-%COMP%]{width:45%}.case-field-content[_ngcontent-%COMP%]{width:50%}.case-field-change[_ngcontent-%COMP%]{width:5%}"] });
@@ -9139,7 +9109,7 @@ CaseEditComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditComponent, sele
9139
9109
  styleUrls: ['../case-edit.scss'],
9140
9110
  providers: [GreyBarService]
9141
9111
  }]
9142
- }], function () { return [{ type: i2$1.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, { eventTrigger: [{
9112
+ }], function () { return [{ type: i2$1.FormBuilder }, { type: CaseNotifier }, { type: i1$1.Router }, { type: i1$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }]; }, { eventTrigger: [{
9143
9113
  type: Input
9144
9114
  }], submit: [{
9145
9115
  type: Input
@@ -9738,7 +9708,7 @@ function CaseEditPageComponent_ccd_case_event_completion_11_Template(rf, ctx) {
9738
9708
  i0.ɵɵproperty("eventCompletionParams", ctx_r8.caseEdit.eventCompletionParams);
9739
9709
  } }
9740
9710
  class CaseEditPageComponent {
9741
- constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
9711
+ constructor(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService) {
9742
9712
  this.caseEdit = caseEdit;
9743
9713
  this.route = route;
9744
9714
  this.formValueService = formValueService;
@@ -9749,7 +9719,6 @@ class CaseEditPageComponent {
9749
9719
  this.caseFieldService = caseFieldService;
9750
9720
  this.caseEditDataService = caseEditDataService;
9751
9721
  this.loadingService = loadingService;
9752
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
9753
9722
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
9754
9723
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
9755
9724
  this.formValuesChanged = false;
@@ -9957,9 +9926,6 @@ class CaseEditPageComponent {
9957
9926
  }
9958
9927
  }
9959
9928
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
9960
- if (this.caseEdit.validPageList.findIndex(page => page.id === this.currentPage.id) === -1) {
9961
- this.caseEdit.validPageList.push(this.currentPage);
9962
- }
9963
9929
  this.caseEdit.isSubmitting = true;
9964
9930
  this.caseEdit.error = null;
9965
9931
  const caseEventData = this.buildCaseEventData();
@@ -10208,8 +10174,6 @@ class CaseEditPageComponent {
10208
10174
  this.formValueService.sanitiseDynamicLists(caseFields, formFields);
10209
10175
  // Get hold of the CaseEventData.
10210
10176
  const caseEventData = this.formValueService.sanitise(formFields);
10211
- // delete fields which are not part of the case event journey wizard pages case fields
10212
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.caseEdit.validPageList, caseEventData.data, true, fromPreviousPage);
10213
10177
  // Tidy it up before we return it.
10214
10178
  this.formValueService.removeUnnecessaryFields(caseEventData.data, caseFields, clearEmpty, clearNonCase, fromPreviousPage, this.currentPage.case_fields);
10215
10179
  return caseEventData;
@@ -10250,7 +10214,7 @@ CaseEditPageComponent.RESUMED_FORM_SAVE = 'RESUMED_FORM_SAVE';
10250
10214
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
10251
10215
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
10252
10216
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
10253
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService), i0.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
10217
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$3.MatDialog), i0.ɵɵdirectiveInject(CaseFieldService), i0.ɵɵdirectiveInject(CaseEditDataService), i0.ɵɵdirectiveInject(LoadingService)); };
10254
10218
  CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 12, vars: 11, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], [3, "error"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], [3, "eventCompletionParams", "eventCanBeCompleted", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 1, "govuk-error-summary"], ["id", "error-summary-title", 1, "govuk-error-summary__title"], ["class", "govuk-error-summary__body", 4, "ngFor", "ngForOf"], [1, "govuk-error-summary__body"], [1, "govuk-list", "govuk-error-summary__list"], [1, "validation-error", 3, "click"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"], [3, "eventCompletionParams", "eventCanBeCompleted"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
10255
10219
  i0.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
10256
10220
  i0.ɵɵtemplate(1, CaseEditPageComponent_div_1_Template, 1, 0, "div", 1);
@@ -10289,7 +10253,7 @@ CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageCompone
10289
10253
  templateUrl: 'case-edit-page.html',
10290
10254
  styleUrls: ['./case-edit-page.scss']
10291
10255
  }]
10292
- }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, null); })();
10256
+ }], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }]; }, null); })();
10293
10257
 
10294
10258
  class CallbackErrorsContext {
10295
10259
  }
@@ -25246,8 +25210,7 @@ CaseEditorModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
25246
25210
  JudicialworkerService,
25247
25211
  CaseworkerService,
25248
25212
  SessionStorageService,
25249
- EventCompletionStateMachineService,
25250
- ValidPageListCaseFieldsService
25213
+ EventCompletionStateMachineService
25251
25214
  ], imports: [[
25252
25215
  CommonModule,
25253
25216
  RouterModule,
@@ -25360,8 +25323,7 @@ CaseEditorModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
25360
25323
  JudicialworkerService,
25361
25324
  CaseworkerService,
25362
25325
  SessionStorageService,
25363
- EventCompletionStateMachineService,
25364
- ValidPageListCaseFieldsService
25326
+ EventCompletionStateMachineService
25365
25327
  ]
25366
25328
  }]
25367
25329
  }], null, null); })();