@fundamental-ngx/core 0.44.1-rc.3 → 0.45.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/action-sheet/action-sheet.module.d.ts +5 -6
- package/action-sheet/index.d.ts +0 -1
- package/avatar/avatar.component.d.ts +1 -6
- package/bar/bar.module.d.ts +4 -6
- package/bar/directives/bar-element.directive.d.ts +1 -6
- package/bar/index.d.ts +0 -2
- package/breadcrumb/breadcrumb.component.d.ts +1 -9
- package/breadcrumb/breadcrumb.module.d.ts +12 -13
- package/breadcrumb/index.d.ts +0 -1
- package/button/button.module.d.ts +4 -5
- package/button/index.d.ts +0 -1
- package/calendar/calendar.module.d.ts +5 -6
- package/calendar/index.d.ts +0 -1
- package/card/card.module.d.ts +6 -7
- package/card/index.d.ts +0 -1
- package/carousel/carousel.component.d.ts +1 -13
- package/checkbox/checkbox.module.d.ts +4 -5
- package/checkbox/index.d.ts +0 -1
- package/combobox/combobox.module.d.ts +12 -13
- package/combobox/index.d.ts +0 -1
- package/content-density/index.d.ts +0 -4
- package/date-picker/date-picker.component.d.ts +1 -62
- package/date-picker/date-picker.module.d.ts +12 -13
- package/date-picker/index.d.ts +0 -1
- package/datetime-picker/datetime-picker.component.d.ts +1 -49
- package/datetime-picker/datetime-picker.module.d.ts +14 -15
- package/datetime-picker/index.d.ts +0 -1
- package/dialog/dialog.module.d.ts +14 -16
- package/dialog/index.d.ts +0 -2
- package/dialog/utils/dialog-config.class.d.ts +0 -2
- package/dynamic-page/dynamic-page.module.d.ts +10 -11
- package/dynamic-page/index.d.ts +0 -1
- package/esm2022/action-sheet/action-sheet.module.mjs +3 -8
- package/esm2022/action-sheet/index.mjs +1 -2
- package/esm2022/avatar/avatar.component.mjs +3 -13
- package/esm2022/bar/bar.module.mjs +3 -13
- package/esm2022/bar/directives/bar-element.directive.mjs +3 -16
- package/esm2022/bar/index.mjs +1 -3
- package/esm2022/breadcrumb/breadcrumb.component.mjs +5 -19
- package/esm2022/breadcrumb/breadcrumb.module.mjs +6 -18
- package/esm2022/breadcrumb/index.mjs +1 -2
- package/esm2022/button/button.module.mjs +4 -5
- package/esm2022/button/index.mjs +1 -2
- package/esm2022/calendar/calendar.module.mjs +3 -8
- package/esm2022/calendar/index.mjs +1 -2
- package/esm2022/card/card.module.mjs +4 -8
- package/esm2022/card/index.mjs +1 -2
- package/esm2022/carousel/carousel.component.mjs +4 -30
- package/esm2022/checkbox/checkbox.module.mjs +4 -5
- package/esm2022/checkbox/index.mjs +1 -2
- package/esm2022/combobox/combobox-mobile/combobox-mobile.component.mjs +1 -1
- package/esm2022/combobox/combobox.component.mjs +1 -1
- package/esm2022/combobox/combobox.module.mjs +6 -8
- package/esm2022/combobox/index.mjs +1 -2
- package/esm2022/content-density/index.mjs +1 -5
- package/esm2022/date-picker/date-picker.component.mjs +4 -104
- package/esm2022/date-picker/date-picker.module.mjs +5 -6
- package/esm2022/date-picker/index.mjs +1 -2
- package/esm2022/datetime-picker/datetime-picker.component.mjs +4 -83
- package/esm2022/datetime-picker/datetime-picker.module.mjs +5 -6
- package/esm2022/datetime-picker/index.mjs +1 -2
- package/esm2022/dialog/dialog-default/dialog-default.component.mjs +1 -1
- package/esm2022/dialog/dialog-header/dialog-header.component.mjs +1 -1
- package/esm2022/dialog/dialog.component.mjs +3 -3
- package/esm2022/dialog/dialog.module.mjs +1 -9
- package/esm2022/dialog/index.mjs +1 -3
- package/esm2022/dialog/utils/dialog-config.class.mjs +1 -1
- package/esm2022/dynamic-page/dynamic-page-header/actions/dynamic-page-title-content.component.mjs +1 -1
- package/esm2022/dynamic-page/dynamic-page-header/header/dynamic-page-header.component.mjs +1 -1
- package/esm2022/dynamic-page/dynamic-page.module.mjs +3 -8
- package/esm2022/dynamic-page/index.mjs +1 -2
- package/esm2022/facets/facet/facet.component.mjs +1 -1
- package/esm2022/feed-list-item/components/item/feed-list-item.component.mjs +14 -40
- package/esm2022/file-uploader/file-uploader.module.mjs +4 -23
- package/esm2022/file-uploader/index.mjs +1 -2
- package/esm2022/form/form-control/form-control.module.mjs +4 -23
- package/esm2022/form/form-label/form-label.component.mjs +3 -40
- package/esm2022/form/form-message/form-message.component.mjs +1 -1
- package/esm2022/form/form-message/popover-form-message.service.mjs +1 -1
- package/esm2022/form/index.mjs +1 -2
- package/esm2022/fundamental-ngx.module.mjs +1 -5
- package/esm2022/grid-list/components/grid-list-filter-bar/grid-list-filter-bar.component.mjs +1 -1
- package/esm2022/grid-list/components/grid-list-title-bar/grid-list-title-bar.component.mjs +1 -1
- package/esm2022/index.mjs +1 -2
- package/esm2022/inline-help/inline-help.directive.mjs +3 -18
- package/esm2022/input-group/index.mjs +1 -2
- package/esm2022/input-group/input-group.component.mjs +6 -28
- package/esm2022/input-group/input-group.module.mjs +1 -6
- package/esm2022/link/link.component.mjs +5 -8
- package/esm2022/list/index.mjs +1 -2
- package/esm2022/list/list-item/list-item.component.mjs +3 -46
- package/esm2022/list/list-message.directive.mjs +1 -1
- package/esm2022/list/list.module.mjs +3 -8
- package/esm2022/menu/index.mjs +1 -2
- package/esm2022/menu/menu-mobile/menu-mobile.component.mjs +1 -1
- package/esm2022/menu/menu.module.mjs +3 -8
- package/esm2022/message-box/index.mjs +1 -3
- package/esm2022/message-box/message-box-default/message-box-default.component.mjs +1 -1
- package/esm2022/message-box/message-box-header/message-box-header.component.mjs +1 -1
- package/esm2022/message-box/message-box.module.mjs +3 -11
- package/esm2022/message-strip/alert/message-strip-alert/message-strip-alert.component.mjs +3 -3
- package/esm2022/message-strip/alert/message-strip-alert.service.mjs +8 -2
- package/esm2022/message-strip/message-strip.component.mjs +3 -16
- package/esm2022/micro-process-flow/index.mjs +1 -2
- package/esm2022/micro-process-flow/micro-process-flow.module.mjs +5 -10
- package/esm2022/multi-combobox/mobile/mobile-multi-combobox.component.mjs +1 -1
- package/esm2022/multi-combobox/multi-combobox.component.mjs +1 -1
- package/esm2022/multi-combobox/select-all-toggler/select-all-toggler.component.mjs +1 -1
- package/esm2022/multi-input/index.mjs +1 -2
- package/esm2022/multi-input/multi-input-mobile/multi-input-mobile.component.mjs +1 -1
- package/esm2022/multi-input/multi-input.component.mjs +1 -1
- package/esm2022/multi-input/multi-input.module.mjs +6 -8
- package/esm2022/nested-list/index.mjs +1 -2
- package/esm2022/nested-list/nested-list.module.mjs +3 -8
- package/esm2022/object-number/object-number.component.mjs +3 -3
- package/esm2022/overflow-layout/overflow-layout.component.mjs +3 -3
- package/esm2022/pagination/index.mjs +1 -2
- package/esm2022/pagination/pagination.component.mjs +8 -186
- package/esm2022/pagination/pagination.module.mjs +6 -7
- package/esm2022/panel/index.mjs +1 -2
- package/esm2022/panel/panel.module.mjs +4 -15
- package/esm2022/popover/base/base-popover.class.mjs +2 -33
- package/esm2022/popover/popover.component.mjs +1 -19
- package/esm2022/product-switch/product-switch/product-switch.component.mjs +4 -17
- package/esm2022/product-switch/product-switch-body/product-switch-body.component.mjs +1 -1
- package/esm2022/product-switch/product-switch-body/product-switch.item.mjs +1 -1
- package/esm2022/quick-view/quick-view-group-item-label/quick-view-group-item-label.component.mjs +1 -1
- package/esm2022/quick-view/quick-view-title/quick-view-title.component.mjs +1 -1
- package/esm2022/radio/index.mjs +1 -2
- package/esm2022/radio/radio.module.mjs +4 -5
- package/esm2022/rating-indicator/components/rating-indicator.component.mjs +3 -3
- package/esm2022/select/index.mjs +1 -2
- package/esm2022/select/select.component.mjs +1 -1
- package/esm2022/select/select.module.mjs +5 -6
- package/esm2022/shellbar/index.mjs +1 -2
- package/esm2022/shellbar/shellbar-actions/shellbar-actions.component.mjs +3 -17
- package/esm2022/shellbar/shellbar-actions-mobile/shellbar-actions-mobile.component.mjs +3 -5
- package/esm2022/shellbar/shellbar.module.mjs +3 -8
- package/esm2022/shellbar/user-menu/shellbar-user-menu.component.mjs +1 -1
- package/esm2022/slider/index.mjs +1 -2
- package/esm2022/slider/slider.component.mjs +3 -49
- package/esm2022/slider/slider.module.mjs +4 -5
- package/esm2022/split-button/index.mjs +1 -2
- package/esm2022/split-button/split-button.component.mjs +3 -27
- package/esm2022/split-button/split-button.module.mjs +4 -5
- package/esm2022/splitter/splitter-pagination/splitter-pagination.component.mjs +3 -10
- package/esm2022/splitter/splitter.component.mjs +2 -16
- package/esm2022/step-input/index.mjs +1 -2
- package/esm2022/step-input/step-input.component.mjs +5 -31
- package/esm2022/step-input/step-input.module.mjs +5 -6
- package/esm2022/switch/index.mjs +1 -2
- package/esm2022/switch/switch.component.mjs +5 -43
- package/esm2022/switch/switch.module.mjs +4 -5
- package/esm2022/table/index.mjs +1 -3
- package/esm2022/table/table.module.mjs +3 -13
- package/esm2022/tabs/index.mjs +1 -2
- package/esm2022/tabs/tab-item-expand/tab-item-expand.component.mjs +8 -22
- package/esm2022/tabs/tab-list.component.mjs +5 -18
- package/esm2022/tabs/tabs.module.mjs +3 -8
- package/esm2022/text/text.component.mjs +3 -29
- package/esm2022/time/index.mjs +1 -3
- package/esm2022/time/time.component.mjs +8 -65
- package/esm2022/time/time.module.mjs +5 -6
- package/esm2022/time-picker/index.mjs +1 -2
- package/esm2022/time-picker/time-picker.component.mjs +1 -1
- package/esm2022/time-picker/time-picker.module.mjs +6 -22
- package/esm2022/timeline/components/timeline-node-body/timeline-node-body.component.mjs +1 -1
- package/esm2022/timeline/timeline.component.mjs +1 -1
- package/esm2022/token/index.mjs +1 -2
- package/esm2022/token/token.component.mjs +4 -30
- package/esm2022/token/token.module.mjs +5 -24
- package/esm2022/token/tokenizer.component.mjs +3 -3
- package/esm2022/toolbar/toolbar.component.mjs +8 -24
- package/esm2022/tree/tree.component.mjs +1 -1
- package/esm2022/upload-collection/upload-collection-button-group/upload-collection-button-group.component.mjs +9 -87
- package/esm2022/upload-collection/upload-collection-form-item/upload-collection-form-item.component.mjs +9 -21
- package/esm2022/upload-collection/upload-collection-item.directive.mjs +4 -3
- package/esm2022/upload-collection/upload-collection-simple.directives.mjs +22 -15
- package/esm2022/upload-collection/upload-collection.component.mjs +5 -4
- package/esm2022/upload-collection/upload-collection.module.mjs +7 -13
- package/esm2022/wizard/index.mjs +1 -2
- package/esm2022/wizard/wizard.module.mjs +3 -8
- package/feed-list-item/components/item/feed-list-item.component.d.ts +9 -25
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs +5 -36
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar.mjs +2 -12
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-bar.mjs +7 -81
- package/fesm2022/fundamental-ngx-core-bar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs +11 -63
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-button.mjs +6 -33
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-calendar.mjs +4 -35
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-card.mjs +6 -36
- package/fesm2022/fundamental-ngx-core-card.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-carousel.mjs +3 -29
- package/fesm2022/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-checkbox.mjs +6 -33
- package/fesm2022/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +9 -37
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-content-density.mjs +1 -148
- package/fesm2022/fundamental-ngx-core-content-density.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-date-picker.mjs +10 -137
- package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +10 -116
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +6 -57
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs +7 -38
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-facets.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-facets.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs +13 -39
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs +5 -50
- package/fesm2022/fundamental-ngx-core-file-uploader.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +7 -88
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-grid-list.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-grid-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-inline-help.mjs +2 -17
- package/fesm2022/fundamental-ngx-core-inline-help.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-input-group.mjs +8 -60
- package/fesm2022/fundamental-ngx-core-input-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-link.mjs +4 -7
- package/fesm2022/fundamental-ngx-core-link.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-list.mjs +6 -80
- package/fesm2022/fundamental-ngx-core-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +7 -38
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +7 -59
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +11 -19
- package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs +7 -38
- package/fesm2022/fundamental-ngx-core-micro-process-flow.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +3 -3
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +9 -36
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-nested-list.mjs +4 -34
- package/fesm2022/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-number.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-number.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-overflow-layout.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-overflow-layout.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs +14 -219
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-panel.mjs +6 -43
- package/fesm2022/fundamental-ngx-core-panel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +2 -50
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +6 -18
- package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-quick-view.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-quick-view.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-radio.mjs +6 -33
- package/fesm2022/fundamental-ngx-core-radio.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +7 -34
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +11 -57
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-slider.mjs +8 -70
- package/fesm2022/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-split-button.mjs +8 -59
- package/fesm2022/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-splitter.mjs +4 -24
- package/fesm2022/fundamental-ngx-core-splitter.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-step-input.mjs +11 -64
- package/fesm2022/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-switch.mjs +9 -74
- package/fesm2022/fundamental-ngx-core-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-table.mjs +5 -65
- package/fesm2022/fundamental-ngx-core-table.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs +14 -69
- package/fesm2022/fundamental-ngx-core-tabs.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-text.mjs +2 -28
- package/fesm2022/fundamental-ngx-core-text.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time-picker.mjs +9 -51
- package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time.mjs +12 -143
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-timeline.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-timeline.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +11 -82
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs +6 -22
- package/fesm2022/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +46 -131
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs +5 -36
- package/fesm2022/fundamental-ngx-core-wizard.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core.mjs +0 -5
- package/fesm2022/fundamental-ngx-core.mjs.map +1 -1
- package/file-uploader/file-uploader.module.d.ts +6 -7
- package/file-uploader/index.d.ts +0 -1
- package/form/form-control/form-control.module.d.ts +3 -4
- package/form/form-label/form-label.component.d.ts +1 -16
- package/form/form-message/form-message.component.d.ts +0 -2
- package/form/form-message/popover-form-message.service.d.ts +2 -2
- package/form/index.d.ts +0 -1
- package/fundamental-ngx-core-v0.45.0.tgz +0 -0
- package/fundamental-ngx.module.d.ts +89 -90
- package/index.d.ts +0 -1
- package/inline-help/inline-help.directive.d.ts +1 -7
- package/input-group/index.d.ts +0 -1
- package/input-group/input-group.component.d.ts +6 -13
- package/input-group/input-group.module.d.ts +6 -7
- package/link/link.component.d.ts +1 -1
- package/list/index.d.ts +0 -1
- package/list/list-item/list-item.component.d.ts +1 -25
- package/list/list-message.directive.d.ts +2 -2
- package/list/list.module.d.ts +5 -6
- package/menu/index.d.ts +0 -1
- package/menu/menu.module.d.ts +6 -7
- package/message-box/index.d.ts +0 -2
- package/message-box/message-box.module.d.ts +15 -17
- package/message-strip/message-strip.component.d.ts +1 -9
- package/micro-process-flow/index.d.ts +0 -1
- package/micro-process-flow/micro-process-flow.module.d.ts +4 -5
- package/multi-input/index.d.ts +0 -1
- package/multi-input/multi-input.module.d.ts +12 -13
- package/nested-list/index.d.ts +0 -1
- package/nested-list/nested-list.module.d.ts +6 -7
- package/package.json +3 -9
- package/pagination/index.d.ts +0 -1
- package/pagination/pagination.component.d.ts +2 -111
- package/pagination/pagination.module.d.ts +10 -11
- package/panel/index.d.ts +0 -1
- package/panel/panel.module.d.ts +4 -5
- package/popover/base/base-popover.class.d.ts +1 -16
- package/popover/popover.component.d.ts +0 -11
- package/product-switch/product-switch/product-switch.component.d.ts +1 -8
- package/product-switch/product-switch-body/product-switch.item.d.ts +0 -4
- package/radio/index.d.ts +0 -1
- package/radio/radio.module.d.ts +4 -5
- package/schematics/add-dependencies/index.js +4 -4
- package/select/index.d.ts +0 -1
- package/select/select.component.d.ts +0 -2
- package/select/select.module.d.ts +9 -10
- package/shellbar/index.d.ts +0 -1
- package/shellbar/shellbar-actions/shellbar-actions.component.d.ts +1 -9
- package/shellbar/shellbar-actions-mobile/shellbar-actions-mobile.component.d.ts +3 -5
- package/shellbar/shellbar.module.d.ts +14 -15
- package/slider/index.d.ts +0 -1
- package/slider/slider.component.d.ts +1 -31
- package/slider/slider.module.d.ts +7 -8
- package/split-button/index.d.ts +0 -1
- package/split-button/split-button.component.d.ts +3 -12
- package/split-button/split-button.module.d.ts +6 -7
- package/splitter/splitter-pagination/splitter-pagination.component.d.ts +0 -5
- package/splitter/splitter.component.d.ts +1 -9
- package/step-input/index.d.ts +0 -1
- package/step-input/step-input.component.d.ts +1 -17
- package/step-input/step-input.module.d.ts +7 -8
- package/switch/index.d.ts +0 -1
- package/switch/switch.component.d.ts +1 -19
- package/switch/switch.module.d.ts +5 -6
- package/table/index.d.ts +0 -2
- package/table/table.module.d.ts +4 -6
- package/tabs/index.d.ts +0 -1
- package/tabs/tab-item-expand/tab-item-expand.component.d.ts +1 -8
- package/tabs/tab-list.component.d.ts +1 -9
- package/tabs/tabs.module.d.ts +12 -13
- package/text/text.component.d.ts +1 -17
- package/time/index.d.ts +0 -2
- package/time/time.component.d.ts +2 -15
- package/time/time.module.d.ts +9 -10
- package/time-picker/index.d.ts +0 -1
- package/time-picker/time-picker.module.d.ts +9 -10
- package/token/index.d.ts +0 -1
- package/token/token.component.d.ts +1 -17
- package/token/token.module.d.ts +8 -9
- package/toolbar/toolbar.component.d.ts +4 -12
- package/upload-collection/upload-collection-button-group/upload-collection-button-group.component.d.ts +2 -50
- package/upload-collection/upload-collection-form-item/upload-collection-form-item.component.d.ts +1 -9
- package/upload-collection/upload-collection-item.directive.d.ts +1 -1
- package/upload-collection/upload-collection-simple.directives.d.ts +7 -7
- package/upload-collection/upload-collection.component.d.ts +1 -1
- package/upload-collection/upload-collection.module.d.ts +1 -8
- package/wizard/index.d.ts +0 -1
- package/wizard/wizard.module.d.ts +8 -9
- package/action-sheet/deprecated-action-sheet-compact.directive.d.ts +0 -8
- package/alert/README.md +0 -25
- package/alert/alert-service/alert.service.d.ts +0 -41
- package/alert/alert-utils/alert-animations.d.ts +0 -8
- package/alert/alert-utils/alert-config.d.ts +0 -34
- package/alert/alert-utils/alert-container.component.d.ts +0 -14
- package/alert/alert-utils/alert-ref.d.ts +0 -26
- package/alert/alert.component.d.ts +0 -87
- package/alert/alert.module.d.ts +0 -18
- package/alert/index.d.ts +0 -7
- package/bar/deprecated-bar-button-content-density.directive.d.ts +0 -8
- package/bar/deprecated-bar-content-density.directive.d.ts +0 -8
- package/breadcrumb/deprecated-breadcrumbs-compact.directive.d.ts +0 -8
- package/button/deprecated-button-content-density.directive.d.ts +0 -8
- package/calendar/deprecated-calendar-content-density.directive.d.ts +0 -8
- package/card/deprecated-card-content-density.directive.d.ts +0 -8
- package/checkbox/deprecated-checkbox-content-density.directive.d.ts +0 -8
- package/combobox/deprecated-combobox-content-density.directive.d.ts +0 -10
- package/content-density/classes/deprecated-compact.directive.d.ts +0 -26
- package/content-density/classes/deprecated-condensed.directive.d.ts +0 -26
- package/content-density/classes/deprecated-content-density.directive.d.ts +0 -26
- package/content-density/classes/deprecated-cozy.directive.d.ts +0 -26
- package/date-picker/deprecated-date-picker-compact.directive.d.ts +0 -8
- package/datetime-picker/deprecated-date-time-picker-content-density.directive.d.ts +0 -8
- package/dialog/dialog-footer-button/dialog-footer-button.component.d.ts +0 -12
- package/dialog/directives/dialog-decisive-button.directive.d.ts +0 -11
- package/dynamic-page/deprecated-dynamic-page-compact.directive.d.ts +0 -8
- package/esm2022/action-sheet/deprecated-action-sheet-compact.directive.mjs +0 -30
- package/esm2022/alert/alert-service/alert.service.mjs +0 -85
- package/esm2022/alert/alert-utils/alert-animations.mjs +0 -38
- package/esm2022/alert/alert-utils/alert-config.mjs +0 -27
- package/esm2022/alert/alert-utils/alert-container.component.mjs +0 -29
- package/esm2022/alert/alert-utils/alert-ref.mjs +0 -29
- package/esm2022/alert/alert.component.mjs +0 -212
- package/esm2022/alert/alert.module.mjs +0 -33
- package/esm2022/alert/fundamental-ngx-core-alert.mjs +0 -5
- package/esm2022/alert/index.mjs +0 -8
- package/esm2022/bar/deprecated-bar-button-content-density.directive.mjs +0 -30
- package/esm2022/bar/deprecated-bar-content-density.directive.mjs +0 -29
- package/esm2022/breadcrumb/deprecated-breadcrumbs-compact.directive.mjs +0 -30
- package/esm2022/button/deprecated-button-content-density.directive.mjs +0 -30
- package/esm2022/calendar/deprecated-calendar-content-density.directive.mjs +0 -30
- package/esm2022/card/deprecated-card-content-density.directive.mjs +0 -30
- package/esm2022/checkbox/deprecated-checkbox-content-density.directive.mjs +0 -30
- package/esm2022/combobox/deprecated-combobox-content-density.directive.mjs +0 -31
- package/esm2022/content-density/classes/deprecated-compact.directive.mjs +0 -39
- package/esm2022/content-density/classes/deprecated-condensed.directive.mjs +0 -39
- package/esm2022/content-density/classes/deprecated-content-density.directive.mjs +0 -49
- package/esm2022/content-density/classes/deprecated-cozy.directive.mjs +0 -39
- package/esm2022/date-picker/deprecated-date-picker-compact.directive.mjs +0 -30
- package/esm2022/datetime-picker/deprecated-date-time-picker-content-density.directive.mjs +0 -30
- package/esm2022/dialog/dialog-footer-button/dialog-footer-button.component.mjs +0 -25
- package/esm2022/dialog/directives/dialog-decisive-button.directive.mjs +0 -26
- package/esm2022/dynamic-page/deprecated-dynamic-page-compact.directive.mjs +0 -30
- package/esm2022/file-uploader/deprecated-file-uploader-content-density.directive.mjs +0 -30
- package/esm2022/form/form-control/deprecated-form-control-content-density.directive.mjs +0 -29
- package/esm2022/input-group/deprecated-input-group-compact.directive.mjs +0 -30
- package/esm2022/list/deprecated-list-content-density,directive.mjs +0 -30
- package/esm2022/menu/directives/deprecated-menu-compact.directive.mjs +0 -30
- package/esm2022/message-box/directives/message-box-decisive-button.directive.mjs +0 -27
- package/esm2022/message-box/message-box-footer-button/message-box-footer-button.component.mjs +0 -25
- package/esm2022/micro-process-flow/components/micro-process-flow/deprecated-micro-process-flow-content-density.directive.mjs +0 -30
- package/esm2022/multi-input/deprecated-multi-input-compact.directive.mjs +0 -30
- package/esm2022/nested-list/deprecated-nested-list-compact.directive.mjs +0 -29
- package/esm2022/pagination/deprecated-pagination-compact.directive.mjs +0 -30
- package/esm2022/panel/deprecated-panel-compact.directive.mjs +0 -30
- package/esm2022/radio/deprecated-radio-button-compact.directive.mjs +0 -30
- package/esm2022/select/deprecated-select-compact.directive.mjs +0 -30
- package/esm2022/shellbar/deprecated-shellbar-compact.directive.mjs +0 -30
- package/esm2022/slider/deprecated-slider-cozy.directive.mjs +0 -20
- package/esm2022/split-button/deprecated-split-button-compact.directive.mjs +0 -30
- package/esm2022/step-input/deprecated-step-input-compact.directive.mjs +0 -30
- package/esm2022/switch/deprecated-switch-compact.directive.mjs +0 -30
- package/esm2022/table/deprecated-table-compact.directive.mjs +0 -29
- package/esm2022/table/deprecated-table-condensed.directive.mjs +0 -29
- package/esm2022/tabs/deprecated-tabs-compact.directive.mjs +0 -29
- package/esm2022/time/deprecated-time-content-density.directive.mjs +0 -30
- package/esm2022/time/i18n/time-i18n.mjs +0 -52
- package/esm2022/time-picker/deprecated-timepicker-compact.directive.mjs +0 -30
- package/esm2022/token/deprecated-tokenizer-content-density.directive.mjs +0 -30
- package/esm2022/wizard/deprecated-wizard-compact.directive.mjs +0 -30
- package/fesm2022/fundamental-ngx-core-alert.mjs +0 -437
- package/fesm2022/fundamental-ngx-core-alert.mjs.map +0 -1
- package/file-uploader/deprecated-file-uploader-content-density.directive.d.ts +0 -8
- package/form/form-control/deprecated-form-control-content-density.directive.d.ts +0 -8
- package/fundamental-ngx-core-v0.44.1-rc.3.tgz +0 -0
- package/input-group/deprecated-input-group-compact.directive.d.ts +0 -8
- package/list/deprecated-list-content-density,directive.d.ts +0 -8
- package/menu/directives/deprecated-menu-compact.directive.d.ts +0 -8
- package/message-box/directives/message-box-decisive-button.directive.d.ts +0 -11
- package/message-box/message-box-footer-button/message-box-footer-button.component.d.ts +0 -12
- package/micro-process-flow/components/micro-process-flow/deprecated-micro-process-flow-content-density.directive.d.ts +0 -8
- package/multi-input/deprecated-multi-input-compact.directive.d.ts +0 -8
- package/nested-list/deprecated-nested-list-compact.directive.d.ts +0 -8
- package/pagination/deprecated-pagination-compact.directive.d.ts +0 -8
- package/panel/deprecated-panel-compact.directive.d.ts +0 -8
- package/radio/deprecated-radio-button-compact.directive.d.ts +0 -8
- package/select/deprecated-select-compact.directive.d.ts +0 -8
- package/shellbar/deprecated-shellbar-compact.directive.d.ts +0 -8
- package/slider/deprecated-slider-cozy.directive.d.ts +0 -8
- package/split-button/deprecated-split-button-compact.directive.d.ts +0 -8
- package/step-input/deprecated-step-input-compact.directive.d.ts +0 -8
- package/switch/deprecated-switch-compact.directive.d.ts +0 -8
- package/table/deprecated-table-compact.directive.d.ts +0 -8
- package/table/deprecated-table-condensed.directive.d.ts +0 -8
- package/tabs/deprecated-tabs-compact.directive.d.ts +0 -8
- package/time/deprecated-time-content-density.directive.d.ts +0 -8
- package/time/i18n/time-i18n.d.ts +0 -42
- package/time-picker/deprecated-timepicker-compact.directive.d.ts +0 -8
- package/token/deprecated-tokenizer-content-density.directive.d.ts +0 -8
- package/wizard/deprecated-wizard-compact.directive.d.ts +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-radio.mjs","sources":["../../../../libs/core/src/lib/radio/tokens.ts","../../../../libs/core/src/lib/radio/radio-button/radio-button.component.ts","../../../../libs/core/src/lib/radio/radio-button/radio-button.component.html","../../../../libs/core/src/lib/radio/deprecated-radio-button-compact.directive.ts","../../../../libs/core/src/lib/radio/radio.module.ts","../../../../libs/core/src/lib/radio/fundamental-ngx-core-radio.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const FD_RADIO_BUTTON_COMPONENT = new InjectionToken('FdRadioButtonComponent');\n","import { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { applyCssClass, CssClassBuilder } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { FD_RADIO_BUTTON_COMPONENT } from '../tokens';\n\nexport type stateType = 'success' | 'error' | 'warning' | 'default' | 'information';\nlet uniqueId = 0;\n\n@Component({\n selector: 'fd-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioButtonComponent),\n multi: true\n },\n {\n provide: FD_RADIO_BUTTON_COMPONENT,\n useExisting: RadioButtonComponent\n },\n registerFormItemControl(RadioButtonComponent),\n contentDensityObserverProviders()\n ],\n host: {\n '(focusout)': 'onTouched()'\n }\n})\nexport class RadioButtonComponent\n implements OnChanges, AfterViewInit, CssClassBuilder, ControlValueAccessor, OnDestroy, FormItemControl\n{\n /** @hidden */\n @ViewChild('inputElement')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Sets the `aria-label` attribute to the element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Sets the `aria-labelledby` attribute to the element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /** Sets the `aria-describedby` attribute to the element. */\n @Input()\n ariaDescribedBy: Nullable<string>;\n\n /** sets radio tooltip */\n @Input()\n title: string;\n\n /**\n * Includes the radio in the page tab sequence.\n */\n @Input()\n set tabIndex(value: NumberInput) {\n this._tabIndex = coerceNumberProperty(value);\n }\n\n get tabIndex(): NumberInput {\n return this._tabIndex;\n }\n\n /** @hidden */\n private _tabIndex: number;\n\n /** The field to set state of radio button using:\n * 'success' | 'error' | 'warning' | 'default' | 'information'\n * by default value is set to 'default'\n */\n @Input()\n state?: stateType = 'default';\n\n /** The field is used to tell if radio button should be disabled\n * Value: true or false\n * by default disabled state is set to false\n */\n @Input()\n disabled = false;\n\n /** The field should be only used with reactive forms\n * Its purpose is to pass a current selected value from froumGroup\n * The field is mandatory when working with reactive forms\n */\n @Input()\n set selectedValue(val: any) {\n this.currentValue = val;\n this._setNativeElementCheckedState();\n }\n\n /** The name of the radio button\n * The field is mandatory\n */\n @Input()\n name: string;\n\n /**\n * uniqueId to a radio button\n */\n @Input()\n id = `radio-id-${uniqueId++}`;\n\n /** Value field stores information about holding value by radio button\n * The field is mandatory\n */\n @Input()\n value: any;\n\n /** If it is a mandatory field */\n @Input()\n required = false;\n\n /** Whether the control is a standalone. */\n @Input()\n standalone = false;\n\n /** Whether the radio button is checked. */\n get checked(): boolean {\n if (this.value === undefined) {\n return false;\n }\n return this.currentValue === this.value;\n }\n\n /** @hidden */\n class: string;\n\n /** @hidden */\n currentValue: any;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private changeDetectionRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n ngOnChanges(): void {\n this.buildComponentCssClass();\n this._checkMandatoryFields();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this.buildComponentCssClass();\n this._checkMandatoryFields();\n }\n\n // ControlValueAccessor implementation\n /** @hidden */\n onChange: any = (): void => {};\n\n /** @hidden */\n onTouched: any = (): void => {};\n\n /** @hidden */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectionRef.detectChanges();\n }\n\n /** @hidden */\n writeValue(value: any): void {\n this.valueChange(value, false);\n }\n\n // End implementation\n\n /** This method is responsible for building a css class based on current state\n * It is implementation of CssClassBuilder interface and\n * should be used with @applyCssClass decorator\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n return ['fd-radio', this.state !== 'default' ? `is-${this.state}` : ''];\n }\n\n /** @hidden */\n get elementRef(): ElementRef {\n return this.inputElement;\n }\n\n /** @hidden */\n labelClicked(event: MouseEvent | KeyboardEvent, applyFocus = true): void {\n this.valueChange(this.value);\n\n if (applyFocus) {\n this._setFocusOnNativeElement();\n }\n\n event.stopPropagation();\n }\n\n /** @hidden */\n valueChange(value: any, emitEvent = true): void {\n this.currentValue = value;\n\n this._setNativeElementCheckedState();\n\n this.changeDetectionRef.detectChanges();\n if (emitEvent) {\n this.onChange(value);\n }\n }\n\n /** @hidden */\n private _checkMandatoryFields(): void {\n if (this.standalone) {\n return;\n }\n if (this.name === undefined) {\n throw new Error('name field is required');\n }\n if (this.value === undefined) {\n throw new Error('value field is required');\n }\n }\n\n /** @hidden */\n private _setFocusOnNativeElement(): void {\n if (this.inputElement) {\n this.inputElement.nativeElement.focus();\n }\n }\n\n /** @hidden */\n private _setNativeElementCheckedState(): void {\n if (this.inputElement) {\n this.inputElement.nativeElement.checked = this.checked;\n }\n }\n}\n","<input\n type=\"radio\"\n class=\"fd-radio\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [name]=\"name\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-required]=\"required\"\n [ngModel]=\"currentValue\"\n (ngModelChange)=\"valueChange($event)\"\n [ngModelOptions]=\"{ standalone: standalone }\"\n #inputElement\n [value]=\"value\"\n [attr.value]=\"value\"\n/>\n<label class=\"fd-radio__label\" [attr.title]=\"title\" [for]=\"id\" (click)=\"labelClicked($event)\">\n <ng-content></ng-content>\n</label>\n","import { Directive, forwardRef } from '@angular/core';\nimport { CONTENT_DENSITY_DIRECTIVE, DeprecatedCompactDirective } from '@fundamental-ngx/core/content-density';\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-radio-button[compact]',\n providers: [\n {\n provide: CONTENT_DENSITY_DIRECTIVE,\n useExisting: forwardRef(() => DeprecatedRadioButtonCompactDirective)\n }\n ]\n})\nexport class DeprecatedRadioButtonCompactDirective extends DeprecatedCompactDirective {\n /** @hidden */\n constructor() {\n super('fd-radio-button');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\nimport { RadioButtonComponent } from './radio-button/radio-button.component';\nimport { DeprecatedRadioButtonCompactDirective } from './deprecated-radio-button-compact.directive';\n\n@NgModule({\n declarations: [RadioButtonComponent, DeprecatedRadioButtonCompactDirective],\n exports: [RadioButtonComponent, ContentDensityModule, DeprecatedRadioButtonCompactDirective],\n imports: [CommonModule, FormsModule, ContentDensityModule]\n})\nexport class RadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAEa,yBAAyB,GAAG,IAAI,cAAc,CAAC,wBAAwB;;ACqBpF,IAAI,QAAQ,GAAG,CAAC,CAAC;MAyBJ,oBAAoB,CAAA;AAuB7B;;AAEG;IACH,IACI,QAAQ,CAAC,KAAkB,EAAA;AAC3B,QAAA,IAAI,CAAC,SAAS,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;KAChD;AAED,I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AAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,oBAAoB,CAAC;AAC7D,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-radio.mjs","sources":["../../../../libs/core/src/lib/radio/tokens.ts","../../../../libs/core/src/lib/radio/radio-button/radio-button.component.ts","../../../../libs/core/src/lib/radio/radio-button/radio-button.component.html","../../../../libs/core/src/lib/radio/radio.module.ts","../../../../libs/core/src/lib/radio/fundamental-ngx-core-radio.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const FD_RADIO_BUTTON_COMPONENT = new InjectionToken('FdRadioButtonComponent');\n","import { coerceNumberProperty, NumberInput } from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n ElementRef,\n forwardRef,\n Input,\n OnChanges,\n OnDestroy,\n ViewChild,\n ViewEncapsulation\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { applyCssClass, CssClassBuilder } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { FD_RADIO_BUTTON_COMPONENT } from '../tokens';\n\nexport type stateType = 'success' | 'error' | 'warning' | 'default' | 'information';\nlet uniqueId = 0;\n\n@Component({\n selector: 'fd-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RadioButtonComponent),\n multi: true\n },\n {\n provide: FD_RADIO_BUTTON_COMPONENT,\n useExisting: RadioButtonComponent\n },\n registerFormItemControl(RadioButtonComponent),\n contentDensityObserverProviders()\n ],\n host: {\n '(focusout)': 'onTouched()'\n }\n})\nexport class RadioButtonComponent\n implements OnChanges, AfterViewInit, CssClassBuilder, ControlValueAccessor, OnDestroy, FormItemControl\n{\n /** @hidden */\n @ViewChild('inputElement')\n inputElement: ElementRef<HTMLInputElement>;\n\n /** Sets the `aria-label` attribute to the element. */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** Sets the `aria-labelledby` attribute to the element. */\n @Input()\n ariaLabelledBy: Nullable<string>;\n\n /** Sets the `aria-describedby` attribute to the element. */\n @Input()\n ariaDescribedBy: Nullable<string>;\n\n /** sets radio tooltip */\n @Input()\n title: string;\n\n /**\n * Includes the radio in the page tab sequence.\n */\n @Input()\n set tabIndex(value: NumberInput) {\n this._tabIndex = coerceNumberProperty(value);\n }\n\n get tabIndex(): NumberInput {\n return this._tabIndex;\n }\n\n /** @hidden */\n private _tabIndex: number;\n\n /** The field to set state of radio button using:\n * 'success' | 'error' | 'warning' | 'default' | 'information'\n * by default value is set to 'default'\n */\n @Input()\n state?: stateType = 'default';\n\n /** The field is used to tell if radio button should be disabled\n * Value: true or false\n * by default disabled state is set to false\n */\n @Input()\n disabled = false;\n\n /** The field should be only used with reactive forms\n * Its purpose is to pass a current selected value from froumGroup\n * The field is mandatory when working with reactive forms\n */\n @Input()\n set selectedValue(val: any) {\n this.currentValue = val;\n this._setNativeElementCheckedState();\n }\n\n /** The name of the radio button\n * The field is mandatory\n */\n @Input()\n name: string;\n\n /**\n * uniqueId to a radio button\n */\n @Input()\n id = `radio-id-${uniqueId++}`;\n\n /** Value field stores information about holding value by radio button\n * The field is mandatory\n */\n @Input()\n value: any;\n\n /** If it is a mandatory field */\n @Input()\n required = false;\n\n /** Whether the control is a standalone. */\n @Input()\n standalone = false;\n\n /** Whether the radio button is checked. */\n get checked(): boolean {\n if (this.value === undefined) {\n return false;\n }\n return this.currentValue === this.value;\n }\n\n /** @hidden */\n class: string;\n\n /** @hidden */\n currentValue: any;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private changeDetectionRef: ChangeDetectorRef,\n readonly _contentDensityObserver: ContentDensityObserver\n ) {}\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n ngOnChanges(): void {\n this.buildComponentCssClass();\n this._checkMandatoryFields();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this.buildComponentCssClass();\n this._checkMandatoryFields();\n }\n\n // ControlValueAccessor implementation\n /** @hidden */\n onChange: any = (): void => {};\n\n /** @hidden */\n onTouched: any = (): void => {};\n\n /** @hidden */\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectionRef.detectChanges();\n }\n\n /** @hidden */\n writeValue(value: any): void {\n this.valueChange(value, false);\n }\n\n // End implementation\n\n /** This method is responsible for building a css class based on current state\n * It is implementation of CssClassBuilder interface and\n * should be used with @applyCssClass decorator\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n return ['fd-radio', this.state !== 'default' ? `is-${this.state}` : ''];\n }\n\n /** @hidden */\n get elementRef(): ElementRef {\n return this.inputElement;\n }\n\n /** @hidden */\n labelClicked(event: MouseEvent | KeyboardEvent, applyFocus = true): void {\n this.valueChange(this.value);\n\n if (applyFocus) {\n this._setFocusOnNativeElement();\n }\n\n event.stopPropagation();\n }\n\n /** @hidden */\n valueChange(value: any, emitEvent = true): void {\n this.currentValue = value;\n\n this._setNativeElementCheckedState();\n\n this.changeDetectionRef.detectChanges();\n if (emitEvent) {\n this.onChange(value);\n }\n }\n\n /** @hidden */\n private _checkMandatoryFields(): void {\n if (this.standalone) {\n return;\n }\n if (this.name === undefined) {\n throw new Error('name field is required');\n }\n if (this.value === undefined) {\n throw new Error('value field is required');\n }\n }\n\n /** @hidden */\n private _setFocusOnNativeElement(): void {\n if (this.inputElement) {\n this.inputElement.nativeElement.focus();\n }\n }\n\n /** @hidden */\n private _setNativeElementCheckedState(): void {\n if (this.inputElement) {\n this.inputElement.nativeElement.checked = this.checked;\n }\n }\n}\n","<input\n type=\"radio\"\n class=\"fd-radio\"\n [class.is-compact]=\"_contentDensityObserver.isCompact$ | async\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [attr.name]=\"name\"\n [name]=\"name\"\n [attr.tabindex]=\"tabIndex\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-labelledby]=\"ariaLabelledBy\"\n [attr.aria-describedby]=\"ariaDescribedBy\"\n [attr.aria-disabled]=\"disabled\"\n [attr.aria-checked]=\"checked\"\n [attr.aria-required]=\"required\"\n [ngModel]=\"currentValue\"\n (ngModelChange)=\"valueChange($event)\"\n [ngModelOptions]=\"{ standalone: standalone }\"\n #inputElement\n [value]=\"value\"\n [attr.value]=\"value\"\n/>\n<label class=\"fd-radio__label\" [attr.title]=\"title\" [for]=\"id\" (click)=\"labelClicked($event)\">\n <ng-content></ng-content>\n</label>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule } from '@angular/forms';\nimport { ContentDensityModule } from '@fundamental-ngx/core/content-density';\nimport { RadioButtonComponent } from './radio-button/radio-button.component';\n\n@NgModule({\n declarations: [RadioButtonComponent],\n exports: [RadioButtonComponent, ContentDensityModule],\n imports: [CommonModule, FormsModule, ContentDensityModule]\n})\nexport class RadioModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAEa,yBAAyB,GAAG,IAAI,cAAc,CAAC,wBAAwB;;ACqBpF,IAAI,QAAQ,GAAG,CAAC,CAAC;MAyBJ,oBAAoB,CAAA;AAuB7B;;AAEG;IACH,IACI,QAAQ,CAAC,KAAkB,EAAA;AAC3B,QAAA,IAAI,CAAC,SAAS,GAAG,oBAAoB,CAAC,KA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AAA,CAAA;kBALvB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,oBAAoB,CAAC;AACrD,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,WAAW,EAAE,oBAAoB,CAAC;AAC7D,iBAAA,CAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -280,7 +280,7 @@ class RatingIndicatorComponent {
|
|
|
280
280
|
multi: true
|
|
281
281
|
},
|
|
282
282
|
registerFormItemControl(RatingIndicatorComponent)
|
|
283
|
-
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
283
|
+
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
284
284
|
}
|
|
285
285
|
__decorate([
|
|
286
286
|
applyCssClass,
|
|
@@ -297,7 +297,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
297
297
|
multi: true
|
|
298
298
|
},
|
|
299
299
|
registerFormItemControl(RatingIndicatorComponent)
|
|
300
|
-
], template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"] }]
|
|
300
|
+
], template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"] }]
|
|
301
301
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { class: [{
|
|
302
302
|
type: Input
|
|
303
303
|
}], name: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.RatingStarLabelPipe"],"mappings":";;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,sBAAsB;AAEzC,MAAA,iBAAiB,GAAG;IAC7B,MAAM,EAAE,CAAG,EAAA,gBAAgB,CAAa,WAAA,CAAA;IACxC,IAAI,EAAE,CAAG,EAAA,gBAAgB,CAAQ,MAAA,CAAA;IACjC,eAAe,EAAE,CAAG,EAAA,gBAAgB,CAAqB,mBAAA,CAAA;EAC3D;AACK,MAAM,0BAA0B,GAAG,EAAE;IAGhC,wBAQX;AARD,CAAA,UAAY,uBAAuB,EAAA;AAC/B,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAM,CAAA;AACN,IAAA,uBAAA,CAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAS,CAAA;AACT,IAAA,uBAAA,CAAA,uBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAW,CAAA;AACf,CAAC,EARW,uBAAuB,KAAvB,uBAAuB,GAQlC,EA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QAAA,EAAA,CAAA,CAAA,EAAA;+GAArB,qBAAqB,EAAA,YAAA,EAAA,CAJf,wBAAwB,EAAE,mBAAmB,aAClD,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEzB,qBAAqB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.RatingStarLabelPipe"],"mappings":";;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,sBAAsB;AAEzC,MAAA,iBAAiB,GAAG;IAC7B,MAAM,EAAE,CAAG,EAAA,gBAAgB,CAAa,WAAA,CAAA;IACxC,IAAI,EAAE,CAAG,EAAA,gBAAgB,CAAQ,MAAA,CAAA;IACjC,eAAe,EAAE,CAAG,EAAA,gBAAgB,CAAqB,mBAAA,CAAA;EAC3D;AACK,MAAM,0BAA0B,GAAG,EAAE;IAGhC,wBAQX;AARD,CAAA,UAAY,uBAAuB,EAAA;AAC/B,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,MAAA,CAAA,GAAA,CAAA,CAAA,GAAA,MAAM,CAAA;AACN,IAAA,uBAAA,CAAA,uBAAA,CAAA,SAAA,CAAA,GAAA,CAAA,CAAA,GAAA,SAAS,CAAA;AACT,IAAA,uBAAA,CAAA,uBAAA,CAAA,WAAA,CAAA,GAAA,CAAA,CAAA,GAAA,WAAW,CAAA;AACf,CAAC,EARW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AAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAArB,qBAAqB,EAAA,YAAA,EAAA,CAJf,wBAAwB,EAAE,mBAAmB,aAClD,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEzB,qBAAqB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, Injectable, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostBinding, ContentChildren, Inject, Optional, ViewChild, HostListener, NgModule, isDevMode, Injector, ElementRef, Attribute, Self
|
|
2
|
+
import { InjectionToken, Injectable, EventEmitter, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Output, HostBinding, ContentChildren, Inject, Optional, ViewChild, HostListener, NgModule, isDevMode, Injector, ElementRef, Attribute, Self } from '@angular/core';
|
|
3
3
|
import * as i5 from '@angular/common';
|
|
4
4
|
import { CommonModule } from '@angular/common';
|
|
5
5
|
import * as i6 from '@fundamental-ngx/core/popover';
|
|
@@ -13,7 +13,7 @@ import { ListTitleDirective, ListModule } from '@fundamental-ngx/core/list';
|
|
|
13
13
|
import * as i9 from '@fundamental-ngx/i18n';
|
|
14
14
|
import { I18nModule } from '@fundamental-ngx/i18n';
|
|
15
15
|
import * as i4$1 from '@fundamental-ngx/core/content-density';
|
|
16
|
-
import { contentDensityObserverProviders,
|
|
16
|
+
import { contentDensityObserverProviders, ContentDensityModule } from '@fundamental-ngx/core/content-density';
|
|
17
17
|
import * as i3$1 from '@angular/forms';
|
|
18
18
|
import { CdkConnectedOverlay } from '@angular/cdk/overlay';
|
|
19
19
|
import { SelectionModel } from '@angular/cdk/collections';
|
|
@@ -1080,43 +1080,16 @@ class DeprecatedSelectCSSClasses {
|
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
1082
|
|
|
1083
|
-
class DeprecatedSelectCompactDirective extends DeprecatedCompactDirective {
|
|
1084
|
-
/** @hidden */
|
|
1085
|
-
constructor() {
|
|
1086
|
-
super('fd-select');
|
|
1087
|
-
}
|
|
1088
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: DeprecatedSelectCompactDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1089
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.1.0", type: DeprecatedSelectCompactDirective, selector: "fd-select[compact]", providers: [
|
|
1090
|
-
{
|
|
1091
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
1092
|
-
useExisting: forwardRef(() => DeprecatedSelectCompactDirective)
|
|
1093
|
-
}
|
|
1094
|
-
], usesInheritance: true, ngImport: i0 }); }
|
|
1095
|
-
}
|
|
1096
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: DeprecatedSelectCompactDirective, decorators: [{
|
|
1097
|
-
type: Directive,
|
|
1098
|
-
args: [{
|
|
1099
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
1100
|
-
selector: 'fd-select[compact]',
|
|
1101
|
-
providers: [
|
|
1102
|
-
{
|
|
1103
|
-
provide: CONTENT_DENSITY_DIRECTIVE,
|
|
1104
|
-
useExisting: forwardRef(() => DeprecatedSelectCompactDirective)
|
|
1105
|
-
}
|
|
1106
|
-
]
|
|
1107
|
-
}]
|
|
1108
|
-
}], ctorParameters: function () { return []; } });
|
|
1109
|
-
|
|
1110
1083
|
class SelectModule {
|
|
1111
1084
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1112
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0", ngImport: i0, type: SelectModule, declarations: [SelectComponent, OptionComponent
|
|
1085
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.0", ngImport: i0, type: SelectModule, declarations: [SelectComponent, OptionComponent], imports: [BusyIndicatorModule,
|
|
1113
1086
|
CommonModule,
|
|
1114
1087
|
PopoverModule,
|
|
1115
1088
|
ButtonModule,
|
|
1116
1089
|
IconModule,
|
|
1117
1090
|
ListModule,
|
|
1118
1091
|
ContentDensityModule,
|
|
1119
|
-
I18nModule], exports: [SelectComponent, OptionComponent,
|
|
1092
|
+
I18nModule], exports: [SelectComponent, OptionComponent, ContentDensityModule] }); }
|
|
1120
1093
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: SelectModule, imports: [BusyIndicatorModule,
|
|
1121
1094
|
CommonModule,
|
|
1122
1095
|
PopoverModule,
|
|
@@ -1129,8 +1102,8 @@ class SelectModule {
|
|
|
1129
1102
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImport: i0, type: SelectModule, decorators: [{
|
|
1130
1103
|
type: NgModule,
|
|
1131
1104
|
args: [{
|
|
1132
|
-
declarations: [SelectComponent, OptionComponent
|
|
1133
|
-
exports: [SelectComponent, OptionComponent,
|
|
1105
|
+
declarations: [SelectComponent, OptionComponent],
|
|
1106
|
+
exports: [SelectComponent, OptionComponent, ContentDensityModule],
|
|
1134
1107
|
imports: [
|
|
1135
1108
|
BusyIndicatorModule,
|
|
1136
1109
|
CommonModule,
|
|
@@ -1148,5 +1121,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
1148
1121
|
* Generated bundle index. Do not edit.
|
|
1149
1122
|
*/
|
|
1150
1123
|
|
|
1151
|
-
export { DeprecatedSelectCSSClasses,
|
|
1124
|
+
export { DeprecatedSelectCSSClasses, FdOptionSelectionChange, OptionComponent, SELECT_COMPONENT, SELECT_ITEM_HEIGHT_EM, SELECT_PANEL_MAX_HEIGHT, SelectComponent, SelectKeyManagerService, SelectMobileComponent, SelectMobileModule, SelectModule };
|
|
1152
1125
|
//# sourceMappingURL=fundamental-ngx-core-select.mjs.map
|