@hmcts/ccd-case-ui-toolkit 6.19.6-restricted-case-access → 6.19.6-restricted-case-access-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.
@@ -9884,38 +9884,8 @@
9884
9884
  }], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
9885
9885
  })();
9886
9886
 
9887
- var ValidPageListCaseFieldsService = /** @class */ (function () {
9888
- function ValidPageListCaseFieldsService() {
9889
- }
9890
- ValidPageListCaseFieldsService.prototype.deleteNonValidatedFields = function (validPageList, data, notFromEventSubmit, fromPreviousPage) {
9891
- if (fromPreviousPage === void 0) { fromPreviousPage = false; }
9892
- var validPageListCaseFields = [];
9893
- validPageList.forEach(function (page) {
9894
- if (notFromEventSubmit || ShowCondition.getInstance(page.show_condition).match(data)) {
9895
- page.case_fields.forEach(function (field) { return validPageListCaseFields.push(field); });
9896
- }
9897
- });
9898
- if (!fromPreviousPage && validPageListCaseFields.length > 0) {
9899
- Object.keys(data).forEach(function (key) {
9900
- if (validPageListCaseFields.findIndex(function (element) { return element.id === key; }) < 0) {
9901
- delete data[key];
9902
- ;
9903
- }
9904
- });
9905
- }
9906
- };
9907
- return ValidPageListCaseFieldsService;
9908
- }());
9909
- ValidPageListCaseFieldsService.ɵfac = function ValidPageListCaseFieldsService_Factory(t) { return new (t || ValidPageListCaseFieldsService)(); };
9910
- ValidPageListCaseFieldsService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: ValidPageListCaseFieldsService, factory: ValidPageListCaseFieldsService.ɵfac });
9911
- (function () {
9912
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ValidPageListCaseFieldsService, [{
9913
- type: i0.Injectable
9914
- }], null, null);
9915
- })();
9916
-
9917
9887
  var CaseEditComponent = /** @class */ (function () {
9918
- function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService, validPageListCaseFieldsService) {
9888
+ function CaseEditComponent(fb, caseNotifier, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService, formValueService, formErrorService, loadingService) {
9919
9889
  this.fb = fb;
9920
9890
  this.caseNotifier = caseNotifier;
9921
9891
  this.router = router;
@@ -9929,7 +9899,6 @@
9929
9899
  this.formValueService = formValueService;
9930
9900
  this.formErrorService = formErrorService;
9931
9901
  this.loadingService = loadingService;
9932
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
9933
9902
  this.cancelled = new i0.EventEmitter();
9934
9903
  this.submitted = new i0.EventEmitter();
9935
9904
  this.isEventCompletionChecksRequired = false;
@@ -9937,7 +9906,6 @@
9937
9906
  this.ignoreWarning = false;
9938
9907
  this.isLinkedCasesSubmission = false;
9939
9908
  this.callbackErrorsSubject = new rxjs.Subject();
9940
- this.validPageList = [];
9941
9909
  }
9942
9910
  CaseEditComponent.prototype.ngOnInit = function () {
9943
9911
  var _this = this;
@@ -10102,8 +10070,6 @@
10102
10070
  this.formValueService.populateLinkedCasesDetailsFromCaseFields(caseEventData.data, eventTrigger.case_fields);
10103
10071
  // Remove "Launcher"-type fields (these have no values and are not intended to be persisted)
10104
10072
  this.formValueService.removeCaseFieldsOfType(caseEventData.data, eventTrigger.case_fields, ['FlagLauncher', 'ComponentLauncher']);
10105
- // delete fields which are not part of the case event journey wizard pages case fields
10106
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.validPageList, caseEventData.data, false);
10107
10073
  caseEventData.event_token = eventTrigger.event_token;
10108
10074
  caseEventData.ignore_warning = this.ignoreWarning;
10109
10075
  if (this.confirmation) {
@@ -10205,9 +10171,7 @@
10205
10171
  rawFormValueData[key] = parentField.formatted_value[caseField.id];
10206
10172
  }
10207
10173
  else {
10208
- if (!(caseField.hidden && caseField.retain_hidden_value)) {
10209
- rawFormValueData[key] = caseField.formatted_value;
10210
- }
10174
+ rawFormValueData[key] = caseField.formatted_value;
10211
10175
  }
10212
10176
  }
10213
10177
  }
@@ -10273,7 +10237,7 @@
10273
10237
  }());
10274
10238
  CaseEditComponent.ORIGIN_QUERY_PARAM = 'origin';
10275
10239
  CaseEditComponent.ALERT_MESSAGE = 'Page is being refreshed so you will be redirected to the first page of this event.';
