@hmcts/ccd-case-ui-toolkit 6.14.0 → 6.14.1-wa-4-case-flags
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 +890 -741
- 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/app.config.js +1 -1
- package/esm2015/lib/components/form/date-input/date-input.component.js +8 -8
- package/esm2015/lib/components/header/header-bar/header-bar.component.js +2 -3
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.module.js +1 -1
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-data.service.js +5 -8
- package/esm2015/lib/shared/commons/case-edit-data/case-edit-validation.model.js +1 -1
- package/esm2015/lib/shared/components/activity/activity.component.js +5 -5
- package/esm2015/lib/shared/components/case-editor/case-edit/case-edit.component.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.js +22 -6
- package/esm2015/lib/shared/components/case-editor/case-edit-submit/case-edit-submit.component.js +4 -4
- package/esm2015/lib/shared/components/case-editor/case-editor.module.js +1 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.js +2 -1
- package/esm2015/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.js +3 -3
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.js +2 -1
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page-field.model.js +1 -1
- package/esm2015/lib/shared/components/case-editor/domain/wizard-page.model.js +2 -1
- package/esm2015/lib/shared/components/case-editor/services/cases.service.js +11 -22
- package/esm2015/lib/shared/components/case-editor/services/page-validation.service.js +2 -2
- package/esm2015/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.js +12 -12
- package/esm2015/lib/shared/components/case-editor/services/work-allocation.service.js +1 -1
- package/esm2015/lib/shared/components/case-history/domain/case-history.model.js +2 -1
- package/esm2015/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/case-event-trigger/case-event-trigger.component.js +2 -2
- package/esm2015/lib/shared/components/case-viewer/case-full-access-view/case-full-access-view.component.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/case-specific-access-request/case-specific-access-request.component.js +4 -4
- package/esm2015/lib/shared/components/case-viewer/case-viewer.component.js +5 -5
- package/esm2015/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.js +3 -3
- package/esm2015/lib/shared/components/case-viewer/services/case.resolver.js +2 -2
- package/esm2015/lib/shared/components/error/callback-errors.component.js +5 -5
- package/esm2015/lib/shared/components/error/domain/error-context.js +1 -1
- package/esm2015/lib/shared/components/event-start/event-guard/event-start.guard.js +2 -2
- package/esm2015/lib/shared/components/pagination/pagination.component.js +10 -10
- package/esm2015/lib/shared/components/palette/address/address-option.model.js +4 -7
- package/esm2015/lib/shared/components/palette/address/write-address-field.component.js +4 -4
- package/esm2015/lib/shared/components/palette/base-field/field-read.component.js +2 -2
- package/esm2015/lib/shared/components/palette/base-field/field-write.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field.component.js +12 -5
- package/esm2015/lib/shared/components/palette/case-file-view/components/case-file-view-folder-selector/case-file-view-folder-selector.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-file-view/index.js +1 -2
- package/esm2015/lib/shared/components/palette/case-flag/components/case-flag-table/case-flag-table.component.js +1 -1
- package/esm2015/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.js +2 -2
- package/esm2015/lib/shared/components/palette/case-flag/enums/index.js +1 -1
- package/esm2015/lib/shared/components/palette/collection/collection-create-checker.service.js +5 -5
- package/esm2015/lib/shared/components/palette/collection/write-collection-field.component.js +19 -8
- package/esm2015/lib/shared/components/palette/complex/read-complex-field-collection-table.component.js +4 -3
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/index.js +3 -0
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.js +47 -0
- package/esm2015/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.js +153 -0
- package/esm2015/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.js +5 -6
- package/esm2015/lib/shared/components/palette/index.js +2 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/link-cases/link-cases.component.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.js +26 -2
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.js +1 -1
- package/esm2015/lib/shared/components/palette/linked-cases/domain/linked-cases.model.js +2 -1
- package/esm2015/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/linked-cases/services/linked-cases.service.js +2 -3
- package/esm2015/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.js +38 -89
- package/esm2015/lib/shared/components/palette/order-summary/fee.model.js +2 -1
- package/esm2015/lib/shared/components/palette/order-summary/order-summary.model.js +1 -1
- package/esm2015/lib/shared/components/palette/palette.module.js +31 -11
- package/esm2015/lib/shared/components/palette/palette.service.js +5 -3
- package/esm2015/lib/shared/components/palette/text-area/write-text-area-field.component.js +2 -2
- package/esm2015/lib/shared/components/palette/utils/date.pipe.js +4 -4
- package/esm2015/lib/shared/components/palette/yes-no/yes-no.service.js +3 -1
- package/esm2015/lib/shared/components/search-filters/domain/search-input.model.js +1 -1
- package/esm2015/lib/shared/components/search-filters/search-filters.component.js +2 -2
- package/esm2015/lib/shared/components/search-result/search-result.component.js +5 -5
- package/esm2015/lib/shared/components/workbasket-filters/workbasket-filters.component.js +3 -3
- package/esm2015/lib/shared/directives/conditional-show/domain/conditional-show.model.js +4 -3
- package/esm2015/lib/shared/directives/conditional-show/services/condition-parser.service.js +5 -9
- package/esm2015/lib/shared/domain/addresses/address.model.js +2 -1
- package/esm2015/lib/shared/domain/case-details.model.js +2 -1
- package/esm2015/lib/shared/domain/case-event-data.model.js +2 -1
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-category.model.js +1 -1
- package/esm2015/lib/shared/domain/case-file-view/case-file-view-document.model.js +2 -1
- package/esm2015/lib/shared/domain/case-file-view/categories-and-documents.model.js +1 -1
- package/esm2015/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.js +2 -1
- package/esm2015/lib/shared/domain/case-flag/flag-type.model.js +2 -1
- package/esm2015/lib/shared/domain/case-flag/hmcts-service-detail.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-event-trigger.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-tab.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-view-event.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/case-view.model.js +2 -1
- package/esm2015/lib/shared/domain/case-view/role-assignment-response.model.js +1 -1
- package/esm2015/lib/shared/domain/case-view/role-request.model.js +1 -1
- package/esm2015/lib/shared/domain/definition/case-event.model.js +1 -1
- package/esm2015/lib/shared/domain/definition/case-field.model.js +7 -3
- package/esm2015/lib/shared/domain/definition/case-type.model.js +2 -1
- package/esm2015/lib/shared/domain/definition/event-case-field.model.js +2 -1
- package/esm2015/lib/shared/domain/definition/field-type-enum.model.js +1 -1
- package/esm2015/lib/shared/domain/definition/field-type.model.js +2 -1
- package/esm2015/lib/shared/domain/document/document-data.model.js +2 -1
- package/esm2015/lib/shared/domain/organisation/organisation-converter.js +8 -8
- package/esm2015/lib/shared/domain/pagination-metadata.model.js +1 -1
- package/esm2015/lib/shared/domain/search/field.model.js +1 -1
- package/esm2015/lib/shared/domain/search/search-result-view-column.model.js +1 -1
- package/esm2015/lib/shared/domain/search/search-result-view-item.model.js +2 -1
- package/esm2015/lib/shared/domain/search/search-result-view.model.js +2 -1
- package/esm2015/lib/shared/domain/user/user-info.model.js +1 -1
- package/esm2015/lib/shared/domain/workbasket/workbasket-input.model.js +1 -8
- package/esm2015/lib/shared/fixture/case-field-builder.js +13 -13
- package/esm2015/lib/shared/fixture/shared.test.fixture.js +27 -27
- package/esm2015/lib/shared/pipes/complex/{cdd-page-fields.pipe.js → ccd-page-fields.pipe.js} +3 -3
- package/esm2015/lib/shared/pipes/complex/index.js +2 -2
- package/esm2015/lib/shared/pipes/index.js +2 -1
- package/esm2015/lib/shared/services/activity/activity.polling.service.js +2 -2
- package/esm2015/lib/shared/services/activity/activity.service.js +9 -18
- package/esm2015/lib/shared/services/addresses/address-parser.js +5 -5
- package/esm2015/lib/shared/services/case-fields/format-translator.service.js +2 -2
- package/esm2015/lib/shared/services/case-flag/case-flag-refdata.service.js +2 -2
- package/esm2015/lib/shared/services/common-data-service/common-data-service.js +2 -2
- package/esm2015/lib/shared/services/definitions/definitions.service.js +3 -8
- package/esm2015/lib/shared/services/fields/fields.purger.js +15 -15
- package/esm2015/lib/shared/services/fields/fields.utils.js +12 -4
- package/esm2015/lib/shared/services/form/field-type-sanitiser.js +17 -1
- package/esm2015/lib/shared/services/form/form-value.service.js +1 -2
- package/esm2015/lib/shared/services/loading/loading.service.js +2 -7
- package/esm2015/lib/shared/services/search/search.service.js +5 -10
- package/esm2015/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.js +5 -5
- package/esm2015/lib/shared/services/window/window.service.js +1 -1
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js +833 -695
- package/fesm2015/hmcts-ccd-case-ui-toolkit.js.map +1 -1
- package/lib/app.config.d.ts.map +1 -1
- package/lib/components/header/header-bar/header-bar.component.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.module.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts +3 -5
- package/lib/shared/commons/case-edit-data/case-edit-data.service.d.ts.map +1 -1
- package/lib/shared/commons/case-edit-data/case-edit-validation.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts +3 -3
- package/lib/shared/components/case-editor/case-edit/case-edit.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts +2 -0
- package/lib/shared/components/case-editor/case-edit-page/case-edit-page.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/case-event-completion.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts +2 -2
- package/lib/shared/components/case-editor/case-event-completion/components/case-event-completion-task-reassigned/case-event-completion-task-reassigned.component.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field-complex-override.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page-field.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/domain/wizard-page.model.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/cases.service.d.ts +1 -3
- package/lib/shared/components/case-editor/services/cases.service.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/wizard-page-field-to-case-field.mapper.d.ts.map +1 -1
- package/lib/shared/components/case-editor/services/work-allocation.service.d.ts.map +1 -1
- package/lib/shared/components/case-history/domain/case-history.model.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-challenged-access-request/case-challenged-access-request.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/case-viewer.component.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/printer/pipes/print-url.pipe.d.ts.map +1 -1
- package/lib/shared/components/case-viewer/services/case.resolver.d.ts.map +1 -1
- package/lib/shared/components/error/domain/error-context.d.ts +2 -2
- package/lib/shared/components/error/domain/error-context.d.ts.map +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts +1 -1
- package/lib/shared/components/event-start/event-guard/event-start.guard.d.ts.map +1 -1
- package/lib/shared/components/pagination/pagination.component.d.ts +3 -3
- package/lib/shared/components/palette/address/address-option.model.d.ts.map +1 -1
- package/lib/shared/components/palette/address/write-address-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-file-view/case-file-view-field.component.d.ts +5 -2
- 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/index.d.ts +0 -1
- package/lib/shared/components/palette/case-file-view/index.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/components/select-flag-location/select-flag-location.component.d.ts.map +1 -1
- package/lib/shared/components/palette/case-flag/enums/index.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/collection-create-checker.service.d.ts.map +1 -1
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts +1 -0
- package/lib/shared/components/palette/collection/write-collection-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts +1 -1
- package/lib/shared/components/palette/complex/read-complex-field-collection-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/dynamic-multi-select-list/index.d.ts +3 -0
- package/lib/shared/components/palette/dynamic-multi-select-list/index.d.ts.map +1 -0
- package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts +9 -0
- package/lib/shared/components/palette/dynamic-multi-select-list/read-dynamic-multi-select-list-field.component.d.ts.map +1 -0
- package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts +17 -0
- package/lib/shared/components/palette/dynamic-multi-select-list/write-dynamic-multi-select-list-field.component.d.ts.map +1 -0
- package/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.d.ts +1 -1
- package/lib/shared/components/palette/dynamic-radio-list/write-dynamic-radio-list-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/index.d.ts +1 -0
- package/lib/shared/components/palette/index.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts +4 -4
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-from-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts +2 -0
- package/lib/shared/components/palette/linked-cases/components/linked-cases-table/linked-cases-to-table.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts +0 -4
- package/lib/shared/components/palette/linked-cases/domain/linked-cases-state.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/domain/linked-cases.model.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/read-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/services/linked-cases.service.d.ts.map +1 -1
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts +0 -4
- package/lib/shared/components/palette/linked-cases/write-linked-cases-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/fee.model.d.ts.map +1 -1
- package/lib/shared/components/palette/order-summary/order-summary.model.d.ts.map +1 -1
- package/lib/shared/components/palette/palette.module.d.ts +60 -59
- 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/text-area/write-text-area-field.component.d.ts.map +1 -1
- package/lib/shared/components/palette/utils/date.pipe.d.ts.map +1 -1
- package/lib/shared/components/palette/yes-no/yes-no.service.d.ts.map +1 -1
- package/lib/shared/components/search-filters/domain/search-input.model.d.ts.map +1 -1
- package/lib/shared/components/workbasket-filters/workbasket-filters.component.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/domain/conditional-show.model.d.ts.map +1 -1
- package/lib/shared/directives/conditional-show/services/condition-parser.service.d.ts.map +1 -1
- package/lib/shared/domain/addresses/address.model.d.ts.map +1 -1
- package/lib/shared/domain/case-details.model.d.ts.map +1 -1
- package/lib/shared/domain/case-event-data.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-category.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/case-file-view-document.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/categories-and-documents.model.d.ts.map +1 -1
- package/lib/shared/domain/case-file-view/document-tree-node/document-tree-node.model.d.ts.map +1 -1
- package/lib/shared/domain/case-flag/flag-type.model.d.ts.map +1 -1
- package/lib/shared/domain/case-flag/hmcts-service-detail.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-event-trigger.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-tab.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view-event.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/case-view.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts +1 -2
- package/lib/shared/domain/case-view/role-assignment-response.model.d.ts.map +1 -1
- package/lib/shared/domain/case-view/role-request.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-event.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-field.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/case-type.model.d.ts.map +1 -1
- package/lib/shared/domain/definition/event-case-field.model.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/domain/definition/field-type.model.d.ts.map +1 -1
- package/lib/shared/domain/document/document-data.model.d.ts.map +1 -1
- package/lib/shared/domain/organisation/organisation-converter.d.ts.map +1 -1
- package/lib/shared/domain/pagination-metadata.model.d.ts +2 -2
- package/lib/shared/domain/pagination-metadata.model.d.ts.map +1 -1
- package/lib/shared/domain/search/field.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view-column.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view-item.model.d.ts.map +1 -1
- package/lib/shared/domain/search/search-result-view.model.d.ts.map +1 -1
- package/lib/shared/domain/user/user-info.model.d.ts.map +1 -1
- package/lib/shared/domain/workbasket/workbasket-input.model.d.ts +0 -1
- package/lib/shared/domain/workbasket/workbasket-input.model.d.ts.map +1 -1
- package/lib/shared/fixture/case-field-builder.d.ts +6 -6
- package/lib/shared/fixture/case-field-builder.d.ts.map +1 -1
- package/lib/shared/fixture/shared.test.fixture.d.ts +6 -6
- package/lib/shared/fixture/shared.test.fixture.d.ts.map +1 -1
- package/lib/shared/pipes/complex/{cdd-page-fields.pipe.d.ts → ccd-page-fields.pipe.d.ts} +1 -1
- package/lib/shared/pipes/complex/ccd-page-fields.pipe.d.ts.map +1 -0
- package/lib/shared/pipes/complex/index.d.ts +1 -1
- package/lib/shared/pipes/index.d.ts +1 -0
- package/lib/shared/pipes/index.d.ts.map +1 -1
- package/lib/shared/pipes/pipes.module.d.ts +1 -1
- package/lib/shared/services/activity/activity.polling.service.d.ts.map +1 -1
- package/lib/shared/services/activity/activity.service.d.ts.map +1 -1
- package/lib/shared/services/addresses/address-parser.d.ts.map +1 -1
- package/lib/shared/services/common-data-service/common-data-service.d.ts.map +1 -1
- package/lib/shared/services/definitions/definitions.service.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.purger.d.ts.map +1 -1
- package/lib/shared/services/fields/fields.utils.d.ts +2 -1
- package/lib/shared/services/fields/fields.utils.d.ts.map +1 -1
- package/lib/shared/services/form/field-type-sanitiser.d.ts +2 -0
- package/lib/shared/services/form/field-type-sanitiser.d.ts.map +1 -1
- package/lib/shared/services/loading/loading.service.d.ts +1 -4
- package/lib/shared/services/loading/loading.service.d.ts.map +1 -1
- package/lib/shared/services/search/search.service.d.ts +0 -2
- package/lib/shared/services/search/search.service.d.ts.map +1 -1
- package/lib/shared/services/search-result/sorting/search-result-view-item-comparator-factory.d.ts.map +1 -1
- package/lib/shared/services/window/window.service.d.ts.map +1 -1
- package/package.json +2 -2
- package/esm2015/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.js +0 -72
- package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts +0 -8
- package/lib/shared/components/palette/case-file-view/case-file-view-field-read.component.d.ts.map +0 -1
- package/lib/shared/pipes/complex/cdd-page-fields.pipe.d.ts.map +0 -1
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
i0__namespace.ɵɵtextInterpolate(ctx_r1.workhours);
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
var _c0
|
|
121
|
+
var _c0$$ = [[["", "footerSolsNavLinks", ""]], [["", "footerCaseWorkerNavLinks", ""]]];
|
|
122
122
|
var _c1$s = ["[footerSolsNavLinks]", "[footerCaseWorkerNavLinks]"];
|
|
123
123
|
var FooterComponent = /** @class */ (function () {
|
|
124
124
|
function FooterComponent() {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
FooterComponent.ɵfac = function FooterComponent_Factory(t) { return new (t || FooterComponent)(); };
|
|
129
129
|
FooterComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: FooterComponent, selectors: [["cut-footer-bar"]], inputs: { email: "email", isSolicitor: "isSolicitor", phone: "phone", workhours: "workhours" }, ngContentSelectors: _c1$s, decls: 4, vars: 4, consts: [["id", "footer", "role", "footer", 1, "group", "js-footer"], [1, "footer-wrapper"], ["class", "footer-meta", 4, "ngIf"], [1, "footer-meta"], [1, "footer-meta-inner"], [1, "open-government-licence"], [1, "logo"], ["href", "https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/", "rel", "license"], [1, "copyright"], ["href", "https://www.nationalarchives.gov.uk/information-management/re-using-public-sector-information/copyright-and-re-use/crown-copyright/"], [1, "title"], [1, "footer-text"], [1, "email"], [3, "href"], [1, "phone"], [1, "work-hours"]], template: function FooterComponent_Template(rf, ctx) {
|
|
130
130
|
if (rf & 1) {
|
|
131
|
-
i0__namespace.ɵɵprojectionDef(_c0
|
|
131
|
+
i0__namespace.ɵɵprojectionDef(_c0$$);
|
|
132
132
|
i0__namespace.ɵɵelementStart(0, "footer", 0);
|
|
133
133
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
134
134
|
i0__namespace.ɵɵtemplate(2, FooterComponent_div_2_Template, 15, 0, "div", 2);
|
|
@@ -207,7 +207,7 @@
|
|
|
207
207
|
i0__namespace.ɵɵtextInterpolate(ctx_r2.title);
|
|
208
208
|
}
|
|
209
209
|
}
|
|
210
|
-
var _c0$
|
|
210
|
+
var _c0$_ = [[["", "headerNavigation", ""]]];
|
|
211
211
|
var _c1$r = ["[headerNavigation]"];
|
|
212
212
|
var HeaderBarComponent = /** @class */ (function () {
|
|
213
213
|
function HeaderBarComponent() {
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
HeaderBarComponent.ɵfac = function HeaderBarComponent_Factory(t) { return new (t || HeaderBarComponent)(); };
|
|
222
222
|
HeaderBarComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: HeaderBarComponent, selectors: [["cut-header-bar"]], inputs: { title: "title", isSolicitor: "isSolicitor", username: "username" }, outputs: { signOutRequest: "signOutRequest" }, ngContentSelectors: _c1$r, decls: 15, vars: 8, consts: [["role", "banner", "id", "global-header", 1, "with-proposition"], [1, "header-wrapper"], [1, "header-global"], [4, "ngIf"], ["class", "global-header", 4, "ngIf"], [1, "header-proposition"], [1, "content"], ["href", "#proposition-links", 1, "js-header-toggle", "menu"], ["id", "proposition-menu", 4, "ngIf"], [1, "proposition-right"], ["id", "user-name"], ["id", "sign-out", "href", "javascript:void(0)", 3, "click"], ["href", "https://www.gov.uk", "title", "Go to the GOV.UK homepage", "id", "logo", 1, "content", 2, "margin-left", "0px"], ["src", "/img/gov.uk_logotype_crown_invert_trans.png?0.23.0", "width", "36", "height", "32", "alt", ""], [1, "global-header"], [1, "title"], ["id", "proposition-menu"], [1, "title-solicitor"], ["id", "proposition-name"]], template: function HeaderBarComponent_Template(rf, ctx) {
|
|
223
223
|
if (rf & 1) {
|
|
224
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
224
|
+
i0__namespace.ɵɵprojectionDef(_c0$_);
|
|
225
225
|
i0__namespace.ɵɵelementStart(0, "header", 0);
|
|
226
226
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
227
227
|
i0__namespace.ɵɵelementStart(2, "div", 2);
|
|
@@ -282,7 +282,7 @@
|
|
|
282
282
|
}] });
|
|
283
283
|
})();
|
|
284
284
|
|
|
285
|
-
var _c0$
|
|
285
|
+
var _c0$Z = [[["", "leftNavLinks", ""]], [["", "rightNavLinks", ""]]];
|
|
286
286
|
var _c1$q = ["[leftNavLinks]", "[rightNavLinks]"];
|
|
287
287
|
var NavigationComponent = /** @class */ (function () {
|
|
288
288
|
function NavigationComponent() {
|
|
@@ -292,7 +292,7 @@
|
|
|
292
292
|
NavigationComponent.ɵfac = function NavigationComponent_Factory(t) { return new (t || NavigationComponent)(); };
|
|
293
293
|
NavigationComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: NavigationComponent, selectors: [["cut-nav-bar"]], inputs: { isSolicitor: "isSolicitor" }, ngContentSelectors: _c1$q, decls: 4, vars: 2, consts: [[1, "cut-nav-bar"]], template: function NavigationComponent_Template(rf, ctx) {
|
|
294
294
|
if (rf & 1) {
|
|
295
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
295
|
+
i0__namespace.ɵɵprojectionDef(_c0$Z);
|
|
296
296
|
i0__namespace.ɵɵelementStart(0, "div");
|
|
297
297
|
i0__namespace.ɵɵelementStart(1, "nav", 0);
|
|
298
298
|
i0__namespace.ɵɵprojection(2);
|
|
@@ -437,7 +437,7 @@
|
|
|
437
437
|
}], null, null);
|
|
438
438
|
})();
|
|
439
439
|
|
|
440
|
-
var _c0$
|
|
440
|
+
var _c0$Y = [[["", "topBody", ""]], [["", "leftBody", ""]], [["", "rightBody", ""]]];
|
|
441
441
|
var _c1$p = ["[topBody]", "[leftBody]", "[rightBody]"];
|
|
442
442
|
var BodyComponent = /** @class */ (function () {
|
|
443
443
|
function BodyComponent() {
|
|
@@ -447,7 +447,7 @@
|
|
|
447
447
|
BodyComponent.ɵfac = function BodyComponent_Factory(t) { return new (t || BodyComponent)(); };
|
|
448
448
|
BodyComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: BodyComponent, selectors: [["cut-body"]], ngContentSelectors: _c1$p, decls: 4, vars: 0, consts: [[1, "global-display"]], template: function BodyComponent_Template(rf, ctx) {
|
|
449
449
|
if (rf & 1) {
|
|
450
|
-
i0__namespace.ɵɵprojectionDef(_c0$
|
|
450
|
+
i0__namespace.ɵɵprojectionDef(_c0$Y);
|
|
451
451
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
452
452
|
i0__namespace.ɵɵprojection(1);
|
|
453
453
|
i0__namespace.ɵɵprojection(2, 1);
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
853
853
|
}
|
|
854
854
|
|
|
855
|
-
var _c0$
|
|
855
|
+
var _c0$X = function (a0) { return { "govuk-input--error": a0 }; };
|
|
856
856
|
function DateInputComponent_div_16_Template(rf, ctx) {
|
|
857
857
|
if (rf & 1) {
|
|
858
858
|
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
@@ -870,7 +870,7 @@
|
|
|
870
870
|
i0__namespace.ɵɵadvance(1);
|
|
871
871
|
i0__namespace.ɵɵproperty("for", ctx_r3.hourId());
|
|
872
872
|
i0__namespace.ɵɵadvance(2);
|
|
873
|
-
i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
873
|
+
i0__namespace.ɵɵproperty("id", ctx_r3.hourId())("name", ctx_r3.hourId())("value", ctx_r3.displayHour)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r3.isInvalid));
|
|
874
874
|
}
|
|
875
875
|
}
|
|
876
876
|
function DateInputComponent_div_17_Template(rf, ctx) {
|
|
@@ -890,7 +890,7 @@
|
|
|
890
890
|
i0__namespace.ɵɵadvance(1);
|
|
891
891
|
i0__namespace.ɵɵproperty("for", ctx_r4.minuteId());
|
|
892
892
|
i0__namespace.ɵɵadvance(2);
|
|
893
|
-
i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
893
|
+
i0__namespace.ɵɵproperty("id", ctx_r4.minuteId())("name", ctx_r4.minuteId())("value", ctx_r4.displayMinute)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r4.isInvalid));
|
|
894
894
|
}
|
|
895
895
|
}
|
|
896
896
|
function DateInputComponent_div_18_Template(rf, ctx) {
|
|
@@ -910,7 +910,7 @@
|
|
|
910
910
|
i0__namespace.ɵɵadvance(1);
|
|
911
911
|
i0__namespace.ɵɵproperty("for", ctx_r5.secondId());
|
|
912
912
|
i0__namespace.ɵɵadvance(2);
|
|
913
|
-
i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$
|
|
913
|
+
i0__namespace.ɵɵproperty("id", ctx_r5.secondId())("name", ctx_r5.secondId())("value", ctx_r5.displaySecond)("ngClass", i0__namespace.ɵɵpureFunction1(5, _c0$X, ctx_r5.isInvalid));
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
var DateInputComponent = /** @class */ (function () {
|
|
@@ -1036,22 +1036,22 @@
|
|
|
1036
1036
|
}
|
|
1037
1037
|
};
|
|
1038
1038
|
DateInputComponent.prototype.dayId = function () {
|
|
1039
|
-
return this.id +
|
|
1039
|
+
return this.id + "-day";
|
|
1040
1040
|
};
|
|
1041
1041
|
DateInputComponent.prototype.monthId = function () {
|
|
1042
|
-
return this.id +
|
|
1042
|
+
return this.id + "-month";
|
|
1043
1043
|
};
|
|
1044
1044
|
DateInputComponent.prototype.yearId = function () {
|
|
1045
|
-
return this.id +
|
|
1045
|
+
return this.id + "-year";
|
|
1046
1046
|
};
|
|
1047
1047
|
DateInputComponent.prototype.hourId = function () {
|
|
1048
|
-
return this.id +
|
|
1048
|
+
return this.id + "-hour";
|
|
1049
1049
|
};
|
|
1050
1050
|
DateInputComponent.prototype.minuteId = function () {
|
|
1051
|
-
return this.id +
|
|
1051
|
+
return this.id + "-minute";
|
|
1052
1052
|
};
|
|
1053
1053
|
DateInputComponent.prototype.secondId = function () {
|
|
1054
|
-
return this.id +
|
|
1054
|
+
return this.id + "-second";
|
|
1055
1055
|
};
|
|
1056
1056
|
DateInputComponent.prototype.viewValue = function () {
|
|
1057
1057
|
if (this.day || this.month || this.year || this.hour || this.minute || this.second) {
|
|
@@ -1066,7 +1066,7 @@
|
|
|
1066
1066
|
this.minute ? this.pad(this.minute) : '',
|
|
1067
1067
|
this.second ? this.pad(this.second) : ''
|
|
1068
1068
|
].join(':');
|
|
1069
|
-
return date +
|
|
1069
|
+
return date + "T" + time + ".000";
|
|
1070
1070
|
}
|
|
1071
1071
|
else {
|
|
1072
1072
|
return date;
|
|
@@ -1144,15 +1144,15 @@
|
|
|
1144
1144
|
i0__namespace.ɵɵadvance(2);
|
|
1145
1145
|
i0__namespace.ɵɵproperty("for", ctx.dayId());
|
|
1146
1146
|
i0__namespace.ɵɵadvance(2);
|
|
1147
|
-
i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$
|
|
1147
|
+
i0__namespace.ɵɵproperty("id", ctx.dayId())("name", ctx.dayId())("value", ctx.displayDay)("ngClass", i0__namespace.ɵɵpureFunction1(18, _c0$X, ctx.isInvalid));
|
|
1148
1148
|
i0__namespace.ɵɵadvance(3);
|
|
1149
1149
|
i0__namespace.ɵɵproperty("for", ctx.monthId());
|
|
1150
1150
|
i0__namespace.ɵɵadvance(2);
|
|
1151
|
-
i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$
|
|
1151
|
+
i0__namespace.ɵɵproperty("id", ctx.monthId())("name", ctx.monthId())("value", ctx.displayMonth)("ngClass", i0__namespace.ɵɵpureFunction1(20, _c0$X, ctx.isInvalid));
|
|
1152
1152
|
i0__namespace.ɵɵadvance(3);
|
|
1153
1153
|
i0__namespace.ɵɵproperty("for", ctx.yearId());
|
|
1154
1154
|
i0__namespace.ɵɵadvance(2);
|
|
1155
|
-
i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$
|
|
1155
|
+
i0__namespace.ɵɵproperty("id", ctx.yearId())("name", ctx.yearId())("value", ctx.displayYear)("ngClass", i0__namespace.ɵɵpureFunction1(22, _c0$X, ctx.isInvalid));
|
|
1156
1156
|
i0__namespace.ɵɵadvance(2);
|
|
1157
1157
|
i0__namespace.ɵɵproperty("ngIf", ctx.isDateTime);
|
|
1158
1158
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -1233,7 +1233,7 @@
|
|
|
1233
1233
|
i0__namespace.ɵɵelementContainerEnd();
|
|
1234
1234
|
}
|
|
1235
1235
|
}
|
|
1236
|
-
var _c0$
|
|
1236
|
+
var _c0$W = ["*"];
|
|
1237
1237
|
exports.AlertMessageType = void 0;
|
|
1238
1238
|
(function (AlertMessageType) {
|
|
1239
1239
|
AlertMessageType["WARNING"] = "warning";
|
|
@@ -1254,7 +1254,7 @@
|
|
|
1254
1254
|
AlertComponent.TYPE_ERROR = 'error';
|
|
1255
1255
|
AlertComponent.TYPE_INFORMATION = 'information';
|
|
1256
1256
|
AlertComponent.ɵfac = function AlertComponent_Factory(t) { return new (t || AlertComponent)(); };
|
|
1257
|
-
AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$
|
|
1257
|
+
AlertComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: AlertComponent, selectors: [["cut-alert"]], inputs: { type: "type", showIcon: "showIcon" }, ngContentSelectors: _c0$W, decls: 10, vars: 10, consts: [[1, "hmcts-banner"], [3, "ngSwitch"], [4, "ngSwitchCase"], [1, "hmcts-banner__message"], [1, "hmcts-banner__assistive"], ["fill", "currentColor", "role", "presentation", "focusable", "false", "xmlns", "http://www.w3.org/2000/svg", "viewBox", "0 0 25 25", "height", "25", "width", "25", 1, "hmcts-banner__icon"], ["d", "M13.6,15.4h-2.3v-4.5h2.3V15.4z M13.6,19.8h-2.3v-2.2h2.3V19.8z M0,23.2h25L12.5,2L0,23.2z"], ["d", "M25,6.2L8.7,23.2L0,14.1l4-4.2l4.7,4.9L21,2L25,6.2z"], ["d", "M13.7,18.5h-2.4v-2.4h2.4V18.5z M12.5,13.7c-0.7,0-1.2-0.5-1.2-1.2V7.7c0-0.7,0.5-1.2,1.2-1.2s1.2,0.5,1.2,1.2v4.8\n C13.7,13.2,13.2,13.7,12.5,13.7z M12.5,0.5c-6.6,0-12,5.4-12,12s5.4,12,12,12s12-5.4,12-12S19.1,0.5,12.5,0.5z"]], template: function AlertComponent_Template(rf, ctx) {
|
|
1258
1258
|
if (rf & 1) {
|
|
1259
1259
|
i0__namespace.ɵɵprojectionDef();
|
|
1260
1260
|
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
@@ -1529,7 +1529,7 @@
|
|
|
1529
1529
|
}] });
|
|
1530
1530
|
})();
|
|
1531
1531
|
|
|
1532
|
-
var _c0$
|
|
1532
|
+
var _c0$V = function (a0) { return { "js-hidden": a0 }; };
|
|
1533
1533
|
var _c1$o = ["*"];
|
|
1534
1534
|
var TabComponent = /** @class */ (function () {
|
|
1535
1535
|
function TabComponent() {
|
|
@@ -1545,7 +1545,7 @@
|
|
|
1545
1545
|
i0__namespace.ɵɵelementEnd();
|
|
1546
1546
|
}
|
|
1547
1547
|
if (rf & 2) {
|
|
1548
|
-
i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$
|
|
1548
|
+
i0__namespace.ɵɵproperty("id", ctx.id)("ngClass", i0__namespace.ɵɵpureFunction1(3, _c0$V, !ctx.selected));
|
|
1549
1549
|
i0__namespace.ɵɵattribute("aria-hidden", !ctx.selected);
|
|
1550
1550
|
}
|
|
1551
1551
|
}, directives: [i1__namespace.NgClass], styles: [".tabs-toggle[_ngcontent-%COMP%]{display:block;padding:10px 15px 3px;margin-bottom:8px}.tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{color:#0b0c0c;text-decoration:none;border-bottom:none}.tabs-toggle[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#005ea5}@media (max-width:640px){.tabs-list[_ngcontent-%COMP%]{border-bottom:1px solid #bfc1c3;margin-left:-15px;margin-right:-15px}.tabs-toggle[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3}.tabs-toggle[_ngcontent-%COMP%]:focus{color:#0b0c0c;outline:none}}@media (min-width:641px){.tabs-panel[_ngcontent-%COMP%]{border-top:1px solid #bfc1c3;clear:both;overflow:hidden}.tabs-list[_ngcontent-%COMP%]{float:left}.tabs-list-item[_ngcontent-%COMP%]{float:left;position:relative;bottom:-1px;padding-top:10px}.tabs-toggle[_ngcontent-%COMP%]{background-color:#dee0e2;border:1px solid transparent;float:left;margin:0 6px 0 0;text-decoration:none}.tabs-toggle[_ngcontent-%COMP%]:visited{color:#005ea5}.tabs-toggle-selected[_ngcontent-%COMP%], .tabs-toggle[aria-selected=true][_ngcontent-%COMP%]{background-color:#fff;border-bottom:0;border-color:#bfc1c3;padding-bottom:11px;margin-bottom:0;color:#0b0c0c}}"] });
|
|
@@ -1568,7 +1568,7 @@
|
|
|
1568
1568
|
}] });
|
|
1569
1569
|
})();
|
|
1570
1570
|
|
|
1571
|
-
var _c0$
|
|
1571
|
+
var _c0$U = ["tab"];
|
|
1572
1572
|
var _c1$n = function () { return ["."]; };
|
|
1573
1573
|
var _c2$3 = function (a0) { return { "tabs-toggle-selected": a0 }; };
|
|
1574
1574
|
function TabsComponent_li_2_Template(rf, ctx) {
|
|
@@ -1622,7 +1622,7 @@
|
|
|
1622
1622
|
}
|
|
1623
1623
|
}, viewQuery: function TabsComponent_Query(rf, ctx) {
|
|
1624
1624
|
if (rf & 1) {
|
|
1625
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
1625
|
+
i0__namespace.ɵɵviewQuery(_c0$U, 1);
|
|
1626
1626
|
}
|
|
1627
1627
|
if (rf & 2) {
|
|
1628
1628
|
var _t = void 0;
|
|
@@ -1701,7 +1701,7 @@
|
|
|
1701
1701
|
}], null, null);
|
|
1702
1702
|
})();
|
|
1703
1703
|
|
|
1704
|
-
var _c0$
|
|
1704
|
+
var _c0$T = function (a0, a1) { return { caseLocked: a0, someoneViewing: a1 }; };
|
|
1705
1705
|
var ActivityBannerComponent = /** @class */ (function () {
|
|
1706
1706
|
function ActivityBannerComponent() {
|
|
1707
1707
|
}
|
|
@@ -1722,7 +1722,7 @@
|
|
|
1722
1722
|
i0__namespace.ɵɵelementEnd();
|
|
1723
1723
|
}
|
|
1724
1724
|
if (rf & 2) {
|
|
1725
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$
|
|
1725
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction2(4, _c0$T, ctx.bannerType === "editor", ctx.bannerType === "viewer"));
|
|
1726
1726
|
i0__namespace.ɵɵadvance(2);
|
|
1727
1727
|
i0__namespace.ɵɵpropertyInterpolate("alt", ctx.description);
|
|
1728
1728
|
i0__namespace.ɵɵpropertyInterpolate("src", ctx.imageLink, i0__namespace.ɵɵsanitizeUrl);
|
|
@@ -2131,7 +2131,7 @@
|
|
|
2131
2131
|
});
|
|
2132
2132
|
ActivityService.handleHttpError = function (response) {
|
|
2133
2133
|
var error = HttpErrorService.convertToHttpError(response);
|
|
2134
|
-
if (response
|
|
2134
|
+
if ((response === null || response === void 0 ? void 0 : response.status) !== error.status) {
|
|
2135
2135
|
error.status = response.status;
|
|
2136
2136
|
}
|
|
2137
2137
|
return error;
|
|
@@ -2139,12 +2139,11 @@
|
|
|
2139
2139
|
ActivityService.prototype.getOptions = function () {
|
|
2140
2140
|
var userDetails = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
2141
2141
|
var headers = new i1$2.HttpHeaders().set('Content-Type', 'application/json').set('Authorization', userDetails.token);
|
|
2142
|
-
|
|
2142
|
+
return {
|
|
2143
2143
|
headers: headers,
|
|
2144
2144
|
withCredentials: true,
|
|
2145
2145
|
observe: 'body',
|
|
2146
2146
|
};
|
|
2147
|
-
return options;
|
|
2148
2147
|
};
|
|
2149
2148
|
ActivityService.prototype.getActivities = function () {
|
|
2150
2149
|
var caseId = [];
|
|
@@ -2153,41 +2152,33 @@
|
|
|
2153
2152
|
}
|
|
2154
2153
|
try {
|
|
2155
2154
|
var options = this.getOptions();
|
|
2156
|
-
var url = this.activityUrl() +
|
|
2155
|
+
var url = this.activityUrl() + "/cases/" + caseId.join(',') + "/activity";
|
|
2157
2156
|
return this.http
|
|
2158
2157
|
.get(url, options, false, ActivityService.handleHttpError)
|
|
2159
2158
|
.pipe(operators.map(function (response) { return response; }));
|
|
2160
2159
|
}
|
|
2161
2160
|
catch (error) {
|
|
2162
|
-
console.log(
|
|
2161
|
+
console.log("user may not be authenticated." + error);
|
|
2163
2162
|
}
|
|
2164
2163
|
};
|
|
2165
2164
|
ActivityService.prototype.postActivity = function (caseId, activity) {
|
|
2166
2165
|
try {
|
|
2167
2166
|
var options = this.getOptions();
|
|
2168
|
-
var url = this.activityUrl() +
|
|
2167
|
+
var url = this.activityUrl() + "/cases/" + caseId + "/activity";
|
|
2169
2168
|
var body = { activity: activity };
|
|
2170
2169
|
return this.http
|
|
2171
2170
|
.post(url, body, options, false)
|
|
2172
2171
|
.pipe(operators.map(function (response) { return response; }));
|
|
2173
2172
|
}
|
|
2174
2173
|
catch (error) {
|
|
2175
|
-
console.log(
|
|
2174
|
+
console.log("user may not be authenticated." + error);
|
|
2176
2175
|
}
|
|
2177
2176
|
};
|
|
2178
2177
|
ActivityService.prototype.verifyUserIsAuthorized = function () {
|
|
2179
2178
|
var _this = this;
|
|
2180
|
-
if (this.sessionStorageService.getItem('userDetails') === undefined) {
|
|
2181
|
-
return;
|
|
2182
|
-
}
|
|
2183
|
-
if (this.activityUrl() && this.userAuthorised === undefined) {
|
|
2179
|
+
if (this.sessionStorageService.getItem('userDetails') && this.activityUrl() && this.userAuthorised === undefined) {
|
|
2184
2180
|
this.getActivities(ActivityService.DUMMY_CASE_REFERENCE).subscribe(function () { return _this.userAuthorised = true; }, function (error) {
|
|
2185
|
-
|
|
2186
|
-
_this.userAuthorised = false;
|
|
2187
|
-
}
|
|
2188
|
-
else {
|
|
2189
|
-
_this.userAuthorised = true;
|
|
2190
|
-
}
|
|
2181
|
+
_this.userAuthorised = [401, 403].indexOf(error.status) <= -1;
|
|
2191
2182
|
});
|
|
2192
2183
|
}
|
|
2193
2184
|
};
|
|
@@ -2300,7 +2291,7 @@
|
|
|
2300
2291
|
requests.get(activity.caseId).next(activity);
|
|
2301
2292
|
});
|
|
2302
2293
|
}, function (err) {
|
|
2303
|
-
console.log(
|
|
2294
|
+
console.log("error: " + err);
|
|
2304
2295
|
Array.from(requests.values()).forEach(function (subject) { return subject.error(err); });
|
|
2305
2296
|
}); });
|
|
2306
2297
|
});
|
|
@@ -2440,9 +2431,9 @@
|
|
|
2440
2431
|
};
|
|
2441
2432
|
ActivityComponent.prototype.generateDescription = function (prefix, suffix, namesArray, unknownCount) {
|
|
2442
2433
|
var resultText = prefix;
|
|
2443
|
-
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename +
|
|
2434
|
+
resultText += namesArray.map(function (activityInfo) { return activityInfo.forename + " " + activityInfo.surname; }).join(', ');
|
|
2444
2435
|
if (unknownCount > 0) {
|
|
2445
|
-
resultText += (namesArray.length > 0 ?
|
|
2436
|
+
resultText += (namesArray.length > 0 ? " and " + unknownCount + " other" : unknownCount + " user");
|
|
2446
2437
|
resultText += (unknownCount > 1 ? 's' : '');
|
|
2447
2438
|
}
|
|
2448
2439
|
else {
|
|
@@ -2450,10 +2441,10 @@
|
|
|
2450
2441
|
}
|
|
2451
2442
|
if (suffix.length > 0) {
|
|
2452
2443
|
if (namesArray.length + unknownCount > 1) {
|
|
2453
|
-
resultText +=
|
|
2444
|
+
resultText += " are " + suffix;
|
|
2454
2445
|
}
|
|
2455
2446
|
else {
|
|
2456
|
-
resultText +=
|
|
2447
|
+
resultText += " is " + suffix;
|
|
2457
2448
|
}
|
|
2458
2449
|
}
|
|
2459
2450
|
return resultText;
|
|
@@ -2792,7 +2783,7 @@
|
|
|
2792
2783
|
break;
|
|
2793
2784
|
case 'n':
|
|
2794
2785
|
case 'N':
|
|
2795
|
-
maybePush(result,
|
|
2786
|
+
maybePush(result, "***" + c + "***", inQuote); // No way to support A - millisec of day, n - nano of second, N - nano of Day
|
|
2796
2787
|
break;
|
|
2797
2788
|
case 'V':
|
|
2798
2789
|
case 'O':
|
|
@@ -2926,9 +2917,9 @@
|
|
|
2926
2917
|
resultDate = offsetDate.getDate() + " " + DatePipe.MONTHS[offsetDate.getMonth()] + " " + offsetDate.getFullYear();
|
|
2927
2918
|
if (match[4] && match[5] && match[6] && format !== 'short') {
|
|
2928
2919
|
resultDate += ', ';
|
|
2929
|
-
resultDate += this.getHour(offsetDate.getHours().toString()) +
|
|
2930
|
-
resultDate += this.pad(offsetDate.getMinutes()) +
|
|
2931
|
-
resultDate += this.pad(offsetDate.getSeconds()) +
|
|
2920
|
+
resultDate += this.getHour(offsetDate.getHours().toString()) + ":";
|
|
2921
|
+
resultDate += this.pad(offsetDate.getMinutes()) + ":";
|
|
2922
|
+
resultDate += this.pad(offsetDate.getSeconds()) + " ";
|
|
2932
2923
|
resultDate += (this.toInt(offsetDate.getHours().toString()) >= 12) ? 'PM' : 'AM';
|
|
2933
2924
|
}
|
|
2934
2925
|
}
|
|
@@ -3303,6 +3294,7 @@
|
|
|
3303
3294
|
}], null, null);
|
|
3304
3295
|
})();
|
|
3305
3296
|
|
|
3297
|
+
// tslint:disable:variable-name
|
|
3306
3298
|
var AddressModel = /** @class */ (function () {
|
|
3307
3299
|
function AddressModel() {
|
|
3308
3300
|
this.AddressLine1 = '';
|
|
@@ -3360,9 +3352,12 @@
|
|
|
3360
3352
|
}
|
|
3361
3353
|
Object.defineProperty(CaseField.prototype, "value", {
|
|
3362
3354
|
get: function () {
|
|
3363
|
-
if (this.
|
|
3355
|
+
if (this.field_type && (this.field_type.type === 'DynamicList' || this.field_type.type === 'DynamicRadioList')) {
|
|
3364
3356
|
return this._value && this._value.value ? this._value.value.code : this._value;
|
|
3365
3357
|
}
|
|
3358
|
+
else if (this.field_type && this.field_type.type === 'DynamicMultiSelectList') {
|
|
3359
|
+
return this._value && this._value.value ? this._value.value : this._value;
|
|
3360
|
+
}
|
|
3366
3361
|
else {
|
|
3367
3362
|
return this._value;
|
|
3368
3363
|
}
|
|
@@ -3452,7 +3447,7 @@
|
|
|
3452
3447
|
};
|
|
3453
3448
|
CaseField.prototype.isDynamic = function () {
|
|
3454
3449
|
var _this = this;
|
|
3455
|
-
var dynamicFieldTypes = ['DynamicList', 'DynamicRadioList'];
|
|
3450
|
+
var dynamicFieldTypes = ['DynamicList', 'DynamicRadioList', 'DynamicMultiSelectList'];
|
|
3456
3451
|
if (!this.field_type) {
|
|
3457
3452
|
return false;
|
|
3458
3453
|
}
|
|
@@ -3610,6 +3605,7 @@
|
|
|
3610
3605
|
__metadata("design:type", Array)
|
|
3611
3606
|
], CaseEventTrigger.prototype, "wizard_pages", void 0);
|
|
3612
3607
|
|
|
3608
|
+
// tslint:disable:variable-name
|
|
3613
3609
|
var CaseViewEvent = /** @class */ (function () {
|
|
3614
3610
|
function CaseViewEvent() {
|
|
3615
3611
|
}
|
|
@@ -3654,6 +3650,7 @@
|
|
|
3654
3650
|
__metadata("design:type", Array)
|
|
3655
3651
|
], CaseType.prototype, "case_fields", void 0);
|
|
3656
3652
|
|
|
3653
|
+
// tslint:disable:variable-name
|
|
3657
3654
|
var EventCaseField = /** @class */ (function () {
|
|
3658
3655
|
function EventCaseField() {
|
|
3659
3656
|
}
|
|
@@ -3704,6 +3701,7 @@
|
|
|
3704
3701
|
return CasePrintDocument;
|
|
3705
3702
|
}());
|
|
3706
3703
|
|
|
3704
|
+
// tslint:disable:variable-name
|
|
3707
3705
|
var HRef = /** @class */ (function () {
|
|
3708
3706
|
function HRef() {
|
|
3709
3707
|
}
|
|
@@ -3741,25 +3739,25 @@
|
|
|
3741
3739
|
OrganisationConverter.toSimpleAddress = function (organisationModel) {
|
|
3742
3740
|
var simpleAddress = '';
|
|
3743
3741
|
if (organisationModel.addressLine1) {
|
|
3744
|
-
simpleAddress += organisationModel.addressLine1 +
|
|
3742
|
+
simpleAddress += organisationModel.addressLine1 + "<br>";
|
|
3745
3743
|
}
|
|
3746
3744
|
if (organisationModel.addressLine2) {
|
|
3747
|
-
simpleAddress += organisationModel.addressLine2 +
|
|
3745
|
+
simpleAddress += organisationModel.addressLine2 + "<br>";
|
|
3748
3746
|
}
|
|
3749
3747
|
if (organisationModel.addressLine3) {
|
|
3750
|
-
simpleAddress += organisationModel.addressLine3 +
|
|
3748
|
+
simpleAddress += organisationModel.addressLine3 + "<br>";
|
|
3751
3749
|
}
|
|
3752
3750
|
if (organisationModel.townCity) {
|
|
3753
|
-
simpleAddress += organisationModel.townCity +
|
|
3751
|
+
simpleAddress += organisationModel.townCity + "<br>";
|
|
3754
3752
|
}
|
|
3755
3753
|
if (organisationModel.county) {
|
|
3756
|
-
simpleAddress += organisationModel.county +
|
|
3754
|
+
simpleAddress += organisationModel.county + "<br>";
|
|
3757
3755
|
}
|
|
3758
3756
|
if (organisationModel.country) {
|
|
3759
|
-
simpleAddress += organisationModel.country +
|
|
3757
|
+
simpleAddress += organisationModel.country + "<br>";
|
|
3760
3758
|
}
|
|
3761
3759
|
if (organisationModel.postCode) {
|
|
3762
|
-
simpleAddress += organisationModel.postCode +
|
|
3760
|
+
simpleAddress += organisationModel.postCode + "<br>";
|
|
3763
3761
|
}
|
|
3764
3762
|
return simpleAddress;
|
|
3765
3763
|
};
|
|
@@ -3872,12 +3870,14 @@
|
|
|
3872
3870
|
__metadata("design:type", Array)
|
|
3873
3871
|
], SearchResultView.prototype, "results", void 0);
|
|
3874
3872
|
|
|
3873
|
+
// tslint:disable:variable-name
|
|
3875
3874
|
var CaseDetails = /** @class */ (function () {
|
|
3876
3875
|
function CaseDetails() {
|
|
3877
3876
|
}
|
|
3878
3877
|
return CaseDetails;
|
|
3879
3878
|
}());
|
|
3880
3879
|
|
|
3880
|
+
// tslint:disable:variable-name
|
|
3881
3881
|
var CaseEventData = /** @class */ (function () {
|
|
3882
3882
|
function CaseEventData() {
|
|
3883
3883
|
}
|
|
@@ -3885,12 +3885,7 @@
|
|
|
3885
3885
|
}());
|
|
3886
3886
|
|
|
3887
3887
|
var WorkbasketInputModel = /** @class */ (function () {
|
|
3888
|
-
function WorkbasketInputModel(
|
|
3889
|
-
this.label = label;
|
|
3890
|
-
this.order = order;
|
|
3891
|
-
this.field = field;
|
|
3892
|
-
this.metadata = metadata;
|
|
3893
|
-
this.display_context_parameter = display_context_parameter;
|
|
3888
|
+
function WorkbasketInputModel() {
|
|
3894
3889
|
}
|
|
3895
3890
|
return WorkbasketInputModel;
|
|
3896
3891
|
}());
|
|
@@ -3938,9 +3933,9 @@
|
|
|
3938
3933
|
});
|
|
3939
3934
|
return valueMap;
|
|
3940
3935
|
};
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
}
|
|
3936
|
+
// public static getType(elem: any): string {
|
|
3937
|
+
// return Object.prototype.toString.call(elem).slice(8, -1);
|
|
3938
|
+
// }
|
|
3944
3939
|
FieldsUtils.isObject = function (elem) {
|
|
3945
3940
|
return typeof elem === 'object' && elem !== null;
|
|
3946
3941
|
};
|
|
@@ -4141,6 +4136,13 @@
|
|
|
4141
4136
|
}
|
|
4142
4137
|
return caseField.field_type.type === 'ComponentLauncher';
|
|
4143
4138
|
};
|
|
4139
|
+
FieldsUtils.isLinkedCasesCaseField = function (caseField) {
|
|
4140
|
+
return FieldsUtils.isComponentLauncherCaseField(caseField) &&
|
|
4141
|
+
caseField.id === 'LinkedCasesComponentLauncher';
|
|
4142
|
+
};
|
|
4143
|
+
FieldsUtils.containsLinkedCasesCaseField = function (caseFields) {
|
|
4144
|
+
return caseFields === null || caseFields === void 0 ? void 0 : caseFields.some(function (caseField) { return FieldsUtils.isLinkedCasesCaseField(caseField); });
|
|
4145
|
+
};
|
|
4144
4146
|
FieldsUtils.isFlagsFieldType = function (fieldType) {
|
|
4145
4147
|
if (!fieldType) {
|
|
4146
4148
|
return false;
|
|
@@ -4449,6 +4451,7 @@
|
|
|
4449
4451
|
var elements = (result[field.id] || field.value);
|
|
4450
4452
|
if (elements) {
|
|
4451
4453
|
elements.forEach(function (elem) {
|
|
4454
|
+
// tslint:disable-next-line:switch-default
|
|
4452
4455
|
switch (field.field_type.collection_field_type.type) {
|
|
4453
4456
|
case 'MoneyGBP': {
|
|
4454
4457
|
elem.value = FieldsUtils.getMoneyGBP(elem.value);
|
|
@@ -4498,7 +4501,6 @@
|
|
|
4498
4501
|
if (!condition) {
|
|
4499
4502
|
return null;
|
|
4500
4503
|
}
|
|
4501
|
-
;
|
|
4502
4504
|
condition = condition.replace(/CONTAINS/g, ' CONTAINS');
|
|
4503
4505
|
return peg.parse(condition.trim(), {});
|
|
4504
4506
|
};
|
|
@@ -4512,14 +4514,12 @@
|
|
|
4512
4514
|
if (!conditions || conditions.length === 0) {
|
|
4513
4515
|
return true;
|
|
4514
4516
|
}
|
|
4515
|
-
;
|
|
4516
4517
|
var validJoinComparators = ['AND', 'OR'];
|
|
4517
|
-
|
|
4518
|
+
return conditions.reduce(function (accumulator, condition, index) {
|
|
4518
4519
|
var isJoinComparator = function (comparator) { return (typeof comparator === 'string' && validJoinComparators.indexOf(comparator) !== -1); };
|
|
4519
4520
|
if (isJoinComparator(condition)) {
|
|
4520
4521
|
return accumulator;
|
|
4521
4522
|
}
|
|
4522
|
-
;
|
|
4523
4523
|
var currentConditionResult = true;
|
|
4524
4524
|
if (Array.isArray(condition)) {
|
|
4525
4525
|
currentConditionResult = _this.evaluate(fields, condition);
|
|
@@ -4536,9 +4536,9 @@
|
|
|
4536
4536
|
}
|
|
4537
4537
|
return currentConditionResult;
|
|
4538
4538
|
}, true);
|
|
4539
|
-
return result;
|
|
4540
4539
|
};
|
|
4541
4540
|
ConditionParser.evaluateJoin = function (leftResult, comparator, rightResult) {
|
|
4541
|
+
// tslint:disable-next-line:switch-default
|
|
4542
4542
|
switch (comparator) {
|
|
4543
4543
|
case 'OR': return leftResult || rightResult;
|
|
4544
4544
|
case 'AND': return leftResult && rightResult;
|
|
@@ -4628,8 +4628,7 @@
|
|
|
4628
4628
|
}
|
|
4629
4629
|
};
|
|
4630
4630
|
ConditionParser.unquoted = function (str) {
|
|
4631
|
-
|
|
4632
|
-
return res;
|
|
4631
|
+
return str.replace(/^"|"$/g, '');
|
|
4633
4632
|
};
|
|
4634
4633
|
ConditionParser.findValueForComplexCondition = function (fields, head, tail, path) {
|
|
4635
4634
|
if (!fields) {
|
|
@@ -4743,8 +4742,8 @@
|
|
|
4743
4742
|
if (originalCondition.indexOf(condition.fieldReference) > -1) {
|
|
4744
4743
|
if (this.processedList && this.processedList.indexOf(condition.fieldReference) === -1) {
|
|
4745
4744
|
this.processedList.push(condition.fieldReference);
|
|
4746
|
-
var regularExp = new RegExp(
|
|
4747
|
-
return originalCondition.replace(regularExp, pathPrefix +
|
|
4745
|
+
var regularExp = new RegExp("(\\b)" + condition.fieldReference + "(?=[^\"]*(?:\"[^\"]*\"[^\"]*)*$)(\\b)", 'g');
|
|
4746
|
+
return originalCondition.replace(regularExp, pathPrefix + "." + condition.fieldReference);
|
|
4748
4747
|
}
|
|
4749
4748
|
else {
|
|
4750
4749
|
return originalCondition;
|
|
@@ -4823,6 +4822,7 @@
|
|
|
4823
4822
|
}
|
|
4824
4823
|
// Consider what type of field this is.
|
|
4825
4824
|
var ft = caseField.field_type;
|
|
4825
|
+
// tslint:disable-next-line:switch-default
|
|
4826
4826
|
switch (ft.type) {
|
|
4827
4827
|
case 'Collection':
|
|
4828
4828
|
if (ft.collection_field_type.type === 'Complex' && ft.collection_field_type.complex_fields) {
|
|
@@ -5313,14 +5313,14 @@
|
|
|
5313
5313
|
var formFields = form.getRawValue();
|
|
5314
5314
|
var currentPage = wizard.getPage(currentPageId, this.fieldsUtils.buildCanShowPredicate(eventTrigger, form));
|
|
5315
5315
|
currentPage.wizard_page_fields.forEach(function (wpf) {
|
|
5316
|
-
var
|
|
5317
|
-
if (_this.hasShowConditionField(
|
|
5318
|
-
var condition = new ShowCondition(
|
|
5319
|
-
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(
|
|
5320
|
-
_this.resetField(form,
|
|
5316
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(currentPage, wpf);
|
|
5317
|
+
if (_this.hasShowConditionField(caseField, formFields)) {
|
|
5318
|
+
var condition = new ShowCondition(caseField.show_condition);
|
|
5319
|
+
if (_this.isHidden(condition, formFields.data) && !(_this.isReadonly(caseField))) {
|
|
5320
|
+
_this.resetField(form, caseField);
|
|
5321
5321
|
}
|
|
5322
5322
|
}
|
|
5323
|
-
_this.retainHiddenValueByFieldType(
|
|
5323
|
+
_this.retainHiddenValueByFieldType(caseField, form);
|
|
5324
5324
|
});
|
|
5325
5325
|
};
|
|
5326
5326
|
FieldsPurger.prototype.retainHiddenValueByFieldType = function (field, form) {
|
|
@@ -5351,13 +5351,13 @@
|
|
|
5351
5351
|
FieldsPurger.prototype.hasShowConditionPage = function (wizardPage, formFields) {
|
|
5352
5352
|
return wizardPage.show_condition && formFields[this.getShowConditionKey(wizardPage.show_condition)];
|
|
5353
5353
|
};
|
|
5354
|
-
FieldsPurger.prototype.hasShowConditionField = function (
|
|
5355
|
-
return
|
|
5354
|
+
FieldsPurger.prototype.hasShowConditionField = function (caseField, formFields) {
|
|
5355
|
+
return caseField.show_condition && formFields.data[this.getShowConditionKey(caseField.show_condition)];
|
|
5356
5356
|
};
|
|
5357
|
-
FieldsPurger.prototype.getShowConditionKey = function (
|
|
5357
|
+
FieldsPurger.prototype.getShowConditionKey = function (showCondition) {
|
|
5358
5358
|
// Need to allow for negated conditions, i.e. !=, as well as regular ones (=)
|
|
5359
5359
|
// Also need to allow for conditions specified using the "CONTAINS" keyword
|
|
5360
|
-
return
|
|
5360
|
+
return showCondition.split(/!=|=|CONTAINS/)[0];
|
|
5361
5361
|
};
|
|
5362
5362
|
FieldsPurger.prototype.resetField = function (form, field) {
|
|
5363
5363
|
var e_1, _a;
|
|
@@ -5453,8 +5453,8 @@
|
|
|
5453
5453
|
FieldsPurger.prototype.resetPage = function (form, wizardPage) {
|
|
5454
5454
|
var _this = this;
|
|
5455
5455
|
wizardPage.wizard_page_fields.forEach(function (wpf) {
|
|
5456
|
-
var
|
|
5457
|
-
_this.resetField(form,
|
|
5456
|
+
var caseField = _this.findCaseFieldByWizardPageFieldId(wizardPage, wpf);
|
|
5457
|
+
_this.resetField(form, caseField);
|
|
5458
5458
|
});
|
|
5459
5459
|
};
|
|
5460
5460
|
FieldsPurger.prototype.getType = function (elem) {
|
|
@@ -5464,8 +5464,8 @@
|
|
|
5464
5464
|
return this.getType(elem) === 'Object';
|
|
5465
5465
|
};
|
|
5466
5466
|
// TODO: call isReadOnly on CaseFields once we make it available
|
|
5467
|
-
FieldsPurger.prototype.isReadonly = function (
|
|
5468
|
-
return
|
|
5467
|
+
FieldsPurger.prototype.isReadonly = function (caseField) {
|
|
5468
|
+
return caseField.display_context.toUpperCase() === 'READONLY';
|
|
5469
5469
|
};
|
|
5470
5470
|
/**
|
|
5471
5471
|
* Deletes a field value by setting the value of the corresponding {@link FormControl} to null (or an empty array
|
|
@@ -5652,7 +5652,11 @@
|
|
|
5652
5652
|
return;
|
|
5653
5653
|
}
|
|
5654
5654
|
caseFields.forEach(function (caseField) {
|
|
5655
|
+
// tslint:disable-next-line:switch-default
|
|
5655
5656
|
switch (caseField.field_type.type) {
|
|
5657
|
+
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST:
|
|
5658
|
+
_this.convertArrayToDynamicListOutput(caseField, data);
|
|
5659
|
+
break;
|
|
5656
5660
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_RADIO_LIST:
|
|
5657
5661
|
case FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_LIST:
|
|
5658
5662
|
_this.convertStringToDynamicListOutput(caseField, data);
|
|
@@ -5670,6 +5674,17 @@
|
|
|
5670
5674
|
}
|
|
5671
5675
|
});
|
|
5672
5676
|
};
|
|
5677
|
+
FieldTypeSanitiser.prototype.convertArrayToDynamicListOutput = function (field, data) {
|
|
5678
|
+
var values = data[field.id];
|
|
5679
|
+
if (Array.isArray(values)) {
|
|
5680
|
+
var listItems = this.getListItems(field);
|
|
5681
|
+
var matches = listItems.filter(function (item) { return values.map(function (v) { return v.code; }).indexOf(item.code) !== -1; });
|
|
5682
|
+
data[field.id] = {
|
|
5683
|
+
value: matches,
|
|
5684
|
+
list_items: listItems
|
|
5685
|
+
};
|
|
5686
|
+
}
|
|
5687
|
+
};
|
|
5673
5688
|
FieldTypeSanitiser.prototype.convertStringToDynamicListOutput = function (field, data) {
|
|
5674
5689
|
var stringValue = data[field.id];
|
|
5675
5690
|
if (typeof stringValue === 'string') {
|
|
@@ -5700,6 +5715,7 @@
|
|
|
5700
5715
|
FieldTypeSanitiser.FIELD_TYPE_COLLECTION = 'Collection';
|
|
5701
5716
|
FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_LIST = 'DynamicList';
|
|
5702
5717
|
FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_RADIO_LIST = 'DynamicRadioList';
|
|
5718
|
+
FieldTypeSanitiser.FIELD_TYPE_DYNAMIC_MULTISELECT_LIST = 'DynamicMultiSelectList';
|
|
5703
5719
|
FieldTypeSanitiser.ɵfac = function FieldTypeSanitiser_Factory(t) { return new (t || FieldTypeSanitiser)(); };
|
|
5704
5720
|
FieldTypeSanitiser.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: FieldTypeSanitiser, factory: FieldTypeSanitiser.ɵfac });
|
|
5705
5721
|
(function () {
|
|
@@ -6345,7 +6361,6 @@
|
|
|
6345
6361
|
});
|
|
6346
6362
|
}
|
|
6347
6363
|
}
|
|
6348
|
-
;
|
|
6349
6364
|
});
|
|
6350
6365
|
}
|
|
6351
6366
|
};
|
|
@@ -6784,7 +6799,7 @@
|
|
|
6784
6799
|
return addressModel;
|
|
6785
6800
|
};
|
|
6786
6801
|
AddressParser.prototype.parseAddressLine1 = function (classification, address) {
|
|
6787
|
-
var addressLine
|
|
6802
|
+
var addressLine;
|
|
6788
6803
|
if (classification === AddressType.RD06) {
|
|
6789
6804
|
addressLine =
|
|
6790
6805
|
address.SUB_BUILDING_NAME + " " + address.ORGANISATION_NAME + " " + address.DEPARTMENT_NAME + " " + address.PO_BOX_NUMBER;
|
|
@@ -6797,7 +6812,7 @@
|
|
|
6797
6812
|
return this.removeNonAddressValues(addressLine);
|
|
6798
6813
|
};
|
|
6799
6814
|
AddressParser.prototype.parseAddressLine2 = function (classification, address) {
|
|
6800
|
-
var addressLine
|
|
6815
|
+
var addressLine;
|
|
6801
6816
|
if (classification === AddressType.RD06) {
|
|
6802
6817
|
addressLine = address.BUILDING_NAME + " ";
|
|
6803
6818
|
}
|
|
@@ -6808,7 +6823,7 @@
|
|
|
6808
6823
|
return this.removeNonAddressValues(addressLine);
|
|
6809
6824
|
};
|
|
6810
6825
|
AddressParser.prototype.parseAddressLine3 = function (classification, address) {
|
|
6811
|
-
var addressLine
|
|
6826
|
+
var addressLine;
|
|
6812
6827
|
if (classification === AddressType.RD06) {
|
|
6813
6828
|
addressLine =
|
|
6814
6829
|
address.BUILDING_NUMBER + " " + address.THOROUGHFARE_NAME;
|
|
@@ -6836,7 +6851,7 @@
|
|
|
6836
6851
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
6837
6852
|
};
|
|
6838
6853
|
AddressParser.prototype.prefixWithCommaIfPresent = function (value) {
|
|
6839
|
-
return value ?
|
|
6854
|
+
return value ? ", " + value : value;
|
|
6840
6855
|
};
|
|
6841
6856
|
return AddressParser;
|
|
6842
6857
|
}());
|
|
@@ -7086,7 +7101,7 @@
|
|
|
7086
7101
|
if (flagType) {
|
|
7087
7102
|
url += "?flag-type=" + flagType;
|
|
7088
7103
|
}
|
|
7089
|
-
if (welshRequired
|
|
7104
|
+
if (typeof welshRequired === 'boolean') {
|
|
7090
7105
|
// Check if flag-type has been added to the query string; if so, append welsh-required with '&'
|
|
7091
7106
|
url.indexOf('?') > -1 ? url += '&' : url += '?';
|
|
7092
7107
|
welshRequired ? url += 'welsh-required=Y' : url += 'welsh-required=N';
|
|
@@ -7692,18 +7707,6 @@
|
|
|
7692
7707
|
}], null, null);
|
|
7693
7708
|
})();
|
|
7694
7709
|
|
|
7695
|
-
var HasLoadingState = /** @class */ (function () {
|
|
7696
|
-
function HasLoadingState() {
|
|
7697
|
-
}
|
|
7698
|
-
Object.defineProperty(HasLoadingState.prototype, "isLoading", {
|
|
7699
|
-
get: function () {
|
|
7700
|
-
return;
|
|
7701
|
-
},
|
|
7702
|
-
enumerable: false,
|
|
7703
|
-
configurable: true
|
|
7704
|
-
});
|
|
7705
|
-
return HasLoadingState;
|
|
7706
|
-
}());
|
|
7707
7710
|
var LoadingService = /** @class */ (function () {
|
|
7708
7711
|
function LoadingService() {
|
|
7709
7712
|
this.registered = new Map();
|
|
@@ -7728,7 +7731,7 @@
|
|
|
7728
7731
|
};
|
|
7729
7732
|
LoadingService.prototype.generateToken = function () {
|
|
7730
7733
|
var timestamp = window.performance.now();
|
|
7731
|
-
return
|
|
7734
|
+
return "toolkit-loading-" + timestamp; // format: [source-library]-[unique incrementing number]
|
|
7732
7735
|
};
|
|
7733
7736
|
return LoadingService;
|
|
7734
7737
|
}());
|
|
@@ -7749,10 +7752,7 @@
|
|
|
7749
7752
|
}
|
|
7750
7753
|
SearchService.prototype.search = function (jurisdictionId, caseTypeId, metaCriteria, caseCriteria, view) {
|
|
7751
7754
|
var _this = this;
|
|
7752
|
-
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid"
|
|
7753
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7754
|
-
+ ("/case-types/" + caseTypeId)
|
|
7755
|
-
+ "/cases";
|
|
7755
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases";
|
|
7756
7756
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7757
7757
|
var loadingToken = this.loadingService.register();
|
|
7758
7758
|
return this.httpService
|
|
@@ -7761,15 +7761,14 @@
|
|
|
7761
7761
|
};
|
|
7762
7762
|
SearchService.prototype.searchCasesByIds = function (caseTypeId, filter, view, sort) {
|
|
7763
7763
|
var _this = this;
|
|
7764
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7765
|
-
("/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view);
|
|
7764
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7766
7765
|
var body = Object.assign(Object.assign({ sort: sort }, filter), { size: this.appConfig.getPaginationPageSize() });
|
|
7767
7766
|
var loadingToken = this.loadingService.register();
|
|
7768
7767
|
return this.httpService.post(url, body).pipe(operators.map(function (response) { return response; }), operators.finalize(function () { return _this.loadingService.unregister(loadingToken); }));
|
|
7769
7768
|
};
|
|
7770
7769
|
SearchService.prototype.searchCases = function (caseTypeId, metaCriteria, caseCriteria, view, sort) {
|
|
7771
7770
|
var _this = this;
|
|
7772
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
7771
|
+
var url = this.appConfig.getCaseDataUrl() + "/internal/searchCases?ctid=" + caseTypeId + "&use_case=" + view;
|
|
7773
7772
|
var options = this.requestOptionsBuilder.buildOptions(metaCriteria, caseCriteria, view);
|
|
7774
7773
|
var body = {
|
|
7775
7774
|
sort: sort,
|
|
@@ -7814,9 +7813,8 @@
|
|
|
7814
7813
|
return SearchService;
|
|
7815
7814
|
}());
|
|
7816
7815
|
SearchService.V2_MEDIATYPE_SEARCH_INPUTS = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.ui-search-input-details.v2+json;charset=UTF-8';
|
|
7817
|
-
|
|
7816
|
+
// public static readonly VIEW_SEARCH = 'SEARCH';
|
|
7818
7817
|
SearchService.VIEW_WORKBASKET = 'WORKBASKET';
|
|
7819
|
-
SearchService.FIELD_PREFIX = 'case.';
|
|
7820
7818
|
SearchService.ɵfac = function SearchService_Factory(t) { return new (t || SearchService)(i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(RequestOptionsBuilder), i0__namespace.ɵɵinject(LoadingService)); };
|
|
7821
7819
|
SearchService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: SearchService, factory: SearchService.ɵfac });
|
|
7822
7820
|
(function () {
|
|
@@ -7946,17 +7944,12 @@
|
|
|
7946
7944
|
this.appConfig = appConfig;
|
|
7947
7945
|
}
|
|
7948
7946
|
DefinitionsService.prototype.getCaseTypes = function (jurisdictionId, access) {
|
|
7949
|
-
var url = this.appConfig.getApiUrl()
|
|
7950
|
-
+ "/caseworkers/:uid"
|
|
7951
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
7952
|
-
+ ("/case-types?access=" + access);
|
|
7947
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types?access=" + access;
|
|
7953
7948
|
return this.http
|
|
7954
7949
|
.get(url).pipe(operators.map(function (response) { return response; }));
|
|
7955
7950
|
};
|
|
7956
7951
|
DefinitionsService.prototype.getJurisdictions = function (access) {
|
|
7957
|
-
var url = this.appConfig.getApiUrl()
|
|
7958
|
-
+ "/caseworkers/:uid"
|
|
7959
|
-
+ ("/jurisdictions?access=" + access);
|
|
7952
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions?access=" + access;
|
|
7960
7953
|
return this.http
|
|
7961
7954
|
.get(url)
|
|
7962
7955
|
.pipe(operators.map(function (response) { return response; }));
|
|
@@ -8038,8 +8031,8 @@
|
|
|
8038
8031
|
compare: function (a, b) {
|
|
8039
8032
|
var fieldA = a.case_fields[fieldId];
|
|
8040
8033
|
var fieldB = b.case_fields[fieldId];
|
|
8041
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8042
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8034
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.toLowerCase();
|
|
8035
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.toLowerCase();
|
|
8043
8036
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8044
8037
|
}
|
|
8045
8038
|
};
|
|
@@ -8049,8 +8042,8 @@
|
|
|
8049
8042
|
compare: function (a, b) {
|
|
8050
8043
|
var fieldA = a.case_fields[fieldId];
|
|
8051
8044
|
var fieldB = b.case_fields[fieldId];
|
|
8052
|
-
fieldA = util.isUndefined(fieldA) || fieldA
|
|
8053
|
-
fieldB = util.isUndefined(fieldB) || fieldB
|
|
8045
|
+
fieldA = util.isUndefined(fieldA) || fieldA === null ? '' : fieldA.join().toLowerCase();
|
|
8046
|
+
fieldB = util.isUndefined(fieldB) || fieldB === null ? '' : fieldB.join().toLowerCase();
|
|
8054
8047
|
return fieldA === fieldB ? 0 : fieldA > fieldB ? 1 : -1;
|
|
8055
8048
|
}
|
|
8056
8049
|
};
|
|
@@ -8308,31 +8301,31 @@
|
|
|
8308
8301
|
};
|
|
8309
8302
|
WizardPageFieldToCaseFieldMapper.prototype.processComplexFieldOverride = function (override, caseField, caseFields) {
|
|
8310
8303
|
var caseFieldIds = override.complex_field_element_id.split('.');
|
|
8311
|
-
var
|
|
8304
|
+
var caseFieldLeaf;
|
|
8312
8305
|
var children = this.getCaseFieldChildren(caseField);
|
|
8313
8306
|
if (children.length > 0) {
|
|
8314
8307
|
var _a = __read(caseFieldIds), _ = _a[0], tail = _a.slice(1);
|
|
8315
|
-
|
|
8308
|
+
caseFieldLeaf = this.getCaseFieldLeaf(tail, children);
|
|
8316
8309
|
}
|
|
8317
8310
|
else {
|
|
8318
|
-
|
|
8311
|
+
caseFieldLeaf = this.getCaseFieldLeaf(caseFieldIds, caseFields);
|
|
8319
8312
|
}
|
|
8320
8313
|
if (override.display_context !== 'HIDDEN') {
|
|
8321
|
-
|
|
8322
|
-
|
|
8314
|
+
caseFieldLeaf.hidden = false;
|
|
8315
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8323
8316
|
if (override.label && override.label.length > 0) {
|
|
8324
|
-
|
|
8317
|
+
caseFieldLeaf.label = override.label;
|
|
8325
8318
|
}
|
|
8326
8319
|
if (override.hint_text && override.hint_text.length > 0) {
|
|
8327
|
-
|
|
8320
|
+
caseFieldLeaf.hint_text = override.hint_text;
|
|
8328
8321
|
}
|
|
8329
8322
|
if (override.show_condition && override.show_condition.length > 0) {
|
|
8330
|
-
|
|
8323
|
+
caseFieldLeaf.show_condition = override.show_condition;
|
|
8331
8324
|
}
|
|
8332
8325
|
}
|
|
8333
8326
|
else {
|
|
8334
|
-
|
|
8335
|
-
|
|
8327
|
+
caseFieldLeaf.hidden = true;
|
|
8328
|
+
caseFieldLeaf.display_context = override.display_context;
|
|
8336
8329
|
}
|
|
8337
8330
|
};
|
|
8338
8331
|
WizardPageFieldToCaseFieldMapper.prototype.fixShowConditionPath = function (caseField, pathPrefix) {
|
|
@@ -8346,7 +8339,7 @@
|
|
|
8346
8339
|
});
|
|
8347
8340
|
};
|
|
8348
8341
|
WizardPageFieldToCaseFieldMapper.prototype.preparePathPrefix = function (pathPrefix, caseField) {
|
|
8349
|
-
return pathPrefix.length === 0 ? caseField : pathPrefix +
|
|
8342
|
+
return pathPrefix.length === 0 ? caseField : pathPrefix + "." + caseField;
|
|
8350
8343
|
};
|
|
8351
8344
|
WizardPageFieldToCaseFieldMapper.prototype.getCaseFieldLeaf = function (caseFieldId, caseFields) {
|
|
8352
8345
|
var _a = __read(caseFieldId), head = _a[0], tail = _a.slice(1);
|
|
@@ -8403,223 +8396,13 @@
|
|
|
8403
8396
|
}], null, null);
|
|
8404
8397
|
})();
|
|
8405
8398
|
|
|
8406
|
-
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
8407
|
-
var WorkAllocationService = /** @class */ (function () {
|
|
8408
|
-
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
8409
|
-
this.http = http;
|
|
8410
|
-
this.appConfig = appConfig;
|
|
8411
|
-
this.errorService = errorService;
|
|
8412
|
-
this.alertService = alertService;
|
|
8413
|
-
this.sessionStorageService = sessionStorageService;
|
|
8414
|
-
// Check to see if work allocation is enabled
|
|
8415
|
-
}
|
|
8416
|
-
/**
|
|
8417
|
-
* Call the API to get tasks matching the search criteria.
|
|
8418
|
-
* @param searchRequest The search parameters that specify which tasks to match.
|
|
8419
|
-
*/
|
|
8420
|
-
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
8421
|
-
var _this = this;
|
|
8422
|
-
// Do not need to check if WA enabled as parent method will do that
|
|
8423
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
8424
|
-
return this.http
|
|
8425
|
-
.post(url, { searchRequest: searchRequest }, null, false)
|
|
8426
|
-
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
8427
|
-
_this.errorService.setError(error);
|
|
8428
|
-
// explicitly eat away 401 error and 400 error
|
|
8429
|
-
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
8430
|
-
// do nothing
|
|
8431
|
-
console.log('error status 401 or 400', error);
|
|
8432
|
-
}
|
|
8433
|
-
else {
|
|
8434
|
-
return rxjs.throwError(error);
|
|
8435
|
-
}
|
|
8436
|
-
}));
|
|
8437
|
-
};
|
|
8438
|
-
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
8439
|
-
this.features = this.appConfig.getWAServiceConfig();
|
|
8440
|
-
var enabled = false;
|
|
8441
|
-
if (!jurisdiction || !caseType) {
|
|
8442
|
-
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
8443
|
-
jurisdiction = caseInfo.jurisdiction;
|
|
8444
|
-
caseType = caseInfo.caseType;
|
|
8445
|
-
}
|
|
8446
|
-
if (!this.features || !this.features.configurations) {
|
|
8447
|
-
return false;
|
|
8448
|
-
}
|
|
8449
|
-
this.features.configurations.forEach(function (serviceConfig) {
|
|
8450
|
-
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
8451
|
-
enabled = true;
|
|
8452
|
-
}
|
|
8453
|
-
});
|
|
8454
|
-
return enabled;
|
|
8455
|
-
};
|
|
8456
|
-
/**
|
|
8457
|
-
* Call the API to assign a task.
|
|
8458
|
-
* @param taskId specifies which task should be assigned.
|
|
8459
|
-
* @param userId specifies the user the task should be assigned to.
|
|
8460
|
-
*/
|
|
8461
|
-
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
8462
|
-
var _this = this;
|
|
8463
|
-
if (!this.isWAEnabled()) {
|
|
8464
|
-
return rxjs.of(null);
|
|
8465
|
-
}
|
|
8466
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
8467
|
-
return this.http
|
|
8468
|
-
.post(url, { userId: userId })
|
|
8469
|
-
.pipe(operators.catchError(function (error) {
|
|
8470
|
-
_this.errorService.setError(error);
|
|
8471
|
-
return rxjs.throwError(error);
|
|
8472
|
-
}));
|
|
8473
|
-
};
|
|
8474
|
-
/**
|
|
8475
|
-
* Call the API to complete a task.
|
|
8476
|
-
* @param taskId specifies which task should be completed.
|
|
8477
|
-
*/
|
|
8478
|
-
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
8479
|
-
var _this = this;
|
|
8480
|
-
if (!this.isWAEnabled()) {
|
|
8481
|
-
return rxjs.of(null);
|
|
8482
|
-
}
|
|
8483
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8484
|
-
return this.http
|
|
8485
|
-
.post(url, {})
|
|
8486
|
-
.pipe(operators.catchError(function (error) {
|
|
8487
|
-
_this.errorService.setError(error);
|
|
8488
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8489
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8490
|
-
_this.handleTaskCompletionError(response);
|
|
8491
|
-
});
|
|
8492
|
-
return rxjs.throwError(error);
|
|
8493
|
-
}));
|
|
8494
|
-
};
|
|
8495
|
-
/**
|
|
8496
|
-
* Call the API to assign and complete a task.
|
|
8497
|
-
* @param taskId specifies which task should be completed.
|
|
8498
|
-
*/
|
|
8499
|
-
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
8500
|
-
var _this = this;
|
|
8501
|
-
if (!this.isWAEnabled()) {
|
|
8502
|
-
return rxjs.of(null);
|
|
8503
|
-
}
|
|
8504
|
-
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
8505
|
-
return this.http
|
|
8506
|
-
.post(url, {
|
|
8507
|
-
completion_options: {
|
|
8508
|
-
assign_and_complete: true
|
|
8509
|
-
}
|
|
8510
|
-
})
|
|
8511
|
-
.pipe(operators.catchError(function (error) {
|
|
8512
|
-
_this.errorService.setError(error);
|
|
8513
|
-
// this will subscribe to get the user details and decide whether to display an error message
|
|
8514
|
-
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
8515
|
-
_this.handleTaskCompletionError(response);
|
|
8516
|
-
});
|
|
8517
|
-
return rxjs.throwError(error);
|
|
8518
|
-
}));
|
|
8519
|
-
};
|
|
8520
|
-
/**
|
|
8521
|
-
* Handles the response from the observable to get the user details when task is completed.
|
|
8522
|
-
* @param response is the response given from the observable which contains the user detaild.
|
|
8523
|
-
*/
|
|
8524
|
-
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
8525
|
-
var userDetails = response;
|
|
8526
|
-
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
8527
|
-
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
8528
|
-
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
8529
|
-
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
8530
|
-
}
|
|
8531
|
-
};
|
|
8532
|
-
/**
|
|
8533
|
-
* Returns true if the user's role is equivalent to a caseworker.
|
|
8534
|
-
* @param roles is the list of roles found from the current user.
|
|
8535
|
-
*/
|
|
8536
|
-
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
8537
|
-
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
8538
|
-
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
8539
|
-
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
8540
|
-
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
8541
|
-
};
|
|
8542
|
-
/**
|
|
8543
|
-
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
8544
|
-
* 1. No tasks found => Success.
|
|
8545
|
-
* 2. One task found => Mark as done => Success.
|
|
8546
|
-
* 3. One task found => Mark as done throws error => Failure.
|
|
8547
|
-
* 4. More than one task found => Failure.
|
|
8548
|
-
* 5. Search call throws an error => Failure.
|
|
8549
|
-
* @param ccdId The ID of the case to find tasks for.
|
|
8550
|
-
* @param eventId The ID of the event to find tasks for.
|
|
8551
|
-
*/
|
|
8552
|
-
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
8553
|
-
var _this = this;
|
|
8554
|
-
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
8555
|
-
return rxjs.of(null);
|
|
8556
|
-
}
|
|
8557
|
-
var taskSearchParameter = {
|
|
8558
|
-
ccdId: ccdId,
|
|
8559
|
-
eventId: eventId,
|
|
8560
|
-
jurisdiction: jurisdiction,
|
|
8561
|
-
caseTypeId: caseTypeId
|
|
8562
|
-
};
|
|
8563
|
-
return this.searchTasks(taskSearchParameter)
|
|
8564
|
-
.pipe(operators.map(function (response) {
|
|
8565
|
-
var tasks = response.tasks;
|
|
8566
|
-
if (tasks && tasks.length > 0) {
|
|
8567
|
-
if (tasks.length === 1) {
|
|
8568
|
-
_this.completeTask(tasks[0].id).subscribe();
|
|
8569
|
-
}
|
|
8570
|
-
else {
|
|
8571
|
-
// This is a problem. Throw an appropriate error.
|
|
8572
|
-
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
8573
|
-
}
|
|
8574
|
-
}
|
|
8575
|
-
return true; // All good. Nothing to see here.
|
|
8576
|
-
}), operators.catchError(function (error) {
|
|
8577
|
-
// Simply rethrow it.
|
|
8578
|
-
return rxjs.throwError(error);
|
|
8579
|
-
}));
|
|
8580
|
-
};
|
|
8581
|
-
/**
|
|
8582
|
-
* Return tasks for case and event.
|
|
8583
|
-
*/
|
|
8584
|
-
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
8585
|
-
var defaultPayload = {
|
|
8586
|
-
task_required_for_event: false,
|
|
8587
|
-
tasks: []
|
|
8588
|
-
};
|
|
8589
|
-
if (!this.isWAEnabled()) {
|
|
8590
|
-
return rxjs.of(defaultPayload);
|
|
8591
|
-
}
|
|
8592
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
8593
|
-
};
|
|
8594
|
-
/**
|
|
8595
|
-
* Call the API to get a task
|
|
8596
|
-
*/
|
|
8597
|
-
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
8598
|
-
if (!this.isWAEnabled()) {
|
|
8599
|
-
return rxjs.of({ task: null });
|
|
8600
|
-
}
|
|
8601
|
-
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
8602
|
-
};
|
|
8603
|
-
return WorkAllocationService;
|
|
8604
|
-
}());
|
|
8605
|
-
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
8606
|
-
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
8607
|
-
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8608
|
-
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
8609
|
-
(function () {
|
|
8610
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
8611
|
-
type: i0.Injectable
|
|
8612
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
8613
|
-
})();
|
|
8614
|
-
|
|
8615
8399
|
var CasesService = /** @class */ (function () {
|
|
8616
|
-
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper,
|
|
8400
|
+
function CasesService(http, appConfig, orderService, errorService, wizardPageFieldToCaseFieldMapper, loadingService, sessionStorageService) {
|
|
8617
8401
|
this.http = http;
|
|
8618
8402
|
this.appConfig = appConfig;
|
|
8619
8403
|
this.orderService = orderService;
|
|
8620
8404
|
this.errorService = errorService;
|
|
8621
8405
|
this.wizardPageFieldToCaseFieldMapper = wizardPageFieldToCaseFieldMapper;
|
|
8622
|
-
this.workAllocationService = workAllocationService;
|
|
8623
8406
|
this.loadingService = loadingService;
|
|
8624
8407
|
this.sessionStorageService = sessionStorageService;
|
|
8625
8408
|
this.get = this.getCaseView;
|
|
@@ -8638,11 +8421,7 @@
|
|
|
8638
8421
|
};
|
|
8639
8422
|
CasesService.prototype.getCaseView = function (jurisdictionId, caseTypeId, caseId) {
|
|
8640
8423
|
var _this = this;
|
|
8641
|
-
var url = this.appConfig.getApiUrl()
|
|
8642
|
-
+ "/caseworkers/:uid"
|
|
8643
|
-
+ ("/jurisdictions/" + jurisdictionId)
|
|
8644
|
-
+ ("/case-types/" + caseTypeId)
|
|
8645
|
-
+ ("/cases/" + caseId);
|
|
8424
|
+
var url = this.appConfig.getApiUrl() + "/caseworkers/:uid/jurisdictions/" + jurisdictionId + "/case-types/" + caseTypeId + "/cases/" + caseId;
|
|
8646
8425
|
var loadingToken = this.loadingService.register();
|
|
8647
8426
|
return this.http
|
|
8648
8427
|
.get(url)
|
|
@@ -8694,7 +8473,7 @@
|
|
|
8694
8473
|
CasesService.prototype.createEvent = function (caseDetails, eventData) {
|
|
8695
8474
|
var _this = this;
|
|
8696
8475
|
var caseId = caseDetails.case_id;
|
|
8697
|
-
var url = this.appConfig.getCaseDataUrl() +
|
|
8476
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/events";
|
|
8698
8477
|
var headers = new i1$2.HttpHeaders()
|
|
8699
8478
|
.set('experimental', 'true')
|
|
8700
8479
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_EVENT)
|
|
@@ -8708,9 +8487,8 @@
|
|
|
8708
8487
|
};
|
|
8709
8488
|
CasesService.prototype.validateCase = function (ctid, eventData, pageId) {
|
|
8710
8489
|
var _this = this;
|
|
8711
|
-
var pageIdString = pageId ?
|
|
8712
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8713
|
-
+ ("/case-types/" + ctid + "/validate" + pageIdString);
|
|
8490
|
+
var pageIdString = pageId ? "?pageId=" + pageId : '';
|
|
8491
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/validate" + pageIdString;
|
|
8714
8492
|
var headers = new i1$2.HttpHeaders()
|
|
8715
8493
|
.set('experimental', 'true')
|
|
8716
8494
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DATA_VALIDATE)
|
|
@@ -8728,8 +8506,7 @@
|
|
|
8728
8506
|
if (eventData.ignore_warning) {
|
|
8729
8507
|
ignoreWarning = 'true';
|
|
8730
8508
|
}
|
|
8731
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8732
|
-
+ ("/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning);
|
|
8509
|
+
var url = this.appConfig.getCaseDataUrl() + "/case-types/" + ctid + "/cases?ignore-warning=" + ignoreWarning;
|
|
8733
8510
|
var headers = new i1$2.HttpHeaders()
|
|
8734
8511
|
.set('experimental', 'true')
|
|
8735
8512
|
.set('Accept', CasesService.V2_MEDIATYPE_CREATE_CASE)
|
|
@@ -8743,9 +8520,7 @@
|
|
|
8743
8520
|
};
|
|
8744
8521
|
CasesService.prototype.getPrintDocuments = function (caseId) {
|
|
8745
8522
|
var _this = this;
|
|
8746
|
-
var url = this.appConfig.getCaseDataUrl()
|
|
8747
|
-
+ ("/cases/" + caseId)
|
|
8748
|
-
+ "/documents";
|
|
8523
|
+
var url = this.appConfig.getCaseDataUrl() + "/cases/" + caseId + "/documents";
|
|
8749
8524
|
var headers = new i1$2.HttpHeaders()
|
|
8750
8525
|
.set('experimental', 'true')
|
|
8751
8526
|
.set('Accept', CasesService.V2_MEDIATYPE_CASE_DOCUMENTS)
|
|
@@ -8854,12 +8629,12 @@
|
|
|
8854
8629
|
CasesService.V2_MEDIATYPE_CREATE_EVENT = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-event.v2+json;charset=UTF-8';
|
|
8855
8630
|
CasesService.V2_MEDIATYPE_CREATE_CASE = 'application/vnd.uk.gov.hmcts.ccd-data-store-api.create-case.v2+json;charset=UTF-8';
|
|
8856
8631
|
CasesService.PUI_CASE_MANAGER = 'pui-case-manager';
|
|
8857
|
-
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(
|
|
8632
|
+
CasesService.ɵfac = function CasesService_Factory(t) { return new (t || CasesService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(OrderService), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(WizardPageFieldToCaseFieldMapper), i0__namespace.ɵɵinject(LoadingService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
8858
8633
|
CasesService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: CasesService, factory: CasesService.ɵfac });
|
|
8859
8634
|
(function () {
|
|
8860
8635
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CasesService, [{
|
|
8861
8636
|
type: i0.Injectable
|
|
8862
|
-
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type:
|
|
8637
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: OrderService }, { type: HttpErrorService }, { type: WizardPageFieldToCaseFieldMapper }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
8863
8638
|
})();
|
|
8864
8639
|
|
|
8865
8640
|
var EventTriggerService = /** @class */ (function () {
|
|
@@ -9481,7 +9256,7 @@
|
|
|
9481
9256
|
PageValidationService.prototype.isHidden = function (caseField, editForm, path) {
|
|
9482
9257
|
var formFields = editForm.getRawValue();
|
|
9483
9258
|
var condition = ShowCondition.getInstance(caseField.show_condition);
|
|
9484
|
-
if (path && path.indexOf(
|
|
9259
|
+
if (path && path.indexOf("_" + caseField.id + "_") === -1) {
|
|
9485
9260
|
path = "" + path + caseField.id;
|
|
9486
9261
|
}
|
|
9487
9262
|
return !condition.match(formFields.data, path);
|
|
@@ -9513,6 +9288,215 @@
|
|
|
9513
9288
|
}], function () { return [{ type: CaseFieldService }]; }, null);
|
|
9514
9289
|
})();
|
|
9515
9290
|
|
|
9291
|
+
var MULTIPLE_TASKS_FOUND = 'More than one task found!';
|
|
9292
|
+
var WorkAllocationService = /** @class */ (function () {
|
|
9293
|
+
function WorkAllocationService(http, appConfig, errorService, alertService, sessionStorageService) {
|
|
9294
|
+
this.http = http;
|
|
9295
|
+
this.appConfig = appConfig;
|
|
9296
|
+
this.errorService = errorService;
|
|
9297
|
+
this.alertService = alertService;
|
|
9298
|
+
this.sessionStorageService = sessionStorageService;
|
|
9299
|
+
// Check to see if work allocation is enabled
|
|
9300
|
+
}
|
|
9301
|
+
/**
|
|
9302
|
+
* Call the API to get tasks matching the search criteria.
|
|
9303
|
+
* @param searchRequest The search parameters that specify which tasks to match.
|
|
9304
|
+
*/
|
|
9305
|
+
WorkAllocationService.prototype.searchTasks = function (searchRequest) {
|
|
9306
|
+
var _this = this;
|
|
9307
|
+
// Do not need to check if WA enabled as parent method will do that
|
|
9308
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/searchForCompletable";
|
|
9309
|
+
return this.http
|
|
9310
|
+
.post(url, { searchRequest: searchRequest }, null, false)
|
|
9311
|
+
.pipe(operators.map(function (response) { return response; }), operators.catchError(function (error) {
|
|
9312
|
+
_this.errorService.setError(error);
|
|
9313
|
+
// explicitly eat away 401 error and 400 error
|
|
9314
|
+
if (error && error.status && (error.status === 401 || error.status === 400)) {
|
|
9315
|
+
// do nothing
|
|
9316
|
+
console.log('error status 401 or 400', error);
|
|
9317
|
+
}
|
|
9318
|
+
else {
|
|
9319
|
+
return rxjs.throwError(error);
|
|
9320
|
+
}
|
|
9321
|
+
}));
|
|
9322
|
+
};
|
|
9323
|
+
WorkAllocationService.prototype.isWAEnabled = function (jurisdiction, caseType) {
|
|
9324
|
+
this.features = this.appConfig.getWAServiceConfig();
|
|
9325
|
+
var enabled = false;
|
|
9326
|
+
if (!jurisdiction || !caseType) {
|
|
9327
|
+
var caseInfo = JSON.parse(this.sessionStorageService.getItem('caseInfo'));
|
|
9328
|
+
jurisdiction = caseInfo.jurisdiction;
|
|
9329
|
+
caseType = caseInfo.caseType;
|
|
9330
|
+
}
|
|
9331
|
+
if (!this.features || !this.features.configurations) {
|
|
9332
|
+
return false;
|
|
9333
|
+
}
|
|
9334
|
+
this.features.configurations.forEach(function (serviceConfig) {
|
|
9335
|
+
if (serviceConfig.serviceName === jurisdiction && (serviceConfig.caseTypes.indexOf(caseType) !== -1)) {
|
|
9336
|
+
enabled = true;
|
|
9337
|
+
}
|
|
9338
|
+
});
|
|
9339
|
+
return enabled;
|
|
9340
|
+
};
|
|
9341
|
+
/**
|
|
9342
|
+
* Call the API to assign a task.
|
|
9343
|
+
* @param taskId specifies which task should be assigned.
|
|
9344
|
+
* @param userId specifies the user the task should be assigned to.
|
|
9345
|
+
*/
|
|
9346
|
+
WorkAllocationService.prototype.assignTask = function (taskId, userId) {
|
|
9347
|
+
var _this = this;
|
|
9348
|
+
if (!this.isWAEnabled()) {
|
|
9349
|
+
return rxjs.of(null);
|
|
9350
|
+
}
|
|
9351
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/assign";
|
|
9352
|
+
return this.http
|
|
9353
|
+
.post(url, { userId: userId })
|
|
9354
|
+
.pipe(operators.catchError(function (error) {
|
|
9355
|
+
_this.errorService.setError(error);
|
|
9356
|
+
return rxjs.throwError(error);
|
|
9357
|
+
}));
|
|
9358
|
+
};
|
|
9359
|
+
/**
|
|
9360
|
+
* Call the API to complete a task.
|
|
9361
|
+
* @param taskId specifies which task should be completed.
|
|
9362
|
+
*/
|
|
9363
|
+
WorkAllocationService.prototype.completeTask = function (taskId) {
|
|
9364
|
+
var _this = this;
|
|
9365
|
+
if (!this.isWAEnabled()) {
|
|
9366
|
+
return rxjs.of(null);
|
|
9367
|
+
}
|
|
9368
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9369
|
+
return this.http
|
|
9370
|
+
.post(url, {})
|
|
9371
|
+
.pipe(operators.catchError(function (error) {
|
|
9372
|
+
_this.errorService.setError(error);
|
|
9373
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9374
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9375
|
+
_this.handleTaskCompletionError(response);
|
|
9376
|
+
});
|
|
9377
|
+
return rxjs.throwError(error);
|
|
9378
|
+
}));
|
|
9379
|
+
};
|
|
9380
|
+
/**
|
|
9381
|
+
* Call the API to assign and complete a task.
|
|
9382
|
+
* @param taskId specifies which task should be completed.
|
|
9383
|
+
*/
|
|
9384
|
+
WorkAllocationService.prototype.assignAndCompleteTask = function (taskId) {
|
|
9385
|
+
var _this = this;
|
|
9386
|
+
if (!this.isWAEnabled()) {
|
|
9387
|
+
return rxjs.of(null);
|
|
9388
|
+
}
|
|
9389
|
+
var url = this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId + "/complete";
|
|
9390
|
+
return this.http
|
|
9391
|
+
.post(url, {
|
|
9392
|
+
completion_options: {
|
|
9393
|
+
assign_and_complete: true
|
|
9394
|
+
}
|
|
9395
|
+
})
|
|
9396
|
+
.pipe(operators.catchError(function (error) {
|
|
9397
|
+
_this.errorService.setError(error);
|
|
9398
|
+
// this will subscribe to get the user details and decide whether to display an error message
|
|
9399
|
+
_this.http.get(_this.appConfig.getUserInfoApiUrl()).pipe(operators.map(function (response) { return response; })).subscribe(function (response) {
|
|
9400
|
+
_this.handleTaskCompletionError(response);
|
|
9401
|
+
});
|
|
9402
|
+
return rxjs.throwError(error);
|
|
9403
|
+
}));
|
|
9404
|
+
};
|
|
9405
|
+
/**
|
|
9406
|
+
* Handles the response from the observable to get the user details when task is completed.
|
|
9407
|
+
* @param response is the response given from the observable which contains the user detaild.
|
|
9408
|
+
*/
|
|
9409
|
+
WorkAllocationService.prototype.handleTaskCompletionError = function (response) {
|
|
9410
|
+
var userDetails = response;
|
|
9411
|
+
if (this.userIsCaseworker(userDetails.userInfo.roles)) {
|
|
9412
|
+
// when submitting the completion of task if not yet rendered cases/case confirm then preserve the alert for re-rendering
|
|
9413
|
+
this.alertService.setPreserveAlerts(true, ['cases/case', 'submit']);
|
|
9414
|
+
this.alertService.warning('A task could not be completed successfully. Please complete the task associated with the case manually.');
|
|
9415
|
+
}
|
|
9416
|
+
};
|
|
9417
|
+
/**
|
|
9418
|
+
* Returns true if the user's role is equivalent to a caseworker.
|
|
9419
|
+
* @param roles is the list of roles found from the current user.
|
|
9420
|
+
*/
|
|
9421
|
+
WorkAllocationService.prototype.userIsCaseworker = function (roles) {
|
|
9422
|
+
var lowerCaseRoles = roles.map(function (role) { return role.toLowerCase(); });
|
|
9423
|
+
// When/if lib & target permanently change to es2016, replace indexOf with includes
|
|
9424
|
+
return (lowerCaseRoles.indexOf(WorkAllocationService.iACCaseOfficer) !== -1)
|
|
9425
|
+
|| (lowerCaseRoles.indexOf(WorkAllocationService.iACAdmOfficer) !== -1);
|
|
9426
|
+
};
|
|
9427
|
+
/**
|
|
9428
|
+
* Look for open tasks for a case and event combination. There are 5 possible scenarios:
|
|
9429
|
+
* 1. No tasks found => Success.
|
|
9430
|
+
* 2. One task found => Mark as done => Success.
|
|
9431
|
+
* 3. One task found => Mark as done throws error => Failure.
|
|
9432
|
+
* 4. More than one task found => Failure.
|
|
9433
|
+
* 5. Search call throws an error => Failure.
|
|
9434
|
+
* @param ccdId The ID of the case to find tasks for.
|
|
9435
|
+
* @param eventId The ID of the event to find tasks for.
|
|
9436
|
+
*/
|
|
9437
|
+
WorkAllocationService.prototype.completeAppropriateTask = function (ccdId, eventId, jurisdiction, caseTypeId) {
|
|
9438
|
+
var _this = this;
|
|
9439
|
+
if (!this.isWAEnabled(jurisdiction, caseTypeId)) {
|
|
9440
|
+
return rxjs.of(null);
|
|
9441
|
+
}
|
|
9442
|
+
var taskSearchParameter = {
|
|
9443
|
+
ccdId: ccdId,
|
|
9444
|
+
eventId: eventId,
|
|
9445
|
+
jurisdiction: jurisdiction,
|
|
9446
|
+
caseTypeId: caseTypeId
|
|
9447
|
+
};
|
|
9448
|
+
return this.searchTasks(taskSearchParameter)
|
|
9449
|
+
.pipe(operators.map(function (response) {
|
|
9450
|
+
var tasks = response.tasks;
|
|
9451
|
+
if (tasks && tasks.length > 0) {
|
|
9452
|
+
if (tasks.length === 1) {
|
|
9453
|
+
_this.completeTask(tasks[0].id).subscribe();
|
|
9454
|
+
}
|
|
9455
|
+
else {
|
|
9456
|
+
// This is a problem. Throw an appropriate error.
|
|
9457
|
+
throw new Error(MULTIPLE_TASKS_FOUND);
|
|
9458
|
+
}
|
|
9459
|
+
}
|
|
9460
|
+
return true; // All good. Nothing to see here.
|
|
9461
|
+
}), operators.catchError(function (error) {
|
|
9462
|
+
// Simply rethrow it.
|
|
9463
|
+
return rxjs.throwError(error);
|
|
9464
|
+
}));
|
|
9465
|
+
};
|
|
9466
|
+
/**
|
|
9467
|
+
* Return tasks for case and event.
|
|
9468
|
+
*/
|
|
9469
|
+
WorkAllocationService.prototype.getTasksByCaseIdAndEventId = function (eventId, caseId, caseType, jurisdiction) {
|
|
9470
|
+
var defaultPayload = {
|
|
9471
|
+
task_required_for_event: false,
|
|
9472
|
+
tasks: []
|
|
9473
|
+
};
|
|
9474
|
+
if (!this.isWAEnabled()) {
|
|
9475
|
+
return rxjs.of(defaultPayload);
|
|
9476
|
+
}
|
|
9477
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/case/tasks/" + caseId + "/event/" + eventId + "/caseType/" + caseType + "/jurisdiction/" + jurisdiction);
|
|
9478
|
+
};
|
|
9479
|
+
/**
|
|
9480
|
+
* Call the API to get a task
|
|
9481
|
+
*/
|
|
9482
|
+
WorkAllocationService.prototype.getTask = function (taskId) {
|
|
9483
|
+
if (!this.isWAEnabled()) {
|
|
9484
|
+
return rxjs.of({ task: null });
|
|
9485
|
+
}
|
|
9486
|
+
return this.http.get(this.appConfig.getWorkAllocationApiUrl() + "/task/" + taskId);
|
|
9487
|
+
};
|
|
9488
|
+
return WorkAllocationService;
|
|
9489
|
+
}());
|
|
9490
|
+
WorkAllocationService.iACCaseOfficer = 'caseworker-ia-caseofficer';
|
|
9491
|
+
WorkAllocationService.iACAdmOfficer = 'caseworker-ia-admofficer';
|
|
9492
|
+
WorkAllocationService.ɵfac = function WorkAllocationService_Factory(t) { return new (t || WorkAllocationService)(i0__namespace.ɵɵinject(HttpService), i0__namespace.ɵɵinject(AbstractAppConfig), i0__namespace.ɵɵinject(HttpErrorService), i0__namespace.ɵɵinject(AlertService), i0__namespace.ɵɵinject(SessionStorageService)); };
|
|
9493
|
+
WorkAllocationService.ɵprov = i0__namespace.ɵɵdefineInjectable({ token: WorkAllocationService, factory: WorkAllocationService.ɵfac });
|
|
9494
|
+
(function () {
|
|
9495
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WorkAllocationService, [{
|
|
9496
|
+
type: i0.Injectable
|
|
9497
|
+
}], function () { return [{ type: HttpService }, { type: AbstractAppConfig }, { type: HttpErrorService }, { type: AlertService }, { type: SessionStorageService }]; }, null);
|
|
9498
|
+
})();
|
|
9499
|
+
|
|
9516
9500
|
var CaseEditComponent = /** @class */ (function () {
|
|
9517
9501
|
function CaseEditComponent(fb, router, route, fieldsUtils, fieldsPurger, registrarService, wizardFactory, sessionStorageService, windowsService) {
|
|
9518
9502
|
this.fb = fb;
|
|
@@ -10015,14 +9999,14 @@
|
|
|
10015
9999
|
this.title$ = new rxjs.BehaviorSubject(null);
|
|
10016
10000
|
this.formValidationErrors$ = new rxjs.BehaviorSubject([]);
|
|
10017
10001
|
this.editForm$ = new rxjs.BehaviorSubject(null);
|
|
10018
|
-
this.
|
|
10002
|
+
this.isLinkedCasesJourneyAtFinalStep$ = new rxjs.BehaviorSubject(null);
|
|
10019
10003
|
this.eventTriggerName$ = new rxjs.BehaviorSubject(null);
|
|
10020
10004
|
this.triggerSubmitEvent$ = new rxjs.BehaviorSubject(null);
|
|
10021
10005
|
this.caseDetails$ = this.details$.asObservable();
|
|
10022
10006
|
this.caseTitle$ = this.title$.asObservable();
|
|
10023
10007
|
this.caseEditForm$ = this.editForm$.asObservable();
|
|
10024
10008
|
this.caseFormValidationErrors$ = this.formValidationErrors$.asObservable();
|
|
10025
|
-
this.
|
|
10009
|
+
this.caseIsLinkedCasesJourneyAtFinalStep$ = this.isLinkedCasesJourneyAtFinalStep$.asObservable();
|
|
10026
10010
|
this.caseEventTriggerName$ = this.eventTriggerName$.asObservable();
|
|
10027
10011
|
this.caseTriggerSubmitEvent$ = this.triggerSubmitEvent$.asObservable();
|
|
10028
10012
|
}
|
|
@@ -10035,9 +10019,6 @@
|
|
|
10035
10019
|
CaseEditDataService.prototype.setCaseEventTriggerName = function (triggerName) {
|
|
10036
10020
|
this.eventTriggerName$.next(triggerName);
|
|
10037
10021
|
};
|
|
10038
|
-
CaseEditDataService.prototype.setCaseLinkError = function (error) {
|
|
10039
|
-
this.linkError$.next(error);
|
|
10040
|
-
};
|
|
10041
10022
|
CaseEditDataService.prototype.setFormValidationErrors = function (validationErrors) {
|
|
10042
10023
|
this.formValidationErrors$.next(validationErrors);
|
|
10043
10024
|
};
|
|
@@ -10047,8 +10028,8 @@
|
|
|
10047
10028
|
CaseEditDataService.prototype.clearFormValidationErrors = function () {
|
|
10048
10029
|
this.formValidationErrors$.next([]);
|
|
10049
10030
|
};
|
|
10050
|
-
CaseEditDataService.prototype.
|
|
10051
|
-
this.
|
|
10031
|
+
CaseEditDataService.prototype.setLinkedCasesJourneyAtFinalStep = function (isAtFinalStep) {
|
|
10032
|
+
this.isLinkedCasesJourneyAtFinalStep$.next(isAtFinalStep);
|
|
10052
10033
|
};
|
|
10053
10034
|
CaseEditDataService.prototype.addFormValidationError = function (validationError) {
|
|
10054
10035
|
this.formValidationErrors$.next(this.formValidationErrors$.getValue().concat([validationError]));
|
|
@@ -10405,6 +10386,9 @@
|
|
|
10405
10386
|
this.caseEditDataService.caseEditForm$.subscribe({
|
|
10406
10387
|
next: function (editForm) { return _this.editForm = editForm; }
|
|
10407
10388
|
});
|
|
10389
|
+
this.caseEditDataService.caseIsLinkedCasesJourneyAtFinalStep$.subscribe({
|
|
10390
|
+
next: function (isLinkedCasesJourneyAtFinalStep) { return _this.isLinkedCasesJourneyAtFinalStep = isLinkedCasesJourneyAtFinalStep; }
|
|
10391
|
+
});
|
|
10408
10392
|
this.caseEditDataService.caseTriggerSubmitEvent$.subscribe({
|
|
10409
10393
|
next: function (state) {
|
|
10410
10394
|
if (state) {
|
|
@@ -10424,7 +10408,11 @@
|
|
|
10424
10408
|
return this.caseEdit.first();
|
|
10425
10409
|
};
|
|
10426
10410
|
CaseEditPageComponent.prototype.currentPageIsNotValid = function () {
|
|
10427
|
-
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm)
|
|
10411
|
+
return !this.pageValidationService.isPageValid(this.currentPage, this.editForm) ||
|
|
10412
|
+
(this.isLinkedCasesJourney() && !this.isLinkedCasesJourneyAtFinalStep);
|
|
10413
|
+
};
|
|
10414
|
+
CaseEditPageComponent.prototype.isLinkedCasesJourney = function () {
|
|
10415
|
+
return FieldsUtils.containsLinkedCasesCaseField(this.currentPage.case_fields);
|
|
10428
10416
|
};
|
|
10429
10417
|
/**
|
|
10430
10418
|
* caseEventData.event_data contains all the values from the previous pages so we set caseEventData.data = caseEventData.event_data
|
|
@@ -10451,7 +10439,7 @@
|
|
|
10451
10439
|
var label = casefield.label || 'Field';
|
|
10452
10440
|
var id_1 = casefield.id;
|
|
10453
10441
|
if (fieldElement['component'] && fieldElement['component'].parent) {
|
|
10454
|
-
if (fieldElement['component'].idPrefix.indexOf(
|
|
10442
|
+
if (fieldElement['component'].idPrefix.indexOf("_" + id_1 + "_") === -1) {
|
|
10455
10443
|
id_1 = "" + fieldElement['component'].idPrefix + id_1;
|
|
10456
10444
|
}
|
|
10457
10445
|
else {
|
|
@@ -10524,7 +10512,16 @@
|
|
|
10524
10512
|
var _this = this;
|
|
10525
10513
|
this.caseEditDataService.clearFormValidationErrors();
|
|
10526
10514
|
if (this.currentPageIsNotValid()) {
|
|
10527
|
-
|
|
10515
|
+
// The generateErrorMessage method filters out the hidden fields.
|
|
10516
|
+
// The error message for LinkedCases journey will never get displayed because the
|
|
10517
|
+
// LinkedCases is configured with ComponentLauncher field as visible and caseLinks field as hidden.
|
|
10518
|
+
if (this.isLinkedCasesJourney()) {
|
|
10519
|
+
this.validationErrors.push({ id: 'next-button', message: 'Please select Next to go to the next page' });
|
|
10520
|
+
CaseEditPageComponent.scrollToTop();
|
|
10521
|
+
}
|
|
10522
|
+
else {
|
|
10523
|
+
this.generateErrorMessage(this.currentPage.case_fields);
|
|
10524
|
+
}
|
|
10528
10525
|
}
|
|
10529
10526
|
if (!this.isSubmitting && !this.currentPageIsNotValid()) {
|
|
10530
10527
|
this.isSubmitting = true;
|
|
@@ -10592,8 +10589,8 @@
|
|
|
10592
10589
|
}
|
|
10593
10590
|
};
|
|
10594
10591
|
CaseEditPageComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
10595
|
-
this.ignoreWarning = errorContext.
|
|
10596
|
-
this.triggerText = errorContext.
|
|
10592
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
10593
|
+
this.triggerText = errorContext.triggerText;
|
|
10597
10594
|
};
|
|
10598
10595
|
CaseEditPageComponent.prototype.next = function () {
|
|
10599
10596
|
this.resetErrors();
|
|
@@ -10939,12 +10936,12 @@
|
|
|
10939
10936
|
CallbackErrorsComponent.prototype.buildCallbackErrorsContext = function () {
|
|
10940
10937
|
var errorContext = new CallbackErrorsContext();
|
|
10941
10938
|
if (this.hasWarnings() && !this.hasErrors() && !this.hasInvalidData()) {
|
|
10942
|
-
errorContext.
|
|
10943
|
-
errorContext.
|
|
10939
|
+
errorContext.ignoreWarning = true;
|
|
10940
|
+
errorContext.triggerText = this.triggerTextIgnore;
|
|
10944
10941
|
}
|
|
10945
10942
|
else {
|
|
10946
|
-
errorContext.
|
|
10947
|
-
errorContext.
|
|
10943
|
+
errorContext.ignoreWarning = false;
|
|
10944
|
+
errorContext.triggerText = this.triggerTextContinue;
|
|
10948
10945
|
}
|
|
10949
10946
|
return errorContext;
|
|
10950
10947
|
};
|
|
@@ -10989,7 +10986,7 @@
|
|
|
10989
10986
|
|
|
10990
10987
|
var AddressOption = /** @class */ (function () {
|
|
10991
10988
|
function AddressOption(addressModel, description) {
|
|
10992
|
-
if (description
|
|
10989
|
+
if (description === null) {
|
|
10993
10990
|
this.value = addressModel;
|
|
10994
10991
|
this.description = this.getDescription();
|
|
10995
10992
|
}
|
|
@@ -10998,13 +10995,10 @@
|
|
|
10998
10995
|
}
|
|
10999
10996
|
}
|
|
11000
10997
|
AddressOption.prototype.getDescription = function () {
|
|
11001
|
-
return this.removeInitialCommaIfPresent((this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1)
|
|
11002
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine2)
|
|
11003
|
-
+ this.prefixWithCommaIfPresent(this.value.AddressLine3)
|
|
11004
|
-
+ ', ' + this.value.PostTown);
|
|
10998
|
+
return this.removeInitialCommaIfPresent("" + (this.value.AddressLine1 === undefined ? '' : this.value.AddressLine1) + this.prefixWithCommaIfPresent(this.value.AddressLine2) + this.prefixWithCommaIfPresent(this.value.AddressLine3) + ", " + this.value.PostTown);
|
|
11005
10999
|
};
|
|
11006
11000
|
AddressOption.prototype.prefixWithCommaIfPresent = function (value) {
|
|
11007
|
-
return value ?
|
|
11001
|
+
return value ? ", " + value : value;
|
|
11008
11002
|
};
|
|
11009
11003
|
AddressOption.prototype.removeInitialCommaIfPresent = function (value) {
|
|
11010
11004
|
return value.replace(new RegExp('^,', 'gi'), '');
|
|
@@ -11012,7 +11006,7 @@
|
|
|
11012
11006
|
return AddressOption;
|
|
11013
11007
|
}());
|
|
11014
11008
|
|
|
11015
|
-
var _c0$
|
|
11009
|
+
var _c0$S = ["writeComplexFieldComponent"];
|
|
11016
11010
|
function WriteAddressFieldComponent_div_1_div_4_span_4_Template(rf, ctx) {
|
|
11017
11011
|
if (rf & 1) {
|
|
11018
11012
|
i0__namespace.ɵɵelementStart(0, "span", 14);
|
|
@@ -11148,7 +11142,7 @@
|
|
|
11148
11142
|
this.missingPostcode = false;
|
|
11149
11143
|
var postcode_1 = this.postcode.value;
|
|
11150
11144
|
this.caseField.value = null;
|
|
11151
|
-
this.addressOptions =
|
|
11145
|
+
this.addressOptions = [];
|
|
11152
11146
|
this.addressesService.getAddressesForPostcode(postcode_1.replace(' ', '').toUpperCase()).subscribe(function (result) {
|
|
11153
11147
|
result.forEach(function (address) {
|
|
11154
11148
|
_this.addressOptions.push(new AddressOption(address, null));
|
|
@@ -11191,7 +11185,7 @@
|
|
|
11191
11185
|
var hasAddress = false;
|
|
11192
11186
|
if (address) {
|
|
11193
11187
|
Object.keys(address).forEach(function (key) {
|
|
11194
|
-
if (address[key]
|
|
11188
|
+
if (address[key] !== null) {
|
|
11195
11189
|
hasAddress = true;
|
|
11196
11190
|
}
|
|
11197
11191
|
});
|
|
@@ -11214,7 +11208,7 @@
|
|
|
11214
11208
|
};
|
|
11215
11209
|
WriteAddressFieldComponent.prototype.defaultLabel = function (numberOfAddresses) {
|
|
11216
11210
|
return numberOfAddresses === 0 ? 'No address found'
|
|
11217
|
-
: numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') +
|
|
11211
|
+
: "" + numberOfAddresses + (numberOfAddresses === 1 ? ' address ' : ' addresses ') + "found";
|
|
11218
11212
|
};
|
|
11219
11213
|
WriteAddressFieldComponent.prototype.setFormValue = function () {
|
|
11220
11214
|
if (this.writeComplexFieldComponent.complexGroup) {
|
|
@@ -11226,7 +11220,7 @@
|
|
|
11226
11220
|
WriteAddressFieldComponent.ɵfac = function WriteAddressFieldComponent_Factory(t) { return new (t || WriteAddressFieldComponent)(i0__namespace.ɵɵdirectiveInject(AddressesService), i0__namespace.ɵɵdirectiveInject(IsCompoundPipe)); };
|
|
11227
11221
|
WriteAddressFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteAddressFieldComponent, selectors: [["ccd-write-address-field"]], viewQuery: function WriteAddressFieldComponent_Query(rf, ctx) {
|
|
11228
11222
|
if (rf & 1) {
|
|
11229
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
11223
|
+
i0__namespace.ɵɵviewQuery(_c0$S, 1);
|
|
11230
11224
|
i0__namespace.ɵɵviewQuery(FocusElementDirective, 1);
|
|
11231
11225
|
}
|
|
11232
11226
|
if (rf & 2) {
|
|
@@ -11372,12 +11366,13 @@
|
|
|
11372
11366
|
}
|
|
11373
11367
|
}
|
|
11374
11368
|
var CaseFileViewFieldComponent = /** @class */ (function () {
|
|
11375
|
-
function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService) {
|
|
11369
|
+
function CaseFileViewFieldComponent(elementRef, route, caseFileViewService, documentManagementService, loadingService, sessionStorageService) {
|
|
11376
11370
|
this.elementRef = elementRef;
|
|
11377
11371
|
this.route = route;
|
|
11378
11372
|
this.caseFileViewService = caseFileViewService;
|
|
11379
11373
|
this.documentManagementService = documentManagementService;
|
|
11380
11374
|
this.loadingService = loadingService;
|
|
11375
|
+
this.sessionStorageService = sessionStorageService;
|
|
11381
11376
|
this.allowMoving = true;
|
|
11382
11377
|
this.getCategoriesAndDocumentsError = false;
|
|
11383
11378
|
}
|
|
@@ -11391,6 +11386,12 @@
|
|
|
11391
11386
|
},
|
|
11392
11387
|
error: function (_) { return _this.getCategoriesAndDocumentsError = true; }
|
|
11393
11388
|
});
|
|
11389
|
+
// EXUI-8000
|
|
11390
|
+
var userInfo = JSON.parse(this.sessionStorageService.getItem('userDetails'));
|
|
11391
|
+
// Get acls that intersects from acl roles and user roles
|
|
11392
|
+
var acls = this.caseField.acls.filter(function (acl) { return userInfo.roles.includes(acl.role); });
|
|
11393
|
+
// As there can be more than one intersecting role, if any acls are update: true
|
|
11394
|
+
this.allowMoving = acls.some(function (acl) { return acl.update; });
|
|
11394
11395
|
};
|
|
11395
11396
|
CaseFileViewFieldComponent.prototype.ngAfterViewInit = function () {
|
|
11396
11397
|
var slider = this.elementRef.nativeElement.querySelector('.slider');
|
|
@@ -11438,7 +11439,7 @@
|
|
|
11438
11439
|
return CaseFileViewFieldComponent;
|
|
11439
11440
|
}());
|
|
11440
11441
|
CaseFileViewFieldComponent.PARAM_CASE_ID = 'cid';
|
|
11441
|
-
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService)); };
|
|
11442
|
+
CaseFileViewFieldComponent.ɵfac = function CaseFileViewFieldComponent_Factory(t) { return new (t || CaseFileViewFieldComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i1__namespace$1.ActivatedRoute), i0__namespace.ɵɵdirectiveInject(CaseFileViewService), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(LoadingService), i0__namespace.ɵɵdirectiveInject(SessionStorageService)); };
|
|
11442
11443
|
CaseFileViewFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldComponent, selectors: [["ccd-case-file-view-field"]], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldComponent_Template(rf, ctx) {
|
|
11443
11444
|
if (rf & 1) {
|
|
11444
11445
|
i0__namespace.ɵɵtemplate(0, CaseFileViewFieldComponent_div_0_Template, 5, 0, "div", 0);
|
|
@@ -11458,92 +11459,7 @@
|
|
|
11458
11459
|
templateUrl: './case-file-view-field.component.html',
|
|
11459
11460
|
styleUrls: ['./case-file-view-field.component.scss'],
|
|
11460
11461
|
}]
|
|
11461
|
-
}], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }]; }, null);
|
|
11462
|
-
})();
|
|
11463
|
-
|
|
11464
|
-
function CaseFileViewFieldReadComponent_div_0_Template(rf, ctx) {
|
|
11465
|
-
if (rf & 1) {
|
|
11466
|
-
i0__namespace.ɵɵelementStart(0, "div", 2);
|
|
11467
|
-
i0__namespace.ɵɵelementStart(1, "h1", 3);
|
|
11468
|
-
i0__namespace.ɵɵtext(2, "Sorry, there is a problem with the service");
|
|
11469
|
-
i0__namespace.ɵɵelementEnd();
|
|
11470
|
-
i0__namespace.ɵɵelementStart(3, "p", 4);
|
|
11471
|
-
i0__namespace.ɵɵtext(4, "Try again later.");
|
|
11472
|
-
i0__namespace.ɵɵelementEnd();
|
|
11473
|
-
i0__namespace.ɵɵelementEnd();
|
|
11474
|
-
}
|
|
11475
|
-
}
|
|
11476
|
-
function CaseFileViewFieldReadComponent_div_1_ng_container_8_Template(rf, ctx) {
|
|
11477
|
-
if (rf & 1) {
|
|
11478
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
11479
|
-
i0__namespace.ɵɵelement(1, "mv-media-viewer", 11);
|
|
11480
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
11481
|
-
}
|
|
11482
|
-
if (rf & 2) {
|
|
11483
|
-
var ctx_r2 = i0__namespace.ɵɵnextContext(2);
|
|
11484
|
-
i0__namespace.ɵɵadvance(1);
|
|
11485
|
-
i0__namespace.ɵɵproperty("url", ctx_r2.currentDocument.document_binary_url)("downloadFileName", ctx_r2.currentDocument.document_filename)("showToolbar", true)("contentType", ctx_r2.currentDocument.content_type)("enableAnnotations", true)("enableRedactions", true)("height", "94.5vh");
|
|
11486
|
-
}
|
|
11487
|
-
}
|
|
11488
|
-
function CaseFileViewFieldReadComponent_div_1_Template(rf, ctx) {
|
|
11489
|
-
if (rf & 1) {
|
|
11490
|
-
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
11491
|
-
i0__namespace.ɵɵelementStart(0, "div");
|
|
11492
|
-
i0__namespace.ɵɵelementStart(1, "h2", 5);
|
|
11493
|
-
i0__namespace.ɵɵtext(2, "Case file");
|
|
11494
|
-
i0__namespace.ɵɵelementEnd();
|
|
11495
|
-
i0__namespace.ɵɵelementStart(3, "div", 6);
|
|
11496
|
-
i0__namespace.ɵɵelementStart(4, "div", 7);
|
|
11497
|
-
i0__namespace.ɵɵelementStart(5, "ccd-case-file-view-folder", 8);
|
|
11498
|
-
i0__namespace.ɵɵlistener("clickedDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_clickedDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r3 = i0__namespace.ɵɵnextContext(); return ctx_r3.setMediaViewerFile($event); })("moveDocument", function CaseFileViewFieldReadComponent_div_1_Template_ccd_case_file_view_folder_moveDocument_5_listener($event) { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.moveDocument($event); });
|
|
11499
|
-
i0__namespace.ɵɵelementEnd();
|
|
11500
|
-
i0__namespace.ɵɵelementEnd();
|
|
11501
|
-
i0__namespace.ɵɵelement(6, "div", 9);
|
|
11502
|
-
i0__namespace.ɵɵelementStart(7, "div", 10);
|
|
11503
|
-
i0__namespace.ɵɵtemplate(8, CaseFileViewFieldReadComponent_div_1_ng_container_8_Template, 2, 7, "ng-container", 1);
|
|
11504
|
-
i0__namespace.ɵɵelementEnd();
|
|
11505
|
-
i0__namespace.ɵɵelementEnd();
|
|
11506
|
-
i0__namespace.ɵɵelementEnd();
|
|
11507
|
-
}
|
|
11508
|
-
if (rf & 2) {
|
|
11509
|
-
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
11510
|
-
i0__namespace.ɵɵadvance(5);
|
|
11511
|
-
i0__namespace.ɵɵproperty("categoriesAndDocuments", ctx_r1.categoriesAndDocuments$)("allowMoving", ctx_r1.allowMoving);
|
|
11512
|
-
i0__namespace.ɵɵadvance(3);
|
|
11513
|
-
i0__namespace.ɵɵproperty("ngIf", ctx_r1.currentDocument);
|
|
11514
|
-
}
|
|
11515
|
-
}
|
|
11516
|
-
var CaseFileViewFieldReadComponent = /** @class */ (function (_super) {
|
|
11517
|
-
__extends(CaseFileViewFieldReadComponent, _super);
|
|
11518
|
-
function CaseFileViewFieldReadComponent() {
|
|
11519
|
-
var _this = _super.apply(this, __spread(arguments)) || this;
|
|
11520
|
-
_this.allowMoving = false;
|
|
11521
|
-
return _this;
|
|
11522
|
-
}
|
|
11523
|
-
return CaseFileViewFieldReadComponent;
|
|
11524
|
-
}(CaseFileViewFieldComponent));
|
|
11525
|
-
CaseFileViewFieldReadComponent.ɵfac = function CaseFileViewFieldReadComponent_Factory(t) { return ɵCaseFileViewFieldReadComponent_BaseFactory(t || CaseFileViewFieldReadComponent); };
|
|
11526
|
-
CaseFileViewFieldReadComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: CaseFileViewFieldReadComponent, selectors: [["ccd-case-file-view-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 2, vars: 2, consts: [["class", "govuk-grid-column-two-thirds", 4, "ngIf"], [4, "ngIf"], [1, "govuk-grid-column-two-thirds"], [1, "govuk-heading-xl"], [1, "govuk-body"], [1, "govuk-heading-l"], ["id", "case-file-view", 1, "govuk-form-group"], [1, "document-tree-container"], [1, "document-tree-container__tree", 3, "categoriesAndDocuments", "allowMoving", "clickedDocument", "moveDocument"], [1, "slider"], [1, "media-viewer-container"], [3, "url", "downloadFileName", "showToolbar", "contentType", "enableAnnotations", "enableRedactions", "height"]], template: function CaseFileViewFieldReadComponent_Template(rf, ctx) {
|
|
11527
|
-
if (rf & 1) {
|
|
11528
|
-
i0__namespace.ɵɵtemplate(0, CaseFileViewFieldReadComponent_div_0_Template, 5, 0, "div", 0);
|
|
11529
|
-
i0__namespace.ɵɵtemplate(1, CaseFileViewFieldReadComponent_div_1_Template, 9, 3, "div", 1);
|
|
11530
|
-
}
|
|
11531
|
-
if (rf & 2) {
|
|
11532
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.getCategoriesAndDocumentsError);
|
|
11533
|
-
i0__namespace.ɵɵadvance(1);
|
|
11534
|
-
i0__namespace.ɵɵproperty("ngIf", !ctx.getCategoriesAndDocumentsError);
|
|
11535
|
-
}
|
|
11536
|
-
}, styles: ["#case-file-view[_ngcontent-%COMP%]{display:flex;border:2px solid #c9c9c9;height:100vh;position:relative}#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%]{background-color:#dee0e2;flex:1 1 0;overflow:hidden}"] });
|
|
11537
|
-
var ɵCaseFileViewFieldReadComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(CaseFileViewFieldReadComponent);
|
|
11538
|
-
(function () {
|
|
11539
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFieldReadComponent, [{
|
|
11540
|
-
type: i0.Component,
|
|
11541
|
-
args: [{
|
|
11542
|
-
selector: 'ccd-case-file-view-field',
|
|
11543
|
-
templateUrl: './case-file-view-field.component.html',
|
|
11544
|
-
styleUrls: ['./case-file-view-field.component.scss'],
|
|
11545
|
-
}]
|
|
11546
|
-
}], null, null);
|
|
11462
|
+
}], function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$1.ActivatedRoute }, { type: CaseFileViewService }, { type: DocumentManagementService }, { type: LoadingService }, { type: SessionStorageService }]; }, null);
|
|
11547
11463
|
})();
|
|
11548
11464
|
|
|
11549
11465
|
exports.AddCommentsErrorMessage = void 0;
|
|
@@ -11898,7 +11814,7 @@
|
|
|
11898
11814
|
i0__namespace.ɵɵproperty("formGroup", ctx_r10.caseFlagParentFormGroup)("optional", ctx_r10.flagCommentsOptional);
|
|
11899
11815
|
}
|
|
11900
11816
|
}
|
|
11901
|
-
var _c0$
|
|
11817
|
+
var _c0$R = function (a0) { return { "form-group-error": a0 }; };
|
|
11902
11818
|
function WriteCaseFlagFieldComponent_div_1_Template(rf, ctx) {
|
|
11903
11819
|
if (rf & 1) {
|
|
11904
11820
|
i0__namespace.ɵɵelementStart(0, "div", 8);
|
|
@@ -11919,7 +11835,7 @@
|
|
|
11919
11835
|
i0__namespace.ɵɵadvance(1);
|
|
11920
11836
|
i0__namespace.ɵɵproperty("ngSwitch", ctx_r1.fieldState);
|
|
11921
11837
|
i0__namespace.ɵɵadvance(1);
|
|
11922
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$
|
|
11838
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(8, _c0$R, ctx_r1.errorMessages.length > 0));
|
|
11923
11839
|
i0__namespace.ɵɵadvance(1);
|
|
11924
11840
|
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.createFlagCaption, " ");
|
|
11925
11841
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -12395,7 +12311,7 @@
|
|
|
12395
12311
|
}], null, null);
|
|
12396
12312
|
})();
|
|
12397
12313
|
|
|
12398
|
-
var _c0$
|
|
12314
|
+
var _c0$Q = ["writeComplexFieldComponent"];
|
|
12399
12315
|
function WriteCaseLinkFieldComponent_span_2_Template(rf, ctx) {
|
|
12400
12316
|
if (rf & 1) {
|
|
12401
12317
|
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
@@ -12500,7 +12416,7 @@
|
|
|
12500
12416
|
WriteCaseLinkFieldComponent.ɵfac = function WriteCaseLinkFieldComponent_Factory(t) { return ɵWriteCaseLinkFieldComponent_BaseFactory(t || WriteCaseLinkFieldComponent); };
|
|
12501
12417
|
WriteCaseLinkFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCaseLinkFieldComponent, selectors: [["ccd-write-case-link-field"]], viewQuery: function WriteCaseLinkFieldComponent_Query(rf, ctx) {
|
|
12502
12418
|
if (rf & 1) {
|
|
12503
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
12419
|
+
i0__namespace.ɵɵviewQuery(_c0$Q, 1);
|
|
12504
12420
|
}
|
|
12505
12421
|
if (rf & 2) {
|
|
12506
12422
|
var _t = void 0;
|
|
@@ -12545,7 +12461,7 @@
|
|
|
12545
12461
|
}] });
|
|
12546
12462
|
})();
|
|
12547
12463
|
|
|
12548
|
-
var _c0$
|
|
12464
|
+
var _c0$P = function (a0, a1, a2, a3, a4, a5) { return { id: a0, label: a1, field_type: a2, display_context_parameter: a3, value: a4, hidden: a5 }; };
|
|
12549
12465
|
function ReadCollectionFieldComponent_table_0_tbody_2_Template(rf, ctx) {
|
|
12550
12466
|
if (rf & 1) {
|
|
12551
12467
|
i0__namespace.ɵɵelementStart(0, "tbody");
|
|
@@ -12560,7 +12476,7 @@
|
|
|
12560
12476
|
if (rf & 2) {
|
|
12561
12477
|
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
12562
12478
|
i0__namespace.ɵɵadvance(4);
|
|
12563
|
-
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$
|
|
12479
|
+
i0__namespace.ɵɵproperty("caseField", i0__namespace.ɵɵpureFunction6(3, _c0$P, 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);
|
|
12564
12480
|
}
|
|
12565
12481
|
}
|
|
12566
12482
|
var _c1$k = function (a0, a1, a2, a3, a4) { return { id: a0, label: a1, field_type: a2, value: a3, hidden: a4 }; };
|
|
@@ -12711,7 +12627,7 @@
|
|
|
12711
12627
|
}], function () { return [{ type: i1__namespace$3.MatDialogRef }]; }, null);
|
|
12712
12628
|
})();
|
|
12713
12629
|
|
|
12714
|
-
var _c0$
|
|
12630
|
+
var _c0$O = ["collectionItem"];
|
|
12715
12631
|
function WriteCollectionFieldComponent_h2_7_span_1_Template(rf, ctx) {
|
|
12716
12632
|
if (rf & 1) {
|
|
12717
12633
|
i0__namespace.ɵɵelementStart(0, "span", 9);
|
|
@@ -12850,7 +12766,7 @@
|
|
|
12850
12766
|
}
|
|
12851
12767
|
};
|
|
12852
12768
|
WriteCollectionFieldComponent.prototype.buildCaseField = function (item, index, isNew) {
|
|
12853
|
-
var e_1,
|
|
12769
|
+
var e_1, _c;
|
|
12854
12770
|
if (isNew === void 0) { isNew = false; }
|
|
12855
12771
|
/**
|
|
12856
12772
|
* What follow is code that makes me want to go jump in the shower!
|
|
@@ -12886,8 +12802,8 @@
|
|
|
12886
12802
|
if (!value) {
|
|
12887
12803
|
value = new i2.FormGroup({});
|
|
12888
12804
|
try {
|
|
12889
|
-
for (var
|
|
12890
|
-
var key =
|
|
12805
|
+
for (var _d = __values(Object.keys(group.controls)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
12806
|
+
var key = _e.value;
|
|
12891
12807
|
value.addControl(key, group.get(key));
|
|
12892
12808
|
// DON'T remove the control for this key from the outer group or it
|
|
12893
12809
|
// goes awry. So DON'T uncomment the below line!
|
|
@@ -12897,7 +12813,7 @@
|
|
|
12897
12813
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
12898
12814
|
finally {
|
|
12899
12815
|
try {
|
|
12900
|
-
if (
|
|
12816
|
+
if (_e && !_e.done && (_c = _d.return)) _c.call(_d);
|
|
12901
12817
|
}
|
|
12902
12818
|
finally { if (e_1) throw e_1.error; }
|
|
12903
12819
|
}
|
|
@@ -12953,6 +12869,11 @@
|
|
|
12953
12869
|
// Manually resetting errors is required to prevent `ExpressionChangedAfterItHasBeenCheckedError`
|
|
12954
12870
|
this.formArray.setErrors(null);
|
|
12955
12871
|
var item = { value: null };
|
|
12872
|
+
if (this.isCollectionDynamic()) {
|
|
12873
|
+
item = Object.assign({}, this.caseField.value[this.caseField.value.length - 1]);
|
|
12874
|
+
var key = Number(item['id'][item['id'].length - 1]) + 1;
|
|
12875
|
+
item.id = item['id'].replace(/.$/, key.toString());
|
|
12876
|
+
}
|
|
12956
12877
|
this.caseField.value.push(item);
|
|
12957
12878
|
var index = this.caseField.value.length - 1;
|
|
12958
12879
|
var caseField = this.buildCaseField(item, index, true);
|
|
@@ -12975,6 +12896,12 @@
|
|
|
12975
12896
|
setTimeout(function () { return _this.focusLastItem(); });
|
|
12976
12897
|
}
|
|
12977
12898
|
};
|
|
12899
|
+
WriteCollectionFieldComponent.prototype.isCollectionDynamic = function () {
|
|
12900
|
+
if (!this.caseField.field_type || !this.caseField.field_type.collection_field_type) {
|
|
12901
|
+
return false;
|
|
12902
|
+
}
|
|
12903
|
+
return this.caseField.field_type.collection_field_type.id === 'DynamicRadioList';
|
|
12904
|
+
};
|
|
12978
12905
|
WriteCollectionFieldComponent.prototype.newCaseField = function (id, item, index, isNew) {
|
|
12979
12906
|
if (isNew === void 0) { isNew = false; }
|
|
12980
12907
|
var isNotAuthorisedToUpdate = !isNew && this.isNotAuthorisedToUpdate(index);
|
|
@@ -13017,6 +12944,7 @@
|
|
|
13017
12944
|
this.formArray.removeAt(index);
|
|
13018
12945
|
};
|
|
13019
12946
|
WriteCollectionFieldComponent.prototype.resetIds = function (index) {
|
|
12947
|
+
var _a, _b;
|
|
13020
12948
|
for (var i = index; i < this.collItems.length; i++) {
|
|
13021
12949
|
var counter = i + 1;
|
|
13022
12950
|
if (this.collItems[i].index && this.collItems[i].index === counter) {
|
|
@@ -13026,16 +12954,15 @@
|
|
|
13026
12954
|
&& this.collItems[i].caseField.id === counter.toString()) {
|
|
13027
12955
|
this.collItems[i].caseField.id = i.toString();
|
|
13028
12956
|
}
|
|
13029
|
-
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace(
|
|
13030
|
-
var idPrefix1Current = idPrefix1.replace(
|
|
12957
|
+
var idPrefix1 = this.collItems[i].prefix ? this.collItems[i].prefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12958
|
+
var idPrefix1Current = idPrefix1.replace("_" + i.toString(), "_" + counter.toString());
|
|
13031
12959
|
if (this.collItems[i].prefix && this.collItems[i].prefix === idPrefix1Current) {
|
|
13032
12960
|
this.collItems[i].prefix = idPrefix1;
|
|
13033
12961
|
}
|
|
13034
|
-
var idPrefixAvailable = this.collItems[i].container
|
|
13035
|
-
&& this.collItems[i].container['component'].idPrefix ? true : false;
|
|
12962
|
+
var idPrefixAvailable = !!((_b = (_a = this.collItems[i].container) === null || _a === void 0 ? void 0 : _a['component']) === null || _b === void 0 ? void 0 : _b.idPrefix);
|
|
13036
12963
|
var idPrefix2 = idPrefixAvailable ?
|
|
13037
|
-
this.collItems[i].container['component'].idPrefix.replace(
|
|
13038
|
-
var idPrefix2current = idPrefix2.replace(
|
|
12964
|
+
this.collItems[i].container['component'].idPrefix.replace("_" + counter.toString(), "_" + i.toString()) : '';
|
|
12965
|
+
var idPrefix2current = idPrefix2.replace("_" + i.toString(), "_" + counter.toString());
|
|
13039
12966
|
if (idPrefixAvailable && this.collItems[i].container['component'].idPrefix === idPrefix2current) {
|
|
13040
12967
|
this.collItems[i].container['component'].idPrefix = idPrefix2;
|
|
13041
12968
|
}
|
|
@@ -13124,7 +13051,7 @@
|
|
|
13124
13051
|
WriteCollectionFieldComponent.ɵfac = function WriteCollectionFieldComponent_Factory(t) { return new (t || WriteCollectionFieldComponent)(i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(i2__namespace$1.ScrollToService), i0__namespace.ɵɵdirectiveInject(ProfileNotifier)); };
|
|
13125
13052
|
WriteCollectionFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteCollectionFieldComponent, selectors: [["ccd-write-collection-field"]], viewQuery: function WriteCollectionFieldComponent_Query(rf, ctx) {
|
|
13126
13053
|
if (rf & 1) {
|
|
13127
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
13054
|
+
i0__namespace.ɵɵviewQuery(_c0$O, 1);
|
|
13128
13055
|
}
|
|
13129
13056
|
if (rf & 2) {
|
|
13130
13057
|
var _t = void 0;
|
|
@@ -13818,7 +13745,7 @@
|
|
|
13818
13745
|
}], null, null);
|
|
13819
13746
|
})();
|
|
13820
13747
|
|
|
13821
|
-
var _c0$
|
|
13748
|
+
var _c0$N = ["fileInput"];
|
|
13822
13749
|
function WriteDocumentFieldComponent_span_6_Template(rf, ctx) {
|
|
13823
13750
|
if (rf & 1) {
|
|
13824
13751
|
i0__namespace.ɵɵelementStart(0, "span", 12);
|
|
@@ -14112,7 +14039,7 @@
|
|
|
14112
14039
|
WriteDocumentFieldComponent.ɵfac = function WriteDocumentFieldComponent_Factory(t) { return new (t || WriteDocumentFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CaseNotifier), i0__namespace.ɵɵdirectiveInject(DocumentManagementService), i0__namespace.ɵɵdirectiveInject(i1__namespace$3.MatDialog), i0__namespace.ɵɵdirectiveInject(FileUploadStateService)); };
|
|
14113
14040
|
WriteDocumentFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDocumentFieldComponent, selectors: [["ccd-write-document-field"]], viewQuery: function WriteDocumentFieldComponent_Query(rf, ctx) {
|
|
14114
14041
|
if (rf & 1) {
|
|
14115
|
-
i0__namespace.ɵɵviewQuery(_c0$
|
|
14042
|
+
i0__namespace.ɵɵviewQuery(_c0$N, 1);
|
|
14116
14043
|
}
|
|
14117
14044
|
if (rf & 2) {
|
|
14118
14045
|
var _t = void 0;
|
|
@@ -14312,7 +14239,7 @@
|
|
|
14312
14239
|
i0__namespace.ɵɵtextInterpolate(type_r5.label);
|
|
14313
14240
|
}
|
|
14314
14241
|
}
|
|
14315
|
-
var _c0$
|
|
14242
|
+
var _c0$M = function (a0) { return { "form-group-error": a0 }; };
|
|
14316
14243
|
var WriteDynamicListFieldComponent = /** @class */ (function (_super) {
|
|
14317
14244
|
__extends(WriteDynamicListFieldComponent, _super);
|
|
14318
14245
|
function WriteDynamicListFieldComponent() {
|
|
@@ -14361,7 +14288,7 @@
|
|
|
14361
14288
|
i0__namespace.ɵɵelementEnd();
|
|
14362
14289
|
}
|
|
14363
14290
|
if (rf & 2) {
|
|
14364
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$
|
|
14291
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(10, _c0$M, !ctx.dynamicListFormControl.valid && (ctx.dynamicListFormControl.dirty || ctx.dynamicListFormControl.touched)));
|
|
14365
14292
|
i0__namespace.ɵɵadvance(1);
|
|
14366
14293
|
i0__namespace.ɵɵproperty("for", ctx.id());
|
|
14367
14294
|
i0__namespace.ɵɵadvance(1);
|
|
@@ -14391,6 +14318,257 @@
|
|
|
14391
14318
|
}], null, null);
|
|
14392
14319
|
})();
|
|
14393
14320
|
|
|
14321
|
+
var FixedListPipe = /** @class */ (function () {
|
|
14322
|
+
function FixedListPipe() {
|
|
14323
|
+
}
|
|
14324
|
+
FixedListPipe.prototype.transform = function (value, items) {
|
|
14325
|
+
if (!!items) {
|
|
14326
|
+
var item = items.find(function (i) { return i.code === value; });
|
|
14327
|
+
return item ? item.label : FixedListPipe.EMPTY;
|
|
14328
|
+
}
|
|
14329
|
+
else {
|
|
14330
|
+
return FixedListPipe.EMPTY;
|
|
14331
|
+
}
|
|
14332
|
+
};
|
|
14333
|
+
return FixedListPipe;
|
|
14334
|
+
}());
|
|
14335
|
+
FixedListPipe.EMPTY = '';
|
|
14336
|
+
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14337
|
+
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14338
|
+
(function () {
|
|
14339
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14340
|
+
type: i0.Pipe,
|
|
14341
|
+
args: [{
|
|
14342
|
+
name: 'ccdFixedList'
|
|
14343
|
+
}]
|
|
14344
|
+
}], null, null);
|
|
14345
|
+
})();
|
|
14346
|
+
|
|
14347
|
+
function ReadDynamicMultiSelectListFieldComponent_div_0_Template(rf, ctx) {
|
|
14348
|
+
if (rf & 1) {
|
|
14349
|
+
i0__namespace.ɵɵelementStart(0, "div");
|
|
14350
|
+
i0__namespace.ɵɵtext(1);
|
|
14351
|
+
i0__namespace.ɵɵpipe(2, "ccdFixedList");
|
|
14352
|
+
i0__namespace.ɵɵelementEnd();
|
|
14353
|
+
}
|
|
14354
|
+
if (rf & 2) {
|
|
14355
|
+
var value_r1 = ctx.$implicit;
|
|
14356
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14357
|
+
i0__namespace.ɵɵadvance(1);
|
|
14358
|
+
i0__namespace.ɵɵtextInterpolate1(" ", i0__namespace.ɵɵpipeBind2(2, 1, value_r1.code, ctx_r0.caseField.list_items), "\n");
|
|
14359
|
+
}
|
|
14360
|
+
}
|
|
14361
|
+
var ReadDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14362
|
+
__extends(ReadDynamicMultiSelectListFieldComponent, _super);
|
|
14363
|
+
function ReadDynamicMultiSelectListFieldComponent() {
|
|
14364
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14365
|
+
}
|
|
14366
|
+
ReadDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14367
|
+
/**
|
|
14368
|
+
*
|
|
14369
|
+
* Reassigning list_items from formatted_list when list_items is empty
|
|
14370
|
+
*/
|
|
14371
|
+
if (!this.caseField.list_items && this.caseField.formatted_value && this.caseField.formatted_value.list_items) {
|
|
14372
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14373
|
+
}
|
|
14374
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14375
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14376
|
+
}
|
|
14377
|
+
_super.prototype.ngOnInit.call(this);
|
|
14378
|
+
};
|
|
14379
|
+
return ReadDynamicMultiSelectListFieldComponent;
|
|
14380
|
+
}(AbstractFieldReadComponent));
|
|
14381
|
+
ReadDynamicMultiSelectListFieldComponent.ɵfac = function ReadDynamicMultiSelectListFieldComponent_Factory(t) { return ɵReadDynamicMultiSelectListFieldComponent_BaseFactory(t || ReadDynamicMultiSelectListFieldComponent); };
|
|
14382
|
+
ReadDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: ReadDynamicMultiSelectListFieldComponent, selectors: [["ccd-read-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 1, vars: 1, consts: [[4, "ngFor", "ngForOf"]], template: function ReadDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14383
|
+
if (rf & 1) {
|
|
14384
|
+
i0__namespace.ɵɵtemplate(0, ReadDynamicMultiSelectListFieldComponent_div_0_Template, 3, 4, "div", 0);
|
|
14385
|
+
}
|
|
14386
|
+
if (rf & 2) {
|
|
14387
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.value);
|
|
14388
|
+
}
|
|
14389
|
+
}, directives: [i1__namespace.NgForOf], pipes: [FixedListPipe], styles: [".multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] > td[_ngcontent-%COMP%]{padding:5px 0}.multi-select-list-field-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:last-child > td[_ngcontent-%COMP%]{border-bottom:none}.multi-select-list-field-table[_ngcontent-%COMP%] td.collection-actions[_ngcontent-%COMP%]{width:1px;white-space:nowrap}"] });
|
|
14390
|
+
var ɵReadDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(ReadDynamicMultiSelectListFieldComponent);
|
|
14391
|
+
(function () {
|
|
14392
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReadDynamicMultiSelectListFieldComponent, [{
|
|
14393
|
+
type: i0.Component,
|
|
14394
|
+
args: [{
|
|
14395
|
+
selector: 'ccd-read-dynamic-multi-select-list-field',
|
|
14396
|
+
templateUrl: './read-dynamic-multi-select-list-field.html',
|
|
14397
|
+
styleUrls: ['./read-dynamic-multi-select-list-field.component.scss']
|
|
14398
|
+
}]
|
|
14399
|
+
}], null, null);
|
|
14400
|
+
})();
|
|
14401
|
+
|
|
14402
|
+
function WriteDynamicMultiSelectListFieldComponent_span_3_Template(rf, ctx) {
|
|
14403
|
+
if (rf & 1) {
|
|
14404
|
+
i0__namespace.ɵɵelementStart(0, "span", 5);
|
|
14405
|
+
i0__namespace.ɵɵtext(1);
|
|
14406
|
+
i0__namespace.ɵɵpipe(2, "ccdFieldLabel");
|
|
14407
|
+
i0__namespace.ɵɵelementEnd();
|
|
14408
|
+
}
|
|
14409
|
+
if (rf & 2) {
|
|
14410
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
14411
|
+
i0__namespace.ɵɵadvance(1);
|
|
14412
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r0.caseField));
|
|
14413
|
+
}
|
|
14414
|
+
}
|
|
14415
|
+
function WriteDynamicMultiSelectListFieldComponent_span_4_Template(rf, ctx) {
|
|
14416
|
+
if (rf & 1) {
|
|
14417
|
+
i0__namespace.ɵɵelementStart(0, "span", 6);
|
|
14418
|
+
i0__namespace.ɵɵtext(1);
|
|
14419
|
+
i0__namespace.ɵɵelementEnd();
|
|
14420
|
+
}
|
|
14421
|
+
if (rf & 2) {
|
|
14422
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
14423
|
+
i0__namespace.ɵɵadvance(1);
|
|
14424
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.caseField.hint_text);
|
|
14425
|
+
}
|
|
14426
|
+
}
|
|
14427
|
+
function WriteDynamicMultiSelectListFieldComponent_span_5_Template(rf, ctx) {
|
|
14428
|
+
if (rf & 1) {
|
|
14429
|
+
i0__namespace.ɵɵelementStart(0, "span", 7);
|
|
14430
|
+
i0__namespace.ɵɵtext(1);
|
|
14431
|
+
i0__namespace.ɵɵpipe(2, "ccdFirstError");
|
|
14432
|
+
i0__namespace.ɵɵelementEnd();
|
|
14433
|
+
}
|
|
14434
|
+
if (rf & 2) {
|
|
14435
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
14436
|
+
i0__namespace.ɵɵadvance(1);
|
|
14437
|
+
i0__namespace.ɵɵtextInterpolate(i0__namespace.ɵɵpipeBind1(2, 1, ctx_r2.checkboxes.errors));
|
|
14438
|
+
}
|
|
14439
|
+
}
|
|
14440
|
+
function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
14441
|
+
if (rf & 1) {
|
|
14442
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
14443
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
14444
|
+
i0__namespace.ɵɵelementStart(1, "div", 8);
|
|
14445
|
+
i0__namespace.ɵɵelementStart(2, "input", 9);
|
|
14446
|
+
i0__namespace.ɵɵlistener("change", function WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onCheckChange($event); });
|
|
14447
|
+
i0__namespace.ɵɵelementEnd();
|
|
14448
|
+
i0__namespace.ɵɵelementStart(3, "label", 10);
|
|
14449
|
+
i0__namespace.ɵɵtext(4);
|
|
14450
|
+
i0__namespace.ɵɵelementEnd();
|
|
14451
|
+
i0__namespace.ɵɵelementEnd();
|
|
14452
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
14453
|
+
}
|
|
14454
|
+
if (rf & 2) {
|
|
14455
|
+
var checkbox_r4 = ctx.$implicit;
|
|
14456
|
+
var ctx_r3 = i0__namespace.ɵɵnextContext();
|
|
14457
|
+
i0__namespace.ɵɵadvance(2);
|
|
14458
|
+
i0__namespace.ɵɵpropertyInterpolate("id", ctx_r3.createElementId(checkbox_r4.code));
|
|
14459
|
+
i0__namespace.ɵɵpropertyInterpolate("name", ctx_r3.id());
|
|
14460
|
+
i0__namespace.ɵɵproperty("value", checkbox_r4.code)("checked", ctx_r3.isSelected(checkbox_r4.code));
|
|
14461
|
+
i0__namespace.ɵɵadvance(1);
|
|
14462
|
+
i0__namespace.ɵɵpropertyInterpolate("for", ctx_r3.createElementId(checkbox_r4.code));
|
|
14463
|
+
i0__namespace.ɵɵadvance(1);
|
|
14464
|
+
i0__namespace.ɵɵtextInterpolate(checkbox_r4.label);
|
|
14465
|
+
}
|
|
14466
|
+
}
|
|
14467
|
+
var _c0$L = function (a0) { return { "error": a0 }; };
|
|
14468
|
+
var WriteDynamicMultiSelectListFieldComponent = /** @class */ (function (_super) {
|
|
14469
|
+
__extends(WriteDynamicMultiSelectListFieldComponent, _super);
|
|
14470
|
+
function WriteDynamicMultiSelectListFieldComponent() {
|
|
14471
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
14472
|
+
}
|
|
14473
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.ngOnInit = function () {
|
|
14474
|
+
var _this = this;
|
|
14475
|
+
this.checkboxes = new i2.FormArray([]);
|
|
14476
|
+
this.setInitialCaseList();
|
|
14477
|
+
this.setInitialCaseFieldValue();
|
|
14478
|
+
// Initialise array with existing values
|
|
14479
|
+
if (this.caseField.value && Array.isArray(this.caseField.value)) {
|
|
14480
|
+
var values = this.caseField.value;
|
|
14481
|
+
values.forEach(function (value) {
|
|
14482
|
+
_this.checkboxes.push(new i2.FormControl(value));
|
|
14483
|
+
});
|
|
14484
|
+
}
|
|
14485
|
+
this.dynamicListFormControl = this.registerControl(new i2.FormControl(this.checkboxes.value));
|
|
14486
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14487
|
+
};
|
|
14488
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.onCheckChange = function (event) {
|
|
14489
|
+
var _this = this;
|
|
14490
|
+
var target = event.target;
|
|
14491
|
+
if (!target || !target.value) {
|
|
14492
|
+
return;
|
|
14493
|
+
}
|
|
14494
|
+
var selectedListItem = this.getValueListItem(target.value);
|
|
14495
|
+
if (!this.isSelected(target.value)) {
|
|
14496
|
+
// Add a new control in the FormArray
|
|
14497
|
+
this.checkboxes.push(new i2.FormControl(selectedListItem));
|
|
14498
|
+
}
|
|
14499
|
+
else {
|
|
14500
|
+
// Remove the control from the FormArray
|
|
14501
|
+
this.checkboxes.controls.forEach(function (ctrl, i) {
|
|
14502
|
+
if (ctrl.value.code === target.value) {
|
|
14503
|
+
_this.checkboxes.removeAt(i);
|
|
14504
|
+
}
|
|
14505
|
+
});
|
|
14506
|
+
}
|
|
14507
|
+
this.dynamicListFormControl.setValue(this.checkboxes.value);
|
|
14508
|
+
};
|
|
14509
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.isSelected = function (code) {
|
|
14510
|
+
if (this.checkboxes && this.checkboxes.controls) {
|
|
14511
|
+
return this.checkboxes.controls.find(function (control) { return control.value.code === code; });
|
|
14512
|
+
}
|
|
14513
|
+
};
|
|
14514
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.getValueListItem = function (value) {
|
|
14515
|
+
return this.caseField.list_items.find(function (i) { return i.code === value; });
|
|
14516
|
+
};
|
|
14517
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseList = function () {
|
|
14518
|
+
var hasListItems = this.caseField.list_items && this.caseField.list_items.length > 0;
|
|
14519
|
+
var hasFormattedListItems = this.caseField.formatted_value && this.caseField.formatted_value.list_items.length > 0;
|
|
14520
|
+
if (!hasListItems && hasFormattedListItems) {
|
|
14521
|
+
this.caseField.list_items = this.caseField.formatted_value.list_items;
|
|
14522
|
+
}
|
|
14523
|
+
};
|
|
14524
|
+
WriteDynamicMultiSelectListFieldComponent.prototype.setInitialCaseFieldValue = function () {
|
|
14525
|
+
if (!this.caseField.value && this.caseField.formatted_value && this.caseField.formatted_value.value) {
|
|
14526
|
+
this.caseField.value = this.caseField.formatted_value.value;
|
|
14527
|
+
}
|
|
14528
|
+
var isNull = this.caseField.value === undefined || this.caseField.value === '';
|
|
14529
|
+
if (isNull || !Array.isArray(this.caseField.value)) {
|
|
14530
|
+
this.caseField.value = [];
|
|
14531
|
+
}
|
|
14532
|
+
};
|
|
14533
|
+
return WriteDynamicMultiSelectListFieldComponent;
|
|
14534
|
+
}(AbstractFieldWriteComponent));
|
|
14535
|
+
WriteDynamicMultiSelectListFieldComponent.ɵfac = function WriteDynamicMultiSelectListFieldComponent_Factory(t) { return ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory(t || WriteDynamicMultiSelectListFieldComponent); };
|
|
14536
|
+
WriteDynamicMultiSelectListFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteDynamicMultiSelectListFieldComponent, selectors: [["ccd-write-dynamic-multi-select-list-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 8, consts: [[1, "form-group", "bottom-30", 3, "ngClass", "id"], ["class", "form-label", 4, "ngIf"], ["class", "form-hint", 4, "ngIf"], ["class", "error-message", 4, "ngIf"], [4, "ngFor", "ngForOf"], [1, "form-label"], [1, "form-hint"], [1, "error-message"], [1, "multiple-choice"], ["type", "checkbox", 1, "form-control", 3, "id", "name", "value", "checked", "change"], [1, "form-label", 3, "for"]], template: function WriteDynamicMultiSelectListFieldComponent_Template(rf, ctx) {
|
|
14537
|
+
if (rf & 1) {
|
|
14538
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
14539
|
+
i0__namespace.ɵɵelementStart(1, "fieldset");
|
|
14540
|
+
i0__namespace.ɵɵelementStart(2, "legend");
|
|
14541
|
+
i0__namespace.ɵɵtemplate(3, WriteDynamicMultiSelectListFieldComponent_span_3_Template, 3, 3, "span", 1);
|
|
14542
|
+
i0__namespace.ɵɵtemplate(4, WriteDynamicMultiSelectListFieldComponent_span_4_Template, 2, 1, "span", 2);
|
|
14543
|
+
i0__namespace.ɵɵtemplate(5, WriteDynamicMultiSelectListFieldComponent_span_5_Template, 3, 3, "span", 3);
|
|
14544
|
+
i0__namespace.ɵɵelementEnd();
|
|
14545
|
+
i0__namespace.ɵɵtemplate(6, WriteDynamicMultiSelectListFieldComponent_ng_container_6_Template, 5, 6, "ng-container", 4);
|
|
14546
|
+
i0__namespace.ɵɵelementEnd();
|
|
14547
|
+
i0__namespace.ɵɵelementEnd();
|
|
14548
|
+
}
|
|
14549
|
+
if (rf & 2) {
|
|
14550
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(6, _c0$L, !ctx.checkboxes.valid && ctx.checkboxes.touched))("id", ctx.id());
|
|
14551
|
+
i0__namespace.ɵɵadvance(3);
|
|
14552
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.label);
|
|
14553
|
+
i0__namespace.ɵɵadvance(1);
|
|
14554
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.caseField.hint_text);
|
|
14555
|
+
i0__namespace.ɵɵadvance(1);
|
|
14556
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.checkboxes.errors && ctx.checkboxes.touched);
|
|
14557
|
+
i0__namespace.ɵɵadvance(1);
|
|
14558
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.caseField.list_items);
|
|
14559
|
+
}
|
|
14560
|
+
}, directives: [i1__namespace.NgClass, i1__namespace.NgIf, i1__namespace.NgForOf], pipes: [FieldLabelPipe, FirstErrorPipe], encapsulation: 2 });
|
|
14561
|
+
var ɵWriteDynamicMultiSelectListFieldComponent_BaseFactory = /*@__PURE__*/ i0__namespace.ɵɵgetInheritedFactory(WriteDynamicMultiSelectListFieldComponent);
|
|
14562
|
+
(function () {
|
|
14563
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(WriteDynamicMultiSelectListFieldComponent, [{
|
|
14564
|
+
type: i0.Component,
|
|
14565
|
+
args: [{
|
|
14566
|
+
selector: 'ccd-write-dynamic-multi-select-list-field',
|
|
14567
|
+
templateUrl: './write-dynamic-multi-select-list-field.html'
|
|
14568
|
+
}]
|
|
14569
|
+
}], null, null);
|
|
14570
|
+
})();
|
|
14571
|
+
|
|
14394
14572
|
var DynamicRadioListPipe = /** @class */ (function () {
|
|
14395
14573
|
function DynamicRadioListPipe() {
|
|
14396
14574
|
}
|
|
@@ -14526,10 +14704,9 @@
|
|
|
14526
14704
|
var ctx_r4 = i0__namespace.ɵɵnextContext();
|
|
14527
14705
|
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(7, _c0$K, ctx_r4.dynamicRadioListControl.value === radioButton_r5.code));
|
|
14528
14706
|
i0__namespace.ɵɵadvance(1);
|
|
14529
|
-
i0__namespace.ɵɵ
|
|
14530
|
-
i0__namespace.ɵɵproperty("id", ctx_r4.buildElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
14707
|
+
i0__namespace.ɵɵproperty("id", ctx_r4.createElementId(radioButton_r5.code))("name", ctx_r4.createElementId(radioButton_r5.code))("formControl", ctx_r4.dynamicRadioListControl)("value", radioButton_r5.code);
|
|
14531
14708
|
i0__namespace.ɵɵadvance(1);
|
|
14532
|
-
i0__namespace.ɵɵproperty("for", ctx_r4.
|
|
14709
|
+
i0__namespace.ɵɵproperty("for", ctx_r4.createElementId(radioButton_r5.code));
|
|
14533
14710
|
i0__namespace.ɵɵadvance(1);
|
|
14534
14711
|
i0__namespace.ɵɵtextInterpolate(radioButton_r5.label);
|
|
14535
14712
|
}
|
|
@@ -14558,8 +14735,8 @@
|
|
|
14558
14735
|
this.dynamicRadioListControl = this.registerControl(new i2.FormControl(this.caseField.value));
|
|
14559
14736
|
this.dynamicRadioListControl.setValue(this.caseField.value);
|
|
14560
14737
|
};
|
|
14561
|
-
WriteDynamicRadioListFieldComponent.prototype.
|
|
14562
|
-
return this.id
|
|
14738
|
+
WriteDynamicRadioListFieldComponent.prototype.createElementId = function (name) {
|
|
14739
|
+
return this.parent && this.parent.value ? this.parent.value.id + this.parent.value.value : _super.prototype.createElementId.call(this, name);
|
|
14563
14740
|
};
|
|
14564
14741
|
return WriteDynamicRadioListFieldComponent;
|
|
14565
14742
|
}(AbstractFieldWriteComponent));
|
|
@@ -14738,32 +14915,6 @@
|
|
|
14738
14915
|
}], null, null);
|
|
14739
14916
|
})();
|
|
14740
14917
|
|
|
14741
|
-
var FixedListPipe = /** @class */ (function () {
|
|
14742
|
-
function FixedListPipe() {
|
|
14743
|
-
}
|
|
14744
|
-
FixedListPipe.prototype.transform = function (value, items) {
|
|
14745
|
-
if (!!items) {
|
|
14746
|
-
var item = items.find(function (i) { return i.code === value; });
|
|
14747
|
-
return item ? item.label : FixedListPipe.EMPTY;
|
|
14748
|
-
}
|
|
14749
|
-
else {
|
|
14750
|
-
return FixedListPipe.EMPTY;
|
|
14751
|
-
}
|
|
14752
|
-
};
|
|
14753
|
-
return FixedListPipe;
|
|
14754
|
-
}());
|
|
14755
|
-
FixedListPipe.EMPTY = '';
|
|
14756
|
-
FixedListPipe.ɵfac = function FixedListPipe_Factory(t) { return new (t || FixedListPipe)(); };
|
|
14757
|
-
FixedListPipe.ɵpipe = i0__namespace.ɵɵdefinePipe({ name: "ccdFixedList", type: FixedListPipe, pure: true });
|
|
14758
|
-
(function () {
|
|
14759
|
-
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(FixedListPipe, [{
|
|
14760
|
-
type: i0.Pipe,
|
|
14761
|
-
args: [{
|
|
14762
|
-
name: 'ccdFixedList'
|
|
14763
|
-
}]
|
|
14764
|
-
}], null, null);
|
|
14765
|
-
})();
|
|
14766
|
-
|
|
14767
14918
|
var ReadFixedListFieldComponent = /** @class */ (function (_super) {
|
|
14768
14919
|
__extends(ReadFixedListFieldComponent, _super);
|
|
14769
14920
|
function ReadFixedListFieldComponent() {
|
|
@@ -15447,7 +15598,7 @@
|
|
|
15447
15598
|
casesResponse.push(_this.mapResponse(result));
|
|
15448
15599
|
});
|
|
15449
15600
|
});
|
|
15450
|
-
|
|
15601
|
+
_this.linkedCases = casesResponse.map(function (item) {
|
|
15451
15602
|
return {
|
|
15452
15603
|
caseReference: item.caseReference,
|
|
15453
15604
|
caseName: item.caseName,
|
|
@@ -15461,7 +15612,6 @@
|
|
|
15461
15612
|
}),
|
|
15462
15613
|
};
|
|
15463
15614
|
});
|
|
15464
|
-
_this.linkedCases = caseLinks;
|
|
15465
15615
|
_this.serverLinkedApiError = null;
|
|
15466
15616
|
}, function (err) {
|
|
15467
15617
|
_this.serverLinkedApiError = {
|
|
@@ -16992,6 +17142,7 @@
|
|
|
16992
17142
|
searchCases.forEach(function (response) {
|
|
16993
17143
|
casesResponse.push(_this.mapResponse(response));
|
|
16994
17144
|
});
|
|
17145
|
+
casesResponse = _this.sortReasonCodes(casesResponse);
|
|
16995
17146
|
_this.linkedCasesFromResponse = _this.sortLinkedCasesByReasonCode(casesResponse);
|
|
16996
17147
|
_this.isLoaded = true;
|
|
16997
17148
|
var caseLinks = _this.linkedCasesFromResponse.map(function (item) {
|
|
@@ -17017,6 +17168,30 @@
|
|
|
17017
17168
|
});
|
|
17018
17169
|
}
|
|
17019
17170
|
};
|
|
17171
|
+
LinkedCasesToTableComponent.prototype.sortReasonCodes = function (searchCasesResponse) {
|
|
17172
|
+
var _this = this;
|
|
17173
|
+
searchCasesResponse.forEach(function (item) {
|
|
17174
|
+
var _a;
|
|
17175
|
+
if ((_a = item === null || item === void 0 ? void 0 : item.reasons) === null || _a === void 0 ? void 0 : _a.length) {
|
|
17176
|
+
item.reasons.forEach(function (reason) {
|
|
17177
|
+
reason.sortOrder = _this.getReasonSortOrder(reason.value.Reason);
|
|
17178
|
+
});
|
|
17179
|
+
item.reasons = item.reasons.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17180
|
+
item.sortOrder = item.reasons[0].sortOrder;
|
|
17181
|
+
}
|
|
17182
|
+
});
|
|
17183
|
+
searchCasesResponse = searchCasesResponse === null || searchCasesResponse === void 0 ? void 0 : searchCasesResponse.sort(function (a, b) { return a.sortOrder - b.sortOrder; });
|
|
17184
|
+
return searchCasesResponse;
|
|
17185
|
+
};
|
|
17186
|
+
LinkedCasesToTableComponent.prototype.getReasonSortOrder = function (reasonCode) {
|
|
17187
|
+
if (reasonCode === LinkedCasesToTableComponent.CASE_PROGRESS_REASON_CODE) {
|
|
17188
|
+
return 1;
|
|
17189
|
+
}
|
|
17190
|
+
else if (reasonCode === LinkedCasesToTableComponent.CASE_CONSOLIDATED_REASON_CODE) {
|
|
17191
|
+
return 2;
|
|
17192
|
+
}
|
|
17193
|
+
return 3;
|
|
17194
|
+
};
|
|
17020
17195
|
LinkedCasesToTableComponent.prototype.searchCasesByCaseIds = function (searchCasesResponse) {
|
|
17021
17196
|
return rxjs.forkJoin(searchCasesResponse);
|
|
17022
17197
|
};
|
|
@@ -17383,6 +17558,7 @@
|
|
|
17383
17558
|
}] });
|
|
17384
17559
|
})();
|
|
17385
17560
|
|
|
17561
|
+
// tslint:disable:variable-name
|
|
17386
17562
|
var LinkCaseReason = /** @class */ (function () {
|
|
17387
17563
|
function LinkCaseReason() {
|
|
17388
17564
|
}
|
|
@@ -17541,7 +17717,7 @@
|
|
|
17541
17717
|
this.caseField = (_a = tab === null || tab === void 0 ? void 0 : tab.fields) === null || _a === void 0 ? void 0 : _a.find(function (field) { return field.id === 'caseLinks'; });
|
|
17542
17718
|
}
|
|
17543
17719
|
this.isServerJurisdictionError = this.linkedCasesService.serverJurisdictionError || false;
|
|
17544
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17720
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17545
17721
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17546
17722
|
next: function (reasons) {
|
|
17547
17723
|
_this.reasonListLoaded = true;
|
|
@@ -17648,87 +17824,52 @@
|
|
|
17648
17824
|
}], function () { return [{ type: i1__namespace$1.ActivatedRoute }, { type: i1__namespace$1.Router }, { type: LinkedCasesService }, { type: AbstractAppConfig }, { type: CommonDataService }]; }, null);
|
|
17649
17825
|
})();
|
|
17650
17826
|
|
|
17651
|
-
function
|
|
17827
|
+
function WriteLinkedCasesFieldComponent_ng_container_2_Template(rf, ctx) {
|
|
17652
17828
|
if (rf & 1) {
|
|
17653
|
-
var
|
|
17654
|
-
i0__namespace.ɵɵ
|
|
17655
|
-
i0__namespace.ɵɵelementStart(1, "
|
|
17656
|
-
i0__namespace.ɵɵ
|
|
17657
|
-
i0__namespace.ɵɵelementStart(3, "a", 9);
|
|
17658
|
-
i0__namespace.ɵɵlistener("click", function WriteLinkedCasesFieldComponent_div_0_div_3_Template_a_click_3_listener() { i0__namespace.ɵɵrestoreView(_r9_1); var errorMessage_r7 = ctx.$implicit; var ctx_r8 = i0__namespace.ɵɵnextContext(2); return ctx_r8.navigateToErrorElement(errorMessage_r7.fieldId); });
|
|
17659
|
-
i0__namespace.ɵɵtext(4);
|
|
17660
|
-
i0__namespace.ɵɵelementEnd();
|
|
17661
|
-
i0__namespace.ɵɵelementEnd();
|
|
17662
|
-
i0__namespace.ɵɵelementEnd();
|
|
17663
|
-
i0__namespace.ɵɵelementEnd();
|
|
17664
|
-
}
|
|
17665
|
-
if (rf & 2) {
|
|
17666
|
-
var errorMessage_r7 = ctx.$implicit;
|
|
17667
|
-
i0__namespace.ɵɵadvance(4);
|
|
17668
|
-
i0__namespace.ɵɵtextInterpolate(errorMessage_r7.description);
|
|
17669
|
-
}
|
|
17670
|
-
}
|
|
17671
|
-
function WriteLinkedCasesFieldComponent_div_0_Template(rf, ctx) {
|
|
17672
|
-
if (rf & 1) {
|
|
17673
|
-
i0__namespace.ɵɵelementStart(0, "div", 4);
|
|
17674
|
-
i0__namespace.ɵɵelementStart(1, "h2", 5);
|
|
17675
|
-
i0__namespace.ɵɵtext(2, " There is a problem ");
|
|
17676
|
-
i0__namespace.ɵɵelementEnd();
|
|
17677
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_div_0_div_3_Template, 5, 1, "div", 6);
|
|
17829
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17830
|
+
i0__namespace.ɵɵelementContainerStart(0);
|
|
17831
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-before-you-start", 3);
|
|
17832
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_2_Template_ccd_linked_cases_before_you_start_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.onLinkedCasesStateEmitted($event); });
|
|
17678
17833
|
i0__namespace.ɵɵelementEnd();
|
|
17679
|
-
|
|
17680
|
-
if (rf & 2) {
|
|
17681
|
-
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
17682
|
-
i0__namespace.ɵɵadvance(3);
|
|
17683
|
-
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.errorMessages);
|
|
17834
|
+
i0__namespace.ɵɵelementContainerEnd();
|
|
17684
17835
|
}
|
|
17685
17836
|
}
|
|
17686
17837
|
function WriteLinkedCasesFieldComponent_ng_container_3_Template(rf, ctx) {
|
|
17687
17838
|
if (rf & 1) {
|
|
17688
|
-
var
|
|
17839
|
+
var _r8_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17689
17840
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17690
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases
|
|
17691
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17841
|
+
i0__namespace.ɵɵelementStart(1, "ccd-no-linked-cases", 3);
|
|
17842
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_3_Template_ccd_no_linked_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r8_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onLinkedCasesStateEmitted($event); });
|
|
17692
17843
|
i0__namespace.ɵɵelementEnd();
|
|
17693
17844
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17694
17845
|
}
|
|
17695
17846
|
}
|
|
17696
17847
|
function WriteLinkedCasesFieldComponent_ng_container_4_Template(rf, ctx) {
|
|
17697
17848
|
if (rf & 1) {
|
|
17698
|
-
var
|
|
17849
|
+
var _r10_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17699
17850
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17700
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
17701
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17851
|
+
i0__namespace.ɵɵelementStart(1, "ccd-link-cases", 3);
|
|
17852
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_4_Template_ccd_link_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10_1); var ctx_r9 = i0__namespace.ɵɵnextContext(); return ctx_r9.onLinkedCasesStateEmitted($event); });
|
|
17702
17853
|
i0__namespace.ɵɵelementEnd();
|
|
17703
17854
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17704
17855
|
}
|
|
17705
17856
|
}
|
|
17706
17857
|
function WriteLinkedCasesFieldComponent_ng_container_5_Template(rf, ctx) {
|
|
17707
17858
|
if (rf & 1) {
|
|
17708
|
-
var
|
|
17859
|
+
var _r12_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17709
17860
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17710
|
-
i0__namespace.ɵɵelementStart(1, "ccd-
|
|
17711
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17861
|
+
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 3);
|
|
17862
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_5_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r12_1); var ctx_r11 = i0__namespace.ɵɵnextContext(); return ctx_r11.onLinkedCasesStateEmitted($event); });
|
|
17712
17863
|
i0__namespace.ɵɵelementEnd();
|
|
17713
17864
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17714
17865
|
}
|
|
17715
17866
|
}
|
|
17716
17867
|
function WriteLinkedCasesFieldComponent_ng_container_6_Template(rf, ctx) {
|
|
17717
17868
|
if (rf & 1) {
|
|
17718
|
-
var
|
|
17719
|
-
i0__namespace.ɵɵelementContainerStart(0);
|
|
17720
|
-
i0__namespace.ɵɵelementStart(1, "ccd-unlink-cases", 10);
|
|
17721
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_unlink_cases_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r17_1); var ctx_r16 = i0__namespace.ɵɵnextContext(); return ctx_r16.onLinkedCasesStateEmitted($event); });
|
|
17722
|
-
i0__namespace.ɵɵelementEnd();
|
|
17723
|
-
i0__namespace.ɵɵelementContainerEnd();
|
|
17724
|
-
}
|
|
17725
|
-
}
|
|
17726
|
-
function WriteLinkedCasesFieldComponent_ng_container_7_Template(rf, ctx) {
|
|
17727
|
-
if (rf & 1) {
|
|
17728
|
-
var _r19_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17869
|
+
var _r14_1 = i0__namespace.ɵɵgetCurrentView();
|
|
17729
17870
|
i0__namespace.ɵɵelementContainerStart(0);
|
|
17730
|
-
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers",
|
|
17731
|
-
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function
|
|
17871
|
+
i0__namespace.ɵɵelementStart(1, "ccd-linked-cases-check-your-answers", 3);
|
|
17872
|
+
i0__namespace.ɵɵlistener("linkedCasesStateEmitter", function WriteLinkedCasesFieldComponent_ng_container_6_Template_ccd_linked_cases_check_your_answers_linkedCasesStateEmitter_1_listener($event) { i0__namespace.ɵɵrestoreView(_r14_1); var ctx_r13 = i0__namespace.ɵɵnextContext(); return ctx_r13.onLinkedCasesStateEmitted($event); });
|
|
17732
17873
|
i0__namespace.ɵɵelementEnd();
|
|
17733
17874
|
i0__namespace.ɵɵelementContainerEnd();
|
|
17734
17875
|
}
|
|
@@ -17745,11 +17886,13 @@
|
|
|
17745
17886
|
_this.linkedCasesPages = exports.LinkedCasesPages;
|
|
17746
17887
|
_this.linkedCasesEventTriggers = exports.LinkedCasesEventTriggers;
|
|
17747
17888
|
_this.linkedCases = [];
|
|
17748
|
-
_this.errorMessages = [];
|
|
17749
17889
|
return _this;
|
|
17750
17890
|
}
|
|
17751
17891
|
WriteLinkedCasesFieldComponent.prototype.ngOnInit = function () {
|
|
17752
17892
|
var _this = this;
|
|
17893
|
+
// This is required to enable Continue button validation
|
|
17894
|
+
// Continue button should be enabled only at check your answers page
|
|
17895
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
17753
17896
|
// Clear validation errors
|
|
17754
17897
|
this.caseEditDataService.clearFormValidationErrors();
|
|
17755
17898
|
// Get linked case reasons from ref data
|
|
@@ -17786,11 +17929,10 @@
|
|
|
17786
17929
|
};
|
|
17787
17930
|
WriteLinkedCasesFieldComponent.prototype.onLinkedCasesStateEmitted = function (linkedCasesState) {
|
|
17788
17931
|
var _this = this;
|
|
17789
|
-
|
|
17932
|
+
// Clear validation errors
|
|
17790
17933
|
this.caseEditDataService.clearFormValidationErrors();
|
|
17791
17934
|
if (linkedCasesState.navigateToNextPage) {
|
|
17792
17935
|
this.linkedCasesPage = this.getNextPage(linkedCasesState);
|
|
17793
|
-
this.setContinueButtonValidationErrorMessage();
|
|
17794
17936
|
this.proceedToNextPage();
|
|
17795
17937
|
}
|
|
17796
17938
|
else {
|
|
@@ -17803,7 +17945,7 @@
|
|
|
17803
17945
|
};
|
|
17804
17946
|
WriteLinkedCasesFieldComponent.prototype.getLinkedCaseReasons = function () {
|
|
17805
17947
|
var _this = this;
|
|
17806
|
-
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() +
|
|
17948
|
+
var reasonCodeAPIurl = this.appConfig.getRDCommonDataApiUrl() + "/lov/categories/CaseLinkingReasonCode";
|
|
17807
17949
|
this.commonDataService.getRefData(reasonCodeAPIurl).subscribe({
|
|
17808
17950
|
next: function (reasons) {
|
|
17809
17951
|
// Sort in ascending order
|
|
@@ -17814,27 +17956,19 @@
|
|
|
17814
17956
|
}
|
|
17815
17957
|
});
|
|
17816
17958
|
};
|
|
17817
|
-
WriteLinkedCasesFieldComponent.prototype.setContinueButtonValidationErrorMessage = function () {
|
|
17818
|
-
var errorMessage = this.linkedCasesService.isLinkedCasesEventTrigger
|
|
17819
|
-
? exports.LinkedCasesErrorMessages.LinkCasesNavigationError
|
|
17820
|
-
: exports.LinkedCasesErrorMessages.UnlinkCasesNavigationError;
|
|
17821
|
-
var buttonId = this.linkedCasesService.linkedCases.length === 0
|
|
17822
|
-
? 'back-button'
|
|
17823
|
-
: 'next-button';
|
|
17824
|
-
this.caseEditDataService.setCaseLinkError({
|
|
17825
|
-
componentId: buttonId,
|
|
17826
|
-
errorMessage: errorMessage
|
|
17827
|
-
});
|
|
17828
|
-
};
|
|
17829
17959
|
WriteLinkedCasesFieldComponent.prototype.proceedToNextPage = function () {
|
|
17830
17960
|
if (this.isAtFinalPage()) {
|
|
17831
17961
|
// Continue button event must be allowed in final page
|
|
17832
|
-
this.caseEditDataService.
|
|
17962
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(true);
|
|
17833
17963
|
// Trigger validation to clear the "notAtFinalPage" error if now at the final state
|
|
17834
17964
|
this.formGroup.updateValueAndValidity();
|
|
17835
17965
|
// update form value
|
|
17836
17966
|
this.submitLinkedCases();
|
|
17837
17967
|
}
|
|
17968
|
+
else {
|
|
17969
|
+
// Continue button event must not be allowed if not in final page
|
|
17970
|
+
this.caseEditDataService.setLinkedCasesJourneyAtFinalStep(false);
|
|
17971
|
+
}
|
|
17838
17972
|
};
|
|
17839
17973
|
WriteLinkedCasesFieldComponent.prototype.submitLinkedCases = function () {
|
|
17840
17974
|
if (!this.linkedCasesService.isLinkedCasesEventTrigger) {
|
|
@@ -17862,11 +17996,10 @@
|
|
|
17862
17996
|
var _this = this;
|
|
17863
17997
|
this.casesService.getCaseViewV2(this.linkedCasesService.caseId).subscribe(function (caseView) {
|
|
17864
17998
|
var caseViewFiltered = caseView.tabs.filter(function (tab) {
|
|
17865
|
-
|
|
17999
|
+
return tab.fields.some(function (_b) {
|
|
17866
18000
|
var field_type = _b.field_type;
|
|
17867
18001
|
return field_type && field_type.collection_field_type && field_type.collection_field_type.id === 'CaseLink';
|
|
17868
18002
|
});
|
|
17869
|
-
return linkField;
|
|
17870
18003
|
});
|
|
17871
18004
|
if (caseViewFiltered) {
|
|
17872
18005
|
var caseLinkFieldValue = caseViewFiltered.map(function (filtered) { var _a; return ((_a = filtered.fields) === null || _a === void 0 ? void 0 : _a.length) > 0 && filtered.fields.filter(function (field) { return field.id === 'caseLinks'; })[0].value; });
|
|
@@ -17879,38 +18012,24 @@
|
|
|
17879
18012
|
&& !_this.linkedCasesService.serverLinkedApiError)
|
|
17880
18013
|
? exports.LinkedCasesPages.BEFORE_YOU_START
|
|
17881
18014
|
: exports.LinkedCasesPages.NO_LINKED_CASES;
|
|
17882
|
-
// Initialise the error to be displayed when clicked on Continue button
|
|
17883
|
-
_this.setContinueButtonValidationErrorMessage();
|
|
17884
18015
|
});
|
|
17885
18016
|
};
|
|
17886
|
-
WriteLinkedCasesFieldComponent.prototype.navigateToErrorElement = function (elementId) {
|
|
17887
|
-
if (elementId) {
|
|
17888
|
-
var htmlElement = document.getElementById(elementId);
|
|
17889
|
-
if (htmlElement) {
|
|
17890
|
-
htmlElement.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
|
17891
|
-
htmlElement.focus();
|
|
17892
|
-
}
|
|
17893
|
-
}
|
|
17894
|
-
};
|
|
17895
18017
|
return WriteLinkedCasesFieldComponent;
|
|
17896
18018
|
}(AbstractFieldWriteComponent));
|
|
17897
18019
|
WriteLinkedCasesFieldComponent.ɵfac = function WriteLinkedCasesFieldComponent_Factory(t) { return new (t || WriteLinkedCasesFieldComponent)(i0__namespace.ɵɵdirectiveInject(AbstractAppConfig), i0__namespace.ɵɵdirectiveInject(CommonDataService), i0__namespace.ɵɵdirectiveInject(CasesService), i0__namespace.ɵɵdirectiveInject(LinkedCasesService), i0__namespace.ɵɵdirectiveInject(CaseEditDataService)); };
|
|
17898
|
-
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls:
|
|
18020
|
+
WriteLinkedCasesFieldComponent.ɵcmp = i0__namespace.ɵɵdefineComponent({ type: WriteLinkedCasesFieldComponent, selectors: [["ccd-write-linked-cases-field"]], features: [i0__namespace.ɵɵInheritDefinitionFeature], decls: 7, vars: 7, consts: [[1, "form-group", "govuk-!-margin-bottom-2", 3, "formGroup"], [1, "govuk-form-group", 3, "ngSwitch"], [4, "ngSwitchCase"], [3, "linkedCasesStateEmitter"]], template: function WriteLinkedCasesFieldComponent_Template(rf, ctx) {
|
|
17899
18021
|
if (rf & 1) {
|
|
17900
|
-
i0__namespace.ɵɵ
|
|
18022
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
17901
18023
|
i0__namespace.ɵɵelementStart(1, "div", 1);
|
|
17902
|
-
i0__namespace.ɵɵ
|
|
17903
|
-
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container",
|
|
17904
|
-
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container",
|
|
17905
|
-
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container",
|
|
17906
|
-
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container",
|
|
17907
|
-
i0__namespace.ɵɵtemplate(7, WriteLinkedCasesFieldComponent_ng_container_7_Template, 2, 0, "ng-container", 3);
|
|
18024
|
+
i0__namespace.ɵɵtemplate(2, WriteLinkedCasesFieldComponent_ng_container_2_Template, 2, 0, "ng-container", 2);
|
|
18025
|
+
i0__namespace.ɵɵtemplate(3, WriteLinkedCasesFieldComponent_ng_container_3_Template, 2, 0, "ng-container", 2);
|
|
18026
|
+
i0__namespace.ɵɵtemplate(4, WriteLinkedCasesFieldComponent_ng_container_4_Template, 2, 0, "ng-container", 2);
|
|
18027
|
+
i0__namespace.ɵɵtemplate(5, WriteLinkedCasesFieldComponent_ng_container_5_Template, 2, 0, "ng-container", 2);
|
|
18028
|
+
i0__namespace.ɵɵtemplate(6, WriteLinkedCasesFieldComponent_ng_container_6_Template, 2, 0, "ng-container", 2);
|
|
17908
18029
|
i0__namespace.ɵɵelementEnd();
|
|
17909
18030
|
i0__namespace.ɵɵelementEnd();
|
|
17910
18031
|
}
|
|
17911
18032
|
if (rf & 2) {
|
|
17912
|
-
i0__namespace.ɵɵproperty("ngIf", ctx.errorMessages.length > 0);
|
|
17913
|
-
i0__namespace.ɵɵadvance(1);
|
|
17914
18033
|
i0__namespace.ɵɵproperty("formGroup", ctx.formGroup);
|
|
17915
18034
|
i0__namespace.ɵɵadvance(1);
|
|
17916
18035
|
i0__namespace.ɵɵproperty("ngSwitch", ctx.linkedCasesPage);
|
|
@@ -19431,7 +19550,7 @@
|
|
|
19431
19550
|
WriteTextAreaFieldComponent.prototype.autoGrow = function (event) {
|
|
19432
19551
|
if (this.browserService.isIEOrEdge()) {
|
|
19433
19552
|
event.target.style.height = 'auto';
|
|
19434
|
-
event.target.style.height = event.target.scrollHeight +
|
|
19553
|
+
event.target.style.height = event.target.scrollHeight + "px";
|
|
19435
19554
|
event.target.scrollTop = event.target.scrollHeight;
|
|
19436
19555
|
}
|
|
19437
19556
|
};
|
|
@@ -19671,6 +19790,7 @@
|
|
|
19671
19790
|
return YesNoService.EMPTY;
|
|
19672
19791
|
};
|
|
19673
19792
|
YesNoService.prototype.isYes = function (value) {
|
|
19793
|
+
// tslint:disable-next-line:switch-default
|
|
19674
19794
|
switch (typeof (value)) {
|
|
19675
19795
|
case 'boolean':
|
|
19676
19796
|
return value;
|
|
@@ -19680,6 +19800,7 @@
|
|
|
19680
19800
|
return false;
|
|
19681
19801
|
};
|
|
19682
19802
|
YesNoService.prototype.isNo = function (value) {
|
|
19803
|
+
// tslint:disable-next-line:switch-default
|
|
19683
19804
|
switch (typeof (value)) {
|
|
19684
19805
|
case 'boolean':
|
|
19685
19806
|
return !value;
|
|
@@ -19863,7 +19984,7 @@
|
|
|
19863
19984
|
function PaletteService() {
|
|
19864
19985
|
var _b;
|
|
19865
19986
|
this.componentLauncherRegistry = (_b = {},
|
|
19866
|
-
_b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent,
|
|
19987
|
+
_b[DisplayContextCustomParameter.CaseFileView] = [CaseFileViewFieldComponent, CaseFileViewFieldComponent],
|
|
19867
19988
|
_b[DisplayContextCustomParameter.LinkedCases] = [WriteLinkedCasesFieldComponent, ReadLinkedCasesFieldComponent],
|
|
19868
19989
|
_b);
|
|
19869
19990
|
}
|
|
@@ -19893,6 +20014,8 @@
|
|
|
19893
20014
|
return write ? WriteFixedListFieldComponent : ReadFixedListFieldComponent;
|
|
19894
20015
|
case 'DynamicRadioList':
|
|
19895
20016
|
return write ? WriteDynamicRadioListFieldComponent : ReadDynamicRadioListFieldComponent;
|
|
20017
|
+
case 'DynamicMultiSelectList':
|
|
20018
|
+
return write ? WriteDynamicMultiSelectListFieldComponent : ReadDynamicMultiSelectListFieldComponent;
|
|
19896
20019
|
case 'FixedRadioList':
|
|
19897
20020
|
return write ? WriteFixedRadioListFieldComponent : ReadFixedRadioListFieldComponent;
|
|
19898
20021
|
case 'Complex':
|
|
@@ -19962,7 +20085,7 @@
|
|
|
19962
20085
|
})();
|
|
19963
20086
|
|
|
19964
20087
|
var _c0$v = ["fieldContainer"];
|
|
19965
|
-
var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList'];
|
|
20088
|
+
var FIX_CASEFIELD_FOR$1 = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
|
|
19966
20089
|
var FieldReadComponent = /** @class */ (function (_super) {
|
|
19967
20090
|
__extends(FieldReadComponent, _super);
|
|
19968
20091
|
function FieldReadComponent(resolver, paletteService) {
|
|
@@ -20052,7 +20175,7 @@
|
|
|
20052
20175
|
})();
|
|
20053
20176
|
|
|
20054
20177
|
var _c0$u = ["fieldContainer"];
|
|
20055
|
-
var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList'];
|
|
20178
|
+
var FIX_CASEFIELD_FOR = ['FixedList', 'DynamicList', 'DynamicMultiSelectList'];
|
|
20056
20179
|
var FieldWriteComponent = /** @class */ (function (_super) {
|
|
20057
20180
|
__extends(FieldWriteComponent, _super);
|
|
20058
20181
|
function FieldWriteComponent(resolver, paletteService) {
|
|
@@ -20414,7 +20537,7 @@
|
|
|
20414
20537
|
i0__namespace.ɵɵadvance(2);
|
|
20415
20538
|
i0__namespace.ɵɵproperty("ngForOf", ctx.currentCategories);
|
|
20416
20539
|
}
|
|
20417
|
-
}, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder
|
|
20540
|
+
}, directives: [i1__namespace.NgForOf, i1__namespace.NgTemplateOutlet], styles: [":host{position:relative;display:block}.folders{margin-bottom:20px}.folder{display:none;border-top:1px solid #ccc;margin:0 0 -1px}.folder:last-child{border-bottom:1px solid #ccc}.folders>.folder,input:checked~.folder{display:block}.iconImg{position:relative;display:inline-block;height:28px}.folder>.folder{margin-left:20px}.folder label:before{top:3px}.folder label:after{top:13px}p{font-weight:700}button{margin-right:20px}.close{float:right;width:30px;height:30px;background:url(/assets/img/x.PNG) no-repeat 50%}.cancel,.close{cursor:pointer}.cdk-overlay-pane{overflow:auto}.cdk-overlay-pane::-webkit-scrollbar{width:7px}.cdk-overlay-pane::-webkit-scrollbar-thumb{border:4px solid transparent;background-clip:padding-box;border-radius:9999px;background-color:#aaa}.cdk-overlay-pane::-webkit-scrollbar-button{display:none}.cdk-overlay-pane::-webkit-scrollbar-track-piece{background:#eee}.cdk-overlay-pane::-webkit-scrollbar-thumb{background:#ccc}"], encapsulation: 2 });
|
|
20418
20541
|
(function () {
|
|
20419
20542
|
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(CaseFileViewFolderSelectorComponent, [{
|
|
20420
20543
|
type: i0.Component,
|
|
@@ -20651,6 +20774,7 @@
|
|
|
20651
20774
|
return CaseFileViewCategory;
|
|
20652
20775
|
}());
|
|
20653
20776
|
|
|
20777
|
+
// tslint:disable:variable-name
|
|
20654
20778
|
var CaseFileViewDocument = /** @class */ (function () {
|
|
20655
20779
|
function CaseFileViewDocument() {
|
|
20656
20780
|
}
|
|
@@ -22004,7 +22128,7 @@
|
|
|
22004
22128
|
// is expected not to have a party name)
|
|
22005
22129
|
if (this.flagsData) {
|
|
22006
22130
|
this.filteredFlagsData =
|
|
22007
|
-
this.flagsData.filter(function (f) { return f.flags.partyName
|
|
22131
|
+
this.flagsData.filter(function (f) { return f.flags.partyName !== null || f.pathToFlagsFormGroup === _this.caseLevelCaseFlagsFieldId; });
|
|
22008
22132
|
}
|
|
22009
22133
|
// Add a FormControl for the selected flag location if there is at least one flags instance remaining after filtering
|
|
22010
22134
|
if (this.filteredFlagsData && this.filteredFlagsData.length > 0) {
|
|
@@ -23301,18 +23425,19 @@
|
|
|
23301
23425
|
field.value = { CaseReference: value };
|
|
23302
23426
|
return field;
|
|
23303
23427
|
};
|
|
23304
|
-
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label,
|
|
23428
|
+
ReadComplexFieldCollectionTableComponent.prototype.toCaseField = function (id, label, fieldType, value) {
|
|
23305
23429
|
return classTransformer.plainToClassFromExist(new CaseField(), {
|
|
23306
23430
|
id: id,
|
|
23307
23431
|
label: label,
|
|
23308
23432
|
display_context: 'READONLY',
|
|
23309
23433
|
value: value,
|
|
23310
|
-
field_type:
|
|
23434
|
+
field_type: fieldType
|
|
23311
23435
|
});
|
|
23312
23436
|
};
|
|
23313
23437
|
ReadComplexFieldCollectionTableComponent.prototype.sortRowsByColumns = function (column) {
|
|
23314
23438
|
var shouldSortInAscendingOrder = this.columnsHorizontalLabel[column].sortOrder === SortOrder.UNSORTED
|
|
23315
23439
|
|| this.columnsHorizontalLabel[column].sortOrder === SortOrder.DESCENDING;
|
|
23440
|
+
// tslint:disable-next-line:switch-default
|
|
23316
23441
|
switch (this.columnsHorizontalLabel[column].type.type) {
|
|
23317
23442
|
case 'Number':
|
|
23318
23443
|
case 'MoneyGBP': {
|
|
@@ -24438,6 +24563,7 @@
|
|
|
24438
24563
|
return FeeValue;
|
|
24439
24564
|
}());
|
|
24440
24565
|
|
|
24566
|
+
// tslint:disable:variable-name
|
|
24441
24567
|
var Fee = /** @class */ (function () {
|
|
24442
24568
|
function Fee() {
|
|
24443
24569
|
}
|
|
@@ -25143,7 +25269,7 @@
|
|
|
25143
25269
|
function CcdPageFieldsPipe() {
|
|
25144
25270
|
}
|
|
25145
25271
|
CcdPageFieldsPipe.prototype.transform = function (page, dataFormGroup) {
|
|
25146
|
-
var
|
|
25272
|
+
var complexFields = Object.keys(dataFormGroup.controls['data'].controls).map(function (key) {
|
|
25147
25273
|
var control = dataFormGroup.controls['data'].get(key);
|
|
25148
25274
|
return control['caseField'];
|
|
25149
25275
|
}).filter(function (field) {
|
|
@@ -25163,7 +25289,7 @@
|
|
|
25163
25289
|
field_type: {
|
|
25164
25290
|
id: page.id,
|
|
25165
25291
|
type: 'Complex',
|
|
25166
|
-
complex_fields:
|
|
25292
|
+
complex_fields: complexFields
|
|
25167
25293
|
}
|
|
25168
25294
|
});
|
|
25169
25295
|
};
|
|
@@ -25342,11 +25468,11 @@
|
|
|
25342
25468
|
}
|
|
25343
25469
|
return childrenCaseFields;
|
|
25344
25470
|
};
|
|
25345
|
-
CollectionCreateCheckerService.prototype.isComplex = function (
|
|
25346
|
-
return
|
|
25471
|
+
CollectionCreateCheckerService.prototype.isComplex = function (caseField) {
|
|
25472
|
+
return caseField.field_type.type === 'Complex';
|
|
25347
25473
|
};
|
|
25348
|
-
CollectionCreateCheckerService.prototype.isCollection = function (
|
|
25349
|
-
return
|
|
25474
|
+
CollectionCreateCheckerService.prototype.isCollection = function (caseField) {
|
|
25475
|
+
return caseField.field_type.type === 'Collection';
|
|
25350
25476
|
};
|
|
25351
25477
|
CollectionCreateCheckerService.prototype.hasCreateAccess = function (caseField, role) {
|
|
25352
25478
|
return !!caseField.acls.find(function (acl) { return acl.role === role && acl.create === true; });
|
|
@@ -25440,6 +25566,8 @@
|
|
|
25440
25566
|
WriteDocumentFieldComponent,
|
|
25441
25567
|
WriteDynamicListFieldComponent,
|
|
25442
25568
|
WriteDynamicRadioListFieldComponent,
|
|
25569
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25570
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25443
25571
|
WriteTextFieldComponent,
|
|
25444
25572
|
WriteDateContainerFieldComponent,
|
|
25445
25573
|
WriteTextAreaFieldComponent,
|
|
@@ -25463,12 +25591,18 @@
|
|
|
25463
25591
|
WriteCollectionFieldComponent,
|
|
25464
25592
|
// ComponentLauncher web components
|
|
25465
25593
|
CaseFileViewFieldComponent,
|
|
25466
|
-
CaseFileViewFieldReadComponent,
|
|
25467
25594
|
CaseFileViewFolderComponent,
|
|
25468
25595
|
CaseFileViewFolderSortComponent,
|
|
25469
25596
|
CaseFileViewOverlayMenuComponent,
|
|
25470
25597
|
CaseFileViewFolderDocumentActionsComponent,
|
|
25471
25598
|
CaseFileViewFolderSelectorComponent,
|
|
25599
|
+
// component for dynamic list
|
|
25600
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25601
|
+
WriteDynamicRadioListFieldComponent,
|
|
25602
|
+
WriteDynamicListFieldComponent,
|
|
25603
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25604
|
+
ReadDynamicListFieldComponent,
|
|
25605
|
+
ReadDynamicRadioListFieldComponent,
|
|
25472
25606
|
LinkedCasesToTableComponent,
|
|
25473
25607
|
LinkedCasesFromTableComponent,
|
|
25474
25608
|
BeforeYouStartComponent,
|
|
@@ -25494,7 +25628,6 @@
|
|
|
25494
25628
|
FileUploadStateService,
|
|
25495
25629
|
FileUploadProgressGuard,
|
|
25496
25630
|
WindowService,
|
|
25497
|
-
LinkedCasesService,
|
|
25498
25631
|
CommonDataService,
|
|
25499
25632
|
JurisdictionService,
|
|
25500
25633
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -25599,6 +25732,8 @@
|
|
|
25599
25732
|
WriteDocumentFieldComponent,
|
|
25600
25733
|
WriteDynamicListFieldComponent,
|
|
25601
25734
|
WriteDynamicRadioListFieldComponent,
|
|
25735
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25736
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25602
25737
|
WriteTextFieldComponent,
|
|
25603
25738
|
WriteDateContainerFieldComponent,
|
|
25604
25739
|
WriteTextAreaFieldComponent,
|
|
@@ -25622,12 +25757,18 @@
|
|
|
25622
25757
|
WriteCollectionFieldComponent,
|
|
25623
25758
|
// ComponentLauncher web components
|
|
25624
25759
|
CaseFileViewFieldComponent,
|
|
25625
|
-
CaseFileViewFieldReadComponent,
|
|
25626
25760
|
CaseFileViewFolderComponent,
|
|
25627
25761
|
CaseFileViewFolderSortComponent,
|
|
25628
25762
|
CaseFileViewOverlayMenuComponent,
|
|
25629
25763
|
CaseFileViewFolderDocumentActionsComponent,
|
|
25630
25764
|
CaseFileViewFolderSelectorComponent,
|
|
25765
|
+
// component for dynamic list
|
|
25766
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25767
|
+
WriteDynamicRadioListFieldComponent,
|
|
25768
|
+
WriteDynamicListFieldComponent,
|
|
25769
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25770
|
+
ReadDynamicListFieldComponent,
|
|
25771
|
+
ReadDynamicRadioListFieldComponent,
|
|
25631
25772
|
LinkedCasesToTableComponent,
|
|
25632
25773
|
LinkedCasesFromTableComponent,
|
|
25633
25774
|
BeforeYouStartComponent,
|
|
@@ -25717,6 +25858,8 @@
|
|
|
25717
25858
|
WriteDocumentFieldComponent,
|
|
25718
25859
|
WriteDynamicListFieldComponent,
|
|
25719
25860
|
WriteDynamicRadioListFieldComponent,
|
|
25861
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25862
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25720
25863
|
WriteTextFieldComponent,
|
|
25721
25864
|
WriteDateContainerFieldComponent,
|
|
25722
25865
|
WriteTextAreaFieldComponent,
|
|
@@ -25740,12 +25883,18 @@
|
|
|
25740
25883
|
WriteCollectionFieldComponent,
|
|
25741
25884
|
// ComponentLauncher web components
|
|
25742
25885
|
CaseFileViewFieldComponent,
|
|
25743
|
-
CaseFileViewFieldReadComponent,
|
|
25744
25886
|
CaseFileViewFolderComponent,
|
|
25745
25887
|
CaseFileViewFolderSortComponent,
|
|
25746
25888
|
CaseFileViewOverlayMenuComponent,
|
|
25747
25889
|
CaseFileViewFolderDocumentActionsComponent,
|
|
25748
25890
|
CaseFileViewFolderSelectorComponent,
|
|
25891
|
+
// component for dynamic list
|
|
25892
|
+
WriteDynamicMultiSelectListFieldComponent,
|
|
25893
|
+
WriteDynamicRadioListFieldComponent,
|
|
25894
|
+
WriteDynamicListFieldComponent,
|
|
25895
|
+
ReadDynamicMultiSelectListFieldComponent,
|
|
25896
|
+
ReadDynamicListFieldComponent,
|
|
25897
|
+
ReadDynamicRadioListFieldComponent,
|
|
25749
25898
|
LinkedCasesToTableComponent,
|
|
25750
25899
|
LinkedCasesFromTableComponent,
|
|
25751
25900
|
BeforeYouStartComponent,
|
|
@@ -25822,7 +25971,6 @@
|
|
|
25822
25971
|
FileUploadStateService,
|
|
25823
25972
|
FileUploadProgressGuard,
|
|
25824
25973
|
WindowService,
|
|
25825
|
-
LinkedCasesService,
|
|
25826
25974
|
CommonDataService,
|
|
25827
25975
|
JurisdictionService,
|
|
25828
25976
|
{ provide: i6.MAT_DATE_LOCALE, useValue: 'en-GB' }
|
|
@@ -25859,7 +26007,7 @@
|
|
|
25859
26007
|
AddCommentsComponent,
|
|
25860
26008
|
ManageCaseFlagsComponent,
|
|
25861
26009
|
UpdateFlagComponent], []);
|
|
25862
|
-
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [
|
|
26010
|
+
i0__namespace.ɵɵsetComponentScope(WriteLinkedCasesFieldComponent, [i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgSwitch, i1__namespace.NgSwitchCase, BeforeYouStartComponent,
|
|
25863
26011
|
NoLinkedCasesComponent,
|
|
25864
26012
|
LinkCasesComponent,
|
|
25865
26013
|
UnLinkCasesComponent,
|
|
@@ -25871,8 +26019,7 @@
|
|
|
25871
26019
|
i0__namespace.ɵɵsetComponentScope(WriteCollectionFieldComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, FieldWriteComponent, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective], [FieldLabelPipe, FirstErrorPipe]);
|
|
25872
26020
|
i0__namespace.ɵɵsetComponentScope(
|
|
25873
26021
|
// ComponentLauncher web components
|
|
25874
|
-
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace
|
|
25875
|
-
i0__namespace.ɵɵsetComponentScope(CaseFileViewFieldReadComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.ɵcs], []);
|
|
26022
|
+
CaseFileViewFieldComponent, [i1__namespace.NgIf, CaseFileViewFolderComponent, i11__namespace.MediaViewerComponent], []);
|
|
25876
26023
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesToTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
25877
26024
|
i0__namespace.ɵɵsetComponentScope(LinkedCasesFromTableComponent, [i1__namespace.NgIf, i1__namespace.NgForOf], [CaseReferencePipe, LinkCasesFromReasonValuePipe]);
|
|
25878
26025
|
i0__namespace.ɵɵsetComponentScope(LinkCasesComponent, [i1__namespace.NgIf, i2__namespace.NgControlStatusGroup, i2__namespace.FormGroupDirective, i1__namespace.NgClass, i2__namespace.DefaultValueAccessor, i2__namespace.NgControlStatus, i2__namespace.FormControlName, i2__namespace.FormArrayName, i1__namespace.NgForOf, i2__namespace.FormGroupName, i2__namespace.CheckboxControlValueAccessor], [CaseReferencePipe, LinkCasesReasonValuePipe]);
|
|
@@ -26524,7 +26671,7 @@
|
|
|
26524
26671
|
if (caseField.field_type.type === 'Complex') {
|
|
26525
26672
|
// Note: Deliberate use of equality (==) and non-equality (!=) operators for null checks throughout, to
|
|
26526
26673
|
// handle both null and undefined values
|
|
26527
|
-
if (caseField.value
|
|
26674
|
+
if (caseField.value !== null) {
|
|
26528
26675
|
// Call this function recursively to replace the Complex field's sub-fields as necessary, passing the
|
|
26529
26676
|
// CaseField itself (the sub-fields do not contain any values, so these need to be obtained from the
|
|
26530
26677
|
// parent)
|
|
@@ -26590,8 +26737,8 @@
|
|
|
26590
26737
|
this.caseEdit.navigateToPage(pageId);
|
|
26591
26738
|
};
|
|
26592
26739
|
CaseEditSubmitComponent.prototype.callbackErrorsNotify = function (errorContext) {
|
|
26593
|
-
this.ignoreWarning = errorContext.
|
|
26594
|
-
this.triggerText = errorContext.
|
|
26740
|
+
this.ignoreWarning = errorContext.ignoreWarning;
|
|
26741
|
+
this.triggerText = errorContext.triggerText;
|
|
26595
26742
|
};
|
|
26596
26743
|
CaseEditSubmitComponent.prototype.summaryCaseField = function (field) {
|
|
26597
26744
|
if (null === this.editForm.get('data').get(field.id)) {
|
|
@@ -27223,6 +27370,7 @@
|
|
|
27223
27370
|
{ provide: COMPONENT_PORTAL_INJECTION_TOKEN, useValue: this }
|
|
27224
27371
|
]
|
|
27225
27372
|
});
|
|
27373
|
+
// tslint:disable-next-line:switch-default
|
|
27226
27374
|
switch (portalType) {
|
|
27227
27375
|
case EventCompletionPortalTypes.TaskCancelled:
|
|
27228
27376
|
this.selectedComponentPortal = new i6$2.ComponentPortal(CaseEventCompletionTaskCancelledComponent, null, injector);
|
|
@@ -27757,36 +27905,36 @@
|
|
|
27757
27905
|
this.screenReaderCurrentLabel = "You're on page";
|
|
27758
27906
|
this.pageChange = new i0.EventEmitter();
|
|
27759
27907
|
this.pageBoundsCorrection = new i0.EventEmitter();
|
|
27760
|
-
this.
|
|
27761
|
-
this.
|
|
27762
|
-
this.
|
|
27908
|
+
this.pDirectionLinks = true;
|
|
27909
|
+
this.pAutoHide = false;
|
|
27910
|
+
this.pResponsive = false;
|
|
27763
27911
|
}
|
|
27764
27912
|
Object.defineProperty(PaginationComponent.prototype, "directionLinks", {
|
|
27765
27913
|
get: function () {
|
|
27766
|
-
return this.
|
|
27914
|
+
return this.pDirectionLinks;
|
|
27767
27915
|
},
|
|
27768
27916
|
set: function (value) {
|
|
27769
|
-
this.
|
|
27917
|
+
this.pDirectionLinks = coerceToBoolean(value);
|
|
27770
27918
|
},
|
|
27771
27919
|
enumerable: false,
|
|
27772
27920
|
configurable: true
|
|
27773
27921
|
});
|
|
27774
27922
|
Object.defineProperty(PaginationComponent.prototype, "autoHide", {
|
|
27775
27923
|
get: function () {
|
|
27776
|
-
return this.
|
|
27924
|
+
return this.pAutoHide;
|
|
27777
27925
|
},
|
|
27778
27926
|
set: function (value) {
|
|
27779
|
-
this.
|
|
27927
|
+
this.pAutoHide = coerceToBoolean(value);
|
|
27780
27928
|
},
|
|
27781
27929
|
enumerable: false,
|
|
27782
27930
|
configurable: true
|
|
27783
27931
|
});
|
|
27784
27932
|
Object.defineProperty(PaginationComponent.prototype, "responsive", {
|
|
27785
27933
|
get: function () {
|
|
27786
|
-
return this.
|
|
27934
|
+
return this.pResponsive;
|
|
27787
27935
|
},
|
|
27788
27936
|
set: function (value) {
|
|
27789
|
-
this.
|
|
27937
|
+
this.pResponsive = coerceToBoolean(value);
|
|
27790
27938
|
},
|
|
27791
27939
|
enumerable: false,
|
|
27792
27940
|
configurable: true
|
|
@@ -28553,7 +28701,7 @@
|
|
|
28553
28701
|
var formValue = _this.windowService.getLocalStorage(FORM_GROUP_VAL_LOC_STORAGE);
|
|
28554
28702
|
workbasketInputs.forEach(function (item) {
|
|
28555
28703
|
if (item.field.elementPath) {
|
|
28556
|
-
item.field.id = item.field.id +
|
|
28704
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
28557
28705
|
}
|
|
28558
28706
|
item.field.label = item.label;
|
|
28559
28707
|
if (formValue) {
|
|
@@ -28605,7 +28753,7 @@
|
|
|
28605
28753
|
var value = formGroupLS[key];
|
|
28606
28754
|
// Clear the filter form group control values if it has a value in local storage
|
|
28607
28755
|
// The regionList form group control value should be ignored as it always contain the latest value
|
|
28608
|
-
if (key !== REGION_LIST_AND_FRC_FILTER && value
|
|
28756
|
+
if (key !== REGION_LIST_AND_FRC_FILTER && value !== null) {
|
|
28609
28757
|
this.formGroup.get(key).setValue(null);
|
|
28610
28758
|
}
|
|
28611
28759
|
}
|
|
@@ -29734,7 +29882,7 @@
|
|
|
29734
29882
|
this.eventTrigger = this.route.snapshot.data.eventTrigger;
|
|
29735
29883
|
if (this.activityPollingService.isEnabled) {
|
|
29736
29884
|
this.ngZone.runOutsideAngular(function () {
|
|
29737
|
-
_this.activitySubscription = _this.postEditActivity().subscribe(function (
|
|
29885
|
+
_this.activitySubscription = _this.postEditActivity().subscribe(function () {
|
|
29738
29886
|
// console.log('Posted EDIT activity and result is: ' + JSON.stringify(_resolved));
|
|
29739
29887
|
});
|
|
29740
29888
|
});
|
|
@@ -30706,8 +30854,8 @@
|
|
|
30706
30854
|
return this.sortedTabs.length > 0 || this.prependedTabs.length > 0 || this.appendedTabs.length > 0;
|
|
30707
30855
|
};
|
|
30708
30856
|
CaseFullAccessViewComponent.prototype.callbackErrorsNotify = function (callbackErrorsContext) {
|
|
30709
|
-
this.ignoreWarning = callbackErrorsContext.
|
|
30710
|
-
this.triggerText = callbackErrorsContext.
|
|
30857
|
+
this.ignoreWarning = callbackErrorsContext.ignoreWarning;
|
|
30858
|
+
this.triggerText = callbackErrorsContext.triggerText;
|
|
30711
30859
|
};
|
|
30712
30860
|
CaseFullAccessViewComponent.prototype.isDraft = function () {
|
|
30713
30861
|
return Draft.isDraft(this.caseDetails.case_id);
|
|
@@ -30986,7 +31134,7 @@
|
|
|
30986
31134
|
* or the empty string
|
|
30987
31135
|
*/
|
|
30988
31136
|
PrintUrlPipe.prototype.transform = function (remoteUrl) {
|
|
30989
|
-
if (remoteUrl
|
|
31137
|
+
if ((remoteUrl === null || remoteUrl === void 0 ? void 0 : remoteUrl.length) > 0) {
|
|
30990
31138
|
var printServiceUrlPathname = void 0;
|
|
30991
31139
|
/**
|
|
30992
31140
|
* Check navigator.userAgent to see if the browser is IE or not. Check for either the browser name, "MSIE", or
|
|
@@ -31002,7 +31150,7 @@
|
|
|
31002
31150
|
printServiceUrlPathname = urlParser.pathname;
|
|
31003
31151
|
if (printServiceUrlPathname[0] !== '/') {
|
|
31004
31152
|
// Fix for IE11; it returns the pathname without leading slash
|
|
31005
|
-
printServiceUrlPathname =
|
|
31153
|
+
printServiceUrlPathname = "/" + printServiceUrlPathname;
|
|
31006
31154
|
}
|
|
31007
31155
|
}
|
|
31008
31156
|
else {
|
|
@@ -31205,10 +31353,10 @@
|
|
|
31205
31353
|
};
|
|
31206
31354
|
CaseViewerComponent.prototype.setUserAccessType = function (caseDetails) {
|
|
31207
31355
|
if (caseDetails && Array.isArray(caseDetails.metadataFields)) {
|
|
31208
|
-
var
|
|
31209
|
-
var
|
|
31210
|
-
this.accessGranted =
|
|
31211
|
-
this.userAccessType =
|
|
31356
|
+
var accessProcess = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_PROCEES_ID; });
|
|
31357
|
+
var accessGranted = caseDetails.metadataFields.find(function (metadataField) { return metadataField.id === CaseViewerComponent.METADATA_FIELD_ACCESS_GRANTED_ID; });
|
|
31358
|
+
this.accessGranted = accessGranted ? accessGranted.value !== CaseViewerComponent.BASIC_USER_ACCESS_TYPES : false;
|
|
31359
|
+
this.userAccessType = accessProcess ? accessProcess.value : null;
|
|
31212
31360
|
}
|
|
31213
31361
|
};
|
|
31214
31362
|
CaseViewerComponent.prototype.isDataLoaded = function () {
|
|
@@ -32504,11 +32652,11 @@
|
|
|
32504
32652
|
};
|
|
32505
32653
|
this.$roleAssignmentResponseSubscription = this.casesService.createChallengedAccessRequest(caseId_1, challengedAccessRequest)
|
|
32506
32654
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
32507
|
-
.subscribe(function (
|
|
32655
|
+
.subscribe(function () {
|
|
32508
32656
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
32509
32657
|
// Angular 7.2!
|
|
32510
32658
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
32511
|
-
}, function (
|
|
32659
|
+
}, function () {
|
|
32512
32660
|
// Navigate to error page
|
|
32513
32661
|
});
|
|
32514
32662
|
}
|
|
@@ -32522,7 +32670,7 @@
|
|
|
32522
32670
|
}
|
|
32523
32671
|
};
|
|
32524
32672
|
CaseChallengedAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
32525
|
-
return input.value
|
|
32673
|
+
return input.value === null || input.value.trim().length === 0;
|
|
32526
32674
|
};
|
|
32527
32675
|
return CaseChallengedAccessRequestComponent;
|
|
32528
32676
|
}());
|
|
@@ -33146,11 +33294,11 @@
|
|
|
33146
33294
|
};
|
|
33147
33295
|
this.$roleAssignmentResponseSubscription = this.casesService.createSpecificAccessRequest(caseId_1, specificAccessRequest)
|
|
33148
33296
|
.pipe(operators.switchMap(function () { return _this.caseNotifier.fetchAndRefresh(caseId_1); }))
|
|
33149
|
-
.subscribe(function (
|
|
33297
|
+
.subscribe(function () {
|
|
33150
33298
|
// Would have been nice to pass the caseId within state.data, but this isn't part of NavigationExtras until
|
|
33151
33299
|
// Angular 7.2
|
|
33152
33300
|
_this.router.navigate(['success'], { relativeTo: _this.route });
|
|
33153
|
-
}, function (
|
|
33301
|
+
}, function () {
|
|
33154
33302
|
// Navigate to error page
|
|
33155
33303
|
});
|
|
33156
33304
|
}
|
|
@@ -33165,7 +33313,7 @@
|
|
|
33165
33313
|
}
|
|
33166
33314
|
};
|
|
33167
33315
|
CaseSpecificAccessRequestComponent.prototype.inputEmpty = function (input) {
|
|
33168
|
-
return input.value
|
|
33316
|
+
return input.value === null || input.value.trim().length === 0;
|
|
33169
33317
|
};
|
|
33170
33318
|
return CaseSpecificAccessRequestComponent;
|
|
33171
33319
|
}());
|
|
@@ -34066,7 +34214,7 @@
|
|
|
34066
34214
|
}
|
|
34067
34215
|
searchInputs.forEach(function (item) {
|
|
34068
34216
|
if (item.field.elementPath) {
|
|
34069
|
-
item.field.id = item.field.id +
|
|
34217
|
+
item.field.id = item.field.id + "." + item.field.elementPath;
|
|
34070
34218
|
}
|
|
34071
34219
|
item.field.label = item.label;
|
|
34072
34220
|
if (formValueObject) {
|
|
@@ -34345,7 +34493,7 @@
|
|
|
34345
34493
|
if (rf & 2) {
|
|
34346
34494
|
var ctx_r3 = i0__namespace.ɵɵnextContext(2);
|
|
34347
34495
|
i0__namespace.ɵɵadvance(6);
|
|
34348
|
-
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.
|
|
34496
|
+
i0__namespace.ɵɵtextInterpolate1(" The total size of the result set is ", i0__namespace.ɵɵpipeBind1(7, 1, ctx_r3.paginationMetadata.totalResultsCount), ". Only the first 10,000 records are available for display. ");
|
|
34349
34497
|
}
|
|
34350
34498
|
}
|
|
34351
34499
|
function SearchResultComponent_table_0_div_5_Template(rf, ctx) {
|
|
@@ -34904,7 +35052,7 @@
|
|
|
34904
35052
|
};
|
|
34905
35053
|
Object.defineProperty(SearchResultComponent.prototype, "resultTotal", {
|
|
34906
35054
|
get: function () {
|
|
34907
|
-
var total = this.paginationMetadata.
|
|
35055
|
+
var total = this.paginationMetadata.totalResultsCount;
|
|
34908
35056
|
var maximumResultReached = total >= this.PAGINATION_MAX_ITEM_RESULT;
|
|
34909
35057
|
this.paginationLimitEnforced = maximumResultReached;
|
|
34910
35058
|
return maximumResultReached ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
@@ -35055,7 +35203,7 @@
|
|
|
35055
35203
|
return col;
|
|
35056
35204
|
};
|
|
35057
35205
|
SearchResultComponent.prototype.hasResults = function () {
|
|
35058
|
-
return this.resultView.results.length && this.paginationMetadata.
|
|
35206
|
+
return this.resultView.results.length && this.paginationMetadata.totalPagesCount;
|
|
35059
35207
|
};
|
|
35060
35208
|
SearchResultComponent.prototype.hasDrafts = function () {
|
|
35061
35209
|
return this.resultView.hasDrafts();
|
|
@@ -35154,7 +35302,7 @@
|
|
|
35154
35302
|
return ((currentPage - 1) * this.paginationPageSize) + this.resultView.results.length + this.getDraftsCountIfNotPageOne(currentPage);
|
|
35155
35303
|
};
|
|
35156
35304
|
SearchResultComponent.prototype.getTotalResults = function () {
|
|
35157
|
-
var total = this.paginationMetadata.
|
|
35305
|
+
var total = this.paginationMetadata.totalResultsCount + this.draftsCount;
|
|
35158
35306
|
return total >= this.PAGINATION_MAX_ITEM_RESULT ? this.PAGINATION_MAX_ITEM_RESULT : total;
|
|
35159
35307
|
};
|
|
35160
35308
|
SearchResultComponent.prototype.prepareCaseLinkUrl = function (caseId) {
|
|
@@ -35312,6 +35460,7 @@
|
|
|
35312
35460
|
})();
|
|
35313
35461
|
i0__namespace.ɵɵsetComponentScope(SearchResultComponent, [i1__namespace.NgIf, i1__namespace.NgForOf, i1__namespace$1.RouterLinkWithHref, FieldReadComponent, LabelSubstitutorDirective, ActivityComponent, PaginationComponent], [i1__namespace.DecimalPipe, i1__namespace$6.PaginatePipe, CaseReferencePipe, SortSearchResultPipe]);
|
|
35314
35462
|
|
|
35463
|
+
// tslint:disable:variable-name
|
|
35315
35464
|
var ComplexFieldOverride = /** @class */ (function () {
|
|
35316
35465
|
function ComplexFieldOverride() {
|
|
35317
35466
|
}
|
|
@@ -35333,24 +35482,24 @@
|
|
|
35333
35482
|
this.caseField.id = id;
|
|
35334
35483
|
return this;
|
|
35335
35484
|
};
|
|
35336
|
-
CaseFieldBuilder.prototype.withFieldType = function (
|
|
35337
|
-
this.caseField.field_type =
|
|
35485
|
+
CaseFieldBuilder.prototype.withFieldType = function (fieldType) {
|
|
35486
|
+
this.caseField.field_type = fieldType;
|
|
35338
35487
|
return this;
|
|
35339
35488
|
};
|
|
35340
|
-
CaseFieldBuilder.prototype.withDisplayContext = function (
|
|
35341
|
-
this.caseField.display_context =
|
|
35489
|
+
CaseFieldBuilder.prototype.withDisplayContext = function (displayContext) {
|
|
35490
|
+
this.caseField.display_context = displayContext;
|
|
35342
35491
|
return this;
|
|
35343
35492
|
};
|
|
35344
|
-
CaseFieldBuilder.prototype.withDisplayContextParameter = function (
|
|
35345
|
-
this.caseField.display_context_parameter =
|
|
35493
|
+
CaseFieldBuilder.prototype.withDisplayContextParameter = function (displayContextParameter) {
|
|
35494
|
+
this.caseField.display_context_parameter = displayContextParameter;
|
|
35346
35495
|
return this;
|
|
35347
35496
|
};
|
|
35348
35497
|
CaseFieldBuilder.prototype.withHidden = function (hidden) {
|
|
35349
35498
|
this.caseField.hidden = hidden;
|
|
35350
35499
|
return this;
|
|
35351
35500
|
};
|
|
35352
|
-
CaseFieldBuilder.prototype.withHintText = function (
|
|
35353
|
-
this.caseField.hint_text =
|
|
35501
|
+
CaseFieldBuilder.prototype.withHintText = function (hintText) {
|
|
35502
|
+
this.caseField.hint_text = hintText;
|
|
35354
35503
|
return this;
|
|
35355
35504
|
};
|
|
35356
35505
|
CaseFieldBuilder.prototype.withLabel = function (label) {
|
|
@@ -35361,12 +35510,12 @@
|
|
|
35361
35510
|
this.caseField.order = order;
|
|
35362
35511
|
return this;
|
|
35363
35512
|
};
|
|
35364
|
-
CaseFieldBuilder.prototype.withSecurityLabel = function (
|
|
35365
|
-
this.caseField.security_label =
|
|
35513
|
+
CaseFieldBuilder.prototype.withSecurityLabel = function (securityLabel) {
|
|
35514
|
+
this.caseField.security_label = securityLabel;
|
|
35366
35515
|
return this;
|
|
35367
35516
|
};
|
|
35368
|
-
CaseFieldBuilder.prototype.withShowCondition = function (
|
|
35369
|
-
this.caseField.show_condition =
|
|
35517
|
+
CaseFieldBuilder.prototype.withShowCondition = function (showCondition) {
|
|
35518
|
+
this.caseField.show_condition = showCondition;
|
|
35370
35519
|
return this;
|
|
35371
35520
|
};
|
|
35372
35521
|
CaseFieldBuilder.prototype.withShowSummaryContentOption = function (option) {
|
|
@@ -35394,21 +35543,21 @@
|
|
|
35394
35543
|
complex_fields: []
|
|
35395
35544
|
};
|
|
35396
35545
|
};
|
|
35397
|
-
var createCaseEventTrigger = function (id, name,
|
|
35398
|
-
if (
|
|
35399
|
-
if (
|
|
35546
|
+
var createCaseEventTrigger = function (id, name, caseId, showSummary, caseFields, wizardPages, canSaveDraft) {
|
|
35547
|
+
if (wizardPages === void 0) { wizardPages = []; }
|
|
35548
|
+
if (canSaveDraft === void 0) { canSaveDraft = false; }
|
|
35400
35549
|
var eventTrigger = new CaseEventTrigger();
|
|
35401
35550
|
eventTrigger.id = id;
|
|
35402
35551
|
eventTrigger.name = name;
|
|
35403
|
-
eventTrigger.case_id =
|
|
35404
|
-
eventTrigger.show_summary =
|
|
35405
|
-
eventTrigger.wizard_pages =
|
|
35552
|
+
eventTrigger.case_id = caseId;
|
|
35553
|
+
eventTrigger.show_summary = showSummary;
|
|
35554
|
+
eventTrigger.wizard_pages = wizardPages;
|
|
35406
35555
|
eventTrigger.event_token = 'test-token';
|
|
35407
|
-
eventTrigger.case_fields =
|
|
35408
|
-
eventTrigger.can_save_draft =
|
|
35556
|
+
eventTrigger.case_fields = caseFields;
|
|
35557
|
+
eventTrigger.can_save_draft = canSaveDraft;
|
|
35409
35558
|
return eventTrigger;
|
|
35410
35559
|
};
|
|
35411
|
-
var aCaseField = function (id, label, type,
|
|
35560
|
+
var aCaseField = function (id, label, type, displayContext, showSummaryContentOption, typeComplexFields, retainHiddenValue, hidden) {
|
|
35412
35561
|
if (typeComplexFields === void 0) { typeComplexFields = []; }
|
|
35413
35562
|
return ({
|
|
35414
35563
|
id: id || 'personFirstName',
|
|
@@ -35417,10 +35566,10 @@
|
|
|
35417
35566
|
type: type || 'Text',
|
|
35418
35567
|
complex_fields: typeComplexFields || []
|
|
35419
35568
|
},
|
|
35420
|
-
display_context:
|
|
35569
|
+
display_context: displayContext || 'OPTIONAL',
|
|
35421
35570
|
label: label || 'First name',
|
|
35422
|
-
show_summary_content_option:
|
|
35423
|
-
retain_hidden_value:
|
|
35571
|
+
show_summary_content_option: showSummaryContentOption,
|
|
35572
|
+
retain_hidden_value: retainHiddenValue || false,
|
|
35424
35573
|
hidden: hidden || false
|
|
35425
35574
|
});
|
|
35426
35575
|
};
|
|
@@ -35462,48 +35611,48 @@
|
|
|
35462
35611
|
complexFieldOverride.display_context = 'HIDDEN';
|
|
35463
35612
|
return complexFieldOverride;
|
|
35464
35613
|
};
|
|
35465
|
-
var createCaseField = function (id, label, hint, fieldType,
|
|
35614
|
+
var createCaseField = function (id, label, hint, fieldType, displayContext, order, showCondition, acls, hidden) {
|
|
35466
35615
|
if (order === void 0) { order = undefined; }
|
|
35467
|
-
if (
|
|
35468
|
-
if (
|
|
35616
|
+
if (showCondition === void 0) { showCondition = undefined; }
|
|
35617
|
+
if (acls === void 0) { acls = undefined; }
|
|
35469
35618
|
return CaseFieldBuilder.create()
|
|
35470
35619
|
.withId(id || 'personFirstName')
|
|
35471
35620
|
.withFieldType(fieldType || textFieldType())
|
|
35472
|
-
.withDisplayContext(
|
|
35621
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35473
35622
|
.withLabel(label || 'First name')
|
|
35474
35623
|
.withHintText(hint || 'First name hint text')
|
|
35475
35624
|
.withShowSummaryContentOption(0)
|
|
35476
35625
|
.withOrder(order)
|
|
35477
|
-
.withShowCondition(
|
|
35478
|
-
.withACLs(
|
|
35626
|
+
.withShowCondition(showCondition || undefined)
|
|
35627
|
+
.withACLs(acls)
|
|
35479
35628
|
.withHidden(hidden || false)
|
|
35480
35629
|
.build();
|
|
35481
35630
|
};
|
|
35482
|
-
var newCaseField = function (id, label, hint, fieldType,
|
|
35631
|
+
var newCaseField = function (id, label, hint, fieldType, displayContext, order) {
|
|
35483
35632
|
if (order === void 0) { order = undefined; }
|
|
35484
35633
|
return CaseFieldBuilder.create()
|
|
35485
35634
|
.withId(id || 'personFirstName')
|
|
35486
35635
|
.withFieldType(fieldType || textFieldType())
|
|
35487
|
-
.withDisplayContext(
|
|
35636
|
+
.withDisplayContext(displayContext || 'OPTIONAL')
|
|
35488
35637
|
.withHintText(hint || 'First name hint text')
|
|
35489
35638
|
.withLabel(label || 'First name')
|
|
35490
35639
|
.withOrder(order)
|
|
35491
35640
|
.withShowSummaryContentOption(0);
|
|
35492
35641
|
};
|
|
35493
|
-
var createFieldType = function (typeId, type,
|
|
35494
|
-
if (
|
|
35495
|
-
if (
|
|
35642
|
+
var createFieldType = function (typeId, type, complexFields, collectionFieldType) {
|
|
35643
|
+
if (complexFields === void 0) { complexFields = []; }
|
|
35644
|
+
if (collectionFieldType === void 0) { collectionFieldType = undefined; }
|
|
35496
35645
|
return {
|
|
35497
35646
|
id: typeId || 'Text',
|
|
35498
35647
|
type: type || 'Text',
|
|
35499
|
-
complex_fields:
|
|
35500
|
-
collection_field_type:
|
|
35648
|
+
complex_fields: complexFields || [],
|
|
35649
|
+
collection_field_type: collectionFieldType || undefined
|
|
35501
35650
|
};
|
|
35502
35651
|
};
|
|
35503
35652
|
var createFixedListFieldType = function (typeId, fixedListItems) {
|
|
35504
35653
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35505
35654
|
return {
|
|
35506
|
-
id:
|
|
35655
|
+
id: "FixedList-" + typeId,
|
|
35507
35656
|
type: 'FixedList',
|
|
35508
35657
|
fixed_list_items: fixedListItems || []
|
|
35509
35658
|
};
|
|
@@ -35511,18 +35660,18 @@
|
|
|
35511
35660
|
var createMultiSelectListFieldType = function (typeId, fixedListItems) {
|
|
35512
35661
|
if (fixedListItems === void 0) { fixedListItems = []; }
|
|
35513
35662
|
return {
|
|
35514
|
-
id:
|
|
35663
|
+
id: "MultiSelectList-" + typeId,
|
|
35515
35664
|
type: 'MultiSelectList',
|
|
35516
35665
|
fixed_list_items: fixedListItems || []
|
|
35517
35666
|
};
|
|
35518
35667
|
};
|
|
35519
|
-
var createACL = function (role,
|
|
35668
|
+
var createACL = function (role, aclCreate, aclRead, aclUpdate, aclDelete) {
|
|
35520
35669
|
return ({
|
|
35521
35670
|
role: role || 'roleX',
|
|
35522
|
-
create:
|
|
35523
|
-
read:
|
|
35524
|
-
update:
|
|
35525
|
-
delete:
|
|
35671
|
+
create: aclCreate,
|
|
35672
|
+
read: aclRead,
|
|
35673
|
+
update: aclUpdate,
|
|
35674
|
+
delete: aclDelete
|
|
35526
35675
|
});
|
|
35527
35676
|
};
|
|
35528
35677
|
|
|
@@ -35622,7 +35771,6 @@
|
|
|
35622
35771
|
exports.CaseField = CaseField;
|
|
35623
35772
|
exports.CaseFieldService = CaseFieldService;
|
|
35624
35773
|
exports.CaseFileViewFieldComponent = CaseFileViewFieldComponent;
|
|
35625
|
-
exports.CaseFileViewFieldReadComponent = CaseFileViewFieldReadComponent;
|
|
35626
35774
|
exports.CaseFileViewFolderComponent = CaseFileViewFolderComponent;
|
|
35627
35775
|
exports.CaseFileViewFolderDocumentActionsComponent = CaseFileViewFolderDocumentActionsComponent;
|
|
35628
35776
|
exports.CaseFileViewFolderSelectorComponent = CaseFileViewFolderSelectorComponent;
|
|
@@ -35742,7 +35890,6 @@
|
|
|
35742
35890
|
exports.FormatTranslatorService = FormatTranslatorService;
|
|
35743
35891
|
exports.GreyBarService = GreyBarService;
|
|
35744
35892
|
exports.HRef = HRef;
|
|
35745
|
-
exports.HasLoadingState = HasLoadingState;
|
|
35746
35893
|
exports.HeaderBarComponent = HeaderBarComponent;
|
|
35747
35894
|
exports.HeadersModule = HeadersModule;
|
|
35748
35895
|
exports.HttpError = HttpError;
|
|
@@ -35812,6 +35959,7 @@
|
|
|
35812
35959
|
exports.ReadDateFieldComponent = ReadDateFieldComponent;
|
|
35813
35960
|
exports.ReadDocumentFieldComponent = ReadDocumentFieldComponent;
|
|
35814
35961
|
exports.ReadDynamicListFieldComponent = ReadDynamicListFieldComponent;
|
|
35962
|
+
exports.ReadDynamicMultiSelectListFieldComponent = ReadDynamicMultiSelectListFieldComponent;
|
|
35815
35963
|
exports.ReadDynamicRadioListFieldComponent = ReadDynamicRadioListFieldComponent;
|
|
35816
35964
|
exports.ReadEmailFieldComponent = ReadEmailFieldComponent;
|
|
35817
35965
|
exports.ReadFieldsFilterPipe = ReadFieldsFilterPipe;
|
|
@@ -35888,6 +36036,7 @@
|
|
|
35888
36036
|
exports.WriteDateFieldComponent = WriteDateFieldComponent;
|
|
35889
36037
|
exports.WriteDocumentFieldComponent = WriteDocumentFieldComponent;
|
|
35890
36038
|
exports.WriteDynamicListFieldComponent = WriteDynamicListFieldComponent;
|
|
36039
|
+
exports.WriteDynamicMultiSelectListFieldComponent = WriteDynamicMultiSelectListFieldComponent;
|
|
35891
36040
|
exports.WriteDynamicRadioListFieldComponent = WriteDynamicRadioListFieldComponent;
|
|
35892
36041
|
exports.WriteEmailFieldComponent = WriteEmailFieldComponent;
|
|
35893
36042
|
exports.WriteFixedListFieldComponent = WriteFixedListFieldComponent;
|