@fundamental-ngx/core 0.46.0-rc.2 → 0.46.0-rc.21
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/button/base-button.d.ts +3 -1
- package/button/button.component.d.ts +6 -1
- package/content-density/content-density.module.d.ts +2 -3
- package/content-density/index.d.ts +3 -2
- package/content-density/provide-content-density.d.ts +7 -0
- package/date-picker/date-picker.component.d.ts +2 -0
- package/datetime-picker/datetime-picker.component.d.ts +4 -2
- package/dialog/base/dialog-base.service.d.ts +4 -3
- package/dialog/dialog-container/dialog-container.component.d.ts +8 -7
- package/dialog/index.d.ts +11 -10
- package/dialog/utils/dialog-container.model.d.ts +4 -0
- package/esm2022/avatar/avatar.component.mjs +3 -3
- package/esm2022/button/base-button.mjs +5 -3
- package/esm2022/button/button.component.mjs +21 -7
- package/esm2022/carousel/carousel.component.mjs +3 -3
- package/esm2022/checkbox/checkbox/checkbox.component.mjs +3 -3
- package/esm2022/content-density/content-density.module.mjs +6 -68
- package/esm2022/content-density/index.mjs +4 -3
- package/esm2022/content-density/provide-content-density.mjs +71 -0
- package/esm2022/date-picker/date-picker.component.mjs +14 -4
- package/esm2022/datetime-picker/datetime-picker.component.mjs +12 -7
- package/esm2022/dialog/base/dialog-base.service.mjs +7 -3
- package/esm2022/dialog/dialog-container/dialog-container.component.mjs +11 -11
- package/esm2022/dialog/index.mjs +12 -11
- package/esm2022/dialog/utils/dialog-container.model.mjs +2 -0
- package/esm2022/form/form-input-message-group/form-input-message-group.component.mjs +7 -3
- package/esm2022/generic-tag/fundamental-ngx-core-generic-tag.mjs +5 -0
- package/esm2022/generic-tag/generic-tag.component.mjs +75 -0
- package/esm2022/generic-tag/generic-tag.module.mjs +16 -0
- package/esm2022/generic-tag/index.mjs +4 -0
- package/esm2022/generic-tag/tokens.mjs +3 -0
- package/esm2022/illustrated-message/illustrated-message.component.mjs +3 -3
- package/esm2022/message-box/message-box-container/message-box-container.component.mjs +12 -12
- package/esm2022/multi-input/multi-input-mobile/multi-input-mobile.component.mjs +3 -3
- package/esm2022/multi-input/multi-input.component.mjs +3 -3
- package/esm2022/pagination/pagination.component.mjs +1 -1
- package/esm2022/popover/popover-service/popover.service.mjs +10 -1
- package/esm2022/popover/popover.component.mjs +5 -1
- package/esm2022/rating-indicator/components/rating-indicator.component.mjs +3 -3
- package/esm2022/scrollbar/scrollbar.directive.mjs +15 -8
- package/esm2022/select/select.component.mjs +6 -4
- package/esm2022/theming/index.mjs +4 -3
- package/esm2022/theming/provide-theming.mjs +16 -0
- package/esm2022/theming/theming.module.mjs +6 -24
- package/esm2022/theming/tokens.mjs +5 -2
- package/esm2022/time-picker/time-picker.component.mjs +3 -3
- package/esm2022/token/token.component.mjs +2 -2
- package/esm2022/upload-collection/upload-collection-form-item/upload-collection-form-item.component.mjs +3 -3
- package/esm2022/wizard/wizard-step-indicator/wizard-step-indicator.component.mjs +3 -3
- package/fesm2022/fundamental-ngx-core-avatar.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-avatar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-button.mjs +23 -7
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-carousel.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-carousel.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-checkbox.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-checkbox.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-content-density.mjs +111 -103
- package/fesm2022/fundamental-ngx-core-content-density.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-date-picker.mjs +13 -3
- package/fesm2022/fundamental-ngx-core-date-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs +11 -6
- package/fesm2022/fundamental-ngx-core-datetime-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-dialog.mjs +160 -156
- package/fesm2022/fundamental-ngx-core-dialog.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-form.mjs +5 -2
- package/fesm2022/fundamental-ngx-core-form.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-generic-tag.mjs +96 -0
- package/fesm2022/fundamental-ngx-core-generic-tag.mjs.map +1 -0
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-illustrated-message.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-message-box.mjs +9 -9
- package/fesm2022/fundamental-ngx-core-message-box.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-multi-input.mjs +4 -4
- package/fesm2022/fundamental-ngx-core-multi-input.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs +1 -1
- package/fesm2022/fundamental-ngx-core-pagination.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-popover.mjs +13 -0
- package/fesm2022/fundamental-ngx-core-popover.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-rating-indicator.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-scrollbar.mjs +14 -7
- package/fesm2022/fundamental-ngx-core-scrollbar.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-select.mjs +5 -3
- package/fesm2022/fundamental-ngx-core-select.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-theming.mjs +22 -23
- package/fesm2022/fundamental-ngx-core-theming.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-time-picker.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-time-picker.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-token.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-token.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-upload-collection.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-wizard.mjs +2 -2
- package/fesm2022/fundamental-ngx-core-wizard.mjs.map +1 -1
- package/form/form-input-message-group/form-input-message-group.component.d.ts +3 -1
- package/fundamental-ngx-core-v0.46.0-rc.21.tgz +0 -0
- package/generic-tag/README.md +25 -0
- package/generic-tag/generic-tag.component.d.ts +43 -0
- package/generic-tag/generic-tag.module.d.ts +7 -0
- package/generic-tag/index.d.ts +3 -0
- package/generic-tag/tokens.d.ts +2 -0
- package/message-box/message-box-container/message-box-container.component.d.ts +7 -6
- package/multi-input/multi-input.component.d.ts +3 -1
- package/package.json +9 -3
- package/popover/popover-service/popover.service.d.ts +4 -0
- package/popover/popover.component.d.ts +2 -0
- package/schematics/add-dependencies/index.js +4 -4
- package/scrollbar/scrollbar.directive.d.ts +4 -2
- package/select/select.component.d.ts +4 -2
- package/theming/index.d.ts +3 -2
- package/theming/provide-theming.d.ts +7 -0
- package/fundamental-ngx-core-v0.46.0-rc.2.tgz +0 -0
|
@@ -280,7 +280,7 @@ class RatingIndicatorComponent {
|
|
|
280
280
|
multi: true
|
|
281
281
|
},
|
|
282
282
|
registerFormItemControl(RatingIndicatorComponent)
|
|
283
|
-
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.30.2-rc.6\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
283
|
+
], usesOnChanges: true, ngImport: i0, template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span aria-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.30.2-rc.6\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"], dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i2.PopoverComponent, selector: "fd-popover", inputs: ["title", "trigger", "fixedPosition", "id", "mobile", "mobileConfig"] }, { kind: "directive", type: i2.PopoverTriggerDirective, selector: "[fdPopoverTrigger], [fd-popover-trigger]", inputs: ["fdPopoverTrigger"] }, { kind: "pipe", type: RatingStarLabelPipe, name: "ratingStarLabel" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
284
284
|
}
|
|
285
285
|
__decorate([
|
|
286
286
|
applyCssClass,
|
|
@@ -297,7 +297,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.0", ngImpor
|
|
|
297
297
|
multi: true
|
|
298
298
|
},
|
|
299
299
|
registerFormItemControl(RatingIndicatorComponent)
|
|
300
|
-
], template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n", styles: ["/*!\n * Fundamental Library Styles v0.30.2-rc.6\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"] }]
|
|
300
|
+
], template: "<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span aria-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.30.2-rc.6\n * Copyright (c) 2023 SAP SE or an SAP affiliate company.\n * Licensed under Apache License 2.0 (https://github.com/SAP/fundamental-styles/blob/main/LICENSE)\n */.fd-rating-indicator{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem;-webkit-box-sizing:border-box;-webkit-box-pack:center;-ms-flex-pack:center;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);display:flex;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;justify-content:center;line-height:var(--sapContent_LineHeight);margin:0;padding:0;position:relative}.fd-rating-indicator:after,.fd-rating-indicator:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--cozy{--fontSize:1.5rem;--spacingBetweenIcons:.1875rem;margin:.8125rem 0}.fd-rating-indicator--compact{margin:.5rem 0}.fd-rating-indicator--compact,.fd-rating-indicator--condensed{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--xs{--fontSize:.75rem;--spacingBetweenIcons:1px}.fd-rating-indicator--sm{--fontSize:1rem;--spacingBetweenIcons:.125rem}.fd-rating-indicator--md{--fontSize:1.375rem;--spacingBetweenIcons:.1875rem}.fd-rating-indicator--lg{--fontSize:2rem;--spacingBetweenIcons:.25rem}.fd-rating-indicator__container{-webkit-box-sizing:border-box;border:0;border-radius:var(--fdRating_Indicator_Border_Radius);box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0;padding:0}.fd-rating-indicator__container:after,.fd-rating-indicator__container:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__container:focus-within{outline-color:var(--sapContent_FocusColor);outline-offset:var(--fdRating_Indicator_Focus_Outline_Offset, 0);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__container:focus-within .fd-rating-indicator__input,.fd-rating-indicator__container:focus-within .fd-rating-indicator__label{outline:none!important}.fd-rating-indicator__input{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;opacity:.0001;padding:0;position:absolute;top:0;width:var(--fontSize);z-index:-1}.fd-rating-indicator__input:after,.fd-rating-indicator__input:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__input:checked.is-focus,.fd-rating-indicator__input:checked:focus{outline-color:var(--sapContent_FocusColor);outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__input:checked.is-focus+.fd-rating-indicator__label,.fd-rating-indicator__input:checked:focus+.fd-rating-indicator__label{outline-color:var(--sapContent_FocusColor);outline-offset:0;outline-style:var(--sapContent_FocusStyle);outline-width:var(--sapContent_FocusWidth)}.fd-rating-indicator__label{-webkit-box-sizing:border-box;align-items:center;border:0;box-sizing:border-box;color:var(--sapTextColor);cursor:pointer;display:flex;float:left;font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-weight:400;forced-color-adjust:none;height:var(--fontSize);line-height:var(--sapContent_LineHeight);margin:0;margin-right:var(--spacingBetweenIcons);opacity:1;padding:0}.fd-rating-indicator__label:after,.fd-rating-indicator__label:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator__label:before{color:var(--sapContent_RatedColor);content:\"\\e065\";font-family:SAP-icons;font-size:var(--fontSize)}.fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator__label:hover:before{-webkit-transition:opacity .125s ease-in;opacity:var(--fdRating_Indicator_Selected_Hover_Opacity);transition:opacity .125s ease-in}.fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e0a1\"}.fd-rating-indicator__dynamic-text{-webkit-box-sizing:border-box;border:0;box-sizing:border-box;color:var(--sapTextColor);color:var(--sapContent_LabelColor);font-family:var(--sapFontFamily);font-size:var(--sapFontSize);font-size:var(--sapFontSmallSize);font-weight:400;forced-color-adjust:none;line-height:var(--sapContent_LineHeight);margin:0 0 0 .5rem;overflow:hidden;padding:0;text-overflow:ellipsis;white-space:nowrap}.fd-rating-indicator__dynamic-text:after,.fd-rating-indicator__dynamic-text:before{box-sizing:inherit;font-size:inherit}.fd-rating-indicator--hide-dynamic-text>.fd-rating-indicator__dynamic-text{display:none}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__input:first-child+label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__input:first-child+label{margin-right:0}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label{float:right}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__label:last-child,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__label:last-child{margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator[dir=rtl] .fd-rating-indicator__dynamic-text,[dir=rtl] .fd-rating-indicator .fd-rating-indicator__dynamic-text{margin-left:0;margin-right:.5rem}.fd-rating-indicator.is-disabled,.fd-rating-indicator:disabled,.fd-rating-indicator[aria-disabled=true]{opacity:var(--fdRating_Indicator_Disabled_Control_Opacity);pointer-events:none}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:before{color:var(--fdRating_Indicator_Disabled_Selected_Color);content:\"\\e065\"}.fd-rating-indicator.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Disabled_Unselected_Color);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--display-mode{--fontSize:1rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-right:.125rem}.fd-rating-indicator--display-mode .fd-rating-indicator__label:before{color:var(--fdRating_Indicator_Display_Only_Selected_Color);content:\"\\e065\";font-size:var(--fontSize)}.fd-rating-indicator--display-mode .fd-rating-indicator__label[dir=rtl],[dir=rtl] .fd-rating-indicator--display-mode .fd-rating-indicator__label{margin-left:.125rem;margin-right:0}.fd-rating-indicator--display-mode,.fd-rating-indicator--non-interactive{pointer-events:none}.fd-rating-indicator--display-mode .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--non-interactive .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label:before{color:var(--sapContent_UnratedColor);content:\"\\e065\";font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator--icon .fd-rating-indicator__label{height:var(--fontSize);width:var(--fontSize)}.fd-rating-indicator--icon .fd-rating-indicator__label:after,.fd-rating-indicator--icon .fd-rating-indicator__label:before{content:none!important}.fd-rating-indicator--icon .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{font-size:var(--fontSize);height:100%;line-height:1}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-rated,.fd-rating-indicator--icon .fd-rating-indicator__label-unrated{display:none}.fd-rating-indicator--icon .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated{display:block}.fd-rating-indicator--half-star .fd-rating-indicator__input{height:var(--fontSize);width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label{margin-right:0;overflow:hidden;width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){flex-direction:row-reverse;margin-right:var(--spacingBetweenIcons)}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl],[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6){margin-left:var(--spacingBetweenIcons);margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6)[dir=rtl]:last-child,[dir=rtl] .fd-rating-indicator--half-star .fd-rating-indicator__label:nth-child(4n+6):last-child{margin-left:0}.fd-rating-indicator--half-star .fd-rating-indicator__label:last-child{margin-right:0}.fd-rating-indicator--half-star .fd-rating-indicator--icon .fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star .fd-rating-indicator .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:nth-child(4n+3):checked+.fd-rating-indicator__label+.fd-rating-indicator__input+.fd-rating-indicator__label:before{font-size:var(--fontSize)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label{width:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio) * .5)}.fd-rating-indicator--half-star.is-disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star:disabled .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before,.fd-rating-indicator--half-star[aria-disabled=true] .fd-rating-indicator__input:checked~.fd-rating-indicator__input+.fd-rating-indicator__label .fd-rating-indicator__label-unrated:before{font-size:calc(var(--fontSize) * var(--fdRating_Indicator_View_Mode_Unselected_Icon_Size_Ratio))}.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__input--zero-rating,.fd-rating-indicator[class*=fd-rating-indicator--] .fd-rating-indicator__label--zero-rating,.fd-rating-indicator__input--zero-rating,.fd-rating-indicator__label--zero-rating{margin:0;opacity:.0001;overflow:hidden;padding:0;width:0}.fd-rating-indicator__popover{padding:.5rem 0!important}.fd-rating-indicator__popover .fd-rating-indicator__sum-row{display:flex;align-items:center;padding:.5rem 1rem;margin:0}.fd-rating-indicator__popover .fd-rating-indicator__sum-row .fd-rating-indicator__container{margin-right:.5rem}\n"] }]
|
|
301
301
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { class: [{
|
|
302
302
|
type: Input
|
|
303
303
|
}], name: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span area-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.RatingStarLabelPipe"],"mappings":";;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,sBAAsB;AAEzC,MAAA,iBAAiB,GAAG;IAC7B,MAAM,EAAE,CAAG,EAAA,gBAAgB,CAAa,WAAA,CAAA;IACxC,IAAI,EAAE,CAAG,EAAA,gBAAgB,CAAQ,MAAA,CAAA;IACjC,eAAe,EAAE,CAAG,EAAA,gBAAgB,CAAqB,mBAAA,CAAA;EAC3D;AACK,MAAM,0BAA0B,GAAG,EAAE;IAGhC,wBAQX;AARD,CAAA,UAAY,uBAAuB,EAAA;AAC/B,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;A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;gBAMN,WAAW,EAAA,CAAA;sBADV,KAAK;gBAON,IAAI,EAAA,CAAA;sBADH,KAAK;gBAON,oBAAoB,EAAA,CAAA;sBADnB,KAAK;gBAON,aAAa,EAAA,CAAA;sBADZ,MAAM;gBAkHP,sBAAsB,EAAA,EAAA,EAAA,EAAA,CAAA;;MEhRb,qBAAqB,CAAA;8GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAArB,qBAAqB,EAAA,YAAA,EAAA,CAJf,wBAAwB,EAAE,mBAAmB,aAClD,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEzB,qBAAqB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-rating-indicator.mjs","sources":["../../../../libs/core/src/lib/rating-indicator/constants.ts","../../../../libs/core/src/lib/rating-indicator/pipes/rating-star-label.pipe.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.ts","../../../../libs/core/src/lib/rating-indicator/components/rating-indicator.component.html","../../../../libs/core/src/lib/rating-indicator/rating-indicator.module.ts","../../../../libs/core/src/lib/rating-indicator/fundamental-ngx-core-rating-indicator.ts"],"sourcesContent":["export const INDICATOR_PREFIX = 'fd-rating-indicator';\n\nexport const INDICATOR_CLASSES = {\n halves: `${INDICATOR_PREFIX}--half-star`,\n icon: `${INDICATOR_PREFIX}--icon`,\n hideDynamicText: `${INDICATOR_PREFIX}--hide-dynamic-text`\n};\nexport const INDICATOR_DEFAULT_CAPACITY = 5;\n\nexport type RatingIndicatorSize = 'xs' | 'sm' | 'md' | 'lg' | 'cozy' | 'compact' | 'condensed';\nexport enum RatingIndicatorSizeEnum {\n 'xs',\n 'sm',\n 'md',\n 'lg',\n 'cozy',\n 'compact',\n 'condensed'\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'ratingStarLabel' })\nexport class RatingStarLabelPipe implements PipeTransform {\n /** Transforms the value to a rating value string. */\n transform(index: number, controlsCount: number, useHalves: boolean): string {\n if (useHalves) {\n return `${index / 2 + 0.5} of ${controlsCount / 2}`;\n }\n return `${index + 1} of ${controlsCount}`;\n }\n}\n","import {\n Component,\n OnInit,\n OnChanges,\n Input,\n Output,\n EventEmitter,\n ElementRef,\n ChangeDetectionStrategy,\n SimpleChanges,\n HostBinding,\n ViewEncapsulation,\n ChangeDetectorRef,\n forwardRef\n} from '@angular/core';\nimport { coerceNumberProperty } from '@angular/cdk/coercion';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\n\nimport {\n INDICATOR_DEFAULT_CAPACITY,\n INDICATOR_PREFIX,\n INDICATOR_CLASSES,\n RatingIndicatorSize,\n RatingIndicatorSizeEnum\n} from '../constants';\nimport { CssClassBuilder, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { Nullable } from '@fundamental-ngx/cdk/utils';\nimport { registerFormItemControl, FormItemControl } from '@fundamental-ngx/core/form';\n\nlet ratingUID = 0;\n\ninterface NumberKey<T> {\n [key: number]: T;\n}\n\ninterface RatingViewItem {\n rate: number;\n votes: number;\n}\n\n@Component({\n selector: 'fd-rating-indicator',\n templateUrl: './rating-indicator.component.html',\n styleUrls: ['./rating-indicator.component.scss'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => RatingIndicatorComponent),\n multi: true\n },\n registerFormItemControl(RatingIndicatorComponent)\n ]\n})\nexport class RatingIndicatorComponent\n implements OnInit, OnChanges, CssClassBuilder, ControlValueAccessor, FormItemControl\n{\n /** User's custom classes */\n @Input()\n class: string;\n\n /** Sets [name] attribute of input. */\n @Input()\n name: string;\n\n /**\n * Sets the aria-label attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabel: Nullable<string>;\n\n /**\n * Sets the aria-labelledby attribute to the element.\n */\n @Input()\n @HostBinding('attr.aria-label')\n ariaLabelledBy: Nullable<string>;\n\n /**\n * Sets the aria-disabled attribute to the element.\n * Sets the is-disabled class to the element.\n * Whether the rating indicator is disabled\n */\n @Input()\n @HostBinding('class.is-disabled')\n @HostBinding('attr.aria-disabled')\n disabled = false;\n\n /**\n * Sets the is-display-mode class to the element.\n * Whether the rating indicator is in displayMode\n */\n @Input()\n @HostBinding('class.is-display-mode')\n displayMode = false;\n\n /**\n * Number of rates to display\n */\n @Input()\n set indicatorCapacity(value: number) {\n const val = coerceNumberProperty(value, INDICATOR_DEFAULT_CAPACITY);\n this._indicatorCapacity = val < 1 ? INDICATOR_DEFAULT_CAPACITY : val;\n }\n\n /**\n * Whether or not to display half values.\n */\n @Input()\n allowHalves = false;\n\n /**\n * User's value number of ratings. If provided, Overrides ratingAverage.\n */\n @Input()\n value = 0;\n\n /**\n * Total number of ratings. If provided, will display text showing the total number of ratings.\n */\n @Input()\n totalRatings: number;\n\n /**\n * Rating average\n */\n @Input()\n ratingAverage: number;\n\n /**\n * Object containing key-value pairs where the key is the rating and the value is the total sum of those ratings.\n * Overrides totalRatings and ratingAverage.\n */\n @Input()\n ratings: NumberKey<number>;\n\n /**\n * Whether or not to display the popover that shows the sum of each rating. Requires [ratings] object.\n */\n @Input()\n displayAllRatings = false;\n\n /**\n * Icon class for rated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n ratedIcon: string;\n /**\n * Icon class for unrated icon from fundamental-styles lib https://sap.github.io/fundamental-styles/?path=/docs/components-icon--sizes\n */\n @Input()\n unratedIcon: string;\n\n /**\n * Possible values are 'xs', 'sm', 'md', 'lg', 'cozy', 'compact', 'condensed'\n */\n @Input()\n size: RatingIndicatorSize = 'md';\n\n /**\n * Text divider label between view value and indicator count.\n */\n @Input()\n dynamicTextIndicator = 'of';\n\n /**\n * Fired when the user sets or changes their rating.\n */\n @Output()\n ratingChanged = new EventEmitter<number>();\n\n /** @hidden */\n sizeClass = this._getSizeClass(this.size);\n /** @hidden */\n _rates: { id: string; value: number }[] = [];\n /** @hidden */\n _ratingItems: RatingViewItem[] = [];\n\n /** @hidden */\n private _ratingUID = ratingUID++;\n /** @hidden */\n private _indicatorCapacity = INDICATOR_DEFAULT_CAPACITY;\n /** @hidden */\n private _value = 0;\n /** @hidden */\n private _hideDynamicText = false;\n\n /** @hidden */\n constructor(public readonly elementRef: ElementRef, private readonly _changeDetectorRef: ChangeDetectorRef) {}\n /** @hidden */\n get viewRatingUID(): number {\n return this._ratingUID;\n }\n /** @hidden */\n get indicatorCount(): number {\n return this._indicatorCapacity;\n }\n /** @hidden */\n get viewValue(): number {\n return this._value;\n }\n\n /** @hidden */\n onChange: (value: number) => void = () => {};\n\n /** @hidden */\n onTouched = (): void => {};\n\n /** @hidden */\n ngOnInit(): void {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n this.buildComponentCssClass();\n this._generateRatings();\n }\n\n /** @hidden */\n ngOnChanges(changes: SimpleChanges): void {\n if (\n 'class' in changes ||\n 'size' in changes ||\n 'ratedIcon' in changes ||\n 'unratedIcon' in changes ||\n 'allowHalves' in changes\n ) {\n this.buildComponentCssClass();\n }\n if ('value' in changes) {\n this._value = this._convertToValue();\n }\n if ('indicatorCapacity' in changes) {\n this._rates = this._getRates();\n }\n if ('allowHalves' in changes) {\n this._value = this._convertToValue();\n this._rates = this._getRates();\n }\n\n if ('ratings' in changes) {\n this._generateRatings();\n }\n }\n\n /** @hidden */\n writeValue(value: number): void {\n this._value = this._parseValue(value);\n this._changeDetectorRef.markForCheck();\n }\n\n /** @hidden */\n registerOnChange(fn: (value: number) => void): void {\n this.onChange = fn;\n }\n\n /** @hidden */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n /** @hidden */\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n /** @hidden */\n trackByFn(index: number, item: { id: string; value: number }): number | string {\n return item.id;\n }\n\n /** @hidden */\n onSelect(value: number): void {\n this.value = this._value = value;\n this.onChange(value);\n this.onTouched();\n this.ratingChanged.emit(value);\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n this.sizeClass = this._getSizeClass(this.size);\n\n return [\n INDICATOR_PREFIX,\n this.sizeClass,\n this.allowHalves ? INDICATOR_CLASSES.halves : '',\n !!this.ratedIcon && !!this.unratedIcon ? INDICATOR_CLASSES.icon : '',\n this._hideDynamicText || !this._value ? INDICATOR_CLASSES.hideDynamicText : '',\n this.class\n ];\n }\n\n /**\n * @hidden\n * Generate rating items for popover content if rating object was defined\n */\n private _generateRatings(): void {\n if (!this.ratings) {\n return;\n }\n const ratings = Object.entries(this.ratings)\n .filter(([rate, vote]) => {\n const _rate = +rate;\n return !isNaN(_rate) && !isNaN(+vote) && _rate > 0;\n })\n .map(([rate, votes]) => ({ rate: +rate, votes }));\n if (ratings.length === 0) {\n return;\n }\n const { totalVotes, totalRating } = ratings.reduce(\n (total, rating) => ({\n totalVotes: total.totalVotes + rating.votes,\n totalRating: total.totalRating + rating.rate * rating.votes\n }),\n { totalVotes: 0, totalRating: 0 }\n );\n\n this._ratingItems = ratings;\n this.ratingAverage = totalRating / totalVotes;\n this.totalRatings = totalVotes;\n this._value = this._convertToValue();\n }\n /**\n * @hidden\n * get converted viewValue for render in component template from original value if it still exists, or ratingAverage.\n */\n private _convertToValue(): number {\n return this._parseValue(this.value || this.ratingAverage);\n }\n /**\n * @hidden\n * get converted value from original to view value with depends on halves\n * For example,\n * original value is equal to 2.34, you will get and render 2\n * original value is equal to 3.74, you will get and render 4\n */\n private _parseValue(value: number): number {\n if (!value || value === 0) {\n return 0;\n }\n const integer = Math.floor(value);\n const fractional = value % 1;\n let v = integer;\n\n if (this.allowHalves && fractional > 0.25 && fractional <= 0.5) {\n v = integer + 0.5;\n } else if (fractional > 0.5) {\n v = integer + 1;\n }\n\n return Math.min(this.indicatorCount, v);\n }\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getRates(): { id: string; value: number }[] {\n const withHalves = this.allowHalves ? 2 : 1;\n return Array(this.indicatorCount * withHalves)\n .fill(`rating-${this._ratingUID}`)\n .map((name, index) => ({\n id: `${name}-${index + 1}`,\n value: (index + 1) / withHalves\n }));\n }\n\n /**\n * @hidden\n * get rating icons array with value and unic id\n */\n private _getSizeClass(size: RatingIndicatorSize): string {\n return `${INDICATOR_PREFIX}--${size in RatingIndicatorSizeEnum ? size : 'md'}`;\n }\n}\n","<!-- role=\"application\" is used in order to let user to change value with left/right arrows in JAWS, since JAWS ovverrides these actions -->\n<div class=\"fd-rating-indicator__container\" role=\"application\" aria-roledescription=\"Rating indicator\">\n <!-- Zero value if we don't have provided value from user, `ratingAverage` or `ratings` -->\n <ng-container *ngTemplateOutlet=\"zeroRate\"></ng-container>\n <!-- Available rate values -->\n <ng-container *ngFor=\"let rate of _rates; index as i; trackBy: trackByFn\">\n <input\n [attr.aria-label]=\"i | ratingStarLabel : _rates.length : allowHalves\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input\"\n [disabled]=\"disabled\"\n [id]=\"rate.id\"\n name=\"rating-{{ viewRatingUID }}\"\n [value]=\"rate.value\"\n [checked]=\"viewValue === rate.value\"\n (click)=\"onSelect(rate.value)\"\n />\n <label class=\"fd-rating-indicator__label\" [for]=\"rate.id\" aria-hidden=\"true\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n</div>\n<!-- Popover if displayAllRatings is true and we have ratings object -->\n<span\n [fdPopoverTrigger]=\"allRatingContent\"\n *ngIf=\"displayAllRatings && _ratingItems?.length; else dynamicText\"\n class=\"fd-rating-indicator__dynamic-text\"\n>\n (<span aria-label=\"Total raiting\" fd-link>{{ totalRatings }}</span\n >)\n</span>\n<fd-popover\n #allRatingContent\n [triggers]=\"['mouseenter', 'mouseleave']\"\n [noArrow]=\"false\"\n placement=\"top\"\n additionalBodyClass=\"fd-rating-indicator__popover\"\n>\n <div class=\"fd-rating-indicator__sum-row\" [class]=\"sizeClass\" *ngFor=\"let rating of _ratingItems\">\n <div class=\"fd-rating-indicator__container\">\n <ng-container *ngFor=\"let rate of _rates; trackBy: trackByFn\">\n <span\n [class.fd-rating-indicator__input-checked]=\"rate.value === rating.rate\"\n class=\"fd-rating-indicator__input\"\n ></span>\n <label class=\"fd-rating-indicator__label\">\n <i *ngIf=\"ratedIcon\" class=\"fd-rating-indicator__label-rated\" [class]=\"unratedIcon\"></i>\n <i *ngIf=\"unratedIcon\" class=\"fd-rating-indicator__label-unrated\" [class]=\"ratedIcon\"></i>\n </label>\n </ng-container>\n </div>\n ({{ rating.votes }})\n </div>\n</fd-popover>\n\n<ng-template #dynamicText>\n <span *ngIf=\"totalRatings\" class=\"fd-rating-indicator__dynamic-text\">({{ totalRatings }})</span>\n <span *ngIf=\"!totalRatings\" class=\"fd-rating-indicator__dynamic-text\"\n >({{ viewValue }} {{ dynamicTextIndicator }} {{ indicatorCount }})</span\n >\n</ng-template>\n<ng-template #zeroRate let-halves=\"halves\">\n <input\n aria-label=\"Reset to zero\"\n role=\"button\"\n type=\"radio\"\n class=\"fd-rating-indicator__input fd-rating-indicator__input--zero-rating\"\n (click)=\"onSelect(0)\"\n [disabled]=\"disabled\"\n name=\"rating-{{ viewRatingUID }}{{ halves ? '-halves' : '' }}\"\n [checked]=\"viewValue === 0\"\n />\n <label class=\"fd-rating-indicator__label fd-rating-indicator__label--zero-rating\" aria-hidden=\"true\"></label>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { PopoverModule } from '@fundamental-ngx/core/popover';\nimport { RatingIndicatorComponent } from './components/rating-indicator.component';\nimport { RatingStarLabelPipe } from './pipes/rating-star-label.pipe';\n\n@NgModule({\n declarations: [RatingIndicatorComponent, RatingStarLabelPipe],\n imports: [CommonModule, PopoverModule],\n exports: [RatingIndicatorComponent]\n})\nexport class RatingIndicatorModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i3.RatingStarLabelPipe"],"mappings":";;;;;;;;;;;;AAAO,MAAM,gBAAgB,GAAG,sBAAsB;AAEzC,MAAA,iBAAiB,GAAG;IAC7B,MAAM,EAAE,CAAG,EAAA,gBAAgB,CAAa,WAAA,CAAA;IACxC,IAAI,EAAE,CAAG,EAAA,gBAAgB,CAAQ,MAAA,CAAA;IACjC,eAAe,EAAE,CAAG,EAAA,gBAAgB,CAAqB,mBAAA,CAAA;EAC3D;AACK,MAAM,0BAA0B,GAAG,EAAE;IAGhC,wBAQX;AARD,CAAA,UAAY,uBAAuB,EAAA;AAC/B,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAAA,CAAA,CAAA,GAAA,IAAI,CAAA;AACJ,IAAA,uBAAA,CAAA,uBAAA,CAAA,IAAA,CAAA,GAA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BAON,SAAS,EAAA,CAAA;sBADR,KAAK;gBAMN,WAAW,EAAA,CAAA;sBADV,KAAK;gBAON,IAAI,EAAA,CAAA;sBADH,KAAK;gBAON,oBAAoB,EAAA,CAAA;sBADnB,KAAK;gBAON,aAAa,EAAA,CAAA;sBADZ,MAAM;gBAkHP,sBAAsB,EAAA,EAAA,EAAA,EAAA,CAAA;;MEhRb,qBAAqB,CAAA;8GAArB,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAArB,qBAAqB,EAAA,YAAA,EAAA,CAJf,wBAAwB,EAAE,mBAAmB,aAClD,YAAY,EAAE,aAAa,CAAA,EAAA,OAAA,EAAA,CAC3B,wBAAwB,CAAA,EAAA,CAAA,CAAA,EAAA;+GAEzB,qBAAqB,EAAA,OAAA,EAAA,CAHpB,YAAY,EAAE,aAAa,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAG5B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE,CAAC,wBAAwB,EAAE,mBAAmB,CAAC;AAC7D,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,aAAa,CAAC;oBACtC,OAAO,EAAE,CAAC,wBAAwB,CAAC;AACtC,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { inject, PLATFORM_ID, Directive, Input, HostBinding, HostListener, NgModule } from '@angular/core';
|
|
2
|
+
import { inject, CSP_NONCE, PLATFORM_ID, Directive, Input, HostBinding, HostListener, NgModule } from '@angular/core';
|
|
3
3
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
4
4
|
import { DOCUMENT, isPlatformBrowser } from '@angular/common';
|
|
5
5
|
import scrollbarStyles from 'fundamental-styles/dist/js/scrollbar';
|
|
@@ -60,12 +60,6 @@ class ScrollbarDirective {
|
|
|
60
60
|
}
|
|
61
61
|
return this._overflow;
|
|
62
62
|
}
|
|
63
|
-
/** @hidden */
|
|
64
|
-
onScroll(event) {
|
|
65
|
-
if (this._inPopover) {
|
|
66
|
-
event.stopImmediatePropagation();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
63
|
/**
|
|
70
64
|
* @hidden
|
|
71
65
|
*/
|
|
@@ -78,6 +72,10 @@ class ScrollbarDirective {
|
|
|
78
72
|
/** @hidden */
|
|
79
73
|
this._document = inject(DOCUMENT);
|
|
80
74
|
/** @hidden */
|
|
75
|
+
this._csp_nonce = inject(CSP_NONCE, {
|
|
76
|
+
optional: true
|
|
77
|
+
});
|
|
78
|
+
/** @hidden */
|
|
81
79
|
this._noHorizontalScroll = false;
|
|
82
80
|
/** @hidden */
|
|
83
81
|
this._noVerticalScroll = false;
|
|
@@ -88,10 +86,19 @@ class ScrollbarDirective {
|
|
|
88
86
|
if (!styleSheet && isPlatformBrowser(platform)) {
|
|
89
87
|
styleSheet = renderer2.createElement('style');
|
|
90
88
|
styleSheet.innerHTML = scrollbarStyles.cssSource;
|
|
89
|
+
if (this._csp_nonce) {
|
|
90
|
+
styleSheet?.setAttribute('nonce', this._csp_nonce);
|
|
91
|
+
}
|
|
91
92
|
renderer2.appendChild(this._document.head, styleSheet);
|
|
92
93
|
}
|
|
93
94
|
}
|
|
94
95
|
/** @hidden */
|
|
96
|
+
onScroll(event) {
|
|
97
|
+
if (this._inPopover) {
|
|
98
|
+
event.stopImmediatePropagation();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
/** @hidden */
|
|
95
102
|
ngOnDestroy() {
|
|
96
103
|
if (--scrollbarElementsQuantity === 0) {
|
|
97
104
|
styleSheet?.remove();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-scrollbar.mjs","sources":["../../../../libs/core/src/lib/scrollbar/scrollbar.directive.ts","../../../../libs/core/src/lib/scrollbar/scrollbar.module.ts","../../../../libs/core/src/lib/scrollbar/fundamental-ngx-core-scrollbar.ts"],"sourcesContent":["import {\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n Renderer2\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport scrollbarStyles from 'fundamental-styles/dist/js/scrollbar';\nimport { CdkScrollable } from '@angular/cdk/overlay';\n\nexport type ScrollbarOverflowOptions = 'auto' | 'scroll' | 'hidden';\n\nlet scrollbarElementsQuantity = 0;\nlet styleSheet: HTMLStyleElement | null = null;\n\n/**\n * The scrollbar directive.\n *\n * Children usage:\n * ```html\n * <div fd-scrollbar>\n * <div fd-scrollbar noVerticalScroll>\n * <div fd-scrollbar [noVerticalScroll]=\"true\">\n * <div fd-scrollbar noHorizontalScroll>\n * <div fd-scrollbar [noHorizontalScroll]=\"true\">\n * ```\n */\n@Directive({\n selector: '[fdScrollbar], [fd-scrollbar]',\n host: {\n class: 'fd-scrollbar'\n },\n hostDirectives: [CdkScrollable],\n standalone: true\n})\nexport class ScrollbarDirective implements OnDestroy {\n /** Whether overflow horizontal content should be hidden. */\n @Input()\n set noHorizontalScroll(value: BooleanInput) {\n this._noHorizontalScroll = coerceBooleanProperty(value);\n }\n\n get noHorizontalScroll(): boolean {\n return this._noHorizontalScroll;\n }\n\n /** Whether overflow vertical content should be hidden. */\n @Input()\n set noVerticalScroll(value: BooleanInput) {\n this._noVerticalScroll = coerceBooleanProperty(value);\n }\n\n get noVerticalScroll(): boolean {\n return this._noVerticalScroll;\n }\n\n /** Whether scrollbars should be visible even if content fits. */\n @Input()\n set alwaysVisible(value: BooleanInput) {\n this._alwaysVisible = coerceBooleanProperty(value);\n }\n\n get alwaysVisible(): boolean {\n return this._alwaysVisible;\n }\n\n /** Whether to force apply tabindex attribute. */\n @Input()\n overrideTabindex = true;\n\n /** @hidden */\n @HostBinding('attr.tabindex')\n get _tabindex(): number | null {\n return this.overrideTabindex ? 0 : null;\n }\n\n /** @hidden */\n @HostBinding('style.overflow-x')\n get _overflowX(): ScrollbarOverflowOptions {\n if (this.noHorizontalScroll) {\n return 'hidden';\n }\n\n return this._overflow;\n }\n\n /** @hidden */\n @HostBinding('style.overflow-y')\n get _overflowY(): ScrollbarOverflowOptions {\n if (this.noVerticalScroll) {\n return 'hidden';\n }\n\n return this._overflow;\n }\n\n /** @hidden */\n _inPopover = false;\n\n /** @hidden */\n private _document: Document = inject(DOCUMENT);\n /** @hidden */\n private
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-scrollbar.mjs","sources":["../../../../libs/core/src/lib/scrollbar/scrollbar.directive.ts","../../../../libs/core/src/lib/scrollbar/scrollbar.module.ts","../../../../libs/core/src/lib/scrollbar/fundamental-ngx-core-scrollbar.ts"],"sourcesContent":["import {\n CSP_NONCE,\n Directive,\n ElementRef,\n HostBinding,\n HostListener,\n inject,\n Input,\n OnDestroy,\n PLATFORM_ID,\n Renderer2\n} from '@angular/core';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport scrollbarStyles from 'fundamental-styles/dist/js/scrollbar';\nimport { CdkScrollable } from '@angular/cdk/overlay';\n\nexport type ScrollbarOverflowOptions = 'auto' | 'scroll' | 'hidden';\n\nlet scrollbarElementsQuantity = 0;\nlet styleSheet: HTMLStyleElement | null = null;\n\n/**\n * The scrollbar directive.\n *\n * Children usage:\n * ```html\n * <div fd-scrollbar>\n * <div fd-scrollbar noVerticalScroll>\n * <div fd-scrollbar [noVerticalScroll]=\"true\">\n * <div fd-scrollbar noHorizontalScroll>\n * <div fd-scrollbar [noHorizontalScroll]=\"true\">\n * ```\n */\n@Directive({\n selector: '[fdScrollbar], [fd-scrollbar]',\n host: {\n class: 'fd-scrollbar'\n },\n hostDirectives: [CdkScrollable],\n standalone: true\n})\nexport class ScrollbarDirective implements OnDestroy {\n /** Whether overflow horizontal content should be hidden. */\n @Input()\n set noHorizontalScroll(value: BooleanInput) {\n this._noHorizontalScroll = coerceBooleanProperty(value);\n }\n\n get noHorizontalScroll(): boolean {\n return this._noHorizontalScroll;\n }\n\n /** Whether overflow vertical content should be hidden. */\n @Input()\n set noVerticalScroll(value: BooleanInput) {\n this._noVerticalScroll = coerceBooleanProperty(value);\n }\n\n get noVerticalScroll(): boolean {\n return this._noVerticalScroll;\n }\n\n /** Whether scrollbars should be visible even if content fits. */\n @Input()\n set alwaysVisible(value: BooleanInput) {\n this._alwaysVisible = coerceBooleanProperty(value);\n }\n\n get alwaysVisible(): boolean {\n return this._alwaysVisible;\n }\n\n /** Whether to force apply tabindex attribute. */\n @Input()\n overrideTabindex = true;\n\n /** @hidden */\n @HostBinding('attr.tabindex')\n get _tabindex(): number | null {\n return this.overrideTabindex ? 0 : null;\n }\n\n /** @hidden */\n @HostBinding('style.overflow-x')\n get _overflowX(): ScrollbarOverflowOptions {\n if (this.noHorizontalScroll) {\n return 'hidden';\n }\n\n return this._overflow;\n }\n\n /** @hidden */\n @HostBinding('style.overflow-y')\n get _overflowY(): ScrollbarOverflowOptions {\n if (this.noVerticalScroll) {\n return 'hidden';\n }\n\n return this._overflow;\n }\n\n /** @hidden */\n _inPopover = false;\n\n /** @hidden */\n private _document: Document = inject(DOCUMENT);\n\n /** @hidden */\n private readonly _csp_nonce = inject(CSP_NONCE, {\n optional: true\n });\n\n /** @hidden */\n private _noHorizontalScroll = false;\n\n /** @hidden */\n private _noVerticalScroll = false;\n\n /** @hidden */\n private _alwaysVisible = false;\n\n /**\n * @hidden\n */\n constructor(private _elementRef: ElementRef<HTMLElement>, renderer2: Renderer2) {\n scrollbarElementsQuantity++;\n const platform = inject(PLATFORM_ID);\n if (!styleSheet && isPlatformBrowser(platform)) {\n styleSheet = renderer2.createElement('style');\n styleSheet!.innerHTML = scrollbarStyles.cssSource;\n if (this._csp_nonce) {\n styleSheet?.setAttribute('nonce', this._csp_nonce);\n }\n renderer2.appendChild(this._document.head, styleSheet);\n }\n }\n\n /** @hidden */\n @HostListener('scroll', ['$event'])\n onScroll(event: Event): void {\n if (this._inPopover) {\n event.stopImmediatePropagation();\n }\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n if (--scrollbarElementsQuantity === 0) {\n styleSheet?.remove();\n styleSheet = null;\n }\n }\n\n /** method to invoke scroll */\n scroll(options: ScrollToOptions): void {\n this._elementRef.nativeElement.scroll(options);\n }\n\n /** @hidden */\n private get _overflow(): ScrollbarOverflowOptions {\n if (this.alwaysVisible) {\n return 'scroll';\n }\n\n return 'auto';\n }\n}\n","import { NgModule } from '@angular/core';\n\nimport { ScrollbarDirective } from './scrollbar.directive';\n\n@NgModule({\n imports: [ScrollbarDirective],\n exports: [ScrollbarDirective]\n})\nexport class ScrollbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAmBA,IAAI,yBAAyB,GAAG,CAAC,CAAC;AAClC,IAAI,UAAU,GAA4B,IAAI,CAAC;AAE/C;;;;;;;;;;;AAWG;MASU,kBAAkB,CAAA;;IAE3B,IACI,kBAAkB,CAAC,KAAmB,EAAA;AACtC,QAAA,IAAI,CAAC,mBAAmB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KAC3D;AAED,IAAA,IAAI,kBAAkB,GAAA;QAClB,OAAO,IAAI,CAAC,mBAAmB,CAAC;KACnC;;IAGD,IACI,gBAAgB,CAAC,KAAmB,EAAA;AACpC,QAAA,IAAI,CAAC,iBAAiB,GAAG,qBAAqB,CAAC,KAAK,CAAC,CAAC;KACzD;AAED,IAAA,IAAI,gBAAgB,GAAA;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;KACjC;;IAGD,IACI,aAAa,CAAC,KAAmB,EAAA;AACjC,QAAA,IAAI,CAAC,cAAc,GAAG,qBAAqB,CAAC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