@hmcts/ccd-case-ui-toolkit 4.7.0-EUI-4452-wrong-document-collection-1 → 4.7.0-eui-4789-bugfix
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/dist/index.umd.js +28 -39
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.LICENSE.txt +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +1 -1
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.js +4 -12
- package/dist/shared/components/case-editor/case-edit-page/case-edit-page.component.js.map +1 -1
- package/dist/shared/components/case-editor/domain/wizard.model.d.ts +1 -1
- package/dist/shared/components/case-editor/domain/wizard.model.js +2 -2
- package/dist/shared/components/case-editor/domain/wizard.model.js.map +1 -1
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +9 -5
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js.map +1 -1
- package/dist/shared/components/workbasket-filters/workbasket-filters.component.js +12 -10
- package/dist/shared/components/workbasket-filters/workbasket-filters.component.js.map +1 -1
- package/dist/shared/directives/conditional-show/services/conditional-show-registrar.service.js +0 -2
- package/dist/shared/directives/conditional-show/services/conditional-show-registrar.service.js.map +1 -1
- package/dist/shared/services/form/form-value.service.js +0 -7
- package/dist/shared/services/form/form-value.service.js.map +1 -1
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @hmcts/ccd-case-ui-toolkit - Case UI Toolkit
|
|
3
|
-
* @version v4.7.0-
|
|
3
|
+
* @version v4.7.0-eui-4789-bugfix
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -12889,15 +12889,15 @@ var CaseEditPageComponent = /** @class */ (function () {
|
|
|
12889
12889
|
CaseEditPageComponent.prototype.updateFormData = function (jsonData) {
|
|
12890
12890
|
for (var _i = 0, _a = Object.keys(jsonData.data); _i < _a.length; _i++) {
|
|
12891
12891
|
var caseFieldId = _a[_i];
|
|
12892
|
-
if (this.pageWithFieldExists(caseFieldId
|
|
12892
|
+
if (this.pageWithFieldExists(caseFieldId)) {
|
|
12893
12893
|
this.updateEventTriggerCaseFields(caseFieldId, jsonData, this.caseEdit.eventTrigger);
|
|
12894
12894
|
this.updateFormControlsValue(this.editForm, caseFieldId, jsonData.data[caseFieldId]);
|
|
12895
12895
|
}
|
|
12896
12896
|
}
|
|
12897
12897
|
};
|
|
12898
12898
|
// we do the check, becasue the data comes from the external source
|
|
12899
|
-
CaseEditPageComponent.prototype.pageWithFieldExists = function (caseFieldId
|
|
12900
|
-
return this.wizard.findWizardPage(caseFieldId
|
|
12899
|
+
CaseEditPageComponent.prototype.pageWithFieldExists = function (caseFieldId) {
|
|
12900
|
+
return this.wizard.findWizardPage(caseFieldId);
|
|
12901
12901
|
};
|
|
12902
12902
|
CaseEditPageComponent.prototype.updateEventTriggerCaseFields = function (caseFieldId, jsonData, eventTrigger) {
|
|
12903
12903
|
if (eventTrigger.case_fields) {
|
|
@@ -12909,15 +12909,7 @@ var CaseEditPageComponent = /** @class */ (function () {
|
|
|
12909
12909
|
CaseEditPageComponent.prototype.updateFormControlsValue = function (formGroup, caseFieldId, value) {
|
|
12910
12910
|
var theControl = formGroup.controls['data'].get(caseFieldId);
|
|
12911
12911
|
if (theControl) {
|
|
12912
|
-
|
|
12913
|
-
&& theControl.value.length > value.length && theControl['caseField']
|
|
12914
|
-
&& theControl['caseField']['display_context'] && theControl['caseField']['display_context'] === 'OPTIONAL'
|
|
12915
|
-
&& theControl['caseField']['field_type'] && theControl['caseField']['field_type']['type'] === 'Collection') {
|
|
12916
|
-
// do nothing
|
|
12917
|
-
}
|
|
12918
|
-
else {
|
|
12919
|
-
theControl.patchValue(value);
|
|
12920
|
-
}
|
|
12912
|
+
theControl.patchValue(value);
|
|
12921
12913
|
}
|
|
12922
12914
|
};
|
|
12923
12915
|
CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
@@ -14054,8 +14046,8 @@ var Wizard = /** @class */ (function () {
|
|
|
14054
14046
|
}
|
|
14055
14047
|
return canShow(foundPage) ? foundPage : undefined;
|
|
14056
14048
|
};
|
|
14057
|
-
Wizard.prototype.findWizardPage = function (caseFieldId
|
|
14058
|
-
return this.pages.find(function (wizardPage) { return wizardPage.
|
|
14049
|
+
Wizard.prototype.findWizardPage = function (caseFieldId) {
|
|
14050
|
+
return this.pages.find(function (wizardPage) { return wizardPage.case_fields &&
|
|
14059
14051
|
wizardPage.case_fields.filter(function (caseField) { return caseField.id === caseFieldId; }).length > 0; });
|
|
14060
14052
|
};
|
|
14061
14053
|
Wizard.prototype.nextPage = function (pageId, canShow) {
|
|
@@ -16572,11 +16564,13 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
16572
16564
|
return this.caseDetails.case_type.printEnabled;
|
|
16573
16565
|
};
|
|
16574
16566
|
CaseFullAccessViewComponent.prototype.ngOnDestroy = function () {
|
|
16575
|
-
if (this.activityPollingService.isEnabled) {
|
|
16567
|
+
if (this.activitySubscription && this.activityPollingService.isEnabled) {
|
|
16576
16568
|
this.activitySubscription.unsubscribe();
|
|
16577
16569
|
}
|
|
16578
|
-
this.callbackErrorsSubject
|
|
16579
|
-
|
|
16570
|
+
if (this.callbackErrorsSubject) {
|
|
16571
|
+
this.callbackErrorsSubject.unsubscribe();
|
|
16572
|
+
}
|
|
16573
|
+
if (!this.route.snapshot.data.case && this.caseSubscription) {
|
|
16580
16574
|
this.caseSubscription.unsubscribe();
|
|
16581
16575
|
}
|
|
16582
16576
|
if (this.errorSubscription) {
|
|
@@ -16671,7 +16665,8 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
16671
16665
|
var regExp = new RegExp(CaseFullAccessViewComponent_1.UNICODE_SPACE, 'g');
|
|
16672
16666
|
hashValue = hashValue.replace(regExp, CaseFullAccessViewComponent_1.EMPTY_SPACE);
|
|
16673
16667
|
matTab = this.tabGroup._tabs.find(function (x) {
|
|
16674
|
-
return x.textLabel.replace(CaseFullAccessViewComponent_1.EMPTY_SPACE, '').toLowerCase() ===
|
|
16668
|
+
return x.textLabel.replace(CaseFullAccessViewComponent_1.EMPTY_SPACE, '').toLowerCase() ===
|
|
16669
|
+
hashValue.replace(CaseFullAccessViewComponent_1.EMPTY_SPACE, '').toLowerCase();
|
|
16675
16670
|
});
|
|
16676
16671
|
if (matTab && matTab.position) {
|
|
16677
16672
|
this.tabGroup.selectedIndex = matTab.position;
|
|
@@ -16685,8 +16680,9 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
16685
16680
|
this.router.navigate([id], { relativeTo: this.route });
|
|
16686
16681
|
}
|
|
16687
16682
|
else {
|
|
16683
|
+
var label_1 = tabChangeEvent.tab.textLabel;
|
|
16688
16684
|
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
|
|
16689
|
-
window.location.hash =
|
|
16685
|
+
window.location.hash = label_1;
|
|
16690
16686
|
});
|
|
16691
16687
|
}
|
|
16692
16688
|
};
|
|
@@ -28361,16 +28357,18 @@ var WorkbasketFiltersComponent = /** @class */ (function () {
|
|
|
28361
28357
|
var formGroupLS = JSON.parse(this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE));
|
|
28362
28358
|
// Form group local storage is available and contains regionList property
|
|
28363
28359
|
if (util_1.isDefined(formGroupLS) && formGroupLS.hasOwnProperty(REGION_LIST_AND_FRC_FILTER)) {
|
|
28364
|
-
|
|
28365
|
-
|
|
28366
|
-
|
|
28367
|
-
|
|
28368
|
-
|
|
28369
|
-
|
|
28370
|
-
|
|
28371
|
-
|
|
28372
|
-
|
|
28373
|
-
|
|
28360
|
+
if (this.formGroup.get(REGION_LIST_AND_FRC_FILTER)) {
|
|
28361
|
+
// If regionList value does not match between local storage and form group
|
|
28362
|
+
// then the filter value has been changed and we need to clear the old filter values
|
|
28363
|
+
if (formGroupLS[REGION_LIST_AND_FRC_FILTER] !== this.formGroup.get(REGION_LIST_AND_FRC_FILTER).value) {
|
|
28364
|
+
for (var key in formGroupLS) {
|
|
28365
|
+
if (formGroupLS.hasOwnProperty(key)) {
|
|
28366
|
+
var value = formGroupLS[key];
|
|
28367
|
+
// Clear the filter form group control values if it has a value in local storage
|
|
28368
|
+
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28369
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value != null) {
|
|
28370
|
+
this.formGroup.get(key).setValue(null);
|
|
28371
|
+
}
|
|
28374
28372
|
}
|
|
28375
28373
|
}
|
|
28376
28374
|
}
|
|
@@ -29270,12 +29268,10 @@ var ConditionalShowRegistrarService = /** @class */ (function () {
|
|
|
29270
29268
|
this.registeredDirectives = [];
|
|
29271
29269
|
}
|
|
29272
29270
|
ConditionalShowRegistrarService.prototype.register = function (newDirective) {
|
|
29273
|
-
// console.log('[', this.registeredDirectives.length, ']adding new directive', newDirective.caseField.id);
|
|
29274
29271
|
this.registeredDirectives.push(newDirective);
|
|
29275
29272
|
};
|
|
29276
29273
|
ConditionalShowRegistrarService.prototype.refresh = function () {
|
|
29277
29274
|
this.registeredDirectives.forEach(function (dir) {
|
|
29278
|
-
// console.log('refreshing ', dir.caseField.id);
|
|
29279
29275
|
dir.refreshVisibility();
|
|
29280
29276
|
});
|
|
29281
29277
|
};
|
|
@@ -34525,13 +34521,6 @@ var FormValueService = /** @class */ (function () {
|
|
|
34525
34521
|
}
|
|
34526
34522
|
else {
|
|
34527
34523
|
sanitisedObject[key] = this.sanitiseValue(rawObject[key]);
|
|
34528
|
-
if (Array.isArray(sanitisedObject[key])) {
|
|
34529
|
-
// If the 'sanitised' array is empty, whereas the original array had 1 or more items
|
|
34530
|
-
// delete the property from the sanatised object
|
|
34531
|
-
if (sanitisedObject[key].length === 0 && rawObject[key].length > 0) {
|
|
34532
|
-
delete sanitisedObject[key];
|
|
34533
|
-
}
|
|
34534
|
-
}
|
|
34535
34524
|
}
|
|
34536
34525
|
}
|
|
34537
34526
|
return sanitisedObject;
|