@hmcts/ccd-case-ui-toolkit 5.0.24-case-file-view-document-count-v3 → 5.0.24-case-file-view-search-document-exceptions
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 +4032 -4004
- 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/components/case-viewer/case-full-access-view/case-full-access-view.component.js +12 -14
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.js +118 -235
- package/esm2015/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.js +178 -0
- package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +2 -2
- package/esm2015/lib/shared/components/search-result/search-result.component.js +10 -12
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node.model.js +6 -0
- package/esm2015/lib/shared/domain/case-file-view/index.js +2 -2
- package/esm2015/public-api.js +1 -3
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +2122 -2090
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts +8 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder/case-file-view-folder.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts +3 -0
- package/lib/shared/components/palette/case-file-view/test-data/categories-and-documents-test-data.d.ts.map +1 -0
- package/lib/shared/domain/case-file-view/document-tree-node.model.d.ts +11 -0
- package/lib/shared/domain/case-file-view/document-tree-node.model.d.ts.map +1 -0
- package/lib/shared/domain/case-file-view/index.d.ts +1 -1
- package/lib/shared/domain/case-file-view/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +0 -2
- package/public-api.d.ts.map +1 -1
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +0 -28
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts +0 -7
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +0 -1
|
@@ -7,21 +7,19 @@ import { RouterModule, NavigationStart, NavigationEnd } from '@angular/router';
|
|
|
7
7
|
import * as i1$3 from '@angular/forms';
|
|
8
8
|
import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormArray, FormGroup, FormControl, Validators, FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import polling from 'rx-polling';
|
|
10
|
-
import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of,
|
|
10
|
+
import { throwError, Subject, EMPTY, Observable, BehaviorSubject, of, fromEvent, timer } from 'rxjs';
|
|
11
11
|
import * as i1$2 from '@angular/common/http';
|
|
12
12
|
import { HttpErrorResponse, HttpHeaders, HttpParams } from '@angular/common/http';
|
|
13
|
-
import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap,
|
|
13
|
+
import { catchError, map, publish, refCount, debounceTime, distinctUntilChanged, finalize, tap, switchMap, takeUntil, delay, publishReplay, take, filter, first } from 'rxjs/operators';
|
|
14
14
|
import { Type, Expose, plainToClassFromExist, plainToClass } from 'class-transformer';
|
|
15
15
|
import * as _ from 'underscore';
|
|
16
16
|
import * as moment from 'moment';
|
|
17
17
|
import { __decorate, __metadata } from 'tslib';
|
|
18
18
|
import * as i1$4 from 'ngx-md';
|
|
19
19
|
import { NgxMdModule } from 'ngx-md';
|
|
20
|
-
import
|
|
21
|
-
import { isUndefined } from 'util';
|
|
22
|
-
import * as i1$5 from '@angular/cdk/tree';
|
|
20
|
+
import * as i3 from '@angular/cdk/tree';
|
|
23
21
|
import { NestedTreeControl, CdkTreeModule } from '@angular/cdk/tree';
|
|
24
|
-
import * as i1$
|
|
22
|
+
import * as i1$5 from '@angular/material/dialog';
|
|
25
23
|
import { MatDialogConfig } from '@angular/material/dialog';
|
|
26
24
|
import * as i2 from '@nicky-lenaers/ngx-scroll-to';
|
|
27
25
|
import { ScrollToModule } from '@nicky-lenaers/ngx-scroll-to';
|
|
@@ -32,17 +30,19 @@ import * as i5 from '@angular/material/datepicker';
|
|
|
32
30
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
33
31
|
import * as i6 from '@angular/material/form-field';
|
|
34
32
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
33
|
+
import { Subject as Subject$1 } from 'rxjs/Subject';
|
|
34
|
+
import { isUndefined } from 'util';
|
|
35
35
|
import * as i5$1 from '@angular/material/autocomplete';
|
|
36
36
|
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
37
37
|
import * as i6$1 from '@angular/material/core';
|
|
38
38
|
import { MAT_DATE_LOCALE } from '@angular/material/core';
|
|
39
|
-
import * as i3 from '@hmcts/ccpay-web-component';
|
|
39
|
+
import * as i3$1 from '@hmcts/ccpay-web-component';
|
|
40
40
|
import { PaymentLibModule } from '@hmcts/ccpay-web-component';
|
|
41
41
|
import { StateMachine } from '@edium/fsm';
|
|
42
42
|
import * as i6$2 from '@angular/cdk/portal';
|
|
43
43
|
import { ComponentPortal, PortalModule } from '@angular/cdk/portal';
|
|
44
44
|
import { MatInputModule } from '@angular/material/input';
|
|
45
|
-
import * as i1$
|
|
45
|
+
import * as i1$6 from 'ngx-pagination';
|
|
46
46
|
import { NgxPaginationModule, PaginatePipe } from 'ngx-pagination';
|
|
47
47
|
import * as i10 from '@angular/material/tabs';
|
|
48
48
|
import { MatTabsModule } from '@angular/material/tabs';
|
|
@@ -6207,7 +6207,7 @@ class IsCompoundPipe {
|
|
|
6207
6207
|
}
|
|
6208
6208
|
}
|
|
6209
6209
|
IsCompoundPipe.COMPOUND_TYPES = [
|
|
6210
|
-
'Complex', 'Label', 'AddressGlobal', 'AddressUK', 'AddressGlobalUK', 'CasePaymentHistoryViewer', 'CaseHistoryViewer', 'Organisation', 'WaysToPay'
|
|
6210
|
+
'Complex', 'Label', 'AddressGlobal', 'AddressUK', 'AddressGlobalUK', 'CasePaymentHistoryViewer', 'CaseHistoryViewer', 'Organisation', 'WaysToPay', 'ComponentLauncher'
|
|
6211
6211
|
];
|
|
6212
6212
|
IsCompoundPipe.EXCLUDE = [
|
|
6213
6213
|
'CaseLink', 'JudicialUser'
|
|
@@ -6658,38 +6658,6 @@ WriteAddressFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteAddressFi
|
|
|
6658
6658
|
type: Input
|
|
6659
6659
|
}] }); })();
|
|
6660
6660
|
|
|
6661
|
-
class CaseFieldService {
|
|
6662
|
-
isOptional(field) {
|
|
6663
|
-
if (!field || !field.display_context) {
|
|
6664
|
-
return false;
|
|
6665
|
-
}
|
|
6666
|
-
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
6667
|
-
}
|
|
6668
|
-
isReadOnly(field) {
|
|
6669
|
-
if (!field || !field.display_context) {
|
|
6670
|
-
return false;
|
|
6671
|
-
}
|
|
6672
|
-
return field.display_context.toUpperCase() === 'READONLY';
|
|
6673
|
-
}
|
|
6674
|
-
isMandatory(field) {
|
|
6675
|
-
if (!field || !field.display_context) {
|
|
6676
|
-
return false;
|
|
6677
|
-
}
|
|
6678
|
-
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
6679
|
-
}
|
|
6680
|
-
isLabel(field) {
|
|
6681
|
-
if (!field || !field.field_type) {
|
|
6682
|
-
return false;
|
|
6683
|
-
}
|
|
6684
|
-
return field.field_type.type === 'Label';
|
|
6685
|
-
}
|
|
6686
|
-
}
|
|
6687
|
-
CaseFieldService.ɵfac = function CaseFieldService_Factory(t) { return new (t || CaseFieldService)(); };
|
|
6688
|
-
CaseFieldService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
6689
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
6690
|
-
type: Injectable
|
|
6691
|
-
}], null, null); })();
|
|
6692
|
-
|
|
6693
6661
|
class CaseFileViewService {
|
|
6694
6662
|
constructor(http, appConfig, errorService) {
|
|
6695
6663
|
this.http = http;
|
|
@@ -6730,1471 +6698,808 @@ CaseFileViewService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFileViewServic
|
|
|
6730
6698
|
type: Injectable
|
|
6731
6699
|
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }]; }, null); })();
|
|
6732
6700
|
|
|
6733
|
-
class
|
|
6734
|
-
constructor(http, appConfig) {
|
|
6735
|
-
this.http = http;
|
|
6736
|
-
this.appConfig = appConfig;
|
|
6737
|
-
}
|
|
6738
|
-
uploadFile(formData) {
|
|
6739
|
-
const url = this.getDocStoreUrl();
|
|
6740
|
-
// Do not set any headers, such as "Accept" or "Content-Type", with null values; this is not permitted with the
|
|
6741
|
-
// Angular HttpClient in @angular/common/http. Just create and pass a new HttpHeaders object. Angular will add the
|
|
6742
|
-
// correct headers and values automatically
|
|
6743
|
-
const headers = new HttpHeaders();
|
|
6744
|
-
return this.http
|
|
6745
|
-
.post(url, formData, { headers, observe: 'body' })
|
|
6746
|
-
.pipe(delay(DocumentManagementService.RESPONSE_DELAY));
|
|
6747
|
-
}
|
|
6748
|
-
getMediaViewerInfo(documentFieldValue) {
|
|
6749
|
-
const mediaViewerInfo = {
|
|
6750
|
-
document_binary_url: this.transformDocumentUrl(documentFieldValue.document_binary_url),
|
|
6751
|
-
document_filename: documentFieldValue.document_filename,
|
|
6752
|
-
content_type: this.getContentType(documentFieldValue),
|
|
6753
|
-
annotation_api_url: this.appConfig.getAnnotationApiUrl(),
|
|
6754
|
-
case_id: documentFieldValue.id,
|
|
6755
|
-
case_jurisdiction: documentFieldValue.jurisdiction
|
|
6756
|
-
};
|
|
6757
|
-
return JSON.stringify(mediaViewerInfo);
|
|
6758
|
-
}
|
|
6759
|
-
getContentType(documentFieldValue) {
|
|
6760
|
-
let fileExtension = '<unknown>';
|
|
6761
|
-
if (documentFieldValue.document_filename) {
|
|
6762
|
-
const position = documentFieldValue.document_filename.lastIndexOf('.');
|
|
6763
|
-
if (position === documentFieldValue.document_filename.length) {
|
|
6764
|
-
fileExtension = '';
|
|
6765
|
-
}
|
|
6766
|
-
else if (position >= 0) {
|
|
6767
|
-
fileExtension = documentFieldValue.document_filename.slice(position + 1);
|
|
6768
|
-
}
|
|
6769
|
-
}
|
|
6770
|
-
if (this.isImage(fileExtension)) {
|
|
6771
|
-
return DocumentManagementService.IMAGE;
|
|
6772
|
-
}
|
|
6773
|
-
else if (this.isWord(fileExtension)) {
|
|
6774
|
-
return DocumentManagementService.WORD;
|
|
6775
|
-
}
|
|
6776
|
-
else if (this.isExcel(fileExtension)) {
|
|
6777
|
-
return DocumentManagementService.EXCEL;
|
|
6778
|
-
}
|
|
6779
|
-
else if (this.isPowerpoint(fileExtension)) {
|
|
6780
|
-
return DocumentManagementService.POWERPOINT;
|
|
6781
|
-
}
|
|
6782
|
-
else if (fileExtension.toLowerCase() === 'txt') {
|
|
6783
|
-
return DocumentManagementService.TXT;
|
|
6784
|
-
}
|
|
6785
|
-
else if (fileExtension.toLowerCase() === 'rtf') {
|
|
6786
|
-
return DocumentManagementService.RTF;
|
|
6787
|
-
}
|
|
6788
|
-
else if (fileExtension.toLowerCase() === 'pdf') {
|
|
6789
|
-
return DocumentManagementService.PDF;
|
|
6790
|
-
}
|
|
6791
|
-
else {
|
|
6792
|
-
return fileExtension;
|
|
6793
|
-
}
|
|
6794
|
-
}
|
|
6795
|
-
isImage(imageType) {
|
|
6796
|
-
return DocumentManagementService.imagesList.find(e => e === imageType) !== undefined;
|
|
6797
|
-
}
|
|
6798
|
-
isWord(wordType) {
|
|
6799
|
-
return DocumentManagementService.wordList.find(e => e === wordType) !== undefined;
|
|
6800
|
-
}
|
|
6801
|
-
isExcel(excelType) {
|
|
6802
|
-
return DocumentManagementService.excelList.find(e => e === excelType) !== undefined;
|
|
6803
|
-
}
|
|
6804
|
-
isPowerpoint(powerpointType) {
|
|
6805
|
-
return DocumentManagementService.powerpointList.find(e => e === powerpointType) !== undefined;
|
|
6806
|
-
}
|
|
6807
|
-
transformDocumentUrl(documentBinaryUrl) {
|
|
6808
|
-
const remoteHrsPattern = new RegExp(this.appConfig.getRemoteHrsUrl());
|
|
6809
|
-
documentBinaryUrl = documentBinaryUrl.replace(remoteHrsPattern, this.appConfig.getHrsUrl());
|
|
6810
|
-
const remoteDocumentManagementPattern = new RegExp(this.appConfig.getRemoteDocumentManagementUrl());
|
|
6811
|
-
return documentBinaryUrl.replace(remoteDocumentManagementPattern, this.getDocStoreUrl());
|
|
6812
|
-
}
|
|
6813
|
-
getDocStoreUrl() {
|
|
6814
|
-
return this.appConfig.getDocumentSecureMode() ? this.appConfig.getDocumentManagementUrlV2() : this.appConfig.getDocumentManagementUrl();
|
|
6815
|
-
}
|
|
6701
|
+
class CaseFileViewCategory {
|
|
6816
6702
|
}
|
|
6817
|
-
DocumentManagementService.PDF = 'pdf';
|
|
6818
|
-
DocumentManagementService.IMAGE = 'image';
|
|
6819
|
-
DocumentManagementService.WORD = 'word';
|
|
6820
|
-
DocumentManagementService.EXCEL = 'excel';
|
|
6821
|
-
DocumentManagementService.POWERPOINT = 'powerpoint';
|
|
6822
|
-
DocumentManagementService.TXT = 'txt';
|
|
6823
|
-
DocumentManagementService.RTF = 'rtf';
|
|
6824
|
-
// This delay has been added to give enough time to the user on the UI to see the info messages on the document upload
|
|
6825
|
-
// field for cases when uploads are very fast.
|
|
6826
|
-
DocumentManagementService.RESPONSE_DELAY = 1000;
|
|
6827
|
-
DocumentManagementService.imagesList = ['GIF', 'JPG', 'JPEG', 'PNG', 'gif', 'jpg', 'jpeg', 'png'];
|
|
6828
|
-
DocumentManagementService.wordList = ['DOC', 'DOCX', 'doc', 'docx'];
|
|
6829
|
-
DocumentManagementService.excelList = ['XLS', 'XLSX', 'xls', 'xlsx'];
|
|
6830
|
-
DocumentManagementService.powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
|
|
6831
|
-
DocumentManagementService.ɵfac = function DocumentManagementService_Factory(t) { return new (t || DocumentManagementService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
6832
|
-
DocumentManagementService.ɵprov = i0.ɵɵdefineInjectable({ token: DocumentManagementService, factory: DocumentManagementService.ɵfac });
|
|
6833
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DocumentManagementService, [{
|
|
6834
|
-
type: Injectable
|
|
6835
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
6836
6703
|
|
|
6837
|
-
class
|
|
6838
|
-
constructor() {
|
|
6839
|
-
this.errorSource = new Subject();
|
|
6840
|
-
this.error = this.errorSource.asObservable();
|
|
6841
|
-
}
|
|
6842
|
-
announceError(error) {
|
|
6843
|
-
this.errorSource.next(error);
|
|
6844
|
-
}
|
|
6704
|
+
class CaseFileViewDocument {
|
|
6845
6705
|
}
|
|
6846
|
-
ErrorNotifierService.ɵfac = function ErrorNotifierService_Factory(t) { return new (t || ErrorNotifierService)(); };
|
|
6847
|
-
ErrorNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorNotifierService, factory: ErrorNotifierService.ɵfac });
|
|
6848
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorNotifierService, [{
|
|
6849
|
-
type: Injectable
|
|
6850
|
-
}], null, null); })();
|
|
6851
6706
|
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6857
|
-
return EventStatusService.CALLBACK_STATUS_INCOMPLETE === eventStatus
|
|
6858
|
-
|| EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE === eventStatus;
|
|
6859
|
-
}
|
|
6707
|
+
/**
|
|
6708
|
+
* DTO to provide typing of the response from the CCD Data Store API for Categories and Documents data.
|
|
6709
|
+
* @see {@link https://tools.hmcts.net/confluence/x/0KSDX#CaseFileViewDocumentDataendpointLLD-SuccessResponsePayload} for full details
|
|
6710
|
+
*/
|
|
6711
|
+
class CategoriesAndDocuments {
|
|
6860
6712
|
}
|
|
6861
|
-
EventStatusService.CALLBACK_STATUS_INCOMPLETE = 'INCOMPLETE_CALLBACK';
|
|
6862
|
-
EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE = 'INCOMPLETE_DELETE_DRAFT';
|
|
6863
|
-
EventStatusService.CALLBACK_STATUS_COMPLETE = 'CALLBACK_COMPLETED';
|
|
6864
|
-
EventStatusService.DELETE_DRAFT_STATUS_COMPLETE = 'DELETE_DRAFT_COMPLETED';
|
|
6865
|
-
EventStatusService.ɵfac = function EventStatusService_Factory(t) { return new (t || EventStatusService)(); };
|
|
6866
|
-
EventStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: EventStatusService, factory: EventStatusService.ɵfac });
|
|
6867
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStatusService, [{
|
|
6868
|
-
type: Injectable
|
|
6869
|
-
}], null, null); })();
|
|
6870
6713
|
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6876
|
-
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
else {
|
|
6892
|
-
group = group.controls[field];
|
|
6893
|
-
if (inArray && group.controls['value']) {
|
|
6894
|
-
group = group.controls['value'];
|
|
6714
|
+
var DocumentTreeNodeType;
|
|
6715
|
+
(function (DocumentTreeNodeType) {
|
|
6716
|
+
DocumentTreeNodeType["FOLDER"] = "folder";
|
|
6717
|
+
DocumentTreeNodeType["DOCUMENT"] = "document";
|
|
6718
|
+
})(DocumentTreeNodeType || (DocumentTreeNodeType = {}));
|
|
6719
|
+
|
|
6720
|
+
const categoriesAndDocuments = {
|
|
6721
|
+
case_version: 1,
|
|
6722
|
+
categories: [
|
|
6723
|
+
{
|
|
6724
|
+
category_id: 'Beers',
|
|
6725
|
+
category_name: 'Beers',
|
|
6726
|
+
category_order: 1,
|
|
6727
|
+
documents: [
|
|
6728
|
+
{
|
|
6729
|
+
document_url: '/test',
|
|
6730
|
+
document_filename: 'Beers encyclopedia',
|
|
6731
|
+
document_binary_url: '/test/binary',
|
|
6732
|
+
attribute_path: '',
|
|
6733
|
+
upload_timestamp: ''
|
|
6895
6734
|
}
|
|
6896
|
-
|
|
6897
|
-
|
|
6735
|
+
],
|
|
6736
|
+
sub_categories: [
|
|
6737
|
+
{
|
|
6738
|
+
category_id: 'BeersBitters',
|
|
6739
|
+
category_name: 'Bitters',
|
|
6740
|
+
category_order: 1,
|
|
6741
|
+
documents: [],
|
|
6742
|
+
sub_categories: []
|
|
6743
|
+
},
|
|
6744
|
+
{
|
|
6745
|
+
category_id: 'BeersAmerican',
|
|
6746
|
+
category_name: 'American',
|
|
6747
|
+
category_order: 2,
|
|
6748
|
+
documents: [],
|
|
6749
|
+
sub_categories: []
|
|
6750
|
+
},
|
|
6751
|
+
{
|
|
6752
|
+
category_id: 'BeersAsian',
|
|
6753
|
+
category_name: 'Asian',
|
|
6754
|
+
category_order: 3,
|
|
6755
|
+
documents: [],
|
|
6756
|
+
sub_categories: []
|
|
6898
6757
|
}
|
|
6899
|
-
|
|
6900
|
-
|
|
6758
|
+
]
|
|
6759
|
+
},
|
|
6760
|
+
{
|
|
6761
|
+
category_id: 'Wines',
|
|
6762
|
+
category_name: 'Wines',
|
|
6763
|
+
category_order: 2,
|
|
6764
|
+
documents: [],
|
|
6765
|
+
sub_categories: [
|
|
6766
|
+
{
|
|
6767
|
+
category_id: 'WinesFrench',
|
|
6768
|
+
category_name: 'French',
|
|
6769
|
+
category_order: 1,
|
|
6770
|
+
documents: [],
|
|
6771
|
+
sub_categories: []
|
|
6772
|
+
},
|
|
6773
|
+
{
|
|
6774
|
+
category_id: 'WinesItalian',
|
|
6775
|
+
category_name: 'Italian',
|
|
6776
|
+
category_order: 2,
|
|
6777
|
+
documents: [],
|
|
6778
|
+
sub_categories: []
|
|
6901
6779
|
}
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
6905
|
-
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6910
|
-
|
|
6911
|
-
|
|
6912
|
-
|
|
6780
|
+
]
|
|
6781
|
+
},
|
|
6782
|
+
{
|
|
6783
|
+
category_id: 'Spirits',
|
|
6784
|
+
category_name: 'Spirits',
|
|
6785
|
+
category_order: 3,
|
|
6786
|
+
documents: [],
|
|
6787
|
+
sub_categories: [
|
|
6788
|
+
{
|
|
6789
|
+
category_id: 'SpiritsWhisky',
|
|
6790
|
+
category_name: 'Scotch whisky',
|
|
6791
|
+
category_order: 1,
|
|
6792
|
+
documents: [],
|
|
6793
|
+
sub_categories: [
|
|
6794
|
+
{
|
|
6795
|
+
category_id: 'WhiskyHighland',
|
|
6796
|
+
category_name: 'Highland',
|
|
6797
|
+
category_order: 1,
|
|
6798
|
+
documents: [],
|
|
6799
|
+
sub_categories: [
|
|
6800
|
+
{
|
|
6801
|
+
category_id: 'WhiskyHighland1',
|
|
6802
|
+
category_name: 'Highland 1',
|
|
6803
|
+
category_order: 1,
|
|
6804
|
+
documents: [],
|
|
6805
|
+
sub_categories: []
|
|
6806
|
+
}
|
|
6807
|
+
]
|
|
6808
|
+
},
|
|
6809
|
+
{
|
|
6810
|
+
category_id: 'WhiskyLowland',
|
|
6811
|
+
category_name: 'Lowland',
|
|
6812
|
+
category_order: 2,
|
|
6813
|
+
documents: [],
|
|
6814
|
+
sub_categories: [
|
|
6815
|
+
{
|
|
6816
|
+
category_id: 'WhiskyLowland1',
|
|
6817
|
+
category_name: 'Lowland 1',
|
|
6818
|
+
category_order: 1,
|
|
6819
|
+
documents: [
|
|
6820
|
+
{
|
|
6821
|
+
document_url: '/test',
|
|
6822
|
+
document_filename: 'Details about Whisky Lowland 1',
|
|
6823
|
+
document_binary_url: '/test/binary',
|
|
6824
|
+
attribute_path: '',
|
|
6825
|
+
upload_timestamp: ''
|
|
6826
|
+
}
|
|
6827
|
+
],
|
|
6828
|
+
sub_categories: []
|
|
6829
|
+
},
|
|
6830
|
+
{
|
|
6831
|
+
category_id: 'WhiskyLowland2',
|
|
6832
|
+
category_name: 'Lowland 2',
|
|
6833
|
+
category_order: 2,
|
|
6834
|
+
documents: [],
|
|
6835
|
+
sub_categories: []
|
|
6836
|
+
}
|
|
6837
|
+
]
|
|
6838
|
+
},
|
|
6839
|
+
{
|
|
6840
|
+
category_id: 'WhiskyIslay',
|
|
6841
|
+
category_name: 'Islay',
|
|
6842
|
+
category_order: 3,
|
|
6843
|
+
documents: [
|
|
6844
|
+
{
|
|
6845
|
+
document_url: '/test',
|
|
6846
|
+
document_filename: 'Details about Whisky Islay',
|
|
6847
|
+
document_binary_url: '/test/binary',
|
|
6848
|
+
attribute_path: '',
|
|
6849
|
+
upload_timestamp: ''
|
|
6850
|
+
},
|
|
6851
|
+
{
|
|
6852
|
+
document_url: '/test',
|
|
6853
|
+
document_filename: 'More information about Whisky Islay',
|
|
6854
|
+
document_binary_url: '/test/binary',
|
|
6855
|
+
attribute_path: '',
|
|
6856
|
+
upload_timestamp: ''
|
|
6857
|
+
}
|
|
6858
|
+
],
|
|
6859
|
+
sub_categories: []
|
|
6860
|
+
},
|
|
6861
|
+
{
|
|
6862
|
+
category_id: 'WhiskySpeyside',
|
|
6863
|
+
category_name: 'Speyside',
|
|
6864
|
+
category_order: 4,
|
|
6865
|
+
documents: [],
|
|
6866
|
+
sub_categories: []
|
|
6867
|
+
},
|
|
6868
|
+
{
|
|
6869
|
+
category_id: 'WhiskyCampbeltown',
|
|
6870
|
+
category_name: 'Campbeltown',
|
|
6871
|
+
category_order: 5,
|
|
6872
|
+
documents: [],
|
|
6873
|
+
sub_categories: []
|
|
6874
|
+
}
|
|
6875
|
+
]
|
|
6876
|
+
}
|
|
6877
|
+
]
|
|
6878
|
+
}
|
|
6879
|
+
],
|
|
6880
|
+
uncategorised_documents: [
|
|
6881
|
+
{
|
|
6882
|
+
document_url: '/uncategorised-document-1',
|
|
6883
|
+
document_filename: 'Uncategorised document 1',
|
|
6884
|
+
document_binary_url: '/test/binary',
|
|
6885
|
+
attribute_path: '',
|
|
6886
|
+
upload_timestamp: ''
|
|
6887
|
+
},
|
|
6888
|
+
{
|
|
6889
|
+
document_url: '/uncategorised-document-2',
|
|
6890
|
+
document_filename: 'Uncategorised document 2',
|
|
6891
|
+
document_binary_url: '/test/binary',
|
|
6892
|
+
attribute_path: '',
|
|
6893
|
+
upload_timestamp: ''
|
|
6894
|
+
}
|
|
6895
|
+
]
|
|
6896
|
+
};
|
|
6913
6897
|
|
|
6914
|
-
|
|
6915
|
-
|
|
6916
|
-
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
|
|
6929
|
-
|
|
6930
|
-
|
|
6931
|
-
|
|
6932
|
-
|
|
6933
|
-
|
|
6934
|
-
|
|
6935
|
-
|
|
6936
|
-
|
|
6937
|
-
|
|
6938
|
-
|
|
6939
|
-
|
|
6898
|
+
function CaseFileViewFolderComponent_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
6899
|
+
i0.ɵɵelementStart(0, "div");
|
|
6900
|
+
i0.ɵɵtext(1, " No results found ");
|
|
6901
|
+
i0.ɵɵelementEnd();
|
|
6902
|
+
} }
|
|
6903
|
+
function CaseFileViewFolderComponent_div_5_cdk_nested_tree_node_3_Template(rf, ctx) { if (rf & 1) {
|
|
6904
|
+
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 10);
|
|
6905
|
+
i0.ɵɵelementStart(1, "div", 11);
|
|
6906
|
+
i0.ɵɵelement(2, "button", 12);
|
|
6907
|
+
i0.ɵɵelementStart(3, "span", 13);
|
|
6908
|
+
i0.ɵɵtext(4);
|
|
6909
|
+
i0.ɵɵelementEnd();
|
|
6910
|
+
i0.ɵɵelementEnd();
|
|
6911
|
+
i0.ɵɵelementEnd();
|
|
6912
|
+
} if (rf & 2) {
|
|
6913
|
+
const node_r4 = ctx.$implicit;
|
|
6914
|
+
i0.ɵɵadvance(4);
|
|
6915
|
+
i0.ɵɵtextInterpolate(node_r4.name);
|
|
6916
|
+
} }
|
|
6917
|
+
function CaseFileViewFolderComponent_div_5_cdk_nested_tree_node_4_Template(rf, ctx) { if (rf & 1) {
|
|
6918
|
+
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 10);
|
|
6919
|
+
i0.ɵɵelementStart(1, "div", 11);
|
|
6920
|
+
i0.ɵɵelementStart(2, "button", 14);
|
|
6921
|
+
i0.ɵɵelementStart(3, "span", 15);
|
|
6922
|
+
i0.ɵɵtext(4);
|
|
6923
|
+
i0.ɵɵelementEnd();
|
|
6924
|
+
i0.ɵɵelementEnd();
|
|
6925
|
+
i0.ɵɵelementStart(5, "span", 16);
|
|
6926
|
+
i0.ɵɵtext(6);
|
|
6927
|
+
i0.ɵɵelementEnd();
|
|
6928
|
+
i0.ɵɵelementEnd();
|
|
6929
|
+
i0.ɵɵelementStart(7, "div");
|
|
6930
|
+
i0.ɵɵelementContainer(8, 17);
|
|
6931
|
+
i0.ɵɵelementEnd();
|
|
6932
|
+
i0.ɵɵelementEnd();
|
|
6933
|
+
} if (rf & 2) {
|
|
6934
|
+
const node_r5 = ctx.$implicit;
|
|
6935
|
+
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
6936
|
+
i0.ɵɵadvance(2);
|
|
6937
|
+
i0.ɵɵattribute("aria-label", "toggle " + node_r5.name);
|
|
6938
|
+
i0.ɵɵadvance(2);
|
|
6939
|
+
i0.ɵɵtextInterpolate(node_r5.count);
|
|
6940
|
+
i0.ɵɵadvance(2);
|
|
6941
|
+
i0.ɵɵtextInterpolate(node_r5.name);
|
|
6942
|
+
i0.ɵɵadvance(1);
|
|
6943
|
+
i0.ɵɵclassProp("document-tree-invisible", !ctx_r3.nestedTreeControl.isExpanded(node_r5));
|
|
6944
|
+
} }
|
|
6945
|
+
function CaseFileViewFolderComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
6946
|
+
i0.ɵɵelementStart(0, "div", 5);
|
|
6947
|
+
i0.ɵɵtemplate(1, CaseFileViewFolderComponent_div_5_div_1_Template, 2, 0, "div", 6);
|
|
6948
|
+
i0.ɵɵelementStart(2, "cdk-tree", 7);
|
|
6949
|
+
i0.ɵɵtemplate(3, CaseFileViewFolderComponent_div_5_cdk_nested_tree_node_3_Template, 5, 1, "cdk-nested-tree-node", 8);
|
|
6950
|
+
i0.ɵɵtemplate(4, CaseFileViewFolderComponent_div_5_cdk_nested_tree_node_4_Template, 9, 5, "cdk-nested-tree-node", 9);
|
|
6951
|
+
i0.ɵɵelementEnd();
|
|
6952
|
+
i0.ɵɵelementEnd();
|
|
6953
|
+
} if (rf & 2) {
|
|
6954
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
6955
|
+
i0.ɵɵadvance(1);
|
|
6956
|
+
i0.ɵɵproperty("ngIf", !ctx_r0.nestedDataSource || ctx_r0.nestedDataSource.length === 0);
|
|
6957
|
+
i0.ɵɵadvance(1);
|
|
6958
|
+
i0.ɵɵproperty("dataSource", ctx_r0.nestedDataSource)("treeControl", ctx_r0.nestedTreeControl);
|
|
6959
|
+
i0.ɵɵadvance(2);
|
|
6960
|
+
i0.ɵɵproperty("cdkTreeNodeDefWhen", ctx_r0.nestedChildren);
|
|
6961
|
+
} }
|
|
6962
|
+
class CaseFileViewFolderComponent {
|
|
6963
|
+
constructor() {
|
|
6964
|
+
this.categories = [];
|
|
6965
|
+
this.getChildren = (node) => of(node.children);
|
|
6966
|
+
this.nestedChildren = (_, nodeData) => nodeData.children;
|
|
6967
|
+
this.nestedTreeControl = new NestedTreeControl(this.getChildren);
|
|
6940
6968
|
}
|
|
6941
|
-
|
|
6942
|
-
|
|
6943
|
-
|
|
6944
|
-
|
|
6945
|
-
|
|
6946
|
-
|
|
6947
|
-
|
|
6948
|
-
|
|
6949
|
-
|
|
6950
|
-
|
|
6951
|
-
|
|
6969
|
+
ngOnInit() {
|
|
6970
|
+
this.documentFilterFormGroup = new FormGroup({});
|
|
6971
|
+
this.documentSearchFormControl = new FormControl('');
|
|
6972
|
+
this.documentFilterFormGroup.addControl(CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME, this.documentSearchFormControl);
|
|
6973
|
+
// Listen to search input and initiate filter documents if at least three characters entered
|
|
6974
|
+
this.documentFilterSubscription = this.documentSearchFormControl.valueChanges.pipe(switchMap((searchTerm) => this.filter(searchTerm.toLowerCase(), this.documentTreeData))).subscribe(documentTreeData => {
|
|
6975
|
+
this.nestedDataSource = documentTreeData;
|
|
6976
|
+
});
|
|
6977
|
+
// Subscribe to the input categories and documents, and generate tree data and initialise cdk tree
|
|
6978
|
+
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments.subscribe(categoriesAndDocumentsResult => {
|
|
6979
|
+
// Using the mock data for now as we have to display the documents as well for demo purpose
|
|
6980
|
+
const categories = categoriesAndDocuments.categories; // categoriesAndDocuments.categories;
|
|
6981
|
+
// Generate document tree data from categories
|
|
6982
|
+
this.documentTreeData = this.generateTreeData(categories);
|
|
6983
|
+
// Append uncategorised documents
|
|
6984
|
+
if (categoriesAndDocumentsResult.uncategorised_documents && categoriesAndDocumentsResult.uncategorised_documents.length > 0) {
|
|
6985
|
+
const uncategorisedDocuments = this.getUncategorisedDocuments(categoriesAndDocumentsResult.uncategorised_documents);
|
|
6986
|
+
this.documentTreeData.push(uncategorisedDocuments);
|
|
6987
|
+
}
|
|
6988
|
+
// Initialise cdk tree with generated data
|
|
6989
|
+
this.nestedDataSource = this.documentTreeData;
|
|
6990
|
+
});
|
|
6952
6991
|
}
|
|
6953
|
-
|
|
6954
|
-
|
|
6955
|
-
|
|
6956
|
-
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
NavigationOrigin[NavigationOrigin["ERROR_DELETING_DRAFT"] = 1] = "ERROR_DELETING_DRAFT";
|
|
6965
|
-
NavigationOrigin[NavigationOrigin["DRAFT_RESUMED"] = 2] = "DRAFT_RESUMED";
|
|
6966
|
-
NavigationOrigin[NavigationOrigin["EVENT_TRIGGERED"] = 3] = "EVENT_TRIGGERED";
|
|
6967
|
-
NavigationOrigin[NavigationOrigin["NO_READ_ACCESS_REDIRECTION"] = 4] = "NO_READ_ACCESS_REDIRECTION";
|
|
6968
|
-
})(NavigationOrigin || (NavigationOrigin = {}));
|
|
6969
|
-
|
|
6970
|
-
class NavigationNotifierService {
|
|
6971
|
-
constructor() {
|
|
6972
|
-
this.navigationSource = new BehaviorSubject({});
|
|
6973
|
-
this.navigation = this.navigationSource.asObservable();
|
|
6992
|
+
generateTreeData(categories) {
|
|
6993
|
+
return categories.reduce((tree, node) => [
|
|
6994
|
+
...tree,
|
|
6995
|
+
...[
|
|
6996
|
+
{
|
|
6997
|
+
name: node.category_name,
|
|
6998
|
+
type: DocumentTreeNodeType.FOLDER,
|
|
6999
|
+
children: [...this.generateTreeData(node.sub_categories), ...this.getDocuments(node.documents)]
|
|
7000
|
+
},
|
|
7001
|
+
],
|
|
7002
|
+
], []);
|
|
6974
7003
|
}
|
|
6975
|
-
|
|
6976
|
-
|
|
7004
|
+
getDocuments(documents) {
|
|
7005
|
+
const documentsToReturn = [];
|
|
7006
|
+
documents.forEach(document => {
|
|
7007
|
+
documentsToReturn.push({ name: document.document_filename, type: DocumentTreeNodeType.DOCUMENT });
|
|
7008
|
+
});
|
|
7009
|
+
return documentsToReturn;
|
|
6977
7010
|
}
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
(
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
function hasRoles(profile) {
|
|
6986
|
-
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
6987
|
-
return profile.user.idam.roles.length > 0;
|
|
7011
|
+
getUncategorisedDocuments(uncategorisedDocuments) {
|
|
7012
|
+
const documents = [];
|
|
7013
|
+
uncategorisedDocuments.forEach(document => {
|
|
7014
|
+
documents.push({ name: document.document_filename, type: DocumentTreeNodeType.DOCUMENT });
|
|
7015
|
+
});
|
|
7016
|
+
return { name: CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE, type: DocumentTreeNodeType.FOLDER, children: documents };
|
|
6988
7017
|
}
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
isSolicitor() {
|
|
6994
|
-
if (hasRoles(this)) {
|
|
6995
|
-
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
7018
|
+
filter(searchTerm, documentTreeData) {
|
|
7019
|
+
// Make a copy of the data so we do not mutate the original
|
|
7020
|
+
function copy(node) {
|
|
7021
|
+
return Object.assign({}, node);
|
|
6996
7022
|
}
|
|
6997
|
-
|
|
7023
|
+
let filteredData = documentTreeData;
|
|
7024
|
+
if (searchTerm && searchTerm.length > 2 && this.documentFilterFormGroup.controls[CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME].value.length > 2) {
|
|
7025
|
+
filteredData = documentTreeData.map(copy).filter(function filterTreeData(node) {
|
|
7026
|
+
if (node.name && node.name.toLowerCase().includes(searchTerm) && node.type === DocumentTreeNodeType.DOCUMENT) {
|
|
7027
|
+
return true;
|
|
7028
|
+
}
|
|
7029
|
+
// Call recursively if node has children
|
|
7030
|
+
if (node.children) {
|
|
7031
|
+
return (node.children = node.children.map(copy).filter(filterTreeData)).length;
|
|
7032
|
+
}
|
|
7033
|
+
});
|
|
7034
|
+
}
|
|
7035
|
+
return of(filteredData);
|
|
6998
7036
|
}
|
|
6999
|
-
|
|
7000
|
-
if (
|
|
7001
|
-
|
|
7037
|
+
ngOnDestroy() {
|
|
7038
|
+
if (this.categoriesAndDocumentsSubscription) {
|
|
7039
|
+
this.categoriesAndDocumentsSubscription.unsubscribe();
|
|
7040
|
+
}
|
|
7041
|
+
if (this.documentFilterSubscription) {
|
|
7042
|
+
this.documentFilterSubscription.unsubscribe();
|
|
7002
7043
|
}
|
|
7003
|
-
return false;
|
|
7004
7044
|
}
|
|
7005
7045
|
}
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7046
|
+
CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
|
|
7047
|
+
CaseFileViewFolderComponent.DOCUMENT_SEARCH_FORM_CONTROL_NAME = 'documentSearchFormControl';
|
|
7048
|
+
CaseFileViewFolderComponent.MINIMUM_SEARCH_CHARACTERS = 2;
|
|
7049
|
+
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(); };
|
|
7050
|
+
CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 6, vars: 2, consts: [[1, "document-filter-container"], [1, "form-group", "document-filter", 3, "formGroup"], ["type", "search", "id", "document-search", "name", "documentSearchFormControl", "formControlName", "documentSearchFormControl", "placeholder", "Search by document name", 1, "form-control", "document-search"], [1, "documents-title"], ["class", "document-tree", 4, "ngIf"], [1, "document-tree"], [4, "ngIf"], [3, "dataSource", "treeControl"], ["class", "document-tree-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], [1, "node"], ["mat-icon-button", "", "disabled", "", 1, "icon", "icon-document"], [1, "node-name", "node-name-document"], ["mat-icon-button", "", "cdkTreeNodeToggle", "", 1, "icon", "icon-folder"], [1, "document-count"], [1, "node-name", "node-name-folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7051
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
7052
|
+
i0.ɵɵelementStart(1, "div", 1);
|
|
7053
|
+
i0.ɵɵelement(2, "input", 2);
|
|
7054
|
+
i0.ɵɵelementEnd();
|
|
7055
|
+
i0.ɵɵelementStart(3, "div", 3);
|
|
7056
|
+
i0.ɵɵtext(4, "Documents");
|
|
7057
|
+
i0.ɵɵelementEnd();
|
|
7058
|
+
i0.ɵɵelementEnd();
|
|
7059
|
+
i0.ɵɵtemplate(5, CaseFileViewFolderComponent_div_5_Template, 5, 4, "div", 4);
|
|
7060
|
+
} if (rf & 2) {
|
|
7061
|
+
i0.ɵɵadvance(1);
|
|
7062
|
+
i0.ɵɵproperty("formGroup", ctx.documentFilterFormGroup);
|
|
7063
|
+
i0.ɵɵadvance(4);
|
|
7064
|
+
i0.ɵɵproperty("ngIf", ctx.documentTreeData);
|
|
7065
|
+
} }, directives: [i1$3.NgControlStatusGroup, i1$3.FormGroupDirective, i1$3.DefaultValueAccessor, i1$3.NgControlStatus, i1$3.FormControlName, i1.NgIf, i3.CdkTree, i3.CdkTreeNodeDef, i3.CdkNestedTreeNode, i3.CdkTreeNodeToggle, i3.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%;padding:8px 8px 0;margin-bottom:10px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%] .document-search[_ngcontent-%COMP%]{background:url(/assets/images/icon-search-black.svg) no-repeat 100% #fff;background-position-x:calc(100% - 4px);padding-right:30px;width:100%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree[_ngcontent-%COMP%]{margin:4px}.document-tree[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.document-tree[_ngcontent-%COMP%] .node[_ngcontent-%COMP%]{display:flex;padding:4px}.document-tree[_ngcontent-%COMP%] .icon[_ngcontent-%COMP%]{width:36px;height:36px;background-size:100%;border:0;background-color:#faf8f8}.document-tree[_ngcontent-%COMP%] .icon-folder[_ngcontent-%COMP%]{background-image:url(/assets/images/folder.png)}.document-tree[_ngcontent-%COMP%] .icon-document[_ngcontent-%COMP%]{background-image:url(/assets/images/document.png)}.document-tree[_ngcontent-%COMP%] .node-name[_ngcontent-%COMP%]{margin-left:6px}.document-tree[_ngcontent-%COMP%] .node-name-document[_ngcontent-%COMP%], .document-tree[_ngcontent-%COMP%] .node-name-folder[_ngcontent-%COMP%]{margin-top:4px}.document-tree[_ngcontent-%COMP%] .document-count[_ngcontent-%COMP%]{color:#fff}"] });
|
|
7066
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
7067
|
+
type: Component,
|
|
7068
|
+
args: [{
|
|
7069
|
+
selector: 'ccd-case-file-view-folder',
|
|
7070
|
+
styleUrls: ['./case-file-view-folder.component.scss'],
|
|
7071
|
+
templateUrl: './case-file-view-folder.component.html'
|
|
7072
|
+
}]
|
|
7073
|
+
}], function () { return []; }, { categoriesAndDocuments: [{
|
|
7074
|
+
type: Input
|
|
7075
|
+
}] }); })();
|
|
7010
7076
|
|
|
7011
|
-
class
|
|
7012
|
-
constructor(
|
|
7013
|
-
this.
|
|
7014
|
-
this.
|
|
7077
|
+
class CaseFileViewFieldComponent {
|
|
7078
|
+
constructor(elementRef, route, caseFileViewService) {
|
|
7079
|
+
this.elementRef = elementRef;
|
|
7080
|
+
this.route = route;
|
|
7081
|
+
this.caseFileViewService = caseFileViewService;
|
|
7015
7082
|
}
|
|
7016
|
-
|
|
7017
|
-
const
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
|
|
7023
|
-
|
|
7024
|
-
|
|
7083
|
+
ngOnInit() {
|
|
7084
|
+
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
7085
|
+
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(cid);
|
|
7086
|
+
}
|
|
7087
|
+
ngAfterViewInit() {
|
|
7088
|
+
const slider = this.elementRef.nativeElement.querySelector('.slider');
|
|
7089
|
+
const documentTreeContainer = this.elementRef.nativeElement.querySelector('.document-tree-container');
|
|
7090
|
+
const mousedown$ = fromEvent(slider, 'mousedown');
|
|
7091
|
+
const mousemove$ = fromEvent(document, 'mousemove');
|
|
7092
|
+
const mouseup$ = fromEvent(document, 'mouseup');
|
|
7093
|
+
const drag$ = mousedown$.pipe(switchMap((start) => {
|
|
7094
|
+
const x = start.clientX;
|
|
7095
|
+
const documentTreeContainerWidth = documentTreeContainer.getBoundingClientRect().width;
|
|
7096
|
+
return mousemove$.pipe(map(move => {
|
|
7097
|
+
move.preventDefault();
|
|
7098
|
+
return {
|
|
7099
|
+
dx: move.clientX - x,
|
|
7100
|
+
documentTreeContainerWidth
|
|
7101
|
+
};
|
|
7102
|
+
}), takeUntil(mouseup$));
|
|
7103
|
+
}));
|
|
7104
|
+
drag$.subscribe(pos => {
|
|
7105
|
+
const calculatedWidth = ((pos.documentTreeContainerWidth + pos.dx) * 100) / slider.parentElement.getBoundingClientRect().width;
|
|
7106
|
+
documentTreeContainer.setAttribute('style', `width: ${calculatedWidth}%`);
|
|
7107
|
+
});
|
|
7025
7108
|
}
|
|
7026
7109
|
}
|
|
7027
|
-
|
|
7028
|
-
|
|
7029
|
-
|
|
7030
|
-
|
|
7031
|
-
(
|
|
7032
|
-
|
|
7033
|
-
|
|
7110
|
+
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
7111
|
+
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService)); };
|
|
7112
|
+
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 8, vars: 1, consts: [[1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [3, "categoriesAndDocuments"], [1, "slider"], [1, "media-viewer-container"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7113
|
+
i0.ɵɵelementStart(0, "h2", 0);
|
|
7114
|
+
i0.ɵɵtext(1, "Case file");
|
|
7115
|
+
i0.ɵɵelementEnd();
|
|
7116
|
+
i0.ɵɵelementStart(2, "div", 1);
|
|
7117
|
+
i0.ɵɵelementStart(3, "div", 2);
|
|
7118
|
+
i0.ɵɵelement(4, "ccd-case-file-view-folder", 3);
|
|
7119
|
+
i0.ɵɵelementEnd();
|
|
7120
|
+
i0.ɵɵelement(5, "div", 4);
|
|
7121
|
+
i0.ɵɵelementStart(6, "div", 5);
|
|
7122
|
+
i0.ɵɵtext(7, " Media viewer ");
|
|
7123
|
+
i0.ɵɵelementEnd();
|
|
7124
|
+
i0.ɵɵelementEnd();
|
|
7125
|
+
} if (rf & 2) {
|
|
7126
|
+
i0.ɵɵadvance(4);
|
|
7127
|
+
i0.ɵɵproperty("categoriesAndDocuments", ctx.categoriesAndDocuments$);
|
|
7128
|
+
} }, directives: [CaseFileViewFolderComponent], styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{flex:1 1 0%}"] });
|
|
7129
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
|
|
7130
|
+
type: Component,
|
|
7131
|
+
args: [{
|
|
7132
|
+
selector: 'ccd-case-file-view-field',
|
|
7133
|
+
templateUrl: './case-file-view-field.component.html',
|
|
7134
|
+
styleUrls: ['./case-file-view-field.component.scss']
|
|
7135
|
+
}]
|
|
7136
|
+
}], function () { return [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }]; }, null); })();
|
|
7034
7137
|
|
|
7035
|
-
|
|
7138
|
+
var PaletteContext;
|
|
7139
|
+
(function (PaletteContext) {
|
|
7140
|
+
PaletteContext["DEFAULT"] = "DEFAULT";
|
|
7141
|
+
PaletteContext["CHECK_YOUR_ANSWER"] = "CHECK_YOUR_ANSWER";
|
|
7142
|
+
PaletteContext["TABLE_VIEW"] = "TABLE_VIEW";
|
|
7143
|
+
})(PaletteContext || (PaletteContext = {}));
|
|
7144
|
+
|
|
7145
|
+
class AbstractFieldReadComponent extends AbstractFormFieldComponent {
|
|
7036
7146
|
constructor() {
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
this.
|
|
7147
|
+
super(...arguments);
|
|
7148
|
+
/**
|
|
7149
|
+
* Optional. Enable context-aware rendering of fields.
|
|
7150
|
+
*/
|
|
7151
|
+
this.context = PaletteContext.DEFAULT;
|
|
7042
7152
|
}
|
|
7043
|
-
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7153
|
+
ngOnInit() {
|
|
7154
|
+
if (!this.caseField.metadata) {
|
|
7155
|
+
this.registerControl(new FormControl(this.caseField.value));
|
|
7156
|
+
}
|
|
7157
|
+
}
|
|
7158
|
+
}
|
|
7159
|
+
AbstractFieldReadComponent.ɵfac = function AbstractFieldReadComponent_Factory(t) { return ɵAbstractFieldReadComponent_BaseFactory(t || AbstractFieldReadComponent); };
|
|
7160
|
+
AbstractFieldReadComponent.ɵdir = i0.ɵɵdefineDirective({ type: AbstractFieldReadComponent, inputs: { caseReference: "caseReference", topLevelFormGroup: "topLevelFormGroup", context: "context" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
7161
|
+
const ɵAbstractFieldReadComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(AbstractFieldReadComponent);
|
|
7162
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AbstractFieldReadComponent, [{
|
|
7163
|
+
type: Directive
|
|
7164
|
+
}], null, { caseReference: [{
|
|
7165
|
+
type: Input
|
|
7166
|
+
}], topLevelFormGroup: [{
|
|
7167
|
+
type: Input
|
|
7168
|
+
}], context: [{
|
|
7169
|
+
type: Input
|
|
7170
|
+
}] }); })();
|
|
7171
|
+
|
|
7172
|
+
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
7173
|
+
i0.ɵɵelementStart(0, "a", 1);
|
|
7174
|
+
i0.ɵɵelementStart(1, "span", 2);
|
|
7175
|
+
i0.ɵɵtext(2);
|
|
7176
|
+
i0.ɵɵpipe(3, "ccdCaseReference");
|
|
7177
|
+
i0.ɵɵelementEnd();
|
|
7178
|
+
i0.ɵɵelementEnd();
|
|
7179
|
+
} if (rf & 2) {
|
|
7180
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
7181
|
+
i0.ɵɵpropertyInterpolate1("href", "/v2/case/", ctx_r0.caseField.value.CaseReference, "", i0.ɵɵsanitizeUrl);
|
|
7182
|
+
i0.ɵɵadvance(2);
|
|
7183
|
+
i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
|
|
7184
|
+
} }
|
|
7185
|
+
class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
7186
|
+
hasReference() {
|
|
7187
|
+
return this.caseField.value && this.caseField.value.CaseReference;
|
|
7188
|
+
}
|
|
7189
|
+
}
|
|
7190
|
+
ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
|
|
7191
|
+
ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7192
|
+
i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
|
|
7193
|
+
} if (rf & 2) {
|
|
7194
|
+
i0.ɵɵproperty("ngIf", ctx.hasReference());
|
|
7195
|
+
} }, directives: [i1.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
7196
|
+
const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
|
|
7197
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
|
|
7198
|
+
type: Component,
|
|
7199
|
+
args: [{
|
|
7200
|
+
selector: 'ccd-read-case-link-field',
|
|
7201
|
+
templateUrl: 'read-case-link-field.html'
|
|
7202
|
+
}]
|
|
7048
7203
|
}], null, null); })();
|
|
7049
7204
|
|
|
7050
|
-
class
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
*
|
|
7055
|
-
* @param value The value to be assessed.
|
|
7056
|
-
*/
|
|
7057
|
-
static includeParam(value) {
|
|
7058
|
-
if (value) {
|
|
7059
|
-
if (typeof (value) === 'string') {
|
|
7060
|
-
return value.trim().length > 0;
|
|
7061
|
-
}
|
|
7062
|
-
return true;
|
|
7205
|
+
class FirstErrorPipe {
|
|
7206
|
+
transform(value, args) {
|
|
7207
|
+
if (!value) {
|
|
7208
|
+
return '';
|
|
7063
7209
|
}
|
|
7064
|
-
|
|
7065
|
-
|
|
7066
|
-
buildOptions(metaCriteria, caseCriteria, view) {
|
|
7067
|
-
// TODO: This should probably be the now built-in URLSearchParams but it
|
|
7068
|
-
// requires a bigger refactor and there are bigger fish to fry right now.
|
|
7069
|
-
let params = new HttpParams();
|
|
7070
|
-
if (view) {
|
|
7071
|
-
params = params.set('view', view);
|
|
7210
|
+
if (!args) {
|
|
7211
|
+
args = 'Field';
|
|
7072
7212
|
}
|
|
7073
|
-
|
|
7074
|
-
|
|
7075
|
-
|
|
7076
|
-
// This was already handled by the old URLSearchParams mechanism.
|
|
7077
|
-
if (RequestOptionsBuilder.includeParam(metaCriteria[criterion])) {
|
|
7078
|
-
params = params.set(criterion, metaCriteria[criterion]);
|
|
7079
|
-
}
|
|
7080
|
-
}
|
|
7213
|
+
const keys = Object.keys(value);
|
|
7214
|
+
if (!keys.length) {
|
|
7215
|
+
return '';
|
|
7081
7216
|
}
|
|
7082
|
-
if (
|
|
7083
|
-
|
|
7084
|
-
if (RequestOptionsBuilder.includeParam(caseCriteria[criterion])) {
|
|
7085
|
-
const key = RequestOptionsBuilder.FIELD_PREFIX + criterion;
|
|
7086
|
-
const value = caseCriteria[criterion].trim ? caseCriteria[criterion].trim() : caseCriteria[criterion];
|
|
7087
|
-
params = params.set(key, value.replace(/’/i, `'`));
|
|
7088
|
-
}
|
|
7089
|
-
}
|
|
7217
|
+
if (keys[0] === 'required') {
|
|
7218
|
+
return `${args} is required`;
|
|
7090
7219
|
}
|
|
7091
|
-
|
|
7092
|
-
|
|
7220
|
+
else if (keys[0] === 'pattern') {
|
|
7221
|
+
return `The data entered is not valid for ${args}`;
|
|
7222
|
+
}
|
|
7223
|
+
else if (keys[0] === 'minlength') {
|
|
7224
|
+
return `${args} is below the minimum length`;
|
|
7225
|
+
}
|
|
7226
|
+
else if (keys[0] === 'maxlength') {
|
|
7227
|
+
return `${args} exceeds the maximum length`;
|
|
7228
|
+
}
|
|
7229
|
+
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
7230
|
+
return 'The date entered is not valid. Please provide a valid date';
|
|
7231
|
+
}
|
|
7232
|
+
return value[keys[0]];
|
|
7093
7233
|
}
|
|
7094
7234
|
}
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
|
|
7235
|
+
FirstErrorPipe.ɵfac = function FirstErrorPipe_Factory(t) { return new (t || FirstErrorPipe)(); };
|
|
7236
|
+
FirstErrorPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: true });
|
|
7237
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
7238
|
+
type: Pipe,
|
|
7239
|
+
args: [{
|
|
7240
|
+
name: 'ccdFirstError'
|
|
7241
|
+
}]
|
|
7100
7242
|
}], null, null); })();
|
|
7101
7243
|
|
|
7102
|
-
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7110
|
-
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
|
|
7117
|
-
|
|
7118
|
-
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7124
|
-
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
|
|
7130
|
-
|
|
7244
|
+
const _c0$F = ["writeComplexFieldComponent"];
|
|
7245
|
+
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
7246
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
7247
|
+
i0.ɵɵtext(1);
|
|
7248
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
7249
|
+
i0.ɵɵelementEnd();
|
|
7250
|
+
} if (rf & 2) {
|
|
7251
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
7252
|
+
i0.ɵɵadvance(1);
|
|
7253
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
7254
|
+
} }
|
|
7255
|
+
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
7256
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
7257
|
+
i0.ɵɵtext(1);
|
|
7258
|
+
i0.ɵɵelementEnd();
|
|
7259
|
+
} if (rf & 2) {
|
|
7260
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
7261
|
+
i0.ɵɵadvance(1);
|
|
7262
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
7263
|
+
} }
|
|
7264
|
+
function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
7265
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
7266
|
+
i0.ɵɵtext(1);
|
|
7267
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
7268
|
+
i0.ɵɵelementEnd();
|
|
7269
|
+
} if (rf & 2) {
|
|
7270
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
7271
|
+
i0.ɵɵadvance(1);
|
|
7272
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
|
|
7273
|
+
} }
|
|
7274
|
+
const _c1$g = function (a0) { return { "form-group-error": a0 }; };
|
|
7275
|
+
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
7276
|
+
ngOnInit() {
|
|
7277
|
+
if (this.caseField.value) {
|
|
7278
|
+
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
7279
|
+
CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
|
|
7280
|
+
}), true);
|
|
7281
|
+
}
|
|
7282
|
+
else {
|
|
7283
|
+
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
7284
|
+
CaseReference: new FormControl(null, Validators.required),
|
|
7285
|
+
}), true);
|
|
7286
|
+
}
|
|
7287
|
+
this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
|
|
7288
|
+
this.caseReferenceControl.setValidators(this.caseReferenceValidator());
|
|
7289
|
+
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
|
|
7290
|
+
// field uses the Complex type, it is meant to be treated as one field
|
|
7291
|
+
if (this.caseField && this.caseField.field_type.type === 'Complex') {
|
|
7292
|
+
for (const caseLinkSubField of this.caseField.field_type.complex_fields) {
|
|
7293
|
+
caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
|
|
7294
|
+
}
|
|
7295
|
+
}
|
|
7131
7296
|
}
|
|
7132
|
-
|
|
7133
|
-
|
|
7297
|
+
validCaseReference(valueString) {
|
|
7298
|
+
if (!valueString) {
|
|
7299
|
+
return false;
|
|
7300
|
+
}
|
|
7301
|
+
return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
|
|
7134
7302
|
}
|
|
7135
|
-
|
|
7136
|
-
|
|
7137
|
-
|
|
7138
|
-
|
|
7139
|
-
|
|
7140
|
-
|
|
7141
|
-
|
|
7142
|
-
this.currentCaseType = caseTypeId;
|
|
7143
|
-
return this.httpService
|
|
7144
|
-
.get(url, { headers, observe: 'body' })
|
|
7145
|
-
.pipe(map(body => {
|
|
7146
|
-
const searchInputs = body.searchInputs;
|
|
7147
|
-
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
7148
|
-
searchInputs.forEach(item => {
|
|
7149
|
-
item.field.label = item.label;
|
|
7150
|
-
item.field.display_context_parameter = item.display_context_parameter;
|
|
7151
|
-
});
|
|
7303
|
+
caseReferenceValidator() {
|
|
7304
|
+
return (control) => {
|
|
7305
|
+
if (control.value) {
|
|
7306
|
+
if (this.validCaseReference(control.value)) {
|
|
7307
|
+
return null;
|
|
7308
|
+
}
|
|
7309
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
7152
7310
|
}
|
|
7153
7311
|
else {
|
|
7154
|
-
|
|
7312
|
+
if (control.touched) {
|
|
7313
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
7314
|
+
}
|
|
7155
7315
|
}
|
|
7156
|
-
return
|
|
7157
|
-
}
|
|
7158
|
-
}
|
|
7159
|
-
isDataValid(jurisdictionId, caseTypeId) {
|
|
7160
|
-
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
7316
|
+
return null;
|
|
7317
|
+
};
|
|
7161
7318
|
}
|
|
7162
7319
|
}
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
|
|
7170
|
-
|
|
7171
|
-
|
|
7320
|
+
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
|
|
7321
|
+
WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
7322
|
+
i0.ɵɵviewQuery(_c0$F, 1);
|
|
7323
|
+
} if (rf & 2) {
|
|
7324
|
+
let _t;
|
|
7325
|
+
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
7326
|
+
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7327
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
7328
|
+
i0.ɵɵelementStart(1, "label", 1);
|
|
7329
|
+
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
7330
|
+
i0.ɵɵelementEnd();
|
|
7331
|
+
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
7332
|
+
i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
7333
|
+
i0.ɵɵelement(5, "input", 5);
|
|
7334
|
+
i0.ɵɵelementEnd();
|
|
7335
|
+
} if (rf & 2) {
|
|
7336
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$g, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
7337
|
+
i0.ɵɵadvance(1);
|
|
7338
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
7339
|
+
i0.ɵɵadvance(1);
|
|
7340
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
7341
|
+
i0.ɵɵadvance(1);
|
|
7342
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
7343
|
+
i0.ɵɵadvance(1);
|
|
7344
|
+
i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
|
|
7345
|
+
i0.ɵɵadvance(1);
|
|
7346
|
+
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
|
|
7347
|
+
} }, directives: [i1.NgClass, i1.NgIf, i1$3.DefaultValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
7348
|
+
const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
|
|
7349
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
|
|
7350
|
+
type: Component,
|
|
7351
|
+
args: [{
|
|
7352
|
+
selector: 'ccd-write-case-link-field',
|
|
7353
|
+
templateUrl: 'write-case-link-field.html'
|
|
7354
|
+
}]
|
|
7355
|
+
}], null, { writeComplexFieldComponent: [{
|
|
7356
|
+
type: ViewChild,
|
|
7357
|
+
args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
|
|
7358
|
+
}] }); })();
|
|
7172
7359
|
|
|
7173
|
-
|
|
7174
|
-
|
|
7175
|
-
|
|
7176
|
-
|
|
7177
|
-
|
|
7178
|
-
|
|
7179
|
-
|
|
7180
|
-
|
|
7181
|
-
|
|
7182
|
-
|
|
7360
|
+
const _c0$E = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
|
|
7361
|
+
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
|
|
7362
|
+
i0.ɵɵelementStart(0, "tbody");
|
|
7363
|
+
i0.ɵɵelementStart(1, "tr");
|
|
7364
|
+
i0.ɵɵelement(2, "th", 4);
|
|
7365
|
+
i0.ɵɵelementStart(3, "td");
|
|
7366
|
+
i0.ɵɵelement(4, "ccd-field-read", 5);
|
|
7367
|
+
i0.ɵɵelementEnd();
|
|
7368
|
+
i0.ɵɵelementEnd();
|
|
7369
|
+
i0.ɵɵelementEnd();
|
|
7370
|
+
} if (rf & 2) {
|
|
7371
|
+
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
7372
|
+
i0.ɵɵadvance(4);
|
|
7373
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$E, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
|
|
7374
|
+
} }
|
|
7375
|
+
const _c1$f = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
7376
|
+
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
7377
|
+
i0.ɵɵelementStart(0, "tr");
|
|
7378
|
+
i0.ɵɵelementStart(1, "td");
|
|
7379
|
+
i0.ɵɵelement(2, "ccd-field-read", 7);
|
|
7380
|
+
i0.ɵɵelementEnd();
|
|
7381
|
+
i0.ɵɵelementEnd();
|
|
7382
|
+
} if (rf & 2) {
|
|
7383
|
+
const item_r4 = ctx.$implicit;
|
|
7384
|
+
const i_r5 = ctx.index;
|
|
7385
|
+
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
7386
|
+
i0.ɵɵadvance(2);
|
|
7387
|
+
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$f, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
|
|
7388
|
+
} }
|
|
7389
|
+
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
|
|
7390
|
+
i0.ɵɵelementStart(0, "tbody");
|
|
7391
|
+
i0.ɵɵtemplate(1, ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template, 3, 10, "tr", 6);
|
|
7392
|
+
i0.ɵɵelementEnd();
|
|
7393
|
+
} if (rf & 2) {
|
|
7394
|
+
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
7395
|
+
i0.ɵɵadvance(1);
|
|
7396
|
+
i0.ɵɵproperty("ngForOf", ctx_r2.caseField.value);
|
|
7397
|
+
} }
|
|
7398
|
+
function ReadCollectionFieldComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
7399
|
+
i0.ɵɵelementStart(0, "table", 1);
|
|
7400
|
+
i0.ɵɵelementContainerStart(1, 2);
|
|
7401
|
+
i0.ɵɵtemplate(2, ReadCollectionFieldComponent_table_0_tbody_2_Template, 5, 10, "tbody", 3);
|
|
7402
|
+
i0.ɵɵtemplate(3, ReadCollectionFieldComponent_table_0_tbody_3_Template, 2, 1, "tbody", 3);
|
|
7403
|
+
i0.ɵɵelementContainerEnd();
|
|
7404
|
+
i0.ɵɵelementEnd();
|
|
7405
|
+
} if (rf & 2) {
|
|
7406
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
7407
|
+
i0.ɵɵadvance(1);
|
|
7408
|
+
i0.ɵɵproperty("ngSwitch", ctx_r0.isDisplayContextParameterAvailable);
|
|
7409
|
+
i0.ɵɵadvance(1);
|
|
7410
|
+
i0.ɵɵproperty("ngSwitchCase", true);
|
|
7411
|
+
i0.ɵɵadvance(1);
|
|
7412
|
+
i0.ɵɵproperty("ngSwitchCase", false);
|
|
7413
|
+
} }
|
|
7414
|
+
class ReadCollectionFieldComponent extends AbstractFieldReadComponent {
|
|
7415
|
+
constructor() {
|
|
7416
|
+
super(...arguments);
|
|
7417
|
+
this.isDisplayContextParameterAvailable = false;
|
|
7418
|
+
}
|
|
7419
|
+
ngOnInit() {
|
|
7420
|
+
if (this.caseField.display_context_parameter && this.caseField.display_context_parameter.trim().startsWith('#TABLE(')) {
|
|
7421
|
+
this.isDisplayContextParameterAvailable = true;
|
|
7422
|
+
}
|
|
7423
|
+
}
|
|
7424
|
+
buildIdPrefix(index) {
|
|
7425
|
+
const prefix = `${this.idPrefix}${this.caseField.id}_`;
|
|
7426
|
+
if (this.caseField.field_type.collection_field_type.type === 'Complex') {
|
|
7427
|
+
return `${prefix}${index}_`;
|
|
7428
|
+
}
|
|
7429
|
+
return prefix;
|
|
7183
7430
|
}
|
|
7184
7431
|
}
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
(
|
|
7188
|
-
|
|
7432
|
+
ReadCollectionFieldComponent.ɵfac = function ReadCollectionFieldComponent_Factory(t) { return ɵReadCollectionFieldComponent_BaseFactory(t || ReadCollectionFieldComponent); };
|
|
7433
|
+
ReadCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCollectionFieldComponent, selectors: [["ccd-read-collection-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "collection-field-table", "aria-describedby", "collection table", 4, "ngIf"], ["aria-describedby", "collection table", 1, "collection-field-table"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["id", "hiddenHeader", 2, "display", "none"], [3, "caseField", "context", "topLevelFormGroup"], [4, "ngFor", "ngForOf"], [3, "caseField", "context", "topLevelFormGroup", "idPrefix"]], template: function ReadCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7434
|
+
i0.ɵɵtemplate(0, ReadCollectionFieldComponent_table_0_Template, 4, 3, "table", 0);
|
|
7435
|
+
} if (rf & 2) {
|
|
7436
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.value && ctx.caseField.value.length);
|
|
7437
|
+
} }, styles: [".collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;padding:5px 5px 2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.collection-indicator[_ngcontent-%COMP%]{border-left:5px solid #b1b4b6}"] });
|
|
7438
|
+
const ɵReadCollectionFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCollectionFieldComponent);
|
|
7439
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCollectionFieldComponent, [{
|
|
7440
|
+
type: Component,
|
|
7441
|
+
args: [{
|
|
7442
|
+
selector: 'ccd-read-collection-field',
|
|
7443
|
+
templateUrl: './read-collection-field.html',
|
|
7444
|
+
styleUrls: ['./collection-field.scss']
|
|
7445
|
+
}]
|
|
7189
7446
|
}], null, null); })();
|
|
7190
7447
|
|
|
7191
|
-
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
}
|
|
7195
|
-
setLocalStorage(key, value) {
|
|
7196
|
-
window.localStorage.setItem(key, value);
|
|
7197
|
-
}
|
|
7198
|
-
getLocalStorage(key) {
|
|
7199
|
-
return window.localStorage.getItem(key);
|
|
7200
|
-
}
|
|
7201
|
-
clearLocalStorage() {
|
|
7202
|
-
window.localStorage.clear();
|
|
7203
|
-
}
|
|
7204
|
-
removeLocalStorage(key) {
|
|
7205
|
-
window.localStorage.removeItem(key);
|
|
7448
|
+
function hasRoles(profile) {
|
|
7449
|
+
if (profile.user && profile.user.idam && Array.isArray(profile.user.idam.roles)) {
|
|
7450
|
+
return profile.user.idam.roles.length > 0;
|
|
7206
7451
|
}
|
|
7207
|
-
|
|
7208
|
-
|
|
7452
|
+
return false;
|
|
7453
|
+
}
|
|
7454
|
+
// @dynamic
|
|
7455
|
+
class Profile {
|
|
7456
|
+
isSolicitor() {
|
|
7457
|
+
if (hasRoles(this)) {
|
|
7458
|
+
return this.user.idam.roles.find(r => r.endsWith('-solicitor')) !== undefined;
|
|
7459
|
+
}
|
|
7460
|
+
return false;
|
|
7209
7461
|
}
|
|
7210
|
-
|
|
7211
|
-
|
|
7462
|
+
isCourtAdmin() {
|
|
7463
|
+
if (hasRoles(this)) {
|
|
7464
|
+
return this.user.idam.roles.find(r => r.endsWith('-courtadmin')) !== undefined;
|
|
7465
|
+
}
|
|
7466
|
+
return false;
|
|
7212
7467
|
}
|
|
7213
|
-
|
|
7214
|
-
|
|
7468
|
+
}
|
|
7469
|
+
__decorate([
|
|
7470
|
+
Type(() => Jurisdiction),
|
|
7471
|
+
__metadata("design:type", Array)
|
|
7472
|
+
], Profile.prototype, "jurisdictions", void 0);
|
|
7473
|
+
|
|
7474
|
+
class ProfileNotifier {
|
|
7475
|
+
constructor() {
|
|
7476
|
+
this.profileSource = new BehaviorSubject(new Profile());
|
|
7477
|
+
this.profile = this.profileSource.asObservable();
|
|
7215
7478
|
}
|
|
7216
|
-
|
|
7217
|
-
|
|
7479
|
+
announceProfile(profile) {
|
|
7480
|
+
this.profileSource.next(profile);
|
|
7218
7481
|
}
|
|
7219
7482
|
}
|
|
7220
|
-
|
|
7221
|
-
|
|
7222
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
7483
|
+
ProfileNotifier.ɵfac = function ProfileNotifier_Factory(t) { return new (t || ProfileNotifier)(); };
|
|
7484
|
+
ProfileNotifier.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileNotifier, factory: ProfileNotifier.ɵfac });
|
|
7485
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileNotifier, [{
|
|
7223
7486
|
type: Injectable
|
|
7224
7487
|
}], null, null); })();
|
|
7225
7488
|
|
|
7226
|
-
class
|
|
7227
|
-
constructor(
|
|
7228
|
-
this.
|
|
7229
|
-
this.appConfig = appConfig;
|
|
7230
|
-
}
|
|
7231
|
-
getWorkbasketInputUrl(caseTypeId) {
|
|
7232
|
-
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/work-basket-inputs`;
|
|
7489
|
+
class RemoveDialogComponent {
|
|
7490
|
+
constructor(matDialogRef) {
|
|
7491
|
+
this.matDialogRef = matDialogRef;
|
|
7233
7492
|
}
|
|
7234
|
-
|
|
7235
|
-
|
|
7236
|
-
|
|
7237
|
-
.set('experimental', 'true')
|
|
7238
|
-
.set('Accept', WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS)
|
|
7239
|
-
.set('Content-Type', 'application/json');
|
|
7240
|
-
this.currentJurisdiction = jurisdictionId;
|
|
7241
|
-
this.currentCaseType = caseTypeId;
|
|
7242
|
-
return this.httpService
|
|
7243
|
-
.get(url, { headers, observe: 'body' })
|
|
7244
|
-
.pipe(map(body => {
|
|
7245
|
-
const workbasketInputs = body.workbasketInputs;
|
|
7246
|
-
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
7247
|
-
workbasketInputs.forEach(item => {
|
|
7248
|
-
item.field.label = item.label;
|
|
7249
|
-
if (item.display_context_parameter) {
|
|
7250
|
-
item.field.display_context_parameter = item.display_context_parameter;
|
|
7251
|
-
}
|
|
7252
|
-
});
|
|
7253
|
-
}
|
|
7254
|
-
else {
|
|
7255
|
-
throw new Error('Response expired');
|
|
7256
|
-
}
|
|
7257
|
-
return workbasketInputs;
|
|
7258
|
-
}));
|
|
7493
|
+
remove() {
|
|
7494
|
+
this.result = 'Remove';
|
|
7495
|
+
this.matDialogRef.close(this.result);
|
|
7259
7496
|
}
|
|
7260
|
-
|
|
7261
|
-
|
|
7497
|
+
cancel() {
|
|
7498
|
+
this.result = 'Cancel';
|
|
7499
|
+
this.matDialogRef.close(this.result);
|
|
7262
7500
|
}
|
|
7263
7501
|
}
|
|
7264
|
-
|
|
7265
|
-
WorkbasketInputFilterService.ɵfac = function WorkbasketInputFilterService_Factory(t) { return new (t || WorkbasketInputFilterService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7266
|
-
WorkbasketInputFilterService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkbasketInputFilterService, factory: WorkbasketInputFilterService.ɵfac });
|
|
7267
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkbasketInputFilterService, [{
|
|
7268
|
-
type: Injectable
|
|
7269
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
7270
|
-
|
|
7271
|
-
class DefinitionsService {
|
|
7272
|
-
constructor(http, appConfig) {
|
|
7273
|
-
this.http = http;
|
|
7274
|
-
this.appConfig = appConfig;
|
|
7275
|
-
}
|
|
7276
|
-
getCaseTypes(jurisdictionId, access) {
|
|
7277
|
-
const url = this.appConfig.getApiUrl()
|
|
7278
|
-
+ `/caseworkers/:uid`
|
|
7279
|
-
+ `/jurisdictions/${jurisdictionId}`
|
|
7280
|
-
+ `/case-types?access=${access}`;
|
|
7281
|
-
return this.http
|
|
7282
|
-
.get(url).pipe(map(response => response));
|
|
7283
|
-
}
|
|
7284
|
-
getJurisdictions(access) {
|
|
7285
|
-
const url = this.appConfig.getApiUrl()
|
|
7286
|
-
+ `/caseworkers/:uid`
|
|
7287
|
-
+ `/jurisdictions?access=${access}`;
|
|
7288
|
-
return this.http
|
|
7289
|
-
.get(url)
|
|
7290
|
-
.pipe(map(response => response));
|
|
7291
|
-
}
|
|
7292
|
-
}
|
|
7293
|
-
DefinitionsService.ɵfac = function DefinitionsService_Factory(t) { return new (t || DefinitionsService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7294
|
-
DefinitionsService.ɵprov = i0.ɵɵdefineInjectable({ token: DefinitionsService, factory: DefinitionsService.ɵfac });
|
|
7295
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsService, [{
|
|
7296
|
-
type: Injectable
|
|
7297
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
7298
|
-
|
|
7299
|
-
class DefinitionsModule {
|
|
7300
|
-
}
|
|
7301
|
-
DefinitionsModule.ɵfac = function DefinitionsModule_Factory(t) { return new (t || DefinitionsModule)(); };
|
|
7302
|
-
DefinitionsModule.ɵmod = i0.ɵɵdefineNgModule({ type: DefinitionsModule });
|
|
7303
|
-
DefinitionsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
7304
|
-
DefinitionsService
|
|
7305
|
-
] });
|
|
7306
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsModule, [{
|
|
7307
|
-
type: NgModule,
|
|
7308
|
-
args: [{
|
|
7309
|
-
providers: [
|
|
7310
|
-
DefinitionsService
|
|
7311
|
-
]
|
|
7312
|
-
}]
|
|
7313
|
-
}], null, null); })();
|
|
7314
|
-
|
|
7315
|
-
class SearchResultViewItemComparatorFactory {
|
|
7316
|
-
createSearchResultViewItemComparator(column) {
|
|
7317
|
-
const fieldId = column.case_field_id;
|
|
7318
|
-
switch (column.case_field_type.type) {
|
|
7319
|
-
case ('MultiSelectList'): {
|
|
7320
|
-
return this.textArrayComparator(fieldId);
|
|
7321
|
-
}
|
|
7322
|
-
case ('Number'):
|
|
7323
|
-
case ('MoneyGBP'): {
|
|
7324
|
-
return this.numberComparator(fieldId);
|
|
7325
|
-
}
|
|
7326
|
-
case ('Text'):
|
|
7327
|
-
case ('TextArea'):
|
|
7328
|
-
case ('Email'):
|
|
7329
|
-
case ('Date'):
|
|
7330
|
-
case ('DateTime'):
|
|
7331
|
-
case ('Label'):
|
|
7332
|
-
case ('Postcode'):
|
|
7333
|
-
case ('YesOrNo'):
|
|
7334
|
-
case ('PhoneUK'):
|
|
7335
|
-
case ('FixedList'): {
|
|
7336
|
-
return this.stringComparator(fieldId);
|
|
7337
|
-
}
|
|
7338
|
-
default: {
|
|
7339
|
-
return undefined;
|
|
7340
|
-
}
|
|
7341
|
-
}
|
|
7342
|
-
}
|
|
7343
|
-
numberComparator(fieldId) {
|
|
7344
|
-
return {
|
|
7345
|
-
compare(a, b) {
|
|
7346
|
-
let fieldA = a.case_fields[fieldId];
|
|
7347
|
-
let fieldB = b.case_fields[fieldId];
|
|
7348
|
-
fieldA = isUndefined(fieldA) || fieldA === null ? 0 : fieldA;
|
|
7349
|
-
fieldB = isUndefined(fieldB) || fieldB === null ? 0 : fieldB;
|
|
7350
|
-
return fieldA - fieldB;
|
|
7351
|
-
}
|
|
7352
|
-
};
|
|
7353
|
-
}
|
|
7354
|
-
stringComparator(fieldId) {
|
|
7355
|
-
return {
|
|
7356
|
-
compare(a, b) {
|
|
7357
|
-
let fieldA = a.case_fields[fieldId];
|
|
7358
|
-
let fieldB = b.case_fields[fieldId];
|
|
7359
|
-
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
|
|
7360
|
-
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
|
|
7361
|
-
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
7362
|
-
}
|
|
7363
|
-
};
|
|
7364
|
-
}
|
|
7365
|
-
textArrayComparator(fieldId) {
|
|
7366
|
-
return {
|
|
7367
|
-
compare(a, b) {
|
|
7368
|
-
let fieldA = a.case_fields[fieldId];
|
|
7369
|
-
let fieldB = b.case_fields[fieldId];
|
|
7370
|
-
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
|
|
7371
|
-
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
|
|
7372
|
-
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
7373
|
-
}
|
|
7374
|
-
};
|
|
7375
|
-
}
|
|
7376
|
-
}
|
|
7377
|
-
SearchResultViewItemComparatorFactory.ɵfac = function SearchResultViewItemComparatorFactory_Factory(t) { return new (t || SearchResultViewItemComparatorFactory)(); };
|
|
7378
|
-
SearchResultViewItemComparatorFactory.ɵprov = i0.ɵɵdefineInjectable({ token: SearchResultViewItemComparatorFactory, factory: SearchResultViewItemComparatorFactory.ɵfac });
|
|
7379
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultViewItemComparatorFactory, [{
|
|
7380
|
-
type: Injectable
|
|
7381
|
-
}], null, null); })();
|
|
7382
|
-
|
|
7383
|
-
class OrganisationService {
|
|
7384
|
-
constructor(http, appconfig) {
|
|
7385
|
-
this.http = http;
|
|
7386
|
-
this.appconfig = appconfig;
|
|
7387
|
-
}
|
|
7388
|
-
static mapOrganisation(organisations) {
|
|
7389
|
-
const organisationsVm = new Array();
|
|
7390
|
-
organisations.forEach(org => {
|
|
7391
|
-
let contactInformation = null;
|
|
7392
|
-
if (org.contactInformation && org.contactInformation[0]) {
|
|
7393
|
-
contactInformation = org.contactInformation[0];
|
|
7394
|
-
}
|
|
7395
|
-
organisationsVm.push({
|
|
7396
|
-
organisationIdentifier: org.organisationIdentifier,
|
|
7397
|
-
name: org.name,
|
|
7398
|
-
addressLine1: contactInformation !== null ? contactInformation.addressLine1 : null,
|
|
7399
|
-
addressLine2: contactInformation !== null ? contactInformation.addressLine2 : null,
|
|
7400
|
-
addressLine3: contactInformation !== null ? contactInformation.addressLine3 : null,
|
|
7401
|
-
townCity: contactInformation !== null ? contactInformation.townCity : null,
|
|
7402
|
-
county: contactInformation !== null ? contactInformation.county : null,
|
|
7403
|
-
country: contactInformation !== null ? contactInformation.country : null,
|
|
7404
|
-
postCode: contactInformation !== null ? contactInformation.postCode : null,
|
|
7405
|
-
});
|
|
7406
|
-
});
|
|
7407
|
-
return organisationsVm;
|
|
7408
|
-
}
|
|
7409
|
-
getActiveOrganisations() {
|
|
7410
|
-
if (!this.organisations$) {
|
|
7411
|
-
const url = this.appconfig.getPrdUrl();
|
|
7412
|
-
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
7413
|
-
this.organisations$ = this.http.get(url)
|
|
7414
|
-
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
7415
|
-
console.log(e);
|
|
7416
|
-
// Handle error and return blank Observable array
|
|
7417
|
-
return of([]);
|
|
7418
|
-
}));
|
|
7419
|
-
timer(cacheTimeOut).subscribe(() => {
|
|
7420
|
-
this.organisations$ = null;
|
|
7421
|
-
});
|
|
7422
|
-
}
|
|
7423
|
-
return this.organisations$;
|
|
7424
|
-
}
|
|
7425
|
-
}
|
|
7426
|
-
OrganisationService.ɵfac = function OrganisationService_Factory(t) { return new (t || OrganisationService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(AbstractAppConfig)); };
|
|
7427
|
-
OrganisationService.ɵprov = i0.ɵɵdefineInjectable({ token: OrganisationService, factory: OrganisationService.ɵfac });
|
|
7428
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationService, [{
|
|
7429
|
-
type: Injectable
|
|
7430
|
-
}], function () { return [{ type: i1$2.HttpClient }, { type: AbstractAppConfig }]; }, null); })();
|
|
7431
|
-
|
|
7432
|
-
class BrowserService {
|
|
7433
|
-
isFirefox() {
|
|
7434
|
-
return window.navigator.userAgent.indexOf('Firefox') > -1;
|
|
7435
|
-
}
|
|
7436
|
-
isSafari() {
|
|
7437
|
-
const isSafariAgent = window.navigator.userAgent.indexOf('Safari') > -1;
|
|
7438
|
-
const isChromeAgent = window.navigator.userAgent.indexOf('Chrome') > -1;
|
|
7439
|
-
if ((isChromeAgent) && (isSafariAgent)) {
|
|
7440
|
-
return false;
|
|
7441
|
-
}
|
|
7442
|
-
return isSafariAgent;
|
|
7443
|
-
}
|
|
7444
|
-
isIEOrEdge() {
|
|
7445
|
-
return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
7446
|
-
}
|
|
7447
|
-
}
|
|
7448
|
-
BrowserService.ɵfac = function BrowserService_Factory(t) { return new (t || BrowserService)(); };
|
|
7449
|
-
BrowserService.ɵprov = i0.ɵɵdefineInjectable({ token: BrowserService, factory: BrowserService.ɵfac });
|
|
7450
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BrowserService, [{
|
|
7451
|
-
type: Injectable
|
|
7452
|
-
}], null, null); })();
|
|
7453
|
-
|
|
7454
|
-
class LoadingModule {
|
|
7455
|
-
}
|
|
7456
|
-
LoadingModule.ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
7457
|
-
LoadingModule.ɵmod = i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
7458
|
-
LoadingModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
7459
|
-
LoadingService
|
|
7460
|
-
], imports: [[]] });
|
|
7461
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
7462
|
-
type: NgModule,
|
|
7463
|
-
args: [{
|
|
7464
|
-
imports: [],
|
|
7465
|
-
declarations: [],
|
|
7466
|
-
exports: [],
|
|
7467
|
-
providers: [
|
|
7468
|
-
LoadingService
|
|
7469
|
-
]
|
|
7470
|
-
}]
|
|
7471
|
-
}], null, null); })();
|
|
7472
|
-
|
|
7473
|
-
class CaseFileViewCategory {
|
|
7474
|
-
}
|
|
7475
|
-
|
|
7476
|
-
class CaseFileViewDocument {
|
|
7477
|
-
}
|
|
7478
|
-
|
|
7479
|
-
/**
|
|
7480
|
-
* DTO to provide typing of the response from the CCD Data Store API for Categories and Documents data.
|
|
7481
|
-
* @see {@link https://tools.hmcts.net/confluence/x/0KSDX#CaseFileViewDocumentDataendpointLLD-SuccessResponsePayload} for full details
|
|
7482
|
-
*/
|
|
7483
|
-
class CategoriesAndDocuments {
|
|
7484
|
-
}
|
|
7485
|
-
|
|
7486
|
-
class DocumentTreeNode {
|
|
7487
|
-
get childDocumentCount() {
|
|
7488
|
-
const countChildren = (childNodes) => {
|
|
7489
|
-
let count = 0;
|
|
7490
|
-
if (childNodes === null || childNodes === void 0 ? void 0 : childNodes.length) {
|
|
7491
|
-
const documents = childNodes.filter(item => item.type === 'document');
|
|
7492
|
-
count += documents.length;
|
|
7493
|
-
childNodes.forEach((children) => {
|
|
7494
|
-
count += countChildren(children.children);
|
|
7495
|
-
});
|
|
7496
|
-
}
|
|
7497
|
-
return count;
|
|
7498
|
-
};
|
|
7499
|
-
return countChildren(this.children);
|
|
7500
|
-
}
|
|
7501
|
-
}
|
|
7502
|
-
__decorate([
|
|
7503
|
-
Type(() => DocumentTreeNode),
|
|
7504
|
-
__metadata("design:type", Array)
|
|
7505
|
-
], DocumentTreeNode.prototype, "children", void 0);
|
|
7506
|
-
__decorate([
|
|
7507
|
-
Expose(),
|
|
7508
|
-
__metadata("design:type", Object),
|
|
7509
|
-
__metadata("design:paramtypes", [])
|
|
7510
|
-
], DocumentTreeNode.prototype, "childDocumentCount", null);
|
|
7511
|
-
|
|
7512
|
-
function CaseFileViewFolderComponent_cdk_nested_tree_node_6_Template(rf, ctx) { if (rf & 1) {
|
|
7513
|
-
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
7514
|
-
i0.ɵɵelementStart(1, "div", 8);
|
|
7515
|
-
i0.ɵɵelementStart(2, "button", 9);
|
|
7516
|
-
i0.ɵɵelement(3, "img", 10);
|
|
7517
|
-
i0.ɵɵelementEnd();
|
|
7518
|
-
i0.ɵɵelementStart(4, "span", 11);
|
|
7519
|
-
i0.ɵɵtext(5);
|
|
7520
|
-
i0.ɵɵelementEnd();
|
|
7521
|
-
i0.ɵɵelementEnd();
|
|
7522
|
-
i0.ɵɵelementEnd();
|
|
7523
|
-
} if (rf & 2) {
|
|
7524
|
-
const node_r2 = ctx.$implicit;
|
|
7525
|
-
i0.ɵɵadvance(5);
|
|
7526
|
-
i0.ɵɵtextInterpolate(node_r2.name);
|
|
7527
|
-
} }
|
|
7528
|
-
function CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template(rf, ctx) { if (rf & 1) {
|
|
7529
|
-
i0.ɵɵelementStart(0, "cdk-nested-tree-node", 7);
|
|
7530
|
-
i0.ɵɵelementStart(1, "div", 12);
|
|
7531
|
-
i0.ɵɵelementStart(2, "button", 13);
|
|
7532
|
-
i0.ɵɵelement(3, "img", 14);
|
|
7533
|
-
i0.ɵɵelementStart(4, "span", 15);
|
|
7534
|
-
i0.ɵɵtext(5);
|
|
7535
|
-
i0.ɵɵelementEnd();
|
|
7536
|
-
i0.ɵɵelementEnd();
|
|
7537
|
-
i0.ɵɵelementStart(6, "span", 16);
|
|
7538
|
-
i0.ɵɵtext(7);
|
|
7539
|
-
i0.ɵɵelementEnd();
|
|
7540
|
-
i0.ɵɵelementEnd();
|
|
7541
|
-
i0.ɵɵelementStart(8, "div");
|
|
7542
|
-
i0.ɵɵelementContainer(9, 17);
|
|
7543
|
-
i0.ɵɵelementEnd();
|
|
7544
|
-
i0.ɵɵelementEnd();
|
|
7545
|
-
} if (rf & 2) {
|
|
7546
|
-
const node_r3 = ctx.$implicit;
|
|
7547
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
7548
|
-
i0.ɵɵadvance(2);
|
|
7549
|
-
i0.ɵɵattribute("aria-label", "toggle " + node_r3.name);
|
|
7550
|
-
i0.ɵɵadvance(3);
|
|
7551
|
-
i0.ɵɵtextInterpolate(node_r3.childDocumentCount);
|
|
7552
|
-
i0.ɵɵadvance(2);
|
|
7553
|
-
i0.ɵɵtextInterpolate(node_r3.name);
|
|
7554
|
-
i0.ɵɵadvance(1);
|
|
7555
|
-
i0.ɵɵclassProp("document-tree-invisible", !ctx_r1.nestedTreeControl.isExpanded(node_r3));
|
|
7556
|
-
} }
|
|
7557
|
-
class CaseFileViewFolderComponent {
|
|
7558
|
-
constructor() {
|
|
7559
|
-
this.categories = [];
|
|
7560
|
-
this.getChildren = (node) => of(node.children);
|
|
7561
|
-
this.nestedChildren = (_, nodeData) => nodeData.children;
|
|
7562
|
-
this.nestedTreeControl = new NestedTreeControl(this.getChildren);
|
|
7563
|
-
}
|
|
7564
|
-
ngOnInit() {
|
|
7565
|
-
this.categoriesAndDocumentsSubscription = this.categoriesAndDocuments.subscribe(categoriesAndDocuments => {
|
|
7566
|
-
// Using the mock data for now as we have to display the documents as well for demo purpose
|
|
7567
|
-
const categories = this.loadCategories(); // categoriesAndDocuments.categories;
|
|
7568
|
-
// Generate document tree data from categories
|
|
7569
|
-
const treeData = this.generateTreeData(categories);
|
|
7570
|
-
// Append uncategorised documents
|
|
7571
|
-
if (categoriesAndDocuments.uncategorised_documents && categoriesAndDocuments.uncategorised_documents.length > 0) {
|
|
7572
|
-
const uncategorisedDocuments = this.getUncategorisedDocuments(categoriesAndDocuments.uncategorised_documents);
|
|
7573
|
-
treeData.push(uncategorisedDocuments);
|
|
7574
|
-
}
|
|
7575
|
-
// Initialise cdk tree with generated data
|
|
7576
|
-
this.nestedDataSource = treeData;
|
|
7577
|
-
});
|
|
7578
|
-
}
|
|
7579
|
-
generateTreeData(categories) {
|
|
7580
|
-
return categories.reduce((tree, node) => {
|
|
7581
|
-
const newDocumentTreeNode = new DocumentTreeNode();
|
|
7582
|
-
newDocumentTreeNode.name = node.category_name;
|
|
7583
|
-
newDocumentTreeNode.type = 'category';
|
|
7584
|
-
newDocumentTreeNode.children = [...this.generateTreeData(node.sub_categories), ...this.getDocuments(node.documents)];
|
|
7585
|
-
return [
|
|
7586
|
-
...tree,
|
|
7587
|
-
newDocumentTreeNode,
|
|
7588
|
-
];
|
|
7589
|
-
}, []);
|
|
7590
|
-
}
|
|
7591
|
-
getDocuments(documents) {
|
|
7592
|
-
const documentsToReturn = [];
|
|
7593
|
-
documents.forEach(document => {
|
|
7594
|
-
const documentTreeNode = new DocumentTreeNode();
|
|
7595
|
-
documentTreeNode.name = document.document_filename;
|
|
7596
|
-
documentTreeNode.type = 'document';
|
|
7597
|
-
documentsToReturn.push(documentTreeNode);
|
|
7598
|
-
});
|
|
7599
|
-
return documentsToReturn;
|
|
7600
|
-
}
|
|
7601
|
-
getUncategorisedDocuments(uncategorisedDocuments) {
|
|
7602
|
-
const documents = [];
|
|
7603
|
-
uncategorisedDocuments.forEach(document => {
|
|
7604
|
-
const documentTreeNode = new DocumentTreeNode();
|
|
7605
|
-
documentTreeNode.name = document.document_filename;
|
|
7606
|
-
documentTreeNode.type = 'document';
|
|
7607
|
-
documents.push(documentTreeNode);
|
|
7608
|
-
});
|
|
7609
|
-
const uncategorisedNode = new DocumentTreeNode();
|
|
7610
|
-
uncategorisedNode.name = CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE;
|
|
7611
|
-
uncategorisedNode.type = 'category';
|
|
7612
|
-
uncategorisedNode.children = documents;
|
|
7613
|
-
return uncategorisedNode;
|
|
7614
|
-
}
|
|
7615
|
-
ngOnDestroy() {
|
|
7616
|
-
if (this.categoriesAndDocumentsSubscription) {
|
|
7617
|
-
this.categoriesAndDocumentsSubscription.unsubscribe();
|
|
7618
|
-
}
|
|
7619
|
-
}
|
|
7620
|
-
loadCategories() {
|
|
7621
|
-
return [
|
|
7622
|
-
{
|
|
7623
|
-
category_id: 'Beers',
|
|
7624
|
-
category_name: 'Beers',
|
|
7625
|
-
category_order: 1,
|
|
7626
|
-
documents: [
|
|
7627
|
-
{
|
|
7628
|
-
document_url: '/test',
|
|
7629
|
-
document_filename: 'Beers encyclopedia',
|
|
7630
|
-
document_binary_url: '/test/binary',
|
|
7631
|
-
attribute_path: '',
|
|
7632
|
-
upload_timestamp: ''
|
|
7633
|
-
}
|
|
7634
|
-
],
|
|
7635
|
-
sub_categories: [
|
|
7636
|
-
{
|
|
7637
|
-
category_id: 'BeersBitters',
|
|
7638
|
-
category_name: 'Bitters',
|
|
7639
|
-
category_order: 1,
|
|
7640
|
-
documents: [],
|
|
7641
|
-
sub_categories: []
|
|
7642
|
-
},
|
|
7643
|
-
{
|
|
7644
|
-
category_id: 'BeersAmerican',
|
|
7645
|
-
category_name: 'American',
|
|
7646
|
-
category_order: 2,
|
|
7647
|
-
documents: [],
|
|
7648
|
-
sub_categories: []
|
|
7649
|
-
},
|
|
7650
|
-
{
|
|
7651
|
-
category_id: 'BeersAsian',
|
|
7652
|
-
category_name: 'Asian',
|
|
7653
|
-
category_order: 3,
|
|
7654
|
-
documents: [],
|
|
7655
|
-
sub_categories: []
|
|
7656
|
-
}
|
|
7657
|
-
]
|
|
7658
|
-
},
|
|
7659
|
-
{
|
|
7660
|
-
category_id: 'Wines',
|
|
7661
|
-
category_name: 'Wines',
|
|
7662
|
-
category_order: 2,
|
|
7663
|
-
documents: [],
|
|
7664
|
-
sub_categories: [
|
|
7665
|
-
{
|
|
7666
|
-
category_id: 'WinesFrench',
|
|
7667
|
-
category_name: 'French',
|
|
7668
|
-
category_order: 1,
|
|
7669
|
-
documents: [],
|
|
7670
|
-
sub_categories: []
|
|
7671
|
-
},
|
|
7672
|
-
{
|
|
7673
|
-
category_id: 'WinesItalian',
|
|
7674
|
-
category_name: 'Italian',
|
|
7675
|
-
category_order: 2,
|
|
7676
|
-
documents: [],
|
|
7677
|
-
sub_categories: []
|
|
7678
|
-
}
|
|
7679
|
-
]
|
|
7680
|
-
},
|
|
7681
|
-
{
|
|
7682
|
-
category_id: 'Spirits',
|
|
7683
|
-
category_name: 'Spirits',
|
|
7684
|
-
category_order: 3,
|
|
7685
|
-
documents: [],
|
|
7686
|
-
sub_categories: [
|
|
7687
|
-
{
|
|
7688
|
-
category_id: 'SpiritsWhisky',
|
|
7689
|
-
category_name: 'Scotch whisky',
|
|
7690
|
-
category_order: 1,
|
|
7691
|
-
documents: [],
|
|
7692
|
-
sub_categories: [
|
|
7693
|
-
{
|
|
7694
|
-
category_id: 'WhiskyHighland',
|
|
7695
|
-
category_name: 'Highland',
|
|
7696
|
-
category_order: 1,
|
|
7697
|
-
documents: [],
|
|
7698
|
-
sub_categories: [
|
|
7699
|
-
{
|
|
7700
|
-
category_id: 'WhiskyHighland1',
|
|
7701
|
-
category_name: 'Highland 1',
|
|
7702
|
-
category_order: 1,
|
|
7703
|
-
documents: [],
|
|
7704
|
-
sub_categories: []
|
|
7705
|
-
}
|
|
7706
|
-
]
|
|
7707
|
-
},
|
|
7708
|
-
{
|
|
7709
|
-
category_id: 'WhiskyLowland',
|
|
7710
|
-
category_name: 'Lowland',
|
|
7711
|
-
category_order: 2,
|
|
7712
|
-
documents: [],
|
|
7713
|
-
sub_categories: [
|
|
7714
|
-
{
|
|
7715
|
-
category_id: 'WhiskyLowland1',
|
|
7716
|
-
category_name: 'Lowland 1',
|
|
7717
|
-
category_order: 1,
|
|
7718
|
-
documents: [
|
|
7719
|
-
{
|
|
7720
|
-
document_url: '/test',
|
|
7721
|
-
document_filename: 'Details about Whisky Lowland 1',
|
|
7722
|
-
document_binary_url: '/test/binary',
|
|
7723
|
-
attribute_path: '',
|
|
7724
|
-
upload_timestamp: ''
|
|
7725
|
-
}
|
|
7726
|
-
],
|
|
7727
|
-
sub_categories: []
|
|
7728
|
-
},
|
|
7729
|
-
{
|
|
7730
|
-
category_id: 'WhiskyLowland2',
|
|
7731
|
-
category_name: 'Lowland 2',
|
|
7732
|
-
category_order: 2,
|
|
7733
|
-
documents: [],
|
|
7734
|
-
sub_categories: []
|
|
7735
|
-
}
|
|
7736
|
-
]
|
|
7737
|
-
},
|
|
7738
|
-
{
|
|
7739
|
-
category_id: 'WhiskyIslay',
|
|
7740
|
-
category_name: 'Islay',
|
|
7741
|
-
category_order: 3,
|
|
7742
|
-
documents: [
|
|
7743
|
-
{
|
|
7744
|
-
document_url: '/test',
|
|
7745
|
-
document_filename: 'Details about Whisky Islay',
|
|
7746
|
-
document_binary_url: '/test/binary',
|
|
7747
|
-
attribute_path: '',
|
|
7748
|
-
upload_timestamp: ''
|
|
7749
|
-
},
|
|
7750
|
-
{
|
|
7751
|
-
document_url: '/test',
|
|
7752
|
-
document_filename: 'More information about Whisky Islay',
|
|
7753
|
-
document_binary_url: '/test/binary',
|
|
7754
|
-
attribute_path: '',
|
|
7755
|
-
upload_timestamp: ''
|
|
7756
|
-
}
|
|
7757
|
-
],
|
|
7758
|
-
sub_categories: []
|
|
7759
|
-
},
|
|
7760
|
-
{
|
|
7761
|
-
category_id: 'WhiskySpeyside',
|
|
7762
|
-
category_name: 'Speyside',
|
|
7763
|
-
category_order: 4,
|
|
7764
|
-
documents: [],
|
|
7765
|
-
sub_categories: []
|
|
7766
|
-
},
|
|
7767
|
-
{
|
|
7768
|
-
category_id: 'WhiskyCampbeltown',
|
|
7769
|
-
category_name: 'Campbeltown',
|
|
7770
|
-
category_order: 5,
|
|
7771
|
-
documents: [],
|
|
7772
|
-
sub_categories: []
|
|
7773
|
-
}
|
|
7774
|
-
]
|
|
7775
|
-
}
|
|
7776
|
-
]
|
|
7777
|
-
}
|
|
7778
|
-
];
|
|
7779
|
-
}
|
|
7780
|
-
}
|
|
7781
|
-
CaseFileViewFolderComponent.UNCATEGORISED_DOCUMENTS_TITLE = 'Uncategorised documents';
|
|
7782
|
-
CaseFileViewFolderComponent.ɵfac = function CaseFileViewFolderComponent_Factory(t) { return new (t || CaseFileViewFolderComponent)(); };
|
|
7783
|
-
CaseFileViewFolderComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFolderComponent, selectors: [["ccd-case-file-view-folder"]], inputs: { categoriesAndDocuments: "categoriesAndDocuments" }, decls: 8, vars: 3, consts: [[1, "document-filter-container"], [1, "document-filter"], [1, "documents-title"], [1, "document-tree-container"], [3, "dataSource", "treeControl"], ["class", "document-tree-node", 4, "cdkTreeNodeDef"], ["class", "document-tree-node", 4, "cdkTreeNodeDef", "cdkTreeNodeDefWhen"], [1, "document-tree-node"], [1, "node"], ["mat-icon-button", "", "disabled", "", 1, "node__icon"], ["src", "/assets/images/document.png", "alt", "Document icon", 1, "node__iconImg"], [1, "node-name", "node-name-document"], ["cdkTreeNodeToggle", "", 1, "node"], ["mat-icon-button", "", 1, "node__icon"], ["src", "/assets/images/folder.png", "alt", "Folder icon", 1, "node__iconImg"], [1, "node__count"], [1, "node__name", "node__name--folder"], ["cdkTreeNodeOutlet", ""]], template: function CaseFileViewFolderComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7784
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
7785
|
-
i0.ɵɵelement(1, "div", 1);
|
|
7786
|
-
i0.ɵɵelementStart(2, "div", 2);
|
|
7787
|
-
i0.ɵɵtext(3, "Documents");
|
|
7788
|
-
i0.ɵɵelementEnd();
|
|
7789
|
-
i0.ɵɵelementEnd();
|
|
7790
|
-
i0.ɵɵelementStart(4, "div", 3);
|
|
7791
|
-
i0.ɵɵelementStart(5, "cdk-tree", 4);
|
|
7792
|
-
i0.ɵɵtemplate(6, CaseFileViewFolderComponent_cdk_nested_tree_node_6_Template, 6, 1, "cdk-nested-tree-node", 5);
|
|
7793
|
-
i0.ɵɵtemplate(7, CaseFileViewFolderComponent_cdk_nested_tree_node_7_Template, 10, 5, "cdk-nested-tree-node", 6);
|
|
7794
|
-
i0.ɵɵelementEnd();
|
|
7795
|
-
i0.ɵɵelementEnd();
|
|
7796
|
-
} if (rf & 2) {
|
|
7797
|
-
i0.ɵɵadvance(5);
|
|
7798
|
-
i0.ɵɵproperty("dataSource", ctx.nestedDataSource)("treeControl", ctx.nestedTreeControl);
|
|
7799
|
-
i0.ɵɵadvance(2);
|
|
7800
|
-
i0.ɵɵproperty("cdkTreeNodeDefWhen", ctx.nestedChildren);
|
|
7801
|
-
} }, directives: [i1$5.CdkTree, i1$5.CdkTreeNodeDef, i1$5.CdkNestedTreeNode, i1$5.CdkTreeNodeToggle, i1$5.CdkTreeNodeOutlet], styles: [".document-filter-container[_ngcontent-%COMP%]{height:60px;border-bottom:2px solid #c9c9c9;padding-bottom:4px}.document-filter-container[_ngcontent-%COMP%] .document-filter[_ngcontent-%COMP%]{height:70%}.document-filter-container[_ngcontent-%COMP%] .documents-title[_ngcontent-%COMP%]{height:30%;margin-left:8px;font-weight:700}.document-tree-container[_ngcontent-%COMP%]{margin:4px}.document-tree-container[_ngcontent-%COMP%] .document-tree-invisible[_ngcontent-%COMP%]{display:none}.document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%], .document-tree-container[_ngcontent-%COMP%] .document-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{display:block}.document-tree-container[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%] .document-tree-node[_ngcontent-%COMP%]{padding-left:40px}.node[_ngcontent-%COMP%]{display:flex;align-items:center;padding:6px 0}.node__icon[_ngcontent-%COMP%]{position:relative;background:none;border:0}.node__iconImg[_ngcontent-%COMP%]{height:24px}.node__count[_ngcontent-%COMP%]{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#fff}.node__name[_ngcontent-%COMP%]{margin-left:6px}"] });
|
|
7802
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFolderComponent, [{
|
|
7803
|
-
type: Component,
|
|
7804
|
-
args: [{
|
|
7805
|
-
selector: 'ccd-case-file-view-folder',
|
|
7806
|
-
styleUrls: ['./case-file-view-folder.component.scss'],
|
|
7807
|
-
templateUrl: './case-file-view-folder.component.html'
|
|
7808
|
-
}]
|
|
7809
|
-
}], function () { return []; }, { categoriesAndDocuments: [{
|
|
7810
|
-
type: Input
|
|
7811
|
-
}] }); })();
|
|
7812
|
-
|
|
7813
|
-
class CaseFileViewFieldComponent {
|
|
7814
|
-
constructor(elementRef, route, caseFileViewService) {
|
|
7815
|
-
this.elementRef = elementRef;
|
|
7816
|
-
this.route = route;
|
|
7817
|
-
this.caseFileViewService = caseFileViewService;
|
|
7818
|
-
}
|
|
7819
|
-
ngOnInit() {
|
|
7820
|
-
const cid = this.route.snapshot.paramMap.get(CaseFileViewFieldComponent.PARAM_CASE_ID);
|
|
7821
|
-
this.categoriesAndDocuments$ = this.caseFileViewService.getCategoriesAndDocuments(cid);
|
|
7822
|
-
}
|
|
7823
|
-
ngAfterViewInit() {
|
|
7824
|
-
const slider = this.elementRef.nativeElement.querySelector('.slider');
|
|
7825
|
-
const documentTreeContainer = this.elementRef.nativeElement.querySelector('.document-tree-container');
|
|
7826
|
-
const mousedown$ = fromEvent(slider, 'mousedown');
|
|
7827
|
-
const mousemove$ = fromEvent(document, 'mousemove');
|
|
7828
|
-
const mouseup$ = fromEvent(document, 'mouseup');
|
|
7829
|
-
const drag$ = mousedown$.pipe(switchMap((start) => {
|
|
7830
|
-
const x = start.clientX;
|
|
7831
|
-
const documentTreeContainerWidth = documentTreeContainer.getBoundingClientRect().width;
|
|
7832
|
-
return mousemove$.pipe(map(move => {
|
|
7833
|
-
move.preventDefault();
|
|
7834
|
-
return {
|
|
7835
|
-
dx: move.clientX - x,
|
|
7836
|
-
documentTreeContainerWidth
|
|
7837
|
-
};
|
|
7838
|
-
}), takeUntil(mouseup$));
|
|
7839
|
-
}));
|
|
7840
|
-
drag$.subscribe(pos => {
|
|
7841
|
-
const calculatedWidth = ((pos.documentTreeContainerWidth + pos.dx) * 100) / slider.parentElement.getBoundingClientRect().width;
|
|
7842
|
-
documentTreeContainer.setAttribute('style', `width: ${calculatedWidth}%`);
|
|
7843
|
-
});
|
|
7844
|
-
}
|
|
7845
|
-
}
|
|
7846
|
-
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
7847
|
-
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(CaseFileViewService)); };
|
|
7848
|
-
CaseFileViewFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 8, vars: 1, consts: [[1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [3, "categoriesAndDocuments"], [1, "slider"], [1, "media-viewer-container"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7849
|
-
i0.ɵɵelementStart(0, "h2", 0);
|
|
7850
|
-
i0.ɵɵtext(1, "Case file");
|
|
7851
|
-
i0.ɵɵelementEnd();
|
|
7852
|
-
i0.ɵɵelementStart(2, "div", 1);
|
|
7853
|
-
i0.ɵɵelementStart(3, "div", 2);
|
|
7854
|
-
i0.ɵɵelement(4, "ccd-case-file-view-folder", 3);
|
|
7855
|
-
i0.ɵɵelementEnd();
|
|
7856
|
-
i0.ɵɵelement(5, "div", 4);
|
|
7857
|
-
i0.ɵɵelementStart(6, "div", 5);
|
|
7858
|
-
i0.ɵɵtext(7, " Media viewer ");
|
|
7859
|
-
i0.ɵɵelementEnd();
|
|
7860
|
-
i0.ɵɵelementEnd();
|
|
7861
|
-
} if (rf & 2) {
|
|
7862
|
-
i0.ɵɵadvance(4);
|
|
7863
|
-
i0.ɵɵproperty("categoriesAndDocuments", ctx.categoriesAndDocuments$);
|
|
7864
|
-
} }, directives: [CaseFileViewFolderComponent], styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9}#case-file-view[_ngcontent-%COMP%] .document-tree-container[_ngcontent-%COMP%]{background-color:#faf8f8;width:30%;min-height:400px;min-width:10%}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]{width:.2%;background-color:#6b6b6b}#case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:focus, #case-file-view[_ngcontent-%COMP%] .slider[_ngcontent-%COMP%]:hover{cursor:col-resize}#case-file-view[_ngcontent-%COMP%] .media-viewer-container[_ngcontent-%COMP%]{flex:1 1 0%}"] });
|
|
7865
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFileViewFieldComponent, [{
|
|
7866
|
-
type: Component,
|
|
7867
|
-
args: [{
|
|
7868
|
-
selector: 'ccd-case-file-view-field',
|
|
7869
|
-
templateUrl: './case-file-view-field.component.html',
|
|
7870
|
-
styleUrls: ['./case-file-view-field.component.scss'],
|
|
7871
|
-
}]
|
|
7872
|
-
}], function () { return [{ type: i0.ElementRef }, { type: i1$1.ActivatedRoute }, { type: CaseFileViewService }]; }, null); })();
|
|
7873
|
-
|
|
7874
|
-
var PaletteContext;
|
|
7875
|
-
(function (PaletteContext) {
|
|
7876
|
-
PaletteContext["DEFAULT"] = "DEFAULT";
|
|
7877
|
-
PaletteContext["CHECK_YOUR_ANSWER"] = "CHECK_YOUR_ANSWER";
|
|
7878
|
-
PaletteContext["TABLE_VIEW"] = "TABLE_VIEW";
|
|
7879
|
-
})(PaletteContext || (PaletteContext = {}));
|
|
7880
|
-
|
|
7881
|
-
class AbstractFieldReadComponent extends AbstractFormFieldComponent {
|
|
7882
|
-
constructor() {
|
|
7883
|
-
super(...arguments);
|
|
7884
|
-
/**
|
|
7885
|
-
* Optional. Enable context-aware rendering of fields.
|
|
7886
|
-
*/
|
|
7887
|
-
this.context = PaletteContext.DEFAULT;
|
|
7888
|
-
}
|
|
7889
|
-
ngOnInit() {
|
|
7890
|
-
if (!this.caseField.metadata) {
|
|
7891
|
-
this.registerControl(new FormControl(this.caseField.value));
|
|
7892
|
-
}
|
|
7893
|
-
}
|
|
7894
|
-
}
|
|
7895
|
-
AbstractFieldReadComponent.ɵfac = function AbstractFieldReadComponent_Factory(t) { return ɵAbstractFieldReadComponent_BaseFactory(t || AbstractFieldReadComponent); };
|
|
7896
|
-
AbstractFieldReadComponent.ɵdir = i0.ɵɵdefineDirective({ type: AbstractFieldReadComponent, inputs: { caseReference: "caseReference", topLevelFormGroup: "topLevelFormGroup", context: "context" }, features: [i0.ɵɵInheritDefinitionFeature] });
|
|
7897
|
-
const ɵAbstractFieldReadComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(AbstractFieldReadComponent);
|
|
7898
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(AbstractFieldReadComponent, [{
|
|
7899
|
-
type: Directive
|
|
7900
|
-
}], null, { caseReference: [{
|
|
7901
|
-
type: Input
|
|
7902
|
-
}], topLevelFormGroup: [{
|
|
7903
|
-
type: Input
|
|
7904
|
-
}], context: [{
|
|
7905
|
-
type: Input
|
|
7906
|
-
}] }); })();
|
|
7907
|
-
|
|
7908
|
-
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
7909
|
-
i0.ɵɵelementStart(0, "a", 1);
|
|
7910
|
-
i0.ɵɵelementStart(1, "span", 2);
|
|
7911
|
-
i0.ɵɵtext(2);
|
|
7912
|
-
i0.ɵɵpipe(3, "ccdCaseReference");
|
|
7913
|
-
i0.ɵɵelementEnd();
|
|
7914
|
-
i0.ɵɵelementEnd();
|
|
7915
|
-
} if (rf & 2) {
|
|
7916
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
7917
|
-
i0.ɵɵpropertyInterpolate1("href", "/v2/case/", ctx_r0.caseField.value.CaseReference, "", i0.ɵɵsanitizeUrl);
|
|
7918
|
-
i0.ɵɵadvance(2);
|
|
7919
|
-
i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
|
|
7920
|
-
} }
|
|
7921
|
-
class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
7922
|
-
hasReference() {
|
|
7923
|
-
return this.caseField.value && this.caseField.value.CaseReference;
|
|
7924
|
-
}
|
|
7925
|
-
}
|
|
7926
|
-
ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
|
|
7927
|
-
ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["target", "_blank", 3, "href", 4, "ngIf"], ["target", "_blank", 3, "href"], [1, "text-16"]], template: function ReadCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
7928
|
-
i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
|
|
7929
|
-
} if (rf & 2) {
|
|
7930
|
-
i0.ɵɵproperty("ngIf", ctx.hasReference());
|
|
7931
|
-
} }, directives: [i1.NgIf], pipes: [CaseReferencePipe], encapsulation: 2 });
|
|
7932
|
-
const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
|
|
7933
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
|
|
7934
|
-
type: Component,
|
|
7935
|
-
args: [{
|
|
7936
|
-
selector: 'ccd-read-case-link-field',
|
|
7937
|
-
templateUrl: 'read-case-link-field.html'
|
|
7938
|
-
}]
|
|
7939
|
-
}], null, null); })();
|
|
7940
|
-
|
|
7941
|
-
class FirstErrorPipe {
|
|
7942
|
-
transform(value, args) {
|
|
7943
|
-
if (!value) {
|
|
7944
|
-
return '';
|
|
7945
|
-
}
|
|
7946
|
-
if (!args) {
|
|
7947
|
-
args = 'Field';
|
|
7948
|
-
}
|
|
7949
|
-
const keys = Object.keys(value);
|
|
7950
|
-
if (!keys.length) {
|
|
7951
|
-
return '';
|
|
7952
|
-
}
|
|
7953
|
-
if (keys[0] === 'required') {
|
|
7954
|
-
return `${args} is required`;
|
|
7955
|
-
}
|
|
7956
|
-
else if (keys[0] === 'pattern') {
|
|
7957
|
-
return `The data entered is not valid for ${args}`;
|
|
7958
|
-
}
|
|
7959
|
-
else if (keys[0] === 'minlength') {
|
|
7960
|
-
return `${args} is below the minimum length`;
|
|
7961
|
-
}
|
|
7962
|
-
else if (keys[0] === 'maxlength') {
|
|
7963
|
-
return `${args} exceeds the maximum length`;
|
|
7964
|
-
}
|
|
7965
|
-
else if (value.hasOwnProperty('matDatetimePickerParse')) {
|
|
7966
|
-
return 'The date entered is not valid. Please provide a valid date';
|
|
7967
|
-
}
|
|
7968
|
-
return value[keys[0]];
|
|
7969
|
-
}
|
|
7970
|
-
}
|
|
7971
|
-
FirstErrorPipe.ɵfac = function FirstErrorPipe_Factory(t) { return new (t || FirstErrorPipe)(); };
|
|
7972
|
-
FirstErrorPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFirstError", type: FirstErrorPipe, pure: true });
|
|
7973
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FirstErrorPipe, [{
|
|
7974
|
-
type: Pipe,
|
|
7975
|
-
args: [{
|
|
7976
|
-
name: 'ccdFirstError'
|
|
7977
|
-
}]
|
|
7978
|
-
}], null, null); })();
|
|
7979
|
-
|
|
7980
|
-
const _c0$F = ["writeComplexFieldComponent"];
|
|
7981
|
-
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
7982
|
-
i0.ɵɵelementStart(0, "span", 6);
|
|
7983
|
-
i0.ɵɵtext(1);
|
|
7984
|
-
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
7985
|
-
i0.ɵɵelementEnd();
|
|
7986
|
-
} if (rf & 2) {
|
|
7987
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
7988
|
-
i0.ɵɵadvance(1);
|
|
7989
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
7990
|
-
} }
|
|
7991
|
-
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
7992
|
-
i0.ɵɵelementStart(0, "span", 7);
|
|
7993
|
-
i0.ɵɵtext(1);
|
|
7994
|
-
i0.ɵɵelementEnd();
|
|
7995
|
-
} if (rf & 2) {
|
|
7996
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
7997
|
-
i0.ɵɵadvance(1);
|
|
7998
|
-
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
7999
|
-
} }
|
|
8000
|
-
function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
8001
|
-
i0.ɵɵelementStart(0, "span", 8);
|
|
8002
|
-
i0.ɵɵtext(1);
|
|
8003
|
-
i0.ɵɵpipe(2, "ccdFirstError");
|
|
8004
|
-
i0.ɵɵelementEnd();
|
|
8005
|
-
} if (rf & 2) {
|
|
8006
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
8007
|
-
i0.ɵɵadvance(1);
|
|
8008
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
|
|
8009
|
-
} }
|
|
8010
|
-
const _c1$g = function (a0) { return { "form-group-error": a0 }; };
|
|
8011
|
-
class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
8012
|
-
ngOnInit() {
|
|
8013
|
-
if (this.caseField.value) {
|
|
8014
|
-
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
8015
|
-
CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
|
|
8016
|
-
}), true);
|
|
8017
|
-
}
|
|
8018
|
-
else {
|
|
8019
|
-
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
8020
|
-
CaseReference: new FormControl(null, Validators.required),
|
|
8021
|
-
}), true);
|
|
8022
|
-
}
|
|
8023
|
-
this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
|
|
8024
|
-
this.caseReferenceControl.setValidators(this.caseReferenceValidator());
|
|
8025
|
-
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
|
|
8026
|
-
// field uses the Complex type, it is meant to be treated as one field
|
|
8027
|
-
if (this.caseField && this.caseField.field_type.type === 'Complex') {
|
|
8028
|
-
for (const caseLinkSubField of this.caseField.field_type.complex_fields) {
|
|
8029
|
-
caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
|
|
8030
|
-
}
|
|
8031
|
-
}
|
|
8032
|
-
}
|
|
8033
|
-
validCaseReference(valueString) {
|
|
8034
|
-
if (!valueString) {
|
|
8035
|
-
return false;
|
|
8036
|
-
}
|
|
8037
|
-
return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
|
|
8038
|
-
}
|
|
8039
|
-
caseReferenceValidator() {
|
|
8040
|
-
return (control) => {
|
|
8041
|
-
if (control.value) {
|
|
8042
|
-
if (this.validCaseReference(control.value)) {
|
|
8043
|
-
return null;
|
|
8044
|
-
}
|
|
8045
|
-
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
8046
|
-
}
|
|
8047
|
-
else {
|
|
8048
|
-
if (control.touched) {
|
|
8049
|
-
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
8050
|
-
}
|
|
8051
|
-
}
|
|
8052
|
-
return null;
|
|
8053
|
-
};
|
|
8054
|
-
}
|
|
8055
|
-
}
|
|
8056
|
-
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
|
|
8057
|
-
WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
8058
|
-
i0.ɵɵviewQuery(_c0$F, 1);
|
|
8059
|
-
} if (rf & 2) {
|
|
8060
|
-
let _t;
|
|
8061
|
-
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
8062
|
-
} }, features: [i0.ɵɵInheritDefinitionFeature], decls: 6, vars: 9, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["type", "text", 1, "form-control", "bottom-30", 3, "id", "formControl"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteCaseLinkFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8063
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
8064
|
-
i0.ɵɵelementStart(1, "label", 1);
|
|
8065
|
-
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
8066
|
-
i0.ɵɵelementEnd();
|
|
8067
|
-
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
8068
|
-
i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
8069
|
-
i0.ɵɵelement(5, "input", 5);
|
|
8070
|
-
i0.ɵɵelementEnd();
|
|
8071
|
-
} if (rf & 2) {
|
|
8072
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$g, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
8073
|
-
i0.ɵɵadvance(1);
|
|
8074
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
8075
|
-
i0.ɵɵadvance(1);
|
|
8076
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
8077
|
-
i0.ɵɵadvance(1);
|
|
8078
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
8079
|
-
i0.ɵɵadvance(1);
|
|
8080
|
-
i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
|
|
8081
|
-
i0.ɵɵadvance(1);
|
|
8082
|
-
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
|
|
8083
|
-
} }, directives: [i1.NgClass, i1.NgIf, i1$3.DefaultValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
8084
|
-
const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
|
|
8085
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
|
|
8086
|
-
type: Component,
|
|
8087
|
-
args: [{
|
|
8088
|
-
selector: 'ccd-write-case-link-field',
|
|
8089
|
-
templateUrl: 'write-case-link-field.html'
|
|
8090
|
-
}]
|
|
8091
|
-
}], null, { writeComplexFieldComponent: [{
|
|
8092
|
-
type: ViewChild,
|
|
8093
|
-
args: ['writeComplexFieldComponent', /* TODO: add static flag */ {}]
|
|
8094
|
-
}] }); })();
|
|
8095
|
-
|
|
8096
|
-
const _c0$E = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
|
|
8097
|
-
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) { if (rf & 1) {
|
|
8098
|
-
i0.ɵɵelementStart(0, "tbody");
|
|
8099
|
-
i0.ɵɵelementStart(1, "tr");
|
|
8100
|
-
i0.ɵɵelement(2, "th", 4);
|
|
8101
|
-
i0.ɵɵelementStart(3, "td");
|
|
8102
|
-
i0.ɵɵelement(4, "ccd-field-read", 5);
|
|
8103
|
-
i0.ɵɵelementEnd();
|
|
8104
|
-
i0.ɵɵelementEnd();
|
|
8105
|
-
i0.ɵɵelementEnd();
|
|
8106
|
-
} if (rf & 2) {
|
|
8107
|
-
const ctx_r1 = i0.ɵɵnextContext(2);
|
|
8108
|
-
i0.ɵɵadvance(4);
|
|
8109
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction6(3, _c0$E, ctx_r1.caseField.label, ctx_r1.caseField.label, ctx_r1.caseField.field_type.collection_field_type, ctx_r1.caseField.display_context_parameter, ctx_r1.caseField.value, ctx_r1.caseField.hidden))("context", ctx_r1.context)("topLevelFormGroup", ctx_r1.topLevelFormGroup);
|
|
8110
|
-
} }
|
|
8111
|
-
const _c1$f = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
8112
|
-
function ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template(rf, ctx) { if (rf & 1) {
|
|
8113
|
-
i0.ɵɵelementStart(0, "tr");
|
|
8114
|
-
i0.ɵɵelementStart(1, "td");
|
|
8115
|
-
i0.ɵɵelement(2, "ccd-field-read", 7);
|
|
8116
|
-
i0.ɵɵelementEnd();
|
|
8117
|
-
i0.ɵɵelementEnd();
|
|
8118
|
-
} if (rf & 2) {
|
|
8119
|
-
const item_r4 = ctx.$implicit;
|
|
8120
|
-
const i_r5 = ctx.index;
|
|
8121
|
-
const ctx_r3 = i0.ɵɵnextContext(3);
|
|
8122
|
-
i0.ɵɵadvance(2);
|
|
8123
|
-
i0.ɵɵproperty("caseField", i0.ɵɵpureFunction5(4, _c1$f, i_r5, ctx_r3.caseField.label + " " + (i_r5 + 1), ctx_r3.caseField.field_type.collection_field_type, item_r4.value, ctx_r3.caseField.hidden))("context", ctx_r3.context)("topLevelFormGroup", ctx_r3.topLevelFormGroup)("idPrefix", ctx_r3.buildIdPrefix(i_r5));
|
|
8124
|
-
} }
|
|
8125
|
-
function ReadCollectionFieldComponent_table_0_tbody_3_Template(rf, ctx) { if (rf & 1) {
|
|
8126
|
-
i0.ɵɵelementStart(0, "tbody");
|
|
8127
|
-
i0.ɵɵtemplate(1, ReadCollectionFieldComponent_table_0_tbody_3_tr_1_Template, 3, 10, "tr", 6);
|
|
8128
|
-
i0.ɵɵelementEnd();
|
|
8129
|
-
} if (rf & 2) {
|
|
8130
|
-
const ctx_r2 = i0.ɵɵnextContext(2);
|
|
8131
|
-
i0.ɵɵadvance(1);
|
|
8132
|
-
i0.ɵɵproperty("ngForOf", ctx_r2.caseField.value);
|
|
8133
|
-
} }
|
|
8134
|
-
function ReadCollectionFieldComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
8135
|
-
i0.ɵɵelementStart(0, "table", 1);
|
|
8136
|
-
i0.ɵɵelementContainerStart(1, 2);
|
|
8137
|
-
i0.ɵɵtemplate(2, ReadCollectionFieldComponent_table_0_tbody_2_Template, 5, 10, "tbody", 3);
|
|
8138
|
-
i0.ɵɵtemplate(3, ReadCollectionFieldComponent_table_0_tbody_3_Template, 2, 1, "tbody", 3);
|
|
8139
|
-
i0.ɵɵelementContainerEnd();
|
|
8140
|
-
i0.ɵɵelementEnd();
|
|
8141
|
-
} if (rf & 2) {
|
|
8142
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
8143
|
-
i0.ɵɵadvance(1);
|
|
8144
|
-
i0.ɵɵproperty("ngSwitch", ctx_r0.isDisplayContextParameterAvailable);
|
|
8145
|
-
i0.ɵɵadvance(1);
|
|
8146
|
-
i0.ɵɵproperty("ngSwitchCase", true);
|
|
8147
|
-
i0.ɵɵadvance(1);
|
|
8148
|
-
i0.ɵɵproperty("ngSwitchCase", false);
|
|
8149
|
-
} }
|
|
8150
|
-
class ReadCollectionFieldComponent extends AbstractFieldReadComponent {
|
|
8151
|
-
constructor() {
|
|
8152
|
-
super(...arguments);
|
|
8153
|
-
this.isDisplayContextParameterAvailable = false;
|
|
8154
|
-
}
|
|
8155
|
-
ngOnInit() {
|
|
8156
|
-
if (this.caseField.display_context_parameter && this.caseField.display_context_parameter.trim().startsWith('#TABLE(')) {
|
|
8157
|
-
this.isDisplayContextParameterAvailable = true;
|
|
8158
|
-
}
|
|
8159
|
-
}
|
|
8160
|
-
buildIdPrefix(index) {
|
|
8161
|
-
const prefix = `${this.idPrefix}${this.caseField.id}_`;
|
|
8162
|
-
if (this.caseField.field_type.collection_field_type.type === 'Complex') {
|
|
8163
|
-
return `${prefix}${index}_`;
|
|
8164
|
-
}
|
|
8165
|
-
return prefix;
|
|
8166
|
-
}
|
|
8167
|
-
}
|
|
8168
|
-
ReadCollectionFieldComponent.ɵfac = function ReadCollectionFieldComponent_Factory(t) { return ɵReadCollectionFieldComponent_BaseFactory(t || ReadCollectionFieldComponent); };
|
|
8169
|
-
ReadCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCollectionFieldComponent, selectors: [["ccd-read-collection-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [["class", "collection-field-table", "aria-describedby", "collection table", 4, "ngIf"], ["aria-describedby", "collection table", 1, "collection-field-table"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["id", "hiddenHeader", 2, "display", "none"], [3, "caseField", "context", "topLevelFormGroup"], [4, "ngFor", "ngForOf"], [3, "caseField", "context", "topLevelFormGroup", "idPrefix"]], template: function ReadCollectionFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8170
|
-
i0.ɵɵtemplate(0, ReadCollectionFieldComponent_table_0_Template, 4, 3, "table", 0);
|
|
8171
|
-
} if (rf & 2) {
|
|
8172
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.value && ctx.caseField.value.length);
|
|
8173
|
-
} }, styles: [".collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:first-child > td[_ngcontent-%COMP%]{padding-top:0}.collection-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.collection-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}.error-spacing[_ngcontent-%COMP%]{margin-top:10px}.collection-title[_ngcontent-%COMP%]{height:51px}.float-left[_ngcontent-%COMP%]{float:left;padding-top:8px}.float-right[_ngcontent-%COMP%]{float:right}.complex-panel[_ngcontent-%COMP%]{margin:13px 0;border:1px solid #bfc1c3}.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{background-color:#dee0e2;border-bottom:1px solid #bfc1c3;display:block;color:#0b0c0c;padding:5px 5px 2px;font-family:nta,Arial,sans-serif;font-weight:700;text-transform:none;font-size:16px;line-height:1.25}@media (min-width:641px){.complex-panel[_ngcontent-%COMP%] .complex-panel-title[_ngcontent-%COMP%]{font-size:19px;line-height:1.3157894737}}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] > th[_ngcontent-%COMP%]{vertical-align:top}.complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%], .complex-panel[_ngcontent-%COMP%] .complex-panel-table[_ngcontent-%COMP%] > tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:last-child > th[_ngcontent-%COMP%]{border-bottom:none}.complex-panel[_ngcontent-%COMP%] .complex-panel-simple-field[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding-left:5px;width:295px}.complex-panel[_ngcontent-%COMP%] .complex-panel-compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.collection-indicator[_ngcontent-%COMP%]{border-left:5px solid #b1b4b6}"] });
|
|
8174
|
-
const ɵReadCollectionFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCollectionFieldComponent);
|
|
8175
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCollectionFieldComponent, [{
|
|
8176
|
-
type: Component,
|
|
8177
|
-
args: [{
|
|
8178
|
-
selector: 'ccd-read-collection-field',
|
|
8179
|
-
templateUrl: './read-collection-field.html',
|
|
8180
|
-
styleUrls: ['./collection-field.scss']
|
|
8181
|
-
}]
|
|
8182
|
-
}], null, null); })();
|
|
8183
|
-
|
|
8184
|
-
class RemoveDialogComponent {
|
|
8185
|
-
constructor(matDialogRef) {
|
|
8186
|
-
this.matDialogRef = matDialogRef;
|
|
8187
|
-
}
|
|
8188
|
-
remove() {
|
|
8189
|
-
this.result = 'Remove';
|
|
8190
|
-
this.matDialogRef.close(this.result);
|
|
8191
|
-
}
|
|
8192
|
-
cancel() {
|
|
8193
|
-
this.result = 'Cancel';
|
|
8194
|
-
this.matDialogRef.close(this.result);
|
|
8195
|
-
}
|
|
8196
|
-
}
|
|
8197
|
-
RemoveDialogComponent.ɵfac = function RemoveDialogComponent_Factory(t) { return new (t || RemoveDialogComponent)(i0.ɵɵdirectiveInject(i1$6.MatDialogRef)); };
|
|
7502
|
+
RemoveDialogComponent.ɵfac = function RemoveDialogComponent_Factory(t) { return new (t || RemoveDialogComponent)(i0.ɵɵdirectiveInject(i1$5.MatDialogRef)); };
|
|
8198
7503
|
RemoveDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RemoveDialogComponent, selectors: [["ccd-remove-dialog"]], decls: 15, vars: 0, consts: [[1, "dialog-header"], [1, "heading-h2", "x", 3, "click"], [1, "heading-h2", "dialog-title"], [1, "dialog-info"], [1, "text-info"], ["type", "button", "title", "Remove", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function RemoveDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
8199
7504
|
i0.ɵɵelementStart(0, "div");
|
|
8200
7505
|
i0.ɵɵelementStart(1, "div", 0);
|
|
@@ -8232,7 +7537,7 @@ RemoveDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: RemoveDialogCompone
|
|
|
8232
7537
|
templateUrl: './remove-dialog.component.html',
|
|
8233
7538
|
styleUrls: ['../action-dialog.component.scss']
|
|
8234
7539
|
}]
|
|
8235
|
-
}], function () { return [{ type: i1$
|
|
7540
|
+
}], function () { return [{ type: i1$5.MatDialogRef }]; }, null); })();
|
|
8236
7541
|
|
|
8237
7542
|
const _c0$D = ["collectionItem"];
|
|
8238
7543
|
function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -8606,7 +7911,7 @@ class WriteCollectionFieldComponent extends AbstractFieldWriteComponent {
|
|
|
8606
7911
|
return notSimple.indexOf(caseField.field_type.collection_field_type.type) < 0;
|
|
8607
7912
|
}
|
|
8608
7913
|
}
|
|
8609
|
-
WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$
|
|
7914
|
+
WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(i2.ScrollToService), i0.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
8610
7915
|
WriteCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
8611
7916
|
i0.ɵɵviewQuery(_c0$D, 1);
|
|
8612
7917
|
} if (rf & 2) {
|
|
@@ -8648,7 +7953,7 @@ WriteCollectionFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCollec
|
|
|
8648
7953
|
templateUrl: './write-collection-field.html',
|
|
8649
7954
|
styleUrls: ['./collection-field.scss']
|
|
8650
7955
|
}]
|
|
8651
|
-
}], function () { return [{ type: i1$
|
|
7956
|
+
}], function () { return [{ type: i1$5.MatDialog }, { type: i2.ScrollToService }, { type: ProfileNotifier }]; }, { caseFields: [{
|
|
8652
7957
|
type: Input
|
|
8653
7958
|
}], formGroup: [{
|
|
8654
7959
|
type: Input
|
|
@@ -9619,6 +8924,38 @@ DatetimePickerComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DatetimePickerCom
|
|
|
9619
8924
|
type: Input
|
|
9620
8925
|
}] }); })();
|
|
9621
8926
|
|
|
8927
|
+
class CaseFieldService {
|
|
8928
|
+
isOptional(field) {
|
|
8929
|
+
if (!field || !field.display_context) {
|
|
8930
|
+
return false;
|
|
8931
|
+
}
|
|
8932
|
+
return field.display_context.toUpperCase() === 'OPTIONAL';
|
|
8933
|
+
}
|
|
8934
|
+
isReadOnly(field) {
|
|
8935
|
+
if (!field || !field.display_context) {
|
|
8936
|
+
return false;
|
|
8937
|
+
}
|
|
8938
|
+
return field.display_context.toUpperCase() === 'READONLY';
|
|
8939
|
+
}
|
|
8940
|
+
isMandatory(field) {
|
|
8941
|
+
if (!field || !field.display_context) {
|
|
8942
|
+
return false;
|
|
8943
|
+
}
|
|
8944
|
+
return field.display_context.toUpperCase() === 'MANDATORY';
|
|
8945
|
+
}
|
|
8946
|
+
isLabel(field) {
|
|
8947
|
+
if (!field || !field.field_type) {
|
|
8948
|
+
return false;
|
|
8949
|
+
}
|
|
8950
|
+
return field.field_type.type === 'Label';
|
|
8951
|
+
}
|
|
8952
|
+
}
|
|
8953
|
+
CaseFieldService.ɵfac = function CaseFieldService_Factory(t) { return new (t || CaseFieldService)(); };
|
|
8954
|
+
CaseFieldService.ɵprov = i0.ɵɵdefineInjectable({ token: CaseFieldService, factory: CaseFieldService.ɵfac });
|
|
8955
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseFieldService, [{
|
|
8956
|
+
type: Injectable
|
|
8957
|
+
}], null, null); })();
|
|
8958
|
+
|
|
9622
8959
|
class IsMandatoryPipe {
|
|
9623
8960
|
constructor(caseFieldService) {
|
|
9624
8961
|
this.caseFieldService = caseFieldService;
|
|
@@ -9724,21 +9061,160 @@ function WriteDateContainerFieldComponent_ng_template_1_Template(rf, ctx) { if (
|
|
|
9724
9061
|
} }
|
|
9725
9062
|
class WriteDateContainerFieldComponent extends AbstractFormFieldComponent {
|
|
9726
9063
|
}
|
|
9727
|
-
WriteDateContainerFieldComponent.ɵfac = function WriteDateContainerFieldComponent_Factory(t) { return ɵWriteDateContainerFieldComponent_BaseFactory(t || WriteDateContainerFieldComponent); };
|
|
9728
|
-
WriteDateContainerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDateContainerFieldComponent, selectors: [["ccd-write-date-container-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["nativeDatepicker", ""], [3, "caseField", "formGroup", "parent"]], template: function WriteDateContainerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9729
|
-
i0.ɵɵtemplate(0, WriteDateContainerFieldComponent_ng_container_0_Template, 2, 3, "ng-container", 0);
|
|
9730
|
-
i0.ɵɵtemplate(1, WriteDateContainerFieldComponent_ng_template_1_Template, 1, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
9731
|
-
} if (rf & 2) {
|
|
9732
|
-
const _r1 = i0.ɵɵreference(2);
|
|
9733
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.dateTimeEntryFormat)("ngIfElse", _r1);
|
|
9734
|
-
} }, directives: [i1.NgIf, DatetimePickerComponent, i1$3.NgControlStatusGroup, i1$3.FormGroupDirective, WriteDateFieldComponent], encapsulation: 2 });
|
|
9735
|
-
const ɵWriteDateContainerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDateContainerFieldComponent);
|
|
9736
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDateContainerFieldComponent, [{
|
|
9737
|
-
type: Component,
|
|
9738
|
-
args: [{
|
|
9739
|
-
selector: 'ccd-write-date-container-field',
|
|
9740
|
-
templateUrl: './write-date-container-field.html'
|
|
9741
|
-
}]
|
|
9064
|
+
WriteDateContainerFieldComponent.ɵfac = function WriteDateContainerFieldComponent_Factory(t) { return ɵWriteDateContainerFieldComponent_BaseFactory(t || WriteDateContainerFieldComponent); };
|
|
9065
|
+
WriteDateContainerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDateContainerFieldComponent, selectors: [["ccd-write-date-container-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 2, consts: [[4, "ngIf", "ngIfElse"], ["nativeDatepicker", ""], [3, "caseField", "formGroup", "parent"]], template: function WriteDateContainerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9066
|
+
i0.ɵɵtemplate(0, WriteDateContainerFieldComponent_ng_container_0_Template, 2, 3, "ng-container", 0);
|
|
9067
|
+
i0.ɵɵtemplate(1, WriteDateContainerFieldComponent_ng_template_1_Template, 1, 3, "ng-template", null, 1, i0.ɵɵtemplateRefExtractor);
|
|
9068
|
+
} if (rf & 2) {
|
|
9069
|
+
const _r1 = i0.ɵɵreference(2);
|
|
9070
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.dateTimeEntryFormat)("ngIfElse", _r1);
|
|
9071
|
+
} }, directives: [i1.NgIf, DatetimePickerComponent, i1$3.NgControlStatusGroup, i1$3.FormGroupDirective, WriteDateFieldComponent], encapsulation: 2 });
|
|
9072
|
+
const ɵWriteDateContainerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteDateContainerFieldComponent);
|
|
9073
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteDateContainerFieldComponent, [{
|
|
9074
|
+
type: Component,
|
|
9075
|
+
args: [{
|
|
9076
|
+
selector: 'ccd-write-date-container-field',
|
|
9077
|
+
templateUrl: './write-date-container-field.html'
|
|
9078
|
+
}]
|
|
9079
|
+
}], null, null); })();
|
|
9080
|
+
|
|
9081
|
+
class DocumentManagementService {
|
|
9082
|
+
constructor(http, appConfig) {
|
|
9083
|
+
this.http = http;
|
|
9084
|
+
this.appConfig = appConfig;
|
|
9085
|
+
}
|
|
9086
|
+
uploadFile(formData) {
|
|
9087
|
+
const url = this.getDocStoreUrl();
|
|
9088
|
+
// Do not set any headers, such as "Accept" or "Content-Type", with null values; this is not permitted with the
|
|
9089
|
+
// Angular HttpClient in @angular/common/http. Just create and pass a new HttpHeaders object. Angular will add the
|
|
9090
|
+
// correct headers and values automatically
|
|
9091
|
+
const headers = new HttpHeaders();
|
|
9092
|
+
return this.http
|
|
9093
|
+
.post(url, formData, { headers, observe: 'body' })
|
|
9094
|
+
.pipe(delay(DocumentManagementService.RESPONSE_DELAY));
|
|
9095
|
+
}
|
|
9096
|
+
getMediaViewerInfo(documentFieldValue) {
|
|
9097
|
+
const mediaViewerInfo = {
|
|
9098
|
+
document_binary_url: this.transformDocumentUrl(documentFieldValue.document_binary_url),
|
|
9099
|
+
document_filename: documentFieldValue.document_filename,
|
|
9100
|
+
content_type: this.getContentType(documentFieldValue),
|
|
9101
|
+
annotation_api_url: this.appConfig.getAnnotationApiUrl(),
|
|
9102
|
+
case_id: documentFieldValue.id,
|
|
9103
|
+
case_jurisdiction: documentFieldValue.jurisdiction
|
|
9104
|
+
};
|
|
9105
|
+
return JSON.stringify(mediaViewerInfo);
|
|
9106
|
+
}
|
|
9107
|
+
getContentType(documentFieldValue) {
|
|
9108
|
+
let fileExtension = '<unknown>';
|
|
9109
|
+
if (documentFieldValue.document_filename) {
|
|
9110
|
+
const position = documentFieldValue.document_filename.lastIndexOf('.');
|
|
9111
|
+
if (position === documentFieldValue.document_filename.length) {
|
|
9112
|
+
fileExtension = '';
|
|
9113
|
+
}
|
|
9114
|
+
else if (position >= 0) {
|
|
9115
|
+
fileExtension = documentFieldValue.document_filename.slice(position + 1);
|
|
9116
|
+
}
|
|
9117
|
+
}
|
|
9118
|
+
if (this.isImage(fileExtension)) {
|
|
9119
|
+
return DocumentManagementService.IMAGE;
|
|
9120
|
+
}
|
|
9121
|
+
else if (this.isWord(fileExtension)) {
|
|
9122
|
+
return DocumentManagementService.WORD;
|
|
9123
|
+
}
|
|
9124
|
+
else if (this.isExcel(fileExtension)) {
|
|
9125
|
+
return DocumentManagementService.EXCEL;
|
|
9126
|
+
}
|
|
9127
|
+
else if (this.isPowerpoint(fileExtension)) {
|
|
9128
|
+
return DocumentManagementService.POWERPOINT;
|
|
9129
|
+
}
|
|
9130
|
+
else if (fileExtension.toLowerCase() === 'txt') {
|
|
9131
|
+
return DocumentManagementService.TXT;
|
|
9132
|
+
}
|
|
9133
|
+
else if (fileExtension.toLowerCase() === 'rtf') {
|
|
9134
|
+
return DocumentManagementService.RTF;
|
|
9135
|
+
}
|
|
9136
|
+
else if (fileExtension.toLowerCase() === 'pdf') {
|
|
9137
|
+
return DocumentManagementService.PDF;
|
|
9138
|
+
}
|
|
9139
|
+
else {
|
|
9140
|
+
return fileExtension;
|
|
9141
|
+
}
|
|
9142
|
+
}
|
|
9143
|
+
isImage(imageType) {
|
|
9144
|
+
return DocumentManagementService.imagesList.find(e => e === imageType) !== undefined;
|
|
9145
|
+
}
|
|
9146
|
+
isWord(wordType) {
|
|
9147
|
+
return DocumentManagementService.wordList.find(e => e === wordType) !== undefined;
|
|
9148
|
+
}
|
|
9149
|
+
isExcel(excelType) {
|
|
9150
|
+
return DocumentManagementService.excelList.find(e => e === excelType) !== undefined;
|
|
9151
|
+
}
|
|
9152
|
+
isPowerpoint(powerpointType) {
|
|
9153
|
+
return DocumentManagementService.powerpointList.find(e => e === powerpointType) !== undefined;
|
|
9154
|
+
}
|
|
9155
|
+
transformDocumentUrl(documentBinaryUrl) {
|
|
9156
|
+
const remoteHrsPattern = new RegExp(this.appConfig.getRemoteHrsUrl());
|
|
9157
|
+
documentBinaryUrl = documentBinaryUrl.replace(remoteHrsPattern, this.appConfig.getHrsUrl());
|
|
9158
|
+
const remoteDocumentManagementPattern = new RegExp(this.appConfig.getRemoteDocumentManagementUrl());
|
|
9159
|
+
return documentBinaryUrl.replace(remoteDocumentManagementPattern, this.getDocStoreUrl());
|
|
9160
|
+
}
|
|
9161
|
+
getDocStoreUrl() {
|
|
9162
|
+
return this.appConfig.getDocumentSecureMode() ? this.appConfig.getDocumentManagementUrlV2() : this.appConfig.getDocumentManagementUrl();
|
|
9163
|
+
}
|
|
9164
|
+
}
|
|
9165
|
+
DocumentManagementService.PDF = 'pdf';
|
|
9166
|
+
DocumentManagementService.IMAGE = 'image';
|
|
9167
|
+
DocumentManagementService.WORD = 'word';
|
|
9168
|
+
DocumentManagementService.EXCEL = 'excel';
|
|
9169
|
+
DocumentManagementService.POWERPOINT = 'powerpoint';
|
|
9170
|
+
DocumentManagementService.TXT = 'txt';
|
|
9171
|
+
DocumentManagementService.RTF = 'rtf';
|
|
9172
|
+
// This delay has been added to give enough time to the user on the UI to see the info messages on the document upload
|
|
9173
|
+
// field for cases when uploads are very fast.
|
|
9174
|
+
DocumentManagementService.RESPONSE_DELAY = 1000;
|
|
9175
|
+
DocumentManagementService.imagesList = ['GIF', 'JPG', 'JPEG', 'PNG', 'gif', 'jpg', 'jpeg', 'png'];
|
|
9176
|
+
DocumentManagementService.wordList = ['DOC', 'DOCX', 'doc', 'docx'];
|
|
9177
|
+
DocumentManagementService.excelList = ['XLS', 'XLSX', 'xls', 'xlsx'];
|
|
9178
|
+
DocumentManagementService.powerpointList = ['PPT', 'PPTX', 'ppt', 'pptx'];
|
|
9179
|
+
DocumentManagementService.ɵfac = function DocumentManagementService_Factory(t) { return new (t || DocumentManagementService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
9180
|
+
DocumentManagementService.ɵprov = i0.ɵɵdefineInjectable({ token: DocumentManagementService, factory: DocumentManagementService.ɵfac });
|
|
9181
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DocumentManagementService, [{
|
|
9182
|
+
type: Injectable
|
|
9183
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
9184
|
+
|
|
9185
|
+
class WindowService {
|
|
9186
|
+
locationAssign(url) {
|
|
9187
|
+
window.location.assign(url);
|
|
9188
|
+
}
|
|
9189
|
+
setLocalStorage(key, value) {
|
|
9190
|
+
window.localStorage.setItem(key, value);
|
|
9191
|
+
}
|
|
9192
|
+
getLocalStorage(key) {
|
|
9193
|
+
return window.localStorage.getItem(key);
|
|
9194
|
+
}
|
|
9195
|
+
clearLocalStorage() {
|
|
9196
|
+
window.localStorage.clear();
|
|
9197
|
+
}
|
|
9198
|
+
removeLocalStorage(key) {
|
|
9199
|
+
window.localStorage.removeItem(key);
|
|
9200
|
+
}
|
|
9201
|
+
setSessionStorage(key, value) {
|
|
9202
|
+
window.sessionStorage.setItem(key, value);
|
|
9203
|
+
}
|
|
9204
|
+
getSessionStorage(key) {
|
|
9205
|
+
return window.sessionStorage.getItem(key);
|
|
9206
|
+
}
|
|
9207
|
+
openOnNewTab(url) {
|
|
9208
|
+
window.open(url, '_blank');
|
|
9209
|
+
}
|
|
9210
|
+
confirm(message) {
|
|
9211
|
+
return window.confirm(message);
|
|
9212
|
+
}
|
|
9213
|
+
}
|
|
9214
|
+
WindowService.ɵfac = function WindowService_Factory(t) { return new (t || WindowService)(); };
|
|
9215
|
+
WindowService.ɵprov = i0.ɵɵdefineInjectable({ token: WindowService, factory: WindowService.ɵfac });
|
|
9216
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WindowService, [{
|
|
9217
|
+
type: Injectable
|
|
9742
9218
|
}], null, null); })();
|
|
9743
9219
|
|
|
9744
9220
|
function ReadDocumentFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
@@ -9979,7 +9455,7 @@ class DocumentDialogComponent {
|
|
|
9979
9455
|
this.matDialogRef.close(this.result);
|
|
9980
9456
|
}
|
|
9981
9457
|
}
|
|
9982
|
-
DocumentDialogComponent.ɵfac = function DocumentDialogComponent_Factory(t) { return new (t || DocumentDialogComponent)(i0.ɵɵdirectiveInject(i1$
|
|
9458
|
+
DocumentDialogComponent.ɵfac = function DocumentDialogComponent_Factory(t) { return new (t || DocumentDialogComponent)(i0.ɵɵdirectiveInject(i1$5.MatDialogRef)); };
|
|
9983
9459
|
DocumentDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DocumentDialogComponent, selectors: [["ccd-document-dialog"]], decls: 15, vars: 0, consts: [[1, "dialog-header"], [1, "heading-h2", "x", 3, "click"], [1, "heading-h2", "dialog-title"], [1, "dialog-info"], [1, "text-info"], ["type", "button", "title", "Replace", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function DocumentDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
9984
9460
|
i0.ɵɵelementStart(0, "div");
|
|
9985
9461
|
i0.ɵɵelementStart(1, "div", 0);
|
|
@@ -10017,7 +9493,7 @@ DocumentDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DocumentDialogCom
|
|
|
10017
9493
|
templateUrl: './document-dialog.component.html',
|
|
10018
9494
|
styleUrls: ['../action-dialog.component.scss']
|
|
10019
9495
|
}]
|
|
10020
|
-
}], function () { return [{ type: i1$
|
|
9496
|
+
}], function () { return [{ type: i1$5.MatDialogRef }]; }, null); })();
|
|
10021
9497
|
|
|
10022
9498
|
function initDialog() {
|
|
10023
9499
|
const dialogConfig = new MatDialogConfig();
|
|
@@ -10324,7 +9800,7 @@ WriteDocumentFieldComponent.DOCUMENT_HASH = 'document_hash';
|
|
|
10324
9800
|
WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
10325
9801
|
WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
10326
9802
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
10327
|
-
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$
|
|
9803
|
+
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0.ɵɵdirectiveInject(AbstractAppConfig), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(DocumentManagementService), i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(FileUploadStateService)); };
|
|
10328
9804
|
WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
10329
9805
|
i0.ɵɵviewQuery(_c0$z, 1);
|
|
10330
9806
|
} if (rf & 2) {
|
|
@@ -10389,7 +9865,7 @@ WriteDocumentFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteDocument
|
|
|
10389
9865
|
selector: 'ccd-write-document-field',
|
|
10390
9866
|
templateUrl: './write-document-field.html'
|
|
10391
9867
|
}]
|
|
10392
|
-
}], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$
|
|
9868
|
+
}], function () { return [{ type: AbstractAppConfig }, { type: CaseNotifier }, { type: DocumentManagementService }, { type: i1$5.MatDialog }, { type: FileUploadStateService }]; }, { fileInput: [{
|
|
10393
9869
|
type: ViewChild,
|
|
10394
9870
|
args: ['fileInput', { static: false }]
|
|
10395
9871
|
}], clickout: [{
|
|
@@ -10858,705 +10334,1265 @@ FixedListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedList
|
|
|
10858
10334
|
|
|
10859
10335
|
class ReadFixedListFieldComponent extends AbstractFieldReadComponent {
|
|
10860
10336
|
}
|
|
10861
|
-
ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
|
|
10862
|
-
ReadFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedListFieldComponent, selectors: [["ccd-read-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10863
|
-
i0.ɵɵelementStart(0, "span", 0);
|
|
10864
|
-
i0.ɵɵtext(1);
|
|
10865
|
-
i0.ɵɵpipe(2, "ccdFixedList");
|
|
10337
|
+
ReadFixedListFieldComponent.ɵfac = function ReadFixedListFieldComponent_Factory(t) { return ɵReadFixedListFieldComponent_BaseFactory(t || ReadFixedListFieldComponent); };
|
|
10338
|
+
ReadFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedListFieldComponent, selectors: [["ccd-read-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10339
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
10340
|
+
i0.ɵɵtext(1);
|
|
10341
|
+
i0.ɵɵpipe(2, "ccdFixedList");
|
|
10342
|
+
i0.ɵɵelementEnd();
|
|
10343
|
+
} if (rf & 2) {
|
|
10344
|
+
i0.ɵɵadvance(1);
|
|
10345
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.list_items));
|
|
10346
|
+
} }, pipes: [FixedListPipe], encapsulation: 2 });
|
|
10347
|
+
const ɵReadFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadFixedListFieldComponent);
|
|
10348
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadFixedListFieldComponent, [{
|
|
10349
|
+
type: Component,
|
|
10350
|
+
args: [{
|
|
10351
|
+
selector: 'ccd-read-fixed-list-field',
|
|
10352
|
+
template: '<span class="text-16">{{caseField.value | ccdFixedList:caseField.list_items}}</span>',
|
|
10353
|
+
}]
|
|
10354
|
+
}], null, null); })();
|
|
10355
|
+
|
|
10356
|
+
function WriteFixedListFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
10357
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
10358
|
+
i0.ɵɵtext(1);
|
|
10359
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10360
|
+
i0.ɵɵelementEnd();
|
|
10361
|
+
} if (rf & 2) {
|
|
10362
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10363
|
+
i0.ɵɵadvance(1);
|
|
10364
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10365
|
+
} }
|
|
10366
|
+
function WriteFixedListFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
10367
|
+
i0.ɵɵelementStart(0, "span", 9);
|
|
10368
|
+
i0.ɵɵtext(1);
|
|
10369
|
+
i0.ɵɵelementEnd();
|
|
10370
|
+
} if (rf & 2) {
|
|
10371
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
10372
|
+
i0.ɵɵadvance(1);
|
|
10373
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10374
|
+
} }
|
|
10375
|
+
function WriteFixedListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
10376
|
+
i0.ɵɵelementStart(0, "span", 10);
|
|
10377
|
+
i0.ɵɵtext(1);
|
|
10378
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10379
|
+
i0.ɵɵelementEnd();
|
|
10380
|
+
} if (rf & 2) {
|
|
10381
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
10382
|
+
i0.ɵɵadvance(1);
|
|
10383
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedListFormControl.errors, ctx_r2.caseField.label));
|
|
10384
|
+
} }
|
|
10385
|
+
function WriteFixedListFieldComponent_option_8_Template(rf, ctx) { if (rf & 1) {
|
|
10386
|
+
i0.ɵɵelementStart(0, "option", 6);
|
|
10387
|
+
i0.ɵɵtext(1);
|
|
10388
|
+
i0.ɵɵelementEnd();
|
|
10389
|
+
} if (rf & 2) {
|
|
10390
|
+
const type_r4 = ctx.$implicit;
|
|
10391
|
+
i0.ɵɵproperty("ngValue", type_r4.code);
|
|
10392
|
+
i0.ɵɵadvance(1);
|
|
10393
|
+
i0.ɵɵtextInterpolate(type_r4.label);
|
|
10394
|
+
} }
|
|
10395
|
+
const _c0$v = function (a0) { return { "form-group-error": a0 }; };
|
|
10396
|
+
class WriteFixedListFieldComponent extends AbstractFieldWriteComponent {
|
|
10397
|
+
get listItems() {
|
|
10398
|
+
if (this.caseField) {
|
|
10399
|
+
if (this.caseField.list_items) {
|
|
10400
|
+
return this.caseField.list_items;
|
|
10401
|
+
}
|
|
10402
|
+
if (this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
10403
|
+
return this.caseField.formatted_value.list_items;
|
|
10404
|
+
}
|
|
10405
|
+
}
|
|
10406
|
+
return [];
|
|
10407
|
+
}
|
|
10408
|
+
ngOnInit() {
|
|
10409
|
+
const isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
10410
|
+
if (isNull) {
|
|
10411
|
+
this.caseField.value = null;
|
|
10412
|
+
}
|
|
10413
|
+
this.fixedListFormControl = this.registerControl(new FormControl(this.caseField.value));
|
|
10414
|
+
this.fixedListFormControl.setValue(this.caseField.value);
|
|
10415
|
+
}
|
|
10416
|
+
}
|
|
10417
|
+
WriteFixedListFieldComponent.ɵfac = function WriteFixedListFieldComponent_Factory(t) { return ɵWriteFixedListFieldComponent_BaseFactory(t || WriteFixedListFieldComponent); };
|
|
10418
|
+
WriteFixedListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedListFieldComponent, selectors: [["ccd-write-fixed-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 11, consts: [[1, "form-group", 3, "ngClass"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [1, "form-control", "ccd-dropdown", "bottom-30", 3, "id", "formControl"], [3, "ngValue"], [3, "ngValue", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"]], template: function WriteFixedListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10419
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
10420
|
+
i0.ɵɵelementStart(1, "label", 1);
|
|
10421
|
+
i0.ɵɵtemplate(2, WriteFixedListFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
10422
|
+
i0.ɵɵelementEnd();
|
|
10423
|
+
i0.ɵɵtemplate(3, WriteFixedListFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
10424
|
+
i0.ɵɵtemplate(4, WriteFixedListFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
10425
|
+
i0.ɵɵelementStart(5, "select", 5);
|
|
10426
|
+
i0.ɵɵelementStart(6, "option", 6);
|
|
10427
|
+
i0.ɵɵtext(7, "--Select a value--");
|
|
10428
|
+
i0.ɵɵelementEnd();
|
|
10429
|
+
i0.ɵɵtemplate(8, WriteFixedListFieldComponent_option_8_Template, 2, 2, "option", 7);
|
|
10430
|
+
i0.ɵɵelementEnd();
|
|
10431
|
+
i0.ɵɵelementEnd();
|
|
10432
|
+
} if (rf & 2) {
|
|
10433
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(9, _c0$v, !ctx.fixedListFormControl.valid && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched)));
|
|
10434
|
+
i0.ɵɵadvance(1);
|
|
10435
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
10436
|
+
i0.ɵɵadvance(1);
|
|
10437
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10438
|
+
i0.ɵɵadvance(1);
|
|
10439
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10440
|
+
i0.ɵɵadvance(1);
|
|
10441
|
+
i0.ɵɵproperty("ngIf", ctx.fixedListFormControl.errors && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched));
|
|
10442
|
+
i0.ɵɵadvance(1);
|
|
10443
|
+
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.fixedListFormControl);
|
|
10444
|
+
i0.ɵɵadvance(1);
|
|
10445
|
+
i0.ɵɵproperty("ngValue", null);
|
|
10446
|
+
i0.ɵɵadvance(2);
|
|
10447
|
+
i0.ɵɵproperty("ngForOf", ctx.listItems);
|
|
10448
|
+
} }, directives: [i1.NgClass, i1.NgIf, i1$3.SelectControlValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective, i1$3.NgSelectOption, i1$3.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10449
|
+
const ɵWriteFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedListFieldComponent);
|
|
10450
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedListFieldComponent, [{
|
|
10451
|
+
type: Component,
|
|
10452
|
+
args: [{
|
|
10453
|
+
selector: 'ccd-write-fixed-list-field',
|
|
10454
|
+
templateUrl: './write-fixed-list-field.html'
|
|
10455
|
+
}]
|
|
10456
|
+
}], null, null); })();
|
|
10457
|
+
|
|
10458
|
+
class FixedRadioListPipe {
|
|
10459
|
+
transform(value, items) {
|
|
10460
|
+
const item = items.find(i => i.code === value);
|
|
10461
|
+
return item ? item.label : FixedRadioListPipe.EMPTY;
|
|
10462
|
+
}
|
|
10463
|
+
}
|
|
10464
|
+
FixedRadioListPipe.EMPTY = '';
|
|
10465
|
+
FixedRadioListPipe.ɵfac = function FixedRadioListPipe_Factory(t) { return new (t || FixedRadioListPipe)(); };
|
|
10466
|
+
FixedRadioListPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdFixedRadioList", type: FixedRadioListPipe, pure: true });
|
|
10467
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedRadioListPipe, [{
|
|
10468
|
+
type: Pipe,
|
|
10469
|
+
args: [{
|
|
10470
|
+
name: 'ccdFixedRadioList'
|
|
10471
|
+
}]
|
|
10472
|
+
}], null, null); })();
|
|
10473
|
+
|
|
10474
|
+
class ReadFixedRadioListFieldComponent extends AbstractFieldReadComponent {
|
|
10475
|
+
}
|
|
10476
|
+
ReadFixedRadioListFieldComponent.ɵfac = function ReadFixedRadioListFieldComponent_Factory(t) { return ɵReadFixedRadioListFieldComponent_BaseFactory(t || ReadFixedRadioListFieldComponent); };
|
|
10477
|
+
ReadFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadFixedRadioListFieldComponent, selectors: [["ccd-read-fixed-radio-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 3, vars: 4, consts: [[1, "text-16"]], template: function ReadFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10478
|
+
i0.ɵɵelementStart(0, "span", 0);
|
|
10479
|
+
i0.ɵɵtext(1);
|
|
10480
|
+
i0.ɵɵpipe(2, "ccdFixedRadioList");
|
|
10481
|
+
i0.ɵɵelementEnd();
|
|
10482
|
+
} if (rf & 2) {
|
|
10483
|
+
i0.ɵɵadvance(1);
|
|
10484
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx.caseField.value, ctx.caseField.field_type.fixed_list_items));
|
|
10485
|
+
} }, pipes: [FixedRadioListPipe], encapsulation: 2 });
|
|
10486
|
+
const ɵReadFixedRadioListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadFixedRadioListFieldComponent);
|
|
10487
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadFixedRadioListFieldComponent, [{
|
|
10488
|
+
type: Component,
|
|
10489
|
+
args: [{
|
|
10490
|
+
selector: 'ccd-read-fixed-radio-list-field',
|
|
10491
|
+
template: '<span class="text-16">{{caseField.value | ccdFixedRadioList:caseField.field_type.fixed_list_items}}</span>',
|
|
10492
|
+
}]
|
|
10493
|
+
}], null, null); })();
|
|
10494
|
+
|
|
10495
|
+
function WriteFixedRadioListFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
10496
|
+
i0.ɵɵelementStart(0, "span", 6);
|
|
10497
|
+
i0.ɵɵtext(1);
|
|
10498
|
+
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10499
|
+
i0.ɵɵelementEnd();
|
|
10500
|
+
} if (rf & 2) {
|
|
10501
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10502
|
+
i0.ɵɵadvance(1);
|
|
10503
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10504
|
+
} }
|
|
10505
|
+
function WriteFixedRadioListFieldComponent_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
10506
|
+
i0.ɵɵelementStart(0, "span", 7);
|
|
10507
|
+
i0.ɵɵtext(1);
|
|
10508
|
+
i0.ɵɵelementEnd();
|
|
10509
|
+
} if (rf & 2) {
|
|
10510
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
10511
|
+
i0.ɵɵadvance(1);
|
|
10512
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10513
|
+
} }
|
|
10514
|
+
function WriteFixedRadioListFieldComponent_span_6_Template(rf, ctx) { if (rf & 1) {
|
|
10515
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
10516
|
+
i0.ɵɵtext(1);
|
|
10517
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10518
|
+
i0.ɵɵelementEnd();
|
|
10519
|
+
} if (rf & 2) {
|
|
10520
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
10521
|
+
i0.ɵɵadvance(1);
|
|
10522
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
10523
|
+
} }
|
|
10524
|
+
const _c0$u = function (a0) { return { selected: a0 }; };
|
|
10525
|
+
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
10526
|
+
i0.ɵɵelementStart(0, "div", 9);
|
|
10527
|
+
i0.ɵɵelement(1, "input", 10);
|
|
10528
|
+
i0.ɵɵelementStart(2, "label", 11);
|
|
10529
|
+
i0.ɵɵtext(3);
|
|
10530
|
+
i0.ɵɵelementEnd();
|
|
10531
|
+
i0.ɵɵelementEnd();
|
|
10532
|
+
} if (rf & 2) {
|
|
10533
|
+
const radioButton_r4 = ctx.$implicit;
|
|
10534
|
+
const ctx_r3 = i0.ɵɵnextContext();
|
|
10535
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$u, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
10536
|
+
i0.ɵɵadvance(1);
|
|
10537
|
+
i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
10538
|
+
i0.ɵɵadvance(1);
|
|
10539
|
+
i0.ɵɵproperty("for", ctx_r3.id() + "-" + radioButton_r4.code);
|
|
10540
|
+
i0.ɵɵadvance(1);
|
|
10541
|
+
i0.ɵɵtextInterpolate(radioButton_r4.label);
|
|
10542
|
+
} }
|
|
10543
|
+
const _c1$a = function (a0) { return { "form-group-error": a0 }; };
|
|
10544
|
+
class WriteFixedRadioListFieldComponent extends AbstractFieldWriteComponent {
|
|
10545
|
+
ngOnInit() {
|
|
10546
|
+
const notEmpty = this.caseField.value !== null && this.caseField.value !== undefined;
|
|
10547
|
+
this.fixedRadioListControl = this.registerControl(new FormControl(notEmpty ? this.caseField.value : null));
|
|
10548
|
+
}
|
|
10549
|
+
}
|
|
10550
|
+
WriteFixedRadioListFieldComponent.ɵfac = function WriteFixedRadioListFieldComponent_Factory(t) { return ɵWriteFixedRadioListFieldComponent_BaseFactory(t || WriteFixedRadioListFieldComponent); };
|
|
10551
|
+
WriteFixedRadioListFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteFixedRadioListFieldComponent, selectors: [["ccd-write-fixed-radio-list-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 9, vars: 9, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], [3, "for"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], ["class", "multiple-choice", 3, "ngClass", 4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice", 3, "ngClass"], ["type", "radio", 1, "form-control", 3, "id", "name", "formControl", "value"], [1, "form-label", 3, "for"]], template: function WriteFixedRadioListFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10552
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
10553
|
+
i0.ɵɵelementStart(1, "fieldset");
|
|
10554
|
+
i0.ɵɵelementStart(2, "legend");
|
|
10555
|
+
i0.ɵɵelementStart(3, "label", 1);
|
|
10556
|
+
i0.ɵɵtemplate(4, WriteFixedRadioListFieldComponent_span_4_Template, 3, 3, "span", 2);
|
|
10557
|
+
i0.ɵɵelementEnd();
|
|
10558
|
+
i0.ɵɵtemplate(5, WriteFixedRadioListFieldComponent_span_5_Template, 2, 1, "span", 3);
|
|
10559
|
+
i0.ɵɵtemplate(6, WriteFixedRadioListFieldComponent_span_6_Template, 3, 4, "span", 4);
|
|
10560
|
+
i0.ɵɵelementEnd();
|
|
10561
|
+
i0.ɵɵelementContainerStart(7);
|
|
10562
|
+
i0.ɵɵtemplate(8, WriteFixedRadioListFieldComponent_div_8_Template, 4, 9, "div", 5);
|
|
10563
|
+
i0.ɵɵelementContainerEnd();
|
|
10564
|
+
i0.ɵɵelementEnd();
|
|
10866
10565
|
i0.ɵɵelementEnd();
|
|
10867
10566
|
} if (rf & 2) {
|
|
10567
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1$a, !ctx.fixedRadioListControl.valid && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched)))("id", ctx.id());
|
|
10568
|
+
i0.ɵɵadvance(3);
|
|
10569
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
10868
10570
|
i0.ɵɵadvance(1);
|
|
10869
|
-
i0.ɵɵ
|
|
10870
|
-
|
|
10871
|
-
|
|
10872
|
-
(
|
|
10571
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10572
|
+
i0.ɵɵadvance(1);
|
|
10573
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10574
|
+
i0.ɵɵadvance(1);
|
|
10575
|
+
i0.ɵɵproperty("ngIf", ctx.fixedRadioListControl.errors && (ctx.fixedRadioListControl.dirty || ctx.fixedRadioListControl.touched));
|
|
10576
|
+
i0.ɵɵadvance(2);
|
|
10577
|
+
i0.ɵɵproperty("ngForOf", ctx.caseField.field_type.fixed_list_items);
|
|
10578
|
+
} }, directives: [i1.NgClass, i1.NgIf, i1.NgForOf, i1$3.RadioControlValueAccessor, i1$3.DefaultValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10579
|
+
const ɵWriteFixedRadioListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedRadioListFieldComponent);
|
|
10580
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
10873
10581
|
type: Component,
|
|
10874
10582
|
args: [{
|
|
10875
|
-
selector: 'ccd-
|
|
10876
|
-
|
|
10583
|
+
selector: 'ccd-write-fixed-radio-list-field',
|
|
10584
|
+
templateUrl: './write-fixed-radio-list-field.html'
|
|
10877
10585
|
}]
|
|
10878
10586
|
}], null, null); })();
|
|
10879
10587
|
|
|
10880
|
-
function
|
|
10881
|
-
i0.ɵɵ
|
|
10588
|
+
function EventLogTableComponent_tr_16_div_3_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
10589
|
+
const _r9 = i0.ɵɵgetCurrentView();
|
|
10590
|
+
i0.ɵɵelementStart(0, "a", 16);
|
|
10591
|
+
i0.ɵɵlistener("click", function EventLogTableComponent_tr_16_div_3_a_1_Template_a_click_0_listener() { i0.ɵɵrestoreView(_r9); const event_r1 = i0.ɵɵnextContext(2).$implicit; const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.caseHistoryClicked(event_r1.id); });
|
|
10882
10592
|
i0.ɵɵtext(1);
|
|
10883
|
-
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
10884
10593
|
i0.ɵɵelementEnd();
|
|
10885
10594
|
} if (rf & 2) {
|
|
10886
|
-
const
|
|
10595
|
+
const event_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
10596
|
+
const ctx_r6 = i0.ɵɵnextContext();
|
|
10597
|
+
i0.ɵɵattribute("aria-label", ctx_r6.getAriaLabelforLink(event_r1));
|
|
10887
10598
|
i0.ɵɵadvance(1);
|
|
10888
|
-
i0.ɵɵtextInterpolate(
|
|
10599
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10889
10600
|
} }
|
|
10890
|
-
function
|
|
10891
|
-
i0.ɵɵelementStart(0, "
|
|
10892
|
-
i0.ɵɵ
|
|
10601
|
+
function EventLogTableComponent_tr_16_div_3_Template(rf, ctx) { if (rf & 1) {
|
|
10602
|
+
i0.ɵɵelementStart(0, "div", 14);
|
|
10603
|
+
i0.ɵɵtemplate(1, EventLogTableComponent_tr_16_div_3_a_1_Template, 2, 2, "a", 15);
|
|
10893
10604
|
i0.ɵɵelementEnd();
|
|
10894
10605
|
} if (rf & 2) {
|
|
10895
|
-
const
|
|
10606
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10896
10607
|
i0.ɵɵadvance(1);
|
|
10897
|
-
i0.ɵɵ
|
|
10608
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id !== "Draft");
|
|
10898
10609
|
} }
|
|
10899
|
-
function
|
|
10900
|
-
|
|
10610
|
+
const _c0$t = function (a2) { return ["./", "event", a2, "history"]; };
|
|
10611
|
+
function EventLogTableComponent_tr_16_div_4_a_1_Template(rf, ctx) { if (rf & 1) {
|
|
10612
|
+
i0.ɵɵelementStart(0, "a", 18);
|
|
10901
10613
|
i0.ɵɵtext(1);
|
|
10902
|
-
i0.ɵɵpipe(2, "ccdFirstError");
|
|
10903
10614
|
i0.ɵɵelementEnd();
|
|
10904
10615
|
} if (rf & 2) {
|
|
10905
|
-
const
|
|
10616
|
+
const event_r1 = i0.ɵɵnextContext(2).$implicit;
|
|
10617
|
+
const ctx_r12 = i0.ɵɵnextContext();
|
|
10618
|
+
i0.ɵɵproperty("routerLink", i0.ɵɵpureFunction1(4, _c0$t, event_r1.id))("target", "_blank");
|
|
10619
|
+
i0.ɵɵattribute("aria-label", ctx_r12.getAriaLabelforLink(event_r1));
|
|
10906
10620
|
i0.ɵɵadvance(1);
|
|
10907
|
-
i0.ɵɵtextInterpolate(
|
|
10621
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10908
10622
|
} }
|
|
10909
|
-
function
|
|
10910
|
-
i0.ɵɵelementStart(0, "
|
|
10623
|
+
function EventLogTableComponent_tr_16_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
10624
|
+
i0.ɵɵelementStart(0, "div");
|
|
10625
|
+
i0.ɵɵtemplate(1, EventLogTableComponent_tr_16_div_4_a_1_Template, 2, 6, "a", 17);
|
|
10626
|
+
i0.ɵɵelementEnd();
|
|
10627
|
+
} if (rf & 2) {
|
|
10628
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10629
|
+
i0.ɵɵadvance(1);
|
|
10630
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id !== "Draft");
|
|
10631
|
+
} }
|
|
10632
|
+
function EventLogTableComponent_tr_16_span_5_Template(rf, ctx) { if (rf & 1) {
|
|
10633
|
+
i0.ɵɵelementStart(0, "span");
|
|
10911
10634
|
i0.ɵɵtext(1);
|
|
10912
10635
|
i0.ɵɵelementEnd();
|
|
10913
10636
|
} if (rf & 2) {
|
|
10914
|
-
const
|
|
10915
|
-
i0.ɵɵproperty("ngValue", type_r4.code);
|
|
10637
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10916
10638
|
i0.ɵɵadvance(1);
|
|
10917
|
-
i0.ɵɵtextInterpolate(
|
|
10639
|
+
i0.ɵɵtextInterpolate(event_r1.event_name);
|
|
10918
10640
|
} }
|
|
10919
|
-
|
|
10920
|
-
|
|
10921
|
-
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
|
|
10925
|
-
|
|
10926
|
-
|
|
10927
|
-
|
|
10928
|
-
|
|
10929
|
-
|
|
10930
|
-
|
|
10641
|
+
function EventLogTableComponent_tr_16_div_6_Template(rf, ctx) { if (rf & 1) {
|
|
10642
|
+
i0.ɵɵelementStart(0, "div", 19);
|
|
10643
|
+
i0.ɵɵelementStart(1, "a", 20);
|
|
10644
|
+
i0.ɵɵelement(2, "img", 21);
|
|
10645
|
+
i0.ɵɵelementEnd();
|
|
10646
|
+
i0.ɵɵelementStart(3, "span", 22);
|
|
10647
|
+
i0.ɵɵtext(4);
|
|
10648
|
+
i0.ɵɵelementEnd();
|
|
10649
|
+
i0.ɵɵelementEnd();
|
|
10650
|
+
} if (rf & 2) {
|
|
10651
|
+
const event_r1 = i0.ɵɵnextContext().$implicit;
|
|
10652
|
+
const ctx_r5 = i0.ɵɵnextContext();
|
|
10653
|
+
i0.ɵɵadvance(1);
|
|
10654
|
+
i0.ɵɵpropertyInterpolate("href", ctx_r5.getSignificantItemUrl(event_r1), i0.ɵɵsanitizeUrl);
|
|
10655
|
+
i0.ɵɵattribute("aria-label", ctx_r5.getAriaLabelforLink(event_r1));
|
|
10656
|
+
i0.ɵɵadvance(3);
|
|
10657
|
+
i0.ɵɵtextInterpolate(ctx_r5.getSignificantItemDesc(event_r1));
|
|
10658
|
+
} }
|
|
10659
|
+
const _c1$9 = function (a0) { return { "EventLogTable-Selected": a0 }; };
|
|
10660
|
+
function EventLogTableComponent_tr_16_Template(rf, ctx) { if (rf & 1) {
|
|
10661
|
+
const _r18 = i0.ɵɵgetCurrentView();
|
|
10662
|
+
i0.ɵɵelementStart(0, "tr", 4);
|
|
10663
|
+
i0.ɵɵlistener("click", function EventLogTableComponent_tr_16_Template_tr_click_0_listener() { i0.ɵɵrestoreView(_r18); const event_r1 = ctx.$implicit; const ctx_r17 = i0.ɵɵnextContext(); return ctx_r17.select(event_r1); });
|
|
10664
|
+
i0.ɵɵelementStart(1, "td");
|
|
10665
|
+
i0.ɵɵelementContainerStart(2, 5);
|
|
10666
|
+
i0.ɵɵtemplate(3, EventLogTableComponent_tr_16_div_3_Template, 2, 1, "div", 6);
|
|
10667
|
+
i0.ɵɵtemplate(4, EventLogTableComponent_tr_16_div_4_Template, 2, 1, "div", 7);
|
|
10668
|
+
i0.ɵɵelementContainerEnd();
|
|
10669
|
+
i0.ɵɵtemplate(5, EventLogTableComponent_tr_16_span_5_Template, 2, 1, "span", 8);
|
|
10670
|
+
i0.ɵɵtemplate(6, EventLogTableComponent_tr_16_div_6_Template, 5, 3, "div", 9);
|
|
10671
|
+
i0.ɵɵelementEnd();
|
|
10672
|
+
i0.ɵɵelementStart(7, "td", 10);
|
|
10673
|
+
i0.ɵɵlistener("keydown.enter", function EventLogTableComponent_tr_16_Template_td_keydown_enter_7_listener() { i0.ɵɵrestoreView(_r18); const event_r1 = ctx.$implicit; const ctx_r19 = i0.ɵɵnextContext(); return ctx_r19.select(event_r1); });
|
|
10674
|
+
i0.ɵɵelementStart(8, "div", 11);
|
|
10675
|
+
i0.ɵɵtext(9);
|
|
10676
|
+
i0.ɵɵpipe(10, "ccdDate");
|
|
10677
|
+
i0.ɵɵelementStart(11, "span", 12);
|
|
10678
|
+
i0.ɵɵtext(12);
|
|
10679
|
+
i0.ɵɵpipe(13, "ccdDate");
|
|
10680
|
+
i0.ɵɵelementEnd();
|
|
10681
|
+
i0.ɵɵelementEnd();
|
|
10682
|
+
i0.ɵɵelementEnd();
|
|
10683
|
+
i0.ɵɵelementStart(14, "td", 13);
|
|
10684
|
+
i0.ɵɵelementStart(15, "span", 2);
|
|
10685
|
+
i0.ɵɵtext(16);
|
|
10686
|
+
i0.ɵɵpipe(17, "titlecase");
|
|
10687
|
+
i0.ɵɵpipe(18, "uppercase");
|
|
10688
|
+
i0.ɵɵelementEnd();
|
|
10689
|
+
i0.ɵɵelementEnd();
|
|
10690
|
+
i0.ɵɵelementEnd();
|
|
10691
|
+
} if (rf & 2) {
|
|
10692
|
+
const event_r1 = ctx.$implicit;
|
|
10693
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
10694
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(22, _c1$9, ctx_r0.selected === event_r1));
|
|
10695
|
+
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforRow(event_r1));
|
|
10696
|
+
i0.ɵɵadvance(2);
|
|
10697
|
+
i0.ɵɵproperty("ngSwitch", ctx_r0.isPartOfCaseTimeline);
|
|
10698
|
+
i0.ɵɵadvance(1);
|
|
10699
|
+
i0.ɵɵproperty("ngSwitchCase", true);
|
|
10700
|
+
i0.ɵɵadvance(1);
|
|
10701
|
+
i0.ɵɵproperty("ngSwitchCase", false);
|
|
10702
|
+
i0.ɵɵadvance(1);
|
|
10703
|
+
i0.ɵɵproperty("ngIf", event_r1.state_id === "Draft");
|
|
10704
|
+
i0.ɵɵadvance(1);
|
|
10705
|
+
i0.ɵɵproperty("ngIf", ctx_r0.significantItemExist(event_r1));
|
|
10706
|
+
i0.ɵɵadvance(1);
|
|
10707
|
+
i0.ɵɵattribute("aria-label", ctx_r0.getAriaLabelforColumn(event_r1));
|
|
10708
|
+
i0.ɵɵadvance(2);
|
|
10709
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(10, 12, event_r1.timestamp, "local"), " ");
|
|
10710
|
+
i0.ɵɵadvance(3);
|
|
10711
|
+
i0.ɵɵtextInterpolate1("Local: ", i0.ɵɵpipeBind2(13, 15, event_r1.timestamp, "local"), "");
|
|
10712
|
+
i0.ɵɵadvance(4);
|
|
10713
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(17, 18, event_r1.user_first_name), " ", i0.ɵɵpipeBind1(18, 20, event_r1.user_last_name), "");
|
|
10714
|
+
} }
|
|
10715
|
+
class EventLogTableComponent {
|
|
10716
|
+
constructor() {
|
|
10717
|
+
this.onSelect = new EventEmitter();
|
|
10718
|
+
this.onCaseHistory = new EventEmitter();
|
|
10719
|
+
this.isPartOfCaseTimeline = false;
|
|
10931
10720
|
}
|
|
10932
10721
|
ngOnInit() {
|
|
10933
|
-
|
|
10934
|
-
|
|
10935
|
-
|
|
10722
|
+
this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
|
|
10723
|
+
}
|
|
10724
|
+
select(event) {
|
|
10725
|
+
this.selected = event;
|
|
10726
|
+
this.onSelect.emit(event);
|
|
10727
|
+
}
|
|
10728
|
+
significantItemExist(event) {
|
|
10729
|
+
return (event.significant_item &&
|
|
10730
|
+
event.significant_item.type === 'DOCUMENT' &&
|
|
10731
|
+
event.significant_item.url !== undefined &&
|
|
10732
|
+
event.significant_item.description !== undefined);
|
|
10733
|
+
}
|
|
10734
|
+
getSignificantItemUrl(event) {
|
|
10735
|
+
if (event.significant_item) {
|
|
10736
|
+
return event.significant_item.url;
|
|
10936
10737
|
}
|
|
10937
|
-
|
|
10938
|
-
|
|
10738
|
+
}
|
|
10739
|
+
getSignificantItemDesc(event) {
|
|
10740
|
+
if (event.significant_item) {
|
|
10741
|
+
return event.significant_item.description;
|
|
10742
|
+
}
|
|
10743
|
+
}
|
|
10744
|
+
caseHistoryClicked(eventId) {
|
|
10745
|
+
this.onCaseHistory.emit(eventId);
|
|
10746
|
+
}
|
|
10747
|
+
getAriaLabelforColumn(event) {
|
|
10748
|
+
if (this.selected !== event) {
|
|
10749
|
+
return `date ${formatDate(event.timestamp, 'dd MMM yyyy hh:mm:ss a', 'en-GB')},
|
|
10750
|
+
press enter key for event ${event.event_name} details`;
|
|
10751
|
+
}
|
|
10752
|
+
else {
|
|
10753
|
+
return '';
|
|
10754
|
+
}
|
|
10755
|
+
}
|
|
10756
|
+
getAriaLabelforRow(event) {
|
|
10757
|
+
return `you are on event ${event.event_name} row, press tab key to navigate to columns`;
|
|
10758
|
+
}
|
|
10759
|
+
getAriaLabelforLink(event) {
|
|
10760
|
+
return `press enter key to open event ${event.event_name} link in separate window`;
|
|
10939
10761
|
}
|
|
10940
10762
|
}
|
|
10941
|
-
|
|
10942
|
-
|
|
10943
|
-
i0.ɵɵelementStart(0, "
|
|
10944
|
-
i0.ɵɵelementStart(1, "
|
|
10945
|
-
i0.ɵɵ
|
|
10763
|
+
EventLogTableComponent.ɵfac = function EventLogTableComponent_Factory(t) { return new (t || EventLogTableComponent)(); };
|
|
10764
|
+
EventLogTableComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogTableComponent, selectors: [["ccd-event-log-table"]], inputs: { events: "events", selected: "selected" }, outputs: { onSelect: "onSelect", onCaseHistory: "onCaseHistory" }, decls: 17, vars: 1, consts: [[1, "EventLogTable"], [1, "heading-h2"], [1, "text-16"], ["tabindex", "0", 3, "ngClass", "click", 4, "ngFor", "ngForOf"], ["tabindex", "0", 3, "ngClass", "click"], [3, "ngSwitch"], ["id", "case-timeline", 4, "ngSwitchCase"], [4, "ngSwitchCase"], [4, "ngIf"], ["class", "tooltip", 4, "ngIf"], ["tabindex", "0", 3, "keydown.enter"], [1, "tooltip", "text-16"], [1, "tooltiptext"], ["tabindex", "0"], ["id", "case-timeline"], ["class", "text-16 event-link", 3, "click", 4, "ngIf"], [1, "text-16", "event-link", 3, "click"], ["class", "text-16 event-link", 3, "routerLink", "target", 4, "ngIf"], [1, "text-16", "event-link", 3, "routerLink", "target"], [1, "tooltip"], ["target", "_blank", "rel", "noopener", 3, "href"], ["alt", "document image", "src", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABoCAYAAABmOHdtAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABl0RVh0U29mdHdhcmUAcGFpbnQubmV0IDQuMC4yMfEgaZUAAAkoSURBVHhe7d33c5RFHAZw/wCKiF0s2LAwiigq9l5G/UV/UUeFkEAoQqiWoKKI1Dg6YxQQbGmkXQoJIQQiaSShhiQMkgIphCSXkN4buPtcnnDG9fXCa+FN9mY+M5Lce7f3ZPb2u/vu+3rRsKn+Z4ey4e7BIB4XnQ8doA7QHB2gSTpAk3SAJlk+wOG9VL/7L+gATbrgAxzlHgAM6skVcTDhw2i4daENXvbZCXd9EAU8fqRbADi/5j9JB2jSBRvg2Hmh8MAnMbAl/Ths+jUPqhvboLapHXJKTkPU/mKI2FcEdyyJhOvmhoLqvczQAZp0wQU4YVEAuPnGw5GTtdDd0wOdXd3Q1uGQXVID/HlXdw+0tHVCWU0zvLMhFSZ5R4Dqvc+HDtCkCybAW8RAIHn6xkJpuR3aOrqgqqEVPDanwZu+u8HLLwPY1aduTAF7fSvwuLqmNliweRfc6x0JqrYMxN8FONwj9Cz0Pq8/HWBvEP2Do389wFHugTDROxqOldcDu2hmfiXcucQGN8wLgxHiWOnc6zjKncs9t8DVs4Ih+kAxFFY2QK0IUXr1q11wvRhYJOc2DQSD6B8cDXMLPAuKYyUd4P8d4Eg3B7+UfOgRA4V0XHxYafx7kcCCePT0IHhudTyEZZ6Al9YlAAO+bEbQH8RlnYT6lg4oqW6CG+eHw7Apfg6KNhrRAVo9wAeXxcKu3DJgOTLn53S4cmYwMLiA1AI4VdsCja0dwC5feroZOKXjcWO9woDHtbSLMkfYmHgMVG1zhQ7Q6gHyg/IDnbA3AssRLiLM/SUDyutagc8vrmoEDj4suAsqGuCa2SFwuWcQLAzIhJ6eMxCYVgi3LY4AVRuN6ACtHuALaxKgobUT8kUI0uRlMcAy5+fkfOjsktO5nr4pHrvmG75JUFzdDE1iGie9/s1uuHiaP7y4NgH4B8gtrYFJH8eAqo1GdIBWD5BTs6KqJmCZMW5RBLAgfmd9MvDxeeRhYNe7QhTPUqWYvkFdC2xK/A34fl9EHYZ80b2lmqZ2GPNuKDi3zRU6QKsHyC7F4PjB7vsoBi6eFgCBaQXQ0dkN2cWn4VJRJEvsgtuzSqFdPEd6ZlU8cKr31BfxwN/zDzdZlFKSqo1GdIBWD3D8+1HAQvhQUTWc+/J3BLj1QDHwyz+zwA4MhoH/euQUsJzhFO8SjwC4X4QscZks6Wg5vOKzE1RtNKIDtHqAb36bBOVieiXVN7cDB4crZ24Bt+9TgQXwmpgc4GDDQrm6oRUqxAAi+cTmwAg3f+Agwikfnz9mdjCo2mhEB2j1AN/6Lgn4gVhWjFtkg9EegbA8MgvYNW37ioFTNRbUHIRYmE8XJZLE5TD+u0EMWNLpxjbg8ao2GtEBWj3AmxeEAx9ZYgCR5vllAAeR2EMl0NDSDnweBxGWKzyxztObj6/YDix3uHzGQcS2twg42KjaaEQHaPUAH/9cfEChTgwcUm1zBzz82TZgF14hvvglLiYE7SkEdmEuzXM5jIW55w9pwFMHM8R/S/0Ld8t2YR2g4ocD4bYxBfYXVgG/3Lm5iEv67ptSgY8vt+UCt7dd+24osBzilo5l4QeBC7OrtmYDyxwue42ZEwKqNhrRAVo9QBbMreILXWIXfHtDCnAQCU4/DpzK7cmrgNHTRRcXuBiwJ68S+HrPrNoBl4ivAenplduBiwmJuWXAKZ6qjUZ0gIMlwOa2DiiqaoS31ydDX4BiwJAYYNqxCmB5wkEnI98OXJx4emU8jHKX2z/8UepIDHBXThnoAIdqgAyKm4h4ovxGr1DoG0S+TwE+1okBRLpFFOHSdXPDgEv6nBouDT0AfL/V0Yfhz4NIKDi3zRU6QKsH+NCnscBFBBbULLA5SKyMzgYu6funFsBVs4Lh5gU2KBGhSXy9KRuSgYsJM3/cAyyX8srrYaxXOKjaaEQHaPUAOYXqFhN/iSfMFwdmAhcLth8uBXbxgyeqgL/nhTbx4jkSNylxcOAmo4dEqSNxEAkRpZH0wtoEULXRiA7Q6gG+9nUiFFY2Aif549+LAJYpq7bmABdUt4iSRrp6dghwaZ8bJ9mFueWDS/qzf0qHxtZOsNe3ADdmqtpoRAdo9QB5OrFYfGiJZcWED6OAWzs8f0wHnlRaHpEFXJBlucM/AKeEH4UdAC4mrI3NBS46cAsIl8VUbTSiA7R6gFyOYnBHy+pgmiiaJW5L25F9ErhIkHy0HPj7J1bEAZfFuPD66PI44GDz8Kdiyie0d3ZBgpjGSc+K6Z2kaqMRHaDVA3xMfDiJW3W5NfeRz7YBP3h45nHoEKWJtK/QDiy0n1udAPx5S3sX3Lt0KzDo59fsAAbIQnri0mhQtdGIDtDqAbJ8mLIhBbi5nFs6eKE0p2B8LAnaCzfNDwdukOQF2OzK3MrB91sXmwMn7A3ARQXLDiI6QMUPzwfLDE76+XMW0ryEn4PDT0l5wNOeDJqDREh6IfAPwdOaz68WXVjglJCD1kTRzSXnNrlCBzhYAvwrnIIliBJG4pI+bzLBJX8+n4MO/yA8ngFy0OKUMPVYBXDp3/m9XaEDHOwBcirHDZWcyn0spmcSp3CqY50xUF4yxsHjVE0z8JYDqmON6AAHe4C8gIYX1jBAn225wPJFdawzBsibVHARgUFyEFIda0QHONgDpK/jcoHlB28e4WoBfKmY7kncUtzVLW/S091XHvHiRtWxRnSAgz7A3ptBcNmLS/a8+VjU/iLg7U5YtvB4bioatzAceHkrb27Bk0osf/7w3i7QAQ76AHtxAyVPlPNWTly6z8ivhDd8d8NLPjvBY1Mq8CZlvClZQXkd8OJDHaAO0DWTvG3gtTkRePqSgwJPmPMSLm5zO3PmDBRW1IPHehGucNuicFC9lyt0gEMtQLr7gyjg1g0uCrCrcoq2t8AOyb9VABcTbl9sA9VrD4QOUPHaA2HZAIk3Fxsx1Q/u8Y4GBsugeVKJ2+FUr3U+dIAmWT7A/5sO0CQdoEk6QJN0gCbpAE0yHSBfYKgaMcMG/YMjHeDfMB2g6iDtHB2gSTpAk3SAJukATdIBmvSvBcj/UUnfGwxWitCcKcNxhQ7QQRmOK1iIql50KFGG4wodoIMyHFfoAB2U4bhCB+igDMcVOkAHZTiu0AFK/md/Bw8XevIIyEqZAAAAAElFTkSuQmCC", 1, "doc-img"], [1, "tooltiptext", "doc-tooltip"]], template: function EventLogTableComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10765
|
+
i0.ɵɵelementStart(0, "table", 0);
|
|
10766
|
+
i0.ɵɵelementStart(1, "caption");
|
|
10767
|
+
i0.ɵɵelementStart(2, "h2", 1);
|
|
10768
|
+
i0.ɵɵtext(3, "History");
|
|
10769
|
+
i0.ɵɵelementEnd();
|
|
10770
|
+
i0.ɵɵelementEnd();
|
|
10771
|
+
i0.ɵɵelementStart(4, "thead");
|
|
10772
|
+
i0.ɵɵelementStart(5, "tr");
|
|
10773
|
+
i0.ɵɵelementStart(6, "th");
|
|
10774
|
+
i0.ɵɵelementStart(7, "span", 2);
|
|
10775
|
+
i0.ɵɵtext(8, "Event");
|
|
10776
|
+
i0.ɵɵelementEnd();
|
|
10777
|
+
i0.ɵɵelementEnd();
|
|
10778
|
+
i0.ɵɵelementStart(9, "th");
|
|
10779
|
+
i0.ɵɵelementStart(10, "span", 2);
|
|
10780
|
+
i0.ɵɵtext(11, "Date");
|
|
10946
10781
|
i0.ɵɵelementEnd();
|
|
10947
|
-
i0.ɵɵtemplate(3, WriteFixedListFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
10948
|
-
i0.ɵɵtemplate(4, WriteFixedListFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
10949
|
-
i0.ɵɵelementStart(5, "select", 5);
|
|
10950
|
-
i0.ɵɵelementStart(6, "option", 6);
|
|
10951
|
-
i0.ɵɵtext(7, "--Select a value--");
|
|
10952
10782
|
i0.ɵɵelementEnd();
|
|
10953
|
-
i0.ɵɵ
|
|
10783
|
+
i0.ɵɵelementStart(12, "th");
|
|
10784
|
+
i0.ɵɵelementStart(13, "span", 2);
|
|
10785
|
+
i0.ɵɵtext(14, "Author");
|
|
10786
|
+
i0.ɵɵelementEnd();
|
|
10787
|
+
i0.ɵɵelementEnd();
|
|
10788
|
+
i0.ɵɵelementEnd();
|
|
10789
|
+
i0.ɵɵelementEnd();
|
|
10790
|
+
i0.ɵɵelementStart(15, "tbody");
|
|
10791
|
+
i0.ɵɵtemplate(16, EventLogTableComponent_tr_16_Template, 19, 24, "tr", 3);
|
|
10954
10792
|
i0.ɵɵelementEnd();
|
|
10955
10793
|
i0.ɵɵelementEnd();
|
|
10956
10794
|
} if (rf & 2) {
|
|
10957
|
-
i0.ɵɵ
|
|
10958
|
-
i0.ɵɵ
|
|
10959
|
-
|
|
10960
|
-
|
|
10961
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
10962
|
-
i0.ɵɵadvance(1);
|
|
10963
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
10964
|
-
i0.ɵɵadvance(1);
|
|
10965
|
-
i0.ɵɵproperty("ngIf", ctx.fixedListFormControl.errors && (ctx.fixedListFormControl.dirty || ctx.fixedListFormControl.touched));
|
|
10966
|
-
i0.ɵɵadvance(1);
|
|
10967
|
-
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.fixedListFormControl);
|
|
10968
|
-
i0.ɵɵadvance(1);
|
|
10969
|
-
i0.ɵɵproperty("ngValue", null);
|
|
10970
|
-
i0.ɵɵadvance(2);
|
|
10971
|
-
i0.ɵɵproperty("ngForOf", ctx.listItems);
|
|
10972
|
-
} }, directives: [i1.NgClass, i1.NgIf, i1$3.SelectControlValueAccessor, i1$3.NgControlStatus, i1$3.FormControlDirective, i1$3.NgSelectOption, i1$3.ɵangular_packages_forms_forms_z, i1.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
10973
|
-
const ɵWriteFixedListFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteFixedListFieldComponent);
|
|
10974
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedListFieldComponent, [{
|
|
10795
|
+
i0.ɵɵadvance(16);
|
|
10796
|
+
i0.ɵɵproperty("ngForOf", ctx.events);
|
|
10797
|
+
} }, directives: [i1.NgForOf, i1.NgClass, i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, i1$1.RouterLinkWithHref], pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe], styles: ["#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#2b8cc4}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{color:#4c2c92}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:10px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%]{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]{float:left;padding-right:8px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-img[_ngcontent-%COMP%]{width:16px;float:left}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]{left:35%;bottom:7px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]:after{border-color:transparent}"] });
|
|
10798
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
10975
10799
|
type: Component,
|
|
10976
10800
|
args: [{
|
|
10977
|
-
selector: 'ccd-
|
|
10978
|
-
templateUrl: './
|
|
10801
|
+
selector: 'ccd-event-log-table',
|
|
10802
|
+
templateUrl: './event-log-table.component.html',
|
|
10803
|
+
styleUrls: ['./event-log-table.scss']
|
|
10979
10804
|
}]
|
|
10980
|
-
}], null,
|
|
10805
|
+
}], null, { events: [{
|
|
10806
|
+
type: Input
|
|
10807
|
+
}], selected: [{
|
|
10808
|
+
type: Input
|
|
10809
|
+
}], onSelect: [{
|
|
10810
|
+
type: Output
|
|
10811
|
+
}], onCaseHistory: [{
|
|
10812
|
+
type: Output
|
|
10813
|
+
}] }); })();
|
|
10981
10814
|
|
|
10982
|
-
class
|
|
10983
|
-
transform(value
|
|
10984
|
-
|
|
10985
|
-
return item ? item.label : FixedRadioListPipe.EMPTY;
|
|
10815
|
+
class DashPipe {
|
|
10816
|
+
transform(value) {
|
|
10817
|
+
return value ? value : '-';
|
|
10986
10818
|
}
|
|
10987
10819
|
}
|
|
10988
|
-
|
|
10989
|
-
|
|
10990
|
-
|
|
10991
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FixedRadioListPipe, [{
|
|
10820
|
+
DashPipe.ɵfac = function DashPipe_Factory(t) { return new (t || DashPipe)(); };
|
|
10821
|
+
DashPipe.ɵpipe = i0.ɵɵdefinePipe({ name: "ccdDash", type: DashPipe, pure: true });
|
|
10822
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DashPipe, [{
|
|
10992
10823
|
type: Pipe,
|
|
10993
10824
|
args: [{
|
|
10994
|
-
name: '
|
|
10825
|
+
name: 'ccdDash'
|
|
10995
10826
|
}]
|
|
10996
10827
|
}], null, null); })();
|
|
10997
10828
|
|
|
10998
|
-
class
|
|
10829
|
+
class EventLogDetailsComponent {
|
|
10999
10830
|
}
|
|
11000
|
-
|
|
11001
|
-
|
|
11002
|
-
i0.ɵɵelementStart(0, "
|
|
11003
|
-
i0.ɵɵ
|
|
11004
|
-
i0.ɵɵ
|
|
10831
|
+
EventLogDetailsComponent.ɵfac = function EventLogDetailsComponent_Factory(t) { return new (t || EventLogDetailsComponent)(); };
|
|
10832
|
+
EventLogDetailsComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogDetailsComponent, selectors: [["ccd-event-log-details"]], inputs: { event: "event" }, decls: 52, vars: 18, consts: [["tabindex", "0", 1, "EventLogDetails"], [1, "heading-h2"], ["tabindex", "0", "aria-live", "polite"], [1, "text-16"], [1, "tooltip", "text-16"]], template: function EventLogDetailsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
10833
|
+
i0.ɵɵelementStart(0, "table", 0);
|
|
10834
|
+
i0.ɵɵelementStart(1, "caption");
|
|
10835
|
+
i0.ɵɵelementStart(2, "h2", 1);
|
|
10836
|
+
i0.ɵɵtext(3, "Details");
|
|
10837
|
+
i0.ɵɵelementEnd();
|
|
10838
|
+
i0.ɵɵelementEnd();
|
|
10839
|
+
i0.ɵɵelementStart(4, "tbody", 2);
|
|
10840
|
+
i0.ɵɵelementStart(5, "tr");
|
|
10841
|
+
i0.ɵɵelementStart(6, "th");
|
|
10842
|
+
i0.ɵɵelementStart(7, "span", 3);
|
|
10843
|
+
i0.ɵɵtext(8, "Date");
|
|
10844
|
+
i0.ɵɵelementEnd();
|
|
10845
|
+
i0.ɵɵelementEnd();
|
|
10846
|
+
i0.ɵɵelementStart(9, "td");
|
|
10847
|
+
i0.ɵɵelementStart(10, "div", 4);
|
|
10848
|
+
i0.ɵɵtext(11);
|
|
10849
|
+
i0.ɵɵpipe(12, "ccdDate");
|
|
10850
|
+
i0.ɵɵelementEnd();
|
|
10851
|
+
i0.ɵɵelementEnd();
|
|
10852
|
+
i0.ɵɵelementEnd();
|
|
10853
|
+
i0.ɵɵelementStart(13, "tr");
|
|
10854
|
+
i0.ɵɵelementStart(14, "th");
|
|
10855
|
+
i0.ɵɵelementStart(15, "span", 3);
|
|
10856
|
+
i0.ɵɵtext(16, "Author");
|
|
10857
|
+
i0.ɵɵelementEnd();
|
|
10858
|
+
i0.ɵɵelementEnd();
|
|
10859
|
+
i0.ɵɵelementStart(17, "td");
|
|
10860
|
+
i0.ɵɵelementStart(18, "span", 3);
|
|
10861
|
+
i0.ɵɵtext(19);
|
|
10862
|
+
i0.ɵɵpipe(20, "titlecase");
|
|
10863
|
+
i0.ɵɵpipe(21, "uppercase");
|
|
10864
|
+
i0.ɵɵelementEnd();
|
|
10865
|
+
i0.ɵɵelementEnd();
|
|
10866
|
+
i0.ɵɵelementEnd();
|
|
10867
|
+
i0.ɵɵelementStart(22, "tr");
|
|
10868
|
+
i0.ɵɵelementStart(23, "th");
|
|
10869
|
+
i0.ɵɵelementStart(24, "span", 3);
|
|
10870
|
+
i0.ɵɵtext(25, "End state");
|
|
10871
|
+
i0.ɵɵelementEnd();
|
|
10872
|
+
i0.ɵɵelementEnd();
|
|
10873
|
+
i0.ɵɵelementStart(26, "td");
|
|
10874
|
+
i0.ɵɵelementStart(27, "span", 3);
|
|
10875
|
+
i0.ɵɵtext(28);
|
|
10876
|
+
i0.ɵɵelementEnd();
|
|
10877
|
+
i0.ɵɵelementEnd();
|
|
10878
|
+
i0.ɵɵelementEnd();
|
|
10879
|
+
i0.ɵɵelementStart(29, "tr");
|
|
10880
|
+
i0.ɵɵelementStart(30, "th");
|
|
10881
|
+
i0.ɵɵelementStart(31, "span", 3);
|
|
10882
|
+
i0.ɵɵtext(32, "Event");
|
|
10883
|
+
i0.ɵɵelementEnd();
|
|
10884
|
+
i0.ɵɵelementEnd();
|
|
10885
|
+
i0.ɵɵelementStart(33, "td");
|
|
10886
|
+
i0.ɵɵelementStart(34, "span", 3);
|
|
10887
|
+
i0.ɵɵtext(35);
|
|
10888
|
+
i0.ɵɵelementEnd();
|
|
10889
|
+
i0.ɵɵelementEnd();
|
|
10890
|
+
i0.ɵɵelementEnd();
|
|
10891
|
+
i0.ɵɵelementStart(36, "tr");
|
|
10892
|
+
i0.ɵɵelementStart(37, "th");
|
|
10893
|
+
i0.ɵɵelementStart(38, "span", 3);
|
|
10894
|
+
i0.ɵɵtext(39, "Summary");
|
|
10895
|
+
i0.ɵɵelementEnd();
|
|
10896
|
+
i0.ɵɵelementEnd();
|
|
10897
|
+
i0.ɵɵelementStart(40, "td");
|
|
10898
|
+
i0.ɵɵelementStart(41, "span", 3);
|
|
10899
|
+
i0.ɵɵtext(42);
|
|
10900
|
+
i0.ɵɵpipe(43, "ccdDash");
|
|
10901
|
+
i0.ɵɵelementEnd();
|
|
10902
|
+
i0.ɵɵelementEnd();
|
|
10903
|
+
i0.ɵɵelementEnd();
|
|
10904
|
+
i0.ɵɵelementStart(44, "tr");
|
|
10905
|
+
i0.ɵɵelementStart(45, "th");
|
|
10906
|
+
i0.ɵɵelementStart(46, "span", 3);
|
|
10907
|
+
i0.ɵɵtext(47, "Comment");
|
|
10908
|
+
i0.ɵɵelementEnd();
|
|
10909
|
+
i0.ɵɵelementEnd();
|
|
10910
|
+
i0.ɵɵelementStart(48, "td");
|
|
10911
|
+
i0.ɵɵelementStart(49, "span", 3);
|
|
10912
|
+
i0.ɵɵtext(50);
|
|
10913
|
+
i0.ɵɵpipe(51, "ccdDash");
|
|
10914
|
+
i0.ɵɵelementEnd();
|
|
10915
|
+
i0.ɵɵelementEnd();
|
|
10916
|
+
i0.ɵɵelementEnd();
|
|
10917
|
+
i0.ɵɵelementEnd();
|
|
11005
10918
|
i0.ɵɵelementEnd();
|
|
11006
10919
|
} if (rf & 2) {
|
|
11007
|
-
i0.ɵɵadvance(
|
|
11008
|
-
i0.ɵɵ
|
|
11009
|
-
|
|
11010
|
-
|
|
11011
|
-
(
|
|
10920
|
+
i0.ɵɵadvance(11);
|
|
10921
|
+
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(12, 7, ctx.event.timestamp, "local"), " ");
|
|
10922
|
+
i0.ɵɵadvance(8);
|
|
10923
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(20, 10, ctx.event.user_first_name), " ", i0.ɵɵpipeBind1(21, 12, ctx.event.user_last_name), "");
|
|
10924
|
+
i0.ɵɵadvance(9);
|
|
10925
|
+
i0.ɵɵtextInterpolate(ctx.event.state_name);
|
|
10926
|
+
i0.ɵɵadvance(7);
|
|
10927
|
+
i0.ɵɵtextInterpolate(ctx.event.event_name);
|
|
10928
|
+
i0.ɵɵadvance(7);
|
|
10929
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 14, ctx.event.summary));
|
|
10930
|
+
i0.ɵɵadvance(8);
|
|
10931
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(51, 16, ctx.event.comment));
|
|
10932
|
+
} }, pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe, DashPipe], styles: [".EventLogDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .EventLogDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:none}"] });
|
|
10933
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogDetailsComponent, [{
|
|
11012
10934
|
type: Component,
|
|
11013
10935
|
args: [{
|
|
11014
|
-
selector: 'ccd-
|
|
11015
|
-
|
|
10936
|
+
selector: 'ccd-event-log-details',
|
|
10937
|
+
templateUrl: './event-log-details.component.html',
|
|
10938
|
+
styleUrls: ['./event-log-details.scss']
|
|
11016
10939
|
}]
|
|
11017
|
-
}], null,
|
|
10940
|
+
}], null, { event: [{
|
|
10941
|
+
type: Input
|
|
10942
|
+
}] }); })();
|
|
11018
10943
|
|
|
11019
|
-
function
|
|
11020
|
-
i0.ɵɵ
|
|
11021
|
-
i0.ɵɵ
|
|
11022
|
-
i0.ɵɵ
|
|
10944
|
+
function EventLogComponent_ccd_event_log_table_3_Template(rf, ctx) { if (rf & 1) {
|
|
10945
|
+
const _r4 = i0.ɵɵgetCurrentView();
|
|
10946
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 7);
|
|
10947
|
+
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r3 = i0.ɵɵnextContext(); return ctx_r3.select($event); })("onCaseHistory", function EventLogComponent_ccd_event_log_table_3_Template_ccd_event_log_table_onCaseHistory_0_listener($event) { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.caseHistoryClicked($event); });
|
|
11023
10948
|
i0.ɵɵelementEnd();
|
|
11024
10949
|
} if (rf & 2) {
|
|
11025
10950
|
const ctx_r0 = i0.ɵɵnextContext();
|
|
11026
|
-
i0.ɵɵ
|
|
11027
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
10951
|
+
i0.ɵɵproperty("events", ctx_r0.events)("selected", ctx_r0.selected);
|
|
11028
10952
|
} }
|
|
11029
|
-
function
|
|
11030
|
-
i0.ɵɵ
|
|
11031
|
-
i0.ɵɵ
|
|
10953
|
+
function EventLogComponent_ccd_event_log_table_4_Template(rf, ctx) { if (rf & 1) {
|
|
10954
|
+
const _r7 = i0.ɵɵgetCurrentView();
|
|
10955
|
+
i0.ɵɵelementStart(0, "ccd-event-log-table", 8);
|
|
10956
|
+
i0.ɵɵlistener("onSelect", function EventLogComponent_ccd_event_log_table_4_Template_ccd_event_log_table_onSelect_0_listener($event) { i0.ɵɵrestoreView(_r7); const ctx_r6 = i0.ɵɵnextContext(); return ctx_r6.select($event); });
|
|
11032
10957
|
i0.ɵɵelementEnd();
|
|
11033
10958
|
} if (rf & 2) {
|
|
11034
10959
|
const ctx_r1 = i0.ɵɵnextContext();
|
|
11035
|
-
i0.ɵɵ
|
|
11036
|
-
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
10960
|
+
i0.ɵɵproperty("events", ctx_r1.events)("selected", ctx_r1.selected);
|
|
11037
10961
|
} }
|
|
11038
|
-
function
|
|
11039
|
-
i0.ɵɵ
|
|
11040
|
-
i0.ɵɵtext(1);
|
|
11041
|
-
i0.ɵɵpipe(2, "ccdFirstError");
|
|
11042
|
-
i0.ɵɵelementEnd();
|
|
10962
|
+
function EventLogComponent_ccd_event_log_details_7_Template(rf, ctx) { if (rf & 1) {
|
|
10963
|
+
i0.ɵɵelement(0, "ccd-event-log-details", 9);
|
|
11043
10964
|
} if (rf & 2) {
|
|
11044
10965
|
const ctx_r2 = i0.ɵɵnextContext();
|
|
11045
|
-
i0.ɵɵ
|
|
11046
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.fixedRadioListControl.errors, ctx_r2.caseField.label));
|
|
11047
|
-
} }
|
|
11048
|
-
const _c0$u = function (a0) { return { selected: a0 }; };
|
|
11049
|
-
function WriteFixedRadioListFieldComponent_div_8_Template(rf, ctx) { if (rf & 1) {
|
|
11050
|
-
i0.ɵɵelementStart(0, "div", 9);
|
|
11051
|
-
i0.ɵɵelement(1, "input", 10);
|
|
11052
|
-
i0.ɵɵelementStart(2, "label", 11);
|
|
11053
|
-
i0.ɵɵtext(3);
|
|
11054
|
-
i0.ɵɵelementEnd();
|
|
11055
|
-
i0.ɵɵelementEnd();
|
|
11056
|
-
} if (rf & 2) {
|
|
11057
|
-
const radioButton_r4 = ctx.$implicit;
|
|
11058
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
11059
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c0$u, ctx_r3.fixedRadioListControl.value === radioButton_r4.code));
|
|
11060
|
-
i0.ɵɵadvance(1);
|
|
11061
|
-
i0.ɵɵproperty("id", ctx_r3.id() + "-" + radioButton_r4.code)("name", ctx_r3.id())("formControl", ctx_r3.fixedRadioListControl)("value", radioButton_r4.code);
|
|
11062
|
-
i0.ɵɵadvance(1);
|
|
11063
|
-
i0.ɵɵproperty("for", ctx_r3.id() + "-" + radioButton_r4.code);
|
|
11064
|
-
i0.ɵɵadvance(1);
|
|
11065
|
-
i0.ɵɵtextInterpolate(radioButton_r4.label);
|
|
10966
|
+
i0.ɵɵproperty("event", ctx_r2.selected);
|
|
11066
10967
|
} }
|
|
11067
|
-
|
|
11068
|
-
|
|
10968
|
+
class EventLogComponent {
|
|
10969
|
+
constructor() {
|
|
10970
|
+
this.onCaseHistory = new EventEmitter();
|
|
10971
|
+
this.isPartOfCaseTimeline = false;
|
|
10972
|
+
}
|
|
11069
10973
|
ngOnInit() {
|
|
11070
|
-
|
|
11071
|
-
this.
|
|
10974
|
+
this.selected = this.events[0];
|
|
10975
|
+
this.isPartOfCaseTimeline = this.onCaseHistory.observers.length > 0;
|
|
10976
|
+
}
|
|
10977
|
+
select(event) {
|
|
10978
|
+
this.selected = event;
|
|
10979
|
+
}
|
|
10980
|
+
caseHistoryClicked(eventId) {
|
|
10981
|
+
this.onCaseHistory.emit(eventId);
|
|
11072
10982
|
}
|
|
11073
10983
|
}
|
|
11074
|
-
|
|
11075
|
-
|
|
10984
|
+
EventLogComponent.ɵfac = function EventLogComponent_Factory(t) { return new (t || EventLogComponent)(); };
|
|
10985
|
+
EventLogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: EventLogComponent, selectors: [["ccd-event-log"]], inputs: { events: "events" }, outputs: { onCaseHistory: "onCaseHistory" }, decls: 8, vars: 4, consts: [[1, "grid-row"], [1, "column-one-half"], [3, "ngSwitch"], [3, "events", "selected", "onSelect", "onCaseHistory", 4, "ngSwitchCase"], [3, "events", "selected", "onSelect", 4, "ngSwitchCase"], [1, "EventLog-DetailsPanel"], [3, "event", 4, "ngIf"], [3, "events", "selected", "onSelect", "onCaseHistory"], [3, "events", "selected", "onSelect"], [3, "event"]], template: function EventLogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11076
10986
|
i0.ɵɵelementStart(0, "div", 0);
|
|
11077
|
-
i0.ɵɵelementStart(1, "
|
|
11078
|
-
i0.ɵɵ
|
|
11079
|
-
i0.ɵɵ
|
|
11080
|
-
i0.ɵɵtemplate(4,
|
|
10987
|
+
i0.ɵɵelementStart(1, "div", 1);
|
|
10988
|
+
i0.ɵɵelementContainerStart(2, 2);
|
|
10989
|
+
i0.ɵɵtemplate(3, EventLogComponent_ccd_event_log_table_3_Template, 1, 2, "ccd-event-log-table", 3);
|
|
10990
|
+
i0.ɵɵtemplate(4, EventLogComponent_ccd_event_log_table_4_Template, 1, 2, "ccd-event-log-table", 4);
|
|
10991
|
+
i0.ɵɵelementContainerEnd();
|
|
11081
10992
|
i0.ɵɵelementEnd();
|
|
11082
|
-
i0.ɵɵ
|
|
11083
|
-
i0.ɵɵ
|
|
10993
|
+
i0.ɵɵelementStart(5, "div", 1);
|
|
10994
|
+
i0.ɵɵelementStart(6, "div", 5);
|
|
10995
|
+
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details", 6);
|
|
11084
10996
|
i0.ɵɵelementEnd();
|
|
11085
|
-
i0.ɵɵelementContainerStart(7);
|
|
11086
|
-
i0.ɵɵtemplate(8, WriteFixedRadioListFieldComponent_div_8_Template, 4, 9, "div", 5);
|
|
11087
|
-
i0.ɵɵelementContainerEnd();
|
|
11088
10997
|
i0.ɵɵelementEnd();
|
|
11089
10998
|
i0.ɵɵelementEnd();
|
|
11090
10999
|
} if (rf & 2) {
|
|
11091
|
-
i0.ɵɵ
|
|
11092
|
-
i0.ɵɵ
|
|
11093
|
-
i0.ɵɵproperty("for", ctx.id());
|
|
11094
|
-
i0.ɵɵadvance(1);
|
|
11095
|
-
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
11000
|
+
i0.ɵɵadvance(2);
|
|
11001
|
+
i0.ɵɵproperty("ngSwitch", ctx.isPartOfCaseTimeline);
|
|
11096
11002
|
i0.ɵɵadvance(1);
|
|
11097
|
-
i0.ɵɵproperty("
|
|
11003
|
+
i0.ɵɵproperty("ngSwitchCase", true);
|
|
11098
11004
|
i0.ɵɵadvance(1);
|
|
11099
|
-
i0.ɵɵproperty("
|
|
11100
|
-
i0.ɵɵadvance(
|
|
11101
|
-
i0.ɵɵproperty("
|
|
11102
|
-
} }, directives: [i1.
|
|
11103
|
-
|
|
11104
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteFixedRadioListFieldComponent, [{
|
|
11005
|
+
i0.ɵɵproperty("ngSwitchCase", false);
|
|
11006
|
+
i0.ɵɵadvance(3);
|
|
11007
|
+
i0.ɵɵproperty("ngIf", ctx.selected);
|
|
11008
|
+
} }, directives: [i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, EventLogTableComponent, EventLogDetailsComponent], styles: ["@media (max-width:991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
11009
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogComponent, [{
|
|
11105
11010
|
type: Component,
|
|
11106
11011
|
args: [{
|
|
11107
|
-
selector: 'ccd-
|
|
11108
|
-
templateUrl: './
|
|
11012
|
+
selector: 'ccd-event-log',
|
|
11013
|
+
templateUrl: './event-log.component.html',
|
|
11014
|
+
styleUrls: ['./event-log.scss']
|
|
11015
|
+
}]
|
|
11016
|
+
}], null, { events: [{
|
|
11017
|
+
type: Input
|
|
11018
|
+
}], onCaseHistory: [{
|
|
11019
|
+
type: Output
|
|
11020
|
+
}] }); })();
|
|
11021
|
+
|
|
11022
|
+
class CaseHistoryViewerFieldComponent extends AbstractFieldReadComponent {
|
|
11023
|
+
}
|
|
11024
|
+
CaseHistoryViewerFieldComponent.ɵfac = function CaseHistoryViewerFieldComponent_Factory(t) { return ɵCaseHistoryViewerFieldComponent_BaseFactory(t || CaseHistoryViewerFieldComponent); };
|
|
11025
|
+
CaseHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseHistoryViewerFieldComponent, selectors: [["ccd-case-history-viewer-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[3, "events"]], template: function CaseHistoryViewerFieldComponent_Template(rf, ctx) { if (rf & 1) {
|
|
11026
|
+
i0.ɵɵelement(0, "ccd-event-log", 0);
|
|
11027
|
+
} if (rf & 2) {
|
|
11028
|
+
i0.ɵɵproperty("events", ctx.caseField.value);
|
|
11029
|
+
} }, directives: [EventLogComponent], encapsulation: 2 });
|
|
11030
|
+
const ɵCaseHistoryViewerFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(CaseHistoryViewerFieldComponent);
|
|
11031
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryViewerFieldComponent, [{
|
|
11032
|
+
type: Component,
|
|
11033
|
+
args: [{
|
|
11034
|
+
selector: 'ccd-case-history-viewer-field',
|
|
11035
|
+
templateUrl: 'case-history-viewer-field.component.html',
|
|
11109
11036
|
}]
|
|
11110
11037
|
}], null, null); })();
|
|
11111
11038
|
|
|
11112
|
-
|
|
11113
|
-
|
|
11114
|
-
|
|
11115
|
-
|
|
11116
|
-
|
|
11117
|
-
|
|
11118
|
-
|
|
11119
|
-
|
|
11120
|
-
|
|
11121
|
-
|
|
11122
|
-
|
|
11123
|
-
|
|
11124
|
-
|
|
11125
|
-
|
|
11126
|
-
|
|
11127
|
-
|
|
11128
|
-
|
|
11129
|
-
|
|
11130
|
-
|
|
11131
|
-
|
|
11132
|
-
|
|
11133
|
-
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
|
|
11138
|
-
|
|
11139
|
-
|
|
11140
|
-
|
|
11141
|
-
|
|
11142
|
-
|
|
11143
|
-
|
|
11144
|
-
|
|
11145
|
-
|
|
11146
|
-
|
|
11147
|
-
|
|
11148
|
-
|
|
11149
|
-
|
|
11150
|
-
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
|
|
11154
|
-
|
|
11155
|
-
}
|
|
11156
|
-
|
|
11157
|
-
|
|
11158
|
-
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
|
|
11164
|
-
|
|
11165
|
-
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
|
|
11173
|
-
|
|
11174
|
-
|
|
11175
|
-
|
|
11176
|
-
|
|
11177
|
-
|
|
11178
|
-
|
|
11179
|
-
|
|
11180
|
-
|
|
11181
|
-
|
|
11182
|
-
}
|
|
11183
|
-
|
|
11184
|
-
|
|
11185
|
-
|
|
11186
|
-
|
|
11187
|
-
|
|
11188
|
-
|
|
11189
|
-
|
|
11190
|
-
|
|
11191
|
-
|
|
11192
|
-
|
|
11193
|
-
|
|
11194
|
-
|
|
11195
|
-
|
|
11196
|
-
|
|
11197
|
-
|
|
11198
|
-
|
|
11199
|
-
|
|
11200
|
-
|
|
11201
|
-
|
|
11202
|
-
|
|
11203
|
-
|
|
11204
|
-
|
|
11205
|
-
|
|
11206
|
-
|
|
11207
|
-
|
|
11208
|
-
|
|
11209
|
-
|
|
11210
|
-
|
|
11211
|
-
|
|
11212
|
-
|
|
11213
|
-
|
|
11214
|
-
|
|
11215
|
-
}
|
|
11216
|
-
|
|
11217
|
-
|
|
11218
|
-
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11222
|
-
|
|
11223
|
-
|
|
11224
|
-
|
|
11225
|
-
|
|
11226
|
-
|
|
11227
|
-
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11238
|
-
|
|
11239
|
-
|
|
11039
|
+
class ErrorNotifierService {
|
|
11040
|
+
constructor() {
|
|
11041
|
+
this.errorSource = new Subject();
|
|
11042
|
+
this.error = this.errorSource.asObservable();
|
|
11043
|
+
}
|
|
11044
|
+
announceError(error) {
|
|
11045
|
+
this.errorSource.next(error);
|
|
11046
|
+
}
|
|
11047
|
+
}
|
|
11048
|
+
ErrorNotifierService.ɵfac = function ErrorNotifierService_Factory(t) { return new (t || ErrorNotifierService)(); };
|
|
11049
|
+
ErrorNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: ErrorNotifierService, factory: ErrorNotifierService.ɵfac });
|
|
11050
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ErrorNotifierService, [{
|
|
11051
|
+
type: Injectable
|
|
11052
|
+
}], null, null); })();
|
|
11053
|
+
|
|
11054
|
+
class EventStatusService {
|
|
11055
|
+
static isIncomplete(eventStatus) {
|
|
11056
|
+
if (!eventStatus) {
|
|
11057
|
+
return false;
|
|
11058
|
+
}
|
|
11059
|
+
return EventStatusService.CALLBACK_STATUS_INCOMPLETE === eventStatus
|
|
11060
|
+
|| EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE === eventStatus;
|
|
11061
|
+
}
|
|
11062
|
+
}
|
|
11063
|
+
EventStatusService.CALLBACK_STATUS_INCOMPLETE = 'INCOMPLETE_CALLBACK';
|
|
11064
|
+
EventStatusService.DELETE_DRAFT_STATUS_INCOMPLETE = 'INCOMPLETE_DELETE_DRAFT';
|
|
11065
|
+
EventStatusService.CALLBACK_STATUS_COMPLETE = 'CALLBACK_COMPLETED';
|
|
11066
|
+
EventStatusService.DELETE_DRAFT_STATUS_COMPLETE = 'DELETE_DRAFT_COMPLETED';
|
|
11067
|
+
EventStatusService.ɵfac = function EventStatusService_Factory(t) { return new (t || EventStatusService)(); };
|
|
11068
|
+
EventStatusService.ɵprov = i0.ɵɵdefineInjectable({ token: EventStatusService, factory: EventStatusService.ɵfac });
|
|
11069
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventStatusService, [{
|
|
11070
|
+
type: Injectable
|
|
11071
|
+
}], null, null); })();
|
|
11072
|
+
|
|
11073
|
+
class FormErrorService {
|
|
11074
|
+
mapFieldErrors(errors, form, errorKey) {
|
|
11075
|
+
errors.forEach(error => {
|
|
11076
|
+
const formControl = this.getFormControl(form, error.id);
|
|
11077
|
+
if (formControl) {
|
|
11078
|
+
formControl.setErrors({
|
|
11079
|
+
[errorKey]: error.message
|
|
11080
|
+
});
|
|
11081
|
+
}
|
|
11082
|
+
});
|
|
11083
|
+
}
|
|
11084
|
+
getFormControl(form, fieldId) {
|
|
11085
|
+
const fields = fieldId.split('.');
|
|
11086
|
+
let group = form;
|
|
11087
|
+
let inArray = false;
|
|
11088
|
+
let control;
|
|
11089
|
+
fields.every((field, index) => {
|
|
11090
|
+
if (index === fields.length - 1) {
|
|
11091
|
+
control = group.controls[field];
|
|
11092
|
+
}
|
|
11093
|
+
else {
|
|
11094
|
+
group = group.controls[field];
|
|
11095
|
+
if (inArray && group.controls['value']) {
|
|
11096
|
+
group = group.controls['value'];
|
|
11097
|
+
}
|
|
11098
|
+
if (group && group.constructor && FormArray.name === group.constructor.name) {
|
|
11099
|
+
inArray = true;
|
|
11100
|
+
}
|
|
11101
|
+
else {
|
|
11102
|
+
inArray = false;
|
|
11103
|
+
}
|
|
11104
|
+
}
|
|
11105
|
+
return !!group;
|
|
11106
|
+
});
|
|
11107
|
+
return control;
|
|
11108
|
+
}
|
|
11109
|
+
}
|
|
11110
|
+
FormErrorService.ɵfac = function FormErrorService_Factory(t) { return new (t || FormErrorService)(); };
|
|
11111
|
+
FormErrorService.ɵprov = i0.ɵɵdefineInjectable({ token: FormErrorService, factory: FormErrorService.ɵfac });
|
|
11112
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FormErrorService, [{
|
|
11113
|
+
type: Injectable
|
|
11114
|
+
}], null, null); })();
|
|
11115
|
+
|
|
11116
|
+
class JurisdictionService {
|
|
11117
|
+
constructor(httpService) {
|
|
11118
|
+
this.httpService = httpService;
|
|
11119
|
+
this.selectedJurisdictionSource = new Subject$1();
|
|
11120
|
+
this.selectedJurisdiction = this.selectedJurisdictionSource.asObservable();
|
|
11121
|
+
}
|
|
11122
|
+
announceSelectedJurisdiction(jurisdiction) {
|
|
11123
|
+
this.selectedJurisdictionSource.next(jurisdiction);
|
|
11124
|
+
}
|
|
11125
|
+
searchJudicialUsers(searchTerm, serviceId) {
|
|
11126
|
+
return this.httpService.post('api/prd/judicial/getJudicialUsersSearch', { searchString: searchTerm, serviceCode: serviceId });
|
|
11127
|
+
}
|
|
11128
|
+
searchJudicialUsersByPersonalCodes(personalCodes) {
|
|
11129
|
+
return this.httpService.post('api/prd/judicial/searchJudicialUserByPersonalCodes', { personal_code: personalCodes });
|
|
11130
|
+
}
|
|
11131
|
+
}
|
|
11132
|
+
JurisdictionService.ɵfac = function JurisdictionService_Factory(t) { return new (t || JurisdictionService)(i0.ɵɵinject(HttpService)); };
|
|
11133
|
+
JurisdictionService.ɵprov = i0.ɵɵdefineInjectable({ token: JurisdictionService, factory: JurisdictionService.ɵfac });
|
|
11134
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(JurisdictionService, [{
|
|
11135
|
+
type: Injectable
|
|
11136
|
+
}], function () { return [{ type: HttpService }]; }, null); })();
|
|
11137
|
+
|
|
11138
|
+
class BannersService {
|
|
11139
|
+
constructor(httpService, appConfig) {
|
|
11140
|
+
this.httpService = httpService;
|
|
11141
|
+
this.appConfig = appConfig;
|
|
11142
|
+
}
|
|
11143
|
+
getBanners(jurisdictionReferences) {
|
|
11144
|
+
const url = this.appConfig.getBannersUrl();
|
|
11145
|
+
const headers = new HttpHeaders()
|
|
11146
|
+
.set('experimental', 'true')
|
|
11147
|
+
.set('Accept', BannersService.V2_MEDIATYPE_BANNERS)
|
|
11148
|
+
.set('Content-Type', 'application/json');
|
|
11149
|
+
let params = new HttpParams();
|
|
11150
|
+
jurisdictionReferences.forEach(reference => params = params.append('ids', reference));
|
|
11151
|
+
return this.httpService
|
|
11152
|
+
.get(url, { params, headers, observe: 'body' })
|
|
11153
|
+
.pipe(map(body => body.banners));
|
|
11154
|
+
}
|
|
11155
|
+
}
|
|
11156
|
+
BannersService.V2_MEDIATYPE_BANNERS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-banners.v2+json;charset=UTF-8';
|
|
11157
|
+
BannersService.ɵfac = function BannersService_Factory(t) { return new (t || BannersService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11158
|
+
BannersService.ɵprov = i0.ɵɵdefineInjectable({ token: BannersService, factory: BannersService.ɵfac });
|
|
11159
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BannersService, [{
|
|
11160
|
+
type: Injectable
|
|
11161
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11162
|
+
|
|
11163
|
+
var NavigationOrigin;
|
|
11164
|
+
(function (NavigationOrigin) {
|
|
11165
|
+
NavigationOrigin[NavigationOrigin["DRAFT_DELETED"] = 0] = "DRAFT_DELETED";
|
|
11166
|
+
NavigationOrigin[NavigationOrigin["ERROR_DELETING_DRAFT"] = 1] = "ERROR_DELETING_DRAFT";
|
|
11167
|
+
NavigationOrigin[NavigationOrigin["DRAFT_RESUMED"] = 2] = "DRAFT_RESUMED";
|
|
11168
|
+
NavigationOrigin[NavigationOrigin["EVENT_TRIGGERED"] = 3] = "EVENT_TRIGGERED";
|
|
11169
|
+
NavigationOrigin[NavigationOrigin["NO_READ_ACCESS_REDIRECTION"] = 4] = "NO_READ_ACCESS_REDIRECTION";
|
|
11170
|
+
})(NavigationOrigin || (NavigationOrigin = {}));
|
|
11171
|
+
|
|
11172
|
+
class NavigationNotifierService {
|
|
11240
11173
|
constructor() {
|
|
11241
|
-
this.
|
|
11242
|
-
this.
|
|
11243
|
-
this.isPartOfCaseTimeline = false;
|
|
11174
|
+
this.navigationSource = new BehaviorSubject({});
|
|
11175
|
+
this.navigation = this.navigationSource.asObservable();
|
|
11244
11176
|
}
|
|
11245
|
-
|
|
11246
|
-
this.
|
|
11177
|
+
announceNavigation(origin) {
|
|
11178
|
+
this.navigationSource.next(origin);
|
|
11247
11179
|
}
|
|
11248
|
-
|
|
11249
|
-
|
|
11250
|
-
|
|
11180
|
+
}
|
|
11181
|
+
NavigationNotifierService.ɵfac = function NavigationNotifierService_Factory(t) { return new (t || NavigationNotifierService)(); };
|
|
11182
|
+
NavigationNotifierService.ɵprov = i0.ɵɵdefineInjectable({ token: NavigationNotifierService, factory: NavigationNotifierService.ɵfac });
|
|
11183
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NavigationNotifierService, [{
|
|
11184
|
+
type: Injectable
|
|
11185
|
+
}], null, null); })();
|
|
11186
|
+
|
|
11187
|
+
class ProfileService {
|
|
11188
|
+
constructor(httpService, appConfig) {
|
|
11189
|
+
this.httpService = httpService;
|
|
11190
|
+
this.appConfig = appConfig;
|
|
11251
11191
|
}
|
|
11252
|
-
|
|
11253
|
-
|
|
11254
|
-
|
|
11255
|
-
|
|
11256
|
-
|
|
11192
|
+
get() {
|
|
11193
|
+
const url = this.appConfig.getCaseDataUrl() + ProfileService.URL;
|
|
11194
|
+
const headers = new HttpHeaders()
|
|
11195
|
+
.set('experimental', 'true')
|
|
11196
|
+
.set('Accept', ProfileService.V2_MEDIATYPE_USER_PROFILE)
|
|
11197
|
+
.set('Content-Type', 'application/json');
|
|
11198
|
+
return this.httpService
|
|
11199
|
+
.get(url, { headers, observe: 'body' })
|
|
11200
|
+
.pipe(map((p) => plainToClass(Profile, p)));
|
|
11257
11201
|
}
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11202
|
+
}
|
|
11203
|
+
ProfileService.V2_MEDIATYPE_USER_PROFILE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-user-profile.v2+json;charset=UTF-8';
|
|
11204
|
+
ProfileService.URL = '/internal/profile';
|
|
11205
|
+
ProfileService.ɵfac = function ProfileService_Factory(t) { return new (t || ProfileService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11206
|
+
ProfileService.ɵprov = i0.ɵɵdefineInjectable({ token: ProfileService, factory: ProfileService.ɵfac });
|
|
11207
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ProfileService, [{
|
|
11208
|
+
type: Injectable
|
|
11209
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11210
|
+
|
|
11211
|
+
class RequestOptionsBuilder {
|
|
11212
|
+
/**
|
|
11213
|
+
* Assess the value to see if it should be included in the request options.
|
|
11214
|
+
* If it's null or an "empty" string, it shouldn't be.
|
|
11215
|
+
*
|
|
11216
|
+
* @param value The value to be assessed.
|
|
11217
|
+
*/
|
|
11218
|
+
static includeParam(value) {
|
|
11219
|
+
if (value) {
|
|
11220
|
+
if (typeof (value) === 'string') {
|
|
11221
|
+
return value.trim().length > 0;
|
|
11222
|
+
}
|
|
11223
|
+
return true;
|
|
11261
11224
|
}
|
|
11225
|
+
return false;
|
|
11262
11226
|
}
|
|
11263
|
-
|
|
11264
|
-
|
|
11265
|
-
|
|
11227
|
+
buildOptions(metaCriteria, caseCriteria, view) {
|
|
11228
|
+
// TODO: This should probably be the now built-in URLSearchParams but it
|
|
11229
|
+
// requires a bigger refactor and there are bigger fish to fry right now.
|
|
11230
|
+
let params = new HttpParams();
|
|
11231
|
+
if (view) {
|
|
11232
|
+
params = params.set('view', view);
|
|
11233
|
+
}
|
|
11234
|
+
if (metaCriteria) {
|
|
11235
|
+
for (const criterion of Object.keys(metaCriteria)) {
|
|
11236
|
+
// EUI-3490. Make sure the parameter should be included for adding it.
|
|
11237
|
+
// This was already handled by the old URLSearchParams mechanism.
|
|
11238
|
+
if (RequestOptionsBuilder.includeParam(metaCriteria[criterion])) {
|
|
11239
|
+
params = params.set(criterion, metaCriteria[criterion]);
|
|
11240
|
+
}
|
|
11241
|
+
}
|
|
11242
|
+
}
|
|
11243
|
+
if (caseCriteria) {
|
|
11244
|
+
for (const criterion of Object.keys(caseCriteria)) {
|
|
11245
|
+
if (RequestOptionsBuilder.includeParam(caseCriteria[criterion])) {
|
|
11246
|
+
const key = RequestOptionsBuilder.FIELD_PREFIX + criterion;
|
|
11247
|
+
const value = caseCriteria[criterion].trim ? caseCriteria[criterion].trim() : caseCriteria[criterion];
|
|
11248
|
+
params = params.set(key, value.replace(/’/i, `'`));
|
|
11249
|
+
}
|
|
11250
|
+
}
|
|
11266
11251
|
}
|
|
11252
|
+
const options = { params, observe: 'body' };
|
|
11253
|
+
return options;
|
|
11254
|
+
}
|
|
11255
|
+
}
|
|
11256
|
+
RequestOptionsBuilder.FIELD_PREFIX = 'case.';
|
|
11257
|
+
RequestOptionsBuilder.ɵfac = function RequestOptionsBuilder_Factory(t) { return new (t || RequestOptionsBuilder)(); };
|
|
11258
|
+
RequestOptionsBuilder.ɵprov = i0.ɵɵdefineInjectable({ token: RequestOptionsBuilder, factory: RequestOptionsBuilder.ɵfac });
|
|
11259
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RequestOptionsBuilder, [{
|
|
11260
|
+
type: Injectable
|
|
11261
|
+
}], null, null); })();
|
|
11262
|
+
|
|
11263
|
+
class SearchService {
|
|
11264
|
+
constructor(appConfig, httpService, requestOptionsBuilder, loadingService) {
|
|
11265
|
+
this.appConfig = appConfig;
|
|
11266
|
+
this.httpService = httpService;
|
|
11267
|
+
this.requestOptionsBuilder = requestOptionsBuilder;
|
|
11268
|
+
this.loadingService = loadingService;
|
|
11269
|
+
}
|
|
11270
|
+
search(jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
11271
|
+
const url = this.appConfig.getApiUrl() + `/caseworkers/:uid`
|
|
11272
|
+
+ `/jurisdictions/${jurisdictionId}`
|
|
11273
|
+
+ `/case-types/${caseTypeId}`
|
|
11274
|
+
+ `/cases`;
|
|
11275
|
+
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
11276
|
+
const loadingToken = this.loadingService.register();
|
|
11277
|
+
return this.httpService
|
|
11278
|
+
.get(url, options)
|
|
11279
|
+
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
11280
|
+
}
|
|
11281
|
+
searchCases(caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
11282
|
+
const url = this.appConfig.getCaseDataUrl() + `/internal/searchCases?ctid=${caseTypeId}&use_case=${view}`;
|
|
11283
|
+
const options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
11284
|
+
const body = {
|
|
11285
|
+
sort,
|
|
11286
|
+
size: this.appConfig.getPaginationPageSize()
|
|
11287
|
+
};
|
|
11288
|
+
const loadingToken = this.loadingService.register();
|
|
11289
|
+
return this.httpService
|
|
11290
|
+
.post(url, body, options)
|
|
11291
|
+
.pipe(map(response => response), finalize(() => this.loadingService.unregister(loadingToken)));
|
|
11292
|
+
}
|
|
11293
|
+
getSearchInputUrl(caseTypeId) {
|
|
11294
|
+
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/search-inputs`;
|
|
11295
|
+
}
|
|
11296
|
+
getSearchInputs(jurisdictionId, caseTypeId) {
|
|
11297
|
+
const url = this.getSearchInputUrl(caseTypeId);
|
|
11298
|
+
const headers = new HttpHeaders()
|
|
11299
|
+
.set('experimental', 'true')
|
|
11300
|
+
.set('Accept', SearchService.V2_MEDIATYPE_SEARCH_INPUTS)
|
|
11301
|
+
.set('Content-Type', 'application/json');
|
|
11302
|
+
this.currentJurisdiction = jurisdictionId;
|
|
11303
|
+
this.currentCaseType = caseTypeId;
|
|
11304
|
+
return this.httpService
|
|
11305
|
+
.get(url, { headers, observe: 'body' })
|
|
11306
|
+
.pipe(map(body => {
|
|
11307
|
+
const searchInputs = body.searchInputs;
|
|
11308
|
+
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
11309
|
+
searchInputs.forEach(item => {
|
|
11310
|
+
item.field.label = item.label;
|
|
11311
|
+
item.field.display_context_parameter = item.display_context_parameter;
|
|
11312
|
+
});
|
|
11313
|
+
}
|
|
11314
|
+
else {
|
|
11315
|
+
throw new Error('Response expired');
|
|
11316
|
+
}
|
|
11317
|
+
return searchInputs;
|
|
11318
|
+
}));
|
|
11319
|
+
}
|
|
11320
|
+
isDataValid(jurisdictionId, caseTypeId) {
|
|
11321
|
+
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
11322
|
+
}
|
|
11323
|
+
}
|
|
11324
|
+
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
11325
|
+
SearchService.VIEW_SEARCH = 'SEARCH';
|
|
11326
|
+
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
11327
|
+
SearchService.FIELD_PREFIX = 'case.';
|
|
11328
|
+
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0.ɵɵinject(AbstractAppConfig), i0.ɵɵinject(HttpService), i0.ɵɵinject(RequestOptionsBuilder), i0.ɵɵinject(LoadingService)); };
|
|
11329
|
+
SearchService.ɵprov = i0.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
11330
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchService, [{
|
|
11331
|
+
type: Injectable
|
|
11332
|
+
}], function () { return [{ type: AbstractAppConfig }, { type: HttpService }, { type: RequestOptionsBuilder }, { type: LoadingService }]; }, null); })();
|
|
11333
|
+
|
|
11334
|
+
class RouterHelperService {
|
|
11335
|
+
getUrlSegmentsFromRoot(route) {
|
|
11336
|
+
return route.pathFromRoot
|
|
11337
|
+
.filter(r => r.url && r.url.length)
|
|
11338
|
+
.reduce((acc, r) => {
|
|
11339
|
+
r.url.forEach(url => {
|
|
11340
|
+
acc.push(url.path);
|
|
11341
|
+
});
|
|
11342
|
+
return acc;
|
|
11343
|
+
}, []);
|
|
11267
11344
|
}
|
|
11268
|
-
|
|
11269
|
-
|
|
11345
|
+
}
|
|
11346
|
+
RouterHelperService.ɵfac = function RouterHelperService_Factory(t) { return new (t || RouterHelperService)(); };
|
|
11347
|
+
RouterHelperService.ɵprov = i0.ɵɵdefineInjectable({ token: RouterHelperService, factory: RouterHelperService.ɵfac });
|
|
11348
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RouterHelperService, [{
|
|
11349
|
+
type: Injectable
|
|
11350
|
+
}], null, null); })();
|
|
11351
|
+
|
|
11352
|
+
class WorkbasketInputFilterService {
|
|
11353
|
+
constructor(httpService, appConfig) {
|
|
11354
|
+
this.httpService = httpService;
|
|
11355
|
+
this.appConfig = appConfig;
|
|
11270
11356
|
}
|
|
11271
|
-
|
|
11272
|
-
|
|
11273
|
-
return `date ${formatDate(event.timestamp, 'dd MMM yyyy hh:mm:ss a', 'en-GB')},
|
|
11274
|
-
press enter key for event ${event.event_name} details`;
|
|
11275
|
-
}
|
|
11276
|
-
else {
|
|
11277
|
-
return '';
|
|
11278
|
-
}
|
|
11357
|
+
getWorkbasketInputUrl(caseTypeId) {
|
|
11358
|
+
return `${this.appConfig.getCaseDataUrl()}/internal/case-types/${caseTypeId}/work-basket-inputs`;
|
|
11279
11359
|
}
|
|
11280
|
-
|
|
11281
|
-
|
|
11360
|
+
getWorkbasketInputs(jurisdictionId, caseTypeId) {
|
|
11361
|
+
const url = this.getWorkbasketInputUrl(caseTypeId);
|
|
11362
|
+
const headers = new HttpHeaders()
|
|
11363
|
+
.set('experimental', 'true')
|
|
11364
|
+
.set('Accept', WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS)
|
|
11365
|
+
.set('Content-Type', 'application/json');
|
|
11366
|
+
this.currentJurisdiction = jurisdictionId;
|
|
11367
|
+
this.currentCaseType = caseTypeId;
|
|
11368
|
+
return this.httpService
|
|
11369
|
+
.get(url, { headers, observe: 'body' })
|
|
11370
|
+
.pipe(map(body => {
|
|
11371
|
+
const workbasketInputs = body.workbasketInputs;
|
|
11372
|
+
if (this.isDataValid(jurisdictionId, caseTypeId)) {
|
|
11373
|
+
workbasketInputs.forEach(item => {
|
|
11374
|
+
item.field.label = item.label;
|
|
11375
|
+
if (item.display_context_parameter) {
|
|
11376
|
+
item.field.display_context_parameter = item.display_context_parameter;
|
|
11377
|
+
}
|
|
11378
|
+
});
|
|
11379
|
+
}
|
|
11380
|
+
else {
|
|
11381
|
+
throw new Error('Response expired');
|
|
11382
|
+
}
|
|
11383
|
+
return workbasketInputs;
|
|
11384
|
+
}));
|
|
11282
11385
|
}
|
|
11283
|
-
|
|
11284
|
-
return
|
|
11386
|
+
isDataValid(jurisdictionId, caseTypeId) {
|
|
11387
|
+
return this.currentJurisdiction === jurisdictionId && this.currentCaseType === caseTypeId;
|
|
11285
11388
|
}
|
|
11286
11389
|
}
|
|
11287
|
-
|
|
11288
|
-
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
i0.ɵɵelementEnd();
|
|
11294
|
-
i0.ɵɵelementEnd();
|
|
11295
|
-
i0.ɵɵelementStart(4, "thead");
|
|
11296
|
-
i0.ɵɵelementStart(5, "tr");
|
|
11297
|
-
i0.ɵɵelementStart(6, "th");
|
|
11298
|
-
i0.ɵɵelementStart(7, "span", 2);
|
|
11299
|
-
i0.ɵɵtext(8, "Event");
|
|
11300
|
-
i0.ɵɵelementEnd();
|
|
11301
|
-
i0.ɵɵelementEnd();
|
|
11302
|
-
i0.ɵɵelementStart(9, "th");
|
|
11303
|
-
i0.ɵɵelementStart(10, "span", 2);
|
|
11304
|
-
i0.ɵɵtext(11, "Date");
|
|
11305
|
-
i0.ɵɵelementEnd();
|
|
11306
|
-
i0.ɵɵelementEnd();
|
|
11307
|
-
i0.ɵɵelementStart(12, "th");
|
|
11308
|
-
i0.ɵɵelementStart(13, "span", 2);
|
|
11309
|
-
i0.ɵɵtext(14, "Author");
|
|
11310
|
-
i0.ɵɵelementEnd();
|
|
11311
|
-
i0.ɵɵelementEnd();
|
|
11312
|
-
i0.ɵɵelementEnd();
|
|
11313
|
-
i0.ɵɵelementEnd();
|
|
11314
|
-
i0.ɵɵelementStart(15, "tbody");
|
|
11315
|
-
i0.ɵɵtemplate(16, EventLogTableComponent_tr_16_Template, 19, 24, "tr", 3);
|
|
11316
|
-
i0.ɵɵelementEnd();
|
|
11317
|
-
i0.ɵɵelementEnd();
|
|
11318
|
-
} if (rf & 2) {
|
|
11319
|
-
i0.ɵɵadvance(16);
|
|
11320
|
-
i0.ɵɵproperty("ngForOf", ctx.events);
|
|
11321
|
-
} }, directives: [i1.NgForOf, i1.NgClass, i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, i1$1.RouterLinkWithHref], pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe], styles: ["#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{cursor:pointer;text-decoration:underline;color:#005ea5}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#2b8cc4}#case-timeline[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{color:#4c2c92}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:10px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%]{border-left:8px solid #005ea5;background-color:#f8f8f8}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr.EventLogTable-Selected[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover{border-left:8px solid #2b8cc4;background-color:#f8f8f8;cursor:pointer;cursor:hand}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]:not(.EventLogTable-Selected):hover td[_ngcontent-%COMP%]:first-child{padding-left:6px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .event-link[_ngcontent-%COMP%]{float:left;padding-right:8px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-img[_ngcontent-%COMP%]{width:16px;float:left}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]{left:35%;bottom:7px}.EventLogTable[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%] .doc-tooltip[_ngcontent-%COMP%]:after{border-color:transparent}"] });
|
|
11322
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogTableComponent, [{
|
|
11323
|
-
type: Component,
|
|
11324
|
-
args: [{
|
|
11325
|
-
selector: 'ccd-event-log-table',
|
|
11326
|
-
templateUrl: './event-log-table.component.html',
|
|
11327
|
-
styleUrls: ['./event-log-table.scss']
|
|
11328
|
-
}]
|
|
11329
|
-
}], null, { events: [{
|
|
11330
|
-
type: Input
|
|
11331
|
-
}], selected: [{
|
|
11332
|
-
type: Input
|
|
11333
|
-
}], onSelect: [{
|
|
11334
|
-
type: Output
|
|
11335
|
-
}], onCaseHistory: [{
|
|
11336
|
-
type: Output
|
|
11337
|
-
}] }); })();
|
|
11390
|
+
WorkbasketInputFilterService.V2_MEDIATYPE_WORKBASKET_INPUT_DETAILS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-workbasket-input-details.v2+json;charset=UTF-8';
|
|
11391
|
+
WorkbasketInputFilterService.ɵfac = function WorkbasketInputFilterService_Factory(t) { return new (t || WorkbasketInputFilterService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11392
|
+
WorkbasketInputFilterService.ɵprov = i0.ɵɵdefineInjectable({ token: WorkbasketInputFilterService, factory: WorkbasketInputFilterService.ɵfac });
|
|
11393
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WorkbasketInputFilterService, [{
|
|
11394
|
+
type: Injectable
|
|
11395
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11338
11396
|
|
|
11339
|
-
class
|
|
11340
|
-
|
|
11341
|
-
|
|
11397
|
+
class DefinitionsService {
|
|
11398
|
+
constructor(http, appConfig) {
|
|
11399
|
+
this.http = http;
|
|
11400
|
+
this.appConfig = appConfig;
|
|
11401
|
+
}
|
|
11402
|
+
getCaseTypes(jurisdictionId, access) {
|
|
11403
|
+
const url = this.appConfig.getApiUrl()
|
|
11404
|
+
+ `/caseworkers/:uid`
|
|
11405
|
+
+ `/jurisdictions/${jurisdictionId}`
|
|
11406
|
+
+ `/case-types?access=${access}`;
|
|
11407
|
+
return this.http
|
|
11408
|
+
.get(url).pipe(map(response => response));
|
|
11409
|
+
}
|
|
11410
|
+
getJurisdictions(access) {
|
|
11411
|
+
const url = this.appConfig.getApiUrl()
|
|
11412
|
+
+ `/caseworkers/:uid`
|
|
11413
|
+
+ `/jurisdictions?access=${access}`;
|
|
11414
|
+
return this.http
|
|
11415
|
+
.get(url)
|
|
11416
|
+
.pipe(map(response => response));
|
|
11342
11417
|
}
|
|
11343
11418
|
}
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(
|
|
11347
|
-
type:
|
|
11348
|
-
|
|
11349
|
-
name: 'ccdDash'
|
|
11350
|
-
}]
|
|
11351
|
-
}], null, null); })();
|
|
11419
|
+
DefinitionsService.ɵfac = function DefinitionsService_Factory(t) { return new (t || DefinitionsService)(i0.ɵɵinject(HttpService), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11420
|
+
DefinitionsService.ɵprov = i0.ɵɵdefineInjectable({ token: DefinitionsService, factory: DefinitionsService.ɵfac });
|
|
11421
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsService, [{
|
|
11422
|
+
type: Injectable
|
|
11423
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }]; }, null); })();
|
|
11352
11424
|
|
|
11353
|
-
class
|
|
11425
|
+
class DefinitionsModule {
|
|
11354
11426
|
}
|
|
11355
|
-
|
|
11356
|
-
|
|
11357
|
-
|
|
11358
|
-
|
|
11359
|
-
|
|
11360
|
-
|
|
11361
|
-
|
|
11362
|
-
i0.ɵɵelementEnd();
|
|
11363
|
-
i0.ɵɵelementStart(4, "tbody", 2);
|
|
11364
|
-
i0.ɵɵelementStart(5, "tr");
|
|
11365
|
-
i0.ɵɵelementStart(6, "th");
|
|
11366
|
-
i0.ɵɵelementStart(7, "span", 3);
|
|
11367
|
-
i0.ɵɵtext(8, "Date");
|
|
11368
|
-
i0.ɵɵelementEnd();
|
|
11369
|
-
i0.ɵɵelementEnd();
|
|
11370
|
-
i0.ɵɵelementStart(9, "td");
|
|
11371
|
-
i0.ɵɵelementStart(10, "div", 4);
|
|
11372
|
-
i0.ɵɵtext(11);
|
|
11373
|
-
i0.ɵɵpipe(12, "ccdDate");
|
|
11374
|
-
i0.ɵɵelementEnd();
|
|
11375
|
-
i0.ɵɵelementEnd();
|
|
11376
|
-
i0.ɵɵelementEnd();
|
|
11377
|
-
i0.ɵɵelementStart(13, "tr");
|
|
11378
|
-
i0.ɵɵelementStart(14, "th");
|
|
11379
|
-
i0.ɵɵelementStart(15, "span", 3);
|
|
11380
|
-
i0.ɵɵtext(16, "Author");
|
|
11381
|
-
i0.ɵɵelementEnd();
|
|
11382
|
-
i0.ɵɵelementEnd();
|
|
11383
|
-
i0.ɵɵelementStart(17, "td");
|
|
11384
|
-
i0.ɵɵelementStart(18, "span", 3);
|
|
11385
|
-
i0.ɵɵtext(19);
|
|
11386
|
-
i0.ɵɵpipe(20, "titlecase");
|
|
11387
|
-
i0.ɵɵpipe(21, "uppercase");
|
|
11388
|
-
i0.ɵɵelementEnd();
|
|
11389
|
-
i0.ɵɵelementEnd();
|
|
11390
|
-
i0.ɵɵelementEnd();
|
|
11391
|
-
i0.ɵɵelementStart(22, "tr");
|
|
11392
|
-
i0.ɵɵelementStart(23, "th");
|
|
11393
|
-
i0.ɵɵelementStart(24, "span", 3);
|
|
11394
|
-
i0.ɵɵtext(25, "End state");
|
|
11395
|
-
i0.ɵɵelementEnd();
|
|
11396
|
-
i0.ɵɵelementEnd();
|
|
11397
|
-
i0.ɵɵelementStart(26, "td");
|
|
11398
|
-
i0.ɵɵelementStart(27, "span", 3);
|
|
11399
|
-
i0.ɵɵtext(28);
|
|
11400
|
-
i0.ɵɵelementEnd();
|
|
11401
|
-
i0.ɵɵelementEnd();
|
|
11402
|
-
i0.ɵɵelementEnd();
|
|
11403
|
-
i0.ɵɵelementStart(29, "tr");
|
|
11404
|
-
i0.ɵɵelementStart(30, "th");
|
|
11405
|
-
i0.ɵɵelementStart(31, "span", 3);
|
|
11406
|
-
i0.ɵɵtext(32, "Event");
|
|
11407
|
-
i0.ɵɵelementEnd();
|
|
11408
|
-
i0.ɵɵelementEnd();
|
|
11409
|
-
i0.ɵɵelementStart(33, "td");
|
|
11410
|
-
i0.ɵɵelementStart(34, "span", 3);
|
|
11411
|
-
i0.ɵɵtext(35);
|
|
11412
|
-
i0.ɵɵelementEnd();
|
|
11413
|
-
i0.ɵɵelementEnd();
|
|
11414
|
-
i0.ɵɵelementEnd();
|
|
11415
|
-
i0.ɵɵelementStart(36, "tr");
|
|
11416
|
-
i0.ɵɵelementStart(37, "th");
|
|
11417
|
-
i0.ɵɵelementStart(38, "span", 3);
|
|
11418
|
-
i0.ɵɵtext(39, "Summary");
|
|
11419
|
-
i0.ɵɵelementEnd();
|
|
11420
|
-
i0.ɵɵelementEnd();
|
|
11421
|
-
i0.ɵɵelementStart(40, "td");
|
|
11422
|
-
i0.ɵɵelementStart(41, "span", 3);
|
|
11423
|
-
i0.ɵɵtext(42);
|
|
11424
|
-
i0.ɵɵpipe(43, "ccdDash");
|
|
11425
|
-
i0.ɵɵelementEnd();
|
|
11426
|
-
i0.ɵɵelementEnd();
|
|
11427
|
-
i0.ɵɵelementEnd();
|
|
11428
|
-
i0.ɵɵelementStart(44, "tr");
|
|
11429
|
-
i0.ɵɵelementStart(45, "th");
|
|
11430
|
-
i0.ɵɵelementStart(46, "span", 3);
|
|
11431
|
-
i0.ɵɵtext(47, "Comment");
|
|
11432
|
-
i0.ɵɵelementEnd();
|
|
11433
|
-
i0.ɵɵelementEnd();
|
|
11434
|
-
i0.ɵɵelementStart(48, "td");
|
|
11435
|
-
i0.ɵɵelementStart(49, "span", 3);
|
|
11436
|
-
i0.ɵɵtext(50);
|
|
11437
|
-
i0.ɵɵpipe(51, "ccdDash");
|
|
11438
|
-
i0.ɵɵelementEnd();
|
|
11439
|
-
i0.ɵɵelementEnd();
|
|
11440
|
-
i0.ɵɵelementEnd();
|
|
11441
|
-
i0.ɵɵelementEnd();
|
|
11442
|
-
i0.ɵɵelementEnd();
|
|
11443
|
-
} if (rf & 2) {
|
|
11444
|
-
i0.ɵɵadvance(11);
|
|
11445
|
-
i0.ɵɵtextInterpolate1("", i0.ɵɵpipeBind2(12, 7, ctx.event.timestamp, "local"), " ");
|
|
11446
|
-
i0.ɵɵadvance(8);
|
|
11447
|
-
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(20, 10, ctx.event.user_first_name), " ", i0.ɵɵpipeBind1(21, 12, ctx.event.user_last_name), "");
|
|
11448
|
-
i0.ɵɵadvance(9);
|
|
11449
|
-
i0.ɵɵtextInterpolate(ctx.event.state_name);
|
|
11450
|
-
i0.ɵɵadvance(7);
|
|
11451
|
-
i0.ɵɵtextInterpolate(ctx.event.event_name);
|
|
11452
|
-
i0.ɵɵadvance(7);
|
|
11453
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(43, 14, ctx.event.summary));
|
|
11454
|
-
i0.ɵɵadvance(8);
|
|
11455
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(51, 16, ctx.event.comment));
|
|
11456
|
-
} }, pipes: [DatePipe, i1.TitleCasePipe, i1.UpperCasePipe, DashPipe], styles: [".EventLogDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .EventLogDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{border-bottom:none}"] });
|
|
11457
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogDetailsComponent, [{
|
|
11458
|
-
type: Component,
|
|
11427
|
+
DefinitionsModule.ɵfac = function DefinitionsModule_Factory(t) { return new (t || DefinitionsModule)(); };
|
|
11428
|
+
DefinitionsModule.ɵmod = i0.ɵɵdefineNgModule({ type: DefinitionsModule });
|
|
11429
|
+
DefinitionsModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
11430
|
+
DefinitionsService
|
|
11431
|
+
] });
|
|
11432
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DefinitionsModule, [{
|
|
11433
|
+
type: NgModule,
|
|
11459
11434
|
args: [{
|
|
11460
|
-
|
|
11461
|
-
|
|
11462
|
-
|
|
11435
|
+
providers: [
|
|
11436
|
+
DefinitionsService
|
|
11437
|
+
]
|
|
11463
11438
|
}]
|
|
11464
|
-
}], null,
|
|
11465
|
-
type: Input
|
|
11466
|
-
}] }); })();
|
|
11439
|
+
}], null, null); })();
|
|
11467
11440
|
|
|
11468
|
-
|
|
11469
|
-
|
|
11470
|
-
|
|
11471
|
-
|
|
11472
|
-
|
|
11473
|
-
|
|
11474
|
-
|
|
11475
|
-
|
|
11476
|
-
|
|
11477
|
-
|
|
11478
|
-
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11488
|
-
|
|
11489
|
-
|
|
11490
|
-
|
|
11491
|
-
|
|
11492
|
-
|
|
11493
|
-
|
|
11494
|
-
|
|
11495
|
-
this.isPartOfCaseTimeline = false;
|
|
11441
|
+
class SearchResultViewItemComparatorFactory {
|
|
11442
|
+
createSearchResultViewItemComparator(column) {
|
|
11443
|
+
const fieldId = column.case_field_id;
|
|
11444
|
+
switch (column.case_field_type.type) {
|
|
11445
|
+
case ('MultiSelectList'): {
|
|
11446
|
+
return this.textArrayComparator(fieldId);
|
|
11447
|
+
}
|
|
11448
|
+
case ('Number'):
|
|
11449
|
+
case ('MoneyGBP'): {
|
|
11450
|
+
return this.numberComparator(fieldId);
|
|
11451
|
+
}
|
|
11452
|
+
case ('Text'):
|
|
11453
|
+
case ('TextArea'):
|
|
11454
|
+
case ('Email'):
|
|
11455
|
+
case ('Date'):
|
|
11456
|
+
case ('DateTime'):
|
|
11457
|
+
case ('Label'):
|
|
11458
|
+
case ('Postcode'):
|
|
11459
|
+
case ('YesOrNo'):
|
|
11460
|
+
case ('PhoneUK'):
|
|
11461
|
+
case ('FixedList'): {
|
|
11462
|
+
return this.stringComparator(fieldId);
|
|
11463
|
+
}
|
|
11464
|
+
default: {
|
|
11465
|
+
return undefined;
|
|
11466
|
+
}
|
|
11467
|
+
}
|
|
11496
11468
|
}
|
|
11497
|
-
|
|
11498
|
-
|
|
11499
|
-
|
|
11469
|
+
numberComparator(fieldId) {
|
|
11470
|
+
return {
|
|
11471
|
+
compare(a, b) {
|
|
11472
|
+
let fieldA = a.case_fields[fieldId];
|
|
11473
|
+
let fieldB = b.case_fields[fieldId];
|
|
11474
|
+
fieldA = isUndefined(fieldA) || fieldA === null ? 0 : fieldA;
|
|
11475
|
+
fieldB = isUndefined(fieldB) || fieldB === null ? 0 : fieldB;
|
|
11476
|
+
return fieldA - fieldB;
|
|
11477
|
+
}
|
|
11478
|
+
};
|
|
11500
11479
|
}
|
|
11501
|
-
|
|
11502
|
-
|
|
11480
|
+
stringComparator(fieldId) {
|
|
11481
|
+
return {
|
|
11482
|
+
compare(a, b) {
|
|
11483
|
+
let fieldA = a.case_fields[fieldId];
|
|
11484
|
+
let fieldB = b.case_fields[fieldId];
|
|
11485
|
+
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.toLowerCase();
|
|
11486
|
+
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.toLowerCase();
|
|
11487
|
+
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
11488
|
+
}
|
|
11489
|
+
};
|
|
11503
11490
|
}
|
|
11504
|
-
|
|
11505
|
-
|
|
11491
|
+
textArrayComparator(fieldId) {
|
|
11492
|
+
return {
|
|
11493
|
+
compare(a, b) {
|
|
11494
|
+
let fieldA = a.case_fields[fieldId];
|
|
11495
|
+
let fieldB = b.case_fields[fieldId];
|
|
11496
|
+
fieldA = isUndefined(fieldA) || fieldA == null ? '' : fieldA.join().toLowerCase();
|
|
11497
|
+
fieldB = isUndefined(fieldB) || fieldB == null ? '' : fieldB.join().toLowerCase();
|
|
11498
|
+
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
11499
|
+
}
|
|
11500
|
+
};
|
|
11506
11501
|
}
|
|
11507
11502
|
}
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
|
|
11511
|
-
|
|
11512
|
-
|
|
11513
|
-
i0.ɵɵtemplate(3, EventLogComponent_ccd_event_log_table_3_Template, 1, 2, "ccd-event-log-table", 3);
|
|
11514
|
-
i0.ɵɵtemplate(4, EventLogComponent_ccd_event_log_table_4_Template, 1, 2, "ccd-event-log-table", 4);
|
|
11515
|
-
i0.ɵɵelementContainerEnd();
|
|
11516
|
-
i0.ɵɵelementEnd();
|
|
11517
|
-
i0.ɵɵelementStart(5, "div", 1);
|
|
11518
|
-
i0.ɵɵelementStart(6, "div", 5);
|
|
11519
|
-
i0.ɵɵtemplate(7, EventLogComponent_ccd_event_log_details_7_Template, 1, 1, "ccd-event-log-details", 6);
|
|
11520
|
-
i0.ɵɵelementEnd();
|
|
11521
|
-
i0.ɵɵelementEnd();
|
|
11522
|
-
i0.ɵɵelementEnd();
|
|
11523
|
-
} if (rf & 2) {
|
|
11524
|
-
i0.ɵɵadvance(2);
|
|
11525
|
-
i0.ɵɵproperty("ngSwitch", ctx.isPartOfCaseTimeline);
|
|
11526
|
-
i0.ɵɵadvance(1);
|
|
11527
|
-
i0.ɵɵproperty("ngSwitchCase", true);
|
|
11528
|
-
i0.ɵɵadvance(1);
|
|
11529
|
-
i0.ɵɵproperty("ngSwitchCase", false);
|
|
11530
|
-
i0.ɵɵadvance(3);
|
|
11531
|
-
i0.ɵɵproperty("ngIf", ctx.selected);
|
|
11532
|
-
} }, directives: [i1.NgSwitch, i1.NgSwitchCase, i1.NgIf, EventLogTableComponent, EventLogDetailsComponent], styles: ["@media (max-width:991px){[class*=col-md][_ngcontent-%COMP%]{margin-bottom:30px}}.EventLog-DetailsPanel[_ngcontent-%COMP%]{border:1px solid #bfc1c3;padding:0 10px 10px;margin-top:20px}"] });
|
|
11533
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(EventLogComponent, [{
|
|
11534
|
-
type: Component,
|
|
11535
|
-
args: [{
|
|
11536
|
-
selector: 'ccd-event-log',
|
|
11537
|
-
templateUrl: './event-log.component.html',
|
|
11538
|
-
styleUrls: ['./event-log.scss']
|
|
11539
|
-
}]
|
|
11540
|
-
}], null, { events: [{
|
|
11541
|
-
type: Input
|
|
11542
|
-
}], onCaseHistory: [{
|
|
11543
|
-
type: Output
|
|
11544
|
-
}] }); })();
|
|
11503
|
+
SearchResultViewItemComparatorFactory.ɵfac = function SearchResultViewItemComparatorFactory_Factory(t) { return new (t || SearchResultViewItemComparatorFactory)(); };
|
|
11504
|
+
SearchResultViewItemComparatorFactory.ɵprov = i0.ɵɵdefineInjectable({ token: SearchResultViewItemComparatorFactory, factory: SearchResultViewItemComparatorFactory.ɵfac });
|
|
11505
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultViewItemComparatorFactory, [{
|
|
11506
|
+
type: Injectable
|
|
11507
|
+
}], null, null); })();
|
|
11545
11508
|
|
|
11546
|
-
class
|
|
11509
|
+
class OrganisationService {
|
|
11510
|
+
constructor(http, appconfig) {
|
|
11511
|
+
this.http = http;
|
|
11512
|
+
this.appconfig = appconfig;
|
|
11513
|
+
}
|
|
11514
|
+
static mapOrganisation(organisations) {
|
|
11515
|
+
const organisationsVm = new Array();
|
|
11516
|
+
organisations.forEach(org => {
|
|
11517
|
+
let contactInformation = null;
|
|
11518
|
+
if (org.contactInformation && org.contactInformation[0]) {
|
|
11519
|
+
contactInformation = org.contactInformation[0];
|
|
11520
|
+
}
|
|
11521
|
+
organisationsVm.push({
|
|
11522
|
+
organisationIdentifier: org.organisationIdentifier,
|
|
11523
|
+
name: org.name,
|
|
11524
|
+
addressLine1: contactInformation !== null ? contactInformation.addressLine1 : null,
|
|
11525
|
+
addressLine2: contactInformation !== null ? contactInformation.addressLine2 : null,
|
|
11526
|
+
addressLine3: contactInformation !== null ? contactInformation.addressLine3 : null,
|
|
11527
|
+
townCity: contactInformation !== null ? contactInformation.townCity : null,
|
|
11528
|
+
county: contactInformation !== null ? contactInformation.county : null,
|
|
11529
|
+
country: contactInformation !== null ? contactInformation.country : null,
|
|
11530
|
+
postCode: contactInformation !== null ? contactInformation.postCode : null,
|
|
11531
|
+
});
|
|
11532
|
+
});
|
|
11533
|
+
return organisationsVm;
|
|
11534
|
+
}
|
|
11535
|
+
getActiveOrganisations() {
|
|
11536
|
+
if (!this.organisations$) {
|
|
11537
|
+
const url = this.appconfig.getPrdUrl();
|
|
11538
|
+
const cacheTimeOut = this.appconfig.getCacheTimeOut();
|
|
11539
|
+
this.organisations$ = this.http.get(url)
|
|
11540
|
+
.pipe(map((orgs) => OrganisationService.mapOrganisation(orgs)), publishReplay(1), refCount(), take(1), catchError(e => {
|
|
11541
|
+
console.log(e);
|
|
11542
|
+
// Handle error and return blank Observable array
|
|
11543
|
+
return of([]);
|
|
11544
|
+
}));
|
|
11545
|
+
timer(cacheTimeOut).subscribe(() => {
|
|
11546
|
+
this.organisations$ = null;
|
|
11547
|
+
});
|
|
11548
|
+
}
|
|
11549
|
+
return this.organisations$;
|
|
11550
|
+
}
|
|
11547
11551
|
}
|
|
11548
|
-
|
|
11549
|
-
|
|
11550
|
-
|
|
11551
|
-
|
|
11552
|
-
|
|
11553
|
-
|
|
11554
|
-
|
|
11555
|
-
(
|
|
11556
|
-
|
|
11552
|
+
OrganisationService.ɵfac = function OrganisationService_Factory(t) { return new (t || OrganisationService)(i0.ɵɵinject(i1$2.HttpClient), i0.ɵɵinject(AbstractAppConfig)); };
|
|
11553
|
+
OrganisationService.ɵprov = i0.ɵɵdefineInjectable({ token: OrganisationService, factory: OrganisationService.ɵfac });
|
|
11554
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrganisationService, [{
|
|
11555
|
+
type: Injectable
|
|
11556
|
+
}], function () { return [{ type: i1$2.HttpClient }, { type: AbstractAppConfig }]; }, null); })();
|
|
11557
|
+
|
|
11558
|
+
class BrowserService {
|
|
11559
|
+
isFirefox() {
|
|
11560
|
+
return window.navigator.userAgent.indexOf('Firefox') > -1;
|
|
11561
|
+
}
|
|
11562
|
+
isSafari() {
|
|
11563
|
+
const isSafariAgent = window.navigator.userAgent.indexOf('Safari') > -1;
|
|
11564
|
+
const isChromeAgent = window.navigator.userAgent.indexOf('Chrome') > -1;
|
|
11565
|
+
if ((isChromeAgent) && (isSafariAgent)) {
|
|
11566
|
+
return false;
|
|
11567
|
+
}
|
|
11568
|
+
return isSafariAgent;
|
|
11569
|
+
}
|
|
11570
|
+
isIEOrEdge() {
|
|
11571
|
+
return /msie\s|trident\/|edge\//i.test(window.navigator.userAgent);
|
|
11572
|
+
}
|
|
11573
|
+
}
|
|
11574
|
+
BrowserService.ɵfac = function BrowserService_Factory(t) { return new (t || BrowserService)(); };
|
|
11575
|
+
BrowserService.ɵprov = i0.ɵɵdefineInjectable({ token: BrowserService, factory: BrowserService.ɵfac });
|
|
11576
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(BrowserService, [{
|
|
11577
|
+
type: Injectable
|
|
11578
|
+
}], null, null); })();
|
|
11579
|
+
|
|
11580
|
+
class LoadingModule {
|
|
11581
|
+
}
|
|
11582
|
+
LoadingModule.ɵfac = function LoadingModule_Factory(t) { return new (t || LoadingModule)(); };
|
|
11583
|
+
LoadingModule.ɵmod = i0.ɵɵdefineNgModule({ type: LoadingModule });
|
|
11584
|
+
LoadingModule.ɵinj = i0.ɵɵdefineInjector({ providers: [
|
|
11585
|
+
LoadingService
|
|
11586
|
+
], imports: [[]] });
|
|
11587
|
+
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LoadingModule, [{
|
|
11588
|
+
type: NgModule,
|
|
11557
11589
|
args: [{
|
|
11558
|
-
|
|
11559
|
-
|
|
11590
|
+
imports: [],
|
|
11591
|
+
declarations: [],
|
|
11592
|
+
exports: [],
|
|
11593
|
+
providers: [
|
|
11594
|
+
LoadingService
|
|
11595
|
+
]
|
|
11560
11596
|
}]
|
|
11561
11597
|
}], null, null); })();
|
|
11562
11598
|
|
|
@@ -13238,7 +13274,7 @@ CasePaymentHistoryViewerFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: Ca
|
|
|
13238
13274
|
i0.ɵɵelement(0, "ccpay-payment-lib", 0);
|
|
13239
13275
|
} if (rf & 2) {
|
|
13240
13276
|
i0.ɵɵproperty("API_ROOT", ctx.getBaseURL())("CCD_CASE_NUMBER", ctx.caseReference)("BULKSCAN_API_ROOT", ctx.getPayBulkScanBaseURL())("SELECTED_OPTION", "CCDorException")("ISBSENABLE", "true")("LOGGEDINUSEREMAIL", ctx.getUserEmail())("LOGGEDINUSERROLES", ctx.getUserRoles())("REFUNDS_API_ROOT", ctx.getRefundsUrl())("VIEW", "case-transactions")("REFUNDS_API_ROOT", ctx.getRefundsUrl())("TAKEPAYMENT", false)("SERVICEREQUEST", false)("PAYMENT_GROUP_REF", null)("EXC_REFERENCE", ctx.caseReference)("DCN_NUMBER", null)("LOGGEDINUSERROLES", ctx.getUserRoles());
|
|
13241
|
-
} }, directives: [i3.PaymentLibComponent], encapsulation: 2 });
|
|
13277
|
+
} }, directives: [i3$1.PaymentLibComponent], encapsulation: 2 });
|
|
13242
13278
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CasePaymentHistoryViewerFieldComponent, [{
|
|
13243
13279
|
type: Component,
|
|
13244
13280
|
args: [{
|
|
@@ -13563,7 +13599,7 @@ WaysToPayFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WaysToPayFieldCom
|
|
|
13563
13599
|
i0.ɵɵtemplate(0, WaysToPayFieldComponent_ccpay_payment_lib_0_Template, 1, 13, "ccpay-payment-lib", 0);
|
|
13564
13600
|
} if (rf & 2) {
|
|
13565
13601
|
i0.ɵɵproperty("ngIf", ctx.getUserRoles().length > 0);
|
|
13566
|
-
} }, directives: [i1.NgIf, i3.PaymentLibComponent], encapsulation: 2 });
|
|
13602
|
+
} }, directives: [i1.NgIf, i3$1.PaymentLibComponent], encapsulation: 2 });
|
|
13567
13603
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WaysToPayFieldComponent, [{
|
|
13568
13604
|
type: Component,
|
|
13569
13605
|
args: [{
|
|
@@ -14079,7 +14115,7 @@ class SaveOrDiscardDialogComponent {
|
|
|
14079
14115
|
this.matDialogRef.close(this.result);
|
|
14080
14116
|
}
|
|
14081
14117
|
}
|
|
14082
|
-
SaveOrDiscardDialogComponent.ɵfac = function SaveOrDiscardDialogComponent_Factory(t) { return new (t || SaveOrDiscardDialogComponent)(i0.ɵɵdirectiveInject(i1$
|
|
14118
|
+
SaveOrDiscardDialogComponent.ɵfac = function SaveOrDiscardDialogComponent_Factory(t) { return new (t || SaveOrDiscardDialogComponent)(i0.ɵɵdirectiveInject(i1$5.MatDialogRef)); };
|
|
14083
14119
|
SaveOrDiscardDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SaveOrDiscardDialogComponent, selectors: [["ccd-save-or-discard-dialog"]], decls: 15, vars: 0, consts: [[1, "dialog-header"], [1, "heading-h2", "x", 3, "click"], [1, "heading-h2", "dialog-title"], [1, "dialog-info"], [1, "text-info"], ["type", "button", "title", "Save", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Discard", 1, "button", "button-secondary", 3, "click"]], template: function SaveOrDiscardDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14084
14120
|
i0.ɵɵelementStart(0, "div");
|
|
14085
14121
|
i0.ɵɵelementStart(1, "div", 0);
|
|
@@ -14117,7 +14153,7 @@ SaveOrDiscardDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SaveOrDiscar
|
|
|
14117
14153
|
templateUrl: './save-or-discard-dialog.component.html',
|
|
14118
14154
|
styleUrls: ['../action-dialog.component.scss']
|
|
14119
14155
|
}]
|
|
14120
|
-
}], function () { return [{ type: i1$
|
|
14156
|
+
}], function () { return [{ type: i1$5.MatDialogRef }]; }, null); })();
|
|
14121
14157
|
|
|
14122
14158
|
class PageValidationService {
|
|
14123
14159
|
constructor(caseFieldService) {
|
|
@@ -14929,7 +14965,7 @@ class CaseEditPageComponent {
|
|
|
14929
14965
|
return caseEventData;
|
|
14930
14966
|
}
|
|
14931
14967
|
}
|
|
14932
|
-
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$
|
|
14968
|
+
CaseEditPageComponent.ɵfac = function CaseEditPageComponent_Factory(t) { return new (t || CaseEditPageComponent)(i0.ɵɵdirectiveInject(CaseEditComponent), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(FormValueService), i0.ɵɵdirectiveInject(FormErrorService), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(PageValidationService), i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(CaseFieldService)); };
|
|
14933
14969
|
CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageComponent, selectors: [["ccd-case-edit-page"]], decls: 13, vars: 12, consts: [[4, "ngIf"], [4, "ngIf", "ngIfThen", "ngIfElse"], ["titleBlock", ""], ["idBlock", ""], ["class", "govuk-error-summary", "aria-labelledby", "error-summary-title", "role", "alert", "tabindex", "-1", "data-module", "govuk-error-summary", 4, "ngIf"], ["class", "error-summary", "role", "status", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [1, "width-50"], ["class", "form", 3, "formGroup", "submit", 4, "ngIf"], ["class", "govuk-heading-l", 4, "ngIf"], [1, "govuk-heading-l"], [1, "govuk-caption-l"], [3, "content"], ["class", "heading-h2", 4, "ngIf"], [1, "heading-h2"], ["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"], ["role", "status", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading-3", 1, "heading-h3", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], ["class", "ccd-error-summary-li", 4, "ngFor", "ngForOf"], [1, "ccd-error-summary-li"], [1, "form", 3, "formGroup", "submit"], ["id", "fieldset-case-data"], [2, "display", "none"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged", 4, "ngIf"], ["class", "grid-row", 4, "ngIf"], [1, "form-group", "form-group-related"], ["type", "button", 1, "button", "button-secondary", 3, "disabled", "click"], ["type", "submit", 1, "button", 3, "disabled"], [1, "cancel"], ["href", "javascript:void(0)", 3, "click"], ["id", "caseEditForm", 3, "fields", "formGroup", "caseFields", "pageChangeSubject", "valuesChanged"], [1, "grid-row"], [1, "column-two-thirds", "rightBorderSeparator"], ["id", "caseEditForm1", 3, "fields", "formGroup", "caseFields"], [1, "column-one-third"], ["id", "caseEditForm2", 3, "fields", "formGroup", "caseFields"]], template: function CaseEditPageComponent_Template(rf, ctx) { if (rf & 1) {
|
|
14934
14970
|
i0.ɵɵtemplate(0, CaseEditPageComponent_ccd_loading_spinner_0_Template, 1, 0, "ccd-loading-spinner", 0);
|
|
14935
14971
|
i0.ɵɵtemplate(1, CaseEditPageComponent_ng_container_1_Template, 3, 2, "ng-container", 0);
|
|
@@ -14971,7 +15007,7 @@ CaseEditPageComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseEditPageCompone
|
|
|
14971
15007
|
templateUrl: 'case-edit-page.html',
|
|
14972
15008
|
styleUrls: ['./case-edit-page.scss']
|
|
14973
15009
|
}]
|
|
14974
|
-
}], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$
|
|
15010
|
+
}], function () { return [{ type: CaseEditComponent }, { type: i1$1.ActivatedRoute }, { type: FormValueService }, { type: FormErrorService }, { type: i0.ChangeDetectorRef }, { type: PageValidationService }, { type: i1$5.MatDialog }, { type: CaseFieldService }]; }, null); })();
|
|
14975
15011
|
|
|
14976
15012
|
class Confirmation {
|
|
14977
15013
|
constructor(caseId, status, header, body) {
|
|
@@ -17852,7 +17888,7 @@ PaginationComponent.ɵcmp = i0.ɵɵdefineComponent({ type: PaginationComponent,
|
|
|
17852
17888
|
i0.ɵɵproperty("id", ctx.id)("maxSize", ctx.maxSize);
|
|
17853
17889
|
i0.ɵɵadvance(3);
|
|
17854
17890
|
i0.ɵɵproperty("ngIf", !(ctx.autoHide && _r0.pages.length <= 1));
|
|
17855
|
-
} }, directives: [i1$
|
|
17891
|
+
} }, directives: [i1$6.PaginationControlsDirective, i1.NgIf, i1.NgForOf], pipes: [i1.DecimalPipe], styles: [".ngx-pagination[_ngcontent-%COMP%]{margin-left:0;margin-bottom:1rem;padding-top:25px;text-decoration:none;text-align:left;font-size:16px}.ngx-pagination[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%]:before{content:\" \";display:table}.ngx-pagination[_ngcontent-%COMP%]:after{clear:both}.ngx-pagination[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;margin-right:.0625rem;border-radius:0;display:inline-block}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{display:block;padding:.1875rem .625rem;border-radius:0;color:#005da6}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]:hover{background:#e6e6e6}.ngx-pagination[_ngcontent-%COMP%] .current[_ngcontent-%COMP%]{padding:.1875rem .625rem;background:#fff;color:#4c2c92;cursor:default;font-weight:900}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]{display:none}.ngx-pagination[_ngcontent-%COMP%] .disabled[_ngcontent-%COMP%]:hover{background:transparent}.ngx-pagination[_ngcontent-%COMP%] a[_ngcontent-%COMP%], .ngx-pagination[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{cursor:pointer}.ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{margin-right:.5rem;border-width:3px 0 0 3px}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous.disabled[_ngcontent-%COMP%]:before, .ngx-pagination[_ngcontent-%COMP%] .pagination-previous[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:before{display:inline-block;height:10px;width:10px;border-style:solid;color:#0a0a0a;background:transparent;transform:rotate(-45deg);content:\"\"}.ngx-pagination[_ngcontent-%COMP%] .pagination-next.disabled[_ngcontent-%COMP%]:after, .ngx-pagination[_ngcontent-%COMP%] .pagination-next[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:after{margin-left:.5rem;border-width:0 3px 3px 0}.ngx-pagination[_ngcontent-%COMP%] .show-for-sr[_ngcontent-%COMP%]{position:absolute!important;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}.ngx-pagination[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:none}@media screen and (max-width:601px){.ngx-pagination.responsive[_ngcontent-%COMP%] .small-screen[_ngcontent-%COMP%]{display:inline-block}.ngx-pagination.responsive[_ngcontent-%COMP%] li[_ngcontent-%COMP%]:not(.small-screen):not(.pagination-previous):not(.pagination-next){display:none}}"] });
|
|
17856
17892
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PaginationComponent, [{
|
|
17857
17893
|
type: Component,
|
|
17858
17894
|
args: [{
|
|
@@ -18202,7 +18238,7 @@ CaseListComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseListComponent, sele
|
|
|
18202
18238
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(9, 8, ctx.cases, i0.ɵɵpureFunction3(11, _c0$c, ctx.pageSize, ctx.currentPageNo, ctx.totalResultsCount)));
|
|
18203
18239
|
i0.ɵɵadvance(2);
|
|
18204
18240
|
i0.ɵɵproperty("ngIf", ctx.totalResultsCount > ctx.pageSize);
|
|
18205
|
-
} }, directives: [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, PaginationComponent], pipes: [i1$
|
|
18241
|
+
} }, directives: [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, i1.NgSwitch, i1.NgSwitchCase, i1.NgSwitchDefault, PaginationComponent], pipes: [i1$6.PaginatePipe, i1.CurrencyPipe], styles: [""] });
|
|
18206
18242
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseListComponent, [{
|
|
18207
18243
|
type: Component,
|
|
18208
18244
|
args: [{
|
|
@@ -19891,7 +19927,7 @@ class DeleteOrCancelDialogComponent {
|
|
|
19891
19927
|
this.matDialogRef.close(this.result);
|
|
19892
19928
|
}
|
|
19893
19929
|
}
|
|
19894
|
-
DeleteOrCancelDialogComponent.ɵfac = function DeleteOrCancelDialogComponent_Factory(t) { return new (t || DeleteOrCancelDialogComponent)(i0.ɵɵdirectiveInject(i1$
|
|
19930
|
+
DeleteOrCancelDialogComponent.ɵfac = function DeleteOrCancelDialogComponent_Factory(t) { return new (t || DeleteOrCancelDialogComponent)(i0.ɵɵdirectiveInject(i1$5.MatDialogRef)); };
|
|
19895
19931
|
DeleteOrCancelDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DeleteOrCancelDialogComponent, selectors: [["ccd-delete-or-cancel-dialog"]], decls: 15, vars: 0, consts: [[1, "dialog-header"], [1, "heading-h2", "x", 3, "click"], [1, "heading-h2", "dialog-title"], [1, "dialog-info"], [1, "text-info"], ["type", "button", "title", "Delete", 1, "button", "action-button", 3, "click"], ["type", "button", "title", "Cancel", 1, "button", "button-secondary", 3, "click"]], template: function DeleteOrCancelDialogComponent_Template(rf, ctx) { if (rf & 1) {
|
|
19896
19932
|
i0.ɵɵelementStart(0, "div");
|
|
19897
19933
|
i0.ɵɵelementStart(1, "div", 0);
|
|
@@ -19929,7 +19965,7 @@ DeleteOrCancelDialogComponent.ɵcmp = i0.ɵɵdefineComponent({ type: DeleteOrCan
|
|
|
19929
19965
|
templateUrl: './delete-or-cancel-dialog.component.html',
|
|
19930
19966
|
styleUrls: ['../action-dialog.component.scss']
|
|
19931
19967
|
}]
|
|
19932
|
-
}], function () { return [{ type: i1$
|
|
19968
|
+
}], function () { return [{ type: i1$5.MatDialogRef }]; }, null); })();
|
|
19933
19969
|
|
|
19934
19970
|
function EventTriggerComponent_form_0_option_5_Template(rf, ctx) { if (rf & 1) {
|
|
19935
19971
|
i0.ɵɵelementStart(0, "option", 8);
|
|
@@ -20112,8 +20148,8 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_3_Template(rf, ctx)
|
|
|
20112
20148
|
i0.ɵɵproperty("id", tab_r16.id)("label", tab_r16.label);
|
|
20113
20149
|
} }
|
|
20114
20150
|
function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_th_1_Template(rf, ctx) { if (rf & 1) {
|
|
20115
|
-
i0.ɵɵelementStart(0, "th",
|
|
20116
|
-
i0.ɵɵelementStart(1, "div",
|
|
20151
|
+
i0.ɵɵelementStart(0, "th", 34);
|
|
20152
|
+
i0.ɵɵelementStart(1, "div", 35);
|
|
20117
20153
|
i0.ɵɵtext(2);
|
|
20118
20154
|
i0.ɵɵelementEnd();
|
|
20119
20155
|
i0.ɵɵelementEnd();
|
|
@@ -20125,9 +20161,9 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_
|
|
|
20125
20161
|
function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template(rf, ctx) { if (rf & 1) {
|
|
20126
20162
|
i0.ɵɵelementStart(0, "tr");
|
|
20127
20163
|
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_th_1_Template, 3, 1, "th", 31);
|
|
20128
|
-
i0.ɵɵelementStart(2, "
|
|
20129
|
-
i0.ɵɵelementStart(3, "span",
|
|
20130
|
-
i0.ɵɵelement(4, "ccd-field-read",
|
|
20164
|
+
i0.ɵɵelementStart(2, "td");
|
|
20165
|
+
i0.ɵɵelementStart(3, "span", 32);
|
|
20166
|
+
i0.ɵɵelement(4, "ccd-field-read", 33);
|
|
20131
20167
|
i0.ɵɵelementEnd();
|
|
20132
20168
|
i0.ɵɵelementEnd();
|
|
20133
20169
|
i0.ɵɵelementEnd();
|
|
@@ -20136,16 +20172,14 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_
|
|
|
20136
20172
|
const ctx_r22 = i0.ɵɵnextContext(4);
|
|
20137
20173
|
i0.ɵɵadvance(1);
|
|
20138
20174
|
i0.ɵɵproperty("ngIf", !ctx_r22.isFieldToHaveNoLabel(field_r21));
|
|
20139
|
-
i0.ɵɵadvance(
|
|
20140
|
-
i0.ɵɵproperty("id", "case-viewer-field-read--" + field_r21.id);
|
|
20141
|
-
i0.ɵɵadvance(2);
|
|
20175
|
+
i0.ɵɵadvance(3);
|
|
20142
20176
|
i0.ɵɵproperty("topLevelFormGroup", ctx_r22.formGroup.controls["data"])("caseField", field_r21)("caseReference", ctx_r22.caseDetails.case_id)("markdownUseHrefAsRouterLink", ctx_r22.markdownUseHrefAsRouterLink);
|
|
20143
20177
|
} }
|
|
20144
20178
|
function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template(rf, ctx) { if (rf & 1) {
|
|
20145
|
-
i0.ɵɵelementStart(0, "tr",
|
|
20179
|
+
i0.ɵɵelementStart(0, "tr", 36);
|
|
20146
20180
|
i0.ɵɵelementStart(1, "th");
|
|
20147
|
-
i0.ɵɵelementStart(2, "span",
|
|
20148
|
-
i0.ɵɵelement(3, "ccd-field-read",
|
|
20181
|
+
i0.ɵɵelementStart(2, "span", 32);
|
|
20182
|
+
i0.ɵɵelement(3, "ccd-field-read", 33);
|
|
20149
20183
|
i0.ɵɵelementEnd();
|
|
20150
20184
|
i0.ɵɵelementEnd();
|
|
20151
20185
|
i0.ɵɵelementEnd();
|
|
@@ -20160,7 +20194,7 @@ function CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_
|
|
|
20160
20194
|
i0.ɵɵelementStart(1, "div", 27);
|
|
20161
20195
|
i0.ɵɵelementContainerStart(2, 28);
|
|
20162
20196
|
i0.ɵɵpipe(3, "ccdIsCompound");
|
|
20163
|
-
i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template, 5,
|
|
20197
|
+
i0.ɵɵtemplate(4, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_4_Template, 5, 5, "tr", 29);
|
|
20164
20198
|
i0.ɵɵtemplate(5, CaseFullAccessViewComponent_ng_container_11_mat_tab_4_ng_template_1_ng_container_2_tr_5_Template, 4, 4, "tr", 30);
|
|
20165
20199
|
i0.ɵɵelementContainerEnd();
|
|
20166
20200
|
i0.ɵɵelementEnd();
|
|
@@ -20487,13 +20521,13 @@ CaseFullAccessViewComponent.TRIGGER_TEXT_START = 'Go';
|
|
|
20487
20521
|
CaseFullAccessViewComponent.TRIGGER_TEXT_CONTINUE = 'Ignore Warning and Go';
|
|
20488
20522
|
CaseFullAccessViewComponent.UNICODE_SPACE = '%20';
|
|
20489
20523
|
CaseFullAccessViewComponent.EMPTY_SPACE = ' ';
|
|
20490
|
-
CaseFullAccessViewComponent.ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$
|
|
20524
|
+
CaseFullAccessViewComponent.ɵfac = function CaseFullAccessViewComponent_Factory(t) { return new (t || CaseFullAccessViewComponent)(i0.ɵɵdirectiveInject(i0.NgZone), i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(i1$1.Router), i0.ɵɵdirectiveInject(NavigationNotifierService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(ActivityPollingService), i0.ɵɵdirectiveInject(i1$5.MatDialog), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(DraftService), i0.ɵɵdirectiveInject(ErrorNotifierService), i0.ɵɵdirectiveInject(ConvertHrefToRouterService), i0.ɵɵdirectiveInject(i1.Location)); };
|
|
20491
20525
|
CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAccessViewComponent, selectors: [["ccd-case-full-access-view"]], viewQuery: function CaseFullAccessViewComponent_Query(rf, ctx) { if (rf & 1) {
|
|
20492
20526
|
i0.ɵɵviewQuery(_c0$a, 1);
|
|
20493
20527
|
} if (rf & 2) {
|
|
20494
20528
|
let _t;
|
|
20495
20529
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.tabGroup = _t.first);
|
|
20496
|
-
} }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 12, vars: 11, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], ["animationDuration", "0ms", 3, "disableRipple", "selectedTabChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], [
|
|
20530
|
+
} }, inputs: { hasPrint: "hasPrint", hasEventSelector: "hasEventSelector", caseDetails: "caseDetails", prependedTabs: "prependedTabs", appendedTabs: "appendedTabs" }, decls: 12, vars: 11, consts: [["class", "error-summary", "role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 4, "ngIf"], [3, "triggerTextContinue", "triggerTextIgnore", "callbackErrorsSubject", "callbackErrorsContext"], [3, "caseId", "displayMode"], [1, "grid-row"], [1, "column-one-half"], [3, "caseDetails"], ["class", "case-viewer-controls", 4, "ngIf"], ["class", "column-one-half", 4, "ngIf"], [1, "column-full"], [4, "ngIf"], ["role", "group", "aria-labelledby", "edit-case-event_error-summary-heading", "tabindex", "-1", 1, "error-summary"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h1", "error-summary-heading"], ["id", "edit-case-event_error-summary-body", 1, "govuk-error-summary__body"], ["href", "get-help", "target", "_blank"], ["id", "edit-case-event_error-summary-heading", 1, "heading-h2", "error-summary-heading"], ["class", "error-summary-list", 4, "ngIf"], [1, "error-summary-list"], [4, "ngFor", "ngForOf"], [1, "case-viewer-controls"], ["id", "case-viewer-control-print", "routerLink", "print", 1, "button", "button-secondary"], [3, "isDisabled", "triggers", "triggerText", "onTriggerChange", "onTriggerSubmit"], ["animationDuration", "0ms", 3, "disableRipple", "selectedTabChange"], ["tabGroup", ""], [3, "id", "label", 4, "ngFor", "ngForOf"], [3, "id", "label"], ["matTabContent", ""], ["aria-describedby", "case viewer table"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-field-label", 4, "ngIf"], [1, "text-16"], [3, "topLevelFormGroup", "caseField", "caseReference", "markdownUseHrefAsRouterLink"], ["id", "case-viewer-field-label"], [1, "case-viewer-label", "text-16"], [1, "compound-field"]], template: function CaseFullAccessViewComponent_Template(rf, ctx) { if (rf & 1) {
|
|
20497
20531
|
i0.ɵɵtemplate(0, CaseFullAccessViewComponent_div_0_Template, 10, 0, "div", 0);
|
|
20498
20532
|
i0.ɵɵtemplate(1, CaseFullAccessViewComponent_div_1_Template, 6, 2, "div", 0);
|
|
20499
20533
|
i0.ɵɵelementStart(2, "ccd-callback-errors", 1);
|
|
@@ -20536,7 +20570,7 @@ CaseFullAccessViewComponent.ɵcmp = i0.ɵɵdefineComponent({ type: CaseFullAcces
|
|
|
20536
20570
|
templateUrl: './case-full-access-view.component.html',
|
|
20537
20571
|
styleUrls: ['./case-full-access-view.component.scss']
|
|
20538
20572
|
}]
|
|
20539
|
-
}], function () { return [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$
|
|
20573
|
+
}], function () { return [{ type: i0.NgZone }, { type: i1$1.ActivatedRoute }, { type: i1$1.Router }, { type: NavigationNotifierService }, { type: OrderService }, { type: ActivityPollingService }, { type: i1$5.MatDialog }, { type: AlertService }, { type: DraftService }, { type: ErrorNotifierService }, { type: ConvertHrefToRouterService }, { type: i1.Location }]; }, { hasPrint: [{
|
|
20540
20574
|
type: Input
|
|
20541
20575
|
}], hasEventSelector: [{
|
|
20542
20576
|
type: Input
|
|
@@ -23652,11 +23686,11 @@ function SearchResultComponent_table_0_th_9_Template(rf, ctx) { if (rf & 1) {
|
|
|
23652
23686
|
i0.ɵɵadvance(2);
|
|
23653
23687
|
i0.ɵɵproperty("checked", ctx_r6.allOnPageSelected())("disabled", !ctx_r6.canAnyBeShared());
|
|
23654
23688
|
} }
|
|
23655
|
-
function
|
|
23689
|
+
function SearchResultComponent_table_0_th_10_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
23656
23690
|
const _r19 = i0.ɵɵgetCurrentView();
|
|
23657
23691
|
i0.ɵɵelementStart(0, "div", 27);
|
|
23658
23692
|
i0.ɵɵelementStart(1, "a", 28);
|
|
23659
|
-
i0.ɵɵlistener("click", function
|
|
23693
|
+
i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_10_div_5_Template_a_click_1_listener() { i0.ɵɵrestoreView(_r19); const col_r15 = i0.ɵɵnextContext().$implicit; const ctx_r17 = i0.ɵɵnextContext(2); return ctx_r17.sort(col_r15); });
|
|
23660
23694
|
i0.ɵɵelementEnd();
|
|
23661
23695
|
i0.ɵɵelementEnd();
|
|
23662
23696
|
} if (rf & 2) {
|
|
@@ -23670,13 +23704,11 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
23670
23704
|
i0.ɵɵelementStart(0, "th");
|
|
23671
23705
|
i0.ɵɵelementStart(1, "table", 24);
|
|
23672
23706
|
i0.ɵɵelementStart(2, "tr");
|
|
23673
|
-
i0.ɵɵelementStart(3, "
|
|
23674
|
-
i0.ɵɵ
|
|
23675
|
-
i0.ɵɵ
|
|
23676
|
-
i0.ɵɵtext(5);
|
|
23677
|
-
i0.ɵɵelementEnd();
|
|
23678
|
-
i0.ɵɵtemplate(6, SearchResultComponent_table_0_th_10_div_6_Template, 2, 1, "div", 26);
|
|
23707
|
+
i0.ɵɵelementStart(3, "div", 25);
|
|
23708
|
+
i0.ɵɵlistener("click", function SearchResultComponent_table_0_th_10_Template_div_click_3_listener() { i0.ɵɵrestoreView(_r22); const col_r15 = ctx.$implicit; const ctx_r21 = i0.ɵɵnextContext(2); return ctx_r21.sort(col_r15); });
|
|
23709
|
+
i0.ɵɵtext(4);
|
|
23679
23710
|
i0.ɵɵelementEnd();
|
|
23711
|
+
i0.ɵɵtemplate(5, SearchResultComponent_table_0_th_10_div_5_Template, 2, 1, "div", 26);
|
|
23680
23712
|
i0.ɵɵelementEnd();
|
|
23681
23713
|
i0.ɵɵelementEnd();
|
|
23682
23714
|
i0.ɵɵelementEnd();
|
|
@@ -23684,8 +23716,8 @@ function SearchResultComponent_table_0_th_10_Template(rf, ctx) { if (rf & 1) {
|
|
|
23684
23716
|
const col_r15 = ctx.$implicit;
|
|
23685
23717
|
const ctx_r7 = i0.ɵɵnextContext(2);
|
|
23686
23718
|
i0.ɵɵadvance(1);
|
|
23687
|
-
i0.ɵɵ
|
|
23688
|
-
i0.ɵɵadvance(
|
|
23719
|
+
i0.ɵɵattributeInterpolate2("aria-label", "Sort by ", col_r15.label, " ", ctx_r7.isSortAscending(col_r15) ? "ascending" : "descending", "");
|
|
23720
|
+
i0.ɵɵadvance(3);
|
|
23689
23721
|
i0.ɵɵtextInterpolate(col_r15.label);
|
|
23690
23722
|
i0.ɵɵadvance(1);
|
|
23691
23723
|
i0.ɵɵproperty("ngIf", ctx_r7.comparator(col_r15));
|
|
@@ -23957,7 +23989,7 @@ function SearchResultComponent_table_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
23957
23989
|
i0.ɵɵelementStart(7, "thead");
|
|
23958
23990
|
i0.ɵɵelementStart(8, "tr", 7);
|
|
23959
23991
|
i0.ɵɵtemplate(9, SearchResultComponent_table_0_th_9_Template, 4, 2, "th", 8);
|
|
23960
|
-
i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template,
|
|
23992
|
+
i0.ɵɵtemplate(10, SearchResultComponent_table_0_th_10_Template, 6, 4, "th", 9);
|
|
23961
23993
|
i0.ɵɵtemplate(11, SearchResultComponent_table_0_th_11_Template, 1, 0, "th", 10);
|
|
23962
23994
|
i0.ɵɵelementEnd();
|
|
23963
23995
|
i0.ɵɵelementEnd();
|
|
@@ -24343,7 +24375,7 @@ SearchResultComponent.ɵcmp = i0.ɵɵdefineComponent({ type: SearchResultCompone
|
|
|
24343
24375
|
i0.ɵɵproperty("ngIf", ctx.hasResults());
|
|
24344
24376
|
i0.ɵɵadvance(1);
|
|
24345
24377
|
i0.ɵɵproperty("ngIf", !(ctx.hasResults() || ctx.hasDrafts()));
|
|
24346
|
-
} }, directives: [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], pipes: [i1.DecimalPipe, i1$
|
|
24378
|
+
} }, directives: [i1.NgIf, i1.NgForOf, i1$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], pipes: [i1.DecimalPipe, i1$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe], styles: ["table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{vertical-align:top}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{font-size:16px;word-wrap:break-word}table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{float:left}table[_ngcontent-%COMP%] .caseid-col[_ngcontent-%COMP%]{white-space:nowrap}.notification[_ngcontent-%COMP%]{text-align:center;padding:30px 0;margin-top:75px}a[_ngcontent-%COMP%]:hover{color:#005ea5}.search-result-reset-link[_ngcontent-%COMP%]{padding-right:15px;padding-left:15px}.search-result-column-header[_ngcontent-%COMP%]{width:unset;table-layout:normal}.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:table-cell;width:auto}@media screen and (max-width:379px){.search-result-column-header[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{display:block;float:right}}.search-result-column-label[_ngcontent-%COMP%]{font-size:16px;font-weight:700;word-wrap:break-word;cursor:pointer;padding-right:15px}.search-result-column-sort[_ngcontent-%COMP%]{font-size:16px}.sort-widget[_ngcontent-%COMP%]{cursor:pointer;text-decoration:none;color:#231f20}span.heading-medium[_ngcontent-%COMP%]{margin-top:-20px}.govuk-table__checkbox[_ngcontent-%COMP%]{vertical-align:middle;padding-left:3px}#search-result-heading__text[_ngcontent-%COMP%]:focus{outline:none}"] });
|
|
24347
24379
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SearchResultComponent, [{
|
|
24348
24380
|
type: Component,
|
|
24349
24381
|
args: [{
|