@testgorilla/tgo-ui 4.1.3-beta → 4.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion/accordion.component.d.ts +2 -2
- package/components/accordion/accordion.component.module.d.ts +2 -2
- package/components/ai-feedback/ai-feedback.module.d.ts +2 -2
- package/components/alert-banner/alert-banner.component.d.ts +2 -2
- package/components/alert-banner/alert-banner.component.module.d.ts +3 -3
- package/components/autocomplete/autocomplete.component.d.ts +2 -2
- package/components/autocomplete/autocomplete.component.module.d.ts +10 -9
- package/components/avatar/avatar.component.d.ts +2 -2
- package/components/avatar/avatar.component.module.d.ts +4 -4
- package/components/avatar/avatar.model.d.ts +2 -2
- package/components/badge/badge.component.d.ts +2 -2
- package/components/badge/badge.component.module.d.ts +1 -1
- package/components/breadcrumb/breadcrumb.component.d.ts +5 -3
- package/components/breadcrumb/breadcrumb.component.module.d.ts +4 -4
- package/components/button/button.component.d.ts +2 -2
- package/components/button/button.component.module.d.ts +5 -4
- package/components/button/button.model.d.ts +1 -1
- package/components/card/card.component.d.ts +2 -2
- package/components/card/card.component.module.d.ts +1 -1
- package/components/card/card.model.d.ts +1 -1
- package/components/checkbox/checkbox.component.d.ts +2 -2
- package/components/checkbox/checkbox.component.module.d.ts +8 -6
- package/components/checklist/checklist.component.d.ts +2 -2
- package/components/confirm-dialog/confirm-dialog.component.d.ts +4 -4
- package/components/confirm-dialog/confirm-dialog.component.module.d.ts +2 -2
- package/components/confirm-dialog/confirm-dialog.model.d.ts +3 -3
- package/components/datepicker/datepicker.component.d.ts +1 -1
- package/components/datepicker/datepicker.component.module.d.ts +3 -3
- package/components/dialog/dialog.component.d.ts +4 -4
- package/components/dialog/dialog.component.module.d.ts +2 -2
- package/components/dialog/dialog.model.d.ts +1 -1
- package/components/dialog/dialog.service.d.ts +1 -1
- package/components/divider/divider.component.d.ts +1 -1
- package/components/donut-chart/donut-chart.component.d.ts +5 -17
- package/components/dropdown/dropdown.component.d.ts +2 -2
- package/components/dropdown/dropdown.component.module.d.ts +6 -5
- package/components/elevation-shadow/elevation-shadow.component.d.ts +1 -1
- package/components/empty-state/empty-state.component.d.ts +3 -3
- package/components/empty-state/empty-state.component.module.d.ts +3 -3
- package/components/field/field.component.d.ts +4 -4
- package/components/field/field.component.module.d.ts +8 -6
- package/components/file-upload/file-upload.component.d.ts +1 -1
- package/components/file-upload/file-upload.component.module.d.ts +3 -3
- package/components/filter-button/filter-button.component.d.ts +3 -3
- package/components/filter-button/filter-button.component.module.d.ts +8 -7
- package/components/filter-button/filter-button.model.d.ts +1 -1
- package/components/gaussian-chart/gaussian-chart.component.d.ts +1 -1
- package/components/gaussian-chart/gaussian-chart.module.d.ts +2 -2
- package/components/icon/icon.component.d.ts +2 -2
- package/components/icon-label/icon-label.component.d.ts +2 -2
- package/components/icon-label/icon-label.component.module.d.ts +1 -1
- package/components/inline-field/inline-field.component.d.ts +3 -3
- package/components/inline-field/inline-field.component.module.d.ts +3 -3
- package/components/inline-field/inline-field.model.d.ts +1 -1
- package/components/logo/logo.component.d.ts +1 -1
- package/components/multi-input/multi-input.component.module.d.ts +8 -7
- package/components/navbar/mobile-navbar-side-sheet/mobile-navbar-side-sheet.component.d.ts +2 -2
- package/components/navbar/navbar.component.d.ts +3 -3
- package/components/navbar/navbar.component.module.d.ts +6 -6
- package/components/navbar/navbar.model.d.ts +2 -2
- package/components/overflow-menu/overflow-menu.component.d.ts +3 -3
- package/components/overflow-menu/overflow-menu.component.module.d.ts +5 -4
- package/components/overflow-menu/overflow-menu.model.d.ts +1 -1
- package/components/page-header/page-header.component.d.ts +1 -1
- package/components/page-header/page-header.component.module.d.ts +2 -2
- package/components/paginator/paginator.component.d.ts +1 -1
- package/components/password-criteria/password.component.module.d.ts +4 -4
- package/components/password-strength/password-strength.component.d.ts +2 -2
- package/components/password-strength/password-strength.component.module.d.ts +3 -3
- package/components/phone-input/phone-input.component.d.ts +1 -1
- package/components/phone-input/phone-input.component.module.d.ts +4 -4
- package/components/progress-bar/progress-bar.component.d.ts +1 -1
- package/components/progress-bar/progress-bar.component.module.d.ts +1 -1
- package/components/prompt/prompt.component.d.ts +1 -1
- package/components/prompt/prompt.module.d.ts +7 -7
- package/components/radial-progress/radial-progress.component.d.ts +2 -2
- package/components/radial-progress/radial-progress.component.module.d.ts +1 -1
- package/components/radio-button/radio-button.component.d.ts +2 -2
- package/components/radio-button/radio-button.component.module.d.ts +2 -2
- package/components/rating/rating.component.d.ts +1 -1
- package/components/scale/scale.component.d.ts +1 -1
- package/components/scale-table/scale-table.component.d.ts +1 -1
- package/components/segmented-bar/segmented-bar.component.d.ts +1 -1
- package/components/segmented-bar/segmented-bar.component.module.d.ts +2 -2
- package/components/segmented-bar/segmented-bar.model.d.ts +1 -1
- package/components/segmented-button/segmented-button.component.d.ts +1 -1
- package/components/selectable-card/selectable-card.component.d.ts +6 -2
- package/components/selectable-card/selectable-card.component.module.d.ts +2 -2
- package/components/side-panel/side-panel.component.d.ts +1 -1
- package/components/side-sheet/side-sheet.component.d.ts +1 -1
- package/components/side-sheet/side-sheet.component.module.d.ts +4 -4
- package/components/skeleton/skeleton.component.d.ts +2 -2
- package/components/slider/slider.component.d.ts +1 -1
- package/components/snackbar/snackbar.component.d.ts +2 -2
- package/components/snackbar/snackbar.component.module.d.ts +3 -3
- package/components/snackbar/snackbar.service.d.ts +1 -1
- package/components/spider-chart/spider-chart.component.d.ts +1 -1
- package/components/spider-chart/spider-chart.module.d.ts +2 -2
- package/components/spinner/spinner.component.d.ts +2 -2
- package/components/spinner/spinner.module.d.ts +2 -2
- package/components/step/step.component.d.ts +3 -3
- package/components/step/step.component.module.d.ts +2 -2
- package/components/stepper/stepper.component.d.ts +1 -1
- package/components/stepper/stepper.component.module.d.ts +3 -3
- package/components/stepper/stepper.model.d.ts +1 -1
- package/components/table/table.component.d.ts +1 -1
- package/components/table/table.component.module.d.ts +5 -5
- package/components/tabs/tab.directive.d.ts +1 -1
- package/components/tabs/tabs.component.d.ts +1 -1
- package/components/tabs/tabs.component.module.d.ts +3 -3
- package/components/tabs/tabs.model.d.ts +1 -1
- package/components/tag/tag.component.d.ts +2 -2
- package/components/tag/tag.component.module.d.ts +3 -3
- package/components/toggle/toggle.component.d.ts +1 -1
- package/components/toggle/toggle.component.module.d.ts +5 -4
- package/components/tooltip/tooltip.component.d.ts +1 -1
- package/components/tooltip/tooltip.component.module.d.ts +3 -2
- package/components/universal-skills-report/universal-skills-report.component.d.ts +2 -2
- package/components/universal-skills-report/universal-skills-report.component.module.d.ts +3 -3
- package/components/universal-skills-spider-charts/universal-skills-spider-charts.component.d.ts +2 -2
- package/components/universal-skills-spider-charts/universal-skills-spider-charts.component.module.d.ts +4 -4
- package/components/validation-error/validation-error.component.d.ts +1 -1
- package/components/validation-error/validation-error.module.d.ts +2 -2
- package/fesm2022/testgorilla-tgo-ui.mjs +22749 -3564
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/models/application-theme.model.d.ts +1 -0
- package/package.json +9 -142
- package/{components/core → pipes}/ui-translate.pipe.d.ts +1 -1
- package/projects/tgo-canopy-ui/assets/i18n/da-dk.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/de.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/en.json +829 -0
- package/projects/tgo-canopy-ui/assets/i18n/es.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/fr.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/it-it.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/ja-jp.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/nb-no.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/nl.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/pl-pl.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/pt-br.json +820 -0
- package/projects/tgo-canopy-ui/assets/i18n/sv-se.json +820 -0
- package/public-api.d.ts +87 -0
- package/utils/alert-bars.utils.d.ts +1 -1
- package/components/autocomplete/index.d.ts +0 -5
- package/components/autocomplete/public-api.d.ts +0 -4
- package/components/avatar/index.d.ts +0 -5
- package/components/avatar/public-api.d.ts +0 -4
- package/components/badge/index.d.ts +0 -5
- package/components/badge/public-api.d.ts +0 -4
- package/components/button/color-contrast.d.ts +0 -28
- package/components/button/index.d.ts +0 -5
- package/components/button/public-api.d.ts +0 -5
- package/components/card/index.d.ts +0 -5
- package/components/card/public-api.d.ts +0 -4
- package/components/checkbox/index.d.ts +0 -5
- package/components/checkbox/public-api.d.ts +0 -4
- package/components/core/application-theme.model.d.ts +0 -7
- package/components/core/has-validation-error.pipe.d.ts +0 -15
- package/components/core/index.d.ts +0 -5
- package/components/core/keyboard-events.model.d.ts +0 -11
- package/components/core/public-api.d.ts +0 -12
- package/components/core/select-text.directive.d.ts +0 -19
- package/components/divider/index.d.ts +0 -5
- package/components/divider/public-api.d.ts +0 -4
- package/components/dropdown/index.d.ts +0 -5
- package/components/dropdown/public-api.d.ts +0 -4
- package/components/elevation-shadow/index.d.ts +0 -5
- package/components/elevation-shadow/public-api.d.ts +0 -3
- package/components/empty-state/index.d.ts +0 -5
- package/components/empty-state/public-api.d.ts +0 -4
- package/components/field/index.d.ts +0 -5
- package/components/field/public-api.d.ts +0 -4
- package/components/filter-button/index.d.ts +0 -5
- package/components/filter-button/public-api.d.ts +0 -4
- package/components/icon/index.d.ts +0 -5
- package/components/icon/public-api.d.ts +0 -5
- package/components/inline-field/index.d.ts +0 -5
- package/components/inline-field/public-api.d.ts +0 -4
- package/components/logo/index.d.ts +0 -5
- package/components/logo/public-api.d.ts +0 -4
- package/components/paginator/index.d.ts +0 -5
- package/components/paginator/public-api.d.ts +0 -3
- package/components/progress-bar/index.d.ts +0 -5
- package/components/progress-bar/public-api.d.ts +0 -3
- package/components/radial-progress/index.d.ts +0 -5
- package/components/radial-progress/public-api.d.ts +0 -4
- package/components/radio-button/index.d.ts +0 -5
- package/components/radio-button/public-api.d.ts +0 -4
- package/components/rating/index.d.ts +0 -5
- package/components/rating/public-api.d.ts +0 -3
- package/components/scale/index.d.ts +0 -5
- package/components/scale/public-api.d.ts +0 -3
- package/components/segmented-bar/index.d.ts +0 -5
- package/components/segmented-bar/public-api.d.ts +0 -4
- package/components/segmented-button/index.d.ts +0 -5
- package/components/segmented-button/public-api.d.ts +0 -4
- package/components/skeleton/index.d.ts +0 -5
- package/components/skeleton/public-api.d.ts +0 -3
- package/components/slider/index.d.ts +0 -5
- package/components/slider/public-api.d.ts +0 -4
- package/components/spinner/index.d.ts +0 -5
- package/components/spinner/public-api.d.ts +0 -4
- package/components/tag/index.d.ts +0 -5
- package/components/tag/public-api.d.ts +0 -4
- package/components/toggle/index.d.ts +0 -5
- package/components/toggle/public-api.d.ts +0 -3
- package/components/tooltip/index.d.ts +0 -5
- package/components/tooltip/public-api.d.ts +0 -5
- package/components/validation-error/index.d.ts +0 -5
- package/components/validation-error/public-api.d.ts +0 -3
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +0 -1045
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +0 -173
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +0 -180
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs +0 -635
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs +0 -164
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +0 -402
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs +0 -10807
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +0 -88
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +0 -434
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +0 -75
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +0 -326
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +0 -638
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +0 -314
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +0 -1496
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +0 -367
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +0 -218
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +0 -110
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +0 -128
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +0 -152
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +0 -373
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +0 -150
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +0 -158
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +0 -137
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +0 -128
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +0 -81
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +0 -274
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +0 -108
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +0 -239
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +0 -216
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +0 -272
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +0 -1
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +0 -79
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +0 -1
- /package/{components/core → directives}/digits-only.directive.d.ts +0 -0
- /package/{components/core → directives}/ellipse-text.directive.d.ts +0 -0
- /package/{components/autocomplete → directives}/select-text.directive.d.ts +0 -0
- /package/{components/core → models}/checkbox.model.d.ts +0 -0
- /package/{components/avatar → pipes}/name-initials.pipe.d.ts +0 -0
- /package/{components/icon → services}/icons.service.d.ts +0 -0
- /package/{components/core → utils}/autocomplete-utils.d.ts +0 -0
- /package/{components/core → utils}/hex-to-rgb.d.ts +0 -0
- /package/{components/core → utils/localization}/language.model.d.ts +0 -0
- /package/{components/core → utils/localization}/language.service.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-radio-button.mjs","sources":["../../../components/radio-button/radio-button.component.ts","../../../components/radio-button/radio-button.component.html","../../../components/radio-button/radio-button.component.module.ts","../../../components/radio-button/testgorilla-tgo-ui-components-radio-button.ts"],"sourcesContent":["/* eslint-disable no-underscore-dangle */\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n ChangeDetectorRef,\n Component,\n DestroyRef,\n EventEmitter,\n Host,\n HostBinding,\n HostListener,\n Inject,\n Input,\n NgZone,\n OnChanges,\n OnDestroy,\n OnInit,\n Optional,\n Output,\n Self,\n SimpleChanges,\n ViewChild,\n} from '@angular/core';\nimport { MatRadioButton } from '@angular/material/radio';\nimport { RadioButtonEventType } from './radio-button.model';\nimport { ApplicationTheme } from \"@testgorilla/tgo-ui/components/core\";\nimport { ControlValueAccessor, NgControl } from \"@angular/forms\";\nimport { takeUntilDestroyed } from \"@angular/core/rxjs-interop\";\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Alignment } from '@testgorilla/tgo-ui/components/core';\nimport { FocusMonitor } from '@angular/cdk/a11y';\n\n@Component({\n selector: 'ui-radio-button',\n templateUrl: './radio-button.component.html',\n styleUrls: ['./radio-button.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n // Needs to be removed since it causes some a11y issues (https://github.com/angular/components/issues/21266).\n '[attr.tabindex]': 'null',\n '[attr.aria-label]': 'null',\n '[attr.aria-labelledby]': 'null',\n '[attr.aria-describedby]': 'null',\n // Note: under normal conditions focus shouldn't land on this element, however it may be\n // programmatically set, for example inside of a focus trap, in this case we want to forward\n // the focus to the mat-radio-button element.\n '(focus)': 'radioElement.focus()',\n },\n standalone: false\n})\nexport class RadioButtonComponent implements OnInit, OnChanges, ControlValueAccessor, AfterViewInit, OnDestroy {\n @HostListener('click', ['$event'])\n onHostClick(event: any): void {\n if (event.target?.classList?.value?.includes?.('mat-mdc-radio-button') || event.target?.classList?.value?.includes?.('mdc-form-field')) {\n this.radioElement._inputElement.nativeElement.click();\n }\n }\n /**\n * Determines whether the radio button is disabled.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() disabled = false;\n\n /**\n * Determines whether the radio button is checked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n //@Input() selected = false;\n\n _selected = false;\n @Input()\n get selected() {\n return this._selected;\n }\n set selected(selected: boolean) {\n this._selected = selected;\n }\n\n /**\n * Determines whether the radio button can be unchecked.\n * Default: false.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() allowUnselect = false;\n\n /**\n * Determines the radio button color.\n * Default: Test Gorilla primary color.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @HostBinding('style.--color')\n @Input()\n companyColor: string | null = null;\n\n /**\n * Used to group radios for unique selection.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() name = '';\n\n /**\n * Text content will be applied to the input element if present.\n *\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() label = '';\n\n /**\n * Determines whether the radio button is a multiple choice cell.\n * Default: false\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() multiple = false;\n\n /**\n * Determines value of the radio button.\n * Default: false\n *\n * @type {any}\n * @memberof RadioButtonComponent\n */\n @Input() value: any;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof RadioButtonComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaLabel: string;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * Defines if checkbox has error\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hasError = false;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaLabelledby = '';\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {string}\n * @memberof RadioButtonComponent\n */\n @Input() ariaDescribedby = '';\n\n /**\n * Truncate text if it is too long\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() truncateText = false;\n\n /**\n * Text alignment\n * @type {'center' | 'top'}\n * @memberof RadioButtonComponent\n */\n @Input() alignment: Alignment = 'center';\n\n /**\n * Sets the tab index for the checkbox component.\n * This determines the order in which elements receive focus when the user navigates through them using the Tab key.\n * Default value is 0.\n *\n * @type {number}\n * @memberof RadioButtonComponent\n */\n @Input() tabIndex = 0;\n\n /**\n * Show tooltip when label is truncated\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Input() hideTooltipOnEllipsis = false;\n\n /**\n * Event emitted when the checked state of the radio button changes.\n *\n * @type {boolean}\n * @memberof RadioButtonComponent\n */\n @Output() changeRadio = new EventEmitter<RadioButtonEventType>();\n\n classMultiple: string;\n showTooltip = false;\n protected origin: string | null = null;\n\n @ViewChild('radio') radioElement: MatRadioButton;\n @ViewChild('tooltip') tooltipElement: MatTooltip;\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n @Optional() @Self() public ngControl: NgControl,\n @Optional() @Host() public hostNgControl: NgControl,\n private destroyRef: DestroyRef,\n private focusMonitor: FocusMonitor,\n private ngZone: NgZone,\n private cdr: ChangeDetectorRef,\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n ngOnInit() {\n this.checkHost();\n this.classMultiple = this.setClass();\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['selected']) {\n this.classMultiple = this.setClass();\n }\n this.setCompanyColor();\n }\n\n ngAfterViewInit() {\n this.radioElement._inputElement.nativeElement.setAttribute('role', 'radio');\n this.radioElement._inputElement.nativeElement.onclick = () => {\n this.clickRadio();\n };\n\n this.focusMonitor.monitor(this.radioElement._inputElement.nativeElement).pipe(\n takeUntilDestroyed(this.destroyRef),\n ).subscribe(origin =>\n this.ngZone.run(() => {\n this.origin = origin;\n this.cdr.markForCheck();\n this.onFocus(origin === 'keyboard');\n }),\n );\n }\n\n ngOnDestroy(): void {\n this.focusMonitor.stopMonitoring(this.radioElement._inputElement.nativeElement);\n }\n\n //Click method\n clickRadio() {\n if (this.allowUnselect) {\n this.radioElement.checked = !this.radioElement.checked;\n this._selected = this.radioElement.checked;\n this.classMultiple = this.setClass();\n this.selected = this.radioElement.checked;\n this.changeRadio?.emit({ optionName: this.radioElement.value, optionChecked: this.radioElement.checked });\n } else {\n this.selected = this.radioElement.checked;\n this.changeRadio.emit({ optionName: this.radioElement.value, optionChecked: true });\n }\n if (this.disabled) {\n this._selected = false;\n this.changeRadio.emit({ optionName: '', optionChecked: false });\n }\n this.onChange(this._selected)\n }\n\n writeValue(value: any): void {\n if (typeof value === 'boolean' || value === this.value) {\n this.selected = value;\n }\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouch = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n onChange = (_: any) => {};\n\n /**\n * @ignore\n */\n onTouch = () => {};\n\n //Set class for multiple radio\n setClass(): string {\n if (this.multiple) {\n return this._selected ? 'multiple-checked' : 'multiple-unchecked';\n }\n return '';\n }\n\n onLabelEllipsisChange(isEllipsis: boolean): void {\n this.showTooltip = isEllipsis && !this.hideTooltipOnEllipsis;\n }\n\n private checkHost(): void {\n if (this.hostNgControl) {\n this.selected = this.value === this.hostNgControl.value;\n this.hostNgControl.valueChanges?.pipe(\n takeUntilDestroyed(this.destroyRef)\n ).subscribe((value) => {\n this.selected = value === this.value;\n this.classMultiple = this.setClass();\n });\n }\n }\n\n private setCompanyColor(): void {\n this.companyColor = this.companyColor ? this.companyColor : this.applicationTheme === 'classic' ? '#46A997' : '#D410AA';\n }\n\n onFocus(isFocus: boolean): void {\n setTimeout(() => {\n if (this.tooltipElement) {\n if (this.showTooltip && isFocus) {\n this.tooltipElement.show();\n } else {\n this.tooltipElement.hide();\n }\n }\n }, 0);\n }\n\n focus(): void {\n this.radioElement.focus();\n }\n}\n","<div\n #radioContainer\n [class]=\"multiple ? 'radio-container' : 'radio'\"\n [class.multiple-disabled]=\"disabled && multiple\"\n [ngClass]=\"classMultiple\"\n [attr.alignment]=\"alignment\"\n [attr.truncate-text]=\"truncateText\"\n [attr.theme]=\"applicationTheme\"\n [attr.hasError]=\"hasError\"\n (keydown.enter)=\"clickRadio(); radioContainer.focus()\"\n (keydown.space)=\"clickRadio(); radioContainer.focus()\"\n>\n <mat-radio-button\n #radio\n [checked]=\"selected\"\n [disabled]=\"disabled\"\n [name]=\"name\"\n [value]=\"value\"\n class=\"radio-button\"\n [required]=\"ariaRequired\"\n [aria-label]=\"ariaLabel\"\n [aria-labelledby]=\"ariaLabelledby ? ariaLabelledby : label\"\n [aria-describedby]=\"ariaDescribedby\"\n (keydown.enter)=\"$event.preventDefault()\"\n (keydown.space)=\"$event.preventDefault()\"\n [tabIndex]=\"tabIndex\"\n >\n @if (label) {\n <span\n #tooltip=\"matTooltip\"\n class=\"label\"\n uiEllipseText\n (onChangeTextState)=\"onLabelEllipsisChange($event)\"\n [matTooltip]=\"showTooltip ? label : ''\"\n [matTooltipClass]=\"applicationTheme\"\n >{{ label }}</span>\n }\n <ng-content select=\"[radio-label]\"></ng-content>\n </mat-radio-button>\n</div>\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatRadioModule } from '@angular/material/radio';\nimport { RadioButtonComponent } from './radio-button.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EllipseTextDirective } from '@testgorilla/tgo-ui/components/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { FocusVisibleDirective } from '@testgorilla/tgo-ui/components/checkbox';\n\n@NgModule({\n declarations: [RadioButtonComponent],\n imports: [CommonModule, MatRadioModule, FormsModule, ReactiveFormsModule, MatInputModule, EllipseTextDirective, MatTooltipModule, MatCheckboxModule, FocusVisibleDirective],\n exports: [RadioButtonComponent],\n})\nexport class RadioButtonComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA;MAkDa,oBAAoB,CAAA;AAE/B,IAAA,WAAW,CAAC,KAAU,EAAA;AACpB,QAAA,IAAI,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,sBAAsB,CAAC,IAAI,KAAK,CAAC,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,GAAG,gBAAgB,CAAC,EAAE;YACtI,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,EAAE;;;AAsBzD,IAAA,IACI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS;;IAEvB,IAAI,QAAQ,CAAC,QAAiB,EAAA;AAC5B,QAAA,IAAI,CAAC,SAAS,GAAG,QAAQ;;AAwJ3B,IAAA,WAAA,CAC6E,eAAiC,EACjF,SAAoB,EACpB,aAAwB,EAC3C,UAAsB,EACtB,YAA0B,EAC1B,MAAc,EACd,GAAsB,EAAA;QAN6C,IAAe,CAAA,eAAA,GAAf,eAAe;QAC/D,IAAS,CAAA,SAAA,GAAT,SAAS;QACT,I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AAA,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,CAAA,EAAA,OAAA,EAAA,CAChK,oBAAoB,CAAA,EAAA,CAAA,CAAA;AAEnB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,0BAA0B,EAH3B,OAAA,EAAA,CAAA,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAwB,gBAAgB,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;;4FAGxI,0BAA0B,EAAA,UAAA,EAAA,CAAA;kBALtC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,oBAAoB,CAAC;AACpC,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,EAAE,WAAW,EAAE,mBAAmB,EAAE,cAAc,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,qBAAqB,CAAC;oBAC3K,OAAO,EAAE,CAAC,oBAAoB,CAAC;AAChC,iBAAA;;;ACfD;;AAEG;;;;"}
|
|
@@ -1,150 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { Pipe, EventEmitter, Output, Input, Optional, Inject, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule } from '@angular/common';
|
|
5
|
-
import { MatInputModule } from '@angular/material/input';
|
|
6
|
-
|
|
7
|
-
class HalfStarPipe {
|
|
8
|
-
/**
|
|
9
|
-
* @description Used to indicate whether display half-star icon.
|
|
10
|
-
* Returns true if the rounded value of the current element
|
|
11
|
-
* is equal to it's index, and value is not integer (e.g. index = 4, value = 3.5),
|
|
12
|
-
* @param index the index of the current element
|
|
13
|
-
* @param value the value of the current element
|
|
14
|
-
*/
|
|
15
|
-
transform(index, value) {
|
|
16
|
-
return Math.ceil(value) === index && !Number.isInteger(value);
|
|
17
|
-
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HalfStarPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
19
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: HalfStarPipe, isStandalone: false, name: "halfStar" }); }
|
|
20
|
-
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: HalfStarPipe, decorators: [{
|
|
22
|
-
type: Pipe,
|
|
23
|
-
args: [{
|
|
24
|
-
name: 'halfStar',
|
|
25
|
-
standalone: false
|
|
26
|
-
}]
|
|
27
|
-
}] });
|
|
28
|
-
|
|
29
|
-
class RatingComponent {
|
|
30
|
-
set length(length) {
|
|
31
|
-
this.items = Array(Math.max(length, this.MIN_LENGTH))
|
|
32
|
-
.fill(0)
|
|
33
|
-
.map((x, i) => i);
|
|
34
|
-
}
|
|
35
|
-
constructor(defaultAppTheme) {
|
|
36
|
-
this.defaultAppTheme = defaultAppTheme;
|
|
37
|
-
this.MIN_LENGTH = 0;
|
|
38
|
-
this.DEFAULT_LENGTH = 5;
|
|
39
|
-
this.items = [];
|
|
40
|
-
/**
|
|
41
|
-
*
|
|
42
|
-
* Defines the application theme where accordion is used
|
|
43
|
-
*
|
|
44
|
-
* @type {ApplicationTheme}
|
|
45
|
-
* @memberof AccordionComponent
|
|
46
|
-
*/
|
|
47
|
-
this.applicationTheme = 'light';
|
|
48
|
-
/**
|
|
49
|
-
* The theme of the rating component. Defaults "block".
|
|
50
|
-
* @type {RatingComponentTheme}
|
|
51
|
-
* @memberof RatingComponent
|
|
52
|
-
*/
|
|
53
|
-
this.theme = 'block';
|
|
54
|
-
/**
|
|
55
|
-
* A flag indicating whether the rating component is disabled.
|
|
56
|
-
* @type {boolean}
|
|
57
|
-
* @memberof RatingComponent
|
|
58
|
-
*/
|
|
59
|
-
this.disabled = false;
|
|
60
|
-
/**
|
|
61
|
-
* A string representing the ARIA requirement for accessibility.
|
|
62
|
-
* This attribute is used to indicate whether an input field is required for form submission.
|
|
63
|
-
* @type {boolean}
|
|
64
|
-
* @memberof RatingComponent
|
|
65
|
-
*/
|
|
66
|
-
this.ariaRequired = false;
|
|
67
|
-
/**
|
|
68
|
-
* The width of the rating bar.
|
|
69
|
-
* @type {number}
|
|
70
|
-
* @memberof RatingComponent
|
|
71
|
-
*/
|
|
72
|
-
this.barWidth = 35;
|
|
73
|
-
/**
|
|
74
|
-
* A flag indicating whether the rating can be unselected by clicking on the same value.
|
|
75
|
-
* When false, clicking on the same value will not change the rating.
|
|
76
|
-
* @type {boolean}
|
|
77
|
-
* @memberof RatingComponent
|
|
78
|
-
*/
|
|
79
|
-
this.canUnselect = true;
|
|
80
|
-
this.valueChange = new EventEmitter();
|
|
81
|
-
if (defaultAppTheme) {
|
|
82
|
-
this.applicationTheme = defaultAppTheme;
|
|
83
|
-
}
|
|
84
|
-
this.length = this.DEFAULT_LENGTH;
|
|
85
|
-
}
|
|
86
|
-
select(index) {
|
|
87
|
-
const newValue = index + 1;
|
|
88
|
-
// If canUnselect is false and we're clicking on the same value, don't change anything
|
|
89
|
-
if (!this.canUnselect && this.value === newValue) {
|
|
90
|
-
return;
|
|
91
|
-
}
|
|
92
|
-
this.value = this.value === newValue ? 0 : newValue;
|
|
93
|
-
this.valueChange.emit(this.value);
|
|
94
|
-
}
|
|
95
|
-
onHover(index) {
|
|
96
|
-
this.hoverIndex = index + 1;
|
|
97
|
-
}
|
|
98
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RatingComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
99
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: RatingComponent, isStandalone: false, selector: "ui-rating", inputs: { applicationTheme: "applicationTheme", value: "value", theme: "theme", disabled: "disabled", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", barWidth: "barWidth", canUnselect: "canUnselect", length: "length" }, outputs: { valueChange: "valueChange" }, ngImport: i0, template: "<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #E0E0E0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #E0E0E0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { 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.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: HalfStarPipe, name: "halfStar" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
100
|
-
}
|
|
101
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RatingComponent, decorators: [{
|
|
102
|
-
type: Component,
|
|
103
|
-
args: [{ selector: 'ui-rating', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.rating{display:flex;align-content:center;justify-content:flex-start;align-items:center}.rating-item{width:35px;height:16px;border:1px solid #E0E0E0;border-left:0;cursor:pointer}.rating-item-hover{border:0;background-color:#b5ddd5}.rating-item-hover[theme=dark],.rating-item-hover[theme=light]{background-color:#ffb3ee}.rating-item-hover:not(:first-child){border-left:1px solid #ffffff}.rating-item:first-child{border-radius:4px 0 0 4px}.rating-item:first-child:not(.rating-item-selected):not(.rating-item-hover){border-left:1px solid #E0E0E0}.rating-item:last-child{border-radius:0 4px 4px 0}.rating-item:first-child:last-child{border-radius:4px}.rating-item-selected{border:0;background-color:#46a997}.rating-item-selected[theme=dark],.rating-item-selected[theme=light]{background-color:#d410aa}.rating-item-selected:not(:first-child){border-left:1px solid #ffffff}.rating .star-container{display:flex;flex-direction:row;min-height:24px}.rating .star-container .star{width:24px;height:24px;background:url(/icons/rating-icons/Star-outline.svg) no-repeat center;background-size:100%;margin-right:4px}.rating .star-container .star:last-child{margin-right:0}.rating .star-container .star:focus{outline:1px dashed #888888}.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus{opacity:.5}.rating .star-container .star.filled-half{background-image:url(/icons/rating-icons/Star-half.svg)!important}.rating .star-container .star.disabled{pointer-events:none;background-image:url(/icons/rating-icons/Star-filled-disabled.svg)}.rating .star-container .star:active{opacity:1}.rating .star-container .star-filled,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container .star:hover,.rating .star-container .star.hover,.rating .star-container .star:focus,.rating .star-container .star.filled,.rating .star-container .star:active{background-image:url(/icons/rating-icons/Star-filled.svg)}.rating .star-container[theme=dark] .star,.rating .star-container[theme=light] .star{cursor:pointer;background:url(/icons/rebrand/Review-star-in-line.svg) no-repeat center}.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus{opacity:.5}.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=light] .star:focus{outline-offset:4px}.rating .star-container[theme=dark] .star.filled-half,.rating .star-container[theme=light] .star.filled-half{background-image:url(/icons/rebrand/Review-half-star-filled.svg)!important}.rating .star-container[theme=dark] .star.disabled,.rating .star-container[theme=light] .star.disabled{background-image:url(/icons/rebrand/Review-star-filled-disabled.svg)}.rating .star-container[theme=dark] .star-filled,.rating .star-container[theme=dark] .star:hover,.rating .star-container[theme=dark] .star.hover,.rating .star-container[theme=dark] .star:focus,.rating .star-container[theme=dark] .star.filled,.rating .star-container[theme=dark] .star:active,.rating .star-container[theme=light] .star-filled,.rating .star-container[theme=light] .star:hover,.rating .star-container[theme=light] .star.hover,.rating .star-container[theme=light] .star:focus,.rating .star-container[theme=light] .star.filled,.rating .star-container[theme=light] .star:active{background-image:url(/icons/rebrand/Review-star-filled.svg)}\n"] }]
|
|
104
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
105
|
-
type: Optional
|
|
106
|
-
}, {
|
|
107
|
-
type: Inject,
|
|
108
|
-
args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
|
|
109
|
-
}] }], propDecorators: { applicationTheme: [{
|
|
110
|
-
type: Input
|
|
111
|
-
}], value: [{
|
|
112
|
-
type: Input
|
|
113
|
-
}], theme: [{
|
|
114
|
-
type: Input
|
|
115
|
-
}], disabled: [{
|
|
116
|
-
type: Input
|
|
117
|
-
}], ariaLabel: [{
|
|
118
|
-
type: Input
|
|
119
|
-
}], ariaRequired: [{
|
|
120
|
-
type: Input
|
|
121
|
-
}], barWidth: [{
|
|
122
|
-
type: Input
|
|
123
|
-
}], canUnselect: [{
|
|
124
|
-
type: Input
|
|
125
|
-
}], length: [{
|
|
126
|
-
type: Input
|
|
127
|
-
}], valueChange: [{
|
|
128
|
-
type: Output
|
|
129
|
-
}] } });
|
|
130
|
-
|
|
131
|
-
class RatingComponentModule {
|
|
132
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RatingComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
133
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: RatingComponentModule, declarations: [RatingComponent, HalfStarPipe], imports: [CommonModule, MatInputModule], exports: [RatingComponent] }); }
|
|
134
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RatingComponentModule, imports: [CommonModule, MatInputModule] }); }
|
|
135
|
-
}
|
|
136
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: RatingComponentModule, decorators: [{
|
|
137
|
-
type: NgModule,
|
|
138
|
-
args: [{
|
|
139
|
-
declarations: [RatingComponent, HalfStarPipe],
|
|
140
|
-
imports: [CommonModule, MatInputModule],
|
|
141
|
-
exports: [RatingComponent],
|
|
142
|
-
}]
|
|
143
|
-
}] });
|
|
144
|
-
|
|
145
|
-
/**
|
|
146
|
-
* Generated bundle index. Do not edit.
|
|
147
|
-
*/
|
|
148
|
-
|
|
149
|
-
export { RatingComponent, RatingComponentModule };
|
|
150
|
-
//# sourceMappingURL=testgorilla-tgo-ui-components-rating.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-rating.mjs","sources":["../../../components/rating/half-star.pipe.ts","../../../components/rating/rating.component.ts","../../../components/rating/rating.component.html","../../../components/rating/rating.component.module.ts","../../../components/rating/testgorilla-tgo-ui-components-rating.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({\n name: 'halfStar',\n standalone: false\n})\nexport class HalfStarPipe implements PipeTransform {\n /**\n * @description Used to indicate whether display half-star icon.\n * Returns true if the rounded value of the current element\n * is equal to it's index, and value is not integer (e.g. index = 4, value = 3.5),\n * @param index the index of the current element\n * @param value the value of the current element\n */\n transform(index: number, value: number): boolean {\n return Math.ceil(value) === index && !Number.isInteger(value);\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Optional, Output } from '@angular/core';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nexport type RatingComponentTheme = 'stars' | 'block';\n\n@Component({\n selector: 'ui-rating',\n templateUrl: './rating.component.html',\n styleUrls: ['./rating.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class RatingComponent {\n private readonly MIN_LENGTH = 0;\n private readonly DEFAULT_LENGTH = 5;\n protected items: number[] = [];\n protected hoverIndex: number;\n\n /**\n *\n * Defines the application theme where accordion is used\n *\n * @type {ApplicationTheme}\n * @memberof AccordionComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * The value representing the rating.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() value: number;\n\n /**\n * The theme of the rating component. Defaults \"block\".\n * @type {RatingComponentTheme}\n * @memberof RatingComponent\n */\n @Input() theme: RatingComponentTheme = 'block';\n\n /**\n * A flag indicating whether the rating component is disabled.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() disabled = false;\n\n /**\n * A string representing the ARIA label for accessibility.\n * This label is used to provide an accessible name for the input element.\n * @type {string}\n * @memberof RatingComponent\n */\n @Input() ariaLabel: string;\n\n /**\n * A string representing the ARIA requirement for accessibility.\n * This attribute is used to indicate whether an input field is required for form submission.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() ariaRequired = false;\n\n /**\n * The width of the rating bar.\n * @type {number}\n * @memberof RatingComponent\n */\n @Input() barWidth = 35;\n\n /**\n * A flag indicating whether the rating can be unselected by clicking on the same value.\n * When false, clicking on the same value will not change the rating.\n * @type {boolean}\n * @memberof RatingComponent\n */\n @Input() canUnselect = true;\n\n @Input() set length(length: number) {\n this.items = Array(Math.max(length, this.MIN_LENGTH))\n .fill(0)\n .map((x, i) => i);\n }\n\n @Output() valueChange = new EventEmitter<number>();\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme,\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n this.length = this.DEFAULT_LENGTH;\n\n }\n\n protected select(index: number): void {\n const newValue = index + 1;\n \n // If canUnselect is false and we're clicking on the same value, don't change anything\n if (!this.canUnselect && this.value === newValue) {\n return;\n }\n \n this.value = this.value === newValue ? 0 : newValue;\n this.valueChange.emit(this.value);\n }\n\n protected onHover(index: number): void {\n this.hoverIndex = index + 1;\n }\n}\n","<div class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n>\n <ng-container *ngIf=\"theme === 'block';else stars\">\n <div class=\"rating-item\" [attr.theme]=\"applicationTheme\" *ngFor=\"let item of items\" (click)=\"select(item)\" (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{'width.px': barWidth}\">\n </div>\n </ng-container>\n\n <ng-template #stars>\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n <div\n #star\n class=\"star\"\n [tabIndex]=\"0\"\n (mouseenter)=\"onHover(item)\"\n (mouseleave)=\"onHover(-1)\"\n [ngClass]=\"{\n filled: value > i,\n hover: item < hoverIndex && (value ? item >= value : true),\n disabled,\n 'filled-half': i + 1 | halfStar : value\n }\"\n *ngFor=\"let item of items; index as i\"\n (click)=\"select(item); star.blur()\"\n ></div>\n </div>\n </ng-template>\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { RatingComponent } from './rating.component';\nimport { HalfStarPipe } from './half-star.pipe';\nimport { MatInputModule } from '@angular/material/input';\n\n@NgModule({\n declarations: [RatingComponent, HalfStarPipe],\n imports: [CommonModule, MatInputModule],\n exports: [RatingComponent],\n})\nexport class RatingComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.HalfStarPipe"],"mappings":";;;;;;MAMa,YAAY,CAAA;AACvB;;;;;;AAMG;IACH,SAAS,CAAC,KAAa,EAAE,KAAa,EAAA;AACpC,QAAA,OAAO,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC;;+GATpD,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAZ,YAAY,EAAA,YAAA,EAAA,KAAA,EAAA,IAAA,EAAA,UAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJ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,CAAA,CAAA;;4FAG3B,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBALjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,CAAC,eAAe,EAAE,YAAY,CAAC;AAC7C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,cAAc,CAAC;oBACvC,OAAO,EAAE,CAAC,eAAe,CAAC;AAC3B,iBAAA;;;ACVD;;AAEG;;;;"}
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { EventEmitter, signal, Output, Input, ViewChildren, Optional, Inject, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
|
|
3
|
-
import { hexToRgbWithAlpha } from '@testgorilla/tgo-ui/components/core';
|
|
4
|
-
import * as i1 from '@angular/common';
|
|
5
|
-
import { CommonModule } from '@angular/common';
|
|
6
|
-
|
|
7
|
-
class ScaleComponent {
|
|
8
|
-
/**
|
|
9
|
-
* The max number of items in the scale.
|
|
10
|
-
* @type {number}
|
|
11
|
-
* @memberof ScaleComponent
|
|
12
|
-
*/
|
|
13
|
-
set length(length) {
|
|
14
|
-
this.items = Array(Math.max(length, this.MIN_LENGTH))
|
|
15
|
-
.fill(0)
|
|
16
|
-
.map((_, i) => i);
|
|
17
|
-
}
|
|
18
|
-
constructor(defaultAppTheme) {
|
|
19
|
-
this.defaultAppTheme = defaultAppTheme;
|
|
20
|
-
this.MIN_LENGTH = 1;
|
|
21
|
-
this.DEFAULT_LENGTH = 5;
|
|
22
|
-
this.items = [];
|
|
23
|
-
/**
|
|
24
|
-
* The value representing the selected item of the scale.
|
|
25
|
-
* @type {number}
|
|
26
|
-
* @memberof ScaleComponent
|
|
27
|
-
*/
|
|
28
|
-
this.selectedIndex = null;
|
|
29
|
-
/**
|
|
30
|
-
*
|
|
31
|
-
* Defines the application theme
|
|
32
|
-
*
|
|
33
|
-
* @type {ApplicationTheme}
|
|
34
|
-
* @memberof ScaleComponent
|
|
35
|
-
*/
|
|
36
|
-
this.applicationTheme = 'light';
|
|
37
|
-
/**
|
|
38
|
-
* Color of the option hover.
|
|
39
|
-
* Defaults to Test Gorilla primary color.
|
|
40
|
-
*
|
|
41
|
-
* @type {string}
|
|
42
|
-
* @memberof ScaleComponent
|
|
43
|
-
*/
|
|
44
|
-
this.companyColor = '';
|
|
45
|
-
this.selectedIndexChange = new EventEmitter();
|
|
46
|
-
this.styles = signal({ '--hover-color': '#FFB3EE', '--selected-color': '#D410AA' });
|
|
47
|
-
if (defaultAppTheme) {
|
|
48
|
-
this.applicationTheme = defaultAppTheme;
|
|
49
|
-
}
|
|
50
|
-
this.length = this.DEFAULT_LENGTH;
|
|
51
|
-
}
|
|
52
|
-
ngOnInit() {
|
|
53
|
-
if (this.companyColor) {
|
|
54
|
-
this.setCompanyColor();
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
ngOnChanges(changes) {
|
|
58
|
-
if (changes['companyColor']) {
|
|
59
|
-
this.setCompanyColor();
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
select(index) {
|
|
63
|
-
this.selectedIndex = index;
|
|
64
|
-
this.selectedIndexChange.emit(this.selectedIndex);
|
|
65
|
-
}
|
|
66
|
-
onKeyDown(event, index) {
|
|
67
|
-
if (this.selectedIndex === null) {
|
|
68
|
-
this.selectedIndex = 0;
|
|
69
|
-
}
|
|
70
|
-
if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {
|
|
71
|
-
// Move to the next item (wrap around)
|
|
72
|
-
this.select((index + 1) % this.items.length);
|
|
73
|
-
this.focusItem(this.selectedIndex);
|
|
74
|
-
}
|
|
75
|
-
else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {
|
|
76
|
-
// Move to the previous item (wrap around)
|
|
77
|
-
this.select((index - 1 + this.items.length) % this.items.length);
|
|
78
|
-
this.focusItem(this.selectedIndex);
|
|
79
|
-
}
|
|
80
|
-
else if (event.key === ' ' || event.key === 'Enter') {
|
|
81
|
-
// Select the current item
|
|
82
|
-
this.select(index);
|
|
83
|
-
this.focusItem(this.selectedIndex);
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
focusItem(index) {
|
|
87
|
-
const element = this.scaleItems?.toArray()[index]?.nativeElement;
|
|
88
|
-
if (element) {
|
|
89
|
-
element.focus();
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
getAriaLabel(index) {
|
|
93
|
-
if (index === 0) {
|
|
94
|
-
return '1 - Not at all important';
|
|
95
|
-
}
|
|
96
|
-
else if (index === 4) {
|
|
97
|
-
return '5 - Very important';
|
|
98
|
-
}
|
|
99
|
-
return '';
|
|
100
|
-
}
|
|
101
|
-
setCompanyColor() {
|
|
102
|
-
const styles = this.styles();
|
|
103
|
-
styles['--hover-color'] = hexToRgbWithAlpha(this.companyColor);
|
|
104
|
-
styles['--selected-color'] = this.companyColor;
|
|
105
|
-
this.styles.set(styles);
|
|
106
|
-
}
|
|
107
|
-
onFocus(item) {
|
|
108
|
-
// If no item is selected when the component receives focus, select the first item
|
|
109
|
-
if (this.selectedIndex === null && item === 0) {
|
|
110
|
-
this.select(0);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
114
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: ScaleComponent, isStandalone: false, selector: "ui-scale", inputs: { selectedIndex: "selectedIndex", length: "length", applicationTheme: "applicationTheme", companyColor: "companyColor" }, outputs: { selectedIndexChange: "selectedIndexChange" }, viewQueries: [{ propertyName: "scaleItems", predicate: ["scaleItem"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n [style.--scale-count]=\"items.length\"\n class=\"scale\"\n [ngStyle]=\"styles()\"\n [ngClass]=\"{ 'scale-classic': applicationTheme === 'classic' }\"\n>\n <div\n class=\"scale-item\"\n *ngFor=\"let item of items\"\n (click)=\"select(item)\"\n #scaleItem\n role=\"radio\"\n (keydown)=\"onKeyDown($event, item)\"\n (focus)=\"onFocus(item)\"\n [class.scale-item-focus-prev]=\"selectedIndex && selectedIndex > 0 ? item === selectedIndex - 1 : false\"\n [attr.tabindex]=\"selectedIndex === null ? (item === 0 ? '0' : '-1') : item === selectedIndex ? '0' : '-1'\"\n [attr.aria-checked]=\"\n selectedIndex === null ? (item === 0 ? 'true' : 'false') : item === selectedIndex ? 'true' : 'false'\n \"\n [attr.aria-label]=\"getAriaLabel(item)\"\n [ngClass]=\"{ 'scale-item-selected': item === selectedIndex }\"\n >\n {{ item + 1 }}\n </div>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.scale{display:flex;align-content:center;justify-content:flex-start;align-items:center;width:100%}.scale-item{display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;width:calc(100% / var(--scale-count));min-width:24px;height:48px;border:1px solid #919191;border-left:0;cursor:pointer;font-size:16px;font-weight:400;font-family:ModernGothic,serif;background-color:#fff}.scale-item:hover:not(.scale-item-selected){background-color:var(--hover-color)}.scale-item:first-child{border-radius:10px 0 0 10px;border-left:1px solid #919191}.scale-item:last-child{border-radius:0 10px 10px 0}.scale-item-selected{background-color:var(--selected-color);color:#fff;font-weight:700}@keyframes focus-ring-animation{0%{box-shadow:0 0 0 4px #242424}to{box-shadow:0 0 0 2px #242424}}.scale-item.scale-item-focus-prev{border-right:none}.scale-item:focus-visible{outline:none;border-radius:8px;border:2px solid #ffffff;box-shadow:0 0 0 2px #242424;z-index:1;animation:focus-ring-animation .4s forwards}.scale-classic .scale-item{border-color:#e0e0e0;font-family:Open Sans,serif}.scale-classic .scale-item:first-child{border-radius:4px 0 0 4px;border-left:1px solid #E0E0E0}.scale-classic .scale-item:last-child{border-radius:0 4px 4px 0}.scale-classic .scale-item:not(.scale-item-selected){color:#242424}.scale-classic .scale-item:hover:not(.scale-item-selected){background-color:#b5ddd5}.scale-classic .scale-item-selected{background-color:#46a997}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
115
|
-
}
|
|
116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponent, decorators: [{
|
|
117
|
-
type: Component,
|
|
118
|
-
args: [{ selector: 'ui-scale', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<div\n [style.--scale-count]=\"items.length\"\n class=\"scale\"\n [ngStyle]=\"styles()\"\n [ngClass]=\"{ 'scale-classic': applicationTheme === 'classic' }\"\n>\n <div\n class=\"scale-item\"\n *ngFor=\"let item of items\"\n (click)=\"select(item)\"\n #scaleItem\n role=\"radio\"\n (keydown)=\"onKeyDown($event, item)\"\n (focus)=\"onFocus(item)\"\n [class.scale-item-focus-prev]=\"selectedIndex && selectedIndex > 0 ? item === selectedIndex - 1 : false\"\n [attr.tabindex]=\"selectedIndex === null ? (item === 0 ? '0' : '-1') : item === selectedIndex ? '0' : '-1'\"\n [attr.aria-checked]=\"\n selectedIndex === null ? (item === 0 ? 'true' : 'false') : item === selectedIndex ? 'true' : 'false'\n \"\n [attr.aria-label]=\"getAriaLabel(item)\"\n [ngClass]=\"{ 'scale-item-selected': item === selectedIndex }\"\n >\n {{ item + 1 }}\n </div>\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.scale{display:flex;align-content:center;justify-content:flex-start;align-items:center;width:100%}.scale-item{display:flex;align-items:center;justify-content:center;-webkit-user-select:none;user-select:none;width:calc(100% / var(--scale-count));min-width:24px;height:48px;border:1px solid #919191;border-left:0;cursor:pointer;font-size:16px;font-weight:400;font-family:ModernGothic,serif;background-color:#fff}.scale-item:hover:not(.scale-item-selected){background-color:var(--hover-color)}.scale-item:first-child{border-radius:10px 0 0 10px;border-left:1px solid #919191}.scale-item:last-child{border-radius:0 10px 10px 0}.scale-item-selected{background-color:var(--selected-color);color:#fff;font-weight:700}@keyframes focus-ring-animation{0%{box-shadow:0 0 0 4px #242424}to{box-shadow:0 0 0 2px #242424}}.scale-item.scale-item-focus-prev{border-right:none}.scale-item:focus-visible{outline:none;border-radius:8px;border:2px solid #ffffff;box-shadow:0 0 0 2px #242424;z-index:1;animation:focus-ring-animation .4s forwards}.scale-classic .scale-item{border-color:#e0e0e0;font-family:Open Sans,serif}.scale-classic .scale-item:first-child{border-radius:4px 0 0 4px;border-left:1px solid #E0E0E0}.scale-classic .scale-item:last-child{border-radius:0 4px 4px 0}.scale-classic .scale-item:not(.scale-item-selected){color:#242424}.scale-classic .scale-item:hover:not(.scale-item-selected){background-color:#b5ddd5}.scale-classic .scale-item-selected{background-color:#46a997}\n"] }]
|
|
119
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
120
|
-
type: Optional
|
|
121
|
-
}, {
|
|
122
|
-
type: Inject,
|
|
123
|
-
args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
|
|
124
|
-
}] }], propDecorators: { scaleItems: [{
|
|
125
|
-
type: ViewChildren,
|
|
126
|
-
args: ['scaleItem']
|
|
127
|
-
}], selectedIndex: [{
|
|
128
|
-
type: Input
|
|
129
|
-
}], length: [{
|
|
130
|
-
type: Input
|
|
131
|
-
}], applicationTheme: [{
|
|
132
|
-
type: Input
|
|
133
|
-
}], companyColor: [{
|
|
134
|
-
type: Input
|
|
135
|
-
}], selectedIndexChange: [{
|
|
136
|
-
type: Output
|
|
137
|
-
}] } });
|
|
138
|
-
|
|
139
|
-
class ScaleComponentModule {
|
|
140
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
141
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponentModule, declarations: [ScaleComponent], imports: [CommonModule], exports: [ScaleComponent] }); }
|
|
142
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponentModule, imports: [CommonModule] }); }
|
|
143
|
-
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: ScaleComponentModule, decorators: [{
|
|
145
|
-
type: NgModule,
|
|
146
|
-
args: [{
|
|
147
|
-
declarations: [ScaleComponent],
|
|
148
|
-
imports: [CommonModule],
|
|
149
|
-
exports: [ScaleComponent]
|
|
150
|
-
}]
|
|
151
|
-
}] });
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Generated bundle index. Do not edit.
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
export { ScaleComponent, ScaleComponentModule };
|
|
158
|
-
//# sourceMappingURL=testgorilla-tgo-ui-components-scale.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-scale.mjs","sources":["../../../components/scale/scale.component.ts","../../../components/scale/scale.component.html","../../../components/scale/scale.component.module.ts","../../../components/scale/testgorilla-tgo-ui-components-scale.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n Inject,\n Input,\n OnChanges,\n OnInit,\n Optional,\n Output,\n QueryList,\n signal,\n SimpleChanges,\n ViewChildren,\n} from '@angular/core';\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { hexToRgbWithAlpha } from '@testgorilla/tgo-ui/components/core';\n\n@Component({\n selector: 'ui-scale',\n templateUrl: './scale.component.html',\n styleUrls: ['./scale.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class ScaleComponent implements OnInit, OnChanges {\n private readonly MIN_LENGTH = 1;\n private readonly DEFAULT_LENGTH = 5;\n protected items: number[] = [];\n\n @ViewChildren('scaleItem') scaleItems!: QueryList<ElementRef>;\n\n /**\n * The value representing the selected item of the scale.\n * @type {number}\n * @memberof ScaleComponent\n */\n @Input() selectedIndex: number | null = null;\n\n /**\n * The max number of items in the scale.\n * @type {number}\n * @memberof ScaleComponent\n */\n @Input() set length(length: number) {\n this.items = Array(Math.max(length, this.MIN_LENGTH))\n .fill(0)\n .map((_, i) => i);\n }\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ScaleComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Color of the option hover.\n * Defaults to Test Gorilla primary color.\n *\n * @type {string}\n * @memberof ScaleComponent\n */\n @Input() companyColor: string = '';\n\n @Output() selectedIndexChange = new EventEmitter<number>();\n\n styles = signal({ '--hover-color': '#FFB3EE', '--selected-color': '#D410AA' });\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n this.length = this.DEFAULT_LENGTH;\n }\n\n ngOnInit() {\n if (this.companyColor) {\n this.setCompanyColor();\n }\n }\n\n ngOnChanges(changes: SimpleChanges) {\n if (changes['companyColor']) {\n this.setCompanyColor();\n }\n }\n\n protected select(index: number): void {\n this.selectedIndex = index;\n this.selectedIndexChange.emit(this.selectedIndex);\n }\n\n onKeyDown(event: KeyboardEvent, index: number) {\n if (this.selectedIndex === null) {\n this.selectedIndex = 0;\n }\n if (event.key === 'ArrowRight' || event.key === 'ArrowDown') {\n // Move to the next item (wrap around)\n this.select((index + 1) % this.items.length);\n this.focusItem(this.selectedIndex);\n } else if (event.key === 'ArrowLeft' || event.key === 'ArrowUp') {\n // Move to the previous item (wrap around)\n this.select((index - 1 + this.items.length) % this.items.length);\n this.focusItem(this.selectedIndex);\n } else if (event.key === ' ' || event.key === 'Enter') {\n // Select the current item\n this.select(index);\n this.focusItem(this.selectedIndex);\n }\n }\n\n focusItem(index: number) {\n const element = this.scaleItems?.toArray()[index]?.nativeElement;\n if (element) {\n element.focus();\n }\n }\n\n getAriaLabel(index: number): string {\n if (index === 0) {\n return '1 - Not at all important';\n } else if (index === 4) {\n return '5 - Very important';\n }\n return '';\n }\n\n private setCompanyColor(): void {\n const styles = this.styles();\n styles['--hover-color'] = hexToRgbWithAlpha(this.companyColor);\n styles['--selected-color'] = this.companyColor;\n this.styles.set(styles);\n }\n\n onFocus(item: number): void {\n // If no item is selected when the component receives focus, select the first item\n if (this.selectedIndex === null && item === 0) {\n this.select(0);\n }\n }\n}\n","<div\n [style.--scale-count]=\"items.length\"\n class=\"scale\"\n [ngStyle]=\"styles()\"\n [ngClass]=\"{ 'scale-classic': applicationTheme === 'classic' }\"\n>\n <div\n class=\"scale-item\"\n *ngFor=\"let item of items\"\n (click)=\"select(item)\"\n #scaleItem\n role=\"radio\"\n (keydown)=\"onKeyDown($event, item)\"\n (focus)=\"onFocus(item)\"\n [class.scale-item-focus-prev]=\"selectedIndex && selectedIndex > 0 ? item === selectedIndex - 1 : false\"\n [attr.tabindex]=\"selectedIndex === null ? (item === 0 ? '0' : '-1') : item === selectedIndex ? '0' : '-1'\"\n [attr.aria-checked]=\"\n selectedIndex === null ? (item === 0 ? 'true' : 'false') : item === selectedIndex ? 'true' : 'false'\n \"\n [attr.aria-label]=\"getAriaLabel(item)\"\n [ngClass]=\"{ 'scale-item-selected': item === selectedIndex }\"\n >\n {{ item + 1 }}\n </div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ScaleComponent } from './scale.component';\n\n\n@NgModule({\n declarations: [ScaleComponent],\n imports: [CommonModule],\n exports: [ScaleComponent]\n})\nexport class ScaleComponentModule {\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MA0Ba,cAAc,CAAA;AAczB;;;;AAIG;IACH,IAAa,MAAM,CAAC,MAAc,EAAA;AAChC,QAAA,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC;aACjD,IAAI,CAAC,CAAC;aACN,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC;;AAyBrB,IAAA,WAAA,CAC6E,eAAiC,EAAA;QAAjC,IAAe,CAAA,eAAA,GAAf,eAAe;QA/C3E,IAAU,CAAA,UAAA,GAAG,CAAC;QACd,IAAc,CAAA,cAAA,GAAG,CAAC;QACzB,IAAK,CAAA,KAAA,GAAa,EAAE;AAI9B;;;;AAIG;QACM,IAAa,CAAA,aAAA,GAAkB,IAAI;AAa5C;;;;;;AAMG;QACM,IAAgB,CAAA,gBAAA,GAAqB,OAAO;AAErD;;;;;;AAMG;QACM,IAAY,CAAA,YAAA,GAAW,EAAE;AAExB,QAAA,IAAA,CAAA,mBAAmB,GAAG,IAAI,YAAY,EAAU;AAE1D,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC;QAK5E,IAAI,eAAe,EAAE;AACnB,YAAA,IAAI,CAAC,gBAAgB,GAAG,eAAe;;AAEzC,QAAA,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,cAAc;;IAGnC,QAAQ,GAAA;AACN,QAAA,IAAI,IAAI,CAAC,YAAY,EAAE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