@hmcts/ccd-case-ui-toolkit 6.16.0-query-management-write-view-v11 → 6.16.0-query-management-raise-query-trigger

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.
Files changed (24) hide show
  1. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js +74 -54
  2. package/bundles/hmcts-ccd-case-ui-toolkit.umd.js.map +1 -1
  3. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js +1 -1
  4. package/bundles/hmcts-ccd-case-ui-toolkit.umd.min.js.map +1 -1
  5. package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +48 -41
  6. package/esm2015/lib/shared/components/palette/palette.module.js +1 -1
  7. package/esm2015/lib/shared/components/palette/query-management/components/query-details/query-details.component.js +1 -1
  8. package/esm2015/lib/shared/components/palette/query-management/components/query-details-table/query-details-table.component.js +1 -1
  9. package/esm2015/lib/shared/components/palette/query-management/read-query-management-field.component.js +2 -2
  10. package/esm2015/lib/shared/components/palette/query-management/write-query-management-field.component.js +2 -2
  11. package/esm2015/lib/shared/domain/case-view/case-view-event-ids.enum.js +6 -0
  12. package/esm2015/lib/shared/domain/case-view/case-view-trigger.model.js +1 -2
  13. package/fesm2015/hmcts-ccd-case-ui-toolkit.js +61 -51
  14. package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
  15. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts +1 -1
  16. package/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.d.ts.map +1 -1
  17. package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
  18. package/lib/shared/components/palette/query-management/read-query-management-field.component.d.ts.map +1 -1
  19. package/lib/shared/components/palette/query-management/write-query-management-field.component.d.ts.map +1 -1
  20. package/lib/shared/domain/case-view/case-view-event-ids.enum.d.ts +5 -0
  21. package/lib/shared/domain/case-view/case-view-event-ids.enum.d.ts.map +1 -0
  22. package/lib/shared/domain/case-view/case-view-trigger.model.d.ts +0 -1
  23. package/lib/shared/domain/case-view/case-view-trigger.model.d.ts.map +1 -1
  24. package/package.json +1 -1
@@ -3707,7 +3707,6 @@
3707
3707
  }
3708
3708
  return CaseViewTrigger;
3709
3709
  }());
3710
- CaseViewTrigger.DELETE = 'DELETE';
3711
3710
 
3712
3711
  var CaseEvent = /** @class */ (function () {
3713
3712
  function CaseEvent() {
@@ -21139,21 +21138,6 @@
21139
21138
  }] });
21140
21139
  })();
21141
21140
 
21142
- var QueryManagementUtils = /** @class */ (function () {
21143
- function QueryManagementUtils() {
21144
- }
21145
- QueryManagementUtils.extractCaseQueriesFromCaseField = function () {
21146
- };
21147
- return QueryManagementUtils;
21148
- }());
21149
- QueryManagementUtils.ɵfac = function QueryManagementUtils_Factory(t) { return new (t || QueryManagementUtils)(); };
21150
- QueryManagementUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
21151
- (function () {
21152
- (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(QueryManagementUtils, [{
21153
- type: i0.Injectable
21154
- }], null, null);
21155
- })();
21156
-
21157
21141
  var partyMessagesMockData = [
21158
21142
  {
21159
21143
  partyName: 'John Smith - Appellant',
@@ -21274,6 +21258,21 @@
21274
21258
  }
21275
21259
  ];
21276
21260
 
21261
+ var QueryManagementUtils = /** @class */ (function () {
21262
+ function QueryManagementUtils() {
21263
+ }
21264
+ QueryManagementUtils.extractCaseQueriesFromCaseField = function () {
21265
+ };
21266
+ return QueryManagementUtils;
21267
+ }());
21268
+ QueryManagementUtils.ɵfac = function QueryManagementUtils_Factory(t) { return new (t || QueryManagementUtils)(); };
21269
+ QueryManagementUtils.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: QueryManagementUtils, factory: QueryManagementUtils.ɵfac });
21270
+ (function () {
21271
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(QueryManagementUtils, [{
21272
+ type: i0.Injectable
21273
+ }], null, null);
21274
+ })();
21275
+
21277
21276
  function ReadQueryManagementFieldComponent_ng_container_1_div_1_Template(rf, ctx) {
21278
21277
  if (rf & 1) {
21279
21278
  var _r5_1 = i0__namespace.ɵɵgetCurrentView();
@@ -33931,6 +33930,12 @@
33931
33930
  }] });
33932
33931
  })();
33933
33932
 
