@hmcts/ccd-case-ui-toolkit 6.10.7-case-flags-create-change-links → 6.10.7-case-flags-create-change-links-v3

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.
Files changed (29) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +32 -29
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +1 -1
  6. package/esm2015/lib/shared/components/case-editor/services/case-flag-state.service.js +3 -2
  7. package/esm2015/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.js +2 -2
  8. package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-summary-list/case-flag-summary-list.component.js +6 -6
  9. package/esm2015/lib/shared/components/palette/case-flag/components/search-language-interpreter/search-language-interpreter.component.js +1 -1
  10. package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.js +1 -1
  11. package/esm2015/lib/shared/components/palette/case-flag/read-case-flag-field.component.js +8 -5
  12. package/esm2015/lib/shared/components/palette/case-flag/write-case-flag-field.component.js +3 -2
  13. package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -2
  14. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +29 -26
  15. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  16. package/lib/shared/components/case-editor/services/case-flag-state.service.d.ts +2 -1
  17. package/lib/shared/components/case-editor/services/case-flag-state.service.d.ts.map +1 -1
  18. package/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.d.ts +0 -1
  19. package/lib/shared/components/palette/case-flag/components/add-comments/add-comments.component.d.ts.map +1 -1
  20. package/lib/shared/components/palette/case-flag/components/case-flag-summary-list/case-flag-summary-list.component.d.ts +1 -2
  21. package/lib/shared/components/palette/case-flag/components/case-flag-summary-list/case-flag-summary-list.component.d.ts.map +1 -1
  22. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts +1 -1
  23. package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts.map +1 -1
  24. package/lib/shared/components/palette/case-flag/read-case-flag-field.component.d.ts +3 -1
  25. package/lib/shared/components/palette/case-flag/read-case-flag-field.component.d.ts.map +1 -1
  26. package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
  27. package/lib/shared/domain/case-flag/flag-type.model.d.ts +1 -1
  28. package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -12078,6 +12078,24 @@
12078
12078
  UpdateFlagStep["STATUS_HINT_TEXT"] = "Describe reason for status change, if choosing 'not approved' provide name for person approving decision";
12079
12079
  })(exports.UpdateFlagStep || (exports.UpdateFlagStep = {}));
12080
12080
 
