@spicainternational/ngx-sds-components 7.12.0-beta.1 → 8.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -57
- package/{esm2020 → esm2022}/public-api.mjs +35 -34
- package/{esm2020 → esm2022}/spicainternational-ngx-sds-components.mjs +4 -4
- package/esm2022/src/lib/app-switcher/app-switcher.component.mjs +116 -0
- package/{esm2020 → esm2022}/src/lib/app-switcher/app-switcher.model.mjs +1 -1
- package/esm2022/src/lib/app-switcher/public-api.mjs +3 -0
- package/{esm2020 → esm2022}/src/lib/app-switcher/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs +4 -4
- package/esm2022/src/lib/avatar/avatar-group.component.mjs +82 -0
- package/{esm2020 → esm2022}/src/lib/avatar/avatar-group.model.mjs +1 -1
- package/esm2022/src/lib/avatar/avatar.component.mjs +151 -0
- package/esm2022/src/lib/avatar/public-api.mjs +4 -0
- package/{esm2020 → esm2022}/src/lib/avatar/spicainternational-ngx-sds-components-src-lib-avatar.mjs +4 -4
- package/esm2022/src/lib/badge/badge.directive.mjs +90 -0
- package/{esm2020 → esm2022}/src/lib/badge/badge.types.mjs +1 -1
- package/esm2022/src/lib/badge/components/badge.component.mjs +59 -0
- package/{esm2020 → esm2022}/src/lib/badge/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/badge/spicainternational-ngx-sds-components-src-lib-badge.mjs +4 -4
- package/esm2022/src/lib/callout/callout.component.mjs +20 -0
- package/{esm2020 → esm2022}/src/lib/callout/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/callout/spicainternational-ngx-sds-components-src-lib-callout.mjs +4 -4
- package/esm2022/src/lib/color-picker/color-picker.component.mjs +82 -0
- package/{esm2020 → esm2022}/src/lib/color-picker/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/color-picker/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +4 -4
- package/esm2022/src/lib/date-picker/date-picker.component.mjs +863 -0
- package/esm2022/src/lib/date-picker/date-picker.model.mjs +71 -0
- package/esm2022/src/lib/date-picker/public-api.mjs +3 -0
- package/esm2022/src/lib/date-picker/sds-date-picker.service.mjs +90 -0
- package/{esm2020 → esm2022}/src/lib/date-picker/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +4 -4
- package/esm2022/src/lib/date-pipes/date-compare.pipe.mjs +32 -0
- package/esm2022/src/lib/date-pipes/date-format.pipe.mjs +31 -0
- package/esm2022/src/lib/date-pipes/date-period-format.pipe.mjs +49 -0
- package/{esm2020 → esm2022}/src/lib/date-pipes/date-time-formats.constants.mjs +155 -155
- package/esm2022/src/lib/date-pipes/date-time-range-duration.pipe.mjs +33 -0
- package/esm2022/src/lib/date-pipes/date-time-range-format.pipe.mjs +49 -0
- package/{esm2020 → esm2022}/src/lib/date-pipes/public-api.mjs +8 -8
- package/{esm2020 → esm2022}/src/lib/date-pipes/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs +4 -4
- package/esm2022/src/lib/drawer/drawer.component.mjs +103 -0
- package/{esm2020 → esm2022}/src/lib/drawer/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/drawer/spicainternational-ngx-sds-components-src-lib-drawer.mjs +4 -4
- package/esm2022/src/lib/duration-box/duration-box.component.mjs +279 -0
- package/{esm2020 → esm2022}/src/lib/duration-box/duration-box.types.mjs +1 -1
- package/esm2022/src/lib/duration-box/duration.service.mjs +72 -0
- package/{esm2020 → esm2022}/src/lib/duration-box/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/duration-box/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +4 -4
- package/esm2022/src/lib/duration-pipe/duration-format.pipe.mjs +27 -0
- package/{esm2020 → esm2022}/src/lib/duration-pipe/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/duration-pipe/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +4 -4
- package/esm2022/src/lib/ellipsis/directives/ellipsis.directive.mjs +52 -0
- package/{esm2020 → esm2022}/src/lib/ellipsis/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/ellipsis/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +4 -4
- package/esm2022/src/lib/expansion-panel/expansion-panel.component.mjs +86 -0
- package/{esm2020 → esm2022}/src/lib/expansion-panel/expansion-panel.types.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/expansion-panel/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +4 -4
- package/esm2022/src/lib/highlight-text/directives/highlight-text.directive.mjs +61 -0
- package/{esm2020 → esm2022}/src/lib/highlight-text/directives/index.mjs +1 -1
- package/esm2022/src/lib/highlight-text/pipes/highlight-text.pipe.mjs +30 -0
- package/{esm2020 → esm2022}/src/lib/highlight-text/pipes/index.mjs +1 -1
- package/esm2022/src/lib/highlight-text/public-api.mjs +3 -0
- package/{esm2020 → esm2022}/src/lib/highlight-text/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs +4 -4
- package/esm2022/src/lib/highlight-text/utils/highlight-text.utils.mjs +97 -0
- package/{esm2020 → esm2022}/src/lib/highlight-text/utils/index.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/intersection/directives/index.mjs +1 -1
- package/esm2022/src/lib/intersection/directives/intersection.directive.mjs +52 -0
- package/esm2022/src/lib/intersection/public-api.mjs +3 -0
- package/{esm2020 → esm2022}/src/lib/intersection/services/index.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/intersection/services/intersection.service.mjs +54 -54
- package/{esm2020 → esm2022}/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/keyboard-shortcut/directives/index.mjs +1 -1
- package/esm2022/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.mjs +57 -0
- package/{esm2020 → esm2022}/src/lib/keyboard-shortcut/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/keyboard-shortcut/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +4 -4
- package/esm2022/src/lib/layout/default-layout/default-layout.component.mjs +15 -0
- package/esm2022/src/lib/layout/extra-large-layout/extra-large-layout.component.mjs +15 -0
- package/esm2022/src/lib/layout/fluid-layout/fluid-layout.component.mjs +15 -0
- package/esm2022/src/lib/layout/medium-layout/medium-layout.component.mjs +15 -0
- package/esm2022/src/lib/layout/public-api.mjs +6 -0
- package/esm2022/src/lib/layout/small-layout/small-layout.component.mjs +15 -0
- package/{esm2020 → esm2022}/src/lib/layout/spicainternational-ngx-sds-components-src-lib-layout.mjs +4 -4
- package/esm2022/src/lib/message/message.component.mjs +60 -0
- package/{esm2020 → esm2022}/src/lib/message/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/message/spicainternational-ngx-sds-components-src-lib-message.mjs +4 -4
- package/esm2022/src/lib/modal/dialog/dialog.component.mjs +187 -0
- package/{esm2020 → esm2022}/src/lib/modal/dialog/dialog.types.mjs +1 -1
- package/esm2022/src/lib/modal/modal.component.mjs +153 -0
- package/{esm2020 → esm2022}/src/lib/modal/modal.model.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/modal/public-api.mjs +3 -4
- package/{esm2020 → esm2022}/src/lib/modal/spicainternational-ngx-sds-components-src-lib-modal.mjs +4 -4
- package/esm2022/src/lib/navigation/models/navigation-models.mjs +2 -0
- package/esm2022/src/lib/navigation/navigation-collapsible-frame/navigation-collapsible-frame.component.mjs +17 -0
- package/esm2022/src/lib/navigation/navigation-container/navigation-container.component.mjs +61 -0
- package/esm2022/src/lib/navigation/navigation-external-link/navigation-external-link.component.mjs +38 -0
- package/esm2022/src/lib/navigation/navigation-group/navigation-group.component.mjs +110 -0
- package/esm2022/src/lib/navigation/navigation-header/navigation-header.component.mjs +21 -0
- package/esm2022/src/lib/navigation/navigation-route-link/navigation-route-link.component.mjs +38 -0
- package/esm2022/src/lib/navigation/navigation-separator/navigation-separator.component.mjs +15 -0
- package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-action-button/user-profile-action-button.component.mjs +30 -0
- package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.component.mjs +45 -0
- package/{esm2020 → esm2022}/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.types.mjs +1 -1
- package/esm2022/src/lib/navigation/navigation-user-profile/components/user-profile-tile/user-profile-tile.component.mjs +25 -0
- package/{esm2020 → esm2022}/src/lib/navigation/navigation-user-profile/navigation-profile.model.mjs +1 -1
- package/esm2022/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.mjs +107 -0
- package/esm2022/src/lib/navigation/product-home/product-home.component.mjs +71 -0
- package/esm2022/src/lib/navigation/public-api.mjs +14 -0
- package/{esm2020 → esm2022}/src/lib/navigation/spicainternational-ngx-sds-components-src-lib-navigation.mjs +4 -4
- package/esm2022/src/lib/navigation/utils/navigation.utils.mjs +48 -0
- package/esm2022/src/lib/number-box/number-box.component.mjs +138 -0
- package/{esm2020 → esm2022}/src/lib/number-box/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/number-box/spicainternational-ngx-sds-components-src-lib-number-box.mjs +4 -4
- package/esm2022/src/lib/page-header/page-header.component.mjs +25 -0
- package/{esm2020 → esm2022}/src/lib/page-header/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/page-header/spicainternational-ngx-sds-components-src-lib-page-header.mjs +4 -4
- package/esm2022/src/lib/pane/pane.component.mjs +43 -0
- package/{esm2020 → esm2022}/src/lib/pane/pane.model.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/pane/public-api.mjs +3 -4
- package/{esm2020 → esm2022}/src/lib/pane/spicainternational-ngx-sds-components-src-lib-pane.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/quick-info/public-api.mjs +2 -3
- package/esm2022/src/lib/quick-info/quick-info.component.mjs +121 -0
- package/{esm2020 → esm2022}/src/lib/quick-info/quick-info.model.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/quick-info/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/segmented-control/public-api.mjs +2 -3
- package/esm2022/src/lib/segmented-control/segmented-control.component.mjs +60 -0
- package/{esm2020 → esm2022}/src/lib/segmented-control/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/side-bar/public-api.mjs +2 -3
- package/esm2022/src/lib/side-bar/side-bar.component.mjs +39 -0
- package/{esm2020 → esm2022}/src/lib/side-bar/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/static-value/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/static-value/spicainternational-ngx-sds-components-src-lib-static-value.mjs +4 -4
- package/esm2022/src/lib/static-value/static-value.component.mjs +25 -0
- package/{esm2020 → esm2022}/src/lib/table-actions/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/table-actions/spicainternational-ngx-sds-components-src-lib-table-actions.mjs +4 -4
- package/esm2022/src/lib/table-actions/table-actions.component.mjs +49 -0
- package/esm2022/src/lib/timeline/components/timeline.component.mjs +388 -0
- package/{esm2020 → esm2022}/src/lib/timeline/models/timeline.model.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/timeline/public-api.mjs +2 -3
- package/esm2022/src/lib/timeline/services/timeline.service.mjs +152 -0
- package/{esm2020 → esm2022}/src/lib/timeline/spicainternational-ngx-sds-components-src-lib-timeline.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/timeline/types/timeline.types.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/timer/public-api.mjs +3 -4
- package/{esm2020 → esm2022}/src/lib/timer/services/index.mjs +1 -1
- package/esm2022/src/lib/timer/services/timer.service.mjs +99 -0
- package/{esm2020 → esm2022}/src/lib/timer/spicainternational-ngx-sds-components-src-lib-timer.mjs +4 -4
- package/{esm2020 → esm2022}/src/lib/timer/utils/index.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/timer/utils/timer.utils.mjs +96 -96
- package/esm2022/src/lib/tooltip/components/tooltip.component.mjs +26 -0
- package/{esm2020 → esm2022}/src/lib/tooltip/public-api.mjs +2 -3
- package/{esm2020 → esm2022}/src/lib/tooltip/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +4 -4
- package/esm2022/src/lib/tooltip/tooltip.directive.mjs +192 -0
- package/{esm2020 → esm2022}/src/lib/tooltip/tooltip.types.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/tooltip/utils/index.mjs +1 -1
- package/{esm2020 → esm2022}/src/lib/tooltip/utils/tooltip.utils.mjs +16 -16
- package/esm2022/src/lib/utils/date-time/date-time-format.function.mjs +15 -0
- package/esm2022/src/lib/utils/date-time/intl-date-time-format-options-presets.mjs +29 -0
- package/esm2022/src/lib/utils/date-time/public-api.mjs +3 -0
- package/esm2022/src/lib/utils/date-time/spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs +5 -0
- package/esm2022/src/lib/utils/public-api.mjs +2 -0
- package/esm2022/src/lib/utils/spicainternational-ngx-sds-components-src-lib-utils.mjs +5 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs +122 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-avatar.mjs +236 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-badge.mjs +153 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-callout.mjs +27 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-callout.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +89 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +1025 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs +330 -399
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/spicainternational-ngx-sds-components-src-lib-drawer.mjs +103 -118
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-drawer.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +354 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +34 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +59 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +93 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs +178 -201
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/spicainternational-ngx-sds-components-src-lib-intersection.mjs +99 -114
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +64 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-layout.mjs +70 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-layout.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-message.mjs +67 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-message.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-modal.mjs +343 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-navigation.mjs +579 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-number-box.mjs +145 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-number-box.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-page-header.mjs +32 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-pane.mjs +50 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +128 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs +67 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +46 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-static-value.mjs +32 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-static-value.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-table-actions.mjs +56 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-table-actions.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-timeline.mjs +546 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-timeline.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/spicainternational-ngx-sds-components-src-lib-timer.mjs +192 -223
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +1 -0
- package/{fesm2020 → fesm2022}/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +228 -250
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs +49 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils-date-time.mjs.map +1 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils.mjs +49 -0
- package/fesm2022/spicainternational-ngx-sds-components-src-lib-utils.mjs.map +1 -0
- package/{fesm2015 → fesm2022}/spicainternational-ngx-sds-components.mjs +5 -4
- package/{fesm2015 → fesm2022}/spicainternational-ngx-sds-components.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/package.json +120 -172
- package/public-api.d.ts +31 -30
- package/src/lib/app-switcher/app-switcher.component.d.ts +34 -34
- package/src/lib/app-switcher/app-switcher.model.d.ts +8 -8
- package/src/lib/app-switcher/index.d.ts +5 -5
- package/src/lib/app-switcher/public-api.d.ts +2 -3
- package/src/lib/avatar/avatar-group.component.d.ts +28 -28
- package/src/lib/avatar/avatar-group.model.d.ts +6 -6
- package/src/lib/avatar/avatar.component.d.ts +53 -55
- package/src/lib/avatar/index.d.ts +5 -5
- package/src/lib/avatar/public-api.d.ts +3 -4
- package/src/lib/badge/badge.directive.d.ts +23 -23
- package/src/lib/badge/badge.types.d.ts +2 -2
- package/src/lib/badge/components/badge.component.d.ts +23 -23
- package/src/lib/badge/index.d.ts +5 -5
- package/src/lib/badge/public-api.d.ts +1 -2
- package/src/lib/callout/callout.component.d.ts +10 -10
- package/src/lib/callout/index.d.ts +5 -5
- package/src/lib/callout/public-api.d.ts +1 -2
- package/src/lib/color-picker/color-picker.component.d.ts +27 -28
- package/src/lib/color-picker/index.d.ts +5 -5
- package/src/lib/color-picker/public-api.d.ts +1 -2
- package/src/lib/date-picker/date-picker.component.d.ts +149 -149
- package/src/lib/date-picker/date-picker.model.d.ts +34 -34
- package/src/lib/date-picker/index.d.ts +5 -5
- package/src/lib/date-picker/public-api.d.ts +2 -3
- package/src/lib/date-picker/sds-date-picker.service.d.ts +9 -9
- package/src/lib/date-pipes/date-compare.pipe.d.ts +7 -7
- package/src/lib/date-pipes/date-format.pipe.d.ts +19 -18
- package/src/lib/date-pipes/date-period-format.pipe.d.ts +11 -7
- package/src/lib/date-pipes/date-time-formats.constants.d.ts +22 -22
- package/src/lib/date-pipes/date-time-range-duration.pipe.d.ts +7 -7
- package/src/lib/date-pipes/date-time-range-format.pipe.d.ts +15 -15
- package/src/lib/date-pipes/index.d.ts +5 -5
- package/src/lib/date-pipes/public-api.d.ts +7 -7
- package/src/lib/drawer/drawer.component.d.ts +24 -24
- package/src/lib/drawer/index.d.ts +5 -5
- package/src/lib/drawer/public-api.d.ts +1 -2
- package/src/lib/duration-box/duration-box.component.d.ts +137 -137
- package/src/lib/duration-box/duration-box.types.d.ts +1 -1
- package/src/lib/duration-box/duration.service.d.ts +10 -10
- package/src/lib/duration-box/index.d.ts +5 -5
- package/src/lib/duration-box/public-api.d.ts +1 -2
- package/src/lib/duration-pipe/duration-format.pipe.d.ts +7 -7
- package/src/lib/duration-pipe/index.d.ts +5 -5
- package/src/lib/duration-pipe/public-api.d.ts +1 -2
- package/src/lib/ellipsis/directives/ellipsis.directive.d.ts +13 -13
- package/src/lib/ellipsis/index.d.ts +5 -5
- package/src/lib/ellipsis/public-api.d.ts +1 -2
- package/src/lib/expansion-panel/expansion-panel.component.d.ts +52 -52
- package/src/lib/expansion-panel/expansion-panel.types.d.ts +2 -2
- package/src/lib/expansion-panel/index.d.ts +5 -5
- package/src/lib/expansion-panel/public-api.d.ts +1 -2
- package/src/lib/highlight-text/directives/highlight-text.directive.d.ts +33 -33
- package/src/lib/highlight-text/directives/index.d.ts +1 -1
- package/src/lib/highlight-text/index.d.ts +5 -5
- package/src/lib/highlight-text/pipes/highlight-text.pipe.d.ts +11 -11
- package/src/lib/highlight-text/pipes/index.d.ts +1 -1
- package/src/lib/highlight-text/public-api.d.ts +2 -3
- package/src/lib/highlight-text/utils/highlight-text.utils.d.ts +23 -23
- package/src/lib/highlight-text/utils/index.d.ts +1 -1
- package/src/lib/intersection/directives/index.d.ts +1 -1
- package/src/lib/intersection/directives/intersection.directive.d.ts +24 -24
- package/src/lib/intersection/index.d.ts +5 -5
- package/src/lib/intersection/public-api.d.ts +2 -3
- package/src/lib/intersection/services/index.d.ts +1 -1
- package/src/lib/intersection/services/intersection.service.d.ts +19 -19
- package/src/lib/keyboard-shortcut/directives/index.d.ts +1 -1
- package/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.d.ts +22 -22
- package/src/lib/keyboard-shortcut/index.d.ts +5 -5
- package/src/lib/keyboard-shortcut/public-api.d.ts +1 -2
- package/src/lib/layout/default-layout/default-layout.component.d.ts +8 -8
- package/src/lib/layout/extra-large-layout/extra-large-layout.component.d.ts +8 -8
- package/src/lib/layout/fluid-layout/fluid-layout.component.d.ts +8 -8
- package/src/lib/layout/index.d.ts +5 -5
- package/src/lib/layout/medium-layout/medium-layout.component.d.ts +8 -8
- package/src/lib/layout/public-api.d.ts +5 -6
- package/src/lib/layout/small-layout/small-layout.component.d.ts +8 -8
- package/src/lib/message/index.d.ts +5 -5
- package/src/lib/message/message.component.d.ts +24 -24
- package/src/lib/message/public-api.d.ts +1 -2
- package/src/lib/modal/dialog/dialog.component.d.ts +61 -61
- package/src/lib/modal/dialog/dialog.types.d.ts +1 -1
- package/src/lib/modal/index.d.ts +5 -5
- package/src/lib/modal/modal.component.d.ts +54 -54
- package/src/lib/modal/modal.model.d.ts +3 -3
- package/src/lib/modal/public-api.d.ts +2 -3
- package/src/lib/navigation/index.d.ts +5 -5
- package/src/lib/navigation/models/navigation-models.d.ts +4 -0
- package/src/lib/navigation/navigation-collapsible-frame/navigation-collapsible-frame.component.d.ts +7 -0
- package/src/lib/navigation/navigation-container/navigation-container.component.d.ts +26 -9
- package/src/lib/navigation/navigation-external-link/navigation-external-link.component.d.ts +17 -15
- package/src/lib/navigation/navigation-group/navigation-group.component.d.ts +44 -40
- package/src/lib/navigation/navigation-header/navigation-header.component.d.ts +11 -9
- package/src/lib/navigation/navigation-route-link/navigation-route-link.component.d.ts +19 -17
- package/src/lib/navigation/navigation-separator/navigation-separator.component.d.ts +10 -8
- package/src/lib/navigation/navigation-user-profile/components/user-profile-action-button/user-profile-action-button.component.d.ts +11 -11
- package/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.component.d.ts +17 -17
- package/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.types.d.ts +1 -1
- package/src/lib/navigation/navigation-user-profile/components/user-profile-tile/user-profile-tile.component.d.ts +9 -9
- package/src/lib/navigation/navigation-user-profile/navigation-profile.model.d.ts +6 -6
- package/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.d.ts +34 -31
- package/src/lib/navigation/product-home/product-home.component.d.ts +32 -23
- package/src/lib/navigation/public-api.d.ts +13 -12
- package/src/lib/navigation/utils/navigation.utils.d.ts +2 -2
- package/src/lib/number-box/index.d.ts +5 -5
- package/src/lib/number-box/number-box.component.d.ts +83 -83
- package/src/lib/number-box/public-api.d.ts +1 -2
- package/src/lib/page-header/index.d.ts +5 -5
- package/src/lib/page-header/page-header.component.d.ts +11 -11
- package/src/lib/page-header/public-api.d.ts +1 -2
- package/src/lib/pane/index.d.ts +5 -5
- package/src/lib/pane/pane.component.d.ts +19 -19
- package/src/lib/pane/pane.model.d.ts +8 -8
- package/src/lib/pane/public-api.d.ts +2 -3
- package/src/lib/quick-info/index.d.ts +5 -5
- package/src/lib/quick-info/public-api.d.ts +1 -2
- package/src/lib/quick-info/quick-info.component.d.ts +43 -43
- package/src/lib/quick-info/quick-info.model.d.ts +9 -9
- package/src/lib/segmented-control/index.d.ts +5 -5
- package/src/lib/segmented-control/public-api.d.ts +1 -2
- package/src/lib/segmented-control/segmented-control.component.d.ts +21 -21
- package/src/lib/side-bar/index.d.ts +5 -5
- package/src/lib/side-bar/public-api.d.ts +1 -2
- package/src/lib/side-bar/side-bar.component.d.ts +24 -74
- package/src/lib/static-value/index.d.ts +5 -5
- package/src/lib/static-value/public-api.d.ts +1 -2
- package/src/lib/static-value/static-value.component.d.ts +12 -12
- package/src/lib/table-actions/index.d.ts +5 -5
- package/src/lib/table-actions/public-api.d.ts +1 -2
- package/src/lib/table-actions/table-actions.component.d.ts +16 -16
- package/src/lib/timeline/components/timeline.component.d.ts +206 -198
- package/src/lib/timeline/index.d.ts +5 -5
- package/src/lib/timeline/models/timeline.model.d.ts +38 -38
- package/src/lib/timeline/public-api.d.ts +1 -2
- package/src/lib/timeline/services/timeline.service.d.ts +24 -21
- package/src/lib/timeline/types/timeline.types.d.ts +2 -2
- package/src/lib/timer/index.d.ts +5 -5
- package/src/lib/timer/public-api.d.ts +2 -3
- package/src/lib/timer/services/index.d.ts +1 -1
- package/src/lib/timer/services/timer.service.d.ts +78 -78
- package/src/lib/timer/utils/index.d.ts +1 -1
- package/src/lib/timer/utils/timer.utils.d.ts +61 -61
- package/src/lib/tooltip/components/tooltip.component.d.ts +18 -18
- package/src/lib/tooltip/index.d.ts +5 -5
- package/src/lib/tooltip/public-api.d.ts +1 -2
- package/src/lib/tooltip/tooltip.directive.d.ts +36 -36
- package/src/lib/tooltip/tooltip.types.d.ts +2 -2
- package/src/lib/tooltip/utils/index.d.ts +1 -1
- package/src/lib/tooltip/utils/tooltip.utils.d.ts +5 -5
- package/src/lib/utils/date-time/date-time-format.function.d.ts +2 -0
- package/src/lib/utils/date-time/index.d.ts +5 -0
- package/src/lib/utils/date-time/intl-date-time-format-options-presets.d.ts +4 -0
- package/src/lib/utils/date-time/public-api.d.ts +2 -0
- package/src/lib/utils/index.d.ts +5 -0
- package/src/lib/utils/public-api.d.ts +1 -0
- package/esm2020/src/lib/app-switcher/app-switcher.component.mjs +0 -107
- package/esm2020/src/lib/app-switcher/app-switcher.module.mjs +0 -36
- package/esm2020/src/lib/app-switcher/public-api.mjs +0 -4
- package/esm2020/src/lib/avatar/avatar-group.component.mjs +0 -80
- package/esm2020/src/lib/avatar/avatar.component.mjs +0 -162
- package/esm2020/src/lib/avatar/avatar.module.mjs +0 -41
- package/esm2020/src/lib/avatar/public-api.mjs +0 -5
- package/esm2020/src/lib/badge/badge.directive.mjs +0 -89
- package/esm2020/src/lib/badge/badge.module.mjs +0 -27
- package/esm2020/src/lib/badge/components/badge.component.mjs +0 -59
- package/esm2020/src/lib/callout/callout.component.mjs +0 -20
- package/esm2020/src/lib/callout/callout.module.mjs +0 -25
- package/esm2020/src/lib/color-picker/color-picker.component.mjs +0 -76
- package/esm2020/src/lib/color-picker/color-picker.module.mjs +0 -33
- package/esm2020/src/lib/date-picker/date-picker.component.mjs +0 -841
- package/esm2020/src/lib/date-picker/date-picker.model.mjs +0 -71
- package/esm2020/src/lib/date-picker/date-picker.module.mjs +0 -68
- package/esm2020/src/lib/date-picker/public-api.mjs +0 -4
- package/esm2020/src/lib/date-picker/sds-date-picker.service.mjs +0 -90
- package/esm2020/src/lib/date-pipes/date-compare.pipe.mjs +0 -31
- package/esm2020/src/lib/date-pipes/date-format.pipe.mjs +0 -73
- package/esm2020/src/lib/date-pipes/date-period-format.pipe.mjs +0 -44
- package/esm2020/src/lib/date-pipes/date-pipes.module.mjs +0 -43
- package/esm2020/src/lib/date-pipes/date-time-range-duration.pipe.mjs +0 -31
- package/esm2020/src/lib/date-pipes/date-time-range-format.pipe.mjs +0 -48
- package/esm2020/src/lib/drawer/drawer.component.mjs +0 -103
- package/esm2020/src/lib/drawer/drawer.module.mjs +0 -18
- package/esm2020/src/lib/duration-box/duration-box.component.mjs +0 -261
- package/esm2020/src/lib/duration-box/duration-box.module.mjs +0 -44
- package/esm2020/src/lib/duration-box/duration.service.mjs +0 -72
- package/esm2020/src/lib/duration-pipe/duration-format.pipe.mjs +0 -26
- package/esm2020/src/lib/duration-pipe/duration-pipe.module.mjs +0 -18
- package/esm2020/src/lib/ellipsis/directives/ellipsis.directive.mjs +0 -51
- package/esm2020/src/lib/ellipsis/ellipsis.module.mjs +0 -24
- package/esm2020/src/lib/expansion-panel/expansion-panel.component.mjs +0 -86
- package/esm2020/src/lib/expansion-panel/expansion-panel.module.mjs +0 -25
- package/esm2020/src/lib/highlight-text/directives/highlight-text.directive.mjs +0 -60
- package/esm2020/src/lib/highlight-text/highlight-text.module.mjs +0 -29
- package/esm2020/src/lib/highlight-text/pipes/highlight-text.pipe.mjs +0 -29
- package/esm2020/src/lib/highlight-text/public-api.mjs +0 -4
- package/esm2020/src/lib/highlight-text/utils/highlight-text.utils.mjs +0 -97
- package/esm2020/src/lib/intersection/directives/intersection.directive.mjs +0 -51
- package/esm2020/src/lib/intersection/intersection.module.mjs +0 -20
- package/esm2020/src/lib/intersection/public-api.mjs +0 -4
- package/esm2020/src/lib/keyboard-shortcut/directives/keyboard-shortcut.directive.mjs +0 -56
- package/esm2020/src/lib/keyboard-shortcut/keyboard-shortcut.module.mjs +0 -24
- package/esm2020/src/lib/layout/default-layout/default-layout.component.mjs +0 -15
- package/esm2020/src/lib/layout/extra-large-layout/extra-large-layout.component.mjs +0 -15
- package/esm2020/src/lib/layout/fluid-layout/fluid-layout.component.mjs +0 -15
- package/esm2020/src/lib/layout/layout.module.mjs +0 -47
- package/esm2020/src/lib/layout/medium-layout/medium-layout.component.mjs +0 -15
- package/esm2020/src/lib/layout/public-api.mjs +0 -7
- package/esm2020/src/lib/layout/small-layout/small-layout.component.mjs +0 -15
- package/esm2020/src/lib/message/message.component.mjs +0 -60
- package/esm2020/src/lib/message/message.module.mjs +0 -28
- package/esm2020/src/lib/modal/dialog/dialog.component.mjs +0 -187
- package/esm2020/src/lib/modal/modal.component.mjs +0 -147
- package/esm2020/src/lib/modal/modal.module.mjs +0 -43
- package/esm2020/src/lib/navigation/navigation-container/navigation-container.component.mjs +0 -17
- package/esm2020/src/lib/navigation/navigation-external-link/navigation-external-link.component.mjs +0 -37
- package/esm2020/src/lib/navigation/navigation-group/navigation-group.component.mjs +0 -100
- package/esm2020/src/lib/navigation/navigation-header/navigation-header.component.mjs +0 -17
- package/esm2020/src/lib/navigation/navigation-route-link/navigation-route-link.component.mjs +0 -33
- package/esm2020/src/lib/navigation/navigation-separator/navigation-separator.component.mjs +0 -14
- package/esm2020/src/lib/navigation/navigation-user-profile/components/user-profile-action-button/user-profile-action-button.component.mjs +0 -26
- package/esm2020/src/lib/navigation/navigation-user-profile/components/user-profile-selector/user-profile-selector.component.mjs +0 -40
- package/esm2020/src/lib/navigation/navigation-user-profile/components/user-profile-tile/user-profile-tile.component.mjs +0 -23
- package/esm2020/src/lib/navigation/navigation-user-profile/navigation-user-profile.component.mjs +0 -99
- package/esm2020/src/lib/navigation/navigation.module.mjs +0 -107
- package/esm2020/src/lib/navigation/pipes/navigation-route-active.pipe.mjs +0 -30
- package/esm2020/src/lib/navigation/product-home/product-home.component.mjs +0 -54
- package/esm2020/src/lib/navigation/public-api.mjs +0 -13
- package/esm2020/src/lib/navigation/utils/navigation.utils.mjs +0 -48
- package/esm2020/src/lib/number-box/number-box.component.mjs +0 -138
- package/esm2020/src/lib/number-box/number-box.module.mjs +0 -28
- package/esm2020/src/lib/page-header/page-header.component.mjs +0 -25
- package/esm2020/src/lib/page-header/page-header.module.mjs +0 -19
- package/esm2020/src/lib/pane/pane.component.mjs +0 -43
- package/esm2020/src/lib/pane/pane.module.mjs +0 -28
- package/esm2020/src/lib/quick-info/quick-info.component.mjs +0 -116
- package/esm2020/src/lib/quick-info/quick-info.module.mjs +0 -33
- package/esm2020/src/lib/segmented-control/segmented-control.component.mjs +0 -55
- package/esm2020/src/lib/segmented-control/segmented-control.module.mjs +0 -29
- package/esm2020/src/lib/side-bar/side-bar.component.mjs +0 -109
- package/esm2020/src/lib/side-bar/side-bar.module.mjs +0 -28
- package/esm2020/src/lib/static-value/static-value.component.mjs +0 -25
- package/esm2020/src/lib/static-value/static-value.module.mjs +0 -28
- package/esm2020/src/lib/table-actions/table-actions.component.mjs +0 -42
- package/esm2020/src/lib/table-actions/table-actions.module.mjs +0 -32
- package/esm2020/src/lib/timeline/components/timeline.component.mjs +0 -364
- package/esm2020/src/lib/timeline/services/timeline.service.mjs +0 -120
- package/esm2020/src/lib/timeline/timeline.module.mjs +0 -24
- package/esm2020/src/lib/timer/services/timer.service.mjs +0 -99
- package/esm2020/src/lib/timer/timer.module.mjs +0 -34
- package/esm2020/src/lib/tooltip/components/tooltip.component.mjs +0 -22
- package/esm2020/src/lib/tooltip/tooltip.directive.mjs +0 -191
- package/esm2020/src/lib/tooltip/tooltip.module.mjs +0 -31
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs +0 -150
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs +0 -284
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs +0 -175
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-callout.mjs +0 -49
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-callout.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +0 -113
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +0 -1071
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs +0 -411
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-drawer.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +0 -379
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +0 -48
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +0 -80
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +0 -115
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs +0 -215
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs +0 -127
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +0 -85
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-layout.mjs +0 -110
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-layout.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-message.mjs +0 -92
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-message.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs +0 -378
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs +0 -595
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-number-box.mjs +0 -170
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-number-box.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs +0 -48
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-pane.mjs +0 -75
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +0 -155
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs +0 -88
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +0 -141
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-static-value.mjs +0 -57
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-static-value.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-table-actions.mjs +0 -78
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-table-actions.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timeline.mjs +0 -515
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timeline.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs +0 -235
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +0 -1
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs +0 -260
- package/fesm2015/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs +0 -146
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-app-switcher.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs +0 -282
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-avatar.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs +0 -175
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-badge.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-callout.mjs +0 -49
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-callout.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs +0 -113
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-color-picker.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs +0 -1064
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-picker.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-date-pipes.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-drawer.mjs +0 -125
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-drawer.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs +0 -377
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-box.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs +0 -48
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-duration-pipe.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs +0 -79
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-ellipsis.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs +0 -115
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-highlight-text.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-intersection.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs +0 -83
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-layout.mjs +0 -110
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-layout.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-message.mjs +0 -92
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-message.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs +0 -376
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-modal.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs +0 -595
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-navigation.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-number-box.mjs +0 -170
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-number-box.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs +0 -48
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-page-header.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-pane.mjs +0 -75
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-pane.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs +0 -153
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-quick-info.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs +0 -88
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-segmented-control.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-side-bar.mjs +0 -141
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-side-bar.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-static-value.mjs +0 -57
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-static-value.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-table-actions.mjs +0 -78
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-table-actions.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-timeline.mjs +0 -511
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-timeline.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-timer.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components-src-lib-tooltip.mjs.map +0 -1
- package/fesm2020/spicainternational-ngx-sds-components.mjs +0 -39
- package/fesm2020/spicainternational-ngx-sds-components.mjs.map +0 -1
- package/src/lib/app-switcher/app-switcher.module.d.ts +0 -11
- package/src/lib/avatar/avatar.module.d.ts +0 -11
- package/src/lib/badge/badge.module.d.ts +0 -9
- package/src/lib/callout/callout.module.d.ts +0 -8
- package/src/lib/color-picker/color-picker.module.d.ts +0 -10
- package/src/lib/date-picker/date-picker.module.d.ts +0 -12
- package/src/lib/date-pipes/date-pipes.module.d.ts +0 -12
- package/src/lib/drawer/drawer.module.d.ts +0 -8
- package/src/lib/duration-box/duration-box.module.d.ts +0 -10
- package/src/lib/duration-pipe/duration-pipe.module.d.ts +0 -8
- package/src/lib/ellipsis/ellipsis.module.d.ts +0 -8
- package/src/lib/expansion-panel/expansion-panel.module.d.ts +0 -15
- package/src/lib/highlight-text/highlight-text.module.d.ts +0 -9
- package/src/lib/intersection/intersection.module.d.ts +0 -8
- package/src/lib/keyboard-shortcut/keyboard-shortcut.module.d.ts +0 -8
- package/src/lib/layout/layout.module.d.ts +0 -13
- package/src/lib/message/message.module.d.ts +0 -9
- package/src/lib/modal/modal.module.d.ts +0 -12
- package/src/lib/navigation/navigation.module.d.ts +0 -28
- package/src/lib/navigation/pipes/navigation-route-active.pipe.d.ts +0 -7
- package/src/lib/number-box/number-box.module.d.ts +0 -9
- package/src/lib/page-header/page-header.module.d.ts +0 -8
- package/src/lib/pane/pane.module.d.ts +0 -9
- package/src/lib/quick-info/quick-info.module.d.ts +0 -10
- package/src/lib/segmented-control/segmented-control.module.d.ts +0 -9
- package/src/lib/side-bar/side-bar.module.d.ts +0 -9
- package/src/lib/static-value/static-value.module.d.ts +0 -9
- package/src/lib/table-actions/table-actions.module.d.ts +0 -10
- package/src/lib/timeline/timeline.module.d.ts +0 -8
- package/src/lib/timer/timer.module.d.ts +0 -10
- package/src/lib/tooltip/tooltip.module.d.ts +0 -10
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Component, ChangeDetectionStrategy, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import * as i2 from '@fortawesome/angular-fontawesome';
|
|
6
|
-
import { FontAwesomeModule } from '@fortawesome/angular-fontawesome';
|
|
7
|
-
import { faChevronDown } from '@fortawesome/pro-regular-svg-icons';
|
|
8
|
-
|
|
9
|
-
class SdsExpansionPanelComponent {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.animateCaret = false;
|
|
12
|
-
this.animatePanel = false;
|
|
13
|
-
/**
|
|
14
|
-
* toggles greyish background
|
|
15
|
-
*
|
|
16
|
-
* @memberof SdsExpansionPanelComponent
|
|
17
|
-
*/
|
|
18
|
-
this.showBackground = true;
|
|
19
|
-
/**
|
|
20
|
-
* Background color of the panel. Gray-100 by default
|
|
21
|
-
*
|
|
22
|
-
* @memberof SdsExpansionPanelComponent
|
|
23
|
-
*/
|
|
24
|
-
this.backgroundColor = 'var(--bs-gray-100)';
|
|
25
|
-
/**
|
|
26
|
-
* position caret next to header of on the far end of the component
|
|
27
|
-
*
|
|
28
|
-
* @type {('nextToHeader' | 'farEnd')}
|
|
29
|
-
* @memberof SdsExpansionPanelComponent
|
|
30
|
-
*/
|
|
31
|
-
this.caretPlacement = 'nextToHeader';
|
|
32
|
-
this.isOpen = false;
|
|
33
|
-
this.isOpenChange = new EventEmitter();
|
|
34
|
-
this.headerSize = 'default';
|
|
35
|
-
this.caretIcon = faChevronDown;
|
|
36
|
-
}
|
|
37
|
-
onToggleIsOpenClick(event) {
|
|
38
|
-
this.isOpen = !this.isOpen;
|
|
39
|
-
this.isOpenChange.emit(this.isOpen);
|
|
40
|
-
event.stopImmediatePropagation();
|
|
41
|
-
}
|
|
42
|
-
openPanel() {
|
|
43
|
-
if (!this.isOpen) {
|
|
44
|
-
this.isOpen = true;
|
|
45
|
-
this.isOpenChange.emit(this.isOpen);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
SdsExpansionPanelComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
50
|
-
SdsExpansionPanelComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: SdsExpansionPanelComponent, selector: "sds-expansion-panel", inputs: { headerIcon: "headerIcon", headerText: "headerText", headerSideText: "headerSideText", hideHeader: "hideHeader", headerId: "headerId", animateCaret: "animateCaret", animatePanel: "animatePanel", hoverColor: "hoverColor", showBackground: "showBackground", backgroundColor: "backgroundColor", caretPlacement: "caretPlacement", descriptionText: "descriptionText", isOpen: "isOpen", expandPanelText: "expandPanelText", collapsePanelText: "collapsePanelText", headerSize: "headerSize" }, outputs: { isOpenChange: "isOpenChange" }, ngImport: i0, template: "\r\n<!-- [style.background-color]=\"showBackground ? backgroundColor : null\" -->\r\n<div\r\n class=\"rounded expansion-panel\"\r\n [class.background]=\"showBackground\"\r\n [class.closed]=\"!isOpen\"\r\n [class.show-hover]=\"!isOpen && hoverColor\"\r\n [style.--sds-expansion-panel-bg-color]=\"showBackground ? backgroundColor : 'transparent'\"\r\n [style.--sds-expansion-panel-hover-bg-color]=\"hoverColor ? hoverColor : 'transparent'\"\r\n (click)=\"openPanel()\"\r\n>\r\n <ng-container *ngIf=\"!hideHeader\">\r\n <div\r\n class=\"expansion-panel-header sds-flex-row-center\"\r\n (click)=\"onToggleIsOpenClick($event)\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-link\"\r\n [id]=\"headerId\"\r\n [class.me-auto]=\"caretPlacement === 'farEnd'\"\r\n [class.me-2]=\"caretPlacement === 'nextToHeader'\"\r\n >\r\n <fa-icon class=\"me-1\" *ngIf=\"headerIcon\" [icon]=\"headerIcon\" [fixedWidth]=\"true\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n\r\n <span \r\n class=\"header-text\"\r\n [class.sds-fs-93]=\"headerSize == 'small'\"\r\n >\r\n {{ headerText }}\r\n </span>\r\n <small \r\n *ngIf=\"headerSideText\"\r\n class=\"header-side-text text-muted\"\r\n [class.sds-fs-90]=\"headerSize == 'small'\"\r\n >\r\n {{ headerSideText }}\r\n </small>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm btn-link caret px-1\"\r\n [class.rotate]=\"animateCaret\"\r\n [title]=\"isOpen ? collapsePanelText ?? '' : expandPanelText ?? ''\"\r\n >\r\n <fa-icon [icon]=\"caretIcon\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <div \r\n *ngIf=\"!isOpen\"\r\n >\r\n {{ descriptionText }}\r\n <ng-content select=\"[contentOnClosed]\"></ng-content>\r\n </div>\r\n\r\n <div \r\n class=\"panel-contents\" \r\n [class.open]=\"isOpen\"\r\n [class.animate]=\"animatePanel\"\r\n >\r\n <div \r\n *ngIf=\"isOpen\"\r\n class=\"mt-2\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".expansion-panel{background-color:var(--sds-expansion-panel-bg-color)}.expansion-panel .panel-contents{display:grid;grid-template-rows:0fr}.expansion-panel .panel-contents.animate{transition:grid-template-rows .2s ease-out}.expansion-panel .panel-contents>div{overflow:hidden;min-height:0}.expansion-panel .panel-contents.open{grid-template-rows:1fr}.expansion-panel .caret{line-height:1rem;height:-moz-fit-content;height:fit-content;transform:rotate(-180deg)}.expansion-panel .caret.rotate{transition:transform .2s linear}.expansion-panel.closed{cursor:pointer}.expansion-panel.closed .caret{transform:rotate(0)}.expansion-panel.closed.show-hover:hover{background-color:var(--sds-expansion-panel-hover-bg-color)}.expansion-panel.background{padding:1.125rem 1.5rem}.expansion-panel .expansion-panel-header{cursor:pointer;-webkit-user-select:none;user-select:none}.expansion-panel .expansion-panel-header .header-text{font-size:1.06rem;font-weight:600}.expansion-panel .expansion-panel-header .header-side-text{font-size:1.06rem;font-weight:500}.expansion-panel .expansion-panel-header button{text-decoration:none;padding:0;color:var(--bs-gray-900)}.expansion-panel .expansion-panel-header button:focus{box-shadow:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.FaIconComponent, selector: "fa-icon", inputs: ["icon", "title", "animation", "spin", "pulse", "mask", "styles", "flip", "size", "pull", "border", "inverse", "symbol", "rotate", "fixedWidth", "classes", "transform", "a11yRole"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
51
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelComponent, decorators: [{
|
|
52
|
-
type: Component,
|
|
53
|
-
args: [{ selector: 'sds-expansion-panel', changeDetection: ChangeDetectionStrategy.OnPush, template: "\r\n<!-- [style.background-color]=\"showBackground ? backgroundColor : null\" -->\r\n<div\r\n class=\"rounded expansion-panel\"\r\n [class.background]=\"showBackground\"\r\n [class.closed]=\"!isOpen\"\r\n [class.show-hover]=\"!isOpen && hoverColor\"\r\n [style.--sds-expansion-panel-bg-color]=\"showBackground ? backgroundColor : 'transparent'\"\r\n [style.--sds-expansion-panel-hover-bg-color]=\"hoverColor ? hoverColor : 'transparent'\"\r\n (click)=\"openPanel()\"\r\n>\r\n <ng-container *ngIf=\"!hideHeader\">\r\n <div\r\n class=\"expansion-panel-header sds-flex-row-center\"\r\n (click)=\"onToggleIsOpenClick($event)\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-link\"\r\n [id]=\"headerId\"\r\n [class.me-auto]=\"caretPlacement === 'farEnd'\"\r\n [class.me-2]=\"caretPlacement === 'nextToHeader'\"\r\n >\r\n <fa-icon class=\"me-1\" *ngIf=\"headerIcon\" [icon]=\"headerIcon\" [fixedWidth]=\"true\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n\r\n <span \r\n class=\"header-text\"\r\n [class.sds-fs-93]=\"headerSize == 'small'\"\r\n >\r\n {{ headerText }}\r\n </span>\r\n <small \r\n *ngIf=\"headerSideText\"\r\n class=\"header-side-text text-muted\"\r\n [class.sds-fs-90]=\"headerSize == 'small'\"\r\n >\r\n {{ headerSideText }}\r\n </small>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm btn-link caret px-1\"\r\n [class.rotate]=\"animateCaret\"\r\n [title]=\"isOpen ? collapsePanelText ?? '' : expandPanelText ?? ''\"\r\n >\r\n <fa-icon [icon]=\"caretIcon\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <div \r\n *ngIf=\"!isOpen\"\r\n >\r\n {{ descriptionText }}\r\n <ng-content select=\"[contentOnClosed]\"></ng-content>\r\n </div>\r\n\r\n <div \r\n class=\"panel-contents\" \r\n [class.open]=\"isOpen\"\r\n [class.animate]=\"animatePanel\"\r\n >\r\n <div \r\n *ngIf=\"isOpen\"\r\n class=\"mt-2\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n", styles: [".expansion-panel{background-color:var(--sds-expansion-panel-bg-color)}.expansion-panel .panel-contents{display:grid;grid-template-rows:0fr}.expansion-panel .panel-contents.animate{transition:grid-template-rows .2s ease-out}.expansion-panel .panel-contents>div{overflow:hidden;min-height:0}.expansion-panel .panel-contents.open{grid-template-rows:1fr}.expansion-panel .caret{line-height:1rem;height:-moz-fit-content;height:fit-content;transform:rotate(-180deg)}.expansion-panel .caret.rotate{transition:transform .2s linear}.expansion-panel.closed{cursor:pointer}.expansion-panel.closed .caret{transform:rotate(0)}.expansion-panel.closed.show-hover:hover{background-color:var(--sds-expansion-panel-hover-bg-color)}.expansion-panel.background{padding:1.125rem 1.5rem}.expansion-panel .expansion-panel-header{cursor:pointer;-webkit-user-select:none;user-select:none}.expansion-panel .expansion-panel-header .header-text{font-size:1.06rem;font-weight:600}.expansion-panel .expansion-panel-header .header-side-text{font-size:1.06rem;font-weight:500}.expansion-panel .expansion-panel-header button{text-decoration:none;padding:0;color:var(--bs-gray-900)}.expansion-panel .expansion-panel-header button:focus{box-shadow:none}\n"] }]
|
|
54
|
-
}], propDecorators: { headerIcon: [{
|
|
55
|
-
type: Input
|
|
56
|
-
}], headerText: [{
|
|
57
|
-
type: Input
|
|
58
|
-
}], headerSideText: [{
|
|
59
|
-
type: Input
|
|
60
|
-
}], hideHeader: [{
|
|
61
|
-
type: Input
|
|
62
|
-
}], headerId: [{
|
|
63
|
-
type: Input
|
|
64
|
-
}], animateCaret: [{
|
|
65
|
-
type: Input
|
|
66
|
-
}], animatePanel: [{
|
|
67
|
-
type: Input
|
|
68
|
-
}], hoverColor: [{
|
|
69
|
-
type: Input
|
|
70
|
-
}], showBackground: [{
|
|
71
|
-
type: Input
|
|
72
|
-
}], backgroundColor: [{
|
|
73
|
-
type: Input
|
|
74
|
-
}], caretPlacement: [{
|
|
75
|
-
type: Input
|
|
76
|
-
}], descriptionText: [{
|
|
77
|
-
type: Input
|
|
78
|
-
}], isOpen: [{
|
|
79
|
-
type: Input
|
|
80
|
-
}], isOpenChange: [{
|
|
81
|
-
type: Output
|
|
82
|
-
}], expandPanelText: [{
|
|
83
|
-
type: Input
|
|
84
|
-
}], collapsePanelText: [{
|
|
85
|
-
type: Input
|
|
86
|
-
}], headerSize: [{
|
|
87
|
-
type: Input
|
|
88
|
-
}] } });
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Expansion panel - provides an expandable details-summary view. Used for 'progressive disclosure'.
|
|
92
|
-
*
|
|
93
|
-
* @export
|
|
94
|
-
* @class SdsExpansionPanelModule
|
|
95
|
-
*/
|
|
96
|
-
class SdsExpansionPanelModule {
|
|
97
|
-
}
|
|
98
|
-
SdsExpansionPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
99
|
-
SdsExpansionPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelModule, declarations: [SdsExpansionPanelComponent], imports: [CommonModule, FontAwesomeModule], exports: [SdsExpansionPanelComponent] });
|
|
100
|
-
SdsExpansionPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelModule, imports: [CommonModule, FontAwesomeModule] });
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsExpansionPanelModule, decorators: [{
|
|
102
|
-
type: NgModule,
|
|
103
|
-
args: [{
|
|
104
|
-
declarations: [SdsExpansionPanelComponent],
|
|
105
|
-
imports: [CommonModule, FontAwesomeModule],
|
|
106
|
-
exports: [SdsExpansionPanelComponent],
|
|
107
|
-
}]
|
|
108
|
-
}] });
|
|
109
|
-
|
|
110
|
-
/**
|
|
111
|
-
* Generated bundle index. Do not edit.
|
|
112
|
-
*/
|
|
113
|
-
|
|
114
|
-
export { SdsExpansionPanelComponent, SdsExpansionPanelModule };
|
|
115
|
-
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-expansion-panel.mjs","sources":["../../../projects/ngx-sds-components/src/lib/expansion-panel/expansion-panel.component.ts","../../../projects/ngx-sds-components/src/lib/expansion-panel/expansion-panel.component.html","../../../projects/ngx-sds-components/src/lib/expansion-panel/expansion-panel.module.ts","../../../projects/ngx-sds-components/src/lib/expansion-panel/spicainternational-ngx-sds-components-src-lib-expansion-panel.ts"],"sourcesContent":["import {\r\n ChangeDetectionStrategy,\r\n Component,\r\n EventEmitter,\r\n Input,\r\n Output,\r\n} from '@angular/core';\r\nimport { faChevronDown } from '@fortawesome/pro-regular-svg-icons';\r\nimport { CaretPlacement, HeaderSize } from './expansion-panel.types';\r\nimport { IconDefinition } from '@fortawesome/fontawesome-svg-core';\r\n\r\n@Component({\r\n selector: 'sds-expansion-panel',\r\n templateUrl: './expansion-panel.component.html',\r\n styleUrls: ['./expansion-panel.component.scss'],\r\n changeDetection: ChangeDetectionStrategy.OnPush,\r\n})\r\nexport class SdsExpansionPanelComponent {\r\n @Input() headerIcon?: IconDefinition;\r\n @Input() headerText?: string;\r\n @Input() headerSideText?: string;\r\n @Input() hideHeader?: boolean;\r\n @Input() headerId?: string;\r\n\r\n @Input() animateCaret = false;\r\n @Input() animatePanel = false;\r\n\r\n @Input() hoverColor?: string;\r\n\r\n\r\n /**\r\n * toggles greyish background\r\n *\r\n * @memberof SdsExpansionPanelComponent\r\n */\r\n @Input() showBackground = true;\r\n\r\n /**\r\n * Background color of the panel. Gray-100 by default\r\n *\r\n * @memberof SdsExpansionPanelComponent\r\n */\r\n @Input() backgroundColor = 'var(--bs-gray-100)';\r\n\r\n /**\r\n * position caret next to header of on the far end of the component\r\n *\r\n * @type {('nextToHeader' | 'farEnd')}\r\n * @memberof SdsExpansionPanelComponent\r\n */\r\n @Input() caretPlacement: CaretPlacement = 'nextToHeader';\r\n\r\n /**\r\n * 'descriptionText' - text displayed when component is \"closed\".\r\n *\r\n * Note: Use ng-content 'contentOnClosed' if more complex use-case is needed\r\n *\r\n * @type {string}\r\n * @memberof ExpansionPanelComponent\r\n */\r\n @Input() descriptionText?: string;\r\n\r\n @Input() isOpen: boolean = false;\r\n @Output() isOpenChange: EventEmitter<boolean> = new EventEmitter();\r\n\r\n @Input() expandPanelText?: string;\r\n @Input() collapsePanelText?: string;\r\n\r\n @Input() headerSize: HeaderSize = 'default';\r\n\r\n public caretIcon: IconDefinition = faChevronDown;\r\n \r\n\r\n public onToggleIsOpenClick(event: MouseEvent): void {\r\n this.isOpen = !this.isOpen;\r\n this.isOpenChange.emit(this.isOpen);\r\n event.stopImmediatePropagation();\r\n }\r\n\r\n public openPanel() {\r\n if (!this.isOpen) {\r\n this.isOpen = true;\r\n this.isOpenChange.emit(this.isOpen);\r\n }\r\n }\r\n}\r\n","\r\n<!-- [style.background-color]=\"showBackground ? backgroundColor : null\" -->\r\n<div\r\n class=\"rounded expansion-panel\"\r\n [class.background]=\"showBackground\"\r\n [class.closed]=\"!isOpen\"\r\n [class.show-hover]=\"!isOpen && hoverColor\"\r\n [style.--sds-expansion-panel-bg-color]=\"showBackground ? backgroundColor : 'transparent'\"\r\n [style.--sds-expansion-panel-hover-bg-color]=\"hoverColor ? hoverColor : 'transparent'\"\r\n (click)=\"openPanel()\"\r\n>\r\n <ng-container *ngIf=\"!hideHeader\">\r\n <div\r\n class=\"expansion-panel-header sds-flex-row-center\"\r\n (click)=\"onToggleIsOpenClick($event)\"\r\n >\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-link\"\r\n [id]=\"headerId\"\r\n [class.me-auto]=\"caretPlacement === 'farEnd'\"\r\n [class.me-2]=\"caretPlacement === 'nextToHeader'\"\r\n >\r\n <fa-icon class=\"me-1\" *ngIf=\"headerIcon\" [icon]=\"headerIcon\" [fixedWidth]=\"true\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n\r\n <span \r\n class=\"header-text\"\r\n [class.sds-fs-93]=\"headerSize == 'small'\"\r\n >\r\n {{ headerText }}\r\n </span>\r\n <small \r\n *ngIf=\"headerSideText\"\r\n class=\"header-side-text text-muted\"\r\n [class.sds-fs-90]=\"headerSize == 'small'\"\r\n >\r\n {{ headerSideText }}\r\n </small>\r\n </button>\r\n <button\r\n type=\"button\"\r\n class=\"btn btn-sm btn-link caret px-1\"\r\n [class.rotate]=\"animateCaret\"\r\n [title]=\"isOpen ? collapsePanelText ?? '' : expandPanelText ?? ''\"\r\n >\r\n <fa-icon [icon]=\"caretIcon\" [size]=\"headerSize == 'small' ? 'sm' : 'lg'\"></fa-icon>\r\n </button>\r\n </div>\r\n </ng-container>\r\n\r\n <div \r\n *ngIf=\"!isOpen\"\r\n >\r\n {{ descriptionText }}\r\n <ng-content select=\"[contentOnClosed]\"></ng-content>\r\n </div>\r\n\r\n <div \r\n class=\"panel-contents\" \r\n [class.open]=\"isOpen\"\r\n [class.animate]=\"animatePanel\"\r\n >\r\n <div \r\n *ngIf=\"isOpen\"\r\n class=\"mt-2\"\r\n >\r\n <ng-content></ng-content>\r\n </div>\r\n </div>\r\n</div>\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FontAwesomeModule } from '@fortawesome/angular-fontawesome';\r\n\r\nimport { SdsExpansionPanelComponent } from './expansion-panel.component';\r\n/**\r\n * Expansion panel - provides an expandable details-summary view. Used for 'progressive disclosure'.\r\n *\r\n * @export\r\n * @class SdsExpansionPanelModule\r\n */\r\n@NgModule({\r\n declarations: [SdsExpansionPanelComponent],\r\n imports: [CommonModule, FontAwesomeModule],\r\n exports: [SdsExpansionPanelComponent],\r\n})\r\nexport class SdsExpansionPanelModule {}\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;MAiBa,0BAA0B,CAAA;AANvC,IAAA,WAAA,GAAA;AAaa,QAAA,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AACrB,QAAA,I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AAA,CAAA;sBAArB,MAAM;gBAEE,eAAe,EAAA,CAAA;sBAAvB,KAAK;gBACG,iBAAiB,EAAA,CAAA;sBAAzB,KAAK;gBAEG,UAAU,EAAA,CAAA;sBAAlB,KAAK;;;AE/DV;;;;;AAKG;MAMU,uBAAuB,CAAA;;qHAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBAJjB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAC/B,YAAY,EAAE,iBAAiB,aAC/B,0BAA0B,CAAA,EAAA,CAAA,CAAA;sHAE3B,uBAAuB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;4FAGhC,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,0BAA0B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;oBAC1C,OAAO,EAAE,CAAC,0BAA0B,CAAC;iBACxC,CAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Directive, Input, HostBinding, Pipe, NgModule } from '@angular/core';
|
|
3
|
-
import { CommonModule } from '@angular/common';
|
|
4
|
-
import * as i1 from '@angular/platform-browser';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @public @function escapeRegex
|
|
8
|
-
* @description
|
|
9
|
-
* Function responsible for substitution of chars that are a no-go for regex
|
|
10
|
-
* @param { string } phrase
|
|
11
|
-
* @returns { string }
|
|
12
|
-
*/
|
|
13
|
-
const escapeRegex = (phrase) => {
|
|
14
|
-
return phrase.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* @public @function highlightSearchedText
|
|
18
|
-
* @description
|
|
19
|
-
* Function responsible for returning html string
|
|
20
|
-
* with included marker that contains string that matches
|
|
21
|
-
* provided search phrase
|
|
22
|
-
* @param { string } highlightText
|
|
23
|
-
* @param { string } stringToBeChecked
|
|
24
|
-
* @param { string } existingHtmlContent
|
|
25
|
-
* @param { string } additionalClasses
|
|
26
|
-
* @param { string } sanitizer
|
|
27
|
-
* @returns { string }
|
|
28
|
-
*/
|
|
29
|
-
const highlightSearchedText = (highlightText, stringToBeChecked, existingHtmlContent, sanitizer, additionalClasses) => {
|
|
30
|
-
var _a;
|
|
31
|
-
// If search is empty just return current content
|
|
32
|
-
if (highlightText === '') {
|
|
33
|
-
return stringToBeChecked;
|
|
34
|
-
}
|
|
35
|
-
// Split search string into words
|
|
36
|
-
const splittedValue = highlightText.split(' ');
|
|
37
|
-
if (!splittedValue || splittedValue.length === 0) {
|
|
38
|
-
return stringToBeChecked;
|
|
39
|
-
}
|
|
40
|
-
const splittedStringToBeChecked = stringToBeChecked
|
|
41
|
-
? stringToBeChecked.split(' ')
|
|
42
|
-
: [];
|
|
43
|
-
const searchPhrases = splittedValue.filter(phrase => phrase.length > 0);
|
|
44
|
-
const markedWords = [];
|
|
45
|
-
// Go through search phrases and validate each string
|
|
46
|
-
const newContent = splittedStringToBeChecked
|
|
47
|
-
.map((wordToBeChecked) => {
|
|
48
|
-
const searchMarkRawResult = searchPhrases
|
|
49
|
-
.map(phrase => {
|
|
50
|
-
const safeString = escapeRegex(phrase);
|
|
51
|
-
const searchRegEx = new RegExp(safeString, 'i');
|
|
52
|
-
const testResult = searchRegEx.test(wordToBeChecked);
|
|
53
|
-
if (!testResult) {
|
|
54
|
-
return wordToBeChecked;
|
|
55
|
-
}
|
|
56
|
-
// Prevent text duplication when user enters same word multiple times
|
|
57
|
-
const wordIsAlreadyMarked = markedWords.some(alreadyMarkedWord => alreadyMarkedWord === wordToBeChecked);
|
|
58
|
-
if (wordIsAlreadyMarked) {
|
|
59
|
-
return wordToBeChecked;
|
|
60
|
-
}
|
|
61
|
-
markedWords.push(wordToBeChecked);
|
|
62
|
-
// Prepare content to be replaced with mark text
|
|
63
|
-
const markedContent = wordToBeChecked.replace(searchRegEx, (match) => {
|
|
64
|
-
return `<mark class='bg-primary text-white p-0 ${additionalClasses !== null && additionalClasses !== void 0 ? additionalClasses : ''}'>${match}</mark>`;
|
|
65
|
-
});
|
|
66
|
-
return markedContent;
|
|
67
|
-
})
|
|
68
|
-
.reduce((accumulator, currentItem) => {
|
|
69
|
-
const itemAlreadyExists = accumulator.some(item => item === currentItem);
|
|
70
|
-
if (!itemAlreadyExists) {
|
|
71
|
-
accumulator.push(currentItem);
|
|
72
|
-
}
|
|
73
|
-
return accumulator;
|
|
74
|
-
}, []);
|
|
75
|
-
/**
|
|
76
|
-
* At this point we have correctly marker content, however there can be
|
|
77
|
-
* duplicate words in the array. E.g. we have text First Client and user
|
|
78
|
-
* types Client First. This will give us two array. First one would be:
|
|
79
|
-
* ['First', '<mark class='highlighted-text '>First</mark>']
|
|
80
|
-
* Second one would be:
|
|
81
|
-
* ['<mark class='highlighted-text '>Client</mark>', 'Client']
|
|
82
|
-
* We have to filter out those plain values that are marked
|
|
83
|
-
*/
|
|
84
|
-
const sanitizedMarkedContent = searchMarkRawResult.filter(markedContentItem => {
|
|
85
|
-
const wordIsAlsoMarked = markedWords.some(word => word === markedContentItem);
|
|
86
|
-
if (wordIsAlsoMarked) {
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
return true;
|
|
90
|
-
});
|
|
91
|
-
return sanitizedMarkedContent;
|
|
92
|
-
})
|
|
93
|
-
.join(' ');
|
|
94
|
-
/**
|
|
95
|
-
* We want to sanitize this before pushing to DOM.
|
|
96
|
-
* Just to be on the safe side. Fallback to existing value if
|
|
97
|
-
* sanitize returns null
|
|
98
|
-
*/
|
|
99
|
-
const sanitizedContent = (_a = sanitizer.sanitize(SecurityContext.HTML, newContent)) !== null && _a !== void 0 ? _a : existingHtmlContent;
|
|
100
|
-
return sanitizedContent;
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
class HighlightTextDirective {
|
|
104
|
-
get highlightText() {
|
|
105
|
-
return this._search;
|
|
106
|
-
}
|
|
107
|
-
set highlightText(value) {
|
|
108
|
-
this._search = value;
|
|
109
|
-
// Now process the search value
|
|
110
|
-
this.markSearchedText(value);
|
|
111
|
-
}
|
|
112
|
-
constructor(_elementRef, _sanitizer) {
|
|
113
|
-
this._elementRef = _elementRef;
|
|
114
|
-
this._sanitizer = _sanitizer;
|
|
115
|
-
/**
|
|
116
|
-
* INPUTS
|
|
117
|
-
*/
|
|
118
|
-
/**
|
|
119
|
-
* CSS classes to be appended to the marked text
|
|
120
|
-
*/
|
|
121
|
-
this.additionalClasses = '';
|
|
122
|
-
/**
|
|
123
|
-
* Search term that should be found
|
|
124
|
-
*/
|
|
125
|
-
this._search = '';
|
|
126
|
-
/**
|
|
127
|
-
* For now make this case insensitive. We might change this to
|
|
128
|
-
* input latter if needed
|
|
129
|
-
*/
|
|
130
|
-
this.caseSensitive = false;
|
|
131
|
-
}
|
|
132
|
-
markSearchedText(highlightText) {
|
|
133
|
-
var _a, _b;
|
|
134
|
-
// Make sure that native element is present
|
|
135
|
-
if ((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
136
|
-
const currentHtmlContent = this._elementRef.nativeElement
|
|
137
|
-
.innerHTML;
|
|
138
|
-
const text = (_b = this._elementRef.nativeElement.textContent) !== null && _b !== void 0 ? _b : '';
|
|
139
|
-
const highlightedText = highlightSearchedText(highlightText, text, currentHtmlContent, this._sanitizer, this.additionalClasses);
|
|
140
|
-
this.content = highlightedText;
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
HighlightTextDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightTextDirective, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Directive });
|
|
145
|
-
HighlightTextDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: HighlightTextDirective, selector: "[highlightText]", inputs: { additionalClasses: "additionalClasses", highlightText: "highlightText" }, host: { properties: { "innerHtml": "this.content" } }, ngImport: i0 });
|
|
146
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightTextDirective, decorators: [{
|
|
147
|
-
type: Directive,
|
|
148
|
-
args: [{
|
|
149
|
-
selector: '[highlightText]'
|
|
150
|
-
}]
|
|
151
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }]; }, propDecorators: { additionalClasses: [{
|
|
152
|
-
type: Input
|
|
153
|
-
}], highlightText: [{
|
|
154
|
-
type: Input
|
|
155
|
-
}], content: [{
|
|
156
|
-
type: HostBinding,
|
|
157
|
-
args: ['innerHtml']
|
|
158
|
-
}] } });
|
|
159
|
-
|
|
160
|
-
class HighlightTextPipe {
|
|
161
|
-
constructor(_elementRef, _sanitizer) {
|
|
162
|
-
this._elementRef = _elementRef;
|
|
163
|
-
this._sanitizer = _sanitizer;
|
|
164
|
-
}
|
|
165
|
-
transform(highlightText, stringToBeChecked, additionalClasses) {
|
|
166
|
-
var _a;
|
|
167
|
-
// Make sure that native element is present
|
|
168
|
-
if ((_a = this._elementRef) === null || _a === void 0 ? void 0 : _a.nativeElement) {
|
|
169
|
-
const currentHtmlContent = this._elementRef.nativeElement
|
|
170
|
-
.innerHTML;
|
|
171
|
-
const highlightedText = highlightSearchedText(highlightText, stringToBeChecked, currentHtmlContent, this._sanitizer, additionalClasses);
|
|
172
|
-
return highlightedText;
|
|
173
|
-
}
|
|
174
|
-
return stringToBeChecked;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
HighlightTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightTextPipe, deps: [{ token: i0.ElementRef }, { token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
178
|
-
HighlightTextPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: HighlightTextPipe, name: "highlightText" });
|
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: HighlightTextPipe, decorators: [{
|
|
180
|
-
type: Pipe,
|
|
181
|
-
args: [{
|
|
182
|
-
name: 'highlightText'
|
|
183
|
-
}]
|
|
184
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i1.DomSanitizer }]; } });
|
|
185
|
-
|
|
186
|
-
class SdsHighlightTextModule {
|
|
187
|
-
}
|
|
188
|
-
SdsHighlightTextModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsHighlightTextModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
189
|
-
SdsHighlightTextModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdsHighlightTextModule, declarations: [HighlightTextDirective,
|
|
190
|
-
HighlightTextPipe], imports: [CommonModule], exports: [HighlightTextDirective,
|
|
191
|
-
HighlightTextPipe] });
|
|
192
|
-
SdsHighlightTextModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsHighlightTextModule, imports: [CommonModule] });
|
|
193
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsHighlightTextModule, decorators: [{
|
|
194
|
-
type: NgModule,
|
|
195
|
-
args: [{
|
|
196
|
-
declarations: [
|
|
197
|
-
HighlightTextDirective,
|
|
198
|
-
HighlightTextPipe
|
|
199
|
-
],
|
|
200
|
-
exports: [
|
|
201
|
-
HighlightTextDirective,
|
|
202
|
-
HighlightTextPipe
|
|
203
|
-
],
|
|
204
|
-
imports: [
|
|
205
|
-
CommonModule
|
|
206
|
-
]
|
|
207
|
-
}]
|
|
208
|
-
}] });
|
|
209
|
-
|
|
210
|
-
/**
|
|
211
|
-
* Generated bundle index. Do not edit.
|
|
212
|
-
*/
|
|
213
|
-
|
|
214
|
-
export { HighlightTextDirective, HighlightTextPipe, SdsHighlightTextModule };
|
|
215
|
-
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-highlight-text.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-highlight-text.mjs","sources":["../../../projects/ngx-sds-components/src/lib/highlight-text/utils/highlight-text.utils.ts","../../../projects/ngx-sds-components/src/lib/highlight-text/directives/highlight-text.directive.ts","../../../projects/ngx-sds-components/src/lib/highlight-text/pipes/highlight-text.pipe.ts","../../../projects/ngx-sds-components/src/lib/highlight-text/highlight-text.module.ts","../../../projects/ngx-sds-components/src/lib/highlight-text/spicainternational-ngx-sds-components-src-lib-highlight-text.ts"],"sourcesContent":["import { SecurityContext } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\n/**\r\n * @public @function escapeRegex\r\n * @description\r\n * Function responsible for substitution of chars that are a no-go for regex\r\n * @param { string } phrase\r\n * @returns { string }\r\n */\r\nexport const escapeRegex = (phrase: string): string => {\r\n return phrase.replace(/[-\\/\\\\^$*+?.()|[\\]{}]/g, '\\\\$&');\r\n};\r\n\r\n/**\r\n * @public @function highlightSearchedText\r\n * @description\r\n * Function responsible for returning html string\r\n * with included marker that contains string that matches\r\n * provided search phrase\r\n * @param { string } highlightText\r\n * @param { string } stringToBeChecked\r\n * @param { string } existingHtmlContent\r\n * @param { string } additionalClasses\r\n * @param { string } sanitizer\r\n * @returns { string }\r\n */\r\nexport const highlightSearchedText = (\r\n highlightText: string,\r\n stringToBeChecked: string,\r\n existingHtmlContent: string,\r\n sanitizer: DomSanitizer,\r\n additionalClasses?: string\r\n ): string => {\r\n // If search is empty just return current content\r\n if (highlightText === '') {\r\n return stringToBeChecked;\r\n }\r\n\r\n // Split search string into words\r\n const splittedValue = highlightText.split(' ');\r\n\r\n if (!splittedValue || splittedValue.length === 0) {\r\n return stringToBeChecked;\r\n }\r\n\r\n const splittedStringToBeChecked: string[] = stringToBeChecked\r\n ? stringToBeChecked.split(' ')\r\n : [];\r\n\r\n const searchPhrases: string[] = splittedValue.filter(\r\n phrase => phrase.length > 0\r\n );\r\n\r\n const markedWords: string[] = [];\r\n\r\n // Go through search phrases and validate each string\r\n const newContent = splittedStringToBeChecked\r\n .map((wordToBeChecked: string) => {\r\n const searchMarkRawResult = searchPhrases\r\n .map(phrase => {\r\n const safeString = escapeRegex(phrase);\r\n\r\n const searchRegEx = new RegExp(safeString, 'i');\r\n\r\n const testResult: boolean = searchRegEx.test(wordToBeChecked);\r\n\r\n if (!testResult) {\r\n return wordToBeChecked;\r\n }\r\n\r\n // Prevent text duplication when user enters same word multiple times\r\n const wordIsAlreadyMarked = markedWords.some(alreadyMarkedWord => alreadyMarkedWord === wordToBeChecked)\r\n\r\n if (wordIsAlreadyMarked) {\r\n return wordToBeChecked;\r\n }\r\n\r\n markedWords.push(wordToBeChecked);\r\n\r\n // Prepare content to be replaced with mark text\r\n const markedContent = wordToBeChecked.replace(\r\n searchRegEx,\r\n (match: string) => {\r\n return `<mark class='bg-primary text-white p-0 ${\r\n additionalClasses ?? ''\r\n }'>${match}</mark>`;\r\n }\r\n );\r\n return markedContent;\r\n })\r\n .reduce((accumulator: string[], currentItem: string) => {\r\n const itemAlreadyExists = accumulator.some(\r\n item => item === currentItem\r\n );\r\n\r\n if (!itemAlreadyExists) {\r\n accumulator.push(currentItem);\r\n }\r\n\r\n return accumulator;\r\n }, []);\r\n\r\n /**\r\n * At this point we have correctly marker content, however there can be\r\n * duplicate words in the array. E.g. we have text First Client and user\r\n * types Client First. This will give us two array. First one would be:\r\n * ['First', '<mark class='highlighted-text '>First</mark>']\r\n * Second one would be:\r\n * ['<mark class='highlighted-text '>Client</mark>', 'Client']\r\n * We have to filter out those plain values that are marked\r\n */\r\n const sanitizedMarkedContent = searchMarkRawResult.filter(\r\n markedContentItem => {\r\n const wordIsAlsoMarked = markedWords.some(\r\n word => word === markedContentItem\r\n );\r\n\r\n if (wordIsAlsoMarked) {\r\n return false;\r\n }\r\n return true;\r\n }\r\n );\r\n\r\n return sanitizedMarkedContent;\r\n })\r\n .join(' ');\r\n\r\n /**\r\n * We want to sanitize this before pushing to DOM.\r\n * Just to be on the safe side. Fallback to existing value if\r\n * sanitize returns null\r\n */\r\n const sanitizedContent =\r\n sanitizer.sanitize(SecurityContext.HTML, newContent) ?? existingHtmlContent;\r\n\r\n return sanitizedContent;\r\n};\r\n","import { Directive, ElementRef, HostBinding, Input } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { highlightSearchedText } from '../utils';\r\n\r\n@Directive({\r\n selector: '[highlightText]'\r\n})\r\nexport class HighlightTextDirective {\r\n/**\r\n * INPUTS\r\n */\r\n /**\r\n * CSS classes to be appended to the marked text\r\n */\r\n @Input() additionalClasses: string = '';\r\n\r\n /**\r\n * Search term that should be found\r\n */\r\n private _search: string = '';\r\n @Input()\r\n get highlightText(): string {\r\n return this._search;\r\n }\r\n set highlightText(value: string) {\r\n this._search = value;\r\n\r\n // Now process the search value\r\n this.markSearchedText(value);\r\n }\r\n\r\n /**\r\n * OTHER PROPS\r\n */\r\n @HostBinding('innerHtml')\r\n content!: string;\r\n\r\n /**\r\n * For now make this case insensitive. We might change this to\r\n * input latter if needed\r\n */\r\n protected caseSensitive: boolean = false;\r\n\r\n constructor(\r\n private readonly _elementRef: ElementRef,\r\n private readonly _sanitizer: DomSanitizer\r\n ) {}\r\n\r\n protected markSearchedText(highlightText: string): void {\r\n // Make sure that native element is present\r\n if (this._elementRef?.nativeElement) {\r\n const currentHtmlContent = (this._elementRef.nativeElement as HTMLElement)\r\n .innerHTML;\r\n\r\n const text =\r\n (this._elementRef.nativeElement as HTMLElement).textContent ?? '';\r\n\r\n const highlightedText = highlightSearchedText(\r\n highlightText,\r\n text,\r\n currentHtmlContent,\r\n this._sanitizer,\r\n this.additionalClasses\r\n );\r\n\r\n this.content = highlightedText;\r\n }\r\n }\r\n}\r\n","import { ElementRef, Pipe, PipeTransform } from '@angular/core';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\nimport { highlightSearchedText } from '../utils';\r\n\r\n@Pipe({\r\n name: 'highlightText'\r\n})\r\nexport class HighlightTextPipe implements PipeTransform {\r\n constructor(\r\n private readonly _elementRef: ElementRef,\r\n private readonly _sanitizer: DomSanitizer\r\n ) {}\r\n\r\n transform(\r\n highlightText: string,\r\n stringToBeChecked: string,\r\n additionalClasses?: string\r\n ): string {\r\n // Make sure that native element is present\r\n if (this._elementRef?.nativeElement) {\r\n const currentHtmlContent = (this._elementRef.nativeElement as HTMLElement)\r\n .innerHTML;\r\n\r\n const highlightedText = highlightSearchedText(\r\n highlightText,\r\n stringToBeChecked,\r\n currentHtmlContent,\r\n this._sanitizer,\r\n additionalClasses\r\n );\r\n\r\n return highlightedText;\r\n }\r\n\r\n return stringToBeChecked;\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HighlightTextDirective } from './directives';\r\nimport { HighlightTextPipe } from './pipes';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n HighlightTextDirective,\r\n HighlightTextPipe\r\n ],\r\n exports: [\r\n HighlightTextDirective,\r\n HighlightTextPipe\r\n ],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SdsHighlightTextModule { }\r\n","/**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AAsB;QACtB,iBAAiB,CAAA,EAAA,CAAA,CAAA;AAMR,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,sBAAsB,YAH/B,YAAY,CAAA,EAAA,CAAA,CAAA;4FAGH,sBAAsB,EAAA,UAAA,EAAA,CAAA;kBAblC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,sBAAsB;wBACtB,iBAAiB;AAClB,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Injectable, Inject, EventEmitter, Directive, Input, Output, NgModule } from '@angular/core';
|
|
3
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
|
-
import { concat, defer, of, fromEvent, Observable, combineLatest } from 'rxjs';
|
|
5
|
-
import { map, mergeMap, distinctUntilChanged } from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
class IntersectionService {
|
|
8
|
-
constructor(document) {
|
|
9
|
-
this._documentVisible$ = concat(defer(() => of(!document.hidden)), fromEvent(document, 'visibilitychange').pipe(map(e => !document.hidden)));
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* @description
|
|
13
|
-
* Method responsible for determining if element is visible
|
|
14
|
-
* on screen or not. Please
|
|
15
|
-
* @see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API for options meaning
|
|
16
|
-
* @param { ElementRef } element
|
|
17
|
-
* @param { IntersectionObserverInit } options
|
|
18
|
-
* @returns { Observable<boolean> }
|
|
19
|
-
*/
|
|
20
|
-
elementInSight$(element, options) {
|
|
21
|
-
var _a, _b, _c;
|
|
22
|
-
const intersectionOptions = {
|
|
23
|
-
root: (_a = options === null || options === void 0 ? void 0 : options.root) !== null && _a !== void 0 ? _a : null,
|
|
24
|
-
rootMargin: (_b = options === null || options === void 0 ? void 0 : options.rootMargin) !== null && _b !== void 0 ? _b : '0px 0px 0px 0px',
|
|
25
|
-
threshold: (_c = options === null || options === void 0 ? void 0 : options.threshold) !== null && _c !== void 0 ? _c : 0.5
|
|
26
|
-
};
|
|
27
|
-
const elementVisible$ = new Observable((observer) => {
|
|
28
|
-
const intersectionObserver = new IntersectionObserver(entries => {
|
|
29
|
-
observer.next(entries);
|
|
30
|
-
}, intersectionOptions);
|
|
31
|
-
intersectionObserver.observe(element.nativeElement);
|
|
32
|
-
return () => {
|
|
33
|
-
intersectionObserver.disconnect();
|
|
34
|
-
};
|
|
35
|
-
}).pipe(mergeMap((entries) => entries), map((entry) => entry.isIntersecting), distinctUntilChanged());
|
|
36
|
-
const elementInSight$ = combineLatest([
|
|
37
|
-
this._documentVisible$,
|
|
38
|
-
elementVisible$
|
|
39
|
-
]).pipe(map(stream => {
|
|
40
|
-
const pageVisible = stream[0];
|
|
41
|
-
const elementVisible = stream[1];
|
|
42
|
-
const isVisible = pageVisible && elementVisible;
|
|
43
|
-
return isVisible;
|
|
44
|
-
}), distinctUntilChanged());
|
|
45
|
-
return elementInSight$;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
IntersectionService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntersectionService, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
49
|
-
IntersectionService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntersectionService });
|
|
50
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntersectionService, decorators: [{
|
|
51
|
-
type: Injectable
|
|
52
|
-
}], ctorParameters: function () {
|
|
53
|
-
return [{ type: undefined, decorators: [{
|
|
54
|
-
type: Inject,
|
|
55
|
-
args: [DOCUMENT]
|
|
56
|
-
}] }];
|
|
57
|
-
} });
|
|
58
|
-
|
|
59
|
-
class IntersectionDirective {
|
|
60
|
-
/**
|
|
61
|
-
*
|
|
62
|
-
*/
|
|
63
|
-
get intersectionOptions() {
|
|
64
|
-
return this._intersectionOptions;
|
|
65
|
-
}
|
|
66
|
-
set intersectionOptions(value) {
|
|
67
|
-
this._intersectionOptions = value;
|
|
68
|
-
}
|
|
69
|
-
constructor(_element, _intersectionService) {
|
|
70
|
-
this._element = _element;
|
|
71
|
-
this._intersectionService = _intersectionService;
|
|
72
|
-
/**
|
|
73
|
-
* Emits current visibility status
|
|
74
|
-
*/
|
|
75
|
-
this.elementInSight = new EventEmitter();
|
|
76
|
-
this._subscriptions = [];
|
|
77
|
-
}
|
|
78
|
-
ngOnInit() {
|
|
79
|
-
}
|
|
80
|
-
ngOnDestroy() {
|
|
81
|
-
this._subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
82
|
-
}
|
|
83
|
-
ngAfterViewInit() {
|
|
84
|
-
const intersetionSubscription = this._intersectionService
|
|
85
|
-
.elementInSight$(this._element, this.intersectionOptions)
|
|
86
|
-
.subscribe(visibilityFlag => {
|
|
87
|
-
this.elementInSight.emit(visibilityFlag);
|
|
88
|
-
});
|
|
89
|
-
this._subscriptions.push(intersetionSubscription);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
IntersectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntersectionDirective, deps: [{ token: i0.ElementRef }, { token: IntersectionService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
93
|
-
IntersectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: IntersectionDirective, selector: "[sdsIntersection]", inputs: { intersectionOptions: "intersectionOptions" }, outputs: { elementInSight: "elementInSight" }, providers: [IntersectionService], ngImport: i0 });
|
|
94
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: IntersectionDirective, decorators: [{
|
|
95
|
-
type: Directive,
|
|
96
|
-
args: [{
|
|
97
|
-
selector: '[sdsIntersection]',
|
|
98
|
-
providers: [IntersectionService]
|
|
99
|
-
}]
|
|
100
|
-
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: IntersectionService }]; }, propDecorators: { intersectionOptions: [{
|
|
101
|
-
type: Input
|
|
102
|
-
}], elementInSight: [{
|
|
103
|
-
type: Output
|
|
104
|
-
}] } });
|
|
105
|
-
|
|
106
|
-
class SdsIntersectionModule {
|
|
107
|
-
}
|
|
108
|
-
SdsIntersectionModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsIntersectionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
109
|
-
SdsIntersectionModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdsIntersectionModule, declarations: [IntersectionDirective], imports: [CommonModule], exports: [IntersectionDirective] });
|
|
110
|
-
SdsIntersectionModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsIntersectionModule, imports: [CommonModule] });
|
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsIntersectionModule, decorators: [{
|
|
112
|
-
type: NgModule,
|
|
113
|
-
args: [{
|
|
114
|
-
declarations: [IntersectionDirective],
|
|
115
|
-
exports: [IntersectionDirective],
|
|
116
|
-
imports: [
|
|
117
|
-
CommonModule
|
|
118
|
-
]
|
|
119
|
-
}]
|
|
120
|
-
}] });
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Generated bundle index. Do not edit.
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
export { IntersectionDirective, IntersectionService, SdsIntersectionModule };
|
|
127
|
-
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-intersection.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spicainternational-ngx-sds-components-src-lib-intersection.mjs","sources":["../../../projects/ngx-sds-components/src/lib/intersection/services/intersection.service.ts","../../../projects/ngx-sds-components/src/lib/intersection/directives/intersection.directive.ts","../../../projects/ngx-sds-components/src/lib/intersection/intersection.module.ts","../../../projects/ngx-sds-components/src/lib/intersection/spicainternational-ngx-sds-components-src-lib-intersection.ts"],"sourcesContent":["import { DOCUMENT } from '@angular/common';\r\nimport { ElementRef, Inject, Injectable } from '@angular/core';\r\nimport { Observable, Subscriber, combineLatest, concat, defer, fromEvent, of } from 'rxjs';\r\nimport { map, mergeMap, distinctUntilChanged } from 'rxjs/operators';\r\n\r\n@Injectable()\r\nexport class IntersectionService {\r\n private _documentVisible$: Observable<boolean>;\r\n\r\n constructor(@Inject(DOCUMENT) document: any) {\r\n this._documentVisible$ = concat(\r\n defer(() => of(!document.hidden)),\r\n fromEvent(document, 'visibilitychange').pipe(map(e => !document.hidden))\r\n );\r\n }\r\n\r\n /**\r\n * @description\r\n * Method responsible for determining if element is visible\r\n * on screen or not. Please\r\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API for options meaning\r\n * @param { ElementRef } element\r\n * @param { IntersectionObserverInit } options\r\n * @returns { Observable<boolean> }\r\n */\r\n elementInSight$(\r\n element: ElementRef,\r\n options?: IntersectionObserverInit\r\n ): Observable<boolean> {\r\n const intersectionOptions: IntersectionObserverInit = {\r\n root: options?.root ?? null,\r\n rootMargin: options?.rootMargin ?? '0px 0px 0px 0px',\r\n threshold: options?.threshold ?? 0.5\r\n };\r\n\r\n const elementVisible$ = new Observable(\r\n (observer: Subscriber<IntersectionObserverEntry[]>) => {\r\n const intersectionObserver = new IntersectionObserver(entries => {\r\n observer.next(entries);\r\n }, intersectionOptions);\r\n\r\n intersectionObserver.observe(element.nativeElement);\r\n\r\n return () => {\r\n intersectionObserver.disconnect();\r\n };\r\n }\r\n ).pipe(\r\n mergeMap((entries: IntersectionObserverEntry[]) => entries),\r\n map((entry: IntersectionObserverEntry) => entry.isIntersecting),\r\n distinctUntilChanged()\r\n );\r\n\r\n const elementInSight$ = combineLatest([\r\n this._documentVisible$,\r\n elementVisible$\r\n ]).pipe(\r\n map(stream => {\r\n const pageVisible: boolean = stream[0];\r\n const elementVisible: boolean = stream[1];\r\n\r\n const isVisible = pageVisible && elementVisible;\r\n\r\n return isVisible;\r\n }),\r\n distinctUntilChanged()\r\n );\r\n\r\n return elementInSight$;\r\n }\r\n}\r\n","import { AfterViewInit, Directive, ElementRef, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { Subscription } from 'rxjs';\r\nimport { IntersectionService } from '../services';\r\n\r\n@Directive({\r\n selector: '[sdsIntersection]',\r\n providers: [IntersectionService]\r\n})\r\nexport class IntersectionDirective implements OnInit, OnDestroy, AfterViewInit {\r\n /**\r\n *\r\n */\r\n @Input()\r\n get intersectionOptions(): IntersectionObserverInit | undefined {\r\n return this._intersectionOptions;\r\n }\r\n set intersectionOptions(value: IntersectionObserverInit | undefined) {\r\n this._intersectionOptions = value;\r\n }\r\n\r\n /**\r\n * Emits current visibility status\r\n */\r\n @Output() elementInSight: EventEmitter<boolean> = new EventEmitter<boolean>();\r\n\r\n private _intersectionOptions: IntersectionObserverInit | undefined;\r\n private _subscriptions: Subscription[] = [];\r\n\r\n constructor(\r\n private readonly _element: ElementRef,\r\n private readonly _intersectionService: IntersectionService\r\n ) {}\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this._subscriptions.forEach(subscription => subscription.unsubscribe());\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n const intersetionSubscription = this._intersectionService\r\n .elementInSight$(this._element, this.intersectionOptions)\r\n .subscribe(visibilityFlag => {\r\n this.elementInSight.emit(visibilityFlag);\r\n });\r\n\r\n this._subscriptions.push(intersetionSubscription);\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { IntersectionDirective } from './directives';\r\n\r\n@NgModule({\r\n declarations: [IntersectionDirective],\r\n exports: [IntersectionDirective],\r\n imports: [\r\n CommonModule\r\n ]\r\n})\r\nexport class SdsIntersectionModule { }\r\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.IntersectionService"],"mappings":";;;;;;MAMa,mBAAmB,CAAA;AAG5B,IAAA,WAAA,CAA8B,QAAa,EAAA;AACzC,QAAA,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAC7B,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,EACjC,SAAS,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CACzE,CAAC;KACH;AAED;;;;;;;;AAQG;IACH,eAAe,CACb,OAAmB,EACnB,OAAkC,EAAA;;AAElC,QAAA,MAAM,mBAAmB,GAA6B;YACpD,IAAI,EAAE,CAAA,EAAA,GAAA,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,IAAI,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,IAAI;YAC3B,UAAU,EAAE,CAAA,EAAA,GAAA,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,UAAU,MAAA,IAAA,IAAA,EAAA,KAAA,KAAA,CAAA,GAAA,EAAA,GAAI,iBAAiB;YACpD,SAAS,EAAE,CAAA,EAAA,GAAA,OAAO,KAAP,IAAA,IAAA,OAAO,uBAAP,OAAO,CAAE,SAAS,MAAA,I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APjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,qBAAqB,CAAC;oBACrC,OAAO,EAAE,CAAC,qBAAqB,CAAC;AAChC,oBAAA,OAAO,EAAE;wBACP,YAAY;AACb,qBAAA;iBACF,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, Directive, Inject, Output, NgModule } from '@angular/core';
|
|
3
|
-
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
4
|
-
import { fromEvent } from 'rxjs';
|
|
5
|
-
import { groupBy, mergeAll } from 'rxjs/operators';
|
|
6
|
-
|
|
7
|
-
class KeyboardShortcutDirective {
|
|
8
|
-
constructor(_document) {
|
|
9
|
-
this._document = _document;
|
|
10
|
-
/**
|
|
11
|
-
* OUTPUTS
|
|
12
|
-
*/
|
|
13
|
-
/**
|
|
14
|
-
* Emitted when user presses Escape
|
|
15
|
-
*/
|
|
16
|
-
this.closeShortcut = new EventEmitter();
|
|
17
|
-
/**
|
|
18
|
-
* Emitted when user presses ctrl+Enter or cmd+Enter
|
|
19
|
-
*/
|
|
20
|
-
this.saveRecordShortcut = new EventEmitter();
|
|
21
|
-
this._subscriptions = [];
|
|
22
|
-
}
|
|
23
|
-
ngOnInit() {
|
|
24
|
-
const keyboardEventsSubscription = fromEvent(this._document, 'keydown')
|
|
25
|
-
.pipe(groupBy(e => e.code), mergeAll())
|
|
26
|
-
.subscribe(keyboardEvent => {
|
|
27
|
-
// Define shortcut(s) logic here.
|
|
28
|
-
if (keyboardEvent.code === 'Escape') {
|
|
29
|
-
this.closeShortcut.emit();
|
|
30
|
-
}
|
|
31
|
-
if (keyboardEvent.code === 'Enter' && keyboardEvent.ctrlKey) {
|
|
32
|
-
// Ctrl+Enter was pressed (Cmd+Enter on Apple HW)
|
|
33
|
-
this.saveRecordShortcut.emit();
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
this._subscriptions.push(keyboardEventsSubscription);
|
|
37
|
-
}
|
|
38
|
-
ngOnDestroy() {
|
|
39
|
-
this._subscriptions.forEach(subscription => subscription.unsubscribe());
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
KeyboardShortcutDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: KeyboardShortcutDirective, deps: [{ token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive });
|
|
43
|
-
KeyboardShortcutDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: KeyboardShortcutDirective, selector: "[sdsKeyboardShortcut]", outputs: { closeShortcut: "closeShortcut", saveRecordShortcut: "saveRecordShortcut" }, ngImport: i0 });
|
|
44
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: KeyboardShortcutDirective, decorators: [{
|
|
45
|
-
type: Directive,
|
|
46
|
-
args: [{
|
|
47
|
-
selector: '[sdsKeyboardShortcut]'
|
|
48
|
-
}]
|
|
49
|
-
}], ctorParameters: function () {
|
|
50
|
-
return [{ type: undefined, decorators: [{
|
|
51
|
-
type: Inject,
|
|
52
|
-
args: [DOCUMENT]
|
|
53
|
-
}] }];
|
|
54
|
-
}, propDecorators: { closeShortcut: [{
|
|
55
|
-
type: Output
|
|
56
|
-
}], saveRecordShortcut: [{
|
|
57
|
-
type: Output
|
|
58
|
-
}] } });
|
|
59
|
-
|
|
60
|
-
class SdsKeyboardShortcutModule {
|
|
61
|
-
}
|
|
62
|
-
SdsKeyboardShortcutModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsKeyboardShortcutModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
63
|
-
SdsKeyboardShortcutModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: SdsKeyboardShortcutModule, declarations: [KeyboardShortcutDirective], imports: [CommonModule], exports: [KeyboardShortcutDirective] });
|
|
64
|
-
SdsKeyboardShortcutModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsKeyboardShortcutModule, imports: [CommonModule] });
|
|
65
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: SdsKeyboardShortcutModule, decorators: [{
|
|
66
|
-
type: NgModule,
|
|
67
|
-
args: [{
|
|
68
|
-
declarations: [
|
|
69
|
-
KeyboardShortcutDirective
|
|
70
|
-
],
|
|
71
|
-
exports: [
|
|
72
|
-
KeyboardShortcutDirective
|
|
73
|
-
],
|
|
74
|
-
imports: [
|
|
75
|
-
CommonModule
|
|
76
|
-
]
|
|
77
|
-
}]
|
|
78
|
-
}] });
|
|
79
|
-
|
|
80
|
-
/**
|
|
81
|
-
* Generated bundle index. Do not edit.
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
export { KeyboardShortcutDirective, SdsKeyboardShortcutModule };
|
|
85
|
-
//# sourceMappingURL=spicainternational-ngx-sds-components-src-lib-keyboard-shortcut.mjs.map
|