@hmcts/ccd-case-ui-toolkit 4.18.10 → 4.18.11
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 +32 -18
- 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-viewer/case-full-access-view/case-full-access-view.component.d.ts +7 -4
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +31 -17
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js.map +1 -1
- package/dist/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.metadata.json +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.18.
|
|
3
|
+
* @version v4.18.11
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -23978,7 +23978,7 @@ var services_1 = __webpack_require__(65010);
|
|
|
23978
23978
|
var helpers_1 = __webpack_require__(23495);
|
|
23979
23979
|
var services_2 = __webpack_require__(25961);
|
|
23980
23980
|
var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
23981
|
-
function CaseFullAccessViewComponent(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location) {
|
|
23981
|
+
function CaseFullAccessViewComponent(ngZone, route, router, navigationNotifierService, orderService, activityPollingService, dialog, alertService, draftService, errorNotifierService, convertHrefToRouterService, location, crf) {
|
|
23982
23982
|
this.ngZone = ngZone;
|
|
23983
23983
|
this.route = route;
|
|
23984
23984
|
this.router = router;
|
|
@@ -23991,6 +23991,7 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
23991
23991
|
this.errorNotifierService = errorNotifierService;
|
|
23992
23992
|
this.convertHrefToRouterService = convertHrefToRouterService;
|
|
23993
23993
|
this.location = location;
|
|
23994
|
+
this.crf = crf;
|
|
23994
23995
|
this.hasPrint = true;
|
|
23995
23996
|
this.hasEventSelector = true;
|
|
23996
23997
|
this.prependedTabs = [];
|
|
@@ -24003,6 +24004,13 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24003
24004
|
this.callbackErrorsSubject = new Subject_1.Subject();
|
|
24004
24005
|
}
|
|
24005
24006
|
CaseFullAccessViewComponent_1 = CaseFullAccessViewComponent;
|
|
24007
|
+
CaseFullAccessViewComponent.prototype.ngOnChanges = function (changes) {
|
|
24008
|
+
if (!changes.prependedTabs.firstChange) {
|
|
24009
|
+
this.init();
|
|
24010
|
+
this.crf.detectChanges();
|
|
24011
|
+
this.organiseTabPosition();
|
|
24012
|
+
}
|
|
24013
|
+
};
|
|
24006
24014
|
CaseFullAccessViewComponent.prototype.ngOnInit = function () {
|
|
24007
24015
|
var _this = this;
|
|
24008
24016
|
helpers_1.initDialog(this.dialogConfig);
|
|
@@ -24028,20 +24036,19 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24028
24036
|
return this.caseDetails.case_type.printEnabled;
|
|
24029
24037
|
};
|
|
24030
24038
|
CaseFullAccessViewComponent.prototype.ngOnDestroy = function () {
|
|
24031
|
-
if (this.
|
|
24032
|
-
this.
|
|
24033
|
-
}
|
|
24034
|
-
if (this.callbackErrorsSubject) {
|
|
24035
|
-
this.callbackErrorsSubject.unsubscribe();
|
|
24036
|
-
}
|
|
24037
|
-
if (!this.route.snapshot.data.case && this.caseSubscription) {
|
|
24038
|
-
this.caseSubscription.unsubscribe();
|
|
24039
|
+
if (this.activityPollingService.isEnabled) {
|
|
24040
|
+
this.unsubscribe(this.activitySubscription);
|
|
24039
24041
|
}
|
|
24040
|
-
if (this.
|
|
24041
|
-
this.
|
|
24042
|
+
if (!this.route.snapshot.data.case) {
|
|
24043
|
+
this.unsubscribe(this.caseSubscription);
|
|
24042
24044
|
}
|
|
24043
|
-
|
|
24044
|
-
|
|
24045
|
+
this.unsubscribe(this.callbackErrorsSubject);
|
|
24046
|
+
this.unsubscribe(this.errorSubscription);
|
|
24047
|
+
this.unsubscribe(this.subscription);
|
|
24048
|
+
};
|
|
24049
|
+
CaseFullAccessViewComponent.prototype.unsubscribe = function (subscription) {
|
|
24050
|
+
if (subscription) {
|
|
24051
|
+
subscription.unsubscribe();
|
|
24045
24052
|
}
|
|
24046
24053
|
};
|
|
24047
24054
|
CaseFullAccessViewComponent.prototype.postViewActivity = function () {
|
|
@@ -24112,16 +24119,19 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24112
24119
|
&& this.error.details.field_errors
|
|
24113
24120
|
&& this.error.details.field_errors.length);
|
|
24114
24121
|
};
|
|
24115
|
-
CaseFullAccessViewComponent.prototype.
|
|
24122
|
+
CaseFullAccessViewComponent.prototype.organiseTabPosition = function () {
|
|
24116
24123
|
var _this = this;
|
|
24117
24124
|
var matTab;
|
|
24118
24125
|
var url = this.location.path(true);
|
|
24119
24126
|
var hashValue = url.substring(url.indexOf('#') + 1);
|
|
24120
|
-
if (!url.includes('#')) {
|
|
24127
|
+
if (!url.includes('#') && !url.includes('roles-and-access') && !url.includes('tasks')) {
|
|
24121
24128
|
var paths = url.split('/');
|
|
24122
24129
|
// lastPath can be /caseId, or the tabs /tasks, /hearings etc.
|
|
24123
24130
|
var lastPath_1 = decodeURIComponent(paths[paths.length - 1]);
|
|
24124
24131
|
var foundTab_1 = null;
|
|
24132
|
+
if (!this.prependedTabs) {
|
|
24133
|
+
this.prependedTabs = [];
|
|
24134
|
+
}
|
|
24125
24135
|
var additionalTabs = this.prependedTabs.concat(this.appendedTabs);
|
|
24126
24136
|
if (additionalTabs && additionalTabs.length) {
|
|
24127
24137
|
foundTab_1 = additionalTabs.find(function (caseTab) { return caseTab.id.toLowerCase() === lastPath_1.toLowerCase(); });
|
|
@@ -24139,7 +24149,7 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24139
24149
|
this.caseDetails.tabs.sort(function (aTab, bTab) { return aTab.order > bTab.order ? 1 : (bTab.order > aTab.order ? -1 : 0); });
|
|
24140
24150
|
// preselect the 1st order of CCD predefined tabs
|
|
24141
24151
|
var preSelectTab_1 = this.caseDetails.tabs[0];
|
|
24142
|
-
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id]).then(function () {
|
|
24152
|
+
this.router.navigate(['cases', 'case-details', this.caseDetails.case_id], { fragment: preSelectTab_1.label }).then(function () {
|
|
24143
24153
|
matTab = _this.tabGroup._tabs.find(function (x) { return x.textLabel === preSelectTab_1.label; });
|
|
24144
24154
|
_this.tabGroup.selectedIndex = matTab.position;
|
|
24145
24155
|
});
|
|
@@ -24148,6 +24158,9 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24148
24158
|
else {
|
|
24149
24159
|
var regExp = new RegExp(CaseFullAccessViewComponent_1.UNICODE_SPACE, 'g');
|
|
24150
24160
|
hashValue = hashValue.replace(regExp, CaseFullAccessViewComponent_1.EMPTY_SPACE);
|
|
24161
|
+
if (hashValue.includes('roles-and-access') || hashValue.includes('tasks')) {
|
|
24162
|
+
hashValue = hashValue.includes('roles-and-access') ? 'roles and access' : 'tasks';
|
|
24163
|
+
}
|
|
24151
24164
|
matTab = this.tabGroup._tabs.find(function (x) {
|
|
24152
24165
|
return x.textLabel.replace(CaseFullAccessViewComponent_1.EMPTY_SPACE, '').toLowerCase() ===
|
|
24153
24166
|
hashValue.replace(CaseFullAccessViewComponent_1.EMPTY_SPACE, '').toLowerCase();
|
|
@@ -24270,7 +24283,8 @@ var CaseFullAccessViewComponent = /** @class */ (function () {
|
|
|
24270
24283
|
services_1.DraftService,
|
|
24271
24284
|
services_1.ErrorNotifierService,
|
|
24272
24285
|
services_2.ConvertHrefToRouterService,
|
|
24273
|
-
common_1.Location
|
|
24286
|
+
common_1.Location,
|
|
24287
|
+
core_1.ChangeDetectorRef])
|
|
24274
24288
|
], CaseFullAccessViewComponent);
|
|
24275
24289
|
return CaseFullAccessViewComponent;
|
|
24276
24290
|
}());
|