12081
+ var CaseFlagStateService = /** @class */ (function () {
12082
+ function CaseFlagStateService() {
12083
+ this.formGroup = new i1$2.FormGroup({});
12084
+ }
12085
+ CaseFlagStateService.prototype.resetCache = function (pageLocation) {
12086
+ this.formGroup = new i1$2.FormGroup({});
12087
+ this.pageLocation = pageLocation;
12088
+ };
12089
+ return CaseFlagStateService;
12090
+ }());
12091
+ CaseFlagStateService.ɵfac = function CaseFlagStateService_Factory(t) { return new (t || CaseFlagStateService)(); };
12092
+ CaseFlagStateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CaseFlagStateService, factory: CaseFlagStateService.ɵfac });
12093
+ (function () {
12094
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFlagStateService, [{
12095
+ type: i0.Injectable
12096
+ }], null, null);
12097
+ })();
12098
+
12081
12099
  function ReadCaseFlagFieldComponent_ng_container_1_Template(rf, ctx) {
12082
12100
  if (rf & 1) {
12083
12101
  var _r3_1 = i0__namespace.ɵɵgetCurrentView();
@@ -12146,10 +12164,11 @@
12146
12164
  }
12147
12165
  var ReadCaseFlagFieldComponent = /** @class */ (function (_super) {
12148
12166
  __extends(ReadCaseFlagFieldComponent, _super);
12149
- function ReadCaseFlagFieldComponent(route, router) {
12167
+ function ReadCaseFlagFieldComponent(route, router, caseFlagStateService) {
12150
12168
  var _this = _super.call(this) || this;
12151
12169
  _this.route = route;
12152
12170
  _this.router = router;
12171
+ _this.caseFlagStateService = caseFlagStateService;
12153
12172
  _this.paletteContext = exports.PaletteContext;
12154
12173
  _this.caseLevelCaseFlagsFieldId = 'caseFlags';
12155
12174
  _this.caseNameMissing = 'Case name missing';
@@ -12227,7 +12246,7 @@
12227
12246
  return null;
12228
12247
  };
12229
12248
  ReadCaseFlagFieldComponent.prototype.navigateBackToForm = function (fieldState) {
12230
- this.router.navigate(['../createCaseFlagCaseFlagFormPage'], {
12249
+ this.router.navigate(["../" + this.caseFlagStateService.pageLocation], {
12231
12250
  relativeTo: this.route,
12232
12251
  state: {
12233
12252
  fieldState: fieldState,
@@ -12236,7 +12255,7 @@
12236
12255
  };
12237
12256
  return ReadCaseFlagFieldComponent;
12238
12257
  }(AbstractFieldReadComponent));
12239
- ReadCaseFlagFieldComponent.ɵfac = function ReadCaseFlagFieldComponent_Factory(t) { return new (t || ReadCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router)); };
12258
+ ReadCaseFlagFieldComponent.ɵfac = function ReadCaseFlagFieldComponent_Factory(t) { return new (t || ReadCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.Router), i0__namespace.ɵɵdirectiveInject(CaseFlagStateService)); };
12240
12259
  ReadCaseFlagFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadCaseFlagFieldComponent, selectors: [["ccd-read-case-flag-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[3, "ngSwitch"], [4, "ngSwitchCase"], [4, "ngSwitchDefault"], [3, "flagForSummaryDisplay", "summaryListDisplayMode", "changeButtonEmitter"], [1, "govuk-heading-l"], [4, "ngFor", "ngForOf"], [4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader", 4, "ngIf"], [3, "tableCaption", "flagData", "firstColumnHeader"]], template: function ReadCaseFlagFieldComponent_Template(rf, ctx) {
12241
12260
  if (rf & 1) {
12242
12261
  i0__namespace.ɵɵelementContainerStart(0, 0);
@@ -12258,24 +12277,7 @@
12258
12277
  templateUrl: './read-case-flag-field.component.html',
12259
12278
  styleUrls: ['./read-case-flag-field.component.scss']
12260
12279
  }]
12261
- }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }]; }, null);
12262
- })();
12263
-
12264
- var CaseFlagStateService = /** @class */ (function () {
12265
- function CaseFlagStateService() {
12266
- this.formGroup = new i1$2.FormGroup({});
12267
- }
12268
- CaseFlagStateService.prototype.resetCache = function () {
12269
- this.formGroup = new i1$2.FormGroup({});
12270
- };
12271
- return CaseFlagStateService;
12272
- }());
12273
- CaseFlagStateService.ɵfac = function CaseFlagStateService_Factory(t) { return new (t || CaseFlagStateService)(); };
12274
- CaseFlagStateService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CaseFlagStateService, factory: CaseFlagStateService.ɵfac });
12275
- (function () {
12276
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFlagStateService, [{
12277
- type: i0.Injectable
12278
- }], null, null);
12280
+ }], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }, { type: CaseFlagStateService }]; }, null);
12279
12281
  })();
12280
12282
 
12281
12283
  function WriteCaseFlagFieldComponent_div_0_div_3_Template(rf, ctx) {
@@ -12495,7 +12497,8 @@
12495
12497
  var _this = this;
12496
12498
  var _a, _b;
12497
12499
  if (!(((_a = this.location.getState()) === null || _a === void 0 ? void 0 : _a['fieldState']) >= 0)) {
12498
- this.caseFlagStateService.resetCache();
12500
+ var params = this.route.snapshot.params;
12501
+ this.caseFlagStateService.resetCache("../" + params['eid'] + "/" + params['page']);
12499
12502
  }
12500
12503
  this.caseFlagParentFormGroup = this.caseFlagStateService.formGroup;
12501
12504
  this.caseEditDataService.clearFormValidationErrors();
@@ -19055,7 +19058,7 @@
19055
19058
  }
19056
19059
  finally { if (e_1) throw e_1.error; }
19057
19060
  }
19058
- return [undefined, []];
19061
+ return [false, []];
19059
19062
  };
19060
19063
  return FlagType;
19061
19064
  }());
