@hmcts/ccd-case-ui-toolkit 6.13.0-rc10 → 6.13.0-rc12
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 +56 -35
- 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/palette/case-flag/components/select-flag-type/select-flag-type.component.js +28 -15
- package/esm2015/lib/shared/components/palette/case-flag/write-case-flag-field.component.js +28 -20
- package/esm2015/lib/shared/components/palette/palette.module.js +2 -2
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +56 -35
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts +2 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-type/select-flag-type.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +1 -0
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -12470,7 +12470,7 @@
|
|
|
12470
12470
|
if (rf & 2) {
|
|
12471
12471
|
var ctx_r8 = i0__namespace.ɵɵnextContext(2);
|
|
12472
12472
|
i0__namespace.ɵɵadvance(1);
|
|
12473
|
-
i0__namespace.ɵɵproperty("formGroup", ctx_r8.caseFlagParentFormGroup)("jurisdiction", ctx_r8.jurisdiction)("caseTypeId", ctx_r8.caseTypeId);
|
|
12473
|
+
i0__namespace.ɵɵproperty("formGroup", ctx_r8.caseFlagParentFormGroup)("jurisdiction", ctx_r8.jurisdiction)("caseTypeId", ctx_r8.caseTypeId)("hmctsServiceId", ctx_r8.hmctsServiceId);
|
|
12474
12474
|
}
|
|
12475
12475
|
}
|
|
12476
12476
|
function WriteCaseFlagFieldComponent_div_1_ng_container_6_Template(rf, ctx) {
|
|
@@ -12512,7 +12512,7 @@
|
|
|
12512
12512
|
i0__namespace.ɵɵtext(3);
|
|
12513
12513
|
i0__namespace.ɵɵelementEnd();
|
|
12514
12514
|
i0__namespace.ɵɵtemplate(4, WriteCaseFlagFieldComponent_div_1_ng_container_4_Template, 2, 2, "ng-container", 11);
|
|
12515
|
-
i0__namespace.ɵɵtemplate(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 2,
|
|
12515
|
+
i0__namespace.ɵɵtemplate(5, WriteCaseFlagFieldComponent_div_1_ng_container_5_Template, 2, 4, "ng-container", 11);
|
|
12516
12516
|
i0__namespace.ɵɵtemplate(6, WriteCaseFlagFieldComponent_div_1_ng_container_6_Template, 2, 3, "ng-container", 11);
|
|
12517
12517
|
i0__namespace.ɵɵtemplate(7, WriteCaseFlagFieldComponent_div_1_ng_container_7_Template, 2, 2, "ng-container", 11);
|
|
12518
12518
|
i0__namespace.ɵɵelementEnd();
|
|
@@ -12635,22 +12635,30 @@
|
|
|
12635
12635
|
}
|
|
12636
12636
|
}
|
|
12637
12637
|
// Extract all flags-related data from the CaseEventTrigger object in the snapshot data
|
|
12638
|
-
if (this.route.snapshot.data.eventTrigger
|
|
12639
|
-
|
|
12640
|
-
|
|
12641
|
-
|
|
12642
|
-
|
|
12643
|
-
|
|
12644
|
-
|
|
12645
|
-
|
|
12646
|
-
|
|
12647
|
-
|
|
12648
|
-
|
|
12649
|
-
|
|
12650
|
-
|
|
12651
|
-
|
|
12652
|
-
|
|
12653
|
-
|
|
12638
|
+
if (this.route.snapshot.data.eventTrigger) {
|
|
12639
|
+
// Get the HMCTSServiceId from supplementary data, if it exists (required for retrieving the available flag types in
|
|
12640
|
+
// the first instance, only falling back on case type ID or jurisidiction if it's not present)
|
|
12641
|
+
if (this.route.snapshot.data.eventTrigger.supplementary_data
|
|
12642
|
+
&& this.route.snapshot.data.eventTrigger.supplementary_data.HMCTSServiceId) {
|
|
12643
|
+
this.hmctsServiceId = this.route.snapshot.data.eventTrigger.supplementary_data.HMCTSServiceId;
|
|
12644
|
+
}
|
|
12645
|
+
if (this.route.snapshot.data.eventTrigger.case_fields) {
|
|
12646
|
+
this.flagsData = (this.route.snapshot.data.eventTrigger.case_fields)
|
|
12647
|
+
.reduce(function (flags, caseField) {
|
|
12648
|
+
return FieldsUtils.extractFlagsDataFromCaseField(flags, caseField, caseField.id, caseField);
|
|
12649
|
+
}, []);
|
|
12650
|
+
// Set boolean indicating the display_context_parameter is "update"
|
|
12651
|
+
this.isDisplayContextParameterUpdate =
|
|
12652
|
+
this.setDisplayContextParameterUpdate((this.route.snapshot.data.eventTrigger.case_fields));
|
|
12653
|
+
// Set starting field state
|
|
12654
|
+
this.fieldState = this.isDisplayContextParameterUpdate ? exports.CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS : exports.CaseFlagFieldState.FLAG_LOCATION;
|
|
12655
|
+
// Get case title, to be used by child components
|
|
12656
|
+
this.caseEditDataService.caseTitle$.subscribe({
|
|
12657
|
+
next: function (title) {
|
|
12658
|
+
_this.caseTitle = title.length > 0 ? title : _this.caseNameMissing;
|
|
12659
|
+
}
|
|
12660
|
+
});
|
|
12661
|
+
}
|
|
12654
12662
|
}
|
|
12655
12663
|
};
|
|
12656
12664
|
WriteCaseFlagFieldComponent.prototype.setDisplayContextParameterUpdate = function (caseFields) {
|
|
@@ -12886,7 +12894,7 @@
|
|
|
12886
12894
|
return WriteCaseFlagFieldComponent;
|
|
12887
12895
|
}(AbstractFieldWriteComponent));
|
|
12888
12896
|
WriteCaseFlagFieldComponent.ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
12889
|
-
WriteCaseFlagFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["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-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], ["id", "create-flag-caption", 1, "govuk-caption-l", 3, "ngClass"], [4, "ngSwitchCase"], [3, "formGroup", "flagsData", "caseFlagStateEmitter"], [3, "formGroup", "jurisdiction", "caseTypeId", "caseFlagStateEmitter", "flagCommentsOptionalEmitter"], [3, "formGroup", "languages", "flagCode", "caseFlagStateEmitter"], [3, "formGroup", "optional", "caseFlagStateEmitter"], [3, "formGroup", "flagsData", "caseTitle", "caseFlagStateEmitter"], [3, "formGroup", "selectedFlag", "caseFlagStateEmitter"]], template: function WriteCaseFlagFieldComponent_Template(rf, ctx) {
|
|
12897
|
+
WriteCaseFlagFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseFlagFieldComponent, selectors: [["ccd-write-case-flag-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 3, vars: 3, consts: [["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "form-group", 3, "formGroup", 4, "ngIf"], ["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-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], ["id", "create-flag-caption", 1, "govuk-caption-l", 3, "ngClass"], [4, "ngSwitchCase"], [3, "formGroup", "flagsData", "caseFlagStateEmitter"], [3, "formGroup", "jurisdiction", "caseTypeId", "hmctsServiceId", "caseFlagStateEmitter", "flagCommentsOptionalEmitter"], [3, "formGroup", "languages", "flagCode", "caseFlagStateEmitter"], [3, "formGroup", "optional", "caseFlagStateEmitter"], [3, "formGroup", "flagsData", "caseTitle", "caseFlagStateEmitter"], [3, "formGroup", "selectedFlag", "caseFlagStateEmitter"]], template: function WriteCaseFlagFieldComponent_Template(rf, ctx) {
|
|
12890
12898
|
if (rf & 1) {
|
|
12891
12899
|
i0__namespace.ɵɵtemplate(0, WriteCaseFlagFieldComponent_div_0_Template, 4, 1, "div", 0);
|
|
12892
12900
|
i0__namespace.ɵɵtemplate(1, WriteCaseFlagFieldComponent_div_1_Template, 8, 10, "div", 1);
|
|
@@ -19277,19 +19285,30 @@
|
|
|
19277
19285
|
&& this.formGroup['caseField'].id === this.caseLevelCaseFlagsFieldId
|
|
19278
19286
|
? exports.RefdataCaseFlagType.CASE
|
|
19279
19287
|
: exports.RefdataCaseFlagType.PARTY;
|
|
19280
|
-
//
|
|
19281
|
-
|
|
19282
|
-
.
|
|
19283
|
-
|
|
19284
|
-
|
|
19285
|
-
|
|
19286
|
-
|
|
19287
|
-
|
|
19288
|
-
|
|
19289
|
-
|
|
19290
|
-
|
|
19291
|
-
|
|
19292
|
-
|
|
19288
|
+
// If hmctsServiceId is present, use this to retrieve the relevant list of flag types
|
|
19289
|
+
if (this.hmctsServiceId) {
|
|
19290
|
+
this.flagRefdata$ = this.caseFlagRefdataService.getCaseFlagsRefdata(this.hmctsServiceId, flagType)
|
|
19291
|
+
.subscribe({
|
|
19292
|
+
// First (and only) object in the returned array should be the top-level "Party" flag type
|
|
19293
|
+
next: function (flagTypes) { return _this.flagTypes = flagTypes[0].childFlags; },
|
|
19294
|
+
error: function (error) { return _this.onRefdataError(error); }
|
|
19295
|
+
});
|
|
19296
|
+
}
|
|
19297
|
+
else {
|
|
19298
|
+
// Else, HMCTS service code is required to retrieve the relevant list of flag types; attempt to obtain it by case type ID first
|
|
19299
|
+
this.flagRefdata$ = this.caseFlagRefdataService.getHmctsServiceDetailsByCaseType(this.caseTypeId)
|
|
19300
|
+
.pipe(
|
|
19301
|
+
// If an error occurs retrieving HMCTS service details by case type ID, try by service name instead
|
|
19302
|
+
operators.catchError(function (_) { return _this.caseFlagRefdataService.getHmctsServiceDetailsByServiceName(_this.jurisdiction); }),
|
|
19303
|
+
// Use switchMap to return an inner Observable of the flag types data, having received the service details
|
|
19304
|
+
// including service_code. This avoids having nested `subscribe`s, which is an anti-pattern!
|
|
19305
|
+
operators.switchMap(function (serviceDetails) { return _this.caseFlagRefdataService.getCaseFlagsRefdata(serviceDetails[0].service_code, flagType); }))
|
|
19306
|
+
.subscribe({
|
|
19307
|
+
// First (and only) object in the returned array should be the top-level "Party" flag type
|
|
19308
|
+
next: function (flagTypes) { return _this.flagTypes = flagTypes[0].childFlags; },
|
|
19309
|
+
error: function (error) { return _this.onRefdataError(error); }
|
|
19310
|
+
});
|
|
19311
|
+
}
|
|
19293
19312
|
};
|
|
19294
19313
|
SelectFlagTypeComponent.prototype.ngOnDestroy = function () {
|
|
19295
19314
|
if (this.flagRefdata$) {
|
|
@@ -19361,7 +19380,7 @@
|
|
|
19361
19380
|
return SelectFlagTypeComponent;
|
|
19362
19381
|
}());
|
|
19363
19382
|
SelectFlagTypeComponent.ɵfac = function SelectFlagTypeComponent_Factory(t) { return new (t || SelectFlagTypeComponent)(i0__namespace.ɵɵdirectiveInject(CaseFlagRefdataService)); };
|
|
19364
|
-
SelectFlagTypeComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, decls: 11, vars: 9, consts: [[1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName", "change"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagTypeComponent_Template(rf, ctx) {
|
|
19383
|
+
SelectFlagTypeComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: SelectFlagTypeComponent, selectors: [["ccd-select-flag-type"]], inputs: { formGroup: "formGroup", jurisdiction: "jurisdiction", caseTypeId: "caseTypeId", hmctsServiceId: "hmctsServiceId" }, outputs: { caseFlagStateEmitter: "caseFlagStateEmitter", flagCommentsOptionalEmitter: "flagCommentsOptionalEmitter" }, decls: 11, vars: 9, consts: [[1, "form-group", 3, "formGroup"], [1, "govuk-form-group", 3, "ngClass"], ["aria-describedby", "flag-type-heading", 1, "govuk-fieldset"], [1, "govuk-fieldset__legend", "govuk-fieldset__legend--l"], ["id", "flag-type-heading", 1, "govuk-fieldset__heading"], ["id", "flag-type-not-selected-error-message", "class", "govuk-error-message", 4, "ngIf"], ["data-module", "govuk-radios", "id", "conditional-radios-list", 1, "govuk-radios", "govuk-radios--conditional"], ["class", "govuk-radios__item", 4, "ngFor", "ngForOf"], ["class", "govuk-radios__conditional", "id", "conditional-flagType", 4, "ngIf"], ["class", "govuk-button-group", 4, "ngIf"], ["id", "flag-type-not-selected-error-message", 1, "govuk-error-message"], [1, "govuk-visually-hidden"], [1, "govuk-radios__item"], ["type", "radio", 1, "govuk-radios__input", 3, "id", "name", "value", "formControlName", "change"], [1, "govuk-label", "govuk-radios__label", 3, "for"], ["id", "conditional-flagType", 1, "govuk-radios__conditional"], ["for", "other-flag-type-description", 1, "govuk-label"], ["id", "flag-type-error-message", "class", "govuk-error-message", 4, "ngIf"], ["id", "other-flag-type-description", "type", "text", 1, "govuk-input", "govuk-!-width-one-half", 3, "ngClass", "name", "formControlName"], ["id", "flag-type-error-message", 1, "govuk-error-message"], [1, "govuk-button-group"], ["type", "button", 1, "button", "button-primary", 3, "click"]], template: function SelectFlagTypeComponent_Template(rf, ctx) {
|
|
19365
19384
|
if (rf & 1) {
|
|
19366
19385
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
19367
19386
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
@@ -19411,6 +19430,8 @@
|
|
|
19411
19430
|
type: i0.Input
|
|
19412
19431
|
}], caseTypeId: [{
|
|
19413
19432
|
type: i0.Input
|
|
19433
|
+
}], hmctsServiceId: [{
|
|
19434
|
+
type: i0.Input
|
|
19414
19435
|
}], caseFlagStateEmitter: [{
|
|
19415
19436
|
type: i0.Output
|
|
19416
19437
|
}], flagCommentsOptionalEmitter: [{
|
|
@@ -23089,8 +23110,8 @@
|
|
|
23089
23110
|
i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
|
|
23090
23111
|
i0__namespace.ɵɵsetComponentScope(
|
|
23091
23112
|
// ComponentLauncher web components
|
|
23092
|
-
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace
|
|
23093
|
-
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace
|
|
23113
|
+
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
|
|
23114
|
+
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
|
|
23094
23115
|
|
|
23095
23116
|
var Confirmation = /** @class */ (function () {
|
|
23096
23117
|
function Confirmation(caseId, status, header, body) {
|