10276
- 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)); };
10240
+ 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)); };
10277
10241
  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) {
10278
10242
  if (rf & 1) {
10279
10243
  i0__namespace.ɵɵelement(0, "router-outlet");
@@ -10288,7 +10252,7 @@
10288
10252
  styleUrls: ['../case-edit.scss'],
10289
10253
  providers: [GreyBarService]
10290
10254
  }]
10291
- }], 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: [{
10255
+ }], 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: [{
10292
10256
  type: i0.Input
10293
10257
  }], submit: [{
10294
10258
  type: i0.Input
@@ -10984,7 +10948,7 @@
10984
10948
  }
10985
10949
  }
10986
10950
  var CaseEditPageComponent = /** @class */ (function () {
10987
- function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService, validPageListCaseFieldsService) {
10951
+ function CaseEditPageComponent(caseEdit, route, formValueService, formErrorService, cdRef, pageValidationService, dialog, caseFieldService, caseEditDataService, loadingService) {
10988
10952
  this.caseEdit = caseEdit;
10989
10953
  this.route = route;
10990
10954
  this.formValueService = formValueService;
@@ -10995,7 +10959,6 @@
10995
10959
  this.caseFieldService = caseFieldService;
10996
10960
  this.caseEditDataService = caseEditDataService;
10997
10961
  this.loadingService = loadingService;
10998
- this.validPageListCaseFieldsService = validPageListCaseFieldsService;
10999
10962
  this.triggerTextStart = CaseEditPageComponent.TRIGGER_TEXT_START;
11000
10963
  this.triggerTextIgnoreWarnings = CaseEditPageComponent.TRIGGER_TEXT_CONTINUE;
11001
10964
  this.formValuesChanged = false;
@@ -11206,9 +11169,6 @@
11206
11169
  }
11207
11170
  }
11208
11171
  if (!this.caseEdit.isSubmitting && !this.currentPageIsNotValid()) {
11209
- if (this.caseEdit.validPageList.findIndex(function (page) { return page.id === _this.currentPage.id; }) === -1) {
11210
- this.caseEdit.validPageList.push(this.currentPage);
11211
- }
11212
11172
  this.caseEdit.isSubmitting = true;
11213
11173
  this.caseEdit.error = null;
11214
11174
  var caseEventData = this.buildCaseEventData();
@@ -11477,8 +11437,6 @@
11477
11437
  this.formValueService.sanitiseDynamicLists(caseFields, formFields);
11478
11438
  // Get hold of the CaseEventData.
11479
11439
  var caseEventData = this.formValueService.sanitise(formFields);
11480
- // delete fields which are not part of the case event journey wizard pages case fields
11481
- this.validPageListCaseFieldsService.deleteNonValidatedFields(this.caseEdit.validPageList, caseEventData.data, true, fromPreviousPage);
11482
11440
  // Tidy it up before we return it.
11483
11441
  this.formValueService.removeUnnecessaryFields(caseEventData.data, caseFields, clearEmpty, clearNonCase, fromPreviousPage, this.currentPage.case_fields);
11484
11442
  return caseEventData;
@@ -11521,7 +11479,7 @@
11521
11479
  CaseEditPageComponent.TRIGGER_TEXT_START = 'Continue';
11522
11480
  CaseEditPageComponent.TRIGGER_TEXT_SAVE = 'Save and continue';
11523
11481
  CaseEditPageComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Continue';
11524
- 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)); };
11482
+ 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)); };
11525
11483
  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) {
11526
11484
  if (rf & 1) {
11527
11485
  i0__namespace.ɵɵtemplate(0, CaseEditPageComponent_ng_container_0_Template, 3, 2, "ng-container", 0);
@@ -11564,7 +11522,7 @@
11564
11522
  templateUrl: 'case-edit-page.html',
11565
11523
  styleUrls: ['./case-edit-page.scss']
11566
11524
  }]
11567
- }], 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);
11525
+ }], 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);
11568
11526
  })();
11569
11527
 
11570
11528
  var CallbackErrorsContext = /** @class */ (function () {
@@ -28656,8 +28614,7 @@
28656
28614
  JudicialworkerService,
28657
28615
  CaseworkerService,
28658
28616
  SessionStorageService,
28659
- EventCompletionStateMachineService,
28660
- ValidPageListCaseFieldsService
28617
+ EventCompletionStateMachineService
28661
28618
  ], imports: [[
28662
28619
  i2.CommonModule,
28663
28620
  i1$1.RouterModule,
@@ -28773,8 +28730,7 @@
28773
28730
  JudicialworkerService,
28774
28731
  CaseworkerService,
28775
28732
  SessionStorageService,
28776
- EventCompletionStateMachineService,
28777
- ValidPageListCaseFieldsService
28733
+ EventCompletionStateMachineService
28778
28734
  ]
28779
28735
  }]
28780
28736
  }], null, null);