33933
+ var CaseViewEventIds;
33934
+ (function (CaseViewEventIds) {
33935
+ CaseViewEventIds["DELETE"] = "DELETE";
33936
+ CaseViewEventIds["QueryManagementRaiseQuery"] = "queryManagementRaiseQuery";
33937
+ })(CaseViewEventIds || (CaseViewEventIds = {}));
33938
+
33934
33939
  var DeleteOrCancelDialogComponent = /** @class */ (function () {
33935
33940
  function DeleteOrCancelDialogComponent(matDialogRef) {
33936
33941
  this.matDialogRef = matDialogRef;
@@ -34461,45 +34466,60 @@
34461
34466
  this.triggerText = CaseFullAccessViewComponent.TRIGGER_TEXT_START;
34462
34467
  };
34463
34468
  CaseFullAccessViewComponent.prototype.applyTrigger = function (trigger) {
34464
- var _this = this;
34465
- this.error = null;
34466
- var theQueryParams = {};
34467
- if (this.ignoreWarning) {
34468
- theQueryParams['ignoreWarning'] = this.ignoreWarning;
34469
- }
34470
- // we may need to take care of different triggers in the future
34471
- if (trigger.id === CaseViewTrigger.DELETE) {
34472
- var dialogRef = this.dialog.open(DeleteOrCancelDialogComponent, this.dialogConfig);
34473
- dialogRef.afterClosed().subscribe(function (result) {
34474
- if (result === 'Delete') {
34475
- _this.draftService.deleteDraft(_this.caseDetails.case_id)
34476
- .subscribe(function (_) {
34477
- _this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.DRAFT_DELETED });
34478
- }, function (_) {
34479
- _this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.ERROR_DELETING_DRAFT });
34480
- });
34469
+ return __awaiter(this, void 0, void 0, function () {
34470
+ var theQueryParams, dialogRef;
34471
+ var _this = this;
34472
+ return __generator(this, function (_a) {
34473
+ switch (_a.label) {
34474
+ case 0:
34475
+ this.error = null;
34476
+ theQueryParams = {};
34477
+ if (this.ignoreWarning) {
34478
+ theQueryParams['ignoreWarning'] = this.ignoreWarning;
34479
+ }
34480
+ if (!(trigger.id === CaseViewEventIds.QueryManagementRaiseQuery)) return [3 /*break*/, 2];
34481
+ return [4 /*yield*/, this.router.navigate(["/cases/query/" + this.caseDetails.case_id])];
34482
+ case 1:
34483
+ _a.sent();
34484
+ return [3 /*break*/, 3];
34485
+ case 2:
34486
+ if (trigger.id === CaseViewEventIds.DELETE) {
34487
+ dialogRef = this.dialog.open(DeleteOrCancelDialogComponent, this.dialogConfig);
34488
+ dialogRef.afterClosed().subscribe(function (result) {
34489
+ if (result === 'Delete') {
34490
+ _this.draftService.deleteDraft(_this.caseDetails.case_id)
34491
+ .subscribe(function (_) {
34492
+ _this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.DRAFT_DELETED });
34493
+ }, function (_) {
34494
+ _this.navigationNotifierService.announceNavigation({ action: exports.NavigationOrigin.ERROR_DELETING_DRAFT });
34495
+ });
34496
+ }
34497
+ });
34498
+ }
34499
+ else if (this.isDraft() && trigger.id !== CaseViewEventIds.DELETE) {
34500
+ theQueryParams[DRAFT_QUERY_PARAM] = this.caseDetails.case_id;
34501
+ theQueryParams[CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM] = 'viewDraft';
34502
+ this.navigationNotifierService.announceNavigation({
34503
+ action: exports.NavigationOrigin.DRAFT_RESUMED,
34504
+ jid: this.caseDetails.case_type.jurisdiction.id,
34505
+ ctid: this.caseDetails.case_type.id,
34506
+ etid: trigger.id,
34507
+ queryParams: theQueryParams
34508
+ });
34509
+ }
34510
+ else {
34511
+ this.navigationNotifierService.announceNavigation({
34512
+ action: exports.NavigationOrigin.EVENT_TRIGGERED,
34513
+ queryParams: theQueryParams,
34514
+ etid: trigger.id,
34515
+ relativeTo: this.route
34516
+ });
34517
+ }
34518
+ _a.label = 3;
34519
+ case 3: return [2 /*return*/];
34481
34520
  }
34482
34521
  });
34483
- }
34484
- else if (this.isDraft() && trigger.id !== CaseViewTrigger.DELETE) {
34485
- theQueryParams[DRAFT_QUERY_PARAM] = this.caseDetails.case_id;
34486
- theQueryParams[CaseFullAccessViewComponent.ORIGIN_QUERY_PARAM] = 'viewDraft';
34487
- this.navigationNotifierService.announceNavigation({
34488
- action: exports.NavigationOrigin.DRAFT_RESUMED,
34489
- jid: this.caseDetails.case_type.jurisdiction.id,
34490
- ctid: this.caseDetails.case_type.id,
34491
- etid: trigger.id,
34492
- queryParams: theQueryParams
34493
- });
34494
- }
34495
- else {
34496
- this.navigationNotifierService.announceNavigation({
34497
- action: exports.NavigationOrigin.EVENT_TRIGGERED,
34498
- queryParams: theQueryParams,
34499
- etid: trigger.id,
34500
- relativeTo: this.route
34501
- });
34502
- }
34522
+ });
34503
34523
  };
34504
34524
  CaseFullAccessViewComponent.prototype.hasTabsPresent = function () {
34505
34525
  return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
@@ -34651,7 +34671,7 @@
34651
34671
  // Clone and sort tabs array
34652
34672
  this.sortedTabs = this.orderService.sort(this.caseDetails.tabs);
34653
34673
  this.caseFields = this.getTabFields();
34654
- this.sortedTabs = this.sortTabFieldsAndFilterTabs(this.sortedTabs);
34674
+ // this.sortedTabs = this.sortTabFieldsAndFilterTabs(this.sortedTabs);
34655
34675
  this.formGroup = this.buildFormGroup(this.caseFields);
34656
34676
  if (this.caseDetails.triggers && this.error) {
34657
34677
  this.resetErrors();