@@ -20049,7 +20052,7 @@
20049
20052
  selector: 'ccd-add-comments',
20050
20053
  templateUrl: './add-comments.component.html'
20051
20054
  }]
20052
- }], function () { return []; }, { formGroup: [{
20055
+ }], null, { formGroup: [{
20053
20056
  type: i0.Input
20054
20057
  }], optional: [{
20055
20058
  type: i0.Input
@@ -20541,7 +20544,7 @@
20541
20544
  var _r6_1 = i0__namespace.ɵɵgetCurrentView();
20542
20545
  i0__namespace.ɵɵelementStart(0, "dd", 7);
20543
20546
  i0__namespace.ɵɵelementStart(1, "a", 8);
20544
- i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_6_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(2); return ctx_r5.changeButtonEmitter.emit(ctx_r5.CaseFlagFieldState.FLAG_LOCATION); });
20547
+ i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_6_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(2); return ctx_r5.changeButtonEmitter.emit(ctx_r5.caseFlagFieldState.FLAG_LOCATION); });
20545
20548
  i0__namespace.ɵɵtext(2, " Change");
20546
20549
  i0__namespace.ɵɵelementStart(3, "span", 9);
20547
20550
  i0__namespace.ɵɵtext(4, " party name");
@@ -20555,7 +20558,7 @@
20555
20558
  var _r8_1 = i0__namespace.ɵɵgetCurrentView();
20556
20559
  i0__namespace.ɵɵelementStart(0, "dd", 7);
20557
20560
  i0__namespace.ɵɵelementStart(1, "a", 8);
20558
- i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_12_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.changeButtonEmitter.emit(ctx_r7.CaseFlagFieldState.FLAG_TYPE); });
20561
+ i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_12_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(2); return ctx_r7.changeButtonEmitter.emit(ctx_r7.caseFlagFieldState.FLAG_TYPE); });
20559
20562
  i0__namespace.ɵɵtext(2, " Change");
20560
20563
  i0__namespace.ɵɵelementStart(3, "span", 9);
20561
20564
  i0__namespace.ɵɵtext(4, " description");
@@ -20569,7 +20572,7 @@
20569
20572
  var _r10_1 = i0__namespace.ɵɵgetCurrentView();
20570
20573
  i0__namespace.ɵɵelementStart(0, "dd", 7);
20571
20574
  i0__namespace.ɵɵelementStart(1, "a", 8);
20572
- i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_18_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(2); return ctx_r9.changeButtonEmitter.emit(ctx_r9.CaseFlagFieldState.FLAG_COMMENTS); });
20575
+ i0__namespace.ɵɵlistener("click", function CaseFlagSummaryListComponent_dl_0_dd_18_Template_a_click_1_listener() { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(2); return ctx_r9.changeButtonEmitter.emit(ctx_r9.caseFlagFieldState.FLAG_COMMENTS); });
20573
20576
  i0__namespace.ɵɵtext(2, " Change");
20574
20577
  i0__namespace.ɵɵelementStart(3, "span", 9);
20575
20578
  i0__namespace.ɵɵtext(4, " comments");
@@ -20653,7 +20656,7 @@
20653
20656
  function CaseFlagSummaryListComponent() {
20654
20657
  this.changeButtonEmitter = new i0.EventEmitter();
20655
20658
  this.displayMode = exports.CaseFlagSummaryListDisplayMode;
20656
- this.CaseFlagFieldState = exports.CaseFlagFieldState;
20659
+ this.caseFlagFieldState = exports.CaseFlagFieldState;
20657
20660
  this.caseLevelLocation = 'Case level';
20658
20661
  this.updateFlagHeaderText = 'Update flag for';
20659
20662
  this.addFlagHeaderText = 'Add flag to';
@@ -20688,7 +20691,7 @@
20688
20691
  selector: 'ccd-case-flag-summary-list',
20689
20692
  templateUrl: './case-flag-summary-list.component.html'
20690
20693
  }]
20691
- }], function () { return []; }, { flagForSummaryDisplay: [{
20694
+ }], null, { flagForSummaryDisplay: [{
20692
20695
  type: i0.Input
20693
20696
  }], summaryListDisplayMode: [{
20694
20697
  type: i0.Input