@fundamental-ngx/core 0.43.28 → 0.43.29
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/combobox/combobox.module.d.ts +1 -1
- package/esm2020/action-sheet/action-sheet.component.mjs +1 -1
- package/esm2020/combobox/combobox.component.mjs +3 -3
- package/esm2020/combobox/combobox.module.mjs +8 -5
- package/esm2020/date-picker/date-picker.component.mjs +1 -1
- package/esm2020/datetime-picker/datetime-picker.component.mjs +1 -1
- package/esm2020/form/form-input-message-group/form-input-message-group.component.mjs +9 -3
- package/esm2020/multi-combobox/multi-combobox.component.mjs +3 -3
- package/esm2020/multi-combobox/multi-combobox.module.mjs +8 -5
- package/esm2020/multi-input/multi-input.component.mjs +3 -3
- package/esm2020/multi-input/multi-input.module.mjs +8 -5
- package/esm2020/nested-list/nested-list-popover/nested-list-popover.component.mjs +1 -1
- package/esm2020/overflow-layout/overflow-layout.component.mjs +1 -1
- package/esm2020/popover/popover.component.mjs +19 -9
- package/esm2020/product-switch/product-switch/product-switch.component.mjs +1 -1
- package/esm2020/progress-indicator/progress-indicator.component.mjs +1 -1
- package/esm2020/rating-indicator/components/rating-indicator.component.mjs +1 -1
- package/esm2020/select/select.component.mjs +1 -1
- package/esm2020/slider/slider.component.mjs +1 -1
- package/esm2020/step-input/step-input.component.mjs +1 -1
- package/esm2020/time-picker/time-picker.component.mjs +1 -1
- package/esm2020/token/tokenizer.component.mjs +1 -1
- package/esm2020/toolbar/toolbar.component.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-action-sheet.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-combobox.mjs +9 -6
- package/fesm2015/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-date-picker.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-datetime-picker.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-form.mjs +8 -2
- package/fesm2015/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-combobox.mjs +9 -6
- package/fesm2015/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-multi-input.mjs +9 -6
- package/fesm2015/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-nested-list.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-overflow-layout.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-overflow-layout.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-popover.mjs +18 -8
- package/fesm2015/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-product-switch.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-progress-indicator.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-progress-indicator.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-rating-indicator.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-select.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-slider.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-step-input.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-time-picker.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-token.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2015/fundamental-ngx-core-toolbar.mjs +1 -1
- package/fesm2015/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-action-sheet.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-action-sheet.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-combobox.mjs +9 -6
- package/fesm2020/fundamental-ngx-core-combobox.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-date-picker.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-datetime-picker.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-form.mjs +8 -2
- package/fesm2020/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-combobox.mjs +9 -6
- package/fesm2020/fundamental-ngx-core-multi-combobox.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-multi-input.mjs +9 -6
- package/fesm2020/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-nested-list.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-nested-list.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-overflow-layout.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-overflow-layout.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-popover.mjs +18 -8
- package/fesm2020/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-product-switch.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-product-switch.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-progress-indicator.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-progress-indicator.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-rating-indicator.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-select.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-slider.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-slider.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-step-input.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-step-input.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-time-picker.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-token.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2020/fundamental-ngx-core-toolbar.mjs +1 -1
- package/fesm2020/fundamental-ngx-core-toolbar.mjs.map +1 -1
- package/form/form-input-message-group/form-input-message-group.component.d.ts +5 -1
- package/fundamental-ngx-core-v0.43.29.tgz +0 -0
- package/multi-combobox/multi-combobox.module.d.ts +1 -1
- package/multi-input/multi-input.module.d.ts +1 -1
- package/package.json +3 -3
- package/popover/popover.component.d.ts +5 -1
- package/schematics/add-dependencies/index.js +4 -4
- package/fundamental-ngx-core-v0.43.28.tgz +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-product-switch.mjs","sources":["../../../../libs/core/src/lib/product-switch/tokens.ts","../../../../libs/core/src/lib/product-switch/product-switch/product-switch.component.ts","../../../../libs/core/src/lib/product-switch/product-switch/product-switch.component.html","../../../../libs/core/src/lib/product-switch/product-switch-body/product-switch-body.component.ts","../../../../libs/core/src/lib/product-switch/product-switch-body/product-switch-body.component.html","../../../../libs/core/src/lib/product-switch/product-switch.module.ts","../../../../libs/core/src/lib/product-switch/fundamental-ngx-core-product-switch.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const FD_PRODUCT_SWITCH_COMPONENT = new InjectionToken('FdProductSwitchComponent');\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Placement } from '@fundamental-ngx/core/shared';\nimport { BasePopoverClass } from '@fundamental-ngx/core/popover';\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})\nexport class ProductSwitchComponent extends BasePopoverClass {\n /** Placement of a popover. */\n @Input()\n placement: Placement = 'bottom-end';\n\n /**\n * @deprecated use i18n capabilities instead\n * Input to set the aria label */\n @Input()\n ariaLabel: string;\n\n /** Whether the product switch is disabled. */\n @Input()\n disabled = false;\n}\n","<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n [(isOpen)]=\"isOpen\"\n (isOpenChange)=\"isOpenChange.emit($event)\"\n [disabled]=\"disabled\"\n [triggers]=\"triggers\"\n [focusTrapped]=\"false\"\n [focusAutoCapture]=\"true\"\n [noArrow]=\"noArrow\"\n [disableScrollbar]=\"true\"\n >\n <fd-popover-control>\n <button\n fd-button\n [attr.aria-label]=\"ariaLabel || ('coreProductSwitch.ariaLabel' | fdTranslate)\"\n [attr.title]=\"ariaLabel || ('coreProductSwitch.ariaLabel' | fdTranslate)\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { Subscription } from 'rxjs';\n\nimport { FdDropEvent, RtlService } from '@fundamental-ngx/cdk/utils';\nimport { KeyUtil } from '@fundamental-ngx/cdk/utils';\n\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: [\n './product-switch-body.component.scss',\n '../../../../../cdk/src/lib/utils/drag-and-drop/drag-and-drop.scss'\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\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 private _listMode: boolean;\n\n /** @hidden */\n private _isRtl = false;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private _viewportRuler: ViewportRuler,\n @Optional() private readonly _rtlService: RtlService,\n private readonly _cdr: ChangeDetectorRef\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscriptions.add(this._rtlService?.rtl.subscribe((isRtl) => (this._isRtl = isRtl)));\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._isRtl))\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._isRtl ? nextElementSibling?.focus() : previousElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, RIGHT_ARROW)) {\n this._isRtl ? 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 <li\n fd-dnd-item\n *ngFor=\"let product of products\"\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 <i\n role=\"presentation\"\n class=\"fd-product-switch__icon\"\n [class]=\"product.icon ? 'sap-icon--' + product.icon : ''\"\n ></i>\n <div class=\"fd-product-switch__text\">\n <div class=\"fd-product-switch__title\">{{ product.title }}</div>\n <div *ngIf=\"product.subtitle\" class=\"fd-product-switch__subtitle\">{{ product.subtitle }}</div>\n </div>\n </li>\n </ul>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ProductSwitchComponent } from './product-switch/product-switch.component';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\nimport { CommonModule } from '@angular/common';\nimport { DragAndDropModule } from '@fundamental-ngx/cdk/utils';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { I18nModule } from '@fundamental-ngx/i18n';\nimport { ProductSwitchBodyComponent } from './product-switch-body/product-switch-body.component';\n\n@NgModule({\n imports: [PopoverModule, CommonModule, ButtonModule, DragAndDropModule, DragDropModule, I18nModule],\n declarations: [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":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;MAEa,2BAA2B,GAAG,IAAI,cAAc,CAAC,0BAA0B;;ACelF,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAX5D,IAAA,W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AAc,EAAE,UAAU,CAAC;AACnG,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAChE,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-product-switch.mjs","sources":["../../../../libs/core/src/lib/product-switch/tokens.ts","../../../../libs/core/src/lib/product-switch/product-switch/product-switch.component.ts","../../../../libs/core/src/lib/product-switch/product-switch/product-switch.component.html","../../../../libs/core/src/lib/product-switch/product-switch-body/product-switch-body.component.ts","../../../../libs/core/src/lib/product-switch/product-switch-body/product-switch-body.component.html","../../../../libs/core/src/lib/product-switch/product-switch.module.ts","../../../../libs/core/src/lib/product-switch/fundamental-ngx-core-product-switch.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const FD_PRODUCT_SWITCH_COMPONENT = new InjectionToken('FdProductSwitchComponent');\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport { Placement } from '@fundamental-ngx/core/shared';\nimport { BasePopoverClass } from '@fundamental-ngx/core/popover';\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})\nexport class ProductSwitchComponent extends BasePopoverClass {\n /** Placement of a popover. */\n @Input()\n placement: Placement = 'bottom-end';\n\n /**\n * @deprecated use i18n capabilities instead\n * Input to set the aria label */\n @Input()\n ariaLabel: string;\n\n /** Whether the product switch is disabled. */\n @Input()\n disabled = false;\n}\n","<div class=\"fd-product-switch\">\n <fd-popover\n [placement]=\"placement\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n [(isOpen)]=\"isOpen\"\n (isOpenChange)=\"isOpenChange.emit($event)\"\n [disabled]=\"disabled\"\n [triggers]=\"triggers\"\n [focusTrapped]=\"false\"\n [focusAutoCapture]=\"true\"\n [noArrow]=\"noArrow\"\n [disableScrollbar]=\"true\"\n >\n <fd-popover-control>\n <button\n fd-button\n [attr.aria-label]=\"ariaLabel || ('coreProductSwitch.ariaLabel' | fdTranslate)\"\n [attr.title]=\"ariaLabel || ('coreProductSwitch.ariaLabel' | fdTranslate)\"\n class=\"fd-shellbar__button\"\n glyph=\"grid\"\n fdType=\"transparent\"\n ></button>\n </fd-popover-control>\n <fd-popover-body>\n <ng-content></ng-content>\n </fd-popover-body>\n </fd-popover>\n</div>\n","import {\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n EventEmitter,\n Input,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n ViewEncapsulation\n} from '@angular/core';\nimport { DOWN_ARROW, ENTER, LEFT_ARROW, RIGHT_ARROW, SPACE, TAB, UP_ARROW } from '@angular/cdk/keycodes';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport { Subscription } from 'rxjs';\n\nimport { FdDropEvent, RtlService } from '@fundamental-ngx/cdk/utils';\nimport { KeyUtil } from '@fundamental-ngx/cdk/utils';\n\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: [\n './product-switch-body.component.scss',\n '../../../../../cdk/src/lib/utils/drag-and-drop/drag-and-drop.scss'\n ],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\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 private _listMode: boolean;\n\n /** @hidden */\n private _isRtl = false;\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n private _viewportRuler: ViewportRuler,\n @Optional() private readonly _rtlService: RtlService,\n private readonly _cdr: ChangeDetectorRef\n ) {}\n\n /** @hidden */\n ngOnInit(): void {\n this._subscriptions.add(this._rtlService?.rtl.subscribe((isRtl) => (this._isRtl = isRtl)));\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._isRtl))\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._isRtl ? nextElementSibling?.focus() : previousElementSibling?.focus();\n } else if (KeyUtil.isKeyCode(event, RIGHT_ARROW)) {\n this._isRtl ? 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 <li\n fd-dnd-item\n *ngFor=\"let product of products\"\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 <i\n role=\"presentation\"\n class=\"fd-product-switch__icon\"\n [class]=\"product.icon ? 'sap-icon--' + product.icon : ''\"\n ></i>\n <div class=\"fd-product-switch__text\">\n <div class=\"fd-product-switch__title\">{{ product.title }}</div>\n <div *ngIf=\"product.subtitle\" class=\"fd-product-switch__subtitle\">{{ product.subtitle }}</div>\n </div>\n </li>\n </ul>\n</div>\n","import { NgModule } from '@angular/core';\nimport { ProductSwitchComponent } from './product-switch/product-switch.component';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { ButtonModule } from '@fundamental-ngx/core/button';\nimport { CommonModule } from '@angular/common';\nimport { DragAndDropModule } from '@fundamental-ngx/cdk/utils';\nimport { DragDropModule } from '@angular/cdk/drag-drop';\nimport { I18nModule } from '@fundamental-ngx/i18n';\nimport { ProductSwitchBodyComponent } from './product-switch-body/product-switch-body.component';\n\n@NgModule({\n imports: [PopoverModule, CommonModule, ButtonModule, DragAndDropModule, DragDropModule, I18nModule],\n declarations: [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":["i1","i2","i3"],"mappings":";;;;;;;;;;;;;;;;;MAEa,2BAA2B,GAAG,IAAI,cAAc,CAAC,0BAA0B;;ACelF,MAAO,sBAAuB,SAAQ,gBAAgB,CAAA;AAX5D,IAAA,WAAA,GAAA;;;QAcI,IAAS,CAAA,SAAA,GAAc,YAAY,CAAC;;QAUpC,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AACpB,KAAA;;mHAdY,sBAAsB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,sBAAsB,EAPpB,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,SAAA,EAAA,WAAA,EAAA,SAAA,EAAA,WAAA,EAAA,QAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA;AACP,QAAA;AACI,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AAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAnB,mBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,mBAAmB,iBAHb,sBAAsB,EAAE,0BAA0B,CADvD,EAAA,OAAA,EAAA,CAAA,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,CAExF,EAAA,OAAA,EAAA,CAAA,sBAAsB,EAAE,0BAA0B,CAAA,EAAA,CAAA,CAAA;iHAEnD,mBAAmB,EAAA,OAAA,EAAA,CAJlB,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,CAAA,EAAA,CAAA,CAAA;2FAIzF,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAL/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,aAAa,EAAE,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,CAAC;AACnG,oBAAA,YAAY,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAClE,oBAAA,OAAO,EAAE,CAAC,sBAAsB,EAAE,0BAA0B,CAAC;AAChE,iBAAA,CAAA;;;ACdD;;AAEG;;;;"}
|
|
@@ -63,7 +63,7 @@ class ProgressIndicatorComponent {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
ProgressIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProgressIndicatorComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
66
|
-
ProgressIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProgressIndicatorComponent, selector: "fd-progress-indicator", inputs: { valueText: "valueText", unit: "unit", valueMin: "valueMin", valueMax: "valueMax", valueNow: "valueNow", state: "state", animate: "animate" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"fd-progress-indicator\"\n tabindex=\"-1\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"valueMin\"\n [attr.aria-valuenow]=\"valueNow\"\n [attr.aria-valuemax]=\"valueMax\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-label]=\"valueText\"\n [class]=\"state ? 'fd-progress-indicator--' + state : ''\"\n>\n <ng-container *ngIf=\"!hasPopover\">\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasPopover\">\n <fd-popover [style.width.%]=\"100\" [noArrow]=\"false\" #popover>\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <div class=\"fd-popover__wrapper\">\n <div class=\"fd-progress-indicator__overflow\">\n <span>{{ valueText }}</span>\n <span class=\"fd-progress-indicator__overflow-close\" (click)=\"popover.close()\">\n <i class=\"sap-icon sap-icon--decline\"></i>\n </span>\n </div>\n </div>\n </fd-popover-body>\n </fd-popover>\n </ng-container>\n</div>\n\n<ng-template #indicatorContainer>\n <div\n class=\"fd-progress-indicator__container\"\n *ngIf=\"calculateProgressBarWidth() === 0 || calculateProgressBarWidth() as progressBarWidth\"\n >\n <div\n *ngIf=\"progressBarWidth > 0\"\n class=\"fd-progress-indicator__progress-bar\"\n [class.fd-progress-indicator__progress-bar--animated]=\"animate\"\n [style.min-width.%]=\"progressBarWidth\"\n [style.width.%]=\"progressBarWidth\"\n >\n <ng-container *ngIf=\"progressBarWidth > 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n <div class=\"fd-progress-indicator__remaining\" [style.min-width]=\"0\">\n <ng-container *ngIf=\"progressBarWidth <= 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #progressBarLabel>\n <span class=\"fd-progress-indicator__icon\" *ngIf=\"state\"></span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"!valueText\"> {{ valueNow }}% </span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"valueText\">\n {{ valueText }}\n </span>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-progress-indicator{--rootMargin:.5rem 0;--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Neutral);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Neutral,transparent);--progressBarBorderRightColor:var(--fdProgress_Indicator_Border_Right_Color,var(--progressBarBorderColor));--containerBackground:var(--fdProgress_Indicator_Container_Background_Neutral,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Neutral,var(--sapField_BorderColor));--iconDisplay:none;--iconContent:\"\";--labelMarginStart:var(--fdProgress_Indicator_Label_Margin_Start);--labelMarginEnd:var(--fdProgress_Indicator_Label_Margin_End);-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Height);line-height:var(--sapContent_LineHeight);margin:0;margin:var(--rootMargin);padding:0;padding:var(--fdProgress_Indicator_Container_Margin);width:100%}.fd-progress-indicator:after,.fd-progress-indicator:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator.fd-popover{margin:var(--rootMargin)}.fd-progress-indicator--mobile{--rootMargin:.875rem 0}.fd-progress-indicator--display,.fd-progress-indicator--display.fd-popover{margin:0}.fd-progress-indicator--informative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Informative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Informative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Informative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Informative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Informative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Informative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--positive{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Positive);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Positive,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Positive,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Positive,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Positive);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Positive,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--negative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Negative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Negative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Negative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Negative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Negative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Negative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--critical{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Critical);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Critical,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Critical,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Critical,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Critical);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Critical,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator__container{-webkit-box-sizing:border-box;background:var(--containerBackground);border:0;border:.0625rem solid var(--containerBorderColor);border-radius:.5rem;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Container_Height);line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdProgress_Indicator_Container_Height);min-width:4rem;overflow:var(--fdProgress_Indicator_Container_Overflow);padding:0;position:var(--fdProgress_Indicator_Container_Position, static);width:var(--fdProgress_Indicator_Container_Width)}.fd-progress-indicator__container:after,.fd-progress-indicator__container:before{-webkit-box-sizing:inherit;background-color:var(--progressBarBackground);border-radius:50%;box-sizing:inherit;content:\"\";display:var(--fdProgress_Indicator_Progress_Bar_Boundary_Display, none);font-size:inherit;height:.25rem;position:absolute;top:0;width:.25rem}.fd-progress-indicator__container:before{left:0}.fd-progress-indicator__container:after{right:0}.fd-progress-indicator[aria-valuenow=\"0\"] .fd-progress-indicator__progress-bar{border:none}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{right:var(--fdProgress_Indicator_Progress_Bar_Position_Left);width:auto!important}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar[dir=rtl],.fd-progress-indicator__progress-bar,[dir=rtl] .fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{left:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__progress-bar{-webkit-box-sizing:border-box;-webkit-box-pack:end;-ms-flex-pack:end;background:var(--progressBarBackground);border:0;border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-radius:var(--fdProgress_Indicator_Progress_Bar_Border_Radius);border-right:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);bottom:var(--fdProgress_Indicator_Progress_Bar_Position_Bottom);box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Progress_Bar_Height);justify-content:flex-end;line-height:var(--sapContent_LineHeight);margin:0;margin:var(--fdProgress_Indicator_Progress_Bar_Margin);padding:0;position:var(--fdProgress_Indicator_Progress_Bar_Position, static)}.fd-progress-indicator__progress-bar:after,.fd-progress-indicator__progress-bar:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__progress-bar.fd-popover__control{border:var(--fdProgress_Indicator_Progress_Bar_Popover_Control_Border, 0 solid) var(--progressBarBorderColor);position:var(--fdProgress_Indicator_Progress_Bar_Position, relative)}.fd-progress-indicator__progress-bar .fd-progress-indicator__label{color:var(--fdProgress_Indicator_Label_Color_Contrast)}.fd-progress-indicator__progress-bar[dir=rtl],[dir=rtl] .fd-progress-indicator__progress-bar{border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-left:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);border-right:none;left:auto;right:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__remaining{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-progress-indicator__remaining:after,.fd-progress-indicator__remaining:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__remaining.fd-popover__control{flex-grow:1;min-width:0}.fd-progress-indicator__icon{bottom:-.625rem;display:var(--iconDisplay);margin-left:var(--fdProgress_Indicator_Label_Margin_Start);margin-right:var(--fdProgress_Icon_Space_Before_Label);position:var(--fdProgress_Indicator_Icon_Position, static);right:-1.25rem}.fd-progress-indicator__icon[dir=rtl],[dir=rtl] .fd-progress-indicator__icon{left:-1.25rem;margin-left:var(--fdProgress_Icon_Space_Before_Label);margin-right:var(--fdProgress_Indicator_Label_Margin_Start);right:auto}.fd-progress-indicator__icon:before{color:var(--iconColor);content:var(--iconContent);font-family:SAP-icons;font-size:var(--fdProgress_Indicator_Icon_Font_Size);vertical-align:middle}.fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:0}.fd-progress-indicator__icon+.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:inherit;margin-right:0}.fd-progress-indicator__label{-webkit-box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdProgress_Indicator_Label_Color);display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--fdProgress_Indicator_Label_Font_Size);font-weight:400;forced-color-adjust:none;left:0;line-height:var(--sapContent_LineHeight);line-height:normal;margin:0;margin-left:var(--labelMarginStart);margin-right:var(--labelMarginEnd);max-width:100%;overflow:hidden;padding:0;position:var(--fdProgress_Indicator_Label_Position, static);text-overflow:ellipsis;top:-1.25rem;user-select:none;white-space:nowrap}.fd-progress-indicator__label:after,.fd-progress-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__label{left:auto;margin-left:var(--labelMarginEnd);margin-right:var(--labelMarginStart);right:0}.fd-progress-indicator__overflow{-webkit-box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:space-between;line-height:var(--sapContent_LineHeight);margin:0;max-width:95vw;overflow:hidden;padding:0 0 0 .5rem;white-space:normal}.fd-progress-indicator__overflow:after,.fd-progress-indicator__overflow:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow{padding-left:0;padding-right:.5rem}.fd-progress-indicator__overflow-close{-webkit-box-sizing:border-box;background:transparent;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:1.375rem;line-height:var(--sapContent_LineHeight);line-height:1.6rem;margin:.125rem;padding:0;text-align:center;width:1.4375rem}.fd-progress-indicator__overflow-close:after,.fd-progress-indicator__overflow-close:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow-close[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow-close{margin-left:0;margin-right:.5rem}.fd-progress-indicator__overflow-close.is-focus,.fd-progress-indicator__overflow-close:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);z-index:5}.fd-progress-indicator__overflow-close [class*=sap-icon]{color:var(--sapContent_IconColor);font-size:var(--sapFontSmallSize)}.fd-progress-indicator__progress-bar--animated{transition:min-width .5s ease-in-out,width .5s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
66
|
+
ProgressIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: ProgressIndicatorComponent, selector: "fd-progress-indicator", inputs: { valueText: "valueText", unit: "unit", valueMin: "valueMin", valueMax: "valueMax", valueNow: "valueNow", state: "state", animate: "animate" }, usesOnChanges: true, ngImport: i0, template: "<div\n class=\"fd-progress-indicator\"\n tabindex=\"-1\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"valueMin\"\n [attr.aria-valuenow]=\"valueNow\"\n [attr.aria-valuemax]=\"valueMax\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-label]=\"valueText\"\n [class]=\"state ? 'fd-progress-indicator--' + state : ''\"\n>\n <ng-container *ngIf=\"!hasPopover\">\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasPopover\">\n <fd-popover [style.width.%]=\"100\" [noArrow]=\"false\" #popover>\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <div class=\"fd-popover__wrapper\">\n <div class=\"fd-progress-indicator__overflow\">\n <span>{{ valueText }}</span>\n <span class=\"fd-progress-indicator__overflow-close\" (click)=\"popover.close()\">\n <i class=\"sap-icon sap-icon--decline\"></i>\n </span>\n </div>\n </div>\n </fd-popover-body>\n </fd-popover>\n </ng-container>\n</div>\n\n<ng-template #indicatorContainer>\n <div\n class=\"fd-progress-indicator__container\"\n *ngIf=\"calculateProgressBarWidth() === 0 || calculateProgressBarWidth() as progressBarWidth\"\n >\n <div\n *ngIf=\"progressBarWidth > 0\"\n class=\"fd-progress-indicator__progress-bar\"\n [class.fd-progress-indicator__progress-bar--animated]=\"animate\"\n [style.min-width.%]=\"progressBarWidth\"\n [style.width.%]=\"progressBarWidth\"\n >\n <ng-container *ngIf=\"progressBarWidth > 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n <div class=\"fd-progress-indicator__remaining\" [style.min-width]=\"0\">\n <ng-container *ngIf=\"progressBarWidth <= 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #progressBarLabel>\n <span class=\"fd-progress-indicator__icon\" *ngIf=\"state\"></span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"!valueText\"> {{ valueNow }}% </span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"valueText\">\n {{ valueText }}\n </span>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-progress-indicator{--rootMargin:.5rem 0;--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Neutral);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Neutral,transparent);--progressBarBorderRightColor:var(--fdProgress_Indicator_Border_Right_Color,var(--progressBarBorderColor));--containerBackground:var(--fdProgress_Indicator_Container_Background_Neutral,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Neutral,var(--sapField_BorderColor));--iconDisplay:none;--iconContent:\"\";--labelMarginStart:var(--fdProgress_Indicator_Label_Margin_Start);--labelMarginEnd:var(--fdProgress_Indicator_Label_Margin_End);-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Height);line-height:var(--sapContent_LineHeight);margin:0;margin:var(--rootMargin);padding:0;padding:var(--fdProgress_Indicator_Container_Margin);width:100%}.fd-progress-indicator:after,.fd-progress-indicator:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator.fd-popover{margin:var(--rootMargin)}.fd-progress-indicator--mobile{--rootMargin:.875rem 0}.fd-progress-indicator--display,.fd-progress-indicator--display.fd-popover{margin:0}.fd-progress-indicator--informative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Informative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Informative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Informative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Informative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Informative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Informative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--positive{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Positive);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Positive,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Positive,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Positive,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Positive);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Positive,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--negative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Negative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Negative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Negative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Negative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Negative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Negative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--critical{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Critical);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Critical,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Critical,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Critical,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Critical);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Critical,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator__container{-webkit-box-sizing:border-box;background:var(--containerBackground);border:0;border:.0625rem solid var(--containerBorderColor);border-radius:.5rem;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Container_Height);line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdProgress_Indicator_Container_Height);min-width:4rem;overflow:var(--fdProgress_Indicator_Container_Overflow);padding:0;position:var(--fdProgress_Indicator_Container_Position, static);width:var(--fdProgress_Indicator_Container_Width)}.fd-progress-indicator__container:after,.fd-progress-indicator__container:before{-webkit-box-sizing:inherit;background-color:var(--progressBarBackground);border-radius:50%;box-sizing:inherit;content:\"\";display:var(--fdProgress_Indicator_Progress_Bar_Boundary_Display, none);font-size:inherit;height:.25rem;position:absolute;top:0;width:.25rem}.fd-progress-indicator__container:before{left:0}.fd-progress-indicator__container:after{right:0}.fd-progress-indicator[aria-valuenow=\"0\"] .fd-progress-indicator__progress-bar{border:none}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{right:var(--fdProgress_Indicator_Progress_Bar_Position_Left);width:auto!important}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar[dir=rtl],.fd-progress-indicator__progress-bar,[dir=rtl] .fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{left:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__progress-bar{-webkit-box-sizing:border-box;-webkit-box-pack:end;-ms-flex-pack:end;background:var(--progressBarBackground);border:0;border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-radius:var(--fdProgress_Indicator_Progress_Bar_Border_Radius);border-right:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);bottom:var(--fdProgress_Indicator_Progress_Bar_Position_Bottom);box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Progress_Bar_Height);justify-content:flex-end;line-height:var(--sapContent_LineHeight);margin:0;margin:var(--fdProgress_Indicator_Progress_Bar_Margin);padding:0;position:var(--fdProgress_Indicator_Progress_Bar_Position, static)}.fd-progress-indicator__progress-bar:after,.fd-progress-indicator__progress-bar:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__progress-bar.fd-popover__control{border:var(--fdProgress_Indicator_Progress_Bar_Popover_Control_Border, 0 solid) var(--progressBarBorderColor);position:var(--fdProgress_Indicator_Progress_Bar_Position, relative)}.fd-progress-indicator__progress-bar .fd-progress-indicator__label{color:var(--fdProgress_Indicator_Label_Color_Contrast)}.fd-progress-indicator__progress-bar[dir=rtl],[dir=rtl] .fd-progress-indicator__progress-bar{border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-left:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);border-right:none;left:auto;right:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__remaining{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-progress-indicator__remaining:after,.fd-progress-indicator__remaining:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__remaining.fd-popover__control{flex-grow:1;min-width:0}.fd-progress-indicator__icon{bottom:-.625rem;display:var(--iconDisplay);margin-left:var(--fdProgress_Indicator_Label_Margin_Start);margin-right:var(--fdProgress_Icon_Space_Before_Label);position:var(--fdProgress_Indicator_Icon_Position, static);right:-1.25rem}.fd-progress-indicator__icon[dir=rtl],[dir=rtl] .fd-progress-indicator__icon{left:-1.25rem;margin-left:var(--fdProgress_Icon_Space_Before_Label);margin-right:var(--fdProgress_Indicator_Label_Margin_Start);right:auto}.fd-progress-indicator__icon:before{color:var(--iconColor);content:var(--iconContent);font-family:SAP-icons;font-size:var(--fdProgress_Indicator_Icon_Font_Size);vertical-align:middle}.fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:0}.fd-progress-indicator__icon+.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:inherit;margin-right:0}.fd-progress-indicator__label{-webkit-box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdProgress_Indicator_Label_Color);display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--fdProgress_Indicator_Label_Font_Size);font-weight:400;forced-color-adjust:none;left:0;line-height:var(--sapContent_LineHeight);line-height:normal;margin:0;margin-left:var(--labelMarginStart);margin-right:var(--labelMarginEnd);max-width:100%;overflow:hidden;padding:0;position:var(--fdProgress_Indicator_Label_Position, static);text-overflow:ellipsis;top:-1.25rem;user-select:none;white-space:nowrap}.fd-progress-indicator__label:after,.fd-progress-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__label{left:auto;margin-left:var(--labelMarginEnd);margin-right:var(--labelMarginStart);right:0}.fd-progress-indicator__overflow{-webkit-box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:space-between;line-height:var(--sapContent_LineHeight);margin:0;max-width:95vw;overflow:hidden;padding:0 0 0 .5rem;white-space:normal}.fd-progress-indicator__overflow:after,.fd-progress-indicator__overflow:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow{padding-left:0;padding-right:.5rem}.fd-progress-indicator__overflow-close{-webkit-box-sizing:border-box;background:transparent;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:1.375rem;line-height:var(--sapContent_LineHeight);line-height:1.6rem;margin:.125rem;padding:0;text-align:center;width:1.4375rem}.fd-progress-indicator__overflow-close:after,.fd-progress-indicator__overflow-close:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow-close[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow-close{margin-left:0;margin-right:.5rem}.fd-progress-indicator__overflow-close.is-focus,.fd-progress-indicator__overflow-close:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);z-index:5}.fd-progress-indicator__overflow-close [class*=sap-icon]{color:var(--sapContent_IconColor);font-size:var(--sapFontSmallSize)}.fd-progress-indicator__progress-bar--animated{transition:min-width .5s ease-in-out,width .5s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverControlComponent, selector: "fd-popover-control" }, { kind: "component", type: i2.PopoverBodyComponent, selector: "fd-popover-body" }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
67
67
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: ProgressIndicatorComponent, decorators: [{
|
|
68
68
|
type: Component,
|
|
69
69
|
args: [{ selector: 'fd-progress-indicator', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n class=\"fd-progress-indicator\"\n tabindex=\"-1\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"valueMin\"\n [attr.aria-valuenow]=\"valueNow\"\n [attr.aria-valuemax]=\"valueMax\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-label]=\"valueText\"\n [class]=\"state ? 'fd-progress-indicator--' + state : ''\"\n>\n <ng-container *ngIf=\"!hasPopover\">\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasPopover\">\n <fd-popover [style.width.%]=\"100\" [noArrow]=\"false\" #popover>\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <div class=\"fd-popover__wrapper\">\n <div class=\"fd-progress-indicator__overflow\">\n <span>{{ valueText }}</span>\n <span class=\"fd-progress-indicator__overflow-close\" (click)=\"popover.close()\">\n <i class=\"sap-icon sap-icon--decline\"></i>\n </span>\n </div>\n </div>\n </fd-popover-body>\n </fd-popover>\n </ng-container>\n</div>\n\n<ng-template #indicatorContainer>\n <div\n class=\"fd-progress-indicator__container\"\n *ngIf=\"calculateProgressBarWidth() === 0 || calculateProgressBarWidth() as progressBarWidth\"\n >\n <div\n *ngIf=\"progressBarWidth > 0\"\n class=\"fd-progress-indicator__progress-bar\"\n [class.fd-progress-indicator__progress-bar--animated]=\"animate\"\n [style.min-width.%]=\"progressBarWidth\"\n [style.width.%]=\"progressBarWidth\"\n >\n <ng-container *ngIf=\"progressBarWidth > 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n <div class=\"fd-progress-indicator__remaining\" [style.min-width]=\"0\">\n <ng-container *ngIf=\"progressBarWidth <= 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #progressBarLabel>\n <span class=\"fd-progress-indicator__icon\" *ngIf=\"state\"></span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"!valueText\"> {{ valueNow }}% </span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"valueText\">\n {{ valueText }}\n </span>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-progress-indicator{--rootMargin:.5rem 0;--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Neutral);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Neutral,transparent);--progressBarBorderRightColor:var(--fdProgress_Indicator_Border_Right_Color,var(--progressBarBorderColor));--containerBackground:var(--fdProgress_Indicator_Container_Background_Neutral,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Neutral,var(--sapField_BorderColor));--iconDisplay:none;--iconContent:\"\";--labelMarginStart:var(--fdProgress_Indicator_Label_Margin_Start);--labelMarginEnd:var(--fdProgress_Indicator_Label_Margin_End);-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Height);line-height:var(--sapContent_LineHeight);margin:0;margin:var(--rootMargin);padding:0;padding:var(--fdProgress_Indicator_Container_Margin);width:100%}.fd-progress-indicator:after,.fd-progress-indicator:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator.fd-popover{margin:var(--rootMargin)}.fd-progress-indicator--mobile{--rootMargin:.875rem 0}.fd-progress-indicator--display,.fd-progress-indicator--display.fd-popover{margin:0}.fd-progress-indicator--informative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Informative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Informative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Informative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Informative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Informative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Informative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--positive{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Positive);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Positive,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Positive,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Positive,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Positive);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Positive,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--negative{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Negative);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Negative,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Negative,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Negative,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Negative);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Negative,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator--critical{--progressBarBackground:var(--fdProgress_Indicator_Background_Color_Critical);--progressBarBorderColor:var(--fdProgress_Indicator_Progress_Bar_Border_Color_Critical,transparent);--containerBackground:var(--fdProgress_Indicator_Container_Background_Critical,var(--sapField_Background));--containerBorderColor:var(--fdProgress_Indicator_Container_Border_Critical,var(--sapField_BorderColor));--iconContent:var(--fdProgress_Icon_Critical);--iconDisplay:inline;--iconColor:var(--fdProgress_Icon_Color_Critical,var(--fdProgress_Indicator_Label_Color));--labelMarginStart:0}.fd-progress-indicator__container{-webkit-box-sizing:border-box;background:var(--containerBackground);border:0;border:.0625rem solid var(--containerBorderColor);border-radius:.5rem;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Container_Height);line-height:var(--sapContent_LineHeight);margin:0;min-height:var(--fdProgress_Indicator_Container_Height);min-width:4rem;overflow:var(--fdProgress_Indicator_Container_Overflow);padding:0;position:var(--fdProgress_Indicator_Container_Position, static);width:var(--fdProgress_Indicator_Container_Width)}.fd-progress-indicator__container:after,.fd-progress-indicator__container:before{-webkit-box-sizing:inherit;background-color:var(--progressBarBackground);border-radius:50%;box-sizing:inherit;content:\"\";display:var(--fdProgress_Indicator_Progress_Bar_Boundary_Display, none);font-size:inherit;height:.25rem;position:absolute;top:0;width:.25rem}.fd-progress-indicator__container:before{left:0}.fd-progress-indicator__container:after{right:0}.fd-progress-indicator[aria-valuenow=\"0\"] .fd-progress-indicator__progress-bar{border:none}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{right:var(--fdProgress_Indicator_Progress_Bar_Position_Left);width:auto!important}.fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar[dir=rtl],.fd-progress-indicator__progress-bar,[dir=rtl] .fd-progress-indicator[aria-valuenow=\"100\"] .fd-progress-indicator__progress-bar{left:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__progress-bar{-webkit-box-sizing:border-box;-webkit-box-pack:end;-ms-flex-pack:end;background:var(--progressBarBackground);border:0;border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-radius:var(--fdProgress_Indicator_Progress_Bar_Border_Radius);border-right:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);bottom:var(--fdProgress_Indicator_Progress_Bar_Position_Bottom);box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fdProgress_Indicator_Progress_Bar_Height);justify-content:flex-end;line-height:var(--sapContent_LineHeight);margin:0;margin:var(--fdProgress_Indicator_Progress_Bar_Margin);padding:0;position:var(--fdProgress_Indicator_Progress_Bar_Position, static)}.fd-progress-indicator__progress-bar:after,.fd-progress-indicator__progress-bar:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__progress-bar.fd-popover__control{border:var(--fdProgress_Indicator_Progress_Bar_Popover_Control_Border, 0 solid) var(--progressBarBorderColor);position:var(--fdProgress_Indicator_Progress_Bar_Position, relative)}.fd-progress-indicator__progress-bar .fd-progress-indicator__label{color:var(--fdProgress_Indicator_Label_Color_Contrast)}.fd-progress-indicator__progress-bar[dir=rtl],[dir=rtl] .fd-progress-indicator__progress-bar{border:var(--fdProgress_Indicator_Progress_Bar_Border) var(--progressBarBorderColor);border-left:var(--fdProgress_Indicator_Border_Right) var(--progressBarBorderRightColor);border-right:none;left:auto;right:var(--fdProgress_Indicator_Progress_Bar_Position_Left)}.fd-progress-indicator__remaining{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;flex-direction:row;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-progress-indicator__remaining:after,.fd-progress-indicator__remaining:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__remaining.fd-popover__control{flex-grow:1;min-width:0}.fd-progress-indicator__icon{bottom:-.625rem;display:var(--iconDisplay);margin-left:var(--fdProgress_Indicator_Label_Margin_Start);margin-right:var(--fdProgress_Icon_Space_Before_Label);position:var(--fdProgress_Indicator_Icon_Position, static);right:-1.25rem}.fd-progress-indicator__icon[dir=rtl],[dir=rtl] .fd-progress-indicator__icon{left:-1.25rem;margin-left:var(--fdProgress_Icon_Space_Before_Label);margin-right:var(--fdProgress_Indicator_Label_Margin_Start);right:auto}.fd-progress-indicator__icon:before{color:var(--iconColor);content:var(--iconContent);font-family:SAP-icons;font-size:var(--fdProgress_Indicator_Icon_Font_Size);vertical-align:middle}.fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:0}.fd-progress-indicator__icon+.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__icon+.fd-progress-indicator__label{margin-left:inherit;margin-right:0}.fd-progress-indicator__label{-webkit-box-sizing:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--fdProgress_Indicator_Label_Color);display:inline-block;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--fdProgress_Indicator_Label_Font_Size);font-weight:400;forced-color-adjust:none;left:0;line-height:var(--sapContent_LineHeight);line-height:normal;margin:0;margin-left:var(--labelMarginStart);margin-right:var(--labelMarginEnd);max-width:100%;overflow:hidden;padding:0;position:var(--fdProgress_Indicator_Label_Position, static);text-overflow:ellipsis;top:-1.25rem;user-select:none;white-space:nowrap}.fd-progress-indicator__label:after,.fd-progress-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__label[dir=rtl],[dir=rtl] .fd-progress-indicator__label{left:auto;margin-left:var(--labelMarginEnd);margin-right:var(--labelMarginStart);right:0}.fd-progress-indicator__overflow{-webkit-box-sizing:border-box;-webkit-box-align:center;-ms-flex-align:center;-webkit-box-pack:justify;-ms-flex-pack:justify;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:space-between;line-height:var(--sapContent_LineHeight);margin:0;max-width:95vw;overflow:hidden;padding:0 0 0 .5rem;white-space:normal}.fd-progress-indicator__overflow:after,.fd-progress-indicator__overflow:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow{padding-left:0;padding-right:.5rem}.fd-progress-indicator__overflow-close{-webkit-box-sizing:border-box;background:transparent;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:1.375rem;line-height:var(--sapContent_LineHeight);line-height:1.6rem;margin:.125rem;padding:0;text-align:center;width:1.4375rem}.fd-progress-indicator__overflow-close:after,.fd-progress-indicator__overflow-close:before{box-sizing:inherit;font-size:inherit}.fd-progress-indicator__overflow-close[dir=rtl],[dir=rtl] .fd-progress-indicator__overflow-close{margin-left:0;margin-right:.5rem}.fd-progress-indicator__overflow-close.is-focus,.fd-progress-indicator__overflow-close:focus{outline:var(--sapContent_FocusWidth) var(--sapContent_FocusStyle) var(--sapContent_FocusColor);z-index:5}.fd-progress-indicator__overflow-close [class*=sap-icon]{color:var(--sapContent_IconColor);font-size:var(--sapFontSmallSize)}.fd-progress-indicator__progress-bar--animated{transition:min-width .5s ease-in-out,width .5s ease-in-out}\n"] }]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-progress-indicator.mjs","sources":["../../../../libs/core/src/lib/progress-indicator/progress-indicator.component.ts","../../../../libs/core/src/lib/progress-indicator/progress-indicator.component.html","../../../../libs/core/src/lib/progress-indicator/progress-indicator.module.ts","../../../../libs/core/src/lib/progress-indicator/fundamental-ngx-core-progress-indicator.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Input,\n OnChanges,\n SimpleChanges,\n ElementRef,\n AfterViewInit,\n ChangeDetectorRef,\n OnInit,\n OnDestroy\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\nimport { resizeObservable } from '@fundamental-ngx/cdk/utils';\n\nexport type ProgressIndicatorState = 'informative' | 'positive' | 'critical' | 'negative';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'fd-progress-indicator',\n templateUrl: './progress-indicator.component.html',\n styleUrls: ['./progress-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressIndicatorComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {\n /** The text to display if you would like to override the default percentage text. */\n @Input()\n valueText: string;\n\n /** Custom unit if you would like to override the default percentage. */\n @Input()\n unit = '%';\n\n /** The minimum value possible for the progress indicator. */\n @Input()\n valueMin = 0;\n\n /** The maximum value possible for the progress indicator. */\n @Input()\n valueMax = 100;\n\n /** The current value for the progress indicator. */\n @Input()\n valueNow = 0;\n\n /** The state for the progress indicator. */\n @Input()\n state?: ProgressIndicatorState;\n\n /** Whether or not to animate changes to the progress bar's valueNow. */\n @Input()\n animate = false;\n\n /** @hidden */\n hasPopover = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(private _elementRef: ElementRef, private _cdRef: ChangeDetectorRef) {}\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.valueText) {\n this._handleTruncation();\n }\n }\n\n /** @hidden */\n ngOnInit(): void {\n resizeObservable(this._elementRef.nativeElement)\n .pipe(debounceTime(20), takeUntil(this._onDestroy$))\n .subscribe(() => {\n this._handleTruncation();\n });\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._handleTruncation();\n }\n\n /** @hidden */\n calculateProgressBarWidth(): number {\n return ((this.valueNow - this.valueMin) / (this.valueMax - this.valueMin)) * 100;\n }\n\n /** @hidden */\n private _handleTruncation(): void {\n const labelSpan = this._elementRef.nativeElement.querySelector('.fd-progress-indicator__label');\n this.hasPopover = labelSpan && labelSpan.offsetWidth < labelSpan.scrollWidth;\n this._cdRef.detectChanges();\n }\n}\n","<div\n class=\"fd-progress-indicator\"\n tabindex=\"-1\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"valueMin\"\n [attr.aria-valuenow]=\"valueNow\"\n [attr.aria-valuemax]=\"valueMax\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-label]=\"valueText\"\n [class]=\"state ? 'fd-progress-indicator--' + state : ''\"\n>\n <ng-container *ngIf=\"!hasPopover\">\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasPopover\">\n <fd-popover [style.width.%]=\"100\" [noArrow]=\"false\" #popover>\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <div class=\"fd-popover__wrapper\">\n <div class=\"fd-progress-indicator__overflow\">\n <span>{{ valueText }}</span>\n <span class=\"fd-progress-indicator__overflow-close\" (click)=\"popover.close()\">\n <i class=\"sap-icon sap-icon--decline\"></i>\n </span>\n </div>\n </div>\n </fd-popover-body>\n </fd-popover>\n </ng-container>\n</div>\n\n<ng-template #indicatorContainer>\n <div\n class=\"fd-progress-indicator__container\"\n *ngIf=\"calculateProgressBarWidth() === 0 || calculateProgressBarWidth() as progressBarWidth\"\n >\n <div\n *ngIf=\"progressBarWidth > 0\"\n class=\"fd-progress-indicator__progress-bar\"\n [class.fd-progress-indicator__progress-bar--animated]=\"animate\"\n [style.min-width.%]=\"progressBarWidth\"\n [style.width.%]=\"progressBarWidth\"\n >\n <ng-container *ngIf=\"progressBarWidth > 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n <div class=\"fd-progress-indicator__remaining\" [style.min-width]=\"0\">\n <ng-container *ngIf=\"progressBarWidth <= 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #progressBarLabel>\n <span class=\"fd-progress-indicator__icon\" *ngIf=\"state\"></span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"!valueText\"> {{ valueNow }}% </span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"valueText\">\n {{ valueText }}\n </span>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ProgressIndicatorComponent } from './progress-indicator.component';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\n\n@NgModule({\n declarations: [ProgressIndicatorComponent],\n imports: [CommonModule, PopoverModule],\n exports: [ProgressIndicatorComponent]\n})\nexport class ProgressIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MA2Ba,0BAA0B,CAAA;;IAoCnC,WAAoB,CAAA,WAAuB,EAAU,MAAyB,EAAA;QAA1D,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;;QA7B9E,IAAI,CAAA,IAAA,GAAG,GAAG,CAAC;;QAIX,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;;QAIb,IAAQ,CAAA,QAAA,GAAG,GAAG,CAAC;;QAIf,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;;QAQb,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAGhB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;;AAGF,QAAA,IAAA,CAAA,WAAW,GAAkB,IAAI,OAAO,EAAQ,CAAC;KAGgB;;AAGlF,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IAAI,OAAO,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC5B,SAAA;KACJ;;IAGD,QAAQ,GAAA;AACJ,QAAA,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;AAC3C,aAAA,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;aACnD,SAAS,CAAC,MAAK;YACZ,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC7B,SAAC,CAAC,CAAC;KACV;;IAGD,WA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AAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBAJjB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAC/B,YAAY,EAAE,aAAa,aAC3B,0BAA0B,CAAA,EAAA,CAAA,CAAA;qHAE3B,uBAAuB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAG5B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,0BAA0B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACxC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-progress-indicator.mjs","sources":["../../../../libs/core/src/lib/progress-indicator/progress-indicator.component.ts","../../../../libs/core/src/lib/progress-indicator/progress-indicator.component.html","../../../../libs/core/src/lib/progress-indicator/progress-indicator.module.ts","../../../../libs/core/src/lib/progress-indicator/fundamental-ngx-core-progress-indicator.ts"],"sourcesContent":["import {\n Component,\n ViewEncapsulation,\n ChangeDetectionStrategy,\n Input,\n OnChanges,\n SimpleChanges,\n ElementRef,\n AfterViewInit,\n ChangeDetectorRef,\n OnInit,\n OnDestroy\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { debounceTime, takeUntil } from 'rxjs/operators';\nimport { resizeObservable } from '@fundamental-ngx/cdk/utils';\n\nexport type ProgressIndicatorState = 'informative' | 'positive' | 'critical' | 'negative';\n\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'fd-progress-indicator',\n templateUrl: './progress-indicator.component.html',\n styleUrls: ['./progress-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ProgressIndicatorComponent implements OnInit, OnDestroy, OnChanges, AfterViewInit {\n /** The text to display if you would like to override the default percentage text. */\n @Input()\n valueText: string;\n\n /** Custom unit if you would like to override the default percentage. */\n @Input()\n unit = '%';\n\n /** The minimum value possible for the progress indicator. */\n @Input()\n valueMin = 0;\n\n /** The maximum value possible for the progress indicator. */\n @Input()\n valueMax = 100;\n\n /** The current value for the progress indicator. */\n @Input()\n valueNow = 0;\n\n /** The state for the progress indicator. */\n @Input()\n state?: ProgressIndicatorState;\n\n /** Whether or not to animate changes to the progress bar's valueNow. */\n @Input()\n animate = false;\n\n /** @hidden */\n hasPopover = false;\n\n /** @hidden An RxJS Subject that will kill the data stream upon component’s destruction (for unsubscribing) */\n private readonly _onDestroy$: Subject<void> = new Subject<void>();\n\n /** @hidden */\n constructor(private _elementRef: ElementRef, private _cdRef: ChangeDetectorRef) {}\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (changes.valueText) {\n this._handleTruncation();\n }\n }\n\n /** @hidden */\n ngOnInit(): void {\n resizeObservable(this._elementRef.nativeElement)\n .pipe(debounceTime(20), takeUntil(this._onDestroy$))\n .subscribe(() => {\n this._handleTruncation();\n });\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._onDestroy$.next();\n this._onDestroy$.complete();\n }\n\n /** @hidden */\n ngAfterViewInit(): void {\n this._handleTruncation();\n }\n\n /** @hidden */\n calculateProgressBarWidth(): number {\n return ((this.valueNow - this.valueMin) / (this.valueMax - this.valueMin)) * 100;\n }\n\n /** @hidden */\n private _handleTruncation(): void {\n const labelSpan = this._elementRef.nativeElement.querySelector('.fd-progress-indicator__label');\n this.hasPopover = labelSpan && labelSpan.offsetWidth < labelSpan.scrollWidth;\n this._cdRef.detectChanges();\n }\n}\n","<div\n class=\"fd-progress-indicator\"\n tabindex=\"-1\"\n role=\"progressbar\"\n [attr.aria-valuemin]=\"valueMin\"\n [attr.aria-valuenow]=\"valueNow\"\n [attr.aria-valuemax]=\"valueMax\"\n [attr.aria-valuetext]=\"valueText\"\n [attr.aria-label]=\"valueText\"\n [class]=\"state ? 'fd-progress-indicator--' + state : ''\"\n>\n <ng-container *ngIf=\"!hasPopover\">\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </ng-container>\n <ng-container *ngIf=\"hasPopover\">\n <fd-popover [style.width.%]=\"100\" [noArrow]=\"false\" #popover>\n <fd-popover-control>\n <ng-container *ngTemplateOutlet=\"indicatorContainer\"></ng-container>\n </fd-popover-control>\n <fd-popover-body>\n <div class=\"fd-popover__wrapper\">\n <div class=\"fd-progress-indicator__overflow\">\n <span>{{ valueText }}</span>\n <span class=\"fd-progress-indicator__overflow-close\" (click)=\"popover.close()\">\n <i class=\"sap-icon sap-icon--decline\"></i>\n </span>\n </div>\n </div>\n </fd-popover-body>\n </fd-popover>\n </ng-container>\n</div>\n\n<ng-template #indicatorContainer>\n <div\n class=\"fd-progress-indicator__container\"\n *ngIf=\"calculateProgressBarWidth() === 0 || calculateProgressBarWidth() as progressBarWidth\"\n >\n <div\n *ngIf=\"progressBarWidth > 0\"\n class=\"fd-progress-indicator__progress-bar\"\n [class.fd-progress-indicator__progress-bar--animated]=\"animate\"\n [style.min-width.%]=\"progressBarWidth\"\n [style.width.%]=\"progressBarWidth\"\n >\n <ng-container *ngIf=\"progressBarWidth > 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n <div class=\"fd-progress-indicator__remaining\" [style.min-width]=\"0\">\n <ng-container *ngIf=\"progressBarWidth <= 50\">\n <ng-template [ngTemplateOutlet]=\"progressBarLabel\"></ng-template>\n </ng-container>\n </div>\n </div>\n</ng-template>\n\n<ng-template #progressBarLabel>\n <span class=\"fd-progress-indicator__icon\" *ngIf=\"state\"></span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"!valueText\"> {{ valueNow }}% </span>\n <span class=\"fd-progress-indicator__label\" *ngIf=\"valueText\">\n {{ valueText }}\n </span>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ProgressIndicatorComponent } from './progress-indicator.component';\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\n\n@NgModule({\n declarations: [ProgressIndicatorComponent],\n imports: [CommonModule, PopoverModule],\n exports: [ProgressIndicatorComponent]\n})\nexport class ProgressIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;MA2Ba,0BAA0B,CAAA;;IAoCnC,WAAoB,CAAA,WAAuB,EAAU,MAAyB,EAAA;QAA1D,IAAW,CAAA,WAAA,GAAX,WAAW,CAAY;QAAU,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;;QA7B9E,IAAI,CAAA,IAAA,GAAG,GAAG,CAAC;;QAIX,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;;QAIb,IAAQ,CAAA,QAAA,GAAG,GAAG,CAAC;;QAIf,IAAQ,CAAA,QAAA,GAAG,CAAC,CAAC;;QAQb,IAAO,CAAA,OAAA,GAAG,KAAK,CAAC;;QAGhB,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;;AAGF,QAAA,IAAA,CAAA,WAAW,GAAkB,IAAI,OAAO,EAAQ,CAAC;KAGgB;;AAGlF,IAAA,WAAW,CAAC,OAAsB,EAAA;QAC9B,IAAI,OAAO,CAAC,SAAS,EAAE;YACnB,IAAI,CAAC,iBAAiB,EAAE,CAAC;AAC5B,SAAA;KACJ;;IAGD,QAAQ,GAAA;AACJ,QAAA,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC;AAC3C,aAAA,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,CAA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AAK;gBAKN,KAAK,EAAA,CAAA;sBADJ,KAAK;gBAKN,OAAO,EAAA,CAAA;sBADN,KAAK;;;ME3CG,uBAAuB,CAAA;;oHAAvB,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAvB,uBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,uBAAuB,iBAJjB,0BAA0B,CAAA,EAAA,OAAA,EAAA,CAC/B,YAAY,EAAE,aAAa,aAC3B,0BAA0B,CAAA,EAAA,CAAA,CAAA;qHAE3B,uBAAuB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA;2FAG5B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBALnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,YAAY,EAAE,CAAC,0BAA0B,CAAC;AAC1C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,0BAA0B,CAAC;AACxC,iBAAA,CAAA;;;ACTD;;AAEG;;;;"}
|
|
@@ -281,7 +281,7 @@ RatingIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0
|
|
|
281
281
|
multi: true
|
|
282
282
|
},
|
|
283
283
|
registerFormItemControl(RatingIndicatorComponent)
|
|
284
|
-
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
284
|
+
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.28.3\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig", "preventSpaceKeyScroll"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
285
285
|
__decorate([
|
|
286
286
|
applyCssClass,
|
|
287
287
|
__metadata("design:type", Function),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.detectChanges();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i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AAA;2FAG5B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.detectChanges();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel: _rates.length:allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.RatingStarLabelPipe"],"m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