@hmcts/ccd-case-ui-toolkit 4.14.0-rc.4 → 4.14.0-rc.5
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 +12 -24
- 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-submit/case-edit-submit.component.js +0 -1
- package/dist/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js.map +1 -1
- package/dist/shared/components/case-viewer/services/case.resolver.d.ts +2 -3
- package/dist/shared/components/case-viewer/services/case.resolver.js +11 -22
- package/dist/shared/components/case-viewer/services/case.resolver.js.map +1 -1
- package/dist/shared/components/case-viewer/services/case.resolver.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.14.0-rc.
|
|
3
|
+
* @version v4.14.0-rc.5
|
|
4
4
|
* @link undefined
|
|
5
5
|
* @license MIT
|
|
6
6
|
*/
|
|
@@ -19891,7 +19891,6 @@ var CaseEditSubmitComponent = /** @class */ (function () {
|
|
|
19891
19891
|
*/
|
|
19892
19892
|
CaseEditSubmitComponent.prototype.submit = function () {
|
|
19893
19893
|
this.isSubmitting = true;
|
|
19894
|
-
this.sessionStorageService.removeItem('caseDetails');
|
|
19895
19894
|
// We have to run the event completion checks if task in session storage
|
|
19896
19895
|
// and if the task is in session storage, then is it associated to the case
|
|
19897
19896
|
var taskInSessionStorage;
|
|
@@ -25176,14 +25175,13 @@ var services_1 = __webpack_require__(65010);
|
|
|
25176
25175
|
var class_transformer_1 = __webpack_require__(86631);
|
|
25177
25176
|
var navigation_notifier_service_1 = __webpack_require__(75005);
|
|
25178
25177
|
var CaseResolver = /** @class */ (function () {
|
|
25179
|
-
function CaseResolver(caseNotifier, casesService, draftService, navigationNotifierService, router
|
|
25178
|
+
function CaseResolver(caseNotifier, casesService, draftService, navigationNotifierService, router) {
|
|
25180
25179
|
var _this = this;
|
|
25181
25180
|
this.caseNotifier = caseNotifier;
|
|
25182
25181
|
this.casesService = casesService;
|
|
25183
25182
|
this.draftService = draftService;
|
|
25184
25183
|
this.navigationNotifierService = navigationNotifierService;
|
|
25185
25184
|
this.router = router;
|
|
25186
|
-
this.sessionStorageService = sessionStorageService;
|
|
25187
25185
|
router.events
|
|
25188
25186
|
.filter(function (event) { return event instanceof router_1.NavigationEnd; })
|
|
25189
25187
|
.subscribe(function (event) {
|
|
@@ -25217,25 +25215,17 @@ var CaseResolver = /** @class */ (function () {
|
|
|
25217
25215
|
};
|
|
25218
25216
|
CaseResolver.prototype.getAndCacheCaseView = function (cid) {
|
|
25219
25217
|
var _this = this;
|
|
25220
|
-
|
|
25221
|
-
|
|
25222
|
-
this.caseNotifier.announceCase(caseDetails);
|
|
25223
|
-
return rxjs_1.of(caseDetails).toPromise();
|
|
25218
|
+
if (domain_1.Draft.isDraft(cid)) {
|
|
25219
|
+
return this.getAndCacheDraft(cid);
|
|
25224
25220
|
}
|
|
25225
25221
|
else {
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
|
|
25229
|
-
|
|
25230
|
-
|
|
25231
|
-
|
|
25232
|
-
|
|
25233
|
-
_this.sessionStorageService.setItem('caseDetails', JSON.stringify(caseView));
|
|
25234
|
-
_this.cachedCaseView = class_transformer_1.plainToClassFromExist(new domain_1.CaseView(), caseView);
|
|
25235
|
-
_this.caseNotifier.announceCase(_this.cachedCaseView);
|
|
25236
|
-
return _this.cachedCaseView;
|
|
25237
|
-
}), operators_1.catchError(function (error) { return _this.checkAuthorizationError(error); })).toPromise();
|
|
25238
|
-
}
|
|
25222
|
+
return this.casesService
|
|
25223
|
+
.getCaseViewV2(cid)
|
|
25224
|
+
.pipe(operators_1.map(function (caseView) {
|
|
25225
|
+
_this.cachedCaseView = class_transformer_1.plainToClassFromExist(new domain_1.CaseView(), caseView);
|
|
25226
|
+
_this.caseNotifier.announceCase(_this.cachedCaseView);
|
|
25227
|
+
return _this.cachedCaseView;
|
|
25228
|
+
}), operators_1.catchError(function (error) { return _this.checkAuthorizationError(error); })).toPromise();
|
|
25239
25229
|
}
|
|
25240
25230
|
};
|
|
25241
25231
|
CaseResolver.prototype.getAndCacheDraft = function (cid) {
|
|
@@ -25243,7 +25233,6 @@ var CaseResolver = /** @class */ (function () {
|
|
|
25243
25233
|
return this.draftService
|
|
25244
25234
|
.getDraft(cid)
|
|
25245
25235
|
.pipe(operators_1.map(function (caseView) {
|
|
25246
|
-
_this.sessionStorageService.setItem('caseDetails', JSON.stringify(caseView));
|
|
25247
25236
|
_this.cachedCaseView = class_transformer_1.plainToClassFromExist(new domain_1.CaseView(), caseView);
|
|
25248
25237
|
_this.caseNotifier.announceCase(_this.cachedCaseView);
|
|
25249
25238
|
return _this.cachedCaseView;
|
|
@@ -25271,8 +25260,7 @@ var CaseResolver = /** @class */ (function () {
|
|
|
25271
25260
|
case_editor_1.CasesService,
|
|
25272
25261
|
services_1.DraftService,
|
|
25273
25262
|
navigation_notifier_service_1.NavigationNotifierService,
|
|
25274
|
-
router_1.Router
|
|
25275
|
-
services_1.SessionStorageService])
|
|
25263
|
+
router_1.Router])
|
|
25276
25264
|
], CaseResolver);
|
|
25277
25265
|
return CaseResolver;
|
|
25278
25266
|
}());
|