@hmcts/rpx-xui-common-lib 2.0.19 → 2.0.21
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/README.md +1 -1
- package/esm2022/lib/components/accessibility/accessibility.component.mjs +725 -0
- package/esm2022/lib/components/checkbox-list/checkbox-list.component.mjs +232 -0
- package/esm2022/lib/components/contact-details/contact-details.component.mjs +104 -0
- package/esm2022/lib/components/cookie-banner/cookie-banner.component.mjs +151 -0
- package/esm2022/lib/components/due-date/due-date.component.mjs +141 -0
- package/esm2022/lib/components/exui-main-wrapper/exui-page-wrapper.component.mjs +80 -0
- package/esm2022/lib/components/find-location/find-location.component.mjs +220 -0
- package/esm2022/lib/components/find-person/find-person.component.mjs +234 -0
- package/esm2022/lib/components/find-service/find-service.component.mjs +193 -0
- package/{esm2020 → esm2022}/lib/components/find-task-name/find-task-name.component.mjs +53 -53
- package/{esm2020 → esm2022}/lib/components/generic-filter/generic-filter-utils.mjs +1 -1
- package/esm2022/lib/components/generic-filter/generic-filter.component.mjs +1184 -0
- package/esm2022/lib/components/hmcts-session-dialog/hmcts-session-dialog.component.mjs +56 -0
- package/esm2022/lib/components/invite-user-form/invite-user-form.component.mjs +51 -0
- package/esm2022/lib/components/invite-user-permissions/invite-user-permission.component.mjs +54 -0
- package/esm2022/lib/components/loading-spinner/loading-spinner.component.mjs +33 -0
- package/esm2022/lib/components/pagination/pagination.component.mjs +92 -0
- package/esm2022/lib/components/search-judicials/search-judicials.component.mjs +185 -0
- package/esm2022/lib/components/search-location/search-location.component.mjs +237 -0
- package/esm2022/lib/components/search-service/search-service.component.mjs +83 -0
- package/esm2022/lib/components/search-venue/search-venue.component.mjs +190 -0
- package/esm2022/lib/components/selected-case/selected-case.component.mjs +379 -0
- package/esm2022/lib/components/selected-case-confirm/selected-case-confirm.component.mjs +135 -0
- package/esm2022/lib/components/selected-case-list/selected-case-list.component.mjs +98 -0
- package/esm2022/lib/components/service-message/service-message.component.mjs +51 -0
- package/esm2022/lib/components/service-messages/service-messages.component.mjs +76 -0
- package/esm2022/lib/components/share-case/share-case.component.mjs +420 -0
- package/esm2022/lib/components/share-case-confirm/share-case-confirm.component.mjs +85 -0
- package/esm2022/lib/components/tab/tab.component.mjs +40 -0
- package/esm2022/lib/components/tc-confirm/tc-confirm.component.mjs +66 -0
- package/esm2022/lib/components/terms-and-conditions/tc-display/tc-display-html/tc-display-html.component.mjs +17 -0
- package/esm2022/lib/components/terms-and-conditions/tc-display/tc-display-plain/tc-display-plain.component.mjs +17 -0
- package/esm2022/lib/components/terms-and-conditions/terms-and-conditions.component.mjs +58 -0
- package/esm2022/lib/components/user-details/user-details.component.mjs +273 -0
- package/esm2022/lib/components/user-list/user-list.component.mjs +100 -0
- package/esm2022/lib/components/user-select/user-select.component.mjs +94 -0
- package/esm2022/lib/components/write-address/write-address.component.mjs +342 -0
- package/esm2022/lib/components/write-address-inputs/write-address-inputs.component.mjs +165 -0
- package/esm2022/lib/directives/feature-toggle/feature-toggle.directive.mjs +41 -0
- package/{esm2020 → esm2022}/lib/directives/let/let.directive.mjs +5 -5
- package/{esm2020 → esm2022}/lib/exui-common-lib.module.mjs +15 -15
- package/esm2022/lib/gov-ui/components/gov-uk-checkbox/gov-uk-checkbox.component.mjs +55 -0
- package/esm2022/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.mjs +137 -0
- package/esm2022/lib/gov-ui/components/gov-uk-date/gov-uk-date.component.mjs +121 -0
- package/esm2022/lib/gov-ui/components/gov-uk-error-message/gov-uk-error-message.component.mjs +46 -0
- package/esm2022/lib/gov-ui/components/gov-uk-fieldset/gov-uk-fieldset.component.mjs +79 -0
- package/esm2022/lib/gov-ui/components/gov-uk-file-upload/gov-uk-file-upload.component.mjs +79 -0
- package/esm2022/lib/gov-ui/components/gov-uk-form-group-wrapper/gov-uk-form-group-wrapper.component.mjs +45 -0
- package/esm2022/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.mjs +71 -0
- package/esm2022/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.mjs +84 -0
- package/esm2022/lib/gov-ui/components/gov-uk-radio/gov-uk-radio.component.mjs +48 -0
- package/esm2022/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.mjs +42 -0
- package/esm2022/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.mjs +80 -0
- package/esm2022/lib/gov-ui/components/gov-uk-table/gov-uk-table.component.mjs +185 -0
- package/esm2022/lib/gov-ui/components/gov-uk-textarea/gov-uk-textarea.component.mjs +57 -0
- package/esm2022/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.mjs +111 -0
- package/esm2022/lib/gov-ui/components/hmcts-error-summary/hmcts-error-summary.component.mjs +140 -0
- package/esm2022/lib/gov-ui/components/hmcts-identity-bar/hmcts-identity-bar.component.mjs +34 -0
- package/esm2022/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.mjs +129 -0
- package/esm2022/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.mjs +204 -0
- package/esm2022/lib/gov-ui/components/hmcts-primary-navigation/hmcts-primary-navigation.component.mjs +60 -0
- package/esm2022/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.mjs +58 -0
- package/esm2022/lib/gov-ui/directives/remove-host.directive.mjs +30 -0
- package/{esm2020 → esm2022}/lib/gov-ui/gov-ui.service.mjs +5 -5
- package/esm2022/lib/gov-ui/util/helpers/html-templates.helper.mjs +22 -0
- package/{esm2020 → esm2022}/lib/gov-ui/validators/checkboxes-be-checked.validator.mjs +1 -1
- package/{esm2020 → esm2022}/lib/gov-ui/validators/date.validator.mjs +1 -1
- package/esm2022/lib/gov-ui/validators/radio-group.validator.mjs +15 -0
- package/esm2022/lib/models/address-option.model.mjs +21 -0
- package/{esm2020 → esm2022}/lib/pipes/capitalize/capitalize.pipe.mjs +4 -4
- package/esm2022/lib/services/address/address-parser.mjs +76 -0
- package/esm2022/lib/services/address/address.service.mjs +55 -0
- package/esm2022/lib/services/case-sharing-state/case-sharing-state.service.mjs +170 -0
- package/{esm2020 → esm2022}/lib/services/cookie/cookie.service.mjs +6 -6
- package/{esm2020 → esm2022}/lib/services/feature-toggle/feature-toggle.guard.mjs +5 -5
- package/{esm2020 → esm2022}/lib/services/feature-toggle/feature-toggle.service.mjs +4 -4
- package/esm2022/lib/services/feature-toggle/launch-darkly.service.mjs +65 -0
- package/esm2022/lib/services/filter/filter.service.mjs +95 -0
- package/esm2022/lib/services/find-person/find-person.service.mjs +83 -0
- package/esm2022/lib/services/google-analytics/google-analytics.service.mjs +68 -0
- package/esm2022/lib/services/google-tag-manager/google-tag-manager.service.mjs +71 -0
- package/{esm2020 → esm2022}/lib/services/loading/loading.service.mjs +4 -4
- package/{esm2020 → esm2022}/lib/services/locations/location.service.mjs +5 -5
- package/{esm2020 → esm2022}/lib/services/manage-session/manage-session.services.mjs +5 -5
- package/esm2022/lib/services/ref-data/ref-data-data-access/ref-data-data-access.service.mjs +33 -0
- package/esm2022/lib/services/ref-data/ref-data.service.mjs +34 -0
- package/{esm2020 → esm2022}/lib/services/role-guard/role.guard.mjs +5 -5
- package/{esm2020 → esm2022}/lib/services/role-guard/role.service.mjs +4 -4
- package/esm2022/lib/services/storage/session-storage/session-storage.service.mjs +43 -0
- package/esm2022/lib/services/task-name/task-name.service.mjs +35 -0
- package/{esm2020 → esm2022}/lib/services/timeout-notifications/timeout-notifications.service.mjs +5 -5
- package/{fesm2020 → fesm2022}/hmcts-rpx-xui-common-lib.mjs +2823 -2835
- package/fesm2022/hmcts-rpx-xui-common-lib.mjs.map +1 -0
- package/lib/components/checkbox-list/checkbox-list.component.d.ts +1 -1
- package/lib/components/contact-details/contact-details.component.d.ts +1 -1
- package/lib/components/cookie-banner/cookie-banner.component.d.ts +1 -1
- package/lib/components/due-date/due-date.component.d.ts +1 -1
- package/lib/components/exui-main-wrapper/exui-page-wrapper.component.d.ts +1 -1
- package/lib/components/find-location/find-location.component.d.ts +1 -1
- package/lib/components/find-person/find-person.component.d.ts +1 -1
- package/lib/components/find-service/find-service.component.d.ts +1 -1
- package/lib/components/find-task-name/find-task-name.component.d.ts +1 -1
- package/lib/components/generic-filter/generic-filter.component.d.ts +1 -1
- package/lib/components/hmcts-session-dialog/hmcts-session-dialog.component.d.ts +1 -1
- package/lib/components/invite-user-form/invite-user-form.component.d.ts +1 -1
- package/lib/components/invite-user-permissions/invite-user-permission.component.d.ts +1 -1
- package/lib/components/loading-spinner/loading-spinner.component.d.ts +1 -1
- package/lib/components/pagination/pagination.component.d.ts +1 -1
- package/lib/components/search-judicials/search-judicials.component.d.ts +1 -1
- package/lib/components/search-location/search-location.component.d.ts +1 -1
- package/lib/components/search-service/search-service.component.d.ts +1 -1
- package/lib/components/search-venue/search-venue.component.d.ts +1 -1
- package/lib/components/selected-case/selected-case.component.d.ts +1 -1
- package/lib/components/selected-case-confirm/selected-case-confirm.component.d.ts +1 -1
- package/lib/components/selected-case-list/selected-case-list.component.d.ts +1 -1
- package/lib/components/service-message/service-message.component.d.ts +1 -1
- package/lib/components/service-messages/service-messages.component.d.ts +1 -1
- package/lib/components/share-case/share-case.component.d.ts +1 -1
- package/lib/components/share-case-confirm/share-case-confirm.component.d.ts +1 -1
- package/lib/components/tab/tab.component.d.ts +1 -1
- package/lib/components/tc-confirm/tc-confirm.component.d.ts +1 -1
- package/lib/components/terms-and-conditions/terms-and-conditions.component.d.ts +1 -1
- package/lib/components/user-details/user-details.component.d.ts +1 -1
- package/lib/components/user-list/user-list.component.d.ts +1 -1
- package/lib/components/user-select/user-select.component.d.ts +1 -1
- package/lib/components/write-address/write-address.component.d.ts +1 -1
- package/lib/components/write-address-inputs/write-address-inputs.component.d.ts +1 -1
- package/lib/directives/feature-toggle/feature-toggle.directive.d.ts +1 -1
- package/lib/directives/let/let.directive.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-checkbox/gov-uk-checkbox.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-date/gov-uk-date.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-error-message/gov-uk-error-message.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-fieldset/gov-uk-fieldset.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-file-upload/gov-uk-file-upload.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-form-group-wrapper/gov-uk-form-group-wrapper.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-radio/gov-uk-radio.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-table/gov-uk-table.component.d.ts +1 -1
- package/lib/gov-ui/components/gov-uk-textarea/gov-uk-textarea.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-error-summary/hmcts-error-summary.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-identity-bar/hmcts-identity-bar.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-primary-navigation/hmcts-primary-navigation.component.d.ts +1 -1
- package/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.d.ts +1 -1
- package/lib/services/feature-toggle/feature-toggle.guard.d.ts +2 -2
- package/lib/services/role-guard/role.guard.d.ts +2 -2
- package/package.json +5 -11
- package/esm2020/lib/components/accessibility/accessibility.component.mjs +0 -737
- package/esm2020/lib/components/checkbox-list/checkbox-list.component.mjs +0 -231
- package/esm2020/lib/components/contact-details/contact-details.component.mjs +0 -107
- package/esm2020/lib/components/cookie-banner/cookie-banner.component.mjs +0 -150
- package/esm2020/lib/components/due-date/due-date.component.mjs +0 -140
- package/esm2020/lib/components/exui-main-wrapper/exui-page-wrapper.component.mjs +0 -79
- package/esm2020/lib/components/find-location/find-location.component.mjs +0 -219
- package/esm2020/lib/components/find-person/find-person.component.mjs +0 -234
- package/esm2020/lib/components/find-service/find-service.component.mjs +0 -192
- package/esm2020/lib/components/generic-filter/generic-filter.component.mjs +0 -1198
- package/esm2020/lib/components/hmcts-session-dialog/hmcts-session-dialog.component.mjs +0 -55
- package/esm2020/lib/components/invite-user-form/invite-user-form.component.mjs +0 -50
- package/esm2020/lib/components/invite-user-permissions/invite-user-permission.component.mjs +0 -54
- package/esm2020/lib/components/loading-spinner/loading-spinner.component.mjs +0 -32
- package/esm2020/lib/components/pagination/pagination.component.mjs +0 -93
- package/esm2020/lib/components/search-judicials/search-judicials.component.mjs +0 -184
- package/esm2020/lib/components/search-location/search-location.component.mjs +0 -236
- package/esm2020/lib/components/search-service/search-service.component.mjs +0 -81
- package/esm2020/lib/components/search-venue/search-venue.component.mjs +0 -188
- package/esm2020/lib/components/selected-case/selected-case.component.mjs +0 -380
- package/esm2020/lib/components/selected-case-confirm/selected-case-confirm.component.mjs +0 -135
- package/esm2020/lib/components/selected-case-list/selected-case-list.component.mjs +0 -98
- package/esm2020/lib/components/service-message/service-message.component.mjs +0 -50
- package/esm2020/lib/components/service-messages/service-messages.component.mjs +0 -75
- package/esm2020/lib/components/share-case/share-case.component.mjs +0 -420
- package/esm2020/lib/components/share-case-confirm/share-case-confirm.component.mjs +0 -85
- package/esm2020/lib/components/tab/tab.component.mjs +0 -39
- package/esm2020/lib/components/tc-confirm/tc-confirm.component.mjs +0 -65
- package/esm2020/lib/components/terms-and-conditions/tc-display/tc-display-html/tc-display-html.component.mjs +0 -16
- package/esm2020/lib/components/terms-and-conditions/tc-display/tc-display-plain/tc-display-plain.component.mjs +0 -16
- package/esm2020/lib/components/terms-and-conditions/terms-and-conditions.component.mjs +0 -59
- package/esm2020/lib/components/user-details/user-details.component.mjs +0 -281
- package/esm2020/lib/components/user-list/user-list.component.mjs +0 -99
- package/esm2020/lib/components/user-select/user-select.component.mjs +0 -92
- package/esm2020/lib/components/write-address/write-address.component.mjs +0 -345
- package/esm2020/lib/components/write-address-inputs/write-address-inputs.component.mjs +0 -165
- package/esm2020/lib/directives/feature-toggle/feature-toggle.directive.mjs +0 -41
- package/esm2020/lib/gov-ui/components/gov-uk-checkbox/gov-uk-checkbox.component.mjs +0 -54
- package/esm2020/lib/gov-ui/components/gov-uk-checkboxes/gov-uk-checkboxes.component.mjs +0 -136
- package/esm2020/lib/gov-ui/components/gov-uk-date/gov-uk-date.component.mjs +0 -120
- package/esm2020/lib/gov-ui/components/gov-uk-error-message/gov-uk-error-message.component.mjs +0 -45
- package/esm2020/lib/gov-ui/components/gov-uk-fieldset/gov-uk-fieldset.component.mjs +0 -80
- package/esm2020/lib/gov-ui/components/gov-uk-file-upload/gov-uk-file-upload.component.mjs +0 -78
- package/esm2020/lib/gov-ui/components/gov-uk-form-group-wrapper/gov-uk-form-group-wrapper.component.mjs +0 -45
- package/esm2020/lib/gov-ui/components/gov-uk-input/gov-uk-input.component.mjs +0 -70
- package/esm2020/lib/gov-ui/components/gov-uk-label/gov-uk-label.component.mjs +0 -84
- package/esm2020/lib/gov-ui/components/gov-uk-radio/gov-uk-radio.component.mjs +0 -47
- package/esm2020/lib/gov-ui/components/gov-uk-radios/gov-uk-radios.component.mjs +0 -41
- package/esm2020/lib/gov-ui/components/gov-uk-select/gov-uk-select.component.mjs +0 -79
- package/esm2020/lib/gov-ui/components/gov-uk-table/gov-uk-table.component.mjs +0 -188
- package/esm2020/lib/gov-ui/components/gov-uk-textarea/gov-uk-textarea.component.mjs +0 -56
- package/esm2020/lib/gov-ui/components/hmcts-banner/hmcts-banner.component.mjs +0 -112
- package/esm2020/lib/gov-ui/components/hmcts-error-summary/hmcts-error-summary.component.mjs +0 -141
- package/esm2020/lib/gov-ui/components/hmcts-identity-bar/hmcts-identity-bar.component.mjs +0 -33
- package/esm2020/lib/gov-ui/components/hmcts-main-wrapper/hmcts-main-wrapper.component.mjs +0 -130
- package/esm2020/lib/gov-ui/components/hmcts-pagination/hmcts-pagination.component.mjs +0 -204
- package/esm2020/lib/gov-ui/components/hmcts-primary-navigation/hmcts-primary-navigation.component.mjs +0 -59
- package/esm2020/lib/gov-ui/components/hmcts-sub-navigation/hmcts-sub-navigation.component.mjs +0 -57
- package/esm2020/lib/gov-ui/directives/remove-host.directive.mjs +0 -30
- package/esm2020/lib/gov-ui/util/helpers/html-templates.helper.mjs +0 -22
- package/esm2020/lib/gov-ui/validators/radio-group.validator.mjs +0 -15
- package/esm2020/lib/models/address-option.model.mjs +0 -21
- package/esm2020/lib/services/address/address-parser.mjs +0 -76
- package/esm2020/lib/services/address/address.service.mjs +0 -55
- package/esm2020/lib/services/case-sharing-state/case-sharing-state.service.mjs +0 -170
- package/esm2020/lib/services/feature-toggle/launch-darkly.service.mjs +0 -65
- package/esm2020/lib/services/filter/filter.service.mjs +0 -95
- package/esm2020/lib/services/find-person/find-person.service.mjs +0 -83
- package/esm2020/lib/services/google-analytics/google-analytics.service.mjs +0 -68
- package/esm2020/lib/services/google-tag-manager/google-tag-manager.service.mjs +0 -71
- package/esm2020/lib/services/ref-data/ref-data-data-access/ref-data-data-access.service.mjs +0 -33
- package/esm2020/lib/services/ref-data/ref-data.service.mjs +0 -34
- package/esm2020/lib/services/storage/session-storage/session-storage.service.mjs +0 -43
- package/esm2020/lib/services/task-name/task-name.service.mjs +0 -35
- package/fesm2015/hmcts-rpx-xui-common-lib.mjs +0 -11073
- package/fesm2015/hmcts-rpx-xui-common-lib.mjs.map +0 -1
- package/fesm2020/hmcts-rpx-xui-common-lib.mjs.map +0 -1
- /package/{esm2020 → esm2022}/hmcts-rpx-xui-common-lib.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/components/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/directives/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/directives/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/components/hmcts-banner/hmcts-banner-info.interface.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/components/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/components/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/checkboxes-model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/error-messages-model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/gov-ui-config-model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/models/radio-buttons.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/validators/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/gov-ui/validators/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/address-message.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/address.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/case-share.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/contact-details.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/due-date.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/feature-user.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/filter.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/idle-config.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/location.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/pagination.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/person.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/public_api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/search-options.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/task-name.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/tcDocument.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/timeout-notification.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/user-access-type.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/user-details.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/models/user.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/pipes/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/address/address-type.enum.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/public-api.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/ref-data/index.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/ref-data/models/ref-data-htmcs-service.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/ref-data/models/ref-data-region.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/services/ref-data/ref-data-data-access/models/ref-data-locations-by-service-code-response.model.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/window.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { AddressMessageEnum } from '../../models';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
function WriteAddressInputsComponent_p_8_Template(rf, ctx) { if (rf & 1) {
|
|
8
|
-
i0.ɵɵelementStart(0, "p", 19)(1, "span", 20);
|
|
9
|
-
i0.ɵɵtext(2, "Error:");
|
|
10
|
-
i0.ɵɵelementEnd();
|
|
11
|
-
i0.ɵɵtext(3);
|
|
12
|
-
i0.ɵɵelementEnd();
|
|
13
|
-
} if (rf & 2) {
|
|
14
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
15
|
-
i0.ɵɵadvance(3);
|
|
16
|
-
i0.ɵɵtextInterpolate1("", ctx_r0.MESSAGE_ENUM.NO_STREET_SELECTED, " ");
|
|
17
|
-
} }
|
|
18
|
-
function WriteAddressInputsComponent_p_21_Template(rf, ctx) { if (rf & 1) {
|
|
19
|
-
i0.ɵɵelementStart(0, "p", 19)(1, "span", 20);
|
|
20
|
-
i0.ɵɵtext(2, "Error:");
|
|
21
|
-
i0.ɵɵelementEnd();
|
|
22
|
-
i0.ɵɵtext(3);
|
|
23
|
-
i0.ɵɵelementEnd();
|
|
24
|
-
} if (rf & 2) {
|
|
25
|
-
const ctx_r1 = i0.ɵɵnextContext();
|
|
26
|
-
i0.ɵɵadvance(3);
|
|
27
|
-
i0.ɵɵtextInterpolate1("", ctx_r1.MESSAGE_ENUM.NO_CITY_SELECTED, " ");
|
|
28
|
-
} }
|
|
29
|
-
function WriteAddressInputsComponent_div_27_p_3_Template(rf, ctx) { if (rf & 1) {
|
|
30
|
-
i0.ɵɵelementStart(0, "p", 19)(1, "span", 20);
|
|
31
|
-
i0.ɵɵtext(2, "Error:");
|
|
32
|
-
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵtext(3);
|
|
34
|
-
i0.ɵɵelementEnd();
|
|
35
|
-
} if (rf & 2) {
|
|
36
|
-
const ctx_r5 = i0.ɵɵnextContext(2);
|
|
37
|
-
i0.ɵɵadvance(3);
|
|
38
|
-
i0.ɵɵtextInterpolate1("", ctx_r5.MESSAGE_ENUM.NO_COUNTRY_SELECTED, " ");
|
|
39
|
-
} }
|
|
40
|
-
const _c0 = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
41
|
-
function WriteAddressInputsComponent_div_27_Template(rf, ctx) { if (rf & 1) {
|
|
42
|
-
i0.ɵɵelementStart(0, "div", 3)(1, "label", 21);
|
|
43
|
-
i0.ɵɵtext(2, " Country ");
|
|
44
|
-
i0.ɵɵelementEnd();
|
|
45
|
-
i0.ɵɵtemplate(3, WriteAddressInputsComponent_div_27_p_3_Template, 4, 1, "p", 5);
|
|
46
|
-
i0.ɵɵelement(4, "input", 22);
|
|
47
|
-
i0.ɵɵelementEnd();
|
|
48
|
-
} if (rf & 2) {
|
|
49
|
-
const ctx_r2 = i0.ɵɵnextContext();
|
|
50
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(2, _c0, ctx_r2.submissionAttempted && !ctx_r2.formGroup.get("address").get("country").valid));
|
|
51
|
-
i0.ɵɵadvance(3);
|
|
52
|
-
i0.ɵɵproperty("ngIf", ctx_r2.submissionAttempted && !ctx_r2.formGroup.get("address").get("country").valid);
|
|
53
|
-
} }
|
|
54
|
-
function WriteAddressInputsComponent_p_31_Template(rf, ctx) { if (rf & 1) {
|
|
55
|
-
i0.ɵɵelementStart(0, "p", 19)(1, "span", 20);
|
|
56
|
-
i0.ɵɵtext(2, "Error:");
|
|
57
|
-
i0.ɵɵelementEnd();
|
|
58
|
-
i0.ɵɵtext(3);
|
|
59
|
-
i0.ɵɵelementEnd();
|
|
60
|
-
} if (rf & 2) {
|
|
61
|
-
const ctx_r3 = i0.ɵɵnextContext();
|
|
62
|
-
i0.ɵɵadvance(3);
|
|
63
|
-
i0.ɵɵtextInterpolate1("", ctx_r3.MESSAGE_ENUM.NO_POSTCODE_SELECTED, " ");
|
|
64
|
-
} }
|
|
65
|
-
function WriteAddressInputsComponent_p_32_Template(rf, ctx) { if (rf & 1) {
|
|
66
|
-
i0.ɵɵelementStart(0, "p", 19)(1, "span", 20);
|
|
67
|
-
i0.ɵɵtext(2, "Error:");
|
|
68
|
-
i0.ɵɵelementEnd();
|
|
69
|
-
i0.ɵɵtext(3);
|
|
70
|
-
i0.ɵɵelementEnd();
|
|
71
|
-
} if (rf & 2) {
|
|
72
|
-
const ctx_r4 = i0.ɵɵnextContext();
|
|
73
|
-
i0.ɵɵadvance(3);
|
|
74
|
-
i0.ɵɵtextInterpolate1("", ctx_r4.MESSAGE_ENUM.INVALID_POSTCODE, " ");
|
|
75
|
-
} }
|
|
76
|
-
export class WriteAddressInputsComponent {
|
|
77
|
-
constructor() {
|
|
78
|
-
this.MESSAGE_ENUM = AddressMessageEnum;
|
|
79
|
-
this.isInternational = false;
|
|
80
|
-
this.submissionAttempted = false;
|
|
81
|
-
this.missingPostcode = false;
|
|
82
|
-
this.errorsPresent = false;
|
|
83
|
-
}
|
|
84
|
-
ngOnChanges() {
|
|
85
|
-
// if there is an issue with the formgroup, ensure error styling is displayed
|
|
86
|
-
this.errorsPresent = !this.formGroup.get('address').valid;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
WriteAddressInputsComponent.ɵfac = function WriteAddressInputsComponent_Factory(t) { return new (t || WriteAddressInputsComponent)(); };
|
|
90
|
-
WriteAddressInputsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: WriteAddressInputsComponent, selectors: [["xuilib-write-address-inputs"]], inputs: { formGroup: "formGroup", isInternational: "isInternational", submissionAttempted: "submissionAttempted" }, features: [i0.ɵɵNgOnChangesFeature], decls: 34, vars: 17, consts: [[3, "formGroup"], ["formGroupName", "address", 1, "govuk-body"], [1, "govuk-label", "govuk-!-font-weight-bold"], [1, "govuk-body", 3, "ngClass"], ["for", "addressLine1", 1, "govuk-label"], ["class", "govuk-error-message", 4, "ngIf"], ["id", "addressLine1", "name", "addressLine1", "type", "text", "formControlName", "addressLine1", 1, "govuk-input", "govuk-!-width-full"], [1, "govuk-body"], ["for", "addressLine2", 1, "govuk-label"], ["id", "addressLine2", "name", "addressLine2", "type", "text", "formControlName", "addressLine2", 1, "govuk-input", "govuk-!-width-full"], ["for", "addressLine3", 1, "govuk-label"], ["id", "addressLine3", "name", "addressLine3", "type", "text", "formControlName", "addressLine3", 1, "govuk-input", "govuk-!-width-full"], ["for", "postTown", 1, "govuk-label"], ["id", "postTown", "name", "postTown", "type", "text", "formControlName", "postTown", 1, "govuk-input", "govuk-!-width-two-thirds"], ["for", "county", 1, "govuk-label"], ["id", "county", "name", "county", "type", "text", "formControlName", "county", 1, "govuk-input", "govuk-!-width-two-thirds"], ["class", "govuk-body", 3, "ngClass", 4, "ngIf"], ["for", "postCode", 1, "govuk-label"], ["id", "postCode", "name", "postCode", "type", "text", "formControlName", "postCode", 1, "govuk-input", "govuk-!-width-one-third"], [1, "govuk-error-message"], [1, "govuk-visually-hidden"], ["for", "country", 1, "govuk-label"], ["id", "country", "name", "country", "type", "text", "formControlName", "country", 1, "govuk-input", "govuk-!-width-two-thirds"]], template: function WriteAddressInputsComponent_Template(rf, ctx) { if (rf & 1) {
|
|
91
|
-
i0.ɵɵelementContainerStart(0);
|
|
92
|
-
i0.ɵɵelementStart(1, "form", 0)(2, "div", 1)(3, "label", 2);
|
|
93
|
-
i0.ɵɵtext(4, " Enter address details ");
|
|
94
|
-
i0.ɵɵelementEnd();
|
|
95
|
-
i0.ɵɵelementStart(5, "div", 3)(6, "label", 4);
|
|
96
|
-
i0.ɵɵtext(7, " Building and Street ");
|
|
97
|
-
i0.ɵɵelementEnd();
|
|
98
|
-
i0.ɵɵtemplate(8, WriteAddressInputsComponent_p_8_Template, 4, 1, "p", 5);
|
|
99
|
-
i0.ɵɵelement(9, "input", 6);
|
|
100
|
-
i0.ɵɵelementEnd();
|
|
101
|
-
i0.ɵɵelementStart(10, "div", 7)(11, "label", 8);
|
|
102
|
-
i0.ɵɵtext(12, " Address line 2 (Optional) ");
|
|
103
|
-
i0.ɵɵelementEnd();
|
|
104
|
-
i0.ɵɵelement(13, "input", 9);
|
|
105
|
-
i0.ɵɵelementEnd();
|
|
106
|
-
i0.ɵɵelementStart(14, "div", 7)(15, "label", 10);
|
|
107
|
-
i0.ɵɵtext(16, " Address line 3 (Optional) ");
|
|
108
|
-
i0.ɵɵelementEnd();
|
|
109
|
-
i0.ɵɵelement(17, "input", 11);
|
|
110
|
-
i0.ɵɵelementEnd();
|
|
111
|
-
i0.ɵɵelementStart(18, "div", 3)(19, "label", 12);
|
|
112
|
-
i0.ɵɵtext(20, " Town or City ");
|
|
113
|
-
i0.ɵɵelementEnd();
|
|
114
|
-
i0.ɵɵtemplate(21, WriteAddressInputsComponent_p_21_Template, 4, 1, "p", 5);
|
|
115
|
-
i0.ɵɵelement(22, "input", 13);
|
|
116
|
-
i0.ɵɵelementEnd();
|
|
117
|
-
i0.ɵɵelementStart(23, "div", 7)(24, "label", 14);
|
|
118
|
-
i0.ɵɵtext(25);
|
|
119
|
-
i0.ɵɵelementEnd();
|
|
120
|
-
i0.ɵɵelement(26, "input", 15);
|
|
121
|
-
i0.ɵɵelementEnd();
|
|
122
|
-
i0.ɵɵtemplate(27, WriteAddressInputsComponent_div_27_Template, 5, 4, "div", 16);
|
|
123
|
-
i0.ɵɵelementStart(28, "div", 3)(29, "label", 17);
|
|
124
|
-
i0.ɵɵtext(30);
|
|
125
|
-
i0.ɵɵelementEnd();
|
|
126
|
-
i0.ɵɵtemplate(31, WriteAddressInputsComponent_p_31_Template, 4, 1, "p", 5);
|
|
127
|
-
i0.ɵɵtemplate(32, WriteAddressInputsComponent_p_32_Template, 4, 1, "p", 5);
|
|
128
|
-
i0.ɵɵelement(33, "input", 18);
|
|
129
|
-
i0.ɵɵelementEnd()()();
|
|
130
|
-
i0.ɵɵelementContainerEnd();
|
|
131
|
-
} if (rf & 2) {
|
|
132
|
-
i0.ɵɵadvance(1);
|
|
133
|
-
i0.ɵɵproperty("formGroup", ctx.formGroup);
|
|
134
|
-
i0.ɵɵadvance(4);
|
|
135
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(11, _c0, ctx.submissionAttempted && !ctx.formGroup.get("address").get("addressLine1").valid));
|
|
136
|
-
i0.ɵɵadvance(3);
|
|
137
|
-
i0.ɵɵproperty("ngIf", ctx.submissionAttempted && !ctx.formGroup.get("address").get("addressLine1").valid);
|
|
138
|
-
i0.ɵɵadvance(10);
|
|
139
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(13, _c0, ctx.submissionAttempted && !ctx.formGroup.get("address").get("postTown").valid));
|
|
140
|
-
i0.ɵɵadvance(3);
|
|
141
|
-
i0.ɵɵproperty("ngIf", ctx.submissionAttempted && !ctx.formGroup.get("address").get("postTown").valid);
|
|
142
|
-
i0.ɵɵadvance(4);
|
|
143
|
-
i0.ɵɵtextInterpolate1(" County", ctx.isInternational ? "/ State/ Province" : "", " (Optional) ");
|
|
144
|
-
i0.ɵɵadvance(2);
|
|
145
|
-
i0.ɵɵproperty("ngIf", ctx.isInternational);
|
|
146
|
-
i0.ɵɵadvance(1);
|
|
147
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(15, _c0, ctx.submissionAttempted && !ctx.isInternational && !ctx.formGroup.get("address").get("postCode").valid));
|
|
148
|
-
i0.ɵɵadvance(2);
|
|
149
|
-
i0.ɵɵtextInterpolate1(" Postcode", ctx.isInternational ? " (Optional)" : "", " ");
|
|
150
|
-
i0.ɵɵadvance(1);
|
|
151
|
-
i0.ɵɵproperty("ngIf", ctx.submissionAttempted && !ctx.isInternational && ctx.formGroup.get("address").get("postCode").hasError("required"));
|
|
152
|
-
i0.ɵɵadvance(1);
|
|
153
|
-
i0.ɵɵproperty("ngIf", ctx.submissionAttempted && !ctx.isInternational && ctx.formGroup.get("address").get("postCode").hasError("invalidPostcode"));
|
|
154
|
-
} }, dependencies: [i1.NgClass, i1.NgIf, i2.ɵNgNoValidate, i2.DefaultValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.FormGroupDirective, i2.FormControlName, i2.FormGroupName], encapsulation: 2 });
|
|
155
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(WriteAddressInputsComponent, [{
|
|
156
|
-
type: Component,
|
|
157
|
-
args: [{ selector: 'xuilib-write-address-inputs', template: "<ng-container>\n <form [formGroup]=\"formGroup\">\n <div class=\"govuk-body\" formGroupName=\"address\">\n <label class=\"govuk-label govuk-!-font-weight-bold\">\n Enter address details\n </label>\n\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': submissionAttempted && !formGroup.get('address').get('addressLine1').valid}\">\n <label class=\"govuk-label\" for=\"addressLine1\">\n Building and Street\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"submissionAttempted && !formGroup.get('address').get('addressLine1').valid\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{MESSAGE_ENUM.NO_STREET_SELECTED}}\n </p>\n <input class=\"govuk-input govuk-!-width-full\" id=\"addressLine1\" name=\"addressLine1\" type=\"text\"\n formControlName=\"addressLine1\">\n </div>\n\n <div class=\"govuk-body\">\n <label class=\"govuk-label\" for=\"addressLine2\">\n Address line 2 (Optional)\n </label>\n <input class=\"govuk-input govuk-!-width-full\" id=\"addressLine2\" name=\"addressLine2\" type=\"text\"\n formControlName=\"addressLine2\">\n </div>\n\n <div class=\"govuk-body\">\n <label class=\"govuk-label\" for=\"addressLine3\">\n Address line 3 (Optional)\n </label>\n <input class=\"govuk-input govuk-!-width-full\" id=\"addressLine3\" name=\"addressLine3\" type=\"text\"\n formControlName=\"addressLine3\">\n </div>\n\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': submissionAttempted && !formGroup.get('address').get('postTown').valid}\">\n <label class=\"govuk-label\" for=\"postTown\">\n Town or City\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"submissionAttempted && !formGroup.get('address').get('postTown').valid\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{MESSAGE_ENUM.NO_CITY_SELECTED}}\n </p>\n <input class=\"govuk-input govuk-!-width-two-thirds\" id=\"postTown\" name=\"postTown\" type=\"text\"\n formControlName=\"postTown\">\n </div>\n\n <div class=\"govuk-body\">\n <label class=\"govuk-label\" for=\"county\">\n County{{this.isInternational ? '/ State/ Province' : ''}} (Optional)\n </label>\n <input class=\"govuk-input govuk-!-width-two-thirds\" id=\"county\" name=\"county\" type=\"text\"\n formControlName=\"county\" >\n </div>\n\n <div *ngIf=\"isInternational\" class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': submissionAttempted && !formGroup.get('address').get('country').valid}\">\n <label class=\"govuk-label\" for=\"country\">\n Country\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"submissionAttempted && !formGroup.get('address').get('country').valid\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{MESSAGE_ENUM.NO_COUNTRY_SELECTED}}\n </p>\n <input class=\"govuk-input govuk-!-width-two-thirds\" id=\"country\" name=\"country\" type=\"text\"\n formControlName=\"country\">\n </div>\n\n <div class=\"govuk-body\" [ngClass]=\"{'govuk-form-group--error': submissionAttempted && !isInternational && !formGroup.get('address').get('postCode').valid}\">\n <label class=\"govuk-label\" for=\"postCode\">\n Postcode{{this.isInternational ? ' (Optional)' : ''}}\n </label>\n <p class=\"govuk-error-message\" *ngIf=\"submissionAttempted && !isInternational && this.formGroup.get('address').get('postCode').hasError('required')\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{MESSAGE_ENUM.NO_POSTCODE_SELECTED}}\n </p>\n <p class=\"govuk-error-message\" *ngIf=\"submissionAttempted && !isInternational && this.formGroup.get('address').get('postCode').hasError('invalidPostcode')\">\n <span class=\"govuk-visually-hidden\">Error:</span>{{MESSAGE_ENUM.INVALID_POSTCODE}}\n </p>\n <input class=\"govuk-input govuk-!-width-one-third\" id=\"postCode\" name=\"postCode\" type=\"text\"\n formControlName=\"postCode\">\n </div>\n </div>\n</form>\n</ng-container>" }]
|
|
158
|
-
}], function () { return []; }, { formGroup: [{
|
|
159
|
-
type: Input
|
|
160
|
-
}], isInternational: [{
|
|
161
|
-
type: Input
|
|
162
|
-
}], submissionAttempted: [{
|
|
163
|
-
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GVcIiB0eXBlPVwidGV4dFwiXG4gICAgICAgIGZvcm1Db250cm9sTmFtZT1cInBvc3RDb2RlXCI+XG4gICAgPC9kaXY+XG4gIDwvZGl2PlxuPC9mb3JtPlxuPC9uZy1jb250YWluZXI+Il19
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Directive, Input, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { FeatureToggleService } from '../../services/feature-toggle/feature-toggle.service';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "../../services/feature-toggle/feature-toggle.service";
|
|
5
|
-
export class FeatureToggleDirective {
|
|
6
|
-
set xuilibFeatureToggle(feature) {
|
|
7
|
-
this.feature = feature;
|
|
8
|
-
this.updateSubscription();
|
|
9
|
-
}
|
|
10
|
-
constructor(service, viewContainer, templateRef) {
|
|
11
|
-
this.service = service;
|
|
12
|
-
this.viewContainer = viewContainer;
|
|
13
|
-
this.templateRef = templateRef;
|
|
14
|
-
}
|
|
15
|
-
ngOnDestroy() {
|
|
16
|
-
if (this.subscription) {
|
|
17
|
-
this.subscription.unsubscribe();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
updateSubscription() {
|
|
21
|
-
this.subscription = this.service.isEnabled(this.feature).subscribe(enabled => {
|
|
22
|
-
if (enabled) {
|
|
23
|
-
this.viewContainer.createEmbeddedView(this.templateRef);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
this.viewContainer.clear();
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
FeatureToggleDirective.ɵfac = function FeatureToggleDirective_Factory(t) { return new (t || FeatureToggleDirective)(i0.ɵɵdirectiveInject(i1.FeatureToggleService), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.TemplateRef)); };
|
|
32
|
-
FeatureToggleDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: FeatureToggleDirective, selectors: [["", "xuilibFeatureToggle", ""]], inputs: { xuilibFeatureToggle: "xuilibFeatureToggle" } });
|
|
33
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(FeatureToggleDirective, [{
|
|
34
|
-
type: Directive,
|
|
35
|
-
args: [{
|
|
36
|
-
selector: '[xuilibFeatureToggle]'
|
|
37
|
-
}]
|
|
38
|
-
}], function () { return [{ type: i1.FeatureToggleService }, { type: i0.ViewContainerRef }, { type: i0.TemplateRef }]; }, { xuilibFeatureToggle: [{
|
|
39
|
-
type: Input
|
|
40
|
-
}] }); })();
|
|
41
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmVhdHVyZS10b2dnbGUuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZGlyZWN0aXZlcy9mZWF0dXJlLXRvZ2dsZS9mZWF0dXJlLXRvZ2dsZS5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQWEsV0FBVyxFQUFFLGdCQUFnQixFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTNGLE9BQU8sRUFBRSxvQkFBb0IsRUFBRSxNQUFNLHNEQUFzRCxDQUFDOzs7QUFLNUYsTUFBTSxPQUFPLHNCQUFzQjtJQUkvQixJQUFvQixtQkFBbUIsQ0FBQyxPQUFlO1FBQ25ELElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxrQkFBa0IsRUFBRSxDQUFDO0lBQzlCLENBQUM7SUFFRCxZQUNxQixPQUE2QixFQUM3QixhQUErQixFQUMvQixXQUE2QjtRQUY3QixZQUFPLEdBQVAsT0FBTyx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c3Vic2NyaWJlKGVuYWJsZWQgPT4ge1xuICAgICAgICAgICAgaWYgKGVuYWJsZWQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdDb250YWluZXIuY3JlYXRlRW1iZWRkZWRWaWV3KHRoaXMudGVtcGxhdGVSZWYpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdDb250YWluZXIuY2xlYXIoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgfVxufVxuIl19
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "@angular/forms";
|
|
5
|
-
import * as i2 from "../gov-uk-label/gov-uk-label.component";
|
|
6
|
-
import * as i3 from "../../directives/remove-host.directive";
|
|
7
|
-
import * as i4 from "rpx-xui-translation";
|
|
8
|
-
/*
|
|
9
|
-
* Gov Uk Checkbox Dumb Component responsible for
|
|
10
|
-
* displaying checkbox input and hint
|
|
11
|
-
*
|
|
12
|
-
* */
|
|
13
|
-
export class GovUkCheckboxComponent {
|
|
14
|
-
constructor() {
|
|
15
|
-
this.isChecked = false;
|
|
16
|
-
}
|
|
17
|
-
ngOnInit() {
|
|
18
|
-
const id = this.config.focusOn ? this.config.focusOn : this.config.value;
|
|
19
|
-
this.config.id = id;
|
|
20
|
-
this.config.classes = this.config.classes ?
|
|
21
|
-
this.config.classes.concat(' govuk-checkboxes__label') : 'govuk-checkboxes__label';
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
GovUkCheckboxComponent.ɵfac = function GovUkCheckboxComponent_Factory(t) { return new (t || GovUkCheckboxComponent)(); };
|
|
25
|
-
GovUkCheckboxComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GovUkCheckboxComponent, selectors: [["xuilib-gov-checkbox"]], inputs: { group: "group", config: "config", isChecked: "isChecked" }, decls: 6, vars: 11, consts: [[1, "govuk-checkboxes__item", 3, "formGroup"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "name", "formControlName", "checked"], ["appRemoveHost", "", 3, "config"], [1, "govuk-hint", "govuk-checkboxes__hint", 3, "id"]], template: function GovUkCheckboxComponent_Template(rf, ctx) { if (rf & 1) {
|
|
26
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
27
|
-
i0.ɵɵelement(1, "input", 1)(2, "xuilib-gov-label", 2);
|
|
28
|
-
i0.ɵɵelementStart(3, "span", 3);
|
|
29
|
-
i0.ɵɵtext(4);
|
|
30
|
-
i0.ɵɵpipe(5, "rpxTranslate");
|
|
31
|
-
i0.ɵɵelementEnd()();
|
|
32
|
-
} if (rf & 2) {
|
|
33
|
-
i0.ɵɵproperty("formGroup", ctx.group);
|
|
34
|
-
i0.ɵɵadvance(1);
|
|
35
|
-
i0.ɵɵproperty("id", ctx.config.id)("name", ctx.config.name)("formControlName", ctx.config.value)("checked", ctx.isChecked);
|
|
36
|
-
i0.ɵɵattribute("aria-describedby", ctx.config.hint ? ctx.config.value + "-item-hint" : null);
|
|
37
|
-
i0.ɵɵadvance(1);
|
|
38
|
-
i0.ɵɵproperty("config", ctx.config);
|
|
39
|
-
i0.ɵɵadvance(1);
|
|
40
|
-
i0.ɵɵproperty("id", ctx.config.value + "-item-hint");
|
|
41
|
-
i0.ɵɵadvance(1);
|
|
42
|
-
i0.ɵɵtextInterpolate1(" ", i0.ɵɵpipeBind1(5, 9, ctx.config.hint), " ");
|
|
43
|
-
} }, dependencies: [i1.CheckboxControlValueAccessor, i1.NgControlStatus, i1.NgControlStatusGroup, i1.FormGroupDirective, i1.FormControlName, i2.GovUkLabelComponent, i3.RemoveHostDirective, i4.RpxTranslatePipe], encapsulation: 2 });
|
|
44
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GovUkCheckboxComponent, [{
|
|
45
|
-
type: Component,
|
|
46
|
-
args: [{ selector: 'xuilib-gov-checkbox', template: "<div class=\"govuk-checkboxes__item\" [formGroup]=\"group\">\n <input class=\"govuk-checkboxes__input\" type=\"checkbox\" [attr.aria-describedby]=\"config.hint ? config.value+'-item-hint' : null\"\n [id]=\"config.id\" [name]=\"config.name\" [formControlName]=\"config.value\" [checked]=\"isChecked\">\n <xuilib-gov-label appRemoveHost [config]=\"config\"></xuilib-gov-label>\n <span [id]=\"config.value+'-item-hint'\" class=\"govuk-hint govuk-checkboxes__hint\">\n {{config.hint | rpxTranslate}}\n </span>\n</div>\n" }]
|
|
47
|
-
}], function () { return []; }, { group: [{
|
|
48
|
-
type: Input
|
|
49
|
-
}], config: [{
|
|
50
|
-
type: Input
|
|
51
|
-
}], isChecked: [{
|
|
52
|
-
type: Input
|
|
53
|
-
}] }); })();
|
|
54
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ292LXVrLWNoZWNrYm94LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2V4dWktY29tbW9uLWxpYi9zcmMvbGliL2dvdi11aS9jb21wb25lbnRzL2dvdi11ay1jaGVja2JveC9nb3YtdWstY2hlY2tib3guY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZ292LXVpL2NvbXBvbmVudHMvZ292LXVrLWNoZWNrYm94L2dvdi11ay1jaGVja2JveC5jb21wb25lbnQuaHRtbCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUMsU0FBUyxFQUFFLEtBQUssRUFBUyxNQUFNLGVBQWUsQ0FBQztBQUN2RCxPQUFPLEVBQUMsU0FBUyxFQUFDLE1BQU0sZ0JBQWdCLENBQUM7Ozs7OztBQUV6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pZy5mb2N1c09uIDogdGhpcy5jb25maWcudmFsdWU7XG4gICAgdGhpcy5jb25maWcuaWQgPSBpZDtcbiAgICB0aGlzLmNvbmZpZy5jbGFzc2VzID0gdGhpcy5jb25maWcuY2xhc3NlcyA/XG4gICAgICB0aGlzLmNvbmZpZy5jbGFzc2VzLmNvbmNhdCgnIGdvdnVrLWNoZWNrYm94ZXNfX2xhYmVsJykgOiAnZ292dWstY2hlY2tib3hlc19fbGFiZWwnO1xuICB9XG59XG4iLCI8ZGl2IGNsYXNzPVwiZ292dWstY2hlY2tib3hlc19faXRlbVwiIFtmb3JtR3JvdXBdPVwiZ3JvdXBcIj5cbiAgPGlucHV0IGNsYXNzPVwiZ292dWstY2hlY2tib3hlc19faW5wdXRcIiB0eXBlPVwiY2hlY2tib3hcIiBbYXR0ci5hcmlhLWRlc2NyaWJlZGJ5XT1cImNvbmZpZy5oaW50ID8gY29uZmlnLnZhbHVlKyctaXRlbS1oaW50JyA6IG51bGxcIlxuICBbaWRdPVwiY29uZmlnLmlkXCIgW25hbWVdPVwiY29uZmlnLm5hbWVcIiBbZm9ybUNvbnRyb2xOYW1lXT1cImNvbmZpZy52YWx1ZVwiIFtjaGVja2VkXT1cImlzQ2hlY2tlZFwiPlxuICA8eHVpbGliLWdvdi1sYWJlbCBhcHBSZW1vdmVIb3N0IFtjb25maWddPVwiY29uZmlnXCI+PC94dWlsaWItZ292LWxhYmVsPlxuICA8c3BhbiBbaWRdPVwiY29uZmlnLnZhbHVlKyctaXRlbS1oaW50J1wiIGNsYXNzPVwiZ292dWstaGludCBnb3Z1ay1jaGVja2JveGVzX19oaW50XCI+XG4gICAge3tjb25maWcuaGludCB8IHJweFRyYW5zbGF0ZX19XG4gIDwvc3Bhbj5cbjwvZGl2PlxuIl19
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import { FormGroup } from '@angular/forms';
|
|
3
|
-
import { HtmlTemplatesHelper } from '../../util/helpers/html-templates.helper';
|
|
4
|
-
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "@angular/common";
|
|
6
|
-
import * as i2 from "@angular/forms";
|
|
7
|
-
import * as i3 from "../gov-uk-label/gov-uk-label.component";
|
|
8
|
-
import * as i4 from "../gov-uk-error-message/gov-uk-error-message.component";
|
|
9
|
-
function GovUkCheckboxesComponent_span_2_Template(rf, ctx) { if (rf & 1) {
|
|
10
|
-
i0.ɵɵelementStart(0, "span", 6);
|
|
11
|
-
i0.ɵɵtext(1);
|
|
12
|
-
i0.ɵɵelementEnd();
|
|
13
|
-
} if (rf & 2) {
|
|
14
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
15
|
-
i0.ɵɵproperty("id", ctx_r0.config.id + "-hint");
|
|
16
|
-
i0.ɵɵadvance(1);
|
|
17
|
-
i0.ɵɵtextInterpolate1(" ", ctx_r0.config.hint, " ");
|
|
18
|
-
} }
|
|
19
|
-
function GovUkCheckboxesComponent_div_5_div_1_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
20
|
-
i0.ɵɵelementStart(0, "div", 13);
|
|
21
|
-
i0.ɵɵtext(1);
|
|
22
|
-
i0.ɵɵelementEnd();
|
|
23
|
-
} if (rf & 2) {
|
|
24
|
-
const item_r4 = i0.ɵɵnextContext().$implicit;
|
|
25
|
-
i0.ɵɵadvance(1);
|
|
26
|
-
i0.ɵɵtextInterpolate1(" ", item_r4.hint, " ");
|
|
27
|
-
} }
|
|
28
|
-
function GovUkCheckboxesComponent_div_5_div_1_Template(rf, ctx) { if (rf & 1) {
|
|
29
|
-
const _r8 = i0.ɵɵgetCurrentView();
|
|
30
|
-
i0.ɵɵelementStart(0, "div", 9)(1, "input", 10);
|
|
31
|
-
i0.ɵɵlistener("change", function GovUkCheckboxesComponent_div_5_div_1_Template_input_change_1_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r8); const item_r4 = restoredCtx.$implicit; const ctx_r7 = i0.ɵɵnextContext(2); return i0.ɵɵresetView(ctx_r7.onChecked($event.target.checked, item_r4.value)); });
|
|
32
|
-
i0.ɵɵelementEnd();
|
|
33
|
-
i0.ɵɵelementStart(2, "label", 11);
|
|
34
|
-
i0.ɵɵtext(3);
|
|
35
|
-
i0.ɵɵelementEnd();
|
|
36
|
-
i0.ɵɵtemplate(4, GovUkCheckboxesComponent_div_5_div_1_div_4_Template, 2, 1, "div", 12);
|
|
37
|
-
i0.ɵɵelementEnd();
|
|
38
|
-
} if (rf & 2) {
|
|
39
|
-
const item_r4 = ctx.$implicit;
|
|
40
|
-
const ctx_r3 = i0.ɵɵnextContext(2);
|
|
41
|
-
i0.ɵɵadvance(1);
|
|
42
|
-
i0.ɵɵproperty("id", item_r4.id)("name", item_r4.id)("checked", ctx_r3.isChecked(item_r4.value))("value", item_r4.value);
|
|
43
|
-
i0.ɵɵattribute("aria-describedby", ctx_r3.setDescribedBy());
|
|
44
|
-
i0.ɵɵadvance(1);
|
|
45
|
-
i0.ɵɵproperty("for", item_r4.id);
|
|
46
|
-
i0.ɵɵadvance(1);
|
|
47
|
-
i0.ɵɵtextInterpolate1(" ", item_r4.label, " ");
|
|
48
|
-
i0.ɵɵadvance(1);
|
|
49
|
-
i0.ɵɵproperty("ngIf", item_r4.hint);
|
|
50
|
-
} }
|
|
51
|
-
function GovUkCheckboxesComponent_div_5_Template(rf, ctx) { if (rf & 1) {
|
|
52
|
-
i0.ɵɵelementStart(0, "div", 7);
|
|
53
|
-
i0.ɵɵtemplate(1, GovUkCheckboxesComponent_div_5_div_1_Template, 5, 8, "div", 8);
|
|
54
|
-
i0.ɵɵelementEnd();
|
|
55
|
-
} if (rf & 2) {
|
|
56
|
-
const columnItems_r2 = ctx.$implicit;
|
|
57
|
-
i0.ɵɵadvance(1);
|
|
58
|
-
i0.ɵɵproperty("ngForOf", columnItems_r2);
|
|
59
|
-
} }
|
|
60
|
-
const _c0 = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
61
|
-
/*
|
|
62
|
-
* CheckBox component - state less
|
|
63
|
-
* Responsible for displaying a list of gov-uk-checkboxes
|
|
64
|
-
* @param: options - object with data for wrapper (fieldset) and
|
|
65
|
-
* array of items for gov-uk-checkboxes
|
|
66
|
-
* @param: errors - array of error stings
|
|
67
|
-
* */
|
|
68
|
-
export class GovUkCheckboxesComponent {
|
|
69
|
-
ngOnInit() {
|
|
70
|
-
this.columns = this.setColumns();
|
|
71
|
-
}
|
|
72
|
-
setDescribedBy() {
|
|
73
|
-
return HtmlTemplatesHelper.setDescribedBy(this.errorMessage, this.config);
|
|
74
|
-
}
|
|
75
|
-
onChecked(checked, value) {
|
|
76
|
-
const formControl = this.group.get(this.config.name);
|
|
77
|
-
const array = formControl.value ? formControl.value : [];
|
|
78
|
-
if (!checked) {
|
|
79
|
-
const modifiedArray = array.filter((item) => item !== value);
|
|
80
|
-
formControl.setValue(modifiedArray);
|
|
81
|
-
}
|
|
82
|
-
else {
|
|
83
|
-
formControl.setValue([...array, value]);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
isChecked(value) {
|
|
87
|
-
const formControl = this.group.get(this.config.name);
|
|
88
|
-
return formControl.value && formControl.value.includes(value);
|
|
89
|
-
}
|
|
90
|
-
setColumns() {
|
|
91
|
-
if (this.config.rows && this.config.rows > 1) {
|
|
92
|
-
const array = [];
|
|
93
|
-
for (let i = 0; i < this.items.length; i += this.config.rows) {
|
|
94
|
-
const arrayChunk = this.items.slice(i, i + this.config.rows);
|
|
95
|
-
array.push(arrayChunk);
|
|
96
|
-
}
|
|
97
|
-
return array;
|
|
98
|
-
}
|
|
99
|
-
else {
|
|
100
|
-
return [this.items];
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
GovUkCheckboxesComponent.ɵfac = function GovUkCheckboxesComponent_Factory(t) { return new (t || GovUkCheckboxesComponent)(); };
|
|
105
|
-
GovUkCheckboxesComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GovUkCheckboxesComponent, selectors: [["xuilib-gov-uk-checkboxes"]], inputs: { group: "group", config: "config", items: "items", errorMessage: "errorMessage" }, decls: 6, vars: 9, consts: [[1, "govuk-form-group", "gov-uk-input", 3, "formGroup", "ngClass"], [3, "config"], ["class", "govuk-hint", 3, "id", 4, "ngIf"], [3, "config", "errorMessage"], ["data-module", "govuk-checkboxes", 1, "govuk-checkboxes", "govuk-checkboxes--small", "govuk-checkboxes-multi-column"], ["class", "govuk-checkboxes-multi-column__single", 4, "ngFor", "ngForOf"], [1, "govuk-hint", 3, "id"], [1, "govuk-checkboxes-multi-column__single"], ["class", "govuk-checkboxes__item", 4, "ngFor", "ngForOf"], [1, "govuk-checkboxes__item"], ["type", "checkbox", 1, "govuk-checkboxes__input", 3, "id", "name", "checked", "value", "change"], [1, "govuk-label", "govuk-checkboxes__label", 3, "for"], ["class", "govuk-hint govuk-checkboxes__hint", 4, "ngIf"], [1, "govuk-hint", "govuk-checkboxes__hint"]], template: function GovUkCheckboxesComponent_Template(rf, ctx) { if (rf & 1) {
|
|
106
|
-
i0.ɵɵelementStart(0, "div", 0);
|
|
107
|
-
i0.ɵɵelement(1, "xuilib-gov-label", 1);
|
|
108
|
-
i0.ɵɵtemplate(2, GovUkCheckboxesComponent_span_2_Template, 2, 2, "span", 2);
|
|
109
|
-
i0.ɵɵelement(3, "xuilib-gov-uk-error-message", 3);
|
|
110
|
-
i0.ɵɵelementStart(4, "div", 4);
|
|
111
|
-
i0.ɵɵtemplate(5, GovUkCheckboxesComponent_div_5_Template, 2, 1, "div", 5);
|
|
112
|
-
i0.ɵɵelementEnd()();
|
|
113
|
-
} if (rf & 2) {
|
|
114
|
-
i0.ɵɵproperty("formGroup", ctx.group)("ngClass", i0.ɵɵpureFunction1(7, _c0, ctx.errorMessage == null ? null : ctx.errorMessage.isInvalid));
|
|
115
|
-
i0.ɵɵadvance(1);
|
|
116
|
-
i0.ɵɵproperty("config", ctx.config);
|
|
117
|
-
i0.ɵɵadvance(1);
|
|
118
|
-
i0.ɵɵproperty("ngIf", ctx.config.hint);
|
|
119
|
-
i0.ɵɵadvance(1);
|
|
120
|
-
i0.ɵɵproperty("config", ctx.config)("errorMessage", ctx.errorMessage);
|
|
121
|
-
i0.ɵɵadvance(2);
|
|
122
|
-
i0.ɵɵproperty("ngForOf", ctx.columns);
|
|
123
|
-
} }, dependencies: [i1.NgClass, i1.NgForOf, i1.NgIf, i2.NgControlStatusGroup, i2.FormGroupDirective, i3.GovUkLabelComponent, i4.GovUkErrorMessageComponent], styles: [".govuk-checkboxes-multi-column[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.govuk-checkboxes-multi-column__single[_ngcontent-%COMP%]{padding-left:20px;padding-right:20px}"] });
|
|
124
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GovUkCheckboxesComponent, [{
|
|
125
|
-
type: Component,
|
|
126
|
-
args: [{ selector: 'xuilib-gov-uk-checkboxes', template: "<div class=\"govuk-form-group gov-uk-input\" [formGroup]=\"group\"\n [ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\">\n\n <xuilib-gov-label [config]=\"config\"></xuilib-gov-label>\n\n <span *ngIf=\"config.hint\" [id]=\"config.id +'-hint'\" class=\"govuk-hint\">\n {{config.hint}}\n </span>\n\n <xuilib-gov-uk-error-message [config]=\"config\" [errorMessage]=\"errorMessage\"></xuilib-gov-uk-error-message>\n\n <div class=\"govuk-checkboxes govuk-checkboxes--small govuk-checkboxes-multi-column\" data-module=\"govuk-checkboxes\">\n <div class=\"govuk-checkboxes-multi-column__single\" *ngFor=\"let columnItems of columns\">\n <div class=\"govuk-checkboxes__item\" *ngFor=\"let item of columnItems\">\n <input type=\"checkbox\" class=\"govuk-checkboxes__input\"\n [id]=\"item.id\" [name]=\"item.id\" [checked]=\"isChecked(item.value)\" [value]=\"item.value\"\n [attr.aria-describedby]=\"setDescribedBy()\"\n (change)=\"onChecked($event.target.checked, item.value)\"\n >\n <label class=\"govuk-label govuk-checkboxes__label\" [for]=\"item.id\">\n {{ item.label }}\n </label>\n <div *ngIf=\"item.hint\" class=\"govuk-hint govuk-checkboxes__hint\">\n {{ item.hint }}\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [".govuk-checkboxes-multi-column{display:flex;flex-wrap:wrap;margin-left:-20px;margin-right:-20px}.govuk-checkboxes-multi-column__single{padding-left:20px;padding-right:20px}\n"] }]
|
|
127
|
-
}], null, { group: [{
|
|
128
|
-
type: Input
|
|
129
|
-
}], config: [{
|
|
130
|
-
type: Input
|
|
131
|
-
}], items: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], errorMessage: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}] }); })();
|
|
136
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ292LXVrLWNoZWNrYm94ZXMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZ292LXVpL2NvbXBvbmVudHMvZ292LXVrLWNoZWNrYm94ZXMvZ292LXVrLWNoZWNrYm94ZXMuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZ292LXVpL2NvbXBvbmVudHMvZ292LXVrLWNoZWNrYm94ZXMvZ292LXVrLWNoZWNrYm94ZXMuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQVUsTUFBTSxlQUFlLENBQUM7QUFDekQsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBRTNDLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxNQUFNLDBDQUEwQyxDQUFDOzs7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2Rpdj5cbiAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Component, Input } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
import * as i1 from "@angular/common";
|
|
4
|
-
import * as i2 from "@angular/forms";
|
|
5
|
-
import * as i3 from "../gov-uk-label/gov-uk-label.component";
|
|
6
|
-
import * as i4 from "../gov-uk-error-message/gov-uk-error-message.component";
|
|
7
|
-
import * as i5 from "../gov-uk-fieldset/gov-uk-fieldset.component";
|
|
8
|
-
import * as i6 from "rpx-xui-translation";
|
|
9
|
-
const _c0 = function () { return { id: "passport" }; };
|
|
10
|
-
function GovUkDateComponent_xuilib_gov_uk_error_message_3_Template(rf, ctx) { if (rf & 1) {
|
|
11
|
-
i0.ɵɵelement(0, "xuilib-gov-uk-error-message", 2);
|
|
12
|
-
} if (rf & 2) {
|
|
13
|
-
const ctx_r0 = i0.ɵɵnextContext();
|
|
14
|
-
i0.ɵɵproperty("config", i0.ɵɵpureFunction0(2, _c0))("errorMessage", ctx_r0.errorMessage);
|
|
15
|
-
} }
|
|
16
|
-
const _c1 = function (a0) { return { "govuk-form-group--error": a0 }; };
|
|
17
|
-
const _c2 = function (a0, a1, a2, a3, a4) { return { legend: a0, classes: a1, id: a2, hint: a3, isPageHeading: a4 }; };
|
|
18
|
-
const _c3 = function (a0, a1, a2) { return { label: a0, name: a1, id: a2, classes: "govuk-date-input__label" }; };
|
|
19
|
-
const _c4 = function (a0) { return { "govuk-input--error": a0 }; };
|
|
20
|
-
/*
|
|
21
|
-
* Gov UK Date Component
|
|
22
|
-
* Responsible for displaying 3 input fields:
|
|
23
|
-
* day / month / year
|
|
24
|
-
* displaying errorMessage messages
|
|
25
|
-
* */
|
|
26
|
-
export class GovUkDateComponent {
|
|
27
|
-
constructor() {
|
|
28
|
-
this.isOptional = false;
|
|
29
|
-
}
|
|
30
|
-
ngOnInit() {
|
|
31
|
-
this.day = `${this.config.id}_day`;
|
|
32
|
-
this.month = `${this.config.id}_month`;
|
|
33
|
-
this.year = `${this.config.id}_year`;
|
|
34
|
-
const dateValidator = this.DateValidator();
|
|
35
|
-
this.formGroup.get(this.day).setValidators(dateValidator);
|
|
36
|
-
}
|
|
37
|
-
isValidDate(d, month, year) {
|
|
38
|
-
const dateCheck = !isNaN(d.getTime());
|
|
39
|
-
// Month mismatch occurs if the provided day or month are invalid, or either is omitted. **Note:** This is insufficient for
|
|
40
|
-
// checking date validity when the year is omitted because it defaults to 1900 - an extra check is required
|
|
41
|
-
const monthMatch = d.getMonth() === month;
|
|
42
|
-
const yearMatch = d.getFullYear() === year;
|
|
43
|
-
return dateCheck && monthMatch && yearMatch;
|
|
44
|
-
}
|
|
45
|
-
isEmpty(value) {
|
|
46
|
-
// Note: Intentional use of == to check for null or undefined
|
|
47
|
-
/* eslint-disable eqeqeq */
|
|
48
|
-
/* tslint:disable:triple-equals */
|
|
49
|
-
// NaN and < 0 checks required for month field
|
|
50
|
-
return value == null || value === '' || isNaN(value) || value < 0;
|
|
51
|
-
/* eslint-enable eqeqeq */
|
|
52
|
-
/* tslint:enable:triple-equals */
|
|
53
|
-
}
|
|
54
|
-
DateValidator() {
|
|
55
|
-
return () => {
|
|
56
|
-
const day = this.formGroup.get(this.day).value;
|
|
57
|
-
const month = this.formGroup.get(this.month).value - 1;
|
|
58
|
-
const year = this.formGroup.get(this.year).value;
|
|
59
|
-
// Validation should pass if the date field is optional and day, month, and year are all empty
|
|
60
|
-
if (this.isOptional && this.isEmpty(day) && this.isEmpty(month) && this.isEmpty(year)) {
|
|
61
|
-
return null;
|
|
62
|
-
}
|
|
63
|
-
// + to coerce year to a number
|
|
64
|
-
return !this.isValidDate(new Date(year, month, day), month, +year) ? { dateComponent: true } : null;
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
GovUkDateComponent.ɵfac = function GovUkDateComponent_Factory(t) { return new (t || GovUkDateComponent)(); };
|
|
69
|
-
GovUkDateComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: GovUkDateComponent, selectors: [["xuilib-gov-uk-date"]], inputs: { config: "config", errorMessage: "errorMessage", formGroup: "formGroup", isOptional: "isOptional" }, decls: 20, vars: 53, consts: [[1, "govuk-form-group", 3, "ngClass", "formGroup"], [1, "date-input-container"], [3, "config", "errorMessage"], [3, "config", "errorMessage", 4, "ngIf"], [1, "govuk-date-input", 3, "id"], [1, "govuk-date-input__item"], [1, "govuk-form-group"], [3, "config"], ["type", "number", "value", "", "pattern", "[0-9]*", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-2", 3, "ngClass", "id", "name", "formControlName"], ["type", "number", "value", "", "pattern", "[0-9]*", 1, "govuk-input", "govuk-date-input__input", "govuk-input--width-4", 3, "ngClass", "id", "name", "formControlName"]], template: function GovUkDateComponent_Template(rf, ctx) { if (rf & 1) {
|
|
70
|
-
i0.ɵɵelementStart(0, "div", 0)(1, "div", 1)(2, "xuilib-gov-uk-fieldset", 2);
|
|
71
|
-
i0.ɵɵtemplate(3, GovUkDateComponent_xuilib_gov_uk_error_message_3_Template, 1, 3, "xuilib-gov-uk-error-message", 3);
|
|
72
|
-
i0.ɵɵelementStart(4, "div", 4)(5, "div", 5)(6, "div", 6);
|
|
73
|
-
i0.ɵɵelement(7, "xuilib-gov-label", 7);
|
|
74
|
-
i0.ɵɵpipe(8, "rpxTranslate");
|
|
75
|
-
i0.ɵɵelement(9, "input", 8);
|
|
76
|
-
i0.ɵɵelementEnd()();
|
|
77
|
-
i0.ɵɵelementStart(10, "div", 5)(11, "div", 6);
|
|
78
|
-
i0.ɵɵelement(12, "xuilib-gov-label", 7);
|
|
79
|
-
i0.ɵɵpipe(13, "rpxTranslate");
|
|
80
|
-
i0.ɵɵelement(14, "input", 8);
|
|
81
|
-
i0.ɵɵelementEnd()();
|
|
82
|
-
i0.ɵɵelementStart(15, "div", 5)(16, "div", 6);
|
|
83
|
-
i0.ɵɵelement(17, "xuilib-gov-label", 7);
|
|
84
|
-
i0.ɵɵpipe(18, "rpxTranslate");
|
|
85
|
-
i0.ɵɵelement(19, "input", 9);
|
|
86
|
-
i0.ɵɵelementEnd()()()()()();
|
|
87
|
-
} if (rf & 2) {
|
|
88
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(27, _c1, ctx.errorMessage == null ? null : ctx.errorMessage.isInvalid))("formGroup", ctx.formGroup);
|
|
89
|
-
i0.ɵɵadvance(2);
|
|
90
|
-
i0.ɵɵproperty("config", i0.ɵɵpureFunction5(29, _c2, ctx.config.label || "Date component", ctx.config.classes || "govuk-label--m", ctx.config.id, ctx.config.hint != null ? ctx.config.hint : "For example, 12 11 2007", ctx.config.isPageHeading || false))("errorMessage", ctx.errorMessage);
|
|
91
|
-
i0.ɵɵadvance(1);
|
|
92
|
-
i0.ɵɵproperty("ngIf", ctx.errorMessage);
|
|
93
|
-
i0.ɵɵadvance(1);
|
|
94
|
-
i0.ɵɵproperty("id", ctx.config.id + "-date");
|
|
95
|
-
i0.ɵɵadvance(3);
|
|
96
|
-
i0.ɵɵproperty("config", i0.ɵɵpureFunction3(35, _c3, i0.ɵɵpipeBind1(8, 21, "Day"), ctx.config.id + "-day", ctx.config.id + "-day"));
|
|
97
|
-
i0.ɵɵadvance(2);
|
|
98
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(39, _c4, ctx.errorMessage == null ? null : ctx.errorMessage.isInvalid))("id", ctx.config.id)("name", ctx.config.id + "-day")("formControlName", ctx.config.id + "_day");
|
|
99
|
-
i0.ɵɵadvance(3);
|
|
100
|
-
i0.ɵɵproperty("config", i0.ɵɵpureFunction3(41, _c3, i0.ɵɵpipeBind1(13, 23, "Month"), ctx.config.id + "-month", ctx.config.id + "-month"));
|
|
101
|
-
i0.ɵɵadvance(2);
|
|
102
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(45, _c4, ctx.errorMessage == null ? null : ctx.errorMessage.isInvalid))("id", ctx.config.id + "-month")("name", ctx.config.id + "-month")("formControlName", ctx.config.id + "_month");
|
|
103
|
-
i0.ɵɵadvance(3);
|
|
104
|
-
i0.ɵɵproperty("config", i0.ɵɵpureFunction3(47, _c3, i0.ɵɵpipeBind1(18, 25, "Year"), ctx.config.id + "-year", ctx.config.id + "-year"));
|
|
105
|
-
i0.ɵɵadvance(2);
|
|
106
|
-
i0.ɵɵproperty("ngClass", i0.ɵɵpureFunction1(51, _c4, ctx.errorMessage == null ? null : ctx.errorMessage.isInvalid))("id", ctx.config.id + "-year")("name", ctx.config.id + "-year")("formControlName", ctx.config.id + "_year");
|
|
107
|
-
} }, dependencies: [i1.NgClass, i1.NgIf, i2.DefaultValueAccessor, i2.NumberValueAccessor, i2.NgControlStatus, i2.NgControlStatusGroup, i2.PatternValidator, i2.FormGroupDirective, i2.FormControlName, i3.GovUkLabelComponent, i4.GovUkErrorMessageComponent, i5.GovUkFieldsetComponent, i6.RpxTranslatePipe], styles: [".govuk-form-group[_ngcontent-%COMP%] .date-input-container[_ngcontent-%COMP%]{margin-bottom:30px}.govuk-form-group[_ngcontent-%COMP%] .date-input-container[_ngcontent-%COMP%] .govuk-date-input[_ngcontent-%COMP%] .govuk-date-input__item[_ngcontent-%COMP%] .govuk-form-group[_ngcontent-%COMP%]{margin-bottom:0}"] });
|
|
108
|
-
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GovUkDateComponent, [{
|
|
109
|
-
type: Component,
|
|
110
|
-
args: [{ selector: 'xuilib-gov-uk-date', template: "<div class=\"govuk-form-group\" [ngClass]=\"{'govuk-form-group--error': errorMessage?.isInvalid}\" [formGroup]=\"formGroup\">\n <div class=\"date-input-container\">\n <xuilib-gov-uk-fieldset\n [config]=\"{\n legend: config.label || 'Date component',\n classes: config.classes || 'govuk-label--m',\n id: config.id,\n hint: config.hint != null ? config.hint : 'For example, 12 11 2007',\n isPageHeading: config.isPageHeading || false}\"\n [errorMessage]=\"errorMessage\">\n <xuilib-gov-uk-error-message\n [config]=\"{id: 'passport'}\"\n *ngIf=\"errorMessage\"\n [errorMessage]=\"errorMessage\">\n </xuilib-gov-uk-error-message>\n <div class=\"govuk-date-input\" [id]=\"config.id+'-date'\">\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Day' | rpxTranslate, name: config.id+'-day', id: config.id+'-day', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id\"\n [name]=\"config.id+'-day'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_day'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Month' | rpxTranslate, name: config.id+'-month', id: config.id+'-month', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-2\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-month'\"\n [name]=\"config.id+'-month'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_month'\">\n </div>\n </div>\n <div class=\"govuk-date-input__item\">\n <div class=\"govuk-form-group\">\n <xuilib-gov-label\n [config]=\"{label: 'Year' | rpxTranslate, name: config.id+'-year', id: config.id+'-year', classes: 'govuk-date-input__label'}\">\n </xuilib-gov-label>\n <input class=\"govuk-input govuk-date-input__input govuk-input--width-4\"\n [ngClass]=\"{'govuk-input--error': errorMessage?.isInvalid}\"\n [id]=\"config.id+'-year'\"\n [name]=\"config.id+'-year'\" type=\"number\" value=\"\" pattern=\"[0-9]*\"\n [formControlName]=\"config.id+'_year'\">\n </div>\n </div>\n </div>\n </xuilib-gov-uk-fieldset>\n </div>\n</div>\n", styles: [".govuk-form-group .date-input-container{margin-bottom:30px}.govuk-form-group .date-input-container .govuk-date-input .govuk-date-input__item .govuk-form-group{margin-bottom:0}\n"] }]
|
|
111
|
-
}], function () { return []; }, { config: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], errorMessage: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], formGroup: [{
|
|
116
|
-
type: Input
|
|
117
|
-
}], isOptional: [{
|
|
118
|
-
type: Input
|
|
119
|
-
}] }); })();
|
|
120
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ292LXVrLWRhdGUuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZ292LXVpL2NvbXBvbmVudHMvZ292LXVrLWRhdGUvZ292LXVrLWRhdGUuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZXh1aS1jb21tb24tbGliL3NyYy9saWIvZ292LXVpL2NvbXBvbmVudHMvZ292LXVrLWRhdGUvZ292LXVrLWRhdGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFDVCxLQUFLLEVBRU4sTUFBTSxlQUFlLENBQUM7Ozs7Ozs7Ozs7SUNNakIsaURBSThCOzs7SUFINUIsbURBQTJCLHFDQUFBOzs7Ozs7QURIbkM7Ozs7O0tBS0s7QUFNTCxNQUFNLE9BQU8sa0JBQWtCO0lBQzdCO1FBSWdCLGVBQVUsR0FBWSxLQUFLLENBQUM7SUFKN0IsQ0FBQztJQVVULFFBQVE7UUFDYixJQUFJLENBQUMsR0FBRyxHQUFHLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxFQUFFLE1BQU0sQ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4gICAgICAgICAgICA8eHVpbGliLWdvdi1sYWJlbFxuICAgICAgICAgICAgICBbY29uZmlnXT1cIntsYWJlbDogJ01vbnRoJyB8IHJweFRyYW5zbGF0ZSwgbmFtZTogY29uZmlnLmlkKyctbW9udGgnLCBpZDogY29uZmlnLmlkKyctbW9udGgnLCBjbGFzc2VzOiAnZ292dWstZGF0ZS1pbnB1dF9fbGFiZWwnfVwiPlxuICAgICAgICAgICAgPC94dWlsaWItZ292LWxhYmVsPlxuICAgICAgICAgICAgPGlucHV0IGNsYXNzPVwiZ292dWstaW5wdXQgZ292dWstZGF0ZS1pbnB1dF9faW5wdXQgZ292dWstaW5wdXQtLXdpZHRoLTJcIlxuICAgICAgICAgICAgICAgICAgIFtuZ0NsYXNzXT1cInsnZ292dWstaW5wdXQtLWVycm9yJzogZXJyb3JNZXNzYWdlPy5pc0ludmFsaWR9XCJcbiAgICAgICAgICAgICAgICAgICBbaWRdPVwiY29uZmlnLmlkKyctbW9udGgnXCJcbiAgICAgICAgICAgICAgICAgICBbbmFtZV09XCJjb25maWcuaWQrJy1tb250aCdcIiB0eXBlPVwibnVtYmVyXCIgdmFsdWU9XCJcIiBwYXR0ZXJuPVwiWzAtOV0qXCJcbiAgICAgICAgICAgICAgICAgICBbZm9ybUNvbnRyb2xOYW1lXT1cImNvbmZpZy5pZCsnX21vbnRoJ1wiPlxuICAgICAgICAgIDwvZGl2PlxuICAgICAgICA8L2Rpdj5cbiAgICAgICAgPGRpdiBjbGFzcz1cImdvdnVrLWRhdGUtaW5wdXRfX2l0ZW1cIj5cbiAgICAgICAgICA8ZGl2IGNsYXNzPVwiZ292dWstZm9ybS1ncm91cFwiPlxuICAgICAgICAgICAgPHh1aWxpYi1nb3YtbGFiZWxcbiAgICAgICAgICAgICAgW2NvbmZpZ109XCJ7bGFiZWw6ICdZZWFyJyB8IHJweFRyYW5zbGF0ZSwgbmFtZTogY29uZmlnLmlkKycteWVhcicsIGlkOiBjb25maWcuaWQrJy15ZWFyJywg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