@hmcts/ccd-case-ui-toolkit 6.10.6-angular-upgrade-r4 → 6.10.7-rollback-case-link
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 +240 -2881
- 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/commons/case-edit-data/case-edit-data.service.js +1 -9
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +7 -17
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +1 -28
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -10
- package/esm2015/lib/shared/components/palette/base-field/abstract-form-field.component.js +2 -4
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +4 -4
- 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 +3 -4
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +26 -25
- package/esm2015/lib/shared/components/palette/case-link/index.js +1 -4
- package/esm2015/lib/shared/components/palette/case-link/read-case-link-field.component.js +8 -28
- package/esm2015/lib/shared/components/palette/case-link/write-case-link-field.component.js +66 -77
- package/esm2015/lib/shared/components/palette/palette.module.js +22 -68
- package/esm2015/lib/shared/components/palette/palette.service.js +4 -12
- package/esm2015/lib/shared/components/palette/utils/is-compound.pipe.js +1 -10
- package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
- package/esm2015/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.js +1 -5
- package/esm2015/lib/shared/pipes/index.js +1 -2
- package/esm2015/lib/shared/pipes/pipes.module.js +4 -8
- package/esm2015/lib/shared/services/fields/fields.utils.js +1 -7
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +233 -2585
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +0 -5
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +0 -2
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +0 -7
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/page-validation.service.d.ts +0 -1
- package/lib/shared/components/case-editor/services/page-validation.service.d.ts.map +1 -1
- package/lib/shared/components/palette/base-field/abstract-form-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.map +1 -1
- package/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/index.d.ts +0 -3
- package/lib/shared/components/palette/case-link/index.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts +0 -3
- package/lib/shared/components/palette/case-link/read-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts +4 -13
- package/lib/shared/components/palette/case-link/write-case-link-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +58 -67
- package/lib/shared/components/palette/palette.module.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.service.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts +0 -1
- package/lib/shared/components/palette/utils/is-compound.pipe.d.ts.map +1 -1
- package/lib/shared/domain/definition/field-type-enum.model.d.ts +1 -1
- package/lib/shared/domain/definition/field-type-enum.model.d.ts.map +1 -1
- package/lib/shared/pipes/complex/ccd-read-fields-filter.pipe.d.ts.map +1 -1
- package/lib/shared/pipes/index.d.ts +0 -1
- package/lib/shared/pipes/index.d.ts.map +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +2 -3
- package/lib/shared/pipes/pipes.module.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +0 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/package.json +1 -1
- package/esm2015/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.js +0 -125
- package/esm2015/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.js +0 -198
- package/esm2015/lib/shared/components/palette/case-link/components/index.js +0 -10
- package/esm2015/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.js +0 -497
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.js +0 -221
- package/esm2015/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.js +0 -286
- package/esm2015/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.js +0 -76
- package/esm2015/lib/shared/components/palette/case-link/components/read-linked-cases.component.js +0 -178
- package/esm2015/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.js +0 -216
- package/esm2015/lib/shared/components/palette/case-link/components/write-linked-cases.component.js +0 -265
- package/esm2015/lib/shared/components/palette/case-link/domain/index.js +0 -3
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases-state.model.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/domain/linked-cases.model.js +0 -19
- package/esm2015/lib/shared/components/palette/case-link/enums/index.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.js +0 -33
- package/esm2015/lib/shared/components/palette/case-link/services/index.js +0 -2
- package/esm2015/lib/shared/components/palette/case-link/services/linked-cases.service.js +0 -134
- package/esm2015/lib/shared/components/palette/case-link/utils/validators.utils.js +0 -27
- package/esm2015/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.js +0 -23
- package/esm2015/lib/shared/pipes/link-cases-reason-code/index.js +0 -2
- package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts +0 -19
- package/lib/shared/components/palette/case-link/components/before-you-start/before-you-start.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts +0 -18
- package/lib/shared/components/palette/case-link/components/check-your-answers/check-your-answers.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/index.d.ts +0 -10
- package/lib/shared/components/palette/case-link/components/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/link-cases/link-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts +0 -42
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts +0 -12
- package/lib/shared/components/palette/case-link/components/no-linked-cases/no-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts +0 -37
- package/lib/shared/components/palette/case-link/components/read-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts +0 -38
- package/lib/shared/components/palette/case-link/components/unlink-cases/unlink-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts +0 -45
- package/lib/shared/components/palette/case-link/components/write-linked-cases.component.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/index.d.ts +0 -3
- package/lib/shared/components/palette/case-link/domain/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts +0 -12
- package/lib/shared/components/palette/case-link/domain/linked-cases-state.model.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts +0 -65
- package/lib/shared/components/palette/case-link/domain/linked-cases.model.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/enums/index.d.ts +0 -2
- package/lib/shared/components/palette/case-link/enums/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts +0 -29
- package/lib/shared/components/palette/case-link/enums/write-linked-cases-field.enum.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/services/index.d.ts +0 -2
- package/lib/shared/components/palette/case-link/services/index.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts +0 -50
- package/lib/shared/components/palette/case-link/services/linked-cases.service.d.ts.map +0 -1
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts +0 -10
- package/lib/shared/components/palette/case-link/utils/validators.utils.d.ts.map +0 -1
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts +0 -11
- package/lib/shared/pipes/link-cases-reason-code/ccd-link-cases-reason-code.pipe.d.ts.map +0 -1
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts +0 -2
- package/lib/shared/pipes/link-cases-reason-code/index.d.ts.map +0 -1
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
export * from './components';
|
|
2
|
-
export * from './domain';
|
|
3
|
-
export * from './enums';
|
|
4
1
|
export * from './read-case-link-field.component';
|
|
5
2
|
export * from './write-case-link-field.component';
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9jY2QtY2FzZS11aS10b29sa2l0L3NyYy9saWIvc2hhcmVkL2NvbXBvbmVudHMvcGFsZXR0ZS9jYXNlLWxpbmsvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsY0FBYyxrQ0FBa0MsQ0FBQztBQUNqRCxjQUFjLG1DQUFtQyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9yZWFkLWNhc2UtbGluay1maWVsZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi93cml0ZS1jYXNlLWxpbmstZmllbGQuY29tcG9uZW50JztcbiJdfQ==
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { Component } from '@angular/core';
|
|
2
2
|
import { AbstractFieldReadComponent } from '../base-field/abstract-field-read.component';
|
|
3
|
-
import { PaletteContext } from '../base-field/palette-context.enum';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/common";
|
|
5
|
+
import * as i2 from "../../../pipes/case-reference/case-reference.pipe";
|
|
5
6
|
function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
6
|
-
i0.ɵɵelementStart(0, "a",
|
|
7
|
-
i0.ɵɵelementStart(1, "span",
|
|
7
|
+
i0.ɵɵelementStart(0, "a", 1);
|
|
8
|
+
i0.ɵɵelementStart(1, "span", 2);
|
|
8
9
|
i0.ɵɵtext(2);
|
|
9
10
|
i0.ɵɵpipe(3, "ccdCaseReference");
|
|
10
11
|
i0.ɵɵelementEnd();
|
|
@@ -15,44 +16,23 @@ function ReadCaseLinkFieldComponent_a_0_Template(rf, ctx) { if (rf & 1) {
|
|
|
15
16
|
i0.ɵɵadvance(2);
|
|
16
17
|
i0.ɵɵtextInterpolate(ctx_r0.caseField.value.CaseReference ? i0.ɵɵpipeBind1(3, 2, ctx_r0.caseField.value.CaseReference) : "");
|
|
17
18
|
} }
|
|
18
|
-
function ReadCaseLinkFieldComponent_ng_container_1_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
-
i0.ɵɵelementContainerStart(0);
|
|
20
|
-
i0.ɵɵelement(1, "ccd-read-linked-cases", 4);
|
|
21
|
-
i0.ɵɵelementContainerEnd();
|
|
22
|
-
} if (rf & 2) {
|
|
23
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
24
|
-
i0.ɵɵadvance(1);
|
|
25
|
-
i0.ɵɵproperty("caseField", ctx_r1.caseField);
|
|
26
|
-
} }
|
|
27
19
|
export class ReadCaseLinkFieldComponent extends AbstractFieldReadComponent {
|
|
28
|
-
constructor() {
|
|
29
|
-
super(...arguments);
|
|
30
|
-
this.paletteContext = PaletteContext;
|
|
31
|
-
}
|
|
32
20
|
hasReference() {
|
|
33
21
|
return this.caseField.value && this.caseField.value.CaseReference;
|
|
34
22
|
}
|
|
35
|
-
hasCaseLinkCollection() {
|
|
36
|
-
return (this.caseField.field_type &&
|
|
37
|
-
this.caseField.field_type.type === 'Collection' &&
|
|
38
|
-
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
39
|
-
}
|
|
40
23
|
}
|
|
41
24
|
ReadCaseLinkFieldComponent.ɵfac = function ReadCaseLinkFieldComponent_Factory(t) { return ɵReadCaseLinkFieldComponent_BaseFactory(t || ReadCaseLinkFieldComponent); };
|
|
42
|
-
ReadCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: ReadCaseLinkFieldComponent, selectors: [["ccd-read-case-link-field"]], features: [i0.ɵɵInheritDefinitionFeature], decls:
|
|
25
|
+
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) {
|
|
43
26
|
i0.ɵɵtemplate(0, ReadCaseLinkFieldComponent_a_0_Template, 4, 4, "a", 0);
|
|
44
|
-
i0.ɵɵtemplate(1, ReadCaseLinkFieldComponent_ng_container_1_Template, 2, 1, "ng-container", 1);
|
|
45
27
|
} if (rf & 2) {
|
|
46
28
|
i0.ɵɵproperty("ngIf", ctx.hasReference());
|
|
47
|
-
|
|
48
|
-
i0.ɵɵproperty("ngIf", ctx.hasCaseLinkCollection());
|
|
49
|
-
} }, encapsulation: 2 });
|
|
29
|
+
} }, directives: [i1.NgIf], pipes: [i2.CaseReferencePipe], encapsulation: 2 });
|
|
50
30
|
const ɵReadCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(ReadCaseLinkFieldComponent);
|
|
51
31
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReadCaseLinkFieldComponent, [{
|
|
52
32
|
type: Component,
|
|
53
33
|
args: [{
|
|
54
34
|
selector: 'ccd-read-case-link-field',
|
|
55
|
-
templateUrl: 'read-case-link-field.html'
|
|
35
|
+
templateUrl: 'read-case-link-field.html'
|
|
56
36
|
}]
|
|
57
37
|
}], null, null); })();
|
|
58
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
38
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVhZC1jYXNlLWxpbmstZmllbGQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvY2NkLWNhc2UtdWktdG9vbGtpdC9zcmMvbGliL3NoYXJlZC9jb21wb25lbnRzL3BhbGV0dGUvY2FzZS1saW5rL3JlYWQtY2FzZS1saW5rLWZpZWxkLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY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QtY2FzZS1saW5rLWZpZWxkLmh0bWwnXG59KVxuZXhwb3J0IGNsYXNzIFJlYWRDYXNlTGlua0ZpZWxkQ29tcG9uZW50IGV4dGVuZHMgQWJzdHJhY3RGaWVsZFJlYWRDb21wb25lbnQge1xuXG4gIHB1YmxpYyBoYXNSZWZlcmVuY2UoKTogYm9vbGVhbiB7XG4gICAgcmV0dXJuIHRoaXMuY2FzZUZpZWxkLnZhbHVlICYmIHRoaXMuY2FzZUZpZWxkLnZhbHVlLkNhc2VSZWZlcmVuY2U7XG4gIH1cbn1cbiIsIjxhICpuZ0lmPVwiaGFzUmVmZXJlbmNlKClcIiBocmVmPVwiL3YyL2Nhc2Uve3tjYXNlRmllbGQudmFsdWUuQ2FzZVJlZmVyZW5jZX19XCIgdGFyZ2V0PVwiX2JsYW5rXCI+XG4gIDxzcGFuIGNsYXNzPVwidGV4dC0xNlwiPnt7Y2FzZUZpZWxkLnZhbHVlLkNhc2VSZWZlcmVuY2UgPyAoY2FzZUZpZWxkLnZhbHVlLkNhc2VSZWZlcmVuY2UgfCBjY2RDYXNlUmVmZXJlbmNlKSA6ICcnfX08L3NwYW4+XG48L2E+XG4iXX0=
|
|
@@ -1,75 +1,57 @@
|
|
|
1
|
-
import { Component,
|
|
2
|
-
import {
|
|
1
|
+
import { Component, ViewChild } from '@angular/core';
|
|
2
|
+
import { FormControl, FormGroup, Validators } from '@angular/forms';
|
|
3
3
|
import { AbstractFieldWriteComponent } from '../base-field/abstract-field-write.component';
|
|
4
4
|
import { WriteComplexFieldComponent } from '../complex/write-complex-field.component';
|
|
5
|
-
import { LinkedCasesService } from './services';
|
|
6
5
|
import * as i0 from "@angular/core";
|
|
7
|
-
import * as i1 from "
|
|
6
|
+
import * as i1 from "@angular/common";
|
|
7
|
+
import * as i2 from "@angular/forms";
|
|
8
|
+
import * as i3 from "../utils/field-label.pipe";
|
|
9
|
+
import * as i4 from "../utils/first-error.pipe";
|
|
8
10
|
const _c0 = ["writeComplexFieldComponent"];
|
|
9
|
-
function
|
|
11
|
+
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
10
12
|
i0.ɵɵelementStart(0, "span", 6);
|
|
11
13
|
i0.ɵɵtext(1);
|
|
12
14
|
i0.ɵɵpipe(2, "ccdFieldLabel");
|
|
13
15
|
i0.ɵɵelementEnd();
|
|
14
16
|
} if (rf & 2) {
|
|
15
|
-
const
|
|
17
|
+
const ctx_r0 = i0.ɵɵnextContext();
|
|
16
18
|
i0.ɵɵadvance(1);
|
|
17
|
-
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1,
|
|
19
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
18
20
|
} }
|
|
19
|
-
function
|
|
21
|
+
function WriteCaseLinkFieldComponent_span_3_Template(rf, ctx) { if (rf & 1) {
|
|
20
22
|
i0.ɵɵelementStart(0, "span", 7);
|
|
21
23
|
i0.ɵɵtext(1);
|
|
22
24
|
i0.ɵɵelementEnd();
|
|
23
25
|
} if (rf & 2) {
|
|
24
|
-
const
|
|
25
|
-
i0.ɵɵadvance(1);
|
|
26
|
-
i0.ɵɵtextInterpolate(ctx_r3.caseField.hint_text);
|
|
27
|
-
} }
|
|
28
|
-
function WriteCaseLinkFieldComponent_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
-
i0.ɵɵelementStart(0, "div", 1);
|
|
30
|
-
i0.ɵɵelementStart(1, "label", 2);
|
|
31
|
-
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_div_1_span_2_Template, 3, 3, "span", 3);
|
|
32
|
-
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_div_1_span_3_Template, 2, 1, "span", 4);
|
|
34
|
-
i0.ɵɵelement(4, "input", 5);
|
|
35
|
-
i0.ɵɵelementEnd();
|
|
36
|
-
} if (rf & 2) {
|
|
37
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
38
|
-
i0.ɵɵadvance(1);
|
|
39
|
-
i0.ɵɵproperty("for", ctx_r0.id());
|
|
40
|
-
i0.ɵɵadvance(1);
|
|
41
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseField.label);
|
|
42
|
-
i0.ɵɵadvance(1);
|
|
43
|
-
i0.ɵɵproperty("ngIf", ctx_r0.caseField.hint_text);
|
|
26
|
+
const ctx_r1 = i0.ɵɵnextContext();
|
|
44
27
|
i0.ɵɵadvance(1);
|
|
45
|
-
i0.ɵɵ
|
|
28
|
+
i0.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
46
29
|
} }
|
|
47
|
-
function
|
|
48
|
-
|
|
49
|
-
i0.ɵɵ
|
|
50
|
-
i0.ɵɵ
|
|
51
|
-
i0.ɵɵlistener("onLinkedCasesSelected", function WriteCaseLinkFieldComponent_div_2_Template_ccd_write_linked_cases_onLinkedCasesSelected_1_listener() { i0.ɵɵrestoreView(_r5); const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.submitLinkedCases(); });
|
|
52
|
-
i0.ɵɵelementEnd();
|
|
30
|
+
function WriteCaseLinkFieldComponent_span_4_Template(rf, ctx) { if (rf & 1) {
|
|
31
|
+
i0.ɵɵelementStart(0, "span", 8);
|
|
32
|
+
i0.ɵɵtext(1);
|
|
33
|
+
i0.ɵɵpipe(2, "ccdFirstError");
|
|
53
34
|
i0.ɵɵelementEnd();
|
|
54
35
|
} if (rf & 2) {
|
|
55
|
-
const
|
|
36
|
+
const ctx_r2 = i0.ɵɵnextContext();
|
|
56
37
|
i0.ɵɵadvance(1);
|
|
57
|
-
i0.ɵɵ
|
|
38
|
+
i0.ɵɵtextInterpolate(i0.ɵɵpipeBind2(2, 1, ctx_r2.caseReferenceControl.errors, ctx_r2.caseField.label));
|
|
58
39
|
} }
|
|
40
|
+
const _c1 = function (a0) { return { "form-group-error": a0 }; };
|
|
59
41
|
export class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
60
|
-
constructor(linkedCasesService) {
|
|
61
|
-
super();
|
|
62
|
-
this.linkedCasesService = linkedCasesService;
|
|
63
|
-
this.caseFields = [];
|
|
64
|
-
}
|
|
65
42
|
ngOnInit() {
|
|
66
|
-
|
|
67
|
-
this.formArray['caseField'] = this.caseField;
|
|
68
|
-
if (!this.hasCaseLinkCollection()) {
|
|
43
|
+
if (this.caseField.value) {
|
|
69
44
|
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
70
45
|
CaseReference: new FormControl(this.caseField.value.CaseReference, Validators.required),
|
|
71
46
|
}), true);
|
|
72
47
|
}
|
|
48
|
+
else {
|
|
49
|
+
this.caseLinkGroup = this.registerControl(new FormGroup({
|
|
50
|
+
CaseReference: new FormControl(null, Validators.required),
|
|
51
|
+
}), true);
|
|
52
|
+
}
|
|
53
|
+
this.caseReferenceControl = this.caseLinkGroup.controls['CaseReference'];
|
|
54
|
+
this.caseReferenceControl.setValidators(this.caseReferenceValidator());
|
|
73
55
|
// Ensure that all sub-fields inherit the same value for retain_hidden_value as this parent; although a CaseLink
|
|
74
56
|
// field uses the Complex type, it is meant to be treated as one field
|
|
75
57
|
if (this.caseField && this.caseField.field_type.type === 'Complex') {
|
|
@@ -77,18 +59,22 @@ export class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
77
59
|
caseLinkSubField.retain_hidden_value = this.caseField.retain_hidden_value;
|
|
78
60
|
}
|
|
79
61
|
}
|
|
80
|
-
this.containsCaseLinkCollection = this.hasCaseLinkCollection();
|
|
81
62
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
63
|
+
caseReferenceValidator() {
|
|
64
|
+
return (control) => {
|
|
65
|
+
if (control.value) {
|
|
66
|
+
if (this.validCaseReference(control.value)) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
if (control.touched) {
|
|
73
|
+
return { error: 'Please use a valid 16 Digit Case Reference' };
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return null;
|
|
77
|
+
};
|
|
92
78
|
}
|
|
93
79
|
validCaseReference(valueString) {
|
|
94
80
|
if (!valueString) {
|
|
@@ -96,41 +82,44 @@ export class WriteCaseLinkFieldComponent extends AbstractFieldWriteComponent {
|
|
|
96
82
|
}
|
|
97
83
|
return new RegExp('^\\b\\d{4}[ -]?\\d{4}[ -]?\\d{4}[ -]?\\d{4}\\b$').test(valueString.trim());
|
|
98
84
|
}
|
|
99
|
-
hasCaseLinkCollection() {
|
|
100
|
-
return (this.caseField.field_type &&
|
|
101
|
-
this.caseField.field_type.type === 'Collection' &&
|
|
102
|
-
this.caseField.field_type.collection_field_type.id === 'CaseLink');
|
|
103
|
-
}
|
|
104
85
|
}
|
|
105
|
-
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return
|
|
86
|
+
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
|
|
106
87
|
WriteCaseLinkFieldComponent.ɵcmp = i0.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) { if (rf & 1) {
|
|
107
88
|
i0.ɵɵviewQuery(_c0, 1);
|
|
108
89
|
} if (rf & 2) {
|
|
109
90
|
let _t;
|
|
110
91
|
i0.ɵɵqueryRefresh(_t = i0.ɵɵloadQuery()) && (ctx.writeComplexFieldComponent = _t.first);
|
|
111
|
-
} },
|
|
112
|
-
i0.ɵɵ
|
|
113
|
-
i0.ɵɵ
|
|
114
|
-
i0.ɵɵtemplate(2,
|
|
115
|
-
i0.ɵɵ
|
|
92
|
+
} }, 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) {
|
|
93
|
+
i0.ɵɵelementStart(0, "div", 0);
|
|
94
|
+
i0.ɵɵelementStart(1, "label", 1);
|
|
95
|
+
i0.ɵɵtemplate(2, WriteCaseLinkFieldComponent_span_2_Template, 3, 3, "span", 2);
|
|
96
|
+
i0.ɵɵelementEnd();
|
|
97
|
+
i0.ɵɵtemplate(3, WriteCaseLinkFieldComponent_span_3_Template, 2, 1, "span", 3);
|
|
98
|
+
i0.ɵɵtemplate(4, WriteCaseLinkFieldComponent_span_4_Template, 3, 4, "span", 4);
|
|
99
|
+
i0.ɵɵelement(5, "input", 5);
|
|
100
|
+
i0.ɵɵelementEnd();
|
|
116
101
|
} if (rf & 2) {
|
|
102
|
+
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(7, _c1, !ctx.caseReferenceControl.valid && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched)));
|
|
103
|
+
i0.ɵɵadvance(1);
|
|
104
|
+
i0.ɵɵproperty("for", ctx.id());
|
|
105
|
+
i0.ɵɵadvance(1);
|
|
106
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
107
|
+
i0.ɵɵadvance(1);
|
|
108
|
+
i0.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
117
109
|
i0.ɵɵadvance(1);
|
|
118
|
-
i0.ɵɵproperty("ngIf",
|
|
110
|
+
i0.ɵɵproperty("ngIf", ctx.caseReferenceControl.errors && (ctx.caseReferenceControl.dirty || ctx.caseReferenceControl.touched));
|
|
119
111
|
i0.ɵɵadvance(1);
|
|
120
|
-
i0.ɵɵproperty("
|
|
121
|
-
} }, encapsulation: 2 });
|
|
112
|
+
i0.ɵɵproperty("id", ctx.id())("formControl", ctx.caseReferenceControl);
|
|
113
|
+
} }, directives: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NgControlStatus, i2.FormControlDirective], pipes: [i3.FieldLabelPipe, i4.FirstErrorPipe], encapsulation: 2 });
|
|
114
|
+
const ɵWriteCaseLinkFieldComponent_BaseFactory = /*@__PURE__*/ i0.ɵɵgetInheritedFactory(WriteCaseLinkFieldComponent);
|
|
122
115
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteCaseLinkFieldComponent, [{
|
|
123
116
|
type: Component,
|
|
124
117
|
args: [{
|
|
125
118
|
selector: 'ccd-write-case-link-field',
|
|
126
119
|
templateUrl: 'write-case-link-field.html'
|
|
127
120
|
}]
|
|
128
|
-
}],
|
|
129
|
-
type: Input
|
|
130
|
-
}], formGroup: [{
|
|
131
|
-
type: Input
|
|
132
|
-
}], writeComplexFieldComponent: [{
|
|
121
|
+
}], null, { writeComplexFieldComponent: [{
|
|
133
122
|
type: ViewChild,
|
|
134
|
-
args: ['writeComplexFieldComponent'
|
|
123
|
+
args: ['writeComplexFieldComponent']
|
|
135
124
|
}] }); })();
|
|
136
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
125
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JpdGUtY2FzZS1saW5rLWZpZWxkLmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2NjZC1jYXNlLXVpLXRvb2xraXQvc3JjL2xpYi9zaGFyZWQvY29tcG9uZW50cy9wYWxldHRlL2Nhc2UtbGluay93cml0ZS1jYXNlLWxpbmstZmllbGQuY29tcG9uZW50LnRzIiwiLi4vLi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