@hmcts/opal-frontend-common 0.0.47 → 0.0.49
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/components/abstract/abstract-form-base/index.d.ts +4 -1
- package/fesm2022/{hmcts-opal-frontend-common-access-denied.component-dFPqF73L.mjs → hmcts-opal-frontend-common-access-denied.component-CwC-AqJA.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-access-denied.component-dFPqF73L.mjs.map → hmcts-opal-frontend-common-access-denied.component-CwC-AqJA.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-alias-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-array-removal-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs +9 -4
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-form-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-nested-form-base.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table-pagination.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-sortable-table.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-abstract-abstract-table-filter.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-alphagov-alphagov-accessible-autocomplete.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-label.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item-custom-account-information-item-value.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information-custom-account-information-item.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-account-information.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-action-links.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-horizontal-scroll-pane.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-page-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes-custom-scrollable-panes-inner-pane.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-scrollable-panes.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-label.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item-custom-summary-metric-bar-item-value.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar-custom-summary-metric-bar-item.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-summary-metric-bar.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-inner-pane.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane-custom-vertical-scroll-pane-outer-pane.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-custom-custom-vertical-scroll-pane.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-accordion.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-back-link.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-button.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-cancel-link.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-checkboxes.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-date-input.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-details.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-error-summary.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-footer.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-heading-with-caption.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-inset-text.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list-govuk-list-link.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-notification-banner.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-pagination.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-radio.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-select.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-card-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-summary-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs +12 -12
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-table.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-list-item.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs-govuk-tabs-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tabs.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-tag.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-task-list.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-area.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input-prefix-suffix.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-govuk-govuk-text-input.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-hod-hod-loading-spinner.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs +21 -21
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-alert.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu-moj-button-menu-item.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-button-menu.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-date-picker.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-item.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option-moj-filter-panel-option-form-group-keyword.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-option.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected-moj-filter-panel-selected-tag.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel-moj-filter-panel-selected.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter-moj-filter-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-filter.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-notification-badge.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-page-header.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-pagination.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-primary-navigation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs +18 -18
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sortable-table.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-sub-navigation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-ticket-panel.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs +6 -6
- package/fesm2022/hmcts-opal-frontend-common-components-moj-moj-timeline.mjs.map +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-B44V5uH3.mjs → hmcts-opal-frontend-common-concurrency-failure.component-apu3f4Gj.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-concurrency-failure.component-B44V5uH3.mjs.map → hmcts-opal-frontend-common-concurrency-failure.component-apu3f4Gj.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-capitalisation.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-directives-govuk-button.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs +2 -1
- package/fesm2022/hmcts-opal-frontend-common-interceptors-http-error.mjs.map +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component--U40lt8r.mjs → hmcts-opal-frontend-common-internal-server-error.component-BSeyK7ia.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-internal-server-error.component--U40lt8r.mjs.map → hmcts-opal-frontend-common-internal-server-error.component-BSeyK7ia.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-dFPqF73L.mjs → hmcts-opal-frontend-common-pages-access-denied.component-CwC-AqJA.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-access-denied.component-dFPqF73L.mjs.map → hmcts-opal-frontend-common-pages-access-denied.component-CwC-AqJA.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-B44V5uH3.mjs → hmcts-opal-frontend-common-pages-concurrency-failure.component-apu3f4Gj.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-concurrency-failure.component-B44V5uH3.mjs.map → hmcts-opal-frontend-common-pages-concurrency-failure.component-apu3f4Gj.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component--U40lt8r.mjs → hmcts-opal-frontend-common-pages-internal-server-error.component-BSeyK7ia.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-internal-server-error.component--U40lt8r.mjs.map → hmcts-opal-frontend-common-pages-internal-server-error.component-BSeyK7ia.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-DhK3JRl_.mjs → hmcts-opal-frontend-common-pages-permission-denied.component-BwvbwXWg.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-permission-denied.component-DhK3JRl_.mjs.map → hmcts-opal-frontend-common-pages-permission-denied.component-BwvbwXWg.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages-routing-constants.mjs.map +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-c5YhkBED.mjs → hmcts-opal-frontend-common-pages-sign-in-stub.component-D1xiH9Ej.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in-stub.component-c5YhkBED.mjs.map → hmcts-opal-frontend-common-pages-sign-in-stub.component-D1xiH9Ej.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DX9aGho7.mjs → hmcts-opal-frontend-common-pages-sign-in.component-F-Cw2Ifc.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-pages-sign-in.component-DX9aGho7.mjs.map → hmcts-opal-frontend-common-pages-sign-in.component-F-Cw2Ifc.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pages.mjs +5 -5
- package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-DhK3JRl_.mjs → hmcts-opal-frontend-common-permission-denied.component-BwvbwXWg.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-permission-denied.component-DhK3JRl_.mjs.map → hmcts-opal-frontend-common-permission-denied.component-BwvbwXWg.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-date-format.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-days-ago.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-pipes-national-insurance.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-resolvers-title.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-initializer-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-app-insights-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-auth-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-date-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-launch-darkly-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-opal-user-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-permissions-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-session-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-sort-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transfer-state-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-transformation-service.mjs.map +1 -1
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs +3 -3
- package/fesm2022/hmcts-opal-frontend-common-services-utils-service.mjs.map +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-c5YhkBED.mjs → hmcts-opal-frontend-common-sign-in-stub.component-D1xiH9Ej.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-sign-in-stub.component-c5YhkBED.mjs.map → hmcts-opal-frontend-common-sign-in-stub.component-D1xiH9Ej.mjs.map} +1 -1
- package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-DrkgJ0xr.mjs → hmcts-opal-frontend-common-sign-in.component-BB2B6CH-.mjs} +4 -4
- package/fesm2022/{hmcts-opal-frontend-common-sign-in.component-DrkgJ0xr.mjs.map → hmcts-opal-frontend-common-sign-in.component-BB2B6CH-.mjs.map} +1 -1
- package/fesm2022/hmcts-opal-frontend-common.mjs +5 -5
- package/package.json +8 -8
|
@@ -8,10 +8,10 @@ class TitleResolver {
|
|
|
8
8
|
const title = route.data['title'] ?? 'Frontend';
|
|
9
9
|
this.titleService.setTitle(`OPAL - ${title}`);
|
|
10
10
|
}
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
12
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TitleResolver, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TitleResolver, providedIn: 'root' });
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TitleResolver, decorators: [{
|
|
15
15
|
type: Injectable,
|
|
16
16
|
args: [{
|
|
17
17
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-resolvers-title.mjs","sources":["../../../projects/opal-frontend-common/resolvers/title/title.resolver.ts","../../../projects/opal-frontend-common/resolvers/title/hmcts-opal-frontend-common-resolvers-title.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot } from '@angular/router';\nimport { Title } from '@angular/platform-browser';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleResolver implements Resolve<void> {\n private readonly titleService = inject(Title);\n\n resolve(route: ActivatedRouteSnapshot): void {\n const title = route.data['title'] ?? 'Frontend';\n this.titleService.setTitle(`OPAL - ${title}`);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,aAAa,CAAA;AACP,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;AAE7C,IAAA,OAAO,CAAC,KAA6B,EAAA;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU;QAC/C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA,OAAA,EAAU,KAAK,CAAA,CAAE,CAAC;IAC/C;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-resolvers-title.mjs","sources":["../../../projects/opal-frontend-common/resolvers/title/title.resolver.ts","../../../projects/opal-frontend-common/resolvers/title/hmcts-opal-frontend-common-resolvers-title.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { Resolve, ActivatedRouteSnapshot } from '@angular/router';\nimport { Title } from '@angular/platform-browser';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TitleResolver implements Resolve<void> {\n private readonly titleService = inject(Title);\n\n resolve(route: ActivatedRouteSnapshot): void {\n const title = route.data['title'] ?? 'Frontend';\n this.titleService.setTitle(`OPAL - ${title}`);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,aAAa,CAAA;AACP,IAAA,YAAY,GAAG,MAAM,CAAC,KAAK,CAAC;AAE7C,IAAA,OAAO,CAAC,KAA6B,EAAA;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,UAAU;QAC/C,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAA,OAAA,EAAU,KAAK,CAAA,CAAE,CAAC;IAC/C;wGANW,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAb,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,aAAa,cAFZ,MAAM,EAAA,CAAA;;4FAEP,aAAa,EAAA,UAAA,EAAA,CAAA;kBAHzB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -35,10 +35,10 @@ class AppInitializerService {
|
|
|
35
35
|
this.initializeAppInsights();
|
|
36
36
|
await this.appInsightsService.initialize();
|
|
37
37
|
}
|
|
38
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
39
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
38
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInitializerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
39
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInitializerService, providedIn: 'root' });
|
|
40
40
|
}
|
|
41
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
41
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInitializerService, decorators: [{
|
|
42
42
|
type: Injectable,
|
|
43
43
|
args: [{
|
|
44
44
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-app-initializer-service.mjs","sources":["../../../projects/opal-frontend-common/services/app-initializer-service/app-initializer.service.ts","../../../projects/opal-frontend-common/services/app-initializer-service/hmcts-opal-frontend-common-services-app-initializer-service.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { TransferStateService } from '@hmcts/opal-frontend-common/services/transfer-state-service';\nimport { AppInsightsService } from '@hmcts/opal-frontend-common/services/app-insights-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppInitializerService {\n private readonly transferStateService = inject(TransferStateService);\n private readonly appInsightsService = inject(AppInsightsService);\n\n /**\n * Initializes the SSO (Single Sign-On) enabled state.\n * This method calls the `initializeSsoEnabled` method of the `transferStateService`.\n */\n private initializeSsoEnabled(): void {\n this.transferStateService.initializeSsoEnabled();\n }\n\n /**\n * Initializes the LaunchDarkly configuration.\n */\n private initializeLaunchDarkly(): void {\n this.transferStateService.initializeLaunchDarklyConfig();\n }\n\n /**\n * Initializes the Application Insights configuration.\n */\n private initializeAppInsights(): void {\n this.transferStateService.initializeAppInsightsConfig();\n }\n\n /**\n * Initializes the application.\n * This method calls the necessary initialization functions.\n */\n public async initializeApp(): Promise<void> {\n this.initializeSsoEnabled();\n this.initializeLaunchDarkly();\n this.initializeAppInsights();\n await this.appInsightsService.initialize();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,qBAAqB,CAAA;AACf,IAAA,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACnD,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEhE;;;AAGG;IACK,oBAAoB,GAAA;AAC1B,QAAA,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE;IAClD;AAEA;;AAEG;IACK,sBAAsB,GAAA;AAC5B,QAAA,IAAI,CAAC,oBAAoB,CAAC,4BAA4B,EAAE;IAC1D;AAEA;;AAEG;IACK,qBAAqB,GAAA;AAC3B,QAAA,IAAI,CAAC,oBAAoB,CAAC,2BAA2B,EAAE;IACzD;AAEA;;;AAGG;AACI,IAAA,MAAM,aAAa,GAAA;QACxB,IAAI,CAAC,oBAAoB,EAAE;QAC3B,IAAI,CAAC,sBAAsB,EAAE;QAC7B,IAAI,CAAC,qBAAqB,EAAE;AAC5B,QAAA,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;IAC5C;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-app-initializer-service.mjs","sources":["../../../projects/opal-frontend-common/services/app-initializer-service/app-initializer.service.ts","../../../projects/opal-frontend-common/services/app-initializer-service/hmcts-opal-frontend-common-services-app-initializer-service.ts"],"sourcesContent":["import { Injectable, inject } from '@angular/core';\nimport { TransferStateService } from '@hmcts/opal-frontend-common/services/transfer-state-service';\nimport { AppInsightsService } from '@hmcts/opal-frontend-common/services/app-insights-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppInitializerService {\n private readonly transferStateService = inject(TransferStateService);\n private readonly appInsightsService = inject(AppInsightsService);\n\n /**\n * Initializes the SSO (Single Sign-On) enabled state.\n * This method calls the `initializeSsoEnabled` method of the `transferStateService`.\n */\n private initializeSsoEnabled(): void {\n this.transferStateService.initializeSsoEnabled();\n }\n\n /**\n * Initializes the LaunchDarkly configuration.\n */\n private initializeLaunchDarkly(): void {\n this.transferStateService.initializeLaunchDarklyConfig();\n }\n\n /**\n * Initializes the Application Insights configuration.\n */\n private initializeAppInsights(): void {\n this.transferStateService.initializeAppInsightsConfig();\n }\n\n /**\n * Initializes the application.\n * This method calls the necessary initialization functions.\n */\n public async initializeApp(): Promise<void> {\n this.initializeSsoEnabled();\n this.initializeLaunchDarkly();\n this.initializeAppInsights();\n await this.appInsightsService.initialize();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,qBAAqB,CAAA;AACf,IAAA,oBAAoB,GAAG,MAAM,CAAC,oBAAoB,CAAC;AACnD,IAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAEhE;;;AAGG;IACK,oBAAoB,GAAA;AAC1B,QAAA,IAAI,CAAC,oBAAoB,CAAC,oBAAoB,EAAE;IAClD;AAEA;;AAEG;IACK,sBAAsB,GAAA;AAC5B,QAAA,IAAI,CAAC,oBAAoB,CAAC,4BAA4B,EAAE;IAC1D;AAEA;;AAEG;IACK,qBAAqB,GAAA;AAC3B,QAAA,IAAI,CAAC,oBAAoB,CAAC,2BAA2B,EAAE;IACzD;AAEA;;;AAGG;AACI,IAAA,MAAM,aAAa,GAAA;QACxB,IAAI,CAAC,oBAAoB,EAAE;QAC3B,IAAI,CAAC,sBAAsB,EAAE;QAC7B,IAAI,CAAC,qBAAqB,EAAE;AAC5B,QAAA,MAAM,IAAI,CAAC,kBAAkB,CAAC,UAAU,EAAE;IAC5C;wGAnCW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAArB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,cAFpB,MAAM,EAAA,CAAA;;4FAEP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAHjC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -48,10 +48,10 @@ class AppInsightsService {
|
|
|
48
48
|
async initialize() {
|
|
49
49
|
await this.initializeAppInsights();
|
|
50
50
|
}
|
|
51
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
52
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInsightsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
52
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInsightsService, providedIn: 'root' });
|
|
53
53
|
}
|
|
54
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AppInsightsService, decorators: [{
|
|
55
55
|
type: Injectable,
|
|
56
56
|
args: [{
|
|
57
57
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-app-insights-service.mjs","sources":["../../../projects/opal-frontend-common/services/app-insights-service/app-insights.service.ts","../../../projects/opal-frontend-common/services/app-insights-service/hmcts-opal-frontend-common-services-app-insights-service.ts"],"sourcesContent":["import { inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { ITelemetryItem } from '@microsoft/applicationinsights-web';\nimport { isPlatformBrowser } from '@angular/common';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppInsightsService {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private appInsights!: any;\n private isInitialized = false;\n private readonly globalStore = inject(GlobalStore);\n private readonly platformId = inject(PLATFORM_ID);\n\n private async initializeAppInsights(): Promise<void> {\n const { ApplicationInsights } = await import('@microsoft/applicationinsights-web');\n const config = this.globalStore.appInsightsConfig();\n if (isPlatformBrowser(this.platformId) && config.enabled) {\n this.appInsights = new ApplicationInsights({\n config: {\n connectionString: config.connectionString,\n enableAutoRouteTracking: true,\n },\n });\n\n this.appInsights.addTelemetryInitializer(this.telemetryInitializer.bind(this));\n this.appInsights.loadAppInsights();\n\n this.isInitialized = true;\n }\n }\n\n private telemetryInitializer(envelope: ITelemetryItem): void {\n envelope.tags = envelope.tags || {};\n const config = this.globalStore.appInsightsConfig();\n if (config.enabled) {\n envelope.tags['ai.cloud.role'] = config.cloudRoleName!;\n }\n }\n\n public logPageView(name?: string, url?: string): void {\n const config = this.globalStore.appInsightsConfig();\n if (!this.isInitialized || !config.enabled) {\n return;\n }\n this.appInsights.trackPageView({ name, uri: url });\n }\n\n public logException(exception: Error, severityLevel?: number): void {\n const config = this.globalStore.appInsightsConfig();\n if (!this.isInitialized || !config.enabled) {\n return;\n }\n this.appInsights.trackException({ exception, severityLevel });\n }\n\n public async initialize(): Promise<void> {\n await this.initializeAppInsights();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,kBAAkB,CAAA;;AAErB,IAAA,WAAW;IACX,aAAa,GAAG,KAAK;AACZ,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEzC,IAAA,MAAM,qBAAqB,GAAA;QACjC,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,OAAO,oCAAoC,CAAC;QAClF,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE;QACnD,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE;AACxD,YAAA,IAAI,CAAC,WAAW,GAAG,IAAI,mBAAmB,CAAC;AACzC,gBAAA,MAAM,EAAE;oBACN,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;AACzC,oBAAA,uBAAuB,EAAE,IAAI;AAC9B,iBAAA;AACF,aAAA,CAAC;AAEF,YAAA,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC9E,YAAA,IAAI,CAAC,WAAW,CAAC,eAAe,EAAE;AAElC,YAAA,IAAI,CAAC,aAAa,GAAG,IAAI;QAC3B;IACF;AAEQ,IAAA,oBAAoB,CAAC,QAAwB,EAAA;QACnD,QAAQ,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,IAAI,EAAE;QACnC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE;AACnD,QAAA,IAAI,MAAM,CAAC,OAAO,EAAE;YAClB,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,GAAG,MAAM,CAAC,aAAc;QACxD;IACF;IAEO,WAAW,CAAC,IAAa,EAAE,GAAY,EAAA;QAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE;QACnD,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1C;QACF;AACA,QAAA,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACpD;IAEO,YAAY,CAAC,SAAgB,EAAE,aAAsB,EAAA;QAC1D,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE;QACnD,IAAI,CAAC,IAAI,CAAC,aAAa,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE;YAC1C;QACF;QACA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;IAC/D;AAEO,IAAA,MAAM,UAAU,GAAA;AACrB,QAAA,MAAM,IAAI,CAAC,qBAAqB,EAAE;IACpC;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-app-insights-service.mjs","sources":["../../../projects/opal-frontend-common/services/app-insights-service/app-insights.service.ts","../../../projects/opal-frontend-common/services/app-insights-service/hmcts-opal-frontend-common-services-app-insights-service.ts"],"sourcesContent":["import { inject, Injectable, PLATFORM_ID } from '@angular/core';\nimport { ITelemetryItem } from '@microsoft/applicationinsights-web';\nimport { isPlatformBrowser } from '@angular/common';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AppInsightsService {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private appInsights!: any;\n private isInitialized = false;\n private readonly globalStore = inject(GlobalStore);\n private readonly platformId = inject(PLATFORM_ID);\n\n private async initializeAppInsights(): Promise<void> {\n const { ApplicationInsights } = await import('@microsoft/applicationinsights-web');\n const config = this.globalStore.appInsightsConfig();\n if (isPlatformBrowser(this.platformId) && config.enabled) {\n this.appInsights = new ApplicationInsights({\n config: {\n connectionString: config.connectionString,\n enableAutoRouteTracking: true,\n },\n });\n\n this.appInsights.addTelemetryInitializer(this.telemetryInitializer.bind(this));\n this.appInsights.loadAppInsights();\n\n this.isInitialized = true;\n }\n }\n\n private telemetryInitializer(envelope: ITelemetryItem): void {\n envelope.tags = envelope.tags || {};\n const config = this.globalStore.appInsightsConfig();\n if (config.enabled) {\n envelope.tags['ai.cloud.role'] = config.cloudRoleName!;\n }\n }\n\n public logPageView(name?: string, url?: string): void {\n const config = this.globalStore.appInsightsConfig();\n if (!this.isInitialized || !config.enabled) {\n return;\n }\n this.appInsights.trackPageView({ name, uri: url });\n }\n\n public logException(exception: Error, severityLevel?: number): void {\n const config = this.globalStore.appInsightsConfig();\n if (!this.isInitialized || !config.enabled) {\n return;\n }\n this.appInsights.trackException({ exception, severityLevel });\n }\n\n public async initialize(): Promise<void> {\n await this.initializeAppInsights();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,kBAAkB,CAAA;;AAErB,IAAA,WAAW;IACX,aAAa,GAAG,KAAK;AACZ,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;AAEzC,IAAA,MAAM,qBAAqB,GAAA;QACjC,MAAM,EAAE,mBAAmB,EAAE,GAAG,MAAM,OAAO,oCAAoC,CAAC;QAClF,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,CAAC,iBAAiB,EAAE;QACnD,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,OAAO,EAAE;AACxD,YAAA,IAAI,CAAC,WAAW,GAAG,IAAI,mBAAmB,CAAC;AACzC,gBAAA,MAAM,EAAE;oBACN,gBAAgB,EAAE,MAAM,CAAC,gBAAgB;AACzC,oBAAA,uBAAuB,EAAE,IAAI;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AA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA;;4FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACPD;;AAEG;;;;"}
|
|
@@ -25,10 +25,10 @@ class AuthService {
|
|
|
25
25
|
return throwError(() => error);
|
|
26
26
|
}));
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AuthService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{
|
|
34
34
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-auth-service.mjs","sources":["../../../projects/opal-frontend-common/services/auth-service/auth.service.ts","../../../projects/opal-frontend-common/services/auth-service/hmcts-opal-frontend-common-services-auth-service.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { catchError, tap, throwError } from 'rxjs';\nimport { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n\n public checkAuthenticated() {\n return this.http\n .get<boolean>(SSO_ENDPOINTS.authenticated, {\n headers: new HttpHeaders({\n 'Cache-Control': 'no-cache',\n Pragma: 'no-cache',\n Expires: '0',\n }),\n })\n .pipe(\n tap((resp) => {\n this.globalStore.setAuthenticated(resp);\n }),\n )\n .pipe(\n catchError((error) => {\n this.globalStore.setAuthenticated(false);\n return throwError(() => error);\n }),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MASa,WAAW,CAAA;AACL,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAE3C,kBAAkB,GAAA;QACvB,OAAO,IAAI,CAAC;AACT,aAAA,GAAG,CAAU,aAAa,CAAC,aAAa,EAAE;YACzC,OAAO,EAAE,IAAI,WAAW,CAAC;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,MAAM,EAAE,UAAU;AAClB,gBAAA,OAAO,EAAE,GAAG;aACb,CAAC;SACH;AACA,aAAA,IAAI,CACH,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,YAAA,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC;AACzC,QAAA,CAAC,CAAC;AAEH,aAAA,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,KAAI;AACnB,YAAA,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC;AACxC,YAAA,OAAO,UAAU,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,CAAC,CACH;IACL;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-auth-service.mjs","sources":["../../../projects/opal-frontend-common/services/auth-service/auth.service.ts","../../../projects/opal-frontend-common/services/auth-service/hmcts-opal-frontend-common-services-auth-service.ts"],"sourcesContent":["import { HttpClient, HttpHeaders } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { catchError, tap, throwError } from 'rxjs';\nimport { SSO_ENDPOINTS } from '@hmcts/opal-frontend-common/services/auth-service/constants';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AuthService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n\n public checkAuthenticated() {\n return this.http\n .get<boolean>(SSO_ENDPOINTS.authenticated, {\n headers: new HttpHeaders({\n 'Cache-Control': 'no-cache',\n Pragma: 'no-cache',\n Expires: '0',\n }),\n })\n .pipe(\n tap((resp) => {\n this.globalStore.setAuthenticated(resp);\n }),\n )\n .pipe(\n catchError((error) => {\n this.globalStore.setAuthenticated(false);\n return throwError(() => error);\n }),\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;MASa,WAAW,CAAA;AACL,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IAE3C,kBAAkB,GAAA;QACvB,OAAO,IAAI,CAAC;AACT,aAAA,GAAG,CAAU,aAAa,CAAC,aAAa,EAAE;YACzC,OAAO,EAAE,IAAI,WAAW,CAAC;AACvB,gBAAA,eAAe,EAAE,UAAU;AAC3B,gBAAA,MAAM,EAAE,UAAU;AAClB,gBAAA,OAAO,EAAE,GAAG;aACb,CAAC;SACH;AACA,aAAA,IAAI,CACH,GAAG,CAAC,CAAC,IAAI,KAAI;AACX,YAAA,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC;AACzC,QAAA,CAAC,CAAC;AAEH,aAAA,IAAI,CACH,UAAU,CAAC,CAAC,KAAK,KAAI;AACnB,YAAA,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,CAAC;AACxC,YAAA,OAAO,UAAU,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,CAAC,CACH;IACL;wGAxBW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAX,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -216,10 +216,10 @@ class DateService {
|
|
|
216
216
|
to: this.toFormat(this.getFromIso(dateTo), format),
|
|
217
217
|
};
|
|
218
218
|
}
|
|
219
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
220
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
219
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
220
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DateService, providedIn: 'root' });
|
|
221
221
|
}
|
|
222
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
222
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: DateService, decorators: [{
|
|
223
223
|
type: Injectable,
|
|
224
224
|
args: [{
|
|
225
225
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-date-service.mjs","sources":["../../../projects/opal-frontend-common/services/date-service/date.service.ts","../../../projects/opal-frontend-common/services/date-service/hmcts-opal-frontend-common-services-date-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { DateTime, Duration, DurationLikeObject } from 'luxon';\nimport { IDateRange, IAgeObject } from './interfaces/date.service.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DateService {\n /**\n * Calculates the difference in minutes between two DateTime objects.\n * @param startDate The start date and time.\n * @param endDate The end date and time.\n * @returns The difference in minutes between the start and end dates.\n */\n public calculateMinutesDifference(startDate: DateTime, endDate: DateTime): number {\n const minuteDifference = endDate.diff(startDate, 'minutes');\n return Math.max(0, Math.ceil(minuteDifference.minutes));\n }\n\n /**\n * Converts milliseconds to minutes.\n * @param milliseconds - The number of milliseconds to convert.\n * @returns The equivalent number of minutes.\n */\n public convertMillisecondsToMinutes(milliseconds: number): number {\n const minutes = Duration.fromMillis(milliseconds).as('minutes');\n return Math.max(0, Math.ceil(minutes));\n }\n\n /**\n * Calculates the age based on the given date of birth.\n * @param dateOfBirth - The date of birth to calculate the age from.\n * @param format - The format of the date of birth. Defaults to 'dd/MM/yyyy'.\n * @returns The calculated age.\n */\n public calculateAge(dateOfBirth: DateTime | string, format: string = 'dd/MM/yyyy'): number {\n const date = typeof dateOfBirth === 'string' ? this.getFromFormat(dateOfBirth, format) : dateOfBirth;\n\n return Math.floor(DateTime.now().diff(date, 'years').years);\n }\n\n /**\n * Checks if a given date is valid.\n * @param dateInput - The date to be checked. It can be a DateTime object, a string, or null.\n * @param format - The format of the date string (default: 'dd/MM/yyyy').\n * @returns A boolean indicating whether the date is valid or not.\n */\n public isValidDate(dateInput: DateTime | string | null, format: string = 'dd/MM/yyyy'): boolean {\n if (dateInput) {\n const date = typeof dateInput === 'string' ? this.getFromFormat(dateInput, format) : dateInput;\n return date.isValid;\n }\n return false;\n }\n\n /**\n * Returns a string representation of a date subtracted by the given duration.\n * @param duration A DurationLikeObject representing the amount of time to subtract from the current date.\n * @returns A string representing the subtracted date in the format specified by the current locale.\n */\n public getPreviousDate(duration: DurationLikeObject): string {\n return DateTime.now().minus(duration).setLocale('en-gb').toLocaleString();\n }\n\n /**\n * Parses a string value into a DateTime object based on the specified format.\n * @param value - The string value to parse.\n * @param format - The format of the string value.\n * @returns A DateTime object representing the parsed value.\n */\n public getFromFormat(value: string, format: string): DateTime<true> | DateTime<false> {\n return DateTime.fromFormat(value, format);\n }\n\n /**\n * Returns an object containing the age and age group based on the date of birth.\n * @param dateOfBirth - The date of birth to calculate the age from.\n * @returns An object containing the age value and group ('Adult' or 'Youth') if the date is valid, or null if the date is invalid.\n */\n public getAgeObject(dateOfBirth: string): IAgeObject | null {\n if (this.isValidDate(dateOfBirth)) {\n const age = this.calculateAge(dateOfBirth);\n return {\n value: age,\n group: age >= 18 ? 'Adult' : 'Youth',\n };\n }\n return null;\n }\n\n /**\n * Parses a string value into a native JavaScript Date object based on the specified format.\n * @param value - The string value to parse.\n * @param format - The format of the string value.\n * @returns A Date object representing the parsed value, or null if parsing fails.\n */\n public getDateFromFormat(value: string, format: string): Date | null {\n const dateTime = DateTime.fromFormat(value, format);\n return dateTime.isValid ? dateTime.toJSDate() : null;\n }\n\n /**\n * Converts a DateTime value to a formatted string.\n *\n * @param value - The DateTime value to format.\n * @param format - The format string to apply to the DateTime value.\n * @returns The formatted string representation of the DateTime value.\n */\n public toFormat(value: DateTime<true> | DateTime<false>, format: string): string {\n return value.toFormat(format);\n }\n\n /**\n * Converts a given Date object to a formatted string based on the specified format.\n *\n * @param value - The Date object to be formatted.\n * @param format - The string format to apply to the Date object.\n * @returns The formatted date string.\n */\n public toDateStringFormat(value: Date, format: string): string {\n return DateTime.fromJSDate(value).toFormat(format);\n }\n\n /**\n * Converts a string in ISO format to a DateTime object.\n * @param value - The string value in ISO format.\n * @returns A DateTime object representing the given value.\n */\n public getFromIso(value: string): DateTime {\n return DateTime.fromISO(value);\n }\n\n /**\n * Returns the current date and time.\n * @returns {DateTime} The current date and time.\n */\n public getDateNow(): DateTime {\n return DateTime.now();\n }\n\n /**\n * Adds a duration to a given date and returns the result in the specified format.\n * @param date - The date to which the duration will be added.\n * @param years - The number of years to add to the date (default: 0).\n * @param months - The number of months to add to the date (default: 0).\n * @param weeks - The number of weeks to add to the date (default: 0).\n * @param days - The number of days to add to the date (default: 0).\n * @param format - The format in which the resulting date will be returned (default: 'dd/MM/yyyy').\n * @returns The resulting date in the specified format.\n */\n public addDurationToDate(\n date: string,\n years: number = 0,\n months: number = 0,\n weeks: number = 0,\n days: number = 0,\n format: string = 'dd/MM/yyyy',\n ): string {\n const dateObj = this.getFromFormat(date, format);\n const newDate = dateObj.plus({ years, months, weeks, days });\n return newDate.toFormat(format);\n }\n\n /**\n * Calculates the number of days between two dates.\n * @param startDate - The start date in the specified format.\n * @param endDate - The end date in the specified format.\n * @param format - The format of the dates (default: 'dd/MM/yyyy').\n * @returns The number of days between the start and end dates.\n */\n public calculateDaysBetweenDates(startDate: string, endDate: string, format: string = 'dd/MM/yyyy'): number {\n const start = this.getFromFormat(startDate, format);\n const end = this.getFromFormat(endDate, format);\n const diff = end.diff(start, 'days');\n return diff.days;\n }\n\n /**\n * Checks if a given date is in the past.\n * @param date - The date to check.\n * @param format - The format of the date string. Defaults to 'dd/MM/yyyy'.\n * @returns True if the date is in the past, false otherwise.\n */\n public isDateInThePast(date: string, format: string = 'dd/MM/yyyy'): boolean {\n return this.getFromFormat(date, format) < DateTime.now();\n }\n\n /**\n * Checks if a given date is in the future.\n * @param date - The date to check.\n * @param yearsInTheFuture - Optional. The number of years in the future to compare against. If not provided, the current date is used.\n * @param format - Optional. The format of the input date. Defaults to 'dd/MM/yyyy'.\n * @returns True if the date is in the future, false otherwise.\n */\n public isDateInTheFuture(date: string, yearsInTheFuture?: number, format: string = 'dd/MM/yyyy'): boolean {\n const now = DateTime.now();\n const dateValue = this.getFromFormat(date, format);\n\n if (yearsInTheFuture) {\n const futureDate = now.plus({ years: yearsInTheFuture });\n return dateValue > futureDate;\n }\n\n return dateValue > now;\n }\n\n /**\n * Converts a date string from one format to another.\n *\n * @param date - The date string to be converted.\n * @param fromFormat - The format of the input date string.\n * @param toFormat - The desired format of the output date string.\n * @returns The date string in the desired format.\n */\n public getFromFormatToFormat(date: string, fromFormat: string, toFormat: string): string {\n return this.getFromFormat(date, fromFormat).toFormat(toFormat);\n }\n\n /**\n * Calculates the number of days between the current date and a given ISO date string.\n *\n * @param value - An ISO 8601 formatted date string representing the target date.\n * @returns The number of days between the current date and the input date.\n * Returns 0 if the input date is invalid.\n */\n public getDaysAgo(value: string): number {\n const inputDate = this.getFromIso(value).startOf('day');\n\n const now = this.getDateNow().startOf('day');\n return Math.round(now.diff(inputDate, 'days').days);\n }\n\n /**\n * Returns a date range object with 'from' and 'to' properties.\n * @param pastDays - The number of days in the past from today.\n * @param futureDays - The number of days in the future from today.\n * @param format - The format for the date strings (default: 'yyyy-MM-dd').\n * @returns An object containing 'from' and 'to' date strings in the specified format.\n */\n public getDateRange(pastDays: number = 0, futureDays: number = 0, format: string = 'yyyy-MM-dd'): IDateRange {\n const dateTo = this.getDateNow().plus({ days: futureDays }).toISODate();\n const dateFrom = this.getDateNow().minus({ days: pastDays }).toISODate();\n\n if (!dateTo || !dateFrom) {\n throw new Error('Invalid date range');\n }\n\n return {\n from: this.toFormat(this.getFromIso(dateFrom), format),\n to: this.toFormat(this.getFromIso(dateTo), format),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,WAAW,CAAA;AACtB;;;;;AAKG;IACI,0BAA0B,CAAC,SAAmB,EAAE,OAAiB,EAAA;Q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AE,MAAM,CAAC;SACnD;IACH;uGApPW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAX,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA;;2FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-date-service.mjs","sources":["../../../projects/opal-frontend-common/services/date-service/date.service.ts","../../../projects/opal-frontend-common/services/date-service/hmcts-opal-frontend-common-services-date-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { DateTime, Duration, DurationLikeObject } from 'luxon';\nimport { IDateRange, IAgeObject } from './interfaces/date.service.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DateService {\n /**\n * Calculates the difference in minutes between two DateTime objects.\n * @param startDate The start date and time.\n * @param endDate The end date and time.\n * @returns The difference in minutes between the start and end dates.\n */\n public calculateMinutesDifference(startDate: DateTime, endDate: DateTime): number {\n const minuteDifference = endDate.diff(startDate, 'minutes');\n return Math.max(0, Math.ceil(minuteDifference.minutes));\n }\n\n /**\n * Converts milliseconds to minutes.\n * @param milliseconds - The number of milliseconds to convert.\n * @returns The equivalent number of minutes.\n */\n public convertMillisecondsToMinutes(milliseconds: number): number {\n const minutes = Duration.fromMillis(milliseconds).as('minutes');\n return Math.max(0, Math.ceil(minutes));\n }\n\n /**\n * Calculates the age based on the given date of birth.\n * @param dateOfBirth - The date of birth to calculate the age from.\n * @param format - The format of the date of birth. Defaults to 'dd/MM/yyyy'.\n * @returns The calculated age.\n */\n public calculateAge(dateOfBirth: DateTime | string, format: string = 'dd/MM/yyyy'): number {\n const date = typeof dateOfBirth === 'string' ? this.getFromFormat(dateOfBirth, format) : dateOfBirth;\n\n return Math.floor(DateTime.now().diff(date, 'years').years);\n }\n\n /**\n * Checks if a given date is valid.\n * @param dateInput - The date to be checked. It can be a DateTime object, a string, or null.\n * @param format - The format of the date string (default: 'dd/MM/yyyy').\n * @returns A boolean indicating whether the date is valid or not.\n */\n public isValidDate(dateInput: DateTime | string | null, format: string = 'dd/MM/yyyy'): boolean {\n if (dateInput) {\n const date = typeof dateInput === 'string' ? this.getFromFormat(dateInput, format) : dateInput;\n return date.isValid;\n }\n return false;\n }\n\n /**\n * Returns a string representation of a date subtracted by the given duration.\n * @param duration A DurationLikeObject representing the amount of time to subtract from the current date.\n * @returns A string representing the subtracted date in the format specified by the current locale.\n */\n public getPreviousDate(duration: DurationLikeObject): string {\n return DateTime.now().minus(duration).setLocale('en-gb').toLocaleString();\n }\n\n /**\n * Parses a string value into a DateTime object based on the specified format.\n * @param value - The string value to parse.\n * @param format - The format of the string value.\n * @returns A DateTime object representing the parsed value.\n */\n public getFromFormat(value: string, format: string): DateTime<true> | DateTime<false> {\n return DateTime.fromFormat(value, format);\n }\n\n /**\n * Returns an object containing the age and age group based on the date of birth.\n * @param dateOfBirth - The date of birth to calculate the age from.\n * @returns An object containing the age value and group ('Adult' or 'Youth') if the date is valid, or null if the date is invalid.\n */\n public getAgeObject(dateOfBirth: string): IAgeObject | null {\n if (this.isValidDate(dateOfBirth)) {\n const age = this.calculateAge(dateOfBirth);\n return {\n value: age,\n group: age >= 18 ? 'Adult' : 'Youth',\n };\n }\n return null;\n }\n\n /**\n * Parses a string value into a native JavaScript Date object based on the specified format.\n * @param value - The string value to parse.\n * @param format - The format of the string value.\n * @returns A Date object representing the parsed value, or null if parsing fails.\n */\n public getDateFromFormat(value: string, format: string): Date | null {\n const dateTime = DateTime.fromFormat(value, format);\n return dateTime.isValid ? dateTime.toJSDate() : null;\n }\n\n /**\n * Converts a DateTime value to a formatted string.\n *\n * @param value - The DateTime value to format.\n * @param format - The format string to apply to the DateTime value.\n * @returns The formatted string representation of the DateTime value.\n */\n public toFormat(value: DateTime<true> | DateTime<false>, format: string): string {\n return value.toFormat(format);\n }\n\n /**\n * Converts a given Date object to a formatted string based on the specified format.\n *\n * @param value - The Date object to be formatted.\n * @param format - The string format to apply to the Date object.\n * @returns The formatted date string.\n */\n public toDateStringFormat(value: Date, format: string): string {\n return DateTime.fromJSDate(value).toFormat(format);\n }\n\n /**\n * Converts a string in ISO format to a DateTime object.\n * @param value - The string value in ISO format.\n * @returns A DateTime object representing the given value.\n */\n public getFromIso(value: string): DateTime {\n return DateTime.fromISO(value);\n }\n\n /**\n * Returns the current date and time.\n * @returns {DateTime} The current date and time.\n */\n public getDateNow(): DateTime {\n return DateTime.now();\n }\n\n /**\n * Adds a duration to a given date and returns the result in the specified format.\n * @param date - The date to which the duration will be added.\n * @param years - The number of years to add to the date (default: 0).\n * @param months - The number of months to add to the date (default: 0).\n * @param weeks - The number of weeks to add to the date (default: 0).\n * @param days - The number of days to add to the date (default: 0).\n * @param format - The format in which the resulting date will be returned (default: 'dd/MM/yyyy').\n * @returns The resulting date in the specified format.\n */\n public addDurationToDate(\n date: string,\n years: number = 0,\n months: number = 0,\n weeks: number = 0,\n days: number = 0,\n format: string = 'dd/MM/yyyy',\n ): string {\n const dateObj = this.getFromFormat(date, format);\n const newDate = dateObj.plus({ years, months, weeks, days });\n return newDate.toFormat(format);\n }\n\n /**\n * Calculates the number of days between two dates.\n * @param startDate - The start date in the specified format.\n * @param endDate - The end date in the specified format.\n * @param format - The format of the dates (default: 'dd/MM/yyyy').\n * @returns The number of days between the start and end dates.\n */\n public calculateDaysBetweenDates(startDate: string, endDate: string, format: string = 'dd/MM/yyyy'): number {\n const start = this.getFromFormat(startDate, format);\n const end = this.getFromFormat(endDate, format);\n const diff = end.diff(start, 'days');\n return diff.days;\n }\n\n /**\n * Checks if a given date is in the past.\n * @param date - The date to check.\n * @param format - The format of the date string. Defaults to 'dd/MM/yyyy'.\n * @returns True if the date is in the past, false otherwise.\n */\n public isDateInThePast(date: string, format: string = 'dd/MM/yyyy'): boolean {\n return this.getFromFormat(date, format) < DateTime.now();\n }\n\n /**\n * Checks if a given date is in the future.\n * @param date - The date to check.\n * @param yearsInTheFuture - Optional. The number of years in the future to compare against. If not provided, the current date is used.\n * @param format - Optional. The format of the input date. Defaults to 'dd/MM/yyyy'.\n * @returns True if the date is in the future, false otherwise.\n */\n public isDateInTheFuture(date: string, yearsInTheFuture?: number, format: string = 'dd/MM/yyyy'): boolean {\n const now = DateTime.now();\n const dateValue = this.getFromFormat(date, format);\n\n if (yearsInTheFuture) {\n const futureDate = now.plus({ years: yearsInTheFuture });\n return dateValue > futureDate;\n }\n\n return dateValue > now;\n }\n\n /**\n * Converts a date string from one format to another.\n *\n * @param date - The date string to be converted.\n * @param fromFormat - The format of the input date string.\n * @param toFormat - The desired format of the output date string.\n * @returns The date string in the desired format.\n */\n public getFromFormatToFormat(date: string, fromFormat: string, toFormat: string): string {\n return this.getFromFormat(date, fromFormat).toFormat(toFormat);\n }\n\n /**\n * Calculates the number of days between the current date and a given ISO date string.\n *\n * @param value - An ISO 8601 formatted date string representing the target date.\n * @returns The number of days between the current date and the input date.\n * Returns 0 if the input date is invalid.\n */\n public getDaysAgo(value: string): number {\n const inputDate = this.getFromIso(value).startOf('day');\n\n const now = this.getDateNow().startOf('day');\n return Math.round(now.diff(inputDate, 'days').days);\n }\n\n /**\n * Returns a date range object with 'from' and 'to' properties.\n * @param pastDays - The number of days in the past from today.\n * @param futureDays - The number of days in the future from today.\n * @param format - The format for the date strings (default: 'yyyy-MM-dd').\n * @returns An object containing 'from' and 'to' date strings in the specified format.\n */\n public getDateRange(pastDays: number = 0, futureDays: number = 0, format: string = 'yyyy-MM-dd'): IDateRange {\n const dateTo = this.getDateNow().plus({ days: futureDays }).toISODate();\n const dateFrom = this.getDateNow().minus({ days: pastDays }).toISODate();\n\n if (!dateTo || !dateFrom) {\n throw new Error('Invalid date range');\n }\n\n return {\n from: this.toFormat(this.getFromIso(dateFrom), format),\n to: this.toFormat(this.getFromIso(dateTo), format),\n };\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,WAAW,CAAA;AACtB;;;;;AAKG;IACI,0BAA0B,CAAC,SAAmB,EAAE,OAAiB,EAAA;QACtE,MAAM,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;AAC3D,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACzD;AAEA;;;;AAIG;AACI,IAAA,4BAA4B,CAAC,YAAoB,EAAA;AACtD,QAAA,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,CAAC;AAC/D,QAAA,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACxC;AAEA;;;;;AAKG;AACI,IAAA,YAAY,CAAC,WAA8B,EAAE,MAAA,GAAiB,YAAY,EAAA;QAC/E,MAAM,IAAI,GAAG,OAAO,WAAW,KAAK,QAAQ,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,WAAW;AAEpG,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC;IAC7D;AAEA;;;;;AAKG;AACI,IAAA,WAAW,CAAC,SAAmC,EAAE,MAAA,GAAiB,YAAY,EAAA;QACnF,IAAI,SAAS,EAAE;YACb,MAAM,IAAI,GAAG,OAAO,SAAS,KAAK,QAAQ,GAAG,IAA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AC,MAAM,IAAI,CAAC,QAAQ,EAAE;AACxB,YAAA,MAAM,IAAI,KAAK,CAAC,oBAAoB,CAAC;QACvC;QAEA,OAAO;AACL,YAAA,IAAI,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;AACtD,YAAA,EAAE,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;SACnD;IACH;wGApPW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAX,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -79,10 +79,10 @@ class LaunchDarklyService {
|
|
|
79
79
|
ngOnDestroy() {
|
|
80
80
|
this.closeLaunchDarklyClient();
|
|
81
81
|
}
|
|
82
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
83
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LaunchDarklyService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LaunchDarklyService, providedIn: 'root' });
|
|
84
84
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: LaunchDarklyService, decorators: [{
|
|
86
86
|
type: Injectable,
|
|
87
87
|
args: [{
|
|
88
88
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-launch-darkly-service.mjs","sources":["../../../projects/opal-frontend-common/services/launch-darkly-service/launch-darkly.service.ts","../../../projects/opal-frontend-common/services/launch-darkly-service/hmcts-opal-frontend-common-services-launch-darkly-service.ts"],"sourcesContent":["import { inject, Injectable, OnDestroy } from '@angular/core';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { initialize, LDClient, LDFlagChangeset, LDFlagSet } from 'launchdarkly-js-client-sdk';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LaunchDarklyService implements OnDestroy {\n private readonly globalStore = inject(GlobalStore);\n private ldClient!: LDClient;\n\n /**\n * Sets the LaunchDarkly flags by updating the featureFlags in the state service.\n */\n private setLaunchDarklyFlags() {\n if (this.ldClient) {\n this.globalStore.setFeatureFlags(this.ldClient.allFlags());\n }\n }\n\n /**\n * Formats the LDFlagChangeset into an LDFlagSet.\n *\n * @param flags - The LDFlagChangeset to be formatted.\n * @returns The formatted LDFlagSet.\n */\n private formatChangeFlags(flags: LDFlagChangeset): LDFlagSet {\n return Object.keys(flags).reduce((flag: LDFlagSet, key) => {\n flag[key] = flags[key].current;\n return flag;\n }, {});\n }\n\n /**\n * Closes the LaunchDarkly client if it is open.\n */\n private closeLaunchDarklyClient(): void {\n if (this.ldClient) {\n this.ldClient.close();\n }\n }\n\n /**\n * Initializes the LaunchDarkly change listener.\n * This method listens for changes in feature flags and updates the state accordingly.\n */\n public initializeLaunchDarklyChangeListener() {\n if (this.ldClient && this.globalStore.launchDarklyConfig().stream) {\n this.ldClient.on('change', (flags: LDFlagChangeset) => {\n const updatedFlags = { ...this.globalStore.featureFlags(), ...this.formatChangeFlags(flags) };\n this.globalStore.setFeatureFlags(updatedFlags);\n });\n }\n }\n\n /**\n * Initializes the LaunchDarkly flags and sets them.\n * If the LD client is already initialized, it waits for initialization and then sets the flags.\n * If the LD client is not initialized, it returns a resolved promise.\n * @returns A promise that resolves when the flags are set.\n */\n public async initializeLaunchDarklyFlags(): Promise<void> {\n if (this.ldClient) {\n return this.ldClient\n .waitForInitialization(5)\n .then(() => this.setLaunchDarklyFlags())\n .catch((err) => {\n throw err;\n });\n }\n }\n\n /**\n * Initializes the LaunchDarkly client.\n * If a stored LaunchDarkly client ID exists, it initializes the client with the ID and anonymous mode enabled.\n */\n public initializeLaunchDarklyClient(): void {\n if (this.globalStore.launchDarklyConfig()) {\n const { enabled, clientId } = this.globalStore.launchDarklyConfig();\n\n if (enabled && clientId) {\n this.ldClient = initialize(clientId, {\n anonymous: true,\n });\n }\n }\n }\n\n ngOnDestroy(): void {\n this.closeLaunchDarklyClient();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,mBAAmB,CAAA;AACb,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,QAAQ;AAEhB;;AAEG;IACK,oBAAoB,GAAA;AAC1B,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC5D;IACF;AAEA;;;;;AAKG;AACK,IAAA,iBAAiB,CAAC,KAAsB,EAAA;AAC9C,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAe,EAAE,GAAG,KAAI;YACxD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO;AAC9B,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AAA,SAAS,EAAE,IAAI;AAChB,iBAAA,CAAC;YACJ;QACF;IACF;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,uBAAuB,EAAE;IAChC;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-launch-darkly-service.mjs","sources":["../../../projects/opal-frontend-common/services/launch-darkly-service/launch-darkly.service.ts","../../../projects/opal-frontend-common/services/launch-darkly-service/hmcts-opal-frontend-common-services-launch-darkly-service.ts"],"sourcesContent":["import { inject, Injectable, OnDestroy } from '@angular/core';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { initialize, LDClient, LDFlagChangeset, LDFlagSet } from 'launchdarkly-js-client-sdk';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LaunchDarklyService implements OnDestroy {\n private readonly globalStore = inject(GlobalStore);\n private ldClient!: LDClient;\n\n /**\n * Sets the LaunchDarkly flags by updating the featureFlags in the state service.\n */\n private setLaunchDarklyFlags() {\n if (this.ldClient) {\n this.globalStore.setFeatureFlags(this.ldClient.allFlags());\n }\n }\n\n /**\n * Formats the LDFlagChangeset into an LDFlagSet.\n *\n * @param flags - The LDFlagChangeset to be formatted.\n * @returns The formatted LDFlagSet.\n */\n private formatChangeFlags(flags: LDFlagChangeset): LDFlagSet {\n return Object.keys(flags).reduce((flag: LDFlagSet, key) => {\n flag[key] = flags[key].current;\n return flag;\n }, {});\n }\n\n /**\n * Closes the LaunchDarkly client if it is open.\n */\n private closeLaunchDarklyClient(): void {\n if (this.ldClient) {\n this.ldClient.close();\n }\n }\n\n /**\n * Initializes the LaunchDarkly change listener.\n * This method listens for changes in feature flags and updates the state accordingly.\n */\n public initializeLaunchDarklyChangeListener() {\n if (this.ldClient && this.globalStore.launchDarklyConfig().stream) {\n this.ldClient.on('change', (flags: LDFlagChangeset) => {\n const updatedFlags = { ...this.globalStore.featureFlags(), ...this.formatChangeFlags(flags) };\n this.globalStore.setFeatureFlags(updatedFlags);\n });\n }\n }\n\n /**\n * Initializes the LaunchDarkly flags and sets them.\n * If the LD client is already initialized, it waits for initialization and then sets the flags.\n * If the LD client is not initialized, it returns a resolved promise.\n * @returns A promise that resolves when the flags are set.\n */\n public async initializeLaunchDarklyFlags(): Promise<void> {\n if (this.ldClient) {\n return this.ldClient\n .waitForInitialization(5)\n .then(() => this.setLaunchDarklyFlags())\n .catch((err) => {\n throw err;\n });\n }\n }\n\n /**\n * Initializes the LaunchDarkly client.\n * If a stored LaunchDarkly client ID exists, it initializes the client with the ID and anonymous mode enabled.\n */\n public initializeLaunchDarklyClient(): void {\n if (this.globalStore.launchDarklyConfig()) {\n const { enabled, clientId } = this.globalStore.launchDarklyConfig();\n\n if (enabled && clientId) {\n this.ldClient = initialize(clientId, {\n anonymous: true,\n });\n }\n }\n }\n\n ngOnDestroy(): void {\n this.closeLaunchDarklyClient();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAOa,mBAAmB,CAAA;AACb,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,QAAQ;AAEhB;;AAEG;IACK,oBAAoB,GAAA;AAC1B,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;AACjB,YAAA,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;QAC5D;IACF;AAEA;;;;;AAKG;AACK,IAAA,iBAAiB,CAAC,KAAsB,EAAA;AAC9C,QAAA,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAe,EAAE,GAAG,KAAI;YACxD,IAAI,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO;AAC9B,YAAA,OAAO,IAAI;QACb,CAAC,EAAE,EAAE,CAAC;IACR;AAEA;;AAEG;IACK,uBAAuB,GAAA;AAC7B,QAAA,IAAI,IAAI,CAAC,QAAQ,EAAE;A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EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAnB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,cAFlB,MAAM,EAAA,CAAA;;4FAEP,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAH/B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -30,10 +30,10 @@ class OpalUserService {
|
|
|
30
30
|
.get(OPAL_USER_PATHS.loggedInUserState)
|
|
31
31
|
.pipe(tap((userState) => this.globalStore.setUserState(userState)));
|
|
32
32
|
}
|
|
33
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
34
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
33
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OpalUserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
34
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OpalUserService, providedIn: 'root' });
|
|
35
35
|
}
|
|
36
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
36
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: OpalUserService, decorators: [{
|
|
37
37
|
type: Injectable,
|
|
38
38
|
args: [{ providedIn: 'root' }]
|
|
39
39
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-opal-user-service.mjs","sources":["../../../projects/opal-frontend-common/services/opal-user-service/constants/opal-user-paths.constant.ts","../../../projects/opal-frontend-common/services/opal-user-service/opal-user.service.ts","../../../projects/opal-frontend-common/services/opal-user-service/hmcts-opal-frontend-common-services-opal-user-service.ts"],"sourcesContent":["import { IOpalUserPaths } from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';\n\nconst baseUrl = '/opal-user-service/';\nconst users = 'users/';\nconst currentUser = '0/';\nconst userState = 'state';\n\nexport const OPAL_USER_PATHS: IOpalUserPaths = {\n loggedInUserState: `${baseUrl}${users}${currentUser}${userState}`,\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { IOpalUserState } from './interfaces/opal-user-state.interface';\nimport { tap, Observable } from 'rxjs';\nimport { OPAL_USER_PATHS } from './constants/opal-user-paths.constant';\n\n@Injectable({ providedIn: 'root' })\nexport class OpalUserService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n\n /**\n * Retrieves the current logged-in user's state from the backend and updates the global store.\n *\n * This method first resets the user state in the global store to an empty object,\n * then performs an HTTP GET request to fetch the latest user state.\n * Upon receiving the response, it updates the global store with the fetched user state.\n *\n * @returns An Observable that emits the current {@link IOpalUserState}.\n */\n public getLoggedInUserState(): Observable<IOpalUserState> {\n this.globalStore.setUserState({} as IOpalUserState);\n return this.http\n .get<IOpalUserState>(OPAL_USER_PATHS.loggedInUserState)\n .pipe(tap((userState) => this.globalStore.setUserState(userState)));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA,MAAM,OAAO,GAAG,qBAAqB;AACrC,MAAM,KAAK,GAAG,QAAQ;AACtB,MAAM,WAAW,GAAG,IAAI;AACxB,MAAM,SAAS,GAAG,OAAO;AAElB,MAAM,eAAe,GAAmB;IAC7C,iBAAiB,EAAE,GAAG,OAAO,CAAA,EAAG,KAAK,CAAA,EAAG,WAAW,CAAA,EAAG,SAAS,CAAA,CAAE;CAClE;;MCDY,eAAe,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;;;AAQG;IACI,oBAAoB,GAAA;AACzB,QAAA,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAoB,CAAC;QACnD,OAAO,IAAI,CAAC;AACT,aAAA,GAAG,CAAiB,eAAe,CAAC,iBAAiB;AACrD,aAAA,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACvE;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-opal-user-service.mjs","sources":["../../../projects/opal-frontend-common/services/opal-user-service/constants/opal-user-paths.constant.ts","../../../projects/opal-frontend-common/services/opal-user-service/opal-user.service.ts","../../../projects/opal-frontend-common/services/opal-user-service/hmcts-opal-frontend-common-services-opal-user-service.ts"],"sourcesContent":["import { IOpalUserPaths } from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';\n\nconst baseUrl = '/opal-user-service/';\nconst users = 'users/';\nconst currentUser = '0/';\nconst userState = 'state';\n\nexport const OPAL_USER_PATHS: IOpalUserPaths = {\n loggedInUserState: `${baseUrl}${users}${currentUser}${userState}`,\n};\n","import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { IOpalUserState } from './interfaces/opal-user-state.interface';\nimport { tap, Observable } from 'rxjs';\nimport { OPAL_USER_PATHS } from './constants/opal-user-paths.constant';\n\n@Injectable({ providedIn: 'root' })\nexport class OpalUserService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n\n /**\n * Retrieves the current logged-in user's state from the backend and updates the global store.\n *\n * This method first resets the user state in the global store to an empty object,\n * then performs an HTTP GET request to fetch the latest user state.\n * Upon receiving the response, it updates the global store with the fetched user state.\n *\n * @returns An Observable that emits the current {@link IOpalUserState}.\n */\n public getLoggedInUserState(): Observable<IOpalUserState> {\n this.globalStore.setUserState({} as IOpalUserState);\n return this.http\n .get<IOpalUserState>(OPAL_USER_PATHS.loggedInUserState)\n .pipe(tap((userState) => this.globalStore.setUserState(userState)));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;AAEA,MAAM,OAAO,GAAG,qBAAqB;AACrC,MAAM,KAAK,GAAG,QAAQ;AACtB,MAAM,WAAW,GAAG,IAAI;AACxB,MAAM,SAAS,GAAG,OAAO;AAElB,MAAM,eAAe,GAAmB;IAC7C,iBAAiB,EAAE,GAAG,OAAO,CAAA,EAAG,KAAK,CAAA,EAAG,WAAW,CAAA,EAAG,SAAS,CAAA,CAAE;CAClE;;MCDY,eAAe,CAAA;AACT,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;;;AAQG;IACI,oBAAoB,GAAA;AACzB,QAAA,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,EAAoB,CAAC;QACnD,OAAO,IAAI,CAAC;AACT,aAAA,GAAG,CAAiB,eAAe,CAAC,iBAAiB;AACrD,aAAA,IAAI,CAAC,GAAG,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC;IACvE;wGAlBW,eAAe,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAf,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,eAAe,cADF,MAAM,EAAA,CAAA;;4FACnB,eAAe,EAAA,UAAA,EAAA,CAAA;kBAD3B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACPlC;;AAEG;;;;"}
|
|
@@ -53,10 +53,10 @@ class PermissionsService {
|
|
|
53
53
|
// if we don't have any roles, we can't have any permissions
|
|
54
54
|
return true;
|
|
55
55
|
}
|
|
56
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
57
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PermissionsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
57
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PermissionsService, providedIn: 'root' });
|
|
58
58
|
}
|
|
59
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
59
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: PermissionsService, decorators: [{
|
|
60
60
|
type: Injectable,
|
|
61
61
|
args: [{
|
|
62
62
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-permissions-service.mjs","sources":["../../../projects/opal-frontend-common/services/permissions-service/permissions.service.ts","../../../projects/opal-frontend-common/services/permissions-service/hmcts-opal-frontend-common-services-permissions-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n IOpalUserState,\n IOpalUserBusinessUnitUser,\n} from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionsService {\n private storedUniquePermissionIds: number[] = [];\n\n /**\n * Retrieves the unique permission IDs associated with the user.\n * If the unique permission IDs have not been stored yet, it calculates them based on the user's roles and permissions.\n * @returns An array of unique permission IDs.\n */\n public getUniquePermissions(userState: IOpalUserState | null): number[] {\n const roles = userState ? userState['business_unit_users'] : null;\n\n if (!this.storedUniquePermissionIds.length && roles) {\n const permissionIds = roles.flatMap((role) => {\n return role.permissions.map(({ permission_id: permissionId }) => permissionId);\n });\n\n this.storedUniquePermissionIds = [...new Set(permissionIds)];\n }\n\n return this.storedUniquePermissionIds;\n }\n\n /**\n * Determines whether the user has access to a specific permission based on their roles.\n *\n * This method short-circuits and returns as soon as a matching permission is found for efficiency.\n *\n * @param permissionId - The ID of the permission to check for access.\n * @param roles - An array of user roles, each containing a list of permissions.\n * @returns `true` if the user has the specified permission in any of their roles,\n * or if no roles are provided; otherwise, returns `false`.\n */\n public hasPermissionAccess(permissionId: number, roles: IOpalUserBusinessUnitUser[]): boolean {\n if (roles?.length) {\n return roles.some((role) => role.permissions.some((permission) => permission.permission_id === permissionId));\n }\n // if we don't have any roles, we can't have any permissions\n return true;\n }\n\n /**\n * Checks if the user has access to a specific permission within a given business unit.\n *\n * This method short-circuits and returns as soon as a matching permission is found for efficiency.\n *\n * @param permissionId - The ID of the permission to check.\n * @param businessUnitId - The ID of the business unit to check against.\n * @param roles - An array of user roles, each containing permissions and associated business unit IDs.\n * @returns `true` if the user has the specified permission for the business unit, or if no roles are provided; otherwise, `false`.\n */\n public hasBusinessUnitPermissionAccess(\n permissionId: number,\n businessUnitId: number,\n roles: IOpalUserBusinessUnitUser[],\n ): boolean {\n if (roles?.length) {\n return roles.some(\n (role) =>\n role.business_unit_id === businessUnitId &&\n role.permissions.some((permission) => permission.permission_id === permissionId),\n );\n }\n // if we don't have any roles, we can't have any permissions\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASa,kBAAkB,CAAA;IACrB,yBAAyB,GAAa,EAAE;AAEhD;;;;AAIG;AACI,IAAA,oBAAoB,CAAC,SAAgC,EAAA;AAC1D,QAAA,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC,qBAAqB,CAAC,GAAG,IAAI;QAEjE,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,IAAI,KAAK,EAAE;YACnD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC3C,gBAAA,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,YAAY,CAAC;AAChF,YAAA,CAAC,CAAC;YAEF,IAAI,CAAC,yBAAyB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;QAC9D;QAEA,OAAO,IAAI,CAAC,yBAAyB;IACvC;AAEA;;;;;;;;;AASG;IACI,mBAAmB,CAAC,YAAoB,EAAE,KAAkC,EAAA;AACjF,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;YACjB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,aAAa,KAAK,YAAY,CAAC,CAAC;QAC/G;;AAEA,QAAA,OAAO,IAAI;IACb;AAEA;;;;;;;;;AASG;AACI,IAAA,+BAA+B,CACpC,YAAoB,EACpB,cAAsB,EACtB,KAAkC,EAAA;AAElC,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,KAAK,CAAC,IAAI,CACf,CAAC,IAAI,KACH,IAAI,CAAC,gBAAgB,KAAK,cAAc;AACxC,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,aAAa,KAAK,YAAY,CAAC,CACnF;QACH;;AAEA,QAAA,OAAO,IAAI;IACb;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-permissions-service.mjs","sources":["../../../projects/opal-frontend-common/services/permissions-service/permissions.service.ts","../../../projects/opal-frontend-common/services/permissions-service/hmcts-opal-frontend-common-services-permissions-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport {\n IOpalUserState,\n IOpalUserBusinessUnitUser,\n} from '@hmcts/opal-frontend-common/services/opal-user-service/interfaces';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class PermissionsService {\n private storedUniquePermissionIds: number[] = [];\n\n /**\n * Retrieves the unique permission IDs associated with the user.\n * If the unique permission IDs have not been stored yet, it calculates them based on the user's roles and permissions.\n * @returns An array of unique permission IDs.\n */\n public getUniquePermissions(userState: IOpalUserState | null): number[] {\n const roles = userState ? userState['business_unit_users'] : null;\n\n if (!this.storedUniquePermissionIds.length && roles) {\n const permissionIds = roles.flatMap((role) => {\n return role.permissions.map(({ permission_id: permissionId }) => permissionId);\n });\n\n this.storedUniquePermissionIds = [...new Set(permissionIds)];\n }\n\n return this.storedUniquePermissionIds;\n }\n\n /**\n * Determines whether the user has access to a specific permission based on their roles.\n *\n * This method short-circuits and returns as soon as a matching permission is found for efficiency.\n *\n * @param permissionId - The ID of the permission to check for access.\n * @param roles - An array of user roles, each containing a list of permissions.\n * @returns `true` if the user has the specified permission in any of their roles,\n * or if no roles are provided; otherwise, returns `false`.\n */\n public hasPermissionAccess(permissionId: number, roles: IOpalUserBusinessUnitUser[]): boolean {\n if (roles?.length) {\n return roles.some((role) => role.permissions.some((permission) => permission.permission_id === permissionId));\n }\n // if we don't have any roles, we can't have any permissions\n return true;\n }\n\n /**\n * Checks if the user has access to a specific permission within a given business unit.\n *\n * This method short-circuits and returns as soon as a matching permission is found for efficiency.\n *\n * @param permissionId - The ID of the permission to check.\n * @param businessUnitId - The ID of the business unit to check against.\n * @param roles - An array of user roles, each containing permissions and associated business unit IDs.\n * @returns `true` if the user has the specified permission for the business unit, or if no roles are provided; otherwise, `false`.\n */\n public hasBusinessUnitPermissionAccess(\n permissionId: number,\n businessUnitId: number,\n roles: IOpalUserBusinessUnitUser[],\n ): boolean {\n if (roles?.length) {\n return roles.some(\n (role) =>\n role.business_unit_id === businessUnitId &&\n role.permissions.some((permission) => permission.permission_id === permissionId),\n );\n }\n // if we don't have any roles, we can't have any permissions\n return true;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;MASa,kBAAkB,CAAA;IACrB,yBAAyB,GAAa,EAAE;AAEhD;;;;AAIG;AACI,IAAA,oBAAoB,CAAC,SAAgC,EAAA;AAC1D,QAAA,MAAM,KAAK,GAAG,SAAS,GAAG,SAAS,CAAC,qBAAqB,CAAC,GAAG,IAAI;QAEjE,IAAI,CAAC,IAAI,CAAC,yBAAyB,CAAC,MAAM,IAAI,KAAK,EAAE;YACnD,MAAM,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,KAAI;AAC3C,gBAAA,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,EAAE,aAAa,EAAE,YAAY,EAAE,KAAK,YAAY,CAAC;AAChF,YAAA,CAAC,CAAC;YAEF,IAAI,CAAC,yBAAyB,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,aAAa,CAAC,CAAC;QAC9D;QAEA,OAAO,IAAI,CAAC,yBAAyB;IACvC;AAEA;;;;;;;;;AASG;IACI,mBAAmB,CAAC,YAAoB,EAAE,KAAkC,EAAA;AACjF,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;YACjB,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,aAAa,KAAK,YAAY,CAAC,CAAC;QAC/G;;AAEA,QAAA,OAAO,IAAI;IACb;AAEA;;;;;;;;;AASG;AACI,IAAA,+BAA+B,CACpC,YAAoB,EACpB,cAAsB,EACtB,KAAkC,EAAA;AAElC,QAAA,IAAI,KAAK,EAAE,MAAM,EAAE;AACjB,YAAA,OAAO,KAAK,CAAC,IAAI,CACf,CAAC,IAAI,KACH,IAAI,CAAC,gBAAgB,KAAK,cAAc;AACxC,gBAAA,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,UAAU,KAAK,UAAU,CAAC,aAAa,KAAK,YAAY,CAAC,CACnF;QACH;;AAEA,QAAA,OAAO,IAAI;IACb;wGAhEW,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA;;4FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACRD;;AAEG;;;;"}
|
|
@@ -25,10 +25,10 @@ class SessionService {
|
|
|
25
25
|
}), shareReplay(1));
|
|
26
26
|
return this.tokenExpiryCache$;
|
|
27
27
|
}
|
|
28
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
29
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
28
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SessionService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
29
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SessionService, providedIn: 'root' });
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SessionService, decorators: [{
|
|
32
32
|
type: Injectable,
|
|
33
33
|
args: [{ providedIn: 'root' }]
|
|
34
34
|
}] });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-session-service.mjs","sources":["../../../projects/opal-frontend-common/services/session-service/session.service.ts","../../../projects/opal-frontend-common/services/session-service/hmcts-opal-frontend-common-services-session-service.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, timer } from 'rxjs';\nimport { retry, shareReplay, tap } from 'rxjs/operators';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { SESSION_ENDPOINTS } from '@hmcts/opal-frontend-common/services/session-service/constants';\nimport { ISessionTokenExpiry } from '@hmcts/opal-frontend-common/services/session-service/interfaces';\n\n@Injectable({ providedIn: 'root' })\nexport class SessionService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n private tokenExpiryCache$!: Observable<ISessionTokenExpiry>;\n\n private readonly MAX_RETRIES = 5;\n private readonly RETRY_DELAY_MS = 1000;\n\n /**\n * Always fetch access-token expiry from the server (no in-memory caching).\n * Adds cache-busting query param and no-cache headers.\n */\n public getTokenExpiry(): Observable<ISessionTokenExpiry> {\n this.tokenExpiryCache$ ??= this.http.get<ISessionTokenExpiry>(SESSION_ENDPOINTS.expiry).pipe(\n retry({\n count: this.MAX_RETRIES,\n delay: () => timer(this.RETRY_DELAY_MS),\n }),\n tap((expiry) => {\n this.globalStore.setTokenExpiry(expiry);\n }),\n shareReplay(1),\n );\n return this.tokenExpiryCache$;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MASa,cAAc,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,iBAAiB;IAER,WAAW,GAAG,CAAC;IACf,cAAc,GAAG,IAAI;AAEtC;;;AAGG;IACI,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAC1F,KAAK,CAAC;YACJ,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,KAAK,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;AACxC,SAAA,CAAC,EACF,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,YAAA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC;AACzC,QAAA,CAAC,CAAC,EACF,WAAW,CAAC,CAAC,CAAC,CACf;QACD,OAAO,IAAI,CAAC,iBAAiB;IAC/B;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-session-service.mjs","sources":["../../../projects/opal-frontend-common/services/session-service/session.service.ts","../../../projects/opal-frontend-common/services/session-service/hmcts-opal-frontend-common-services-session-service.ts"],"sourcesContent":["import { HttpClient } from '@angular/common/http';\nimport { Injectable, inject } from '@angular/core';\nimport { Observable, timer } from 'rxjs';\nimport { retry, shareReplay, tap } from 'rxjs/operators';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\nimport { SESSION_ENDPOINTS } from '@hmcts/opal-frontend-common/services/session-service/constants';\nimport { ISessionTokenExpiry } from '@hmcts/opal-frontend-common/services/session-service/interfaces';\n\n@Injectable({ providedIn: 'root' })\nexport class SessionService {\n private readonly http = inject(HttpClient);\n private readonly globalStore = inject(GlobalStore);\n private tokenExpiryCache$!: Observable<ISessionTokenExpiry>;\n\n private readonly MAX_RETRIES = 5;\n private readonly RETRY_DELAY_MS = 1000;\n\n /**\n * Always fetch access-token expiry from the server (no in-memory caching).\n * Adds cache-busting query param and no-cache headers.\n */\n public getTokenExpiry(): Observable<ISessionTokenExpiry> {\n this.tokenExpiryCache$ ??= this.http.get<ISessionTokenExpiry>(SESSION_ENDPOINTS.expiry).pipe(\n retry({\n count: this.MAX_RETRIES,\n delay: () => timer(this.RETRY_DELAY_MS),\n }),\n tap((expiry) => {\n this.globalStore.setTokenExpiry(expiry);\n }),\n shareReplay(1),\n );\n return this.tokenExpiryCache$;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MASa,cAAc,CAAA;AACR,IAAA,IAAI,GAAG,MAAM,CAAC,UAAU,CAAC;AACzB,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAC1C,IAAA,iBAAiB;IAER,WAAW,GAAG,CAAC;IACf,cAAc,GAAG,IAAI;AAEtC;;;AAGG;IACI,cAAc,GAAA;AACnB,QAAA,IAAI,CAAC,iBAAiB,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,CAAsB,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,CAC1F,KAAK,CAAC;YACJ,KAAK,EAAE,IAAI,CAAC,WAAW;YACvB,KAAK,EAAE,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC;AACxC,SAAA,CAAC,EACF,GAAG,CAAC,CAAC,MAAM,KAAI;AACb,YAAA,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,MAAM,CAAC;AACzC,QAAA,CAAC,CAAC,EACF,WAAW,CAAC,CAAC,CAAC,CACf;QACD,OAAO,IAAI,CAAC,iBAAiB;IAC/B;wGAxBW,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA;AAAd,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,cADD,MAAM,EAAA,CAAA;;4FACnB,cAAc,EAAA,UAAA,EAAA,CAAA;kBAD1B,UAAU;mBAAC,EAAE,UAAU,EAAE,MAAM,EAAE;;;ACRlC;;AAEG;;;;"}
|
|
@@ -79,10 +79,10 @@ class SortService {
|
|
|
79
79
|
arraySortDesc(array) {
|
|
80
80
|
return sort(array).desc();
|
|
81
81
|
}
|
|
82
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
83
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
82
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SortService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
83
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SortService, providedIn: 'root' });
|
|
84
84
|
}
|
|
85
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
85
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SortService, decorators: [{
|
|
86
86
|
type: Injectable,
|
|
87
87
|
args: [{
|
|
88
88
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-sort-service.mjs","sources":["../../../projects/opal-frontend-common/services/sort-service/sort.service.ts","../../../projects/opal-frontend-common/services/sort-service/hmcts-opal-frontend-common-services-sort-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { sort } from 'fast-sort';\nimport {\n ISortServiceConfig,\n ISortServiceValues,\n ISortServiceArrayValues,\n} from '@hmcts/opal-frontend-common/services/sort-service/interfaces';\nimport { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SortService {\n /**\n * Sorts an array of objects based on a specified key and sort type.\n *\n * @param array - The array of objects to be sorted. Each object should implement the `ISortServiceValues` interface.\n * @param config - The configuration object containing the key to sort by and the sort type (ascending or descending).\n * @returns The sorted array of objects.\n *\n * @remarks\n * - If the input array is not an array or the config key is not provided, the original array is returned.\n * - The `sortType` can be either 'ascending' or 'descending'.\n *\n * @example\n * ```typescript\n * const array = [\n * { name: 'Alice', age: 30 },\n * { name: 'Bob', age: 25 },\n * ];\n * const config = { key: 'age', sortType: 'ascending' };\n * const sortedArray = getObjects(array, config);\n * // sortedArray will be:\n * // [\n * // { name: 'Bob', age: 25 },\n * // { name: 'Alice', age: 30 },\n * // ]\n * ```\n */\n private sortObjectArray(\n array: ISortServiceValues<SortableValuesType>[] | null,\n config: ISortServiceConfig,\n ): ISortServiceValues<SortableValuesType>[] | null {\n if (!Array.isArray(array) || !config.key) {\n return array;\n }\n\n const { key, sortType } = config;\n\n if (sortType === 'ascending') {\n return sort(array).asc((obj) => obj[key]);\n } else {\n return sort(array).desc((obj) => obj[key]);\n }\n }\n\n /**\n * Sorts an array of objects in ascending order based on the specified key.\n *\n * @param array - The array of objects to be sorted.\n * @param key - The key of the object property to sort by.\n * @returns The sorted array of objects.\n */\n public sortObjectArrayAsc(\n array: ISortServiceValues<SortableValuesType>[] | null,\n key: string,\n ): ISortServiceValues<SortableValuesType>[] | null {\n return this.sortObjectArray(array, { key, sortType: 'ascending' });\n }\n\n /**\n * Sorts an array of objects in descending order based on the specified key.\n *\n * @param array - The array of objects to be sorted. Each object should implement the ISortServiceValues interface.\n * @param key - The key of the object property to sort by.\n * @returns The sorted array of objects in descending order.\n */\n public sortObjectArrayDesc(\n array: ISortServiceValues<SortableValuesType>[] | null,\n key: string,\n ): ISortServiceValues<SortableValuesType>[] | null {\n return this.sortObjectArray(array, { key, sortType: 'descending' });\n }\n\n /**\n * Sorts an array of values in ascending order.\n *\n * @param array - The array of values to be sorted.\n * @returns The sorted array in ascending order.\n */\n public arraySortAsc(array: ISortServiceArrayValues): ISortServiceArrayValues {\n return sort(array).asc();\n }\n\n /**\n * Sorts an array of values in descending order.\n *\n * @param array - The array of values to be sorted.\n * @returns The sorted array in descending order.\n */\n public arraySortDesc(array: ISortServiceArrayValues): ISortServiceArrayValues {\n return sort(array).desc();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAYa,WAAW,CAAA;AACtB;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;IACK,eAAe,CACrB,KAAsD,EACtD,MAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;AACxC,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM;AAEhC,QAAA,IAAI,QAAQ,KAAK,WAAW,EAAE;AAC5B,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3C;aAAO;AACL,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;QAC5C;IACF;AAEA;;;;;;AAMG;IACI,kBAAkB,CACvB,KAAsD,EACtD,GAAW,EAAA;AAEX,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;IACpE;AAEA;;;;;;AAMG;IACI,mBAAmB,CACxB,KAAsD,EACtD,GAAW,EAAA;AAEX,QAAA,OAAO,IAAI,CAAC,eAAe,CAAC,KAAK,EAAE,EAAE,GAAG,EAAE,QAAQ,EAAE,YAAY,EAAE,CAAC;IACrE;AAEA;;;;;AAKG;AACI,IAAA,YAAY,CAAC,KAA8B,EAAA;AAChD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE;IAC1B;AAEA;;;;;AAKG;AACI,IAAA,aAAa,CAAC,KAA8B,EAAA;AACjD,QAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,EAAE;IAC3B;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-sort-service.mjs","sources":["../../../projects/opal-frontend-common/services/sort-service/sort.service.ts","../../../projects/opal-frontend-common/services/sort-service/hmcts-opal-frontend-common-services-sort-service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { sort } from 'fast-sort';\nimport {\n ISortServiceConfig,\n ISortServiceValues,\n ISortServiceArrayValues,\n} from '@hmcts/opal-frontend-common/services/sort-service/interfaces';\nimport { SortableValuesType } from '@hmcts/opal-frontend-common/components/abstract/abstract-sortable-table/types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class SortService {\n /**\n * Sorts an array of objects based on a specified key and sort type.\n *\n * @param array - The array of objects to be sorted. Each object should implement the `ISortServiceValues` interface.\n * @param config - The configuration object containing the key to sort by and the sort type (ascending or descending).\n * @returns The sorted array of objects.\n *\n * @remarks\n * - If the input array is not an array or the config key is not provided, the original array is returned.\n * - The `sortType` can be either 'ascending' or 'descending'.\n *\n * @example\n * ```typescript\n * const array = [\n * { name: 'Alice', age: 30 },\n * { name: 'Bob', age: 25 },\n * ];\n * const config = { key: 'age', sortType: 'ascending' };\n * const sortedArray = getObjects(array, config);\n * // sortedArray will be:\n * // [\n * // { name: 'Bob', age: 25 },\n * // { name: 'Alice', age: 30 },\n * // ]\n * ```\n */\n private sortObjectArray(\n array: ISortServiceValues<SortableValuesType>[] | null,\n config: ISortServiceConfig,\n ): ISortServiceValues<SortableValuesType>[] | null {\n if (!Array.isArray(array) || !config.key) {\n return array;\n }\n\n const { key, sortType } = config;\n\n if (sortType === 'ascending') {\n return sort(array).asc((obj) => obj[key]);\n } else {\n return sort(array).desc((obj) => obj[key]);\n }\n }\n\n /**\n * Sorts an array of objects in ascending order based on the specified key.\n *\n * @param array - The array of objects to be sorted.\n * @param key - The key of the object property to sort by.\n * @returns The sorted array of objects.\n */\n public sortObjectArrayAsc(\n array: ISortServiceValues<SortableValuesType>[] | null,\n key: string,\n ): ISortServiceValues<SortableValuesType>[] | null {\n return this.sortObjectArray(array, { key, sortType: 'ascending' });\n }\n\n /**\n * Sorts an array of objects in descending order based on the specified key.\n *\n * @param array - The array of objects to be sorted. Each object should implement the ISortServiceValues interface.\n * @param key - The key of the object property to sort by.\n * @returns The sorted array of objects in descending order.\n */\n public sortObjectArrayDesc(\n array: ISortServiceValues<SortableValuesType>[] | null,\n key: string,\n ): ISortServiceValues<SortableValuesType>[] | null {\n return this.sortObjectArray(array, { key, sortType: 'descending' });\n }\n\n /**\n * Sorts an array of values in ascending order.\n *\n * @param array - The array of values to be sorted.\n * @returns The sorted array in ascending order.\n */\n public arraySortAsc(array: ISortServiceArrayValues): ISortServiceArrayValues {\n return sort(array).asc();\n }\n\n /**\n * Sorts an array of values in descending order.\n *\n * @param array - The array of values to be sorted.\n * @returns The sorted array in descending order.\n */\n public arraySortDesc(array: ISortServiceArrayValues): ISortServiceArrayValues {\n return sort(array).desc();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAYa,WAAW,CAAA;AACtB;;;;;;;;;;;;;;;;;;;;;;;;;AAyBG;IACK,eAAe,CACrB,KAAsD,EACtD,MAA0B,EAAA;AAE1B,QAAA,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE;AACxC,YAAA,OAAO,KAAK;QACd;AAEA,QAAA,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,MAAM;AAEhC,QAAA,IAAI,QAAQ,KAAK,WAAW,EAAE;AAC5B,YAAA,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,GAAG,CAAC,GAAG,CAAC,CAAC;QAC3C;aAAO;AACL,YAAA,OA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sightsConfig);
|
|
49
49
|
}
|
|
50
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
51
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
50
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransferStateService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
51
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransferStateService, providedIn: 'root' });
|
|
52
52
|
}
|
|
53
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
53
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransferStateService, decorators: [{
|
|
54
54
|
type: Injectable,
|
|
55
55
|
args: [{
|
|
56
56
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-transfer-state-service.mjs","sources":["../../../projects/opal-frontend-common/services/transfer-state-service/transfer-state.service.ts","../../../projects/opal-frontend-common/services/transfer-state-service/hmcts-opal-frontend-common-services-transfer-state-service.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Injectable, PLATFORM_ID, TransferState, inject, makeStateKey } from '@angular/core';\nimport { ITransferStateServerState } from '@hmcts/opal-frontend-common/services/transfer-state-service/interfaces';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransferStateService {\n private readonly platformId = inject(PLATFORM_ID);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly serverTransferState = inject<ITransferStateServerState | null>('serverTransferState' as any, {\n optional: true,\n });\n private readonly transferState = inject(TransferState);\n\n private readonly globalStore = inject(GlobalStore);\n private readonly storedServerTransferState!: ITransferStateServerState;\n\n constructor() {\n const storeKeyTransferState = makeStateKey<ITransferStateServerState>('serverTransferState');\n\n if (isPlatformBrowser(this.platformId)) {\n // get user state from transfer state if browser side\n this.serverTransferState = this.transferState.get(storeKeyTransferState, null);\n\n if (this.serverTransferState) {\n this.storedServerTransferState = this.serverTransferState;\n }\n } else {\n // server side: store server transfer state\n this.transferState.set(storeKeyTransferState, this.serverTransferState);\n }\n }\n\n /**\n * Initializes the SSO (Single Sign-On) enabled state.\n * Sets the SSO enabled state based on the stored server transfer state.\n */\n public initializeSsoEnabled(): void {\n this.globalStore.setSsoEnabled(this.storedServerTransferState?.ssoEnabled);\n }\n\n /**\n * Initializes the LaunchDarkly configuration by assigning the stored server transfer state's\n * launchDarklyConfig value to the globalStore's launchDarklyConfig property.\n */\n public initializeLaunchDarklyConfig(): void {\n this.globalStore.setLaunchDarklyConfig(this.storedServerTransferState?.launchDarklyConfig);\n }\n\n /**\n * Initializes the Application Insights configuration by assigning the stored server transfer state's\n * appInsightsConfig value to the globalStore's appInsightsConfig property.\n */\n public initializeAppInsightsConfig(): void {\n this.globalStore.setAppInsightsConfig(this.storedServerTransferState?.appInsightsConfig);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,oBAAoB,CAAA;AACd,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;;AAEhC,IAAA,mBAAmB,GAAG,MAAM,CAAmC,qBAA4B,EAAE;AAC5G,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACe,IAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAErC,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,yBAAyB;AAE1C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,qBAAqB,GAAG,YAAY,CAA4B,qBAAqB,CAAC;AAE5F,QAAA,IAAI,iBAAiB,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;;AAEtC,YAAA,IAAI,CAAC,mBAAmB,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC;AAE9E,YAAA,IAAI,IAAI,CAAC,mBAAmB,EAAE;AAC5B,gBAAA,IAAI,CAAC,yBAAyB,GAAG,IAAI,CAAC,mBAAmB;YAC3D;QACF;aAAO;;YAEL,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,CAAC,mBAAmB,CAAC;QACzE;IACF;AAEA;;;AAGG;IACI,oBAAoB,GAAA;QACzB,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,CAAC,yBAAyB,EAAE,UAAU,CAAC;IAC5E;AAEA;;;AAGG;IACI,4BAA4B,GAAA;QACjC,IAAI,CAAC,WAAW,CAAC,qBAAqB,CAAC,IAAI,CAAC,yBAAyB,EAAE,kBAAkB,CAAC;IAC5F;AAEA;;;AAGG;IACI,2BAA2B,GAAA;QAChC,IAAI,CAAC,WAAW,CAAC,oBAAoB,CAAC,IAAI,CAAC,yBAAyB,EAAE,iBAAiB,CAAC;IAC1F;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-transfer-state-service.mjs","sources":["../../../projects/opal-frontend-common/services/transfer-state-service/transfer-state.service.ts","../../../projects/opal-frontend-common/services/transfer-state-service/hmcts-opal-frontend-common-services-transfer-state-service.ts"],"sourcesContent":["import { isPlatformBrowser } from '@angular/common';\nimport { Injectable, PLATFORM_ID, TransferState, inject, makeStateKey } from '@angular/core';\nimport { ITransferStateServerState } from '@hmcts/opal-frontend-common/services/transfer-state-service/interfaces';\nimport { GlobalStore } from '@hmcts/opal-frontend-common/stores/global';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransferStateService {\n private readonly platformId = inject(PLATFORM_ID);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private readonly serverTransferState = inject<ITransferStateServerState | null>('serverTransferState' as any, {\n optional: true,\n });\n private readonly transferState = inject(TransferState);\n\n private readonly globalStore = inject(GlobalStore);\n private readonly storedServerTransferState!: ITransferStateServerState;\n\n constructor() {\n const storeKeyTransferState = makeStateKey<ITransferStateServerState>('serverTransferState');\n\n if (isPlatformBrowser(this.platformId)) {\n // get user state from transfer state if browser side\n this.serverTransferState = this.transferState.get(storeKeyTransferState, null);\n\n if (this.serverTransferState) {\n this.storedServerTransferState = this.serverTransferState;\n }\n } else {\n // server side: store server transfer state\n this.transferState.set(storeKeyTransferState, this.serverTransferState);\n }\n }\n\n /**\n * Initializes the SSO (Single Sign-On) enabled state.\n * Sets the SSO enabled state based on the stored server transfer state.\n */\n public initializeSsoEnabled(): void {\n this.globalStore.setSsoEnabled(this.storedServerTransferState?.ssoEnabled);\n }\n\n /**\n * Initializes the LaunchDarkly configuration by assigning the stored server transfer state's\n * launchDarklyConfig value to the globalStore's launchDarklyConfig property.\n */\n public initializeLaunchDarklyConfig(): void {\n this.globalStore.setLaunchDarklyConfig(this.storedServerTransferState?.launchDarklyConfig);\n }\n\n /**\n * Initializes the Application Insights configuration by assigning the stored server transfer state's\n * appInsightsConfig value to the globalStore's appInsightsConfig property.\n */\n public initializeAppInsightsConfig(): void {\n this.globalStore.setAppInsightsConfig(this.storedServerTransferState?.appInsightsConfig);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;MAQa,oBAAoB,CAAA;AACd,IAAA,UAAU,GAAG,MAAM,CAAC,WAAW,CAAC;;AAEhC,IAAA,mBAAmB,GAAG,MAAM,CAAmC,qBAA4B,EAAE;AAC5G,QAAA,QAAQ,EAAE,IAAI;AACf,KAAA,CAAC;AACe,IAAA,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;AAErC,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AACjC,IAAA,yBAAyB;AAE1C,IAAA,WAAA,GAAA;AACE,QAAA,MAAM,qBAAqB,GAAG,YAAY,CAA4B,qBAAqB,CAAC;AA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89
89
|
}
|
|
90
90
|
return result;
|
|
91
91
|
}
|
|
92
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
93
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
92
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransformationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransformationService, providedIn: 'root' });
|
|
94
94
|
}
|
|
95
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
95
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: TransformationService, decorators: [{
|
|
96
96
|
type: Injectable,
|
|
97
97
|
args: [{
|
|
98
98
|
providedIn: 'root',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hmcts-opal-frontend-common-services-transformation-service.mjs","sources":["../../../projects/opal-frontend-common/services/transformation-service/transformation.service.ts","../../../projects/opal-frontend-common/services/transformation-service/hmcts-opal-frontend-common-services-transformation-service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';\nimport { DateService } from '@hmcts/opal-frontend-common/services/date-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransformationService {\n private readonly dateService = inject(DateService);\n\n /**\n * Applies a transformation to the given value based on the specified transformation configuration.\n *\n * @param value - The value to be transformed.\n * @param transformItem - The configuration for the transformation, including the type of transformation and any necessary format details.\n * @returns The transformed value, or the original value if no transformation is applied.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private applyTransformation(value: any, transformItem: ITransformItem): any {\n if (!value) {\n return value;\n }\n\n if (transformItem.transformType === 'date' && transformItem.dateConfig) {\n const parsedDate = this.dateService.getFromFormat(value, transformItem.dateConfig.inputFormat);\n if (this.dateService.isValidDate(parsedDate)) {\n return this.dateService.toFormat(parsedDate, transformItem.dateConfig.outputFormat);\n }\n return value;\n }\n\n if (transformItem.transformType === 'time' && transformItem.timeConfig) {\n if (transformItem.timeConfig.addOffset) {\n // Add offset to the time value\n return `${value}:00Z`;\n } else if (transformItem.timeConfig.removeOffset) {\n // Remove offset from the time value\n return value.replace(/:00Z$/, '');\n }\n }\n\n return value;\n }\n\n /**\n * Transforms the values of an object based on a given transformation configuration.\n *\n * @param obj - The object whose values need to be transformed. It should be a non-null object.\n * @param toTransform - An array of transformation configurations, where each configuration specifies\n * the key to transform and the transformation details.\n * @returns The transformed object with values modified according to the transformation configuration.\n *\n * @remarks\n * - If the input `obj` is not an object or is null, it returns the input as is.\n * - The function recursively processes nested objects.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public transformObjectValues(obj: { [key: string]: any }, toTransform: ITransformItem[]): any {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n for (const [key, value] of Object.entries(obj)) {\n const transformItem = toTransform.find((item) => item.key === key);\n\n if (transformItem) {\n obj[key] = this.applyTransformation(value, transformItem);\n } else if (Array.isArray(value)) {\n obj[key] = value.map((item) =>\n typeof item === 'object' ? this.transformObjectValues(item, toTransform) : item,\n );\n } else if (typeof value === 'object') {\n obj[key] = this.transformObjectValues(value, toTransform); // Recursive call\n }\n }\n return obj;\n }\n\n /**\n * replaces the keys in the object provided\n * by replacing the current prefix with a new prefix.\n * Useful when mapping object keys to a different format or structure.\n * @param data - The data object containing key-value pairs.\n * @param currentPrefix - The prefix to be replaced in the keys.\n * @param replacementPrefix - The prefix to replace the current prefix with.\n * @returns A new object with the keys replaced.\n * @template T - The type of the form data object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public replaceKeys<T extends object>(data: T, currentPrefix: string, replacementPrefix: string): Record<string, any> {\n if (typeof data !== 'object' || data === null) {\n return {};\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const [key, value] of Object.entries(data)) {\n const newKey = key.replace(currentPrefix, replacementPrefix);\n result[newKey] = value;\n }\n\n return result;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,qBAAqB,CAAA;AACf,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;AAMG;;IAEK,mBAAmB,CAAC,KAAU,EAAE,aAA6B,EAAA;QACnE,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,KAAK;QACd;QAEA,IAAI,aAAa,CAAC,aAAa,KAAK,MAAM,IAAI,aAAa,CAAC,UAAU,EAAE;AACtE,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,WAAW,CAAC;YAC9F,IAAI,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE;AAC5C,gBAAA,OAAO,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC,UAAU,CAAC,YAAY,CAAC;YACrF;AACA,YAAA,OAAO,KAAK;QACd;QAEA,IAAI,aAAa,CAAC,aAAa,KAAK,MAAM,IAAI,aAAa,CAAC,UAAU,EAAE;AACtE,YAAA,IAAI,aAAa,CAAC,UAAU,CAAC,SAAS,EAAE;;gBAEtC,OAAO,CAAA,EAAG,KAAK,CAAA,IAAA,CAAM;YACvB;AAAO,iBAAA,IAAI,aAAa,CAAC,UAAU,CAAC,YAAY,EAAE;;gBAEhD,OAAO,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC;YACnC;QACF;AAEA,QAAA,OAAO,KAAK;IACd;AAEA;;;;;;;;;;;AAWG;;IAEI,qBAAqB,CAAC,GAA2B,EAAE,WAA6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G,GAAG,CAAC,OAAO,CAAC,aAAa,EAAE,iBAAiB,CAAC;AAC5D,YAAA,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK;QACxB;AAEA,QAAA,OAAO,MAAM;IACf;
|
|
1
|
+
{"version":3,"file":"hmcts-opal-frontend-common-services-transformation-service.mjs","sources":["../../../projects/opal-frontend-common/services/transformation-service/transformation.service.ts","../../../projects/opal-frontend-common/services/transformation-service/hmcts-opal-frontend-common-services-transformation-service.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { ITransformItem } from '@hmcts/opal-frontend-common/services/transformation-service/interfaces';\nimport { DateService } from '@hmcts/opal-frontend-common/services/date-service';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TransformationService {\n private readonly dateService = inject(DateService);\n\n /**\n * Applies a transformation to the given value based on the specified transformation configuration.\n *\n * @param value - The value to be transformed.\n * @param transformItem - The configuration for the transformation, including the type of transformation and any necessary format details.\n * @returns The transformed value, or the original value if no transformation is applied.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n private applyTransformation(value: any, transformItem: ITransformItem): any {\n if (!value) {\n return value;\n }\n\n if (transformItem.transformType === 'date' && transformItem.dateConfig) {\n const parsedDate = this.dateService.getFromFormat(value, transformItem.dateConfig.inputFormat);\n if (this.dateService.isValidDate(parsedDate)) {\n return this.dateService.toFormat(parsedDate, transformItem.dateConfig.outputFormat);\n }\n return value;\n }\n\n if (transformItem.transformType === 'time' && transformItem.timeConfig) {\n if (transformItem.timeConfig.addOffset) {\n // Add offset to the time value\n return `${value}:00Z`;\n } else if (transformItem.timeConfig.removeOffset) {\n // Remove offset from the time value\n return value.replace(/:00Z$/, '');\n }\n }\n\n return value;\n }\n\n /**\n * Transforms the values of an object based on a given transformation configuration.\n *\n * @param obj - The object whose values need to be transformed. It should be a non-null object.\n * @param toTransform - An array of transformation configurations, where each configuration specifies\n * the key to transform and the transformation details.\n * @returns The transformed object with values modified according to the transformation configuration.\n *\n * @remarks\n * - If the input `obj` is not an object or is null, it returns the input as is.\n * - The function recursively processes nested objects.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public transformObjectValues(obj: { [key: string]: any }, toTransform: ITransformItem[]): any {\n if (typeof obj !== 'object' || obj === null) {\n return obj;\n }\n\n for (const [key, value] of Object.entries(obj)) {\n const transformItem = toTransform.find((item) => item.key === key);\n\n if (transformItem) {\n obj[key] = this.applyTransformation(value, transformItem);\n } else if (Array.isArray(value)) {\n obj[key] = value.map((item) =>\n typeof item === 'object' ? this.transformObjectValues(item, toTransform) : item,\n );\n } else if (typeof value === 'object') {\n obj[key] = this.transformObjectValues(value, toTransform); // Recursive call\n }\n }\n return obj;\n }\n\n /**\n * replaces the keys in the object provided\n * by replacing the current prefix with a new prefix.\n * Useful when mapping object keys to a different format or structure.\n * @param data - The data object containing key-value pairs.\n * @param currentPrefix - The prefix to be replaced in the keys.\n * @param replacementPrefix - The prefix to replace the current prefix with.\n * @returns A new object with the keys replaced.\n * @template T - The type of the form data object.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n public replaceKeys<T extends object>(data: T, currentPrefix: string, replacementPrefix: string): Record<string, any> {\n if (typeof data !== 'object' || data === null) {\n return {};\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const result: Record<string, any> = {};\n\n for (const [key, value] of Object.entries(data)) {\n const newKey = key.replace(currentPrefix, replacementPrefix);\n result[newKey] = value;\n }\n\n return result;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;MAOa,qBAAqB,CAAA;AACf,IAAA,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;AAElD;;;;;;AAMG;;IAEK,mBAAmB,CAAC,KAAU,EAAE,aAA6B,EAAA;QACnE,IAAI,CAAC,KAAK,EAAE;AACV,YAAA,OAAO,KAAK;QACd;QAEA,IAAI,aAAa,CAAC,aAAa,KAAK,MAAM,IAAI,aAAa,CAAC,UAAU,EAAE;AACtE,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AAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACND;;AAEG;;;;"}
|
|
@@ -153,10 +153,10 @@ class UtilsService {
|
|
|
153
153
|
hasSetProperty(value) {
|
|
154
154
|
return Object.values(value ?? {}).some((v) => (typeof v === 'boolean' ? v === true : v !== null && v !== ''));
|
|
155
155
|
}
|
|
156
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.
|
|
157
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.
|
|
156
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: UtilsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
157
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: UtilsService, providedIn: 'root' });
|
|
158
158
|
}
|
|
159
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.
|
|
159
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: UtilsService, decorators: [{
|
|
160
160
|
type: Injectable,
|
|
161
161
|
args: [{
|
|
162
162
|
providedIn: 'root',
|