@hmcts/ccd-case-ui-toolkit 6.19.5-secure-doc-case-creation.1 → 6.19.5-yes-no-bug-fix-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.
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +40 -18
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
- package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
- package/esm2015/lib/shared/components/case-editor/services/case.notifier.js +1 -8
- package/esm2015/lib/shared/components/create-case-filters/create-case-filters.component.js +3 -3
- package/esm2015/lib/shared/components/palette/document/write-document-field.component.js +1 -4
- package/esm2015/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.js +16 -1
- package/esm2015/lib/shared/components/palette/yes-no/read-yes-no-field.component.js +10 -5
- package/esm2015/lib/shared/components/palette/yes-no/write-yes-no-field.component.js +5 -4
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +12 -1
- package/esm2015/lib/shared/services/jurisdiction/jurisdiction.service.js +1 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +38 -18
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/case-editor/services/case.notifier.d.ts.map +1 -1
- package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts +1 -1
- package/lib/shared/components/create-case-filters/create-case-filters.component.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts +5 -3
- package/lib/shared/components/palette/judicial-user/write-judicial-user-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/yes-no/read-yes-no-field.component.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/services/jurisdiction/jurisdiction.service.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -7708,7 +7708,6 @@
|
|
|
7708
7708
|
return this.httpService.get('/aggregated/caseworkers/:uid/jurisdictions?access=read');
|
|
7709
7709
|
};
|
|
7710
7710
|
JurisdictionService.prototype.announceSelectedJurisdiction = function (jurisdiction) {
|
|
7711
|
-
console.info('Announcing selected jurisdiction = ' + (jurisdiction === null || jurisdiction === void 0 ? void 0 : jurisdiction.id));
|
|
7712
7711
|
this.selectedJurisdictionSource.next(jurisdiction);
|
|
7713
7712
|
this.selectedJurisdictionBS.next(jurisdiction);
|
|
7714
7713
|
};
|
|
@@ -9374,23 +9373,16 @@
|
|
|
9374
9373
|
this.cachedCaseView = null;
|
|
9375
9374
|
};
|
|
9376
9375
|
CaseNotifier.prototype.announceCase = function (c) {
|
|
9377
|
-
console.info('announceCase started.');
|
|
9378
9376
|
this.caseViewSource.next(c);
|
|
9379
|
-
console.info('announceCase finished.');
|
|
9380
9377
|
};
|
|
9381
9378
|
CaseNotifier.prototype.fetchAndRefresh = function (cid) {
|
|
9382
9379
|
var _this = this;
|
|
9383
|
-
console.info('fetchAndRefresh started.');
|
|
9384
9380
|
return this.casesService
|
|
9385
9381
|
.getCaseViewV2(cid)
|
|
9386
9382
|
.pipe(operators.map(function (caseView) {
|
|
9387
|
-
console.info('mapping caseView started.');
|
|
9388
|
-
// this.casesService.syncWait(10);
|
|
9389
|
-
// throw new Error('******************************************************');
|
|
9390
9383
|
_this.cachedCaseView = classTransformer.plainToClassFromExist(new CaseView(), caseView);
|
|
9391
9384
|
_this.setBasicFields(_this.cachedCaseView.tabs);
|
|
9392
9385
|
_this.announceCase(_this.cachedCaseView);
|
|
9393
|
-
console.info('mapping caseView finished. Returning it.');
|
|
9394
9386
|
return _this.cachedCaseView;
|
|
9395
9387
|
}));
|
|
9396
9388
|
};
|
|
@@ -14657,7 +14649,6 @@
|
|
|
14657
14649
|
};
|
|
14658
14650
|
WriteDocumentFieldComponent.prototype.ngOnInit = function () {
|
|
14659
14651
|
this.secureModeOn = this.appConfig.getDocumentSecureMode();
|
|
14660
|
-
console.info('writeDocumentField.ngInit: secure mode = ' + this.secureModeOn);
|
|
14661
14652
|
if (this.secureModeOn) {
|
|
14662
14653
|
this.subscribeToCaseDetails();
|
|
14663
14654
|
}
|
|
@@ -14786,7 +14777,6 @@
|
|
|
14786
14777
|
var _a, _b;
|
|
14787
14778
|
_this.caseTypeId = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_id;
|
|
14788
14779
|
_this.jurisdictionId = (_b = (_a = caseDetails === null || caseDetails === void 0 ? void 0 : caseDetails.case_type) === null || _a === void 0 ? void 0 : _a.jurisdiction) === null || _b === void 0 ? void 0 : _b.id;
|
|
14789
|
-
console.info("caseNotifier.next: caseType=" + _this.caseTypeId + " juris=" + _this.jurisdictionId);
|
|
14790
14780
|
}
|
|
14791
14781
|
});
|
|
14792
14782
|
this.jurisdictionSubs = this.jurisdictionService.selectedJurisdictionBS.subscribe({
|
|
@@ -14797,7 +14787,6 @@
|
|
|
14797
14787
|
_this.caseTypeId = jurisdiction.currentCaseType.id;
|
|
14798
14788
|
}
|
|
14799
14789
|
}
|
|
14800
|
-
console.info("selectedJurisdiction.next: caseType=" + _this.caseTypeId + " juris=" + _this.jurisdictionId);
|
|
14801
14790
|
}
|
|
14802
14791
|
});
|
|
14803
14792
|
};
|
|
@@ -16425,12 +16414,24 @@
|
|
|
16425
16414
|
}
|
|
16426
16415
|
};
|
|
16427
16416
|
WriteJudicialUserFieldComponent.prototype.setJurisdictionAndCaseType = function () {
|
|
16417
|
+
var _this = this;
|
|
16428
16418
|
var caseInfoStr = this.sessionStorageService.getItem('caseInfo');
|
|
16429
16419
|
if (caseInfoStr) {
|
|
16430
16420
|
var caseInfo = JSON.parse(caseInfoStr);
|
|
16431
16421
|
this.jurisdiction = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.jurisdiction;
|
|
16432
16422
|
this.caseType = caseInfo === null || caseInfo === void 0 ? void 0 : caseInfo.caseType;
|
|
16433
16423
|
}
|
|
16424
|
+
else {
|
|
16425
|
+
// If there is no case info, attempt to get the current jurisdiction and case type via the JurisdictionService
|
|
16426
|
+
this.jurisdictionSubscription = this.jurisdictionService.selectedJurisdictionBS.subscribe(function (jurisdiction) {
|
|
16427
|
+
if (jurisdiction) {
|
|
16428
|
+
_this.jurisdiction = jurisdiction.id;
|
|
16429
|
+
if (jurisdiction.currentCaseType) {
|
|
16430
|
+
_this.caseType = jurisdiction.currentCaseType.id;
|
|
16431
|
+
}
|
|
16432
|
+
}
|
|
16433
|
+
});
|
|
16434
|
+
}
|
|
16434
16435
|
};
|
|
16435
16436
|
WriteJudicialUserFieldComponent.prototype.displayJudicialUser = function (judicialUser) {
|
|
16436
16437
|
return judicialUser
|
|
@@ -16476,6 +16477,10 @@
|
|
|
16476
16477
|
this.judicialUserControl.setValidators(i2$1.Validators.required);
|
|
16477
16478
|
}
|
|
16478
16479
|
};
|
|
16480
|
+
WriteJudicialUserFieldComponent.prototype.ngOnDestroy = function () {
|
|
16481
|
+
var _a;
|
|
16482
|
+
(_a = this.jurisdictionSubscription) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
16483
|
+
};
|
|
16479
16484
|
return WriteJudicialUserFieldComponent;
|
|
16480
16485
|
}(WriteComplexFieldComponent));
|
|
16481
16486
|
WriteJudicialUserFieldComponent.ɵfac = function WriteJudicialUserFieldComponent_Factory(t) { return new (t || WriteJudicialUserFieldComponent)(i0__namespace.ɵɵdirectiveInject(JurisdictionService), i0__namespace.ɵɵdirectiveInject(SessionStorageService), i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe), i0__namespace.ɵɵdirectiveInject(FormValidatorsService)); };
|
|
@@ -21018,27 +21023,31 @@
|
|
|
21018
21023
|
ReadYesNoFieldComponent.prototype.ngOnInit = function () {
|
|
21019
21024
|
_super.prototype.ngOnInit.call(this);
|
|
21020
21025
|
this.formattedValue = this.yesNoService.format(this.caseField.value);
|
|
21026
|
+
if (!this.caseField.label) {
|
|
21027
|
+
this.caseField.label = this.formattedValue;
|
|
21028
|
+
}
|
|
21021
21029
|
};
|
|
21022
21030
|
return ReadYesNoFieldComponent;
|
|
21023
21031
|
}(AbstractFieldReadComponent));
|
|
21024
21032
|
ReadYesNoFieldComponent.ɵfac = function ReadYesNoFieldComponent_Factory(t) { return new (t || ReadYesNoFieldComponent)(i0__namespace.ɵɵdirectiveInject(YesNoService)); };
|
|
21025
|
-
ReadYesNoFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadYesNoFieldComponent, selectors: [["ccd-read-yes-no-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
21033
|
+
ReadYesNoFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadYesNoFieldComponent, selectors: [["ccd-read-yes-no-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 5, consts: [[1, "text-16"]], template: function ReadYesNoFieldComponent_Template(rf, ctx) {
|
|
21026
21034
|
if (rf & 1) {
|
|
21027
21035
|
i0__namespace.ɵɵelementStart(0, "span", 0);
|
|
21028
21036
|
i0__namespace.ɵɵtext(1);
|
|
21037
|
+
i0__namespace.ɵɵpipe(2, "rpxTranslate");
|
|
21029
21038
|
i0__namespace.ɵɵelementEnd();
|
|
21030
21039
|
}
|
|
21031
21040
|
if (rf & 2) {
|
|
21032
21041
|
i0__namespace.ɵɵadvance(1);
|
|
21033
|
-
i0__namespace.ɵɵtextInterpolate(ctx.formattedValue);
|
|
21042
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind3(2, 1, ctx.caseField.label, null, ctx.formattedValue));
|
|
21034
21043
|
}
|
|
21035
|
-
}, encapsulation: 2 });
|
|
21044
|
+
}, pipes: [i1__namespace.RpxTranslatePipe], encapsulation: 2 });
|
|
21036
21045
|
(function () {
|
|
21037
21046
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadYesNoFieldComponent, [{
|
|
21038
21047
|
type: i0.Component,
|
|
21039
21048
|
args: [{
|
|
21040
21049
|
selector: 'ccd-read-yes-no-field',
|
|
21041
|
-
template: "<span class=\"text-16\">{{formattedValue}}</span>"
|
|
21050
|
+
template: "<span class=\"text-16\">{{caseField.label | rpxTranslate : null : formattedValue}}</span>"
|
|
21042
21051
|
}]
|
|
21043
21052
|
}], function () { return [{ type: YesNoService }]; }, null);
|
|
21044
21053
|
})();
|
|
@@ -21091,20 +21100,21 @@
|
|
|
21091
21100
|
i0__namespace.ɵɵelement(1, "input", 11);
|
|
21092
21101
|
i0__namespace.ɵɵelementStart(2, "label", 12);
|
|
21093
21102
|
i0__namespace.ɵɵtext(3);
|
|
21103
|
+
i0__namespace.ɵɵpipe(4, "rpxTranslate");
|
|
21094
21104
|
i0__namespace.ɵɵelementEnd();
|
|
21095
21105
|
i0__namespace.ɵɵelementEnd();
|
|
21096
21106
|
}
|
|
21097
21107
|
if (rf & 2) {
|
|
21098
21108
|
var value_r4 = ctx.$implicit;
|
|
21099
21109
|
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
21100
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(
|
|
21110
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c0$w, ctx_r3.yesNoControl.value === value_r4));
|
|
21101
21111
|
i0__namespace.ɵɵadvance(1);
|
|
21102
21112
|
i0__namespace.ɵɵproperty("id", ctx_r3.createElementId(value_r4))("name", ctx_r3.id())("formControl", ctx_r3.yesNoControl)("value", value_r4);
|
|
21103
21113
|
i0__namespace.ɵɵattribute("name", ctx_r3.id());
|
|
21104
21114
|
i0__namespace.ɵɵadvance(1);
|
|
21105
21115
|
i0__namespace.ɵɵproperty("for", ctx_r3.createElementId(value_r4));
|
|
21106
21116
|
i0__namespace.ɵɵadvance(1);
|
|
21107
|
-
i0__namespace.ɵɵtextInterpolate(value_r4);
|
|
21117
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind3(4, 8, ctx_r3.caseField.label, null, value_r4));
|
|
21108
21118
|
}
|
|
21109
21119
|
}
|
|
21110
21120
|
var _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
@@ -21132,7 +21142,7 @@
|
|
|
21132
21142
|
i0__namespace.ɵɵtemplate(4, WriteYesNoFieldComponent_span_4_Template, 3, 3, "span", 3);
|
|
21133
21143
|
i0__namespace.ɵɵtemplate(5, WriteYesNoFieldComponent_span_5_Template, 4, 6, "span", 4);
|
|
21134
21144
|
i0__namespace.ɵɵelementStart(6, "div", 5);
|
|
21135
|
-
i0__namespace.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template,
|
|
21145
|
+
i0__namespace.ɵɵtemplate(7, WriteYesNoFieldComponent_div_7_Template, 5, 14, "div", 6);
|
|
21136
21146
|
i0__namespace.ɵɵelementEnd();
|
|
21137
21147
|
i0__namespace.ɵɵelementEnd();
|
|
21138
21148
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -29820,6 +29830,7 @@
|
|
|
29820
29830
|
});
|
|
29821
29831
|
};
|
|
29822
29832
|
WorkbasketFiltersComponent.prototype.apply = function (init) {
|
|
29833
|
+
var _this = this;
|
|
29823
29834
|
// Save filters as query parameters for current route
|
|
29824
29835
|
var queryParams = {};
|
|
29825
29836
|
if (this.selected.jurisdiction) {
|
|
@@ -29851,9 +29862,20 @@
|
|
|
29851
29862
|
if (init) {
|
|
29852
29863
|
this.windowService.setLocalStorage(SAVED_QUERY_PARAM_LOC_STORAGE, JSON.stringify(queryParams));
|
|
29853
29864
|
if (Object.keys(this.formGroup.controls).length > 0) {
|
|
29865
|
+
// Find all "special case" JudicialUser FormControl keys and remove the corresponding values from the
|
|
29866
|
+
// FormGroup value because these values are not intended to be stored and subsequently passed as query string
|
|
29867
|
+
// parameters when calling searchCases API endpoint
|
|
29868
|
+
var judicialUserControlValuesToRemove = Object.keys(this.formGroup.controls).filter(function (key) { return key.endsWith('_judicialUserControl'); });
|
|
29869
|
+
judicialUserControlValuesToRemove.forEach(function (controlKey) { return delete _this.formGroup.value[controlKey]; });
|
|
29854
29870
|
this.windowService.setLocalStorage(FORM_GROUP_VAL_LOC_STORAGE, JSON.stringify(this.formGroup.value));
|
|
29855
29871
|
}
|
|
29856
29872
|
}
|
|
29873
|
+
// Announce selected jurisdiction via JurisdictionService
|
|
29874
|
+
if (this.selected.jurisdiction) {
|
|
29875
|
+
// Set the selected case type as the current case type of the selected jurisdiction
|
|
29876
|
+
this.selected.jurisdiction.currentCaseType = this.selected.caseType;
|
|
29877
|
+
this.jurisdictionService.announceSelectedJurisdiction(this.selected.jurisdiction);
|
|
29878
|
+
}
|
|
29857
29879
|
// Apply filters
|
|
29858
29880
|
this.onApply.emit({ selected: this.selected, queryParams: queryParams });
|
|
29859
29881
|
this.setFocusToTop();
|