@hmcts/ccd-case-ui-toolkit 7.0.22-upload-timestamp → 7.0.22
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/esm2020/lib/shared/components/case-history/case-history.component.mjs +13 -13
- package/esm2020/lib/shared/components/palette/complex/read-complex-field.component.mjs +14 -12
- package/esm2020/lib/shared/components/palette/document/write-document-field.component.mjs +1 -17
- package/esm2020/lib/shared/components/palette/dynamic-list/dynamic-list.pipe.mjs +2 -2
- package/esm2020/lib/shared/domain/document/document-data.model.mjs +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs +28 -36
- package/fesm2015/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs +26 -40
- package/fesm2020/hmcts-ccd-case-ui-toolkit.mjs.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts +0 -1
- package/lib/shared/components/palette/document/write-document-field.component.d.ts.map +1 -1
- package/lib/shared/domain/document/document-data.model.d.ts +0 -1
- package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -13056,17 +13056,19 @@ class ReadComplexFieldComponent extends AbstractFieldReadComponent {
|
|
|
13056
13056
|
this.context = PaletteContext.DEFAULT;
|
|
13057
13057
|
}
|
|
13058
13058
|
}
|
|
13059
|
-
this.caseField?.field_type
|
|
13060
|
-
|
|
13061
|
-
|
|
13062
|
-
|
|
13063
|
-
|
|
13064
|
-
|
|
13065
|
-
this.caseField.value[field.id].value.code
|
|
13066
|
-
|
|
13067
|
-
|
|
13068
|
-
|
|
13069
|
-
|
|
13059
|
+
if (this.caseField?.field_type && this.caseField.field_type.complex_fields) {
|
|
13060
|
+
this.caseField?.field_type?.complex_fields?.forEach((field) => {
|
|
13061
|
+
if (field?.isDynamic()) {
|
|
13062
|
+
field.list_items = this.caseField.value[field.id]?.list_items;
|
|
13063
|
+
field.value = {
|
|
13064
|
+
list_items: field.list_items,
|
|
13065
|
+
value: this.caseField.value[field.id]?.value && this.caseField.value[field.id].value.code ?
|
|
13066
|
+
this.caseField.value[field.id].value.code :
|
|
13067
|
+
this.caseField.value[field.id]?.value
|
|
13068
|
+
};
|
|
13069
|
+
}
|
|
13070
|
+
});
|
|
13071
|
+
}
|
|
13070
13072
|
}
|
|
13071
13073
|
}
|
|
13072
13074
|
ReadComplexFieldComponent.ɵfac = /*@__PURE__*/ function () { let ɵReadComplexFieldComponent_BaseFactory; return function ReadComplexFieldComponent_Factory(t) { return (ɵReadComplexFieldComponent_BaseFactory || (ɵReadComplexFieldComponent_BaseFactory = i0.ɵɵgetInheritedFactory(ReadComplexFieldComponent)))(t || ReadComplexFieldComponent); }; }();
|
|
@@ -13488,9 +13490,6 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13488
13490
|
if (documentHash) {
|
|
13489
13491
|
this.uploadedDocument.get(WriteDocumentFieldComponent.DOCUMENT_HASH).setValue(documentHash);
|
|
13490
13492
|
}
|
|
13491
|
-
if (this.uploadedDocument.get(WriteDocumentFieldComponent.UPLOAD_TIMESTAMP)) {
|
|
13492
|
-
this.uploadedDocument.removeControl(WriteDocumentFieldComponent.UPLOAD_TIMESTAMP);
|
|
13493
|
-
}
|
|
13494
13493
|
}
|
|
13495
13494
|
createDocumentFormWithValidator(document) {
|
|
13496
13495
|
let documentFormGroup = {
|
|
@@ -13498,12 +13497,6 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13498
13497
|
document_binary_url: new FormControl(document.document_binary_url, Validators.required),
|
|
13499
13498
|
document_filename: new FormControl(document.document_filename, Validators.required)
|
|
13500
13499
|
};
|
|
13501
|
-
if (document.upload_timestamp && (typeof document.upload_timestamp === 'string')) {
|
|
13502
|
-
documentFormGroup = {
|
|
13503
|
-
...documentFormGroup,
|
|
13504
|
-
...{ upload_timestamp: new FormControl(document.upload_timestamp) }
|
|
13505
|
-
};
|
|
13506
|
-
}
|
|
13507
13500
|
documentFormGroup = this.secureModeOn ? {
|
|
13508
13501
|
...documentFormGroup,
|
|
13509
13502
|
...{ document_hash: new FormControl(document.document_hash) }
|
|
@@ -13516,12 +13509,6 @@ class WriteDocumentFieldComponent extends AbstractFieldWriteComponent {
|
|
|
13516
13509
|
document_binary_url: new FormControl(document.document_binary_url),
|
|
13517
13510
|
document_filename: new FormControl(document.document_filename)
|
|
13518
13511
|
};
|
|
13519
|
-
if (document.upload_timestamp && (typeof document.upload_timestamp === 'string')) {
|
|
13520
|
-
documentFormGroup = {
|
|
13521
|
-
...documentFormGroup,
|
|
13522
|
-
...{ upload_timestamp: new FormControl(document.upload_timestamp) }
|
|
13523
|
-
};
|
|
13524
|
-
}
|
|
13525
13512
|
documentFormGroup = this.secureModeOn ? {
|
|
13526
13513
|
...documentFormGroup,
|
|
13527
13514
|
...{ document_hash: new FormControl(document.document_hash) }
|
|
@@ -13597,7 +13584,6 @@ WriteDocumentFieldComponent.DOCUMENT_URL = 'document_url';
|
|
|
13597
13584
|
WriteDocumentFieldComponent.DOCUMENT_BINARY_URL = 'document_binary_url';
|
|
13598
13585
|
WriteDocumentFieldComponent.DOCUMENT_FILENAME = 'document_filename';
|
|
13599
13586
|
WriteDocumentFieldComponent.DOCUMENT_HASH = 'document_hash';
|
|
13600
|
-
WriteDocumentFieldComponent.UPLOAD_TIMESTAMP = 'upload_timestamp';
|
|
13601
13587
|
WriteDocumentFieldComponent.UPLOAD_ERROR_FILE_REQUIRED = 'File required';
|
|
13602
13588
|
WriteDocumentFieldComponent.UPLOAD_ERROR_NOT_AVAILABLE = 'Document upload facility is not available at the moment';
|
|
13603
13589
|
WriteDocumentFieldComponent.UPLOAD_WAITING_FILE_STATUS = 'Uploading...';
|
|
@@ -13663,7 +13649,7 @@ WriteDocumentFieldComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type:
|
|
|
13663
13649
|
|
|
13664
13650
|
class DynamicListPipe {
|
|
13665
13651
|
transform(value, items) {
|
|
13666
|
-
const item = items
|
|
13652
|
+
const item = items?.find(i => i.code === value);
|
|
13667
13653
|
return item ? item.label : DynamicListPipe.EMPTY;
|
|
13668
13654
|
}
|
|
13669
13655
|
}
|
|
@@ -29733,29 +29719,29 @@ function CaseHistoryComponent_div_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
29733
29719
|
i0.ɵɵadvance(6);
|
|
29734
29720
|
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(15, 19, "Date"));
|
|
29735
29721
|
i0.ɵɵadvance(3);
|
|
29736
|
-
i0.ɵɵtextInterpolate(i0.ɵɵ
|
|
29722
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(18, 21, ctx_r0.caseHistory.event.timestamp, "local"));
|
|
29737
29723
|
i0.ɵɵadvance(4);
|
|
29738
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22,
|
|
29724
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(22, 24, "Author"));
|
|
29739
29725
|
i0.ɵɵadvance(3);
|
|
29740
|
-
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25,
|
|
29726
|
+
i0.ɵɵtextInterpolate2("", i0.ɵɵpipeBind1(25, 26, ctx_r0.caseHistory.event.user_first_name), " ", i0.ɵɵpipeBind1(26, 28, ctx_r0.caseHistory.event.user_last_name), "");
|
|
29741
29727
|
i0.ɵɵadvance(5);
|
|
29742
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30,
|
|
29728
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(30, 30, "End state"));
|
|
29743
29729
|
i0.ɵɵadvance(3);
|
|
29744
29730
|
i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.state_name);
|
|
29745
29731
|
i0.ɵɵadvance(3);
|
|
29746
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36,
|
|
29732
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(36, 32, "Event"));
|
|
29747
29733
|
i0.ɵɵadvance(3);
|
|
29748
29734
|
i0.ɵɵtextInterpolate(ctx_r0.caseHistory.event.event_name);
|
|
29749
29735
|
i0.ɵɵadvance(3);
|
|
29750
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42,
|
|
29736
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(42, 34, "Summary"));
|
|
29751
29737
|
i0.ɵɵadvance(3);
|
|
29752
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45,
|
|
29738
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(45, 36, ctx_r0.caseHistory.event.summary));
|
|
29753
29739
|
i0.ɵɵadvance(4);
|
|
29754
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49,
|
|
29740
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(49, 38, "Comment"));
|
|
29755
29741
|
i0.ɵɵadvance(3);
|
|
29756
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52,
|
|
29742
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(52, 40, ctx_r0.caseHistory.event.comment));
|
|
29757
29743
|
i0.ɵɵadvance(4);
|
|
29758
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56,
|
|
29744
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(56, 42, "Case Details"));
|
|
29759
29745
|
i0.ɵɵadvance(2);
|
|
29760
29746
|
i0.ɵɵproperty("ngForOf", ctx_r0.tabs);
|
|
29761
29747
|
} }
|
|
@@ -29809,13 +29795,13 @@ CaseHistoryComponent.PARAM_EVENT_ID = 'eid';
|
|
|
29809
29795
|
CaseHistoryComponent.ERROR_MESSAGE = 'No case history to show';
|
|
29810
29796
|
CaseHistoryComponent.ɵfac = function CaseHistoryComponent_Factory(t) { return new (t || CaseHistoryComponent)(i0.ɵɵdirectiveInject(i1$1.ActivatedRoute), i0.ɵɵdirectiveInject(AlertService), i0.ɵɵdirectiveInject(OrderService), i0.ɵɵdirectiveInject(CaseNotifier), i0.ɵɵdirectiveInject(CaseHistoryService)); };
|
|
29811
29797
|
CaseHistoryComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: CaseHistoryComponent, selectors: [["ccd-case-history"]], inputs: { event: "event" }, decls: 1, vars: 1, consts: [[4, "ngIf"], [1, "grid-row"], [1, "column-full"], [3, "caseDetails"], [1, "heading-h2"], ["aria-describedby", "event details table", 1, "EventDetails"], [4, "ngFor", "ngForOf"], [1, "caseHistorySection"], [1, "heading-h3"], [1, "CaseHistory", 3, "id"], ["ccdLabelSubstitutor", "", 3, "caseField", "contextFields", "hidden"], [3, "ngSwitch"], [4, "ngSwitchCase"], ["class", "compound-field", 4, "ngSwitchCase"], ["id", "case-viewer-label-header"], [1, "case-viewer-label"], [3, "caseField", "caseReference"], [1, "compound-field"], ["colspan", "2"]], template: function CaseHistoryComponent_Template(rf, ctx) { if (rf & 1) {
|
|
29812
|
-
i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58,
|
|
29798
|
+
i0.ɵɵtemplate(0, CaseHistoryComponent_div_0_Template, 58, 44, "div", 0);
|
|
29813
29799
|
} if (rf & 2) {
|
|
29814
29800
|
i0.ɵɵproperty("ngIf", ctx.isDataLoaded());
|
|
29815
29801
|
} }, styles: [".CaseHistory[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .CaseHistory[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:none}.caseHistorySection[_ngcontent-%COMP%]{margin-top:40px}.EventDetails[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .EventDetails[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:none}th[_ngcontent-%COMP%]{width:1%;white-space:nowrap;vertical-align:top}.compound-field[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.case-viewer-controls[_ngcontent-%COMP%]{margin-top:47px;margin-bottom:20px}ccd-case-header[_ngcontent-%COMP%]{float:left;margin-right:10px}ccd-event-trigger[_ngcontent-%COMP%]{float:right}.case-viewer-label[_ngcontent-%COMP%]{min-width:300px;white-space:normal}"] });
|
|
29816
29802
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CaseHistoryComponent, [{
|
|
29817
29803
|
type: Component,
|
|
29818
|
-
args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n </th>\n <td>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td colspan=\"2\">\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}\n"] }]
|
|
29804
|
+
args: [{ selector: 'ccd-case-history', template: "<div *ngIf=\"isDataLoaded()\">\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <ccd-case-header [caseDetails]=\"caseDetails\"></ccd-case-header>\n </div>\n </div>\n <div class=\"grid-row\">\n <div class=\"column-full\">\n <div>\n <h2 class=\"heading-h2\">{{'Event Details' | rpxTranslate}}</h2>\n <table class=\"EventDetails\" aria-describedby=\"event details table\">\n <tbody>\n <tr>\n <th>{{'Date' | rpxTranslate}}</th>\n <td>{{caseHistory.event.timestamp | ccdDate : 'local'}}</td>\n </tr>\n <tr>\n <th>{{'Author' | rpxTranslate}}</th>\n <td>{{caseHistory.event.user_first_name | titlecase}} {{caseHistory.event.user_last_name | uppercase}}</td>\n </tr>\n <tr>\n <th>{{'End state' | rpxTranslate}}</th>\n <td>{{caseHistory.event.state_name}}</td>\n </tr>\n <tr>\n <th>{{'Event' | rpxTranslate}}</th>\n <td>{{caseHistory.event.event_name}}</td>\n </tr>\n <tr>\n <th>{{'Summary' | rpxTranslate}}</th>\n <td>{{caseHistory.event.summary | ccdDash}}</td>\n </tr>\n <tr>\n <th>{{'Comment' | rpxTranslate}}</th>\n <td>{{caseHistory.event.comment | ccdDash}}</td>\n </tr>\n </tbody>\n </table>\n </div>\n <div>\n <h2 class=\"heading-h2\">{{'Case Details' | rpxTranslate}}</h2>\n <ng-container *ngFor=\"let tab of tabs\">\n <div class=\"caseHistorySection\">\n <h3 class=\"heading-h3\">{{tab.label}}</h3>\n <table class=\"CaseHistory\" id=\"{{tab.id}}\" [attr.aria-describedby]=\"'case history table' | rpxTranslate\">\n <ng-container *ngFor=\"let field of tab | ccdTabFields | ccdReadFieldsFilter:false :undefined :true\">\n <div ccdLabelSubstitutor [caseField]=\"field\" [contextFields]=\"tab.fields\" [hidden]=\"field.hidden\">\n <ng-container [ngSwitch]=\"!(field | ccdIsCompound)\">\n <tr *ngSwitchCase=\"true\">\n <th id=\"case-viewer-label-header\">\n <div class=\"case-viewer-label\">{{field.label}}</div>\n </th>\n <td>\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n <tr *ngSwitchCase=\"false\" class=\"compound-field\">\n <td colspan=\"2\">\n <ccd-field-read [caseField]=\"field\" [caseReference]=\"caseHistory.case_id\"></ccd-field-read>\n </td>\n </tr>\n </ng-container>\n </div>\n </ng-container>\n </table>\n </div>\n </ng-container>\n </div>\n </div>\n </div>\n</div>\n", styles: [".CaseHistory th,.CaseHistory td{border-bottom:none}.caseHistorySection{margin-top:40px}.EventDetails th,.EventDetails td{border-bottom:none}th{width:1%;white-space:nowrap;vertical-align:top}.compound-field td{padding:0}.case-viewer-controls{margin-top:47px;margin-bottom:20px}ccd-case-header{float:left;margin-right:10px}ccd-event-trigger{float:right}.case-viewer-label{min-width:300px;white-space:normal}\n"] }]
|
|
29819
29805
|
}], function () { return [{ type: i1$1.ActivatedRoute }, { type: AlertService }, { type: OrderService }, { type: CaseNotifier }, { type: CaseHistoryService }]; }, { event: [{
|
|
29820
29806
|
type: Input
|
|
29821
29807
|
}] }); })();
|