@fundamental-ngx/core 0.61.2-rc.9 → 0.61.3
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/fesm2022/fundamental-ngx-core-action-sheet.mjs +2 -3
- package/fesm2022/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs +4 -6
- package/fesm2022/fundamental-ngx-core-avatar-group.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs +13 -11
- package/fesm2022/fundamental-ngx-core-breadcrumb.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-busy-indicator.mjs +7 -5
- package/fesm2022/fundamental-ngx-core-busy-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-calendar.mjs +31 -35
- package/fesm2022/fundamental-ngx-core-calendar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-carousel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-combobox.mjs +3 -5
- package/fesm2022/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-date-picker.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime.mjs +13 -7
- package/fesm2022/fundamental-ngx-core-datetime.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +16 -11
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs +13 -13
- package/fesm2022/fundamental-ngx-core-dynamic-page.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-feed-list-item.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-grid-list.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-grid-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-info-label.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-info-label.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-inline-help.mjs +65 -59
- package/fesm2022/fundamental-ngx-core-inline-help.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-link.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-link.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-menu.mjs +5 -5
- package/fesm2022/fundamental-ngx-core-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +7 -7
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-strip.mjs +49 -44
- package/fesm2022/fundamental-ngx-core-message-strip.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs +20 -25
- package/fesm2022/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +8 -6
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-nested-list.mjs +21 -22
- package/fesm2022/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-notification.mjs +16 -13
- package/fesm2022/fundamental-ngx-core-notification.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-object-identifier.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-identifier.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-object-status.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-object-status.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 -11
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +9 -3
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-product-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs +7 -4
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs +11 -10
- package/fesm2022/fundamental-ngx-core-segmented-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +6 -7
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +6 -6
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-slider.mjs +6 -6
- package/fesm2022/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-split-button.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-split-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-step-input.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-switch.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-switch.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tabs.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-tabs.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-text.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-text.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time-picker.mjs +29 -4
- package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-time.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +15 -12
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-toolbar.mjs +3 -5
- package/fesm2022/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-tree.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-tree.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-user-menu.mjs +3 -5
- package/fesm2022/fundamental-ngx-core-user-menu.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-vertical-navigation.mjs.map +1 -1
- package/package.json +3 -3
- package/types/fundamental-ngx-core-breadcrumb.d.ts +5 -5
- package/types/fundamental-ngx-core-busy-indicator.d.ts +3 -3
- package/types/fundamental-ngx-core-combobox.d.ts +2 -4
- package/types/fundamental-ngx-core-datetime.d.ts +5 -1
- package/types/fundamental-ngx-core-dialog.d.ts +1 -1
- package/types/fundamental-ngx-core-dynamic-page.d.ts +2 -1
- package/types/fundamental-ngx-core-inline-help.d.ts +45 -24
- package/types/fundamental-ngx-core-menu.d.ts +0 -2
- package/types/fundamental-ngx-core-message-box.d.ts +1 -1
- package/types/fundamental-ngx-core-message-strip.d.ts +12 -3
- package/types/fundamental-ngx-core-multi-combobox.d.ts +1 -1
- package/types/fundamental-ngx-core-nested-list.d.ts +10 -10
- package/types/fundamental-ngx-core-notification.d.ts +7 -5
- package/types/fundamental-ngx-core-pagination.d.ts +4 -3
- package/types/fundamental-ngx-core-rating-indicator.d.ts +2 -3
- package/types/fundamental-ngx-core-segmented-button.d.ts +5 -3
- package/types/fundamental-ngx-core-slider.d.ts +1 -1
- package/types/fundamental-ngx-core-time-picker.d.ts +17 -1
- package/types/fundamental-ngx-core-token.d.ts +4 -4
|
@@ -239,7 +239,7 @@ class ProductSwitchComponent {
|
|
|
239
239
|
provide: FD_PRODUCT_SWITCH_COMPONENT,
|
|
240
240
|
useExisting: ProductSwitchComponent
|
|
241
241
|
}
|
|
242
|
-
], queries: [{ propertyName: "customProductSwitchButton", first: true, predicate: ProductSwitchButtonDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"
|
|
242
|
+
], queries: [{ propertyName: "customProductSwitchButton", first: true, predicate: ProductSwitchButtonDirective, descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n [attr.title]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"customProductSwitchButton()!.templateRef\"></ng-template>\n }\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n", dependencies: [{ kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["config", "title", "trigger", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll", "placement", "maxWidth", "fillControlMode", "closeOnOutsideClick", "closeOnEscapeKey", "disabled", "triggers", "focusTrapped", "focusAutoCapture", "restoreFocusOnClose", "noArrow", "disableScrollbar", "appendTo", "placementContainer", "scrollStrategy", "cdkPositions", "applyOverlay", "additionalBodyClass", "additionalTriggerClass", "closeOnNavigation", "fixedPosition", "resizable", "isOpen"], outputs: ["triggerChange", "isOpenChange", "beforeOpen"] }, { kind: "component", type: PopoverControlComponent, selector: "fd-popover-control, [fdPopoverControl]" }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button], span[fd-button]", inputs: ["id"], exportAs: ["fd-button"] }, { kind: "component", type: PopoverBodyComponent, selector: "fd-popover-body", inputs: ["minWidth", "maxWidth", "minHeight", "maxHeight"], outputs: ["onClose"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
243
243
|
}
|
|
244
244
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: ProductSwitchComponent, decorators: [{
|
|
245
245
|
type: Component,
|
|
@@ -257,7 +257,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
257
257
|
NgTemplateOutlet
|
|
258
258
|
], host: {
|
|
259
259
|
'[class.fd-popover-custom--disabled]': 'disabled()'
|
|
260
|
-
}, template: "<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"
|
|
260
|
+
}, template: "<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n [attr.title]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"customProductSwitchButton()!.templateRef\"></ng-template>\n }\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n" }]
|
|
261
261
|
}], propDecorators: { config: [{ type: i0.Input, args: [{ isSignal: true, alias: "config", required: false }] }], placement: [{ type: i0.Input, args: [{ isSignal: true, alias: "placement", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], closeOnEscapeKey: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnEscapeKey", required: false }] }], closeOnOutsideClick: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeOnOutsideClick", required: false }] }], noArrow: [{ type: i0.Input, args: [{ isSignal: true, alias: "noArrow", required: false }] }], disableScrollbar: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableScrollbar", required: false }] }], triggers: [{ type: i0.Input, args: [{ isSignal: true, alias: "triggers", required: false }] }], focusTrapped: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusTrapped", required: false }] }], focusAutoCapture: [{ type: i0.Input, args: [{ isSignal: true, alias: "focusAutoCapture", required: false }] }], isOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOpen", required: false }] }, { type: i0.Output, args: ["isOpenChange"] }], beforeOpen: [{ type: i0.Output, args: ["beforeOpen"] }], customProductSwitchButton: [{ type: i0.ContentChild, args: [i0.forwardRef(() => ProductSwitchButtonDirective), { isSignal: true }] }] } });
|
|
262
262
|
|
|
263
263
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-product-switch.mjs","sources":["../../../../libs/core/product-switch/product-switch-body/product-switch-body.component.ts","../../../../libs/core/product-switch/product-switch-body/product-switch-body.component.html","../../../../libs/core/product-switch/product-switch-button.directive.ts","../../../../libs/core/product-switch/tokens.ts","../../../../libs/core/product-switch/product-switch/product-switch.component.ts","../../../../libs/core/product-switch/product-switch/product-switch.component.html","../../../../libs/core/product-switch/product-switch.module.ts","../../../../libs/core/product-switch/fundamental-ngx-core-product-switch.ts"],"sourcesContent":["import { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { FdDropEvent, KeyUtil, RtlService } from '@fundamental-ngx/cdk/utils';\n\nimport { DndItemDirective, DndListDirective } from '@fundamental-ngx/cdk/utils';\nimport { AvatarComponent } from '@fundamental-ngx/core/avatar';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconComponent } from '@fundamental-ngx/core/icon';\nimport { ProductSwitchItem } from './product-switch.item';\n\nconst containerWidthPxSmallMode = 588;\nconst containerWidthPx = 776;\n\n@Component({\n selector: 'fd-product-switch-body',\n templateUrl: './product-switch-body.component.html',\n styleUrls: ['./product-switch-body.component.scss', '../../../cdk/utils/drag-and-drop/drag-and-drop.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DndItemDirective, DndListDirective, IconComponent, AvatarComponent]\n})\nexport class ProductSwitchBodyComponent implements OnInit, OnDestroy {\n /** Defines if drag and drop functionality should be included in product switch*/\n @Input()\n dragAndDropEnabled = true;\n\n /** The product switch's product items. */\n @Input()\n products: ProductSwitchItem[];\n\n /** Defines if the product switcher should be displayed in list mode, no matter what is the size of window */\n @Input()\n forceListMode = false;\n\n /** Event thrown on products array change */\n @Output()\n readonly productsChange: EventEmitter<any[]> = new EventEmitter<any[]>();\n\n /** Event emitted on product click */\n @Output()\n readonly itemClicked: EventEmitter<void> = new EventEmitter<void>();\n\n /** @hidden */\n protected readonly FD_DEFAULT_ICON_FONT_FAMILY = FD_DEFAULT_ICON_FONT_FAMILY;\n\n /** @hidden */\n private _listMode: boolean;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n private _rtlService = inject(RtlService, { optional: true });\n\n /** @hidden */\n constructor(\n private _viewportRuler: ViewportRuler,\n private readonly _cdr: ChangeDetectorRef\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscriptions.add(\n this._viewportRuler.change().subscribe((event) => {\n const { innerWidth } = <Window>event.target;\n this._checkSize(innerWidth);\n })\n );\n\n const { width } = this._viewportRuler.getViewportSize();\n this._checkSize(width);\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n _itemClick(item: ProductSwitchItem, event: MouseEvent): void {\n this.products.forEach((product) => (product.selected = product === item));\n\n this.itemClicked.emit();\n if (item.callback) {\n item.callback(event);\n }\n }\n\n /** Method called on products change */\n _productSwitchItemsChangeHandle(dropEvent: FdDropEvent<ProductSwitchItem>): void {\n this.productsChange.emit(dropEvent.items);\n this.products = dropEvent.items;\n }\n\n /** @hidden */\n _keyDownHandle(event: KeyboardEvent): void {\n const target = <HTMLElement>event.target;\n\n if (!KeyUtil.isKeyCode(event, TAB)) {\n event.preventDefault();\n }\n\n if (KeyUtil.isKeyCode(event, [ENTER, SPACE])) {\n target.click();\n } else if (!this._isListMode()) {\n const i = Array.from(target.parentElement?.children ?? []).indexOf(target);\n this._handleNoListKeydown(event, target, i);\n } else if (this._isListMode() && KeyUtil.isKeyCode(event, [DOWN_ARROW, UP_ARROW])) {\n this._handleListArrowUpDown(event, target);\n }\n }\n\n /** @hidden */\n _isSmallMode(): boolean {\n return this.products?.length < 7;\n }\n\n /** @hidden */\n _isListMode(): boolean {\n return this._listMode || this.forceListMode;\n }\n\n /** @hidden */\n private _checkSize(width: number): void {\n if (this._isSmallMode()) {\n this._listMode = width < containerWidthPxSmallMode;\n } else {\n this._listMode = width < containerWidthPx;\n }\n\n this._cdr.markForCheck();\n }\n\n /** @hidden */\n private _handleNoListKeydown(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const previousElementSibling = <HTMLElement>target.previousElementSibling;\n const nextElementSibling = <HTMLElement>target.nextElementSibling;\n\n if (\n i === this.products.length - 1 &&\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) || (KeyUtil.isKeyCode(event, LEFT_ARROW) && this._rtlService?.rtl()))\n ) {\n while (<HTMLElement>target.previousElementSibling) {\n target = <HTMLElement>target.previousElementSibling;\n }\n target.focus();\n }\n\n if (KeyUtil.isKeyCode(event, LEFT_ARROW)) {\n this._rtlService?.rtl() ? nextElementSibling?.focus() : previousElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, RIGHT_ARROW)) {\n this._rtlService?.rtl() ? previousElementSibling?.focus() : nextElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, [DOWN_ARROW, UP_ARROW])) {\n if (this.products.length >= 7) {\n this._handleNoListMoreThanSeven(event, target, i);\n } else if (this.products.length < 7) {\n this._handleNoListLessThanSeven(event, target, i);\n }\n }\n }\n\n /** @hidden */\n private _handleNoListMoreThanSeven(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const nextIndexByColumn = 4;\n const children = target.parentElement?.children;\n\n if (!children) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n (<HTMLElement>children[i + nextIndexByColumn])?.focus();\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n (<HTMLElement>children[i - nextIndexByColumn])?.focus();\n }\n }\n\n /** @hidden */\n private _handleNoListLessThanSeven(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const nextIndexByColumn = 3;\n const children = target.parentElement?.children;\n\n if (!children) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n (<HTMLElement>children[i + nextIndexByColumn])?.focus();\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n (<HTMLElement>children[i - nextIndexByColumn])?.focus();\n }\n }\n\n /** @hidden */\n private _handleListArrowUpDown(event: KeyboardEvent, target: HTMLElement): void {\n const targetIndex = Array.from(target.parentElement?.children ?? []).indexOf(target);\n const previousElementSibling =\n targetIndex === 0\n ? <HTMLElement>target.parentElement?.children[this.products.length - 1]\n : <HTMLElement>target.previousElementSibling;\n const nextElementSibling =\n targetIndex === this.products.length - 1\n ? <HTMLElement>target.parentElement?.children[0]\n : <HTMLElement>target.nextElementSibling;\n\n if (this._isListMode() && KeyUtil.isKeyCode(event, DOWN_ARROW) && nextElementSibling) {\n nextElementSibling.focus();\n } else if (this._isListMode() && KeyUtil.isKeyCode(event, UP_ARROW) && previousElementSibling) {\n previousElementSibling.focus();\n }\n }\n}\n","<div\n class=\"fd-product-switch__body\"\n [class.fd-product-switch__body--col-3]=\"_isSmallMode() && !_isListMode()\"\n [class.fd-product-switch__body--mobile]=\"_isListMode()\"\n>\n <ul\n fd-dnd-list\n class=\"fd-product-switch__list\"\n [items]=\"products\"\n [gridMode]=\"!_isListMode()\"\n (itemDropped)=\"_productSwitchItemsChangeHandle($event)\"\n >\n @for (product of products; track product) {\n <li\n fd-dnd-item\n tabindex=\"0\"\n class=\"fd-product-switch__item\"\n [class.selected]=\"product.selected\"\n (keydown)=\"_keyDownHandle($event)\"\n (click)=\"_itemClick(product, $event)\"\n [draggable]=\"!product.disabledDragAndDrop && dragAndDropEnabled\"\n [stickInPlace]=\"!!product.stickToPosition\"\n >\n @if (product.avatar) {\n <fd-avatar\n size=\"s\"\n [glyph]=\"product.avatar.glyph ?? null\"\n [label]=\"product.avatar.label ?? null\"\n [circle]=\"!!product.avatar.circle\"\n [image]=\"product.avatar.image ?? null\"\n [contain]=\"!!product.avatar.contain\"\n [transparent]=\"!!product.avatar.transparent\"\n [placeholder]=\"!!product.avatar.placeholder\"\n [tile]=\"!!product.avatar.tile\"\n [colorAccent]=\"product.avatar.colorAccent\"\n [colorIndication]=\"product.avatar.colorIndication\"\n [border]=\"!!product.avatar.border\"\n [alterIcon]=\"product.avatar.alterIcon ?? null\"\n [backupImage]=\"product.avatar.backupImage ?? null\"\n [ariaLabel]=\"product.avatar.ariaLabel ?? null\"\n >\n </fd-avatar>\n } @else {\n <fd-icon\n [font]=\"product.font || FD_DEFAULT_ICON_FONT_FAMILY\"\n role=\"presentation\"\n class=\"fd-product-switch__icon\"\n [glyph]=\"product.icon\"\n ></fd-icon>\n }\n\n <div class=\"fd-product-switch__text\">\n <div class=\"fd-product-switch__title\">{{ product.title }}</div>\n @if (product.subtitle) {\n <div class=\"fd-product-switch__subtitle\">{{ product.subtitle }}</div>\n }\n </div>\n </li>\n }\n </ul>\n</div>\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[fdProductSwitchButton]',\n standalone: true\n})\nexport class ProductSwitchButtonDirective {\n /** @hidden */\n constructor(readonly templateRef: TemplateRef<any>) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FD_PRODUCT_SWITCH_COMPONENT = new InjectionToken('FdProductSwitchComponent');\n","import { ChangeDetectionStrategy, Component, contentChild, input, model, output } from '@angular/core';\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\nimport {\n PopoverBodyComponent,\n PopoverComponent,\n PopoverConfig,\n PopoverControlComponent,\n TriggerConfig\n} from '@fundamental-ngx/core/popover';\nimport { Placement } from '@fundamental-ngx/core/shared';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { ProductSwitchButtonDirective } from '../product-switch-button.directive';\nimport { FD_PRODUCT_SWITCH_COMPONENT } from '../tokens';\n\n@Component({\n selector: 'fd-product-switch',\n templateUrl: './product-switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: FD_PRODUCT_SWITCH_COMPONENT,\n useExisting: ProductSwitchComponent\n }\n ],\n imports: [\n PopoverComponent,\n PopoverControlComponent,\n ButtonComponent,\n PopoverBodyComponent,\n FdTranslatePipe,\n NgTemplateOutlet\n ],\n host: {\n '[class.fd-popover-custom--disabled]': 'disabled()'\n }\n})\nexport class ProductSwitchComponent {\n /**\n * Configuration object for popover settings.\n * When provided, these settings will be merged with individual input properties.\n * Individual inputs take precedence over config object values.\n */\n readonly config = input<PopoverConfig>({});\n\n /** Placement of a popover. */\n readonly placement = input<Placement>('bottom-end');\n\n /** Whether the product switch is disabled. */\n readonly disabled = input(false);\n\n /** Whether the popover should close when the escape key is pressed. */\n readonly closeOnEscapeKey = input(true);\n\n /** Whether the popover should close when a click is made outside its boundaries. */\n readonly closeOnOutsideClick = input(true);\n\n /** Whether the popover should have an arrow. */\n readonly noArrow = input(true);\n\n /** Whether to wrap content with fd-scrollbar directive. */\n readonly disableScrollbar = input(false);\n\n /** The trigger events that will open/close the popover. */\n readonly triggers = input<(string | TriggerConfig)[]>(['click']);\n\n /** Whether the popover should be focusTrapped. */\n readonly focusTrapped = input(false);\n\n /** Whether the popover should automatically move focus into the trapped region. */\n readonly focusAutoCapture = input(false);\n\n /** Two-way binding for open state. */\n readonly isOpen = model(false);\n\n /** Event emitted right before the popover is being opened. */\n readonly beforeOpen = output<void>();\n\n /** @hidden */\n protected readonly customProductSwitchButton = contentChild(ProductSwitchButtonDirective);\n}\n","<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"('coreProductSwitch.ariaLabel' | fdTranslate)()\"\n [attr.title]=\"('coreProductSwitch.ariaLabel' | fdTranslate)()\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"customProductSwitchButton()!.templateRef\"></ng-template>\n }\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ProductSwitchBodyComponent } from './product-switch-body/product-switch-body.component';\nimport { ProductSwitchComponent } from './product-switch/product-switch.component';\n\n/**\n * @deprecated\n * Use direct imports of `ProductSwitchComponent`, `ProductSwitchBodyComponent`\n */\n@NgModule({\n imports: [ProductSwitchComponent, ProductSwitchBodyComponent],\n exports: [ProductSwitchComponent, ProductSwitchBodyComponent]\n})\nexport class ProductSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,yBAAyB,GAAG,GAAG;AACrC,MAAM,gBAAgB,GAAG,GAAG;MAUf,0BAA0B,CAAA;;IAkCnC,WAAA,CACY,cAA6B,EACpB,IAAuB,EAAA;QADhC,IAAA,CAAA,cAAc,GAAd,cAAc;QACL,IAAA,CAAA,IAAI,GAAJ,IAAI;;QAjCzB,IAAA,CAAA,kBAAkB,GAAG,IAAI;;QAQzB,IAAA,CAAA,aAAa,GAAG,KAAK;;AAIZ,QAAA,IAAA,CAAA,cAAc,GAAwB,IAAI,YAAY,EAAS;;AAI/D,QAAA,IAAA,CAAA,WAAW,GAAuB,IAAI,YAAY,EAAQ;;QAGhD,IAAA,CAAA,2BAA2B,GAAG,2BAA2B;;AAMpE,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAE;;QAGnC,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAMzD;;IAGH,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CACnB,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AAC7C,YAAA,MAAM,EAAE,UAAU,EAAE,GAAW,KAAK,CAAC,MAAM;AAC3C,YAAA,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAC/B,CAAC,CAAC,CACL;QAED,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,eAAe,EAAE;AACvD,QAAA,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC;IAC1B;;IAGA,WAAW,GAAA;AACP,QAAA,IAAI,CAAC,cAAc,CAAC,WAAW,EAAE;IACrC;;IAGA,UAAU,CAAC,IAAuB,EAAE,KA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ACF,wBAAA,qCAAqC,EAAE;AAC1C,qBAAA,EAAA,QAAA,EAAA,wuCAAA,EAAA;0zCA4C2D,4BAA4B,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;AE5E5F;;;AAGG;MAKU,mBAAmB,CAAA;8GAAnB,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,YAHlB,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAClD,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAEnD,mBAAmB,EAAA,OAAA,EAAA,CAHlB,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;;2FAGnD,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAJ/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B;AAC/D,iBAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-product-switch.mjs","sources":["../../../../libs/core/product-switch/product-switch-body/product-switch-body.component.ts","../../../../libs/core/product-switch/product-switch-body/product-switch-body.component.html","../../../../libs/core/product-switch/product-switch-button.directive.ts","../../../../libs/core/product-switch/tokens.ts","../../../../libs/core/product-switch/product-switch/product-switch.component.ts","../../../../libs/core/product-switch/product-switch/product-switch.component.html","../../../../libs/core/product-switch/product-switch.module.ts","../../../../libs/core/product-switch/fundamental-ngx-core-product-switch.ts"],"sourcesContent":["import { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n inject,\n Input,\n OnDestroy,\n OnInit,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { FdDropEvent, KeyUtil, RtlService } from '@fundamental-ngx/cdk/utils';\n\nimport { DndItemDirective, DndListDirective } from '@fundamental-ngx/cdk/utils';\nimport { AvatarComponent } from '@fundamental-ngx/core/avatar';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconComponent } from '@fundamental-ngx/core/icon';\nimport { ProductSwitchItem } from './product-switch.item';\n\nconst containerWidthPxSmallMode = 588;\nconst containerWidthPx = 776;\n\n@Component({\n selector: 'fd-product-switch-body',\n templateUrl: './product-switch-body.component.html',\n styleUrls: ['./product-switch-body.component.scss', '../../../cdk/utils/drag-and-drop/drag-and-drop.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [DndItemDirective, DndListDirective, IconComponent, AvatarComponent]\n})\nexport class ProductSwitchBodyComponent implements OnInit, OnDestroy {\n /** Defines if drag and drop functionality should be included in product switch*/\n @Input()\n dragAndDropEnabled = true;\n\n /** The product switch's product items. */\n @Input()\n products: ProductSwitchItem[];\n\n /** Defines if the product switcher should be displayed in list mode, no matter what is the size of window */\n @Input()\n forceListMode = false;\n\n /** Event thrown on products array change */\n @Output()\n readonly productsChange: EventEmitter<any[]> = new EventEmitter<any[]>();\n\n /** Event emitted on product click */\n @Output()\n readonly itemClicked: EventEmitter<void> = new EventEmitter<void>();\n\n /** @hidden */\n protected readonly FD_DEFAULT_ICON_FONT_FAMILY = FD_DEFAULT_ICON_FONT_FAMILY;\n\n /** @hidden */\n private _listMode: boolean;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n private _rtlService = inject(RtlService, { optional: true });\n\n /** @hidden */\n constructor(\n private _viewportRuler: ViewportRuler,\n private readonly _cdr: ChangeDetectorRef\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscriptions.add(\n this._viewportRuler.change().subscribe((event) => {\n const { innerWidth } = <Window>event.target;\n this._checkSize(innerWidth);\n })\n );\n\n const { width } = this._viewportRuler.getViewportSize();\n this._checkSize(width);\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n\n /** @hidden */\n _itemClick(item: ProductSwitchItem, event: MouseEvent): void {\n this.products.forEach((product) => (product.selected = product === item));\n\n this.itemClicked.emit();\n if (item.callback) {\n item.callback(event);\n }\n }\n\n /** Method called on products change */\n _productSwitchItemsChangeHandle(dropEvent: FdDropEvent<ProductSwitchItem>): void {\n this.productsChange.emit(dropEvent.items);\n this.products = dropEvent.items;\n }\n\n /** @hidden */\n _keyDownHandle(event: KeyboardEvent): void {\n const target = <HTMLElement>event.target;\n\n if (!KeyUtil.isKeyCode(event, TAB)) {\n event.preventDefault();\n }\n\n if (KeyUtil.isKeyCode(event, [ENTER, SPACE])) {\n target.click();\n } else if (!this._isListMode()) {\n const i = Array.from(target.parentElement?.children ?? []).indexOf(target);\n this._handleNoListKeydown(event, target, i);\n } else if (this._isListMode() && KeyUtil.isKeyCode(event, [DOWN_ARROW, UP_ARROW])) {\n this._handleListArrowUpDown(event, target);\n }\n }\n\n /** @hidden */\n _isSmallMode(): boolean {\n return this.products?.length < 7;\n }\n\n /** @hidden */\n _isListMode(): boolean {\n return this._listMode || this.forceListMode;\n }\n\n /** @hidden */\n private _checkSize(width: number): void {\n if (this._isSmallMode()) {\n this._listMode = width < containerWidthPxSmallMode;\n } else {\n this._listMode = width < containerWidthPx;\n }\n\n this._cdr.markForCheck();\n }\n\n /** @hidden */\n private _handleNoListKeydown(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const previousElementSibling = <HTMLElement>target.previousElementSibling;\n const nextElementSibling = <HTMLElement>target.nextElementSibling;\n\n if (\n i === this.products.length - 1 &&\n (KeyUtil.isKeyCode(event, RIGHT_ARROW) || (KeyUtil.isKeyCode(event, LEFT_ARROW) && this._rtlService?.rtl()))\n ) {\n while (<HTMLElement>target.previousElementSibling) {\n target = <HTMLElement>target.previousElementSibling;\n }\n target.focus();\n }\n\n if (KeyUtil.isKeyCode(event, LEFT_ARROW)) {\n this._rtlService?.rtl() ? nextElementSibling?.focus() : previousElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, RIGHT_ARROW)) {\n this._rtlService?.rtl() ? previousElementSibling?.focus() : nextElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, [DOWN_ARROW, UP_ARROW])) {\n if (this.products.length >= 7) {\n this._handleNoListMoreThanSeven(event, target, i);\n } else if (this.products.length < 7) {\n this._handleNoListLessThanSeven(event, target, i);\n }\n }\n }\n\n /** @hidden */\n private _handleNoListMoreThanSeven(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const nextIndexByColumn = 4;\n const children = target.parentElement?.children;\n\n if (!children) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n (<HTMLElement>children[i + nextIndexByColumn])?.focus();\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n (<HTMLElement>children[i - nextIndexByColumn])?.focus();\n }\n }\n\n /** @hidden */\n private _handleNoListLessThanSeven(event: KeyboardEvent, target: HTMLElement, i: number): void {\n const nextIndexByColumn = 3;\n const children = target.parentElement?.children;\n\n if (!children) {\n return;\n }\n\n if (KeyUtil.isKeyCode(event, DOWN_ARROW)) {\n (<HTMLElement>children[i + nextIndexByColumn])?.focus();\n }\n\n if (KeyUtil.isKeyCode(event, UP_ARROW)) {\n (<HTMLElement>children[i - nextIndexByColumn])?.focus();\n }\n }\n\n /** @hidden */\n private _handleListArrowUpDown(event: KeyboardEvent, target: HTMLElement): void {\n const targetIndex = Array.from(target.parentElement?.children ?? []).indexOf(target);\n const previousElementSibling =\n targetIndex === 0\n ? <HTMLElement>target.parentElement?.children[this.products.length - 1]\n : <HTMLElement>target.previousElementSibling;\n const nextElementSibling =\n targetIndex === this.products.length - 1\n ? <HTMLElement>target.parentElement?.children[0]\n : <HTMLElement>target.nextElementSibling;\n\n if (this._isListMode() && KeyUtil.isKeyCode(event, DOWN_ARROW) && nextElementSibling) {\n nextElementSibling.focus();\n } else if (this._isListMode() && KeyUtil.isKeyCode(event, UP_ARROW) && previousElementSibling) {\n previousElementSibling.focus();\n }\n }\n}\n","<div\n class=\"fd-product-switch__body\"\n [class.fd-product-switch__body--col-3]=\"_isSmallMode() && !_isListMode()\"\n [class.fd-product-switch__body--mobile]=\"_isListMode()\"\n>\n <ul\n fd-dnd-list\n class=\"fd-product-switch__list\"\n [items]=\"products\"\n [gridMode]=\"!_isListMode()\"\n (itemDropped)=\"_productSwitchItemsChangeHandle($event)\"\n >\n @for (product of products; track product) {\n <li\n fd-dnd-item\n tabindex=\"0\"\n class=\"fd-product-switch__item\"\n [class.selected]=\"product.selected\"\n (keydown)=\"_keyDownHandle($event)\"\n (click)=\"_itemClick(product, $event)\"\n [draggable]=\"!product.disabledDragAndDrop && dragAndDropEnabled\"\n [stickInPlace]=\"!!product.stickToPosition\"\n >\n @if (product.avatar) {\n <fd-avatar\n size=\"s\"\n [glyph]=\"product.avatar.glyph ?? null\"\n [label]=\"product.avatar.label ?? null\"\n [circle]=\"!!product.avatar.circle\"\n [image]=\"product.avatar.image ?? null\"\n [contain]=\"!!product.avatar.contain\"\n [transparent]=\"!!product.avatar.transparent\"\n [placeholder]=\"!!product.avatar.placeholder\"\n [tile]=\"!!product.avatar.tile\"\n [colorAccent]=\"product.avatar.colorAccent\"\n [colorIndication]=\"product.avatar.colorIndication\"\n [border]=\"!!product.avatar.border\"\n [alterIcon]=\"product.avatar.alterIcon ?? null\"\n [backupImage]=\"product.avatar.backupImage ?? null\"\n [ariaLabel]=\"product.avatar.ariaLabel ?? null\"\n >\n </fd-avatar>\n } @else {\n <fd-icon\n [font]=\"product.font || FD_DEFAULT_ICON_FONT_FAMILY\"\n role=\"presentation\"\n class=\"fd-product-switch__icon\"\n [glyph]=\"product.icon\"\n ></fd-icon>\n }\n\n <div class=\"fd-product-switch__text\">\n <div class=\"fd-product-switch__title\">{{ product.title }}</div>\n @if (product.subtitle) {\n <div class=\"fd-product-switch__subtitle\">{{ product.subtitle }}</div>\n }\n </div>\n </li>\n }\n </ul>\n</div>\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({\n selector: '[fdProductSwitchButton]',\n standalone: true\n})\nexport class ProductSwitchButtonDirective {\n /** @hidden */\n constructor(readonly templateRef: TemplateRef<any>) {}\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const FD_PRODUCT_SWITCH_COMPONENT = new InjectionToken('FdProductSwitchComponent');\n","import { ChangeDetectionStrategy, Component, contentChild, input, model, output } from '@angular/core';\n\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ButtonComponent } from '@fundamental-ngx/core/button';\nimport {\n PopoverBodyComponent,\n PopoverComponent,\n PopoverConfig,\n PopoverControlComponent,\n TriggerConfig\n} from '@fundamental-ngx/core/popover';\nimport { Placement } from '@fundamental-ngx/core/shared';\nimport { FdTranslatePipe } from '@fundamental-ngx/i18n';\nimport { ProductSwitchButtonDirective } from '../product-switch-button.directive';\nimport { FD_PRODUCT_SWITCH_COMPONENT } from '../tokens';\n\n@Component({\n selector: 'fd-product-switch',\n templateUrl: './product-switch.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: FD_PRODUCT_SWITCH_COMPONENT,\n useExisting: ProductSwitchComponent\n }\n ],\n imports: [\n PopoverComponent,\n PopoverControlComponent,\n ButtonComponent,\n PopoverBodyComponent,\n FdTranslatePipe,\n NgTemplateOutlet\n ],\n host: {\n '[class.fd-popover-custom--disabled]': 'disabled()'\n }\n})\nexport class ProductSwitchComponent {\n /**\n * Configuration object for popover settings.\n * When provided, these settings will be merged with individual input properties.\n * Individual inputs take precedence over config object values.\n */\n readonly config = input<PopoverConfig>({});\n\n /** Placement of a popover. */\n readonly placement = input<Placement>('bottom-end');\n\n /** Whether the product switch is disabled. */\n readonly disabled = input(false);\n\n /** Whether the popover should close when the escape key is pressed. */\n readonly closeOnEscapeKey = input(true);\n\n /** Whether the popover should close when a click is made outside its boundaries. */\n readonly closeOnOutsideClick = input(true);\n\n /** Whether the popover should have an arrow. */\n readonly noArrow = input(true);\n\n /** Whether to wrap content with fd-scrollbar directive. */\n readonly disableScrollbar = input(false);\n\n /** The trigger events that will open/close the popover. */\n readonly triggers = input<(string | TriggerConfig)[]>(['click']);\n\n /** Whether the popover should be focusTrapped. */\n readonly focusTrapped = input(false);\n\n /** Whether the popover should automatically move focus into the trapped region. */\n readonly focusAutoCapture = input(false);\n\n /** Two-way binding for open state. */\n readonly isOpen = model(false);\n\n /** Event emitted right before the popover is being opened. */\n readonly beforeOpen = output<void>();\n\n /** @hidden */\n protected readonly customProductSwitchButton = contentChild(ProductSwitchButtonDirective);\n}\n","<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement()\"\n [closeOnEscapeKey]=\"closeOnEscapeKey()\"\n [closeOnOutsideClick]=\"closeOnOutsideClick()\"\n [(isOpen)]=\"isOpen\"\n [disabled]=\"disabled()\"\n [triggers]=\"triggers()\"\n [focusTrapped]=\"focusTrapped()\"\n [focusAutoCapture]=\"focusAutoCapture()\"\n [noArrow]=\"noArrow()\"\n [disableScrollbar]=\"disableScrollbar()\"\n >\n <fd-popover-control>\n @if (!customProductSwitchButton()) {\n <button\n fd-button\n [attr.aria-label]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n [attr.title]=\"'coreProductSwitch.ariaLabel' | fdTranslate\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n } @else {\n <ng-template [ngTemplateOutlet]=\"customProductSwitchButton()!.templateRef\"></ng-template>\n }\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ProductSwitchBodyComponent } from './product-switch-body/product-switch-body.component';\nimport { ProductSwitchComponent } from './product-switch/product-switch.component';\n\n/**\n * @deprecated\n * Use direct imports of `ProductSwitchComponent`, `ProductSwitchBodyComponent`\n */\n@NgModule({\n imports: [ProductSwitchComponent, ProductSwitchBodyComponent],\n exports: [ProductSwitchComponent, ProductSwitchBodyComponent]\n})\nexport class ProductSwitchModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAuBA,MAAM,yBAAyB,GAAG,GAAG;AACrC,MAAM,gBAAgB,GAAG,GAAG;MAUf,0BAA0B,CAAA;;IAkCnC,WAAA,CACY,cAA6B,EACpB,IAAuB,EAAA;QADhC,IAAA,CAAA,cAAc,GAAd,cAAc;QACL,IAAA,CAAA,IAAI,GAAJ,IAAI;;QAjCzB,IAAA,CAAA,kBAAkB,GAAG,IAAI;;QAQzB,IAAA,CAAA,aAAa,GAAG,KAAK;;AAIZ,QAAA,IAAA,CAAA,cAAc,GAAwB,IAAI,YAAY,EAAS;;AAI/D,QAAA,IAAA,CAAA,WAAW,GAAuB,IAAI,YAAY,EAAQ;;QAGhD,IAAA,CAAA,2BAA2B,GAAG,2BAA2B;;AAMpE,QAAA,IAAA,CAAA,cAAc,GAAG,IAAI,YAAY,EAAE;;QAGnC,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAMzD;;IAGH,QAAQ,GAAA;AACJ,QAAA,IAAI,CAAC,cAAc,CAAC,GAAG,CACnB,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;AAC7C,YAAA,MAAM,EAAE,UAAU,EAAE,GAAW,KAAK,CAAC,MAAM;A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2,10 +2,11 @@ import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
|
2
2
|
import { NgTemplateOutlet } from '@angular/common';
|
|
3
3
|
import * as i0 from '@angular/core';
|
|
4
4
|
import { Pipe, input, booleanAttribute, output, inject, ElementRef, computed, signal, effect, forwardRef, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
|
|
5
|
+
import { toSignal } from '@angular/core/rxjs-interop';
|
|
5
6
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
6
7
|
import { registerFormItemControl } from '@fundamental-ngx/core/form';
|
|
7
8
|
import { PopoverTriggerDirective, PopoverComponent } from '@fundamental-ngx/core/popover';
|
|
8
|
-
import { TranslationResolver,
|
|
9
|
+
import { TranslationResolver, FD_LANGUAGE, FdTranslatePipe } from '@fundamental-ngx/i18n';
|
|
9
10
|
|
|
10
11
|
const INDICATOR_PREFIX = 'fd-rating-indicator';
|
|
11
12
|
const INDICATOR_CLASSES = {
|
|
@@ -142,7 +143,9 @@ class RatingIndicatorComponent {
|
|
|
142
143
|
/** Computed display value - returns the current internal value */
|
|
143
144
|
this.displayValue = computed(() => this.internalValue(), ...(ngDevMode ? [{ debugName: "displayValue" }] : []));
|
|
144
145
|
/** @hidden Current language signal for i18n */
|
|
145
|
-
this.language = inject(
|
|
146
|
+
this.language = toSignal(inject(FD_LANGUAGE), {
|
|
147
|
+
initialValue: {}
|
|
148
|
+
});
|
|
146
149
|
/** @hidden Internal mutable value for CVA and computed display value */
|
|
147
150
|
this.internalValue = signal(0, ...(ngDevMode ? [{ debugName: "internalValue" }] : []));
|
|
148
151
|
/**
|
|
@@ -347,7 +350,7 @@ class RatingIndicatorComponent {
|
|
|
347
350
|
multi: true
|
|
348
351
|
},
|
|
349
352
|
registerFormItemControl(RatingIndicatorComponent)
|
|
350
|
-
], ngImport: i0, template: "<ng-template #zeroRate let-halves=\"halves\">\n <input\n [attr.aria-label]=\"('coreRatingIndicator.ariaLabelReset' | fdTranslate)()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (change)=\"onSelect(0)\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n name=\"rating-{{ ratingUID }}{{ halves ? '-halves' : '' }}\"\n [attr.checked]=\"displayValue() === 0 ? true : null\"\n value=\"0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\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\n class=\"fd-rating-indicator__container\"\n role=\"application\"\n [attr.aria-roledescription]=\"ariaRoledescription() || ('coreRatingIndicator.ariaRoleDescription' | fdTranslate)()\"\n>\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-template [ngTemplateOutlet]=\"zeroRate\"></ng-template>\n <!-- Available rate values -->\n @for (rate of rates(); track rate.id; let i = $index) {\n <input\n [attr.aria-label]=\"i | ratingStarLabel: rates().length : allowHalves() : language()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n [id]=\"rate.id\"\n name=\"rating-{{ ratingUID }}\"\n [value]=\"rate.value\"\n [attr.checked]=\"displayValue() === rate.value ? true : null\"\n (change)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n@if (showDynamicText()) {\n @if (displayAllRatings() && ratingItems().length) {\n <span [fdPopoverTrigger]=\"allRatingContent\" class=\"fd-rating-indicator__dynamic-text\">\n (<span [attr.aria-label]=\"('coreRatingIndicator.ariaLabelTotalRating' | fdTranslate)()\" fd-link>{{\n computedTotalRatings\n }}</span\n >)\n </span>\n } @else if (computedTotalRatings !== undefined && computedTotalRatings !== null) {\n <span class=\"fd-rating-indicator__dynamic-text\">({{ computedTotalRatings }})</span>\n } @else {\n <span class=\"fd-rating-indicator__dynamic-text\"\n >({{ displayValue() }} {{ dynamicTextIndicator() }} {{ indicatorCapacity() }})</span\n >\n }\n}\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n @for (rating of ratingItems(); track rating) {\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass()\">\n <div class=\"fd-rating-indicator__container\">\n @for (rate of rates(); track rate.id) {\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 @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n </div>\n ({{ rating.votes }})\n </div>\n }\n</fd-popover>\n", styles: [".fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin-block:.8125rem;margin-inline:0}.fd-rating-indicator--compact{margin-block:.5rem;margin-inline: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{border:0;border-radius:var(--fdRating_Indicator_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset,0)}.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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;opacity:.0001;padding-block:0;padding-inline:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) 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:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:0}.fd-rating-indicator__label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;float:left;height:var(--fontSize);opacity:1;-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons)}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{-webkit-box-sizing:inherit;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{-webkit-margin-end:0;margin-inline-end:0}.fd-rating-indicator__label:hover:before{opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);-webkit-transition:opacity .125s ease-in;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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{-webkit-box-sizing:inherit;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__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.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{-webkit-margin-end:.125rem;margin-inline-end:.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--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{-webkit-margin-end:0;margin-inline-end:0;overflow:hidden;width:calc(var(--fontSize)*.5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons);-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{-webkit-margin-end:0;margin-inline-end: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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.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: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-block:0;margin-inline:0;opacity:.0001;overflow:hidden;padding-block:0;padding-inline: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/*! Bundled license information:\n\nfundamental-styles/dist/rating-indicator.css:\n (*!\n * Fundamental Library Styles v0.40.1\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["config", "title", "trigger", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll", "placement", "maxWidth", "fillControlMode", "closeOnOutsideClick", "closeOnEscapeKey", "disabled", "triggers", "focusTrapped", "focusAutoCapture", "restoreFocusOnClose", "noArrow", "disableScrollbar", "appendTo", "placementContainer", "scrollStrategy", "cdkPositions", "applyOverlay", "additionalBodyClass", "additionalTriggerClass", "closeOnNavigation", "fixedPosition", "resizable", "isOpen"], outputs: ["triggerChange", "isOpenChange", "beforeOpen"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
353
|
+
], ngImport: i0, template: "<ng-template #zeroRate let-halves=\"halves\">\n <input\n [attr.aria-label]=\"'coreRatingIndicator.ariaLabelReset' | fdTranslate\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (change)=\"onSelect(0)\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n name=\"rating-{{ ratingUID }}{{ halves ? '-halves' : '' }}\"\n [attr.checked]=\"displayValue() === 0 ? true : null\"\n value=\"0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\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\n class=\"fd-rating-indicator__container\"\n role=\"application\"\n [attr.aria-roledescription]=\"ariaRoledescription() || ('coreRatingIndicator.ariaRoleDescription' | fdTranslate)\"\n>\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-template [ngTemplateOutlet]=\"zeroRate\"></ng-template>\n <!-- Available rate values -->\n @for (rate of rates(); track rate.id; let i = $index) {\n <input\n [attr.aria-label]=\"i | ratingStarLabel: rates().length : allowHalves() : language()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n [id]=\"rate.id\"\n name=\"rating-{{ ratingUID }}\"\n [value]=\"rate.value\"\n [attr.checked]=\"displayValue() === rate.value ? true : null\"\n (change)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n@if (showDynamicText()) {\n @if (displayAllRatings() && ratingItems().length) {\n <span [fdPopoverTrigger]=\"allRatingContent\" class=\"fd-rating-indicator__dynamic-text\">\n (<span [attr.aria-label]=\"'coreRatingIndicator.ariaLabelTotalRating' | fdTranslate\" fd-link>{{\n computedTotalRatings\n }}</span\n >)\n </span>\n } @else if (computedTotalRatings !== undefined && computedTotalRatings !== null) {\n <span class=\"fd-rating-indicator__dynamic-text\">({{ computedTotalRatings }})</span>\n } @else {\n <span class=\"fd-rating-indicator__dynamic-text\"\n >({{ displayValue() }} {{ dynamicTextIndicator() }} {{ indicatorCapacity() }})</span\n >\n }\n}\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n @for (rating of ratingItems(); track rating) {\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass()\">\n <div class=\"fd-rating-indicator__container\">\n @for (rate of rates(); track rate.id) {\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 @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n </div>\n ({{ rating.votes }})\n </div>\n }\n</fd-popover>\n", styles: [".fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin-block:.8125rem;margin-inline:0}.fd-rating-indicator--compact{margin-block:.5rem;margin-inline: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{border:0;border-radius:var(--fdRating_Indicator_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset,0)}.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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;opacity:.0001;padding-block:0;padding-inline:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) 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:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:0}.fd-rating-indicator__label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;float:left;height:var(--fontSize);opacity:1;-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons)}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{-webkit-box-sizing:inherit;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{-webkit-margin-end:0;margin-inline-end:0}.fd-rating-indicator__label:hover:before{opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);-webkit-transition:opacity .125s ease-in;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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{-webkit-box-sizing:inherit;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__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.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{-webkit-margin-end:.125rem;margin-inline-end:.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--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{-webkit-margin-end:0;margin-inline-end:0;overflow:hidden;width:calc(var(--fontSize)*.5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons);-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{-webkit-margin-end:0;margin-inline-end: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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.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: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-block:0;margin-inline:0;opacity:.0001;overflow:hidden;padding-block:0;padding-inline: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/*! Bundled license information:\n\nfundamental-styles/dist/rating-indicator.css:\n (*!\n * Fundamental Library Styles v0.40.1\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "component", type: PopoverComponent, selector: "fd-popover", inputs: ["config", "title", "trigger", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll", "placement", "maxWidth", "fillControlMode", "closeOnOutsideClick", "closeOnEscapeKey", "disabled", "triggers", "focusTrapped", "focusAutoCapture", "restoreFocusOnClose", "noArrow", "disableScrollbar", "appendTo", "placementContainer", "scrollStrategy", "cdkPositions", "applyOverlay", "additionalBodyClass", "additionalTriggerClass", "closeOnNavigation", "fixedPosition", "resizable", "isOpen"], outputs: ["triggerChange", "isOpenChange", "beforeOpen"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
351
354
|
}
|
|
352
355
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImport: i0, type: RatingIndicatorComponent, decorators: [{
|
|
353
356
|
type: Component,
|
|
@@ -363,7 +366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.1.0", ngImpor
|
|
|
363
366
|
'[attr.aria-label]': 'ariaLabel()',
|
|
364
367
|
'[attr.aria-labelledby]': 'ariaLabelledBy()',
|
|
365
368
|
'[attr.disabled]': 'disabled()'
|
|
366
|
-
}, template: "<ng-template #zeroRate let-halves=\"halves\">\n <input\n [attr.aria-label]=\"('coreRatingIndicator.ariaLabelReset' | fdTranslate)()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (change)=\"onSelect(0)\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n name=\"rating-{{ ratingUID }}{{ halves ? '-halves' : '' }}\"\n [attr.checked]=\"displayValue() === 0 ? true : null\"\n value=\"0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\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\n class=\"fd-rating-indicator__container\"\n role=\"application\"\n [attr.aria-roledescription]=\"ariaRoledescription() || ('coreRatingIndicator.ariaRoleDescription' | fdTranslate)()\"\n>\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-template [ngTemplateOutlet]=\"zeroRate\"></ng-template>\n <!-- Available rate values -->\n @for (rate of rates(); track rate.id; let i = $index) {\n <input\n [attr.aria-label]=\"i | ratingStarLabel: rates().length : allowHalves() : language()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n [id]=\"rate.id\"\n name=\"rating-{{ ratingUID }}\"\n [value]=\"rate.value\"\n [attr.checked]=\"displayValue() === rate.value ? true : null\"\n (change)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n@if (showDynamicText()) {\n @if (displayAllRatings() && ratingItems().length) {\n <span [fdPopoverTrigger]=\"allRatingContent\" class=\"fd-rating-indicator__dynamic-text\">\n (<span [attr.aria-label]=\"('coreRatingIndicator.ariaLabelTotalRating' | fdTranslate)()\" fd-link>{{\n computedTotalRatings\n }}</span\n >)\n </span>\n } @else if (computedTotalRatings !== undefined && computedTotalRatings !== null) {\n <span class=\"fd-rating-indicator__dynamic-text\">({{ computedTotalRatings }})</span>\n } @else {\n <span class=\"fd-rating-indicator__dynamic-text\"\n >({{ displayValue() }} {{ dynamicTextIndicator() }} {{ indicatorCapacity() }})</span\n >\n }\n}\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n @for (rating of ratingItems(); track rating) {\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass()\">\n <div class=\"fd-rating-indicator__container\">\n @for (rate of rates(); track rate.id) {\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 @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n </div>\n ({{ rating.votes }})\n </div>\n }\n</fd-popover>\n", styles: [".fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin-block:.8125rem;margin-inline:0}.fd-rating-indicator--compact{margin-block:.5rem;margin-inline: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{border:0;border-radius:var(--fdRating_Indicator_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset,0)}.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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;opacity:.0001;padding-block:0;padding-inline:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) 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:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:0}.fd-rating-indicator__label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;float:left;height:var(--fontSize);opacity:1;-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons)}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{-webkit-box-sizing:inherit;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{-webkit-margin-end:0;margin-inline-end:0}.fd-rating-indicator__label:hover:before{opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);-webkit-transition:opacity .125s ease-in;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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{-webkit-box-sizing:inherit;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__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.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{-webkit-margin-end:.125rem;margin-inline-end:.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--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{-webkit-margin-end:0;margin-inline-end:0;overflow:hidden;width:calc(var(--fontSize)*.5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons);-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{-webkit-margin-end:0;margin-inline-end: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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.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: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-block:0;margin-inline:0;opacity:.0001;overflow:hidden;padding-block:0;padding-inline: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/*! Bundled license information:\n\nfundamental-styles/dist/rating-indicator.css:\n (*!\n * Fundamental Library Styles v0.40.1\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"] }]
|
|
369
|
+
}, template: "<ng-template #zeroRate let-halves=\"halves\">\n <input\n [attr.aria-label]=\"'coreRatingIndicator.ariaLabelReset' | fdTranslate\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (change)=\"onSelect(0)\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n name=\"rating-{{ ratingUID }}{{ halves ? '-halves' : '' }}\"\n [attr.checked]=\"displayValue() === 0 ? true : null\"\n value=\"0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\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\n class=\"fd-rating-indicator__container\"\n role=\"application\"\n [attr.aria-roledescription]=\"ariaRoledescription() || ('coreRatingIndicator.ariaRoleDescription' | fdTranslate)\"\n>\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-template [ngTemplateOutlet]=\"zeroRate\"></ng-template>\n <!-- Available rate values -->\n @for (rate of rates(); track rate.id; let i = $index) {\n <input\n [attr.aria-label]=\"i | ratingStarLabel: rates().length : allowHalves() : language()\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled() || nonInteractive() || displayMode()\"\n [id]=\"rate.id\"\n name=\"rating-{{ ratingUID }}\"\n [value]=\"rate.value\"\n [attr.checked]=\"displayValue() === rate.value ? true : null\"\n (change)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n@if (showDynamicText()) {\n @if (displayAllRatings() && ratingItems().length) {\n <span [fdPopoverTrigger]=\"allRatingContent\" class=\"fd-rating-indicator__dynamic-text\">\n (<span [attr.aria-label]=\"'coreRatingIndicator.ariaLabelTotalRating' | fdTranslate\" fd-link>{{\n computedTotalRatings\n }}</span\n >)\n </span>\n } @else if (computedTotalRatings !== undefined && computedTotalRatings !== null) {\n <span class=\"fd-rating-indicator__dynamic-text\">({{ computedTotalRatings }})</span>\n } @else {\n <span class=\"fd-rating-indicator__dynamic-text\"\n >({{ displayValue() }} {{ dynamicTextIndicator() }} {{ indicatorCapacity() }})</span\n >\n }\n}\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n @for (rating of ratingItems(); track rating) {\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass()\">\n <div class=\"fd-rating-indicator__container\">\n @for (rate of rates(); track rate.id) {\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 @if (ratedIcon()) {\n <i class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon()\"></i>\n }\n @if (unratedIcon()) {\n <i class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon()\"></i>\n }\n </label>\n }\n </div>\n ({{ rating.votes }})\n </div>\n }\n</fd-popover>\n", styles: [".fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin-block:.8125rem;margin-inline:0}.fd-rating-indicator--compact{margin-block:.5rem;margin-inline: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{border:0;border-radius:var(--fdRating_Indicator_Border_Radius);-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset,0)}.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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;opacity:.0001;padding-block:0;padding-inline:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{-webkit-box-sizing:inherit;box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) 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:var(--sapContent_FocusColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);outline-offset:0}.fd-rating-indicator__label{border:0;-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:normal;margin-block:0;margin-inline:0;padding-block:0;padding-inline:0;-webkit-box-align:center;-ms-flex-align:center;align-items:center;float:left;height:var(--fontSize);opacity:1;-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons)}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{-webkit-box-sizing:inherit;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{-webkit-margin-end:0;margin-inline-end:0}.fd-rating-indicator__label:hover:before{opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);-webkit-transition:opacity .125s ease-in;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{border:0;-webkit-box-sizing:border-box;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:normal;margin-block:0;margin-inline:0;overflow:hidden;padding-block:0;padding-inline:0;text-overflow:ellipsis;white-space:nowrap;-webkit-margin-start:.5rem;margin-inline-start:.5rem}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{-webkit-box-sizing:inherit;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__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.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{-webkit-margin-end:.125rem;margin-inline-end:.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--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{-webkit-margin-end:0;margin-inline-end:0;overflow:hidden;width:calc(var(--fontSize)*.5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){-webkit-margin-end:var(--spacingBetweenIcons);margin-inline-end:var(--spacingBetweenIcons);-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-ms-flex-direction:row-reverse;flex-direction:row-reverse}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{-webkit-margin-end:0;margin-inline-end: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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .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.fd-rating-indicator--display-mode .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.fd-rating-indicator--non-interactive .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.fd-rating-indicator--non-interactive .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.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.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.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.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: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-block:0;margin-inline:0;opacity:.0001;overflow:hidden;padding-block:0;padding-inline: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/*! Bundled license information:\n\nfundamental-styles/dist/rating-indicator.css:\n (*!\n * Fundamental Library Styles v0.40.1\n * Copyright (c) 2025 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n *)\n*/\n"] }]
|
|
367
370
|
}], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabelledBy", required: false }] }], ariaRoledescription: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaRoledescription", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], displayMode: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayMode", required: false }] }], nonInteractive: [{ type: i0.Input, args: [{ isSignal: true, alias: "nonInteractive", required: false }] }], indicatorCapacity: [{ type: i0.Input, args: [{ isSignal: true, alias: "indicatorCapacity", required: false }] }], allowHalves: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowHalves", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], totalRatings: [{ type: i0.Input, args: [{ isSignal: true, alias: "totalRatings", required: false }] }], ratingAverage: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratingAverage", required: false }] }], ratings: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratings", required: false }] }], displayAllRatings: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayAllRatings", required: false }] }], ratedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "ratedIcon", required: false }] }], unratedIcon: [{ type: i0.Input, args: [{ isSignal: true, alias: "unratedIcon", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], dynamicTextIndicator: [{ type: i0.Input, args: [{ isSignal: true, alias: "dynamicTextIndicator", required: false }] }], showDynamicText: [{ type: i0.Input, args: [{ isSignal: true, alias: "showDynamicText", required: false }] }], ratingChanged: [{ type: i0.Output, args: ["ratingChanged"] }] } });
|
|
368
371
|
|
|
369
372
|
/**
|