@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.
@@ -10127,38 +10127,8 @@
10127
10127
  }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
10128
10128
  })();
10129
10129
 
10130
- var ValidPageListCaseFieldsService = /** @class */ (function () {
10131
- function ValidPageListCaseFieldsService() {
10132
- }
10133
- ValidPageListCaseFieldsService.prototype.deleteNonValidatedFields = function (validPageList, data, notFromEventSubmit, fromPreviousPage) {
10134
- if (fromPreviousPage === void 0) { fromPreviousPage = false; }
10135
- var validPageListCaseFields = [];
10136
- validPageList.forEach(function (page) {
10137
- if (notFromEventSubmit || ShowCondition.getInstance(page.show_condition).match(data)) {
10138
- page.case_fields.forEach(function (field) { return validPageListCaseFields.push(field); });
10139
- }
10140
- });
10141
- if (!fromPreviousPage && validPageListCaseFields.length > 0) {
10142
- Object.keys(data).forEach(function (key) {
10143
- if (validPageListCaseFields.findIndex(function (element) { return element.id === key; }) < 0) {
10144
- delete data[key];
10145
- ;
10146
- }
10147
- });
10148
- }
10149
- };
10150
- return ValidPageListCaseFieldsService;
10151
- }());
10152
- ValidPageListCaseFieldsService.ɵfac = function ValidPageListCaseFieldsService_Factory(t) { return new (t || ValidPageListCaseFieldsService)(); };
10153
- ValidPageListCaseFieldsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidPageListCaseFieldsService, factory: ValidPageListCaseFieldsService.ɵfac });
10154
- (function () {
10155
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidPageListCaseFieldsService, [{
10156
- type: i0.Injectable
10157
- }], null, null);
10158
- })();
10159
-
10160
10130
  var CaseEditComponent = /** @class */ (function () {
10161
- function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService) {
10131
+ function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService) {
10162
10132
  this.fb = fb;
10163
10133
  this.caseNotifier = caseNotifier;
10164
10134
  this.router = router;
@@ -10172,7 +10142,6 @@
10172
10142
  this.formValueService = formValueService;
10173
10143
  this.formErrorService = formErrorService;
10174
10144
  this.loadingService = loadingService;
10175
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
10176
10145
  this.cancelled = new i0.EventEmitter();
10177
10146
  this.submitted = new i0.EventEmitter();
10178
10147
  this.isEventCompletionChecksRequired = false;
@@ -10180,7 +10149,6 @@
10180
10149
  this.ignoreWarning = false;
10181
10150
  this.isLinkedCasesSubmission = false;
10182
10151
  this.callbackErrorsSubject = new rxjs.Subject();
10183
- this.validPageList = [];
10184
10152
  }
10185
10153
  CaseEditComponent.prototype.ngOnInit = function () {
10186
10154
  var _this = this;
@@ -10345,8 +10313,6 @@
10345
10313
  this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
10346
10314
  // Remove "Launcher"-type fields (these have no values and are not intended to be persisted)
10347
10315
  this.formValueService.removeCaseFieldsOfType(caseEventData.data, eventTrigger.case_fields, ['FlagLauncher', 'ComponentLauncher']);
10348
- // delete fields which are not part of the case event journey wizard pages case fields
10349
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.validPageList, caseEventData.data, false);
10350
10316
  caseEventData.event_token = eventTrigger.event_token;
10351
10317
  caseEventData.ignore_warning = this.ignoreWarning;
10352
10318
  if (this.confirmation) {
@@ -10448,9 +10414,7 @@
10448
10414
  rawFormValueData[key] = parentField.formatted_value[caseField.id];
10449
10415
  }
10450
10416
  else {
10451
- if (!(caseField.hidden && caseField.retain_hidden_value)) {
10452
- rawFormValueData[key] = caseField.formatted_value;
10453
- }
10417
+ rawFormValueData[key] = caseField.formatted_value;
10454
10418
  }
10455
10419
  }
10456
10420
  }
@@ -10516,7 +10480,7 @@
10516
10480
  }());
10517
10481
  CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
10518
10482
  CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
10519
- CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0__namespace.ɵɵdirectiveInject(i2__namespace$1.FormBuilder), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FieldsUtils), i0__namespace.ɵɵdirectiveInject(FieldsPurger), i0__namespace.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0__namespace.ɵɵdirectiveInject(WizardFactoryService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(LoadingService), i0__namespace.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
10483
+ CaseEditComponent.ɵfac = function CaseEditComponent_Factory(t) { return new (t || CaseEditComponent)(i0__namespace.ɵɵdirectiveInject(i2__namespace$1.FormBuilder), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FieldsUtils), i0__namespace.ɵɵdirectiveInject(FieldsPurger), i0__namespace.ɵɵdirectiveInject(ConditionalShowRegistrarService), i0__namespace.ɵɵdirectiveInject(WizardFactoryService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(WindowService), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
10520
10484
  CaseEditComponent.ɵcmp = i0__namespace.ɵɵ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__namespace.ɵɵProvidersFeature([GreyBarService])], decls: 1, vars: 0, template: function CaseEditComponent_Template(rf, ctx) {
10521
10485
  if (rf & 1) {
10522
10486
  i0__namespace.ɵɵelement(0, "router-outlet");
@@ -10531,7 +10495,7 @@
10531
10495
  styleUrls: ['../case-edit.scss'],
10532
10496
  providers: [GreyBarService]
10533
10497
  }]
10534
- }], function () { return [{ type: i2__namespace$1.FormBuilder }, { type: CaseNotifier }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, { eventTrigger: [{
10498
+ }], function () { return [{ type: i2__namespace$1.FormBuilder }, { type: CaseNotifier }, { type: i1__namespace$1.Router }, { type: i1__namespace$1.ActivatedRoute }, { type: FieldsUtils }, { type: FieldsPurger }, { type: ConditionalShowRegistrarService }, { type: WizardFactoryService }, { type: SessionStorageService }, { type: WindowService }, { type: FormValueService }, { type: FormErrorService }, { type: LoadingService }]; }, { eventTrigger: [{
10535
10499
  type: i0.Input
10536
10500
  }], submit: [{
10537
10501
  type: i0.Input
@@ -11227,7 +11191,7 @@
11227
11191
  }
11228
11192
  }
11229
11193
  var CaseEditPageComponent = /** @class */ (function () {
11230
- function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
11194
+ function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService) {
11231
11195
  this.caseEdit = caseEdit;
11232
11196
  this.route = route;
11233
11197
  this.formValueService = formValueService;
@@ -11238,7 +11202,6 @@
11238
11202
  this.caseFieldService = caseFieldService;
11239
11203
  this.caseEditDataService = caseEditDataService;
11240
11204
  this.loadingService = loadingService;
11241
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
11242
11205
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
11243
11206
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
11244
11207
  this.formValuesChanged = false;
@@ -11449,9 +11412,6 @@
11449
11412
  }
11450
11413
  }
11451
11414
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
11452
- if (this.caseEdit.validPageList.findIndex(function (page) { return page.id === _this.currentPage.id; }) === -1) {
11453
- this.caseEdit.validPageList.push(this.currentPage);
11454
- }
11455
11415
  this.caseEdit.isSubmitting = true;
11456
11416
  this.caseEdit.error = null;
11457
11417
  var caseEventData = this.buildCaseEventData();
@@ -11720,8 +11680,6 @@
11720
11680
  this.formValueService.sanitiseDynamicLists(caseFields, formFields);
11721
11681
  // Get hold of the CaseEventData.
11722
11682
  var caseEventData = this.formValueService.sanitise(formFields);
11723
- // delete fields which are not part of the case event journey wizard pages case fields
11724
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.caseEdit.validPageList, caseEventData.data, true, fromPreviousPage);
11725
11683
  // Tidy it up before we return it.
11726
11684
  this.formValueService.removeUnnecessaryFields(caseEventData.data, caseFields, clearEmpty, clearNonCase, fromPreviousPage, this.currentPage.case_fields);
11727
11685
  return caseEventData;
@@ -11764,7 +11722,7 @@
11764
11722
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
11765
11723
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
11766
11724
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
11767
- CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService), i0__namespace.ɵɵdirectiveInject(LoadingService), i0__namespace.ɵɵdirectiveInject(ValidPageListCaseFieldsService)); };
11725
+ CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0__namespace.ɵɵdirectiveInject(CaseEditComponent), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(FormValueService), i0__namespace.ɵɵdirectiveInject(FormErrorService), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(PageValidationService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(CaseFieldService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
11768
11726
  CaseEditPageComponent.ɵcmp = i0__namespace.ɵɵ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) {
11769
11727
  if (rf & 1) {
11770
11728
  i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
@@ -11807,7 +11765,7 @@
11807
11765
  templateUrl: 'case-edit-page.html',
11808
11766
  styleUrls: ['./case-edit-page.scss']
11809
11767
  }]
11810
- }], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }, { type: ValidPageListCaseFieldsService }]; }, null);
11768
+ }], function () { return [{ type: CaseEditComponent }, { type: i1__namespace$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0__namespace.ChangeDetectorRef }, { type: PageValidationService }, { type: i1__namespace$3.MatDialog }, { type: CaseFieldService }, { type: CaseEditDataService }, { type: LoadingService }]; }, null);
11811
11769
  })();
11812
11770
 
11813
11771
  var CallbackErrorsContext = /** @class */ (function () {
@@ -28934,8 +28892,7 @@
28934
28892
  JudicialworkerService,
28935
28893
  CaseworkerService,
28936
28894
  SessionStorageService,
28937
- EventCompletionStateMachineService,
28938
- ValidPageListCaseFieldsService
28895
+ EventCompletionStateMachineService
28939
28896
  ], imports: [[
28940
28897
  i2.CommonModule,
28941
28898
  i1$1.RouterModule,
@@ -29051,8 +29008,7 @@
29051
29008
  JudicialworkerService,
29052
29009
  CaseworkerService,
29053
29010
  SessionStorageService,
29054
- EventCompletionStateMachineService,
29055
- ValidPageListCaseFieldsService
29011
+ EventCompletionStateMachineService
29056
29012
  ]
29057
29013
  }]
29058
29014
  }], null, null);