@hmcts/ccd-case-ui-toolkit 5.0.40-case-edit-module-for-integration → 5.0.42-case-flags-integration-fixes
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 +38 -5
- 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/commons/case-edit-data/case-edit-data.service.js +7 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +10 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/write-case-flag-field.component.js +15 -5
- package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +2 -1
- package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +10 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +38 -5
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +4 -0
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.d.ts +1 -1
- package/lib/shared/components/palette/case-flag/components/manage-case-flags/manage-case-flags.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts +3 -1
- package/lib/shared/components/palette/case-flag/write-case-flag-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +1 -0
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3036,6 +3036,14 @@
|
|
|
3036
3036
|
if (!field || !field.field_type || !field.field_type.type) {
|
|
3037
3037
|
return false;
|
|
3038
3038
|
}
|
|
3039
|
+
// Case link tab spacing alignment fix
|
|
3040
|
+
// This Pipe needs to be re-visited
|
|
3041
|
+
// to make it more generic to support and fix alignments issues for multiple tabs
|
|
3042
|
+
if (field.field_type.collection_field_type &&
|
|
3043
|
+
field.field_type.collection_field_type.id &&
|
|
3044
|
+
field.field_type.collection_field_type.id === IsCompoundPipe.CASE_LINK_FIELD_TYPE) {
|
|
3045
|
+
return true;
|
|
3046
|
+
}
|
|
3039
3047
|
if (IsCompoundPipe.COMPOUND_TYPES.indexOf(field.field_type.type) !== -1) {
|
|
3040
3048
|
if (IsCompoundPipe.EXCLUDE.indexOf(field.field_type.id) !== -1) {
|
|
3041
3049
|
return false;
|
|
@@ -3046,6 +3054,7 @@
|
|
|
3046
3054
|
};
|
|
3047
3055
|
return IsCompoundPipe;
|
|
3048
3056
|
}());
|
|
3057
|
+
IsCompoundPipe.CASE_LINK_FIELD_TYPE = 'CaseLink';
|
|
3049
3058
|
IsCompoundPipe.COMPOUND_TYPES = [
|
|
3050
3059
|
'Complex',
|
|
3051
3060
|
'Label',
|
|
@@ -9839,9 +9848,12 @@
|
|
|
9839
9848
|
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
9840
9849
|
this.linkError$ = new rxjs.BehaviorSubject(null);
|
|
9841
9850
|
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
9851
|
+
this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
|
|
9852
|
+
this.caseTitle$ = this.title$.asObservable();
|
|
9842
9853
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
9843
9854
|
this.caseLinkError$ = this.linkError$.asObservable();
|
|
9844
9855
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
9856
|
+
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
9845
9857
|
}
|
|
9846
9858
|
CaseEditDataService.prototype.setCaseTitle = function (caseTitle) {
|
|
9847
9859
|
this.title$.next(caseTitle);
|
|
@@ -9864,6 +9876,9 @@
|
|
|
9864
9876
|
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
9865
9877
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
9866
9878
|
};
|
|
9879
|
+
CaseEditDataService.prototype.setTriggerSubmitEvent = function (state) {
|
|
9880
|
+
this.triggerSubmitEvent$.next(state);
|
|
9881
|
+
};
|
|
9867
9882
|
return CaseEditDataService;
|
|
9868
9883
|
}());
|
|
9869
9884
|
|
|
@@ -10210,6 +10225,14 @@
|
|
|
10210
10225
|
}
|
|
10211
10226
|
});
|
|
10212
10227
|
CaseEditPageComponent.setFocusToTop();
|
|
10228
|
+
this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
10229
|
+
next: function (state) {
|
|
10230
|
+
if (state) {
|
|
10231
|
+
_this.caseEditDataService.setTriggerSubmitEvent(false);
|
|
10232
|
+
_this.submit();
|
|
10233
|
+
}
|
|
10234
|
+
}
|
|
10235
|
+
});
|
|
10213
10236
|
};
|
|
10214
10237
|
CaseEditPageComponent.prototype.ngAfterViewChecked = function () {
|
|
10215
10238
|
this.cdRef.detectChanges();
|
|
@@ -10559,6 +10582,7 @@
|
|
|
10559
10582
|
var _this = this;
|
|
10560
10583
|
this.caseEditDataService.setCaseEventTriggerName(this.eventTrigger.name);
|
|
10561
10584
|
this.caseEditDataService.setCaseLinkError(this.caseLinkError);
|
|
10585
|
+
this.caseEditDataService.setCaseTitle(this.getCaseTitle());
|
|
10562
10586
|
this.caseEditDataService.caseFormValidationErrors$.subscribe({
|
|
10563
10587
|
next: function (validationErrors) { return _this.validationErrors = validationErrors; }
|
|
10564
10588
|
});
|
|
@@ -12623,9 +12647,10 @@
|
|
|
12623
12647
|
}
|
|
12624
12648
|
var WriteCaseFlagFieldComponent = /** @class */ (function (_super) {
|
|
12625
12649
|
__extends(WriteCaseFlagFieldComponent, _super);
|
|
12626
|
-
function WriteCaseFlagFieldComponent(route) {
|
|
12650
|
+
function WriteCaseFlagFieldComponent(route, caseEditDataService) {
|
|
12627
12651
|
var _this = _super.call(this) || this;
|
|
12628
12652
|
_this.route = route;
|
|
12653
|
+
_this.caseEditDataService = caseEditDataService;
|
|
12629
12654
|
_this.caseFlagFieldState = exports.CaseFlagFieldState;
|
|
12630
12655
|
_this.errorMessages = [];
|
|
12631
12656
|
_this.caseFlagParentFormGroup = new i2.FormGroup({});
|
|
@@ -12640,6 +12665,7 @@
|
|
|
12640
12665
|
}
|
|
12641
12666
|
WriteCaseFlagFieldComponent.prototype.ngOnInit = function () {
|
|
12642
12667
|
var _this = this;
|
|
12668
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
12643
12669
|
// Check for existing FlagLauncher control in parent and remove it - this is the only way to ensure its invalidity
|
|
12644
12670
|
// is set correctly at the start, when the component is reloaded and the control is re-registered. Otherwise, the
|
|
12645
12671
|
// validator state gets carried over
|
|
@@ -12675,7 +12701,11 @@
|
|
|
12675
12701
|
// Set starting field state
|
|
12676
12702
|
this.fieldState = this.isDisplayContextParameterUpdate ? exports.CaseFlagFieldState.FLAG_MANAGE_CASE_FLAGS : exports.CaseFlagFieldState.FLAG_LOCATION;
|
|
12677
12703
|
// Get case title, to be used by child components
|
|
12678
|
-
this.caseTitle
|
|
12704
|
+
this.caseEditDataService.caseTitle$.subscribe({
|
|
12705
|
+
next: function (title) {
|
|
12706
|
+
_this.caseTitle = title.length > 0 ? title : _this.caseNameMissing;
|
|
12707
|
+
}
|
|
12708
|
+
});
|
|
12679
12709
|
}
|
|
12680
12710
|
};
|
|
12681
12711
|
WriteCaseFlagFieldComponent.prototype.setDisplayContextParameterUpdate = function (caseFields) {
|
|
@@ -12683,6 +12713,7 @@
|
|
|
12683
12713
|
return caseFields.some(function (caseField) { return FieldsUtils.isFlagLauncherCaseField(caseField) && caseField.display_context_parameter === _this.updateMode; });
|
|
12684
12714
|
};
|
|
12685
12715
|
WriteCaseFlagFieldComponent.prototype.onCaseFlagStateEmitted = function (caseFlagState) {
|
|
12716
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
12686
12717
|
// If the current state is CaseFlagFieldState.FLAG_LOCATION and a flag location (a Flags instance) has been selected,
|
|
12687
12718
|
// set the parent Case Flag FormGroup for this component's children by using the provided pathToFlagsFormGroup, and
|
|
12688
12719
|
// set the selected flag location on this component
|
|
@@ -12905,10 +12936,11 @@
|
|
|
12905
12936
|
// Clear the "notAllCaseFlagStagesCompleted" error
|
|
12906
12937
|
this.allCaseFlagStagesCompleted = true;
|
|
12907
12938
|
this.formGroup.updateValueAndValidity();
|
|
12939
|
+
this.caseEditDataService.setTriggerSubmitEvent(true);
|
|
12908
12940
|
};
|
|
12909
12941
|
return WriteCaseFlagFieldComponent;
|
|
12910
12942
|
}(AbstractFieldWriteComponent));
|
|
12911
|
-
WriteCaseFlagFieldComponent.ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute)); };
|
|
12943
|
+
WriteCaseFlagFieldComponent.ɵfac = function WriteCaseFlagFieldComponent_Factory(t) { return new (t || WriteCaseFlagFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
12912
12944
|
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", "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) {
|
|
12913
12945
|
if (rf & 1) {
|
|
12914
12946
|
i0__namespace.ɵɵtemplate(0, WriteCaseFlagFieldComponent_div_0_Template, 4, 1, "div", 0);
|
|
@@ -12931,7 +12963,7 @@
|
|
|
12931
12963
|
templateUrl: './write-case-flag-field.component.html',
|
|
12932
12964
|
styleUrls: ['./write-case-flag-field.component.scss']
|
|
12933
12965
|
}]
|
|
12934
|
-
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }]; }, null);
|
|
12966
|
+
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: CaseEditDataService }]; }, null);
|
|
12935
12967
|
})();
|
|
12936
12968
|
|
|
12937
12969
|
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) {
|
|
@@ -21342,10 +21374,10 @@
|
|
|
21342
21374
|
this.ISO_FORMAT = 'YYYY-MM-DDTHH:mm:ss.SSS';
|
|
21343
21375
|
}
|
|
21344
21376
|
LinkCasesComponent.prototype.ngOnInit = function () {
|
|
21345
|
-
this.initForm();
|
|
21346
21377
|
this.caseId = this.linkedCasesService.caseId;
|
|
21347
21378
|
this.caseName = this.linkedCasesService.caseName;
|
|
21348
21379
|
this.linkCaseReasons = this.linkedCasesService.linkCaseReasons;
|
|
21380
|
+
this.initForm();
|
|
21349
21381
|
if (this.linkedCasesService.editMode) {
|
|
21350
21382
|
// this may have includes the currently added one but yet to be submitted.
|
|
21351
21383
|
this.selectedCases = this.linkedCasesService.linkedCases;
|
|
@@ -22594,6 +22626,7 @@
|
|
|
22594
22626
|
}
|
|
22595
22627
|
WriteLinkedCasesComponent.prototype.ngOnInit = function () {
|
|
22596
22628
|
var _this = this;
|
|
22629
|
+
this.caseEditDataService.clearFormValidationErrors();
|
|
22597
22630
|
this.linkedCasesService.caseId = this.caseEdit.caseDetails.case_id;
|
|
22598
22631
|
this.linkedCasesService.caseName = this.linkedCasesService.getCaseName(this.caseEdit.caseDetails);
|
|
22599
22632
|
this.linkedCasesService.caseDetails = this.caseEdit.caseDetails;
|