@testgorilla/tgo-ui 11.22.3 → 12.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +335 -229
- package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +547 -465
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +160 -75
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +678 -278
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +337 -274
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +351 -192
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1950 -960
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1206 -1044
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +328 -182
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +383 -203
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +553 -261
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs +709 -739
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs +219 -184
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +515 -458
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +423 -162
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs +10784 -10996
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +810 -533
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +473 -116
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +1149 -540
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +148 -84
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +239 -142
- package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +599 -467
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +126 -70
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +324 -329
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +969 -648
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +553 -419
- package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +847 -452
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +398 -302
- package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +162 -95
- package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1825 -1795
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +1018 -672
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +758 -368
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +204 -212
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +183 -48
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +243 -79
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +751 -361
- package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +1122 -385
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +689 -413
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +227 -92
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +174 -113
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +367 -165
- package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +253 -118
- package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +730 -444
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +533 -221
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +274 -76
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +184 -124
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1223 -574
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +249 -160
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +447 -439
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +226 -150
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +255 -67
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +205 -162
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +245 -153
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +274 -140
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +319 -147
- package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +286 -84
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +660 -208
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +579 -320
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +419 -200
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +132 -80
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +741 -390
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +455 -329
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +543 -514
- package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +193 -104
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +760 -524
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs +714 -415
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +847 -438
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +535 -275
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +316 -246
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +404 -284
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +664 -383
- package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +201 -112
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1014 -458
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui.mjs +147 -155
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +16 -17
- package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
- package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
- package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
- package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
- package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
- package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
- package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
- package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
- package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
- package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
- package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
- package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
- package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
- package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
- package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
- package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
- package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
- package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
- package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
- package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
- package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
- package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
- package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
- package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
- package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
- package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
- package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
- package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
- package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
- package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
- package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
- package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
- package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
- package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
- package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
- package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
- package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
- package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
- package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
- package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
- package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
- package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
- package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
- package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
- package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
- package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
- package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
- package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
- package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
- package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
- package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
- package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
- package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
- package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
- package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
- package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
- package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
- package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
- package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
- package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
- package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
- package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
- package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
- package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
- package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
- package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
- package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
- package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
- package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
- package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
- package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
- package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
- package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
- package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
- package/types/testgorilla-tgo-ui.d.ts +52 -45
|
@@ -1 +1 @@
|
|
|
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"
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-rating.mjs","names":[],"sources":["../../../components/rating/half-star.pipe.ts","../../../components/rating/rating.component.ts","../../../components/rating/rating.component.html","../../../components/rating/rating.component.module.ts"],"sourcesContent":["import { Pipe, PipeTransform } from '@angular/core';\n\n@Pipe({ name: 'halfStar' })\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 { NgClass, NgStyle } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, EventEmitter, Inject, Input, Optional, Output } from '@angular/core';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\n\nimport { HalfStarPipe } from './half-star.pipe';\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 imports: [NgClass, NgStyle, HalfStarPipe],\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 @Input() testId: string | null = null;\n\n itemTestId(item: number): string | null {\n return this.testId ? `${this.testId}-${item + 1}` : null;\n }\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 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\n class=\"rating\"\n (mouseleave)=\"onHover(-1)\"\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.data-testid]=\"testId\"\n>\n @if (theme === 'block') {\n @for (item of items; track item) {\n <div\n class=\"rating-item\"\n [attr.theme]=\"applicationTheme\"\n tabindex=\"0\"\n (click)=\"select(item)\"\n (keydown.enter)=\"select(item)\"\n (mouseenter)=\"onHover(item)\"\n [ngClass]=\"{ 'rating-item-selected': item < value, 'rating-item-hover': item < hoverIndex }\"\n [ngStyle]=\"{ 'width.px': barWidth }\"\n [attr.data-testid]=\"itemTestId(item)\"\n ></div>\n }\n } @else {\n <div class=\"star-container\" [attr.theme]=\"applicationTheme\">\n @for (item of items; track item; let i = $index) {\n <div\n #star\n class=\"star\"\n tabindex=\"0\"\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 (click)=\"select(item); star.blur()\"\n (keydown.enter)=\"select(item); star.blur()\"\n [attr.data-testid]=\"itemTestId(item)\"\n ></div>\n }\n </div>\n }\n</div>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatInputModule } from '@angular/material/input';\n\nimport { HalfStarPipe } from './half-star.pipe';\nimport { RatingComponent } from './rating.component';\n\n@NgModule({\n imports: [CommonModule, MatInputModule, RatingComponent, HalfStarPipe],\n exports: [RatingComponent],\n})\nexport class RatingComponentModule {}\n"],"mappings":";;;;AAGA,IAAa,e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zD,MAAA,M;E,UAOA,MAAA,M;E,UAOA,MAAA,M;E,aAOA,MAAA,M;E,cAQA,MAAA,M;E,WAEA,MAAA,M;E,iBAYA,MAAA,M;E,aAOA,MAAA,M;E,gBAQA,MAAA,M;E,WAEA,MAAA,M;E,gBAMA,MAAA,O;;;AEpFH,IAAa,wBAAb,MAAa,sBAAqB;CAArB;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAArB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,SAAA;IAHtB;IAAc;IAAgB;IAAiB;GAAY;GAAA,SAAA,CAC3D,eAAe;EAAA,CAAA;CAAA;CAEd;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAqB,SAAA,CAHtB,cAAc,cAAc;EAAA,CAAA;CAAA;;AAG3B,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAqB,YAAA,CAAA;EAJjC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS;IAAC;IAAc;IAAgB;IAAiB;GAAY;GACrE,SAAS,CAAC,eAAe;EAC1B,CAAA"}
|
|
@@ -1,68 +1,256 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import * as i3 from
|
|
5
|
-
import { ButtonComponentModule } from
|
|
6
|
-
import { UiTranslatePipe } from
|
|
7
|
-
import * as i2 from
|
|
8
|
-
import { IconComponentModule } from
|
|
9
|
-
import * as i1 from
|
|
10
|
-
import { ScaleComponentModule } from
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, computed, input, model, output } from "@angular/core";
|
|
4
|
+
import * as i3 from "@testgorilla/tgo-ui/components/button";
|
|
5
|
+
import { ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
|
|
6
|
+
import { UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
|
|
7
|
+
import * as i2 from "@testgorilla/tgo-ui/components/icon";
|
|
8
|
+
import { IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
|
|
9
|
+
import * as i1 from "@testgorilla/tgo-ui/components/scale";
|
|
10
|
+
import { ScaleComponentModule } from "@testgorilla/tgo-ui/components/scale";
|
|
11
|
+
var ScaleTableComponent = class ScaleTableComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.applicationTheme = input("light", ...ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []);
|
|
14
|
+
this.scaleItems = model.required(...ngDevMode ? [{ debugName: "scaleItems" }] : /* istanbul ignore next */ []);
|
|
15
|
+
this.labels = input.required(...ngDevMode ? [{ debugName: "labels" }] : /* istanbul ignore next */ []);
|
|
16
|
+
this.hideBetterExperience = model(false, ...ngDevMode ? [{ debugName: "hideBetterExperience" }] : /* istanbul ignore next */ []);
|
|
17
|
+
this.scaleItemChange = output();
|
|
18
|
+
this.scaleCount = computed(() => this.labels().length, ...ngDevMode ? [{ debugName: "scaleCount" }] : /* istanbul ignore next */ []);
|
|
19
|
+
this.translationContext = "SCALE_TABLE.";
|
|
20
|
+
}
|
|
21
|
+
select(scaleItemIndex, scaleIndex) {
|
|
22
|
+
this.scaleItems.update((items) => {
|
|
23
|
+
items[scaleItemIndex].value = scaleIndex;
|
|
24
|
+
this.scaleItemChange.emit({
|
|
25
|
+
item: items[scaleItemIndex],
|
|
26
|
+
label: this.labels()[scaleIndex]
|
|
27
|
+
});
|
|
28
|
+
return [...items];
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
static {
|
|
32
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
33
|
+
minVersion: "12.0.0",
|
|
34
|
+
version: "22.2.4",
|
|
35
|
+
ngImport: i0,
|
|
36
|
+
type: ScaleTableComponent,
|
|
37
|
+
deps: [],
|
|
38
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
static {
|
|
42
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
43
|
+
minVersion: "17.0.0",
|
|
44
|
+
version: "22.2.4",
|
|
45
|
+
type: ScaleTableComponent,
|
|
46
|
+
isStandalone: true,
|
|
47
|
+
selector: "ui-scale-table",
|
|
48
|
+
inputs: {
|
|
49
|
+
applicationTheme: {
|
|
50
|
+
classPropertyName: "applicationTheme",
|
|
51
|
+
publicName: "applicationTheme",
|
|
52
|
+
isSignal: true,
|
|
53
|
+
isRequired: false,
|
|
54
|
+
transformFunction: null
|
|
55
|
+
},
|
|
56
|
+
scaleItems: {
|
|
57
|
+
classPropertyName: "scaleItems",
|
|
58
|
+
publicName: "scaleItems",
|
|
59
|
+
isSignal: true,
|
|
60
|
+
isRequired: true,
|
|
61
|
+
transformFunction: null
|
|
62
|
+
},
|
|
63
|
+
labels: {
|
|
64
|
+
classPropertyName: "labels",
|
|
65
|
+
publicName: "labels",
|
|
66
|
+
isSignal: true,
|
|
67
|
+
isRequired: true,
|
|
68
|
+
transformFunction: null
|
|
69
|
+
},
|
|
70
|
+
hideBetterExperience: {
|
|
71
|
+
classPropertyName: "hideBetterExperience",
|
|
72
|
+
publicName: "hideBetterExperience",
|
|
73
|
+
isSignal: true,
|
|
74
|
+
isRequired: false,
|
|
75
|
+
transformFunction: null
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
outputs: {
|
|
79
|
+
scaleItems: "scaleItemsChange",
|
|
80
|
+
hideBetterExperience: "hideBetterExperienceChange",
|
|
81
|
+
scaleItemChange: "scaleItemChange"
|
|
82
|
+
},
|
|
83
|
+
host: { properties: { "style.--scale-count": "scaleCount()" } },
|
|
84
|
+
ngImport: i0,
|
|
85
|
+
template: "<div class=\"scale-table\">\n <div class=\"better-experience\" [class.hide]=\"hideBetterExperience()\">\n <ui-icon [size]=\"'24'\" [name]=\"'Device-rotate-in-line'\" class=\"mobile-landscape-icon\" />\n <p>{{ 'SCALE_TABLE.ROTATE_DEVICE' | uiTranslate | async }}</p>\n <ui-button\n iconName=\"Close\"\n variant=\"icon-button\"\n size=\"small\"\n [justIcon]=\"true\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"hideBetterExperience.set(true)\"\n />\n </div>\n <!-- Header -->\n <div tabindex=\"0\" [attr.aria-label]=\"'scale header'\" class=\"scale-table-header\">\n @for (label of labels(); track $index) {\n <div\n tabindex=\"0\"\n role=\"heading\"\n [attr.aria-level]=\"3\"\n [attr.aria-label]=\"label + ' as ' + ($index + 1)\"\n class=\"scale-size\"\n >\n {{ label }}\n </div>\n }\n </div>\n <!-- Scale Items -->\n @for (scale of scaleItems(); track scale.text) {\n <div class=\"scale-table-row\" tabindex=\"0\" role=\"radiogroup\" [attr.aria-label]=\"scale.text\">\n <div class=\"scale-text\">{{ scale.text }}</div>\n <ui-scale\n [selectedIndex]=\"scale.value ?? null\"\n [length]=\"scale.length ?? labels().length\"\n [applicationTheme]=\"applicationTheme()\"\n (selectedIndexChange)=\"select($index, $event)\"\n />\n </div>\n }\n</div>\n",
|
|
86
|
+
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}:host{font:\"ModernGothic\",serif;position:relative;display:flex;overflow:auto;align-items:start}.scale-table{display:flex;flex-direction:column;width:100%}.scale-table-header{display:flex;flex-direction:row;align-items:center;justify-content:end;min-width:fit-content;position:sticky;top:0;border-bottom:1px solid #d3d3d3;background-color:#fff;align-items:baseline;box-shadow:0 4px 16px #24242414;padding-inline-start:16px;padding-inline-end:8px;padding-top:4px}.scale-table-row{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:8px;min-width:fit-content;border-bottom:1px solid #d3d3d3}.scale-size{width:80px;text-align:center;flex-shrink:0;color:#242424;font-size:12px;font-family:ModernGothic;align-self:stretch;padding:4px}ui-scale{width:calc(var(--scale-count, 5) * 80px);flex-shrink:0}.scale-text{font-weight:400;font-size:16px;line-height:24px;letter-spacing:0%;vertical-align:middle;text-align:justify;font-family:ModernGothic;max-width:800px}.border-bottom{border-bottom:1px solid #d3d3d3}.better-experience{display:none;flex-direction:row;align-items:center;gap:8px;border-radius:10px;padding:12px 16px;background:#d9e8ff;justify-content:center}.better-experience p{flex:1 1 0%;font-size:14px;line-height:22px;font-weight:400;font-size:16px;line-height:24px;letter-spacing:0%;vertical-align:middle;margin:0}.background-white{background-color:#fff}@media(max-width:960px){.scale-table-header{padding-left:0;padding-right:0;justify-content:start}.scale-table-row{padding-left:0;padding-right:0;flex-direction:column;align-items:start}.scale-size{width:calc(100% / var(--scale-count));min-width:40px;padding:0}ui-scale{width:100%;min-width:calc(var(--scale-count) * 40px);align-self:center}}@media screen and (min-width:1280px){.scale-size{width:104px;min-width:104px}ui-scale{min-width:calc(var(--scale-count) * 104px);align-self:center}}@media screen and (orientation:portrait)and (max-width:560px){.better-experience{display:flex}}.hide{display:none}\n"],
|
|
87
|
+
dependencies: [
|
|
88
|
+
{
|
|
89
|
+
kind: "ngmodule",
|
|
90
|
+
type: ScaleComponentModule
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
kind: "component",
|
|
94
|
+
type: i1.ScaleComponent,
|
|
95
|
+
selector: "ui-scale",
|
|
96
|
+
inputs: [
|
|
97
|
+
"selectedIndex",
|
|
98
|
+
"length",
|
|
99
|
+
"applicationTheme",
|
|
100
|
+
"companyColor",
|
|
101
|
+
"testId",
|
|
102
|
+
"ariaLabel"
|
|
103
|
+
],
|
|
104
|
+
outputs: ["selectedIndexChange"]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
kind: "ngmodule",
|
|
108
|
+
type: IconComponentModule
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
kind: "component",
|
|
112
|
+
type: i2.IconComponent,
|
|
113
|
+
selector: "ui-icon",
|
|
114
|
+
inputs: [
|
|
115
|
+
"size",
|
|
116
|
+
"cssClass",
|
|
117
|
+
"name",
|
|
118
|
+
"color",
|
|
119
|
+
"filled",
|
|
120
|
+
"toggleIconStyle",
|
|
121
|
+
"applicationTheme",
|
|
122
|
+
"useFullIconName"
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
kind: "ngmodule",
|
|
127
|
+
type: ButtonComponentModule
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
kind: "component",
|
|
131
|
+
type: i3.ButtonComponent,
|
|
132
|
+
selector: "ui-button",
|
|
133
|
+
inputs: [
|
|
134
|
+
"size",
|
|
135
|
+
"variant",
|
|
136
|
+
"label",
|
|
137
|
+
"iconPosition",
|
|
138
|
+
"justIcon",
|
|
139
|
+
"iconName",
|
|
140
|
+
"trailingIconName",
|
|
141
|
+
"trailingIconFilled",
|
|
142
|
+
"disabled",
|
|
143
|
+
"loading",
|
|
144
|
+
"loadingWithLabel",
|
|
145
|
+
"fullWidth",
|
|
146
|
+
"url",
|
|
147
|
+
"urlTarget",
|
|
148
|
+
"value",
|
|
149
|
+
"tooltip",
|
|
150
|
+
"isPremium",
|
|
151
|
+
"type",
|
|
152
|
+
"companyColor",
|
|
153
|
+
"buttonBadgeConfig",
|
|
154
|
+
"applicationTheme",
|
|
155
|
+
"disabledScaleOnClick",
|
|
156
|
+
"ariaLabel",
|
|
157
|
+
"ariaExpanded",
|
|
158
|
+
"ariaControls",
|
|
159
|
+
"ariaPressed",
|
|
160
|
+
"ariaRequired",
|
|
161
|
+
"ariaLabelledby",
|
|
162
|
+
"ariaDescribedby",
|
|
163
|
+
"preventDefault",
|
|
164
|
+
"hasBackground",
|
|
165
|
+
"tooltipPosition",
|
|
166
|
+
"role",
|
|
167
|
+
"iconFilled",
|
|
168
|
+
"testId"
|
|
169
|
+
],
|
|
170
|
+
outputs: ["buttonClickEvent", "buttonHoverEvent"]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
kind: "pipe",
|
|
174
|
+
type: UiTranslatePipe,
|
|
175
|
+
name: "uiTranslate"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
kind: "pipe",
|
|
179
|
+
type: AsyncPipe,
|
|
180
|
+
name: "async"
|
|
181
|
+
}
|
|
182
|
+
],
|
|
183
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
188
|
+
minVersion: "12.0.0",
|
|
189
|
+
version: "22.2.4",
|
|
190
|
+
ngImport: i0,
|
|
191
|
+
type: ScaleTableComponent,
|
|
192
|
+
decorators: [{
|
|
193
|
+
type: Component,
|
|
194
|
+
args: [{
|
|
195
|
+
selector: "ui-scale-table",
|
|
196
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
197
|
+
imports: [
|
|
198
|
+
UiTranslatePipe,
|
|
199
|
+
ScaleComponentModule,
|
|
200
|
+
AsyncPipe,
|
|
201
|
+
IconComponentModule,
|
|
202
|
+
ButtonComponentModule
|
|
203
|
+
],
|
|
204
|
+
host: { "[style.--scale-count]": "scaleCount()" },
|
|
205
|
+
template: "<div class=\"scale-table\">\n <div class=\"better-experience\" [class.hide]=\"hideBetterExperience()\">\n <ui-icon [size]=\"'24'\" [name]=\"'Device-rotate-in-line'\" class=\"mobile-landscape-icon\" />\n <p>{{ 'SCALE_TABLE.ROTATE_DEVICE' | uiTranslate | async }}</p>\n <ui-button\n iconName=\"Close\"\n variant=\"icon-button\"\n size=\"small\"\n [justIcon]=\"true\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"hideBetterExperience.set(true)\"\n />\n </div>\n <!-- Header -->\n <div tabindex=\"0\" [attr.aria-label]=\"'scale header'\" class=\"scale-table-header\">\n @for (label of labels(); track $index) {\n <div\n tabindex=\"0\"\n role=\"heading\"\n [attr.aria-level]=\"3\"\n [attr.aria-label]=\"label + ' as ' + ($index + 1)\"\n class=\"scale-size\"\n >\n {{ label }}\n </div>\n }\n </div>\n <!-- Scale Items -->\n @for (scale of scaleItems(); track scale.text) {\n <div class=\"scale-table-row\" tabindex=\"0\" role=\"radiogroup\" [attr.aria-label]=\"scale.text\">\n <div class=\"scale-text\">{{ scale.text }}</div>\n <ui-scale\n [selectedIndex]=\"scale.value ?? null\"\n [length]=\"scale.length ?? labels().length\"\n [applicationTheme]=\"applicationTheme()\"\n (selectedIndexChange)=\"select($index, $event)\"\n />\n </div>\n }\n</div>\n",
|
|
206
|
+
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}:host{font:\"ModernGothic\",serif;position:relative;display:flex;overflow:auto;align-items:start}.scale-table{display:flex;flex-direction:column;width:100%}.scale-table-header{display:flex;flex-direction:row;align-items:center;justify-content:end;min-width:fit-content;position:sticky;top:0;border-bottom:1px solid #d3d3d3;background-color:#fff;align-items:baseline;box-shadow:0 4px 16px #24242414;padding-inline-start:16px;padding-inline-end:8px;padding-top:4px}.scale-table-row{display:flex;justify-content:space-between;gap:8px;align-items:center;padding-top:8px;padding-bottom:8px;padding-inline-start:16px;padding-inline-end:8px;min-width:fit-content;border-bottom:1px solid #d3d3d3}.scale-size{width:80px;text-align:center;flex-shrink:0;color:#242424;font-size:12px;font-family:ModernGothic;align-self:stretch;padding:4px}ui-scale{width:calc(var(--scale-count, 5) * 80px);flex-shrink:0}.scale-text{font-weight:400;font-size:16px;line-height:24px;letter-spacing:0%;vertical-align:middle;text-align:justify;font-family:ModernGothic;max-width:800px}.border-bottom{border-bottom:1px solid #d3d3d3}.better-experience{display:none;flex-direction:row;align-items:center;gap:8px;border-radius:10px;padding:12px 16px;background:#d9e8ff;justify-content:center}.better-experience p{flex:1 1 0%;font-size:14px;line-height:22px;font-weight:400;font-size:16px;line-height:24px;letter-spacing:0%;vertical-align:middle;margin:0}.background-white{background-color:#fff}@media(max-width:960px){.scale-table-header{padding-left:0;padding-right:0;justify-content:start}.scale-table-row{padding-left:0;padding-right:0;flex-direction:column;align-items:start}.scale-size{width:calc(100% / var(--scale-count));min-width:40px;padding:0}ui-scale{width:100%;min-width:calc(var(--scale-count) * 40px);align-self:center}}@media screen and (min-width:1280px){.scale-size{width:104px;min-width:104px}ui-scale{min-width:calc(var(--scale-count) * 104px);align-self:center}}@media screen and (orientation:portrait)and (max-width:560px){.better-experience{display:flex}}.hide{display:none}\n"]
|
|
207
|
+
}]
|
|
208
|
+
}],
|
|
209
|
+
propDecorators: {
|
|
210
|
+
applicationTheme: [{
|
|
211
|
+
type: i0.Input,
|
|
212
|
+
args: [{
|
|
213
|
+
isSignal: true,
|
|
214
|
+
alias: "applicationTheme",
|
|
215
|
+
required: false
|
|
216
|
+
}]
|
|
217
|
+
}],
|
|
218
|
+
scaleItems: [{
|
|
219
|
+
type: i0.Input,
|
|
220
|
+
args: [{
|
|
221
|
+
isSignal: true,
|
|
222
|
+
alias: "scaleItems",
|
|
223
|
+
required: true
|
|
224
|
+
}]
|
|
225
|
+
}, {
|
|
226
|
+
type: i0.Output,
|
|
227
|
+
args: ["scaleItemsChange"]
|
|
228
|
+
}],
|
|
229
|
+
labels: [{
|
|
230
|
+
type: i0.Input,
|
|
231
|
+
args: [{
|
|
232
|
+
isSignal: true,
|
|
233
|
+
alias: "labels",
|
|
234
|
+
required: true
|
|
235
|
+
}]
|
|
236
|
+
}],
|
|
237
|
+
hideBetterExperience: [{
|
|
238
|
+
type: i0.Input,
|
|
239
|
+
args: [{
|
|
240
|
+
isSignal: true,
|
|
241
|
+
alias: "hideBetterExperience",
|
|
242
|
+
required: false
|
|
243
|
+
}]
|
|
244
|
+
}, {
|
|
245
|
+
type: i0.Output,
|
|
246
|
+
args: ["hideBetterExperienceChange"]
|
|
247
|
+
}],
|
|
248
|
+
scaleItemChange: [{
|
|
249
|
+
type: i0.Output,
|
|
250
|
+
args: ["scaleItemChange"]
|
|
251
|
+
}]
|
|
252
|
+
}
|
|
253
|
+
});
|
|
67
254
|
export { ScaleTableComponent };
|
|
68
|
-
|
|
255
|
+
|
|
256
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-scale-table.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-scale-table.mjs","sources":["../../../components/scale-table/scale-table.component.ts","../../../components/scale-table/scale-table.component.html"
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-scale-table.mjs","names":[],"sources":["../../../components/scale-table/scale-table.component.ts","../../../components/scale-table/scale-table.component.html"],"sourcesContent":["import { AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, input, model, output } from '@angular/core';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { ApplicationTheme, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\nimport { ScaleComponentModule } from '@testgorilla/tgo-ui/components/scale';\n\nimport { ScaleItem } from './scale-table.model';\n\n@Component({\n selector: 'ui-scale-table',\n templateUrl: './scale-table.component.html',\n styleUrls: ['./scale-table.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [UiTranslatePipe, ScaleComponentModule, AsyncPipe, IconComponentModule, ButtonComponentModule],\n host: {\n '[style.--scale-count]': 'scaleCount()',\n },\n})\nexport class ScaleTableComponent {\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof ScaleTableComponent\n */\n public applicationTheme = input<ApplicationTheme>('light');\n\n /**\n *\n * Defines items with their text and it's values\n *\n * @type {ScaleTable}\n * @memberof ScaleTableComponent\n */\n public scaleItems = model.required<ScaleItem[]>();\n\n /**\n *\n * Defines description of scales\n *\n * @type {string[]}\n * @memberof ScaleTableComponent\n */\n public labels = input.required<string[]>();\n public hideBetterExperience = model(false);\n public scaleItemChange = output<{\n item: ScaleItem;\n label: string;\n }>();\n scaleCount = computed(() => this.labels().length);\n\n protected readonly translationContext = 'SCALE_TABLE.';\n\n public select(scaleItemIndex: number, scaleIndex: number): void {\n this.scaleItems.update(items => {\n items[scaleItemIndex].value = scaleIndex;\n this.scaleItemChange.emit({\n item: items[scaleItemIndex],\n label: this.labels()[scaleIndex],\n });\n return [...items];\n });\n }\n}\n","<div class=\"scale-table\">\n <div class=\"better-experience\" [class.hide]=\"hideBetterExperience()\">\n <ui-icon [size]=\"'24'\" [name]=\"'Device-rotate-in-line'\" class=\"mobile-landscape-icon\" />\n <p>{{ 'SCALE_TABLE.ROTATE_DEVICE' | uiTranslate | async }}</p>\n <ui-button\n iconName=\"Close\"\n variant=\"icon-button\"\n size=\"small\"\n [justIcon]=\"true\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"hideBetterExperience.set(true)\"\n />\n </div>\n <!-- Header -->\n <div tabindex=\"0\" [attr.aria-label]=\"'scale header'\" class=\"scale-table-header\">\n @for (label of labels(); track $index) {\n <div\n tabindex=\"0\"\n role=\"heading\"\n [attr.aria-level]=\"3\"\n [attr.aria-label]=\"label + ' as ' + ($index + 1)\"\n class=\"scale-size\"\n >\n {{ label }}\n </div>\n }\n </div>\n <!-- Scale Items -->\n @for (scale of scaleItems(); track scale.text) {\n <div class=\"scale-table-row\" tabindex=\"0\" role=\"radiogroup\" [attr.aria-label]=\"scale.text\">\n <div class=\"scale-text\">{{ scale.text }}</div>\n <ui-scale\n [selectedIndex]=\"scale.value ?? null\"\n [length]=\"scale.length ?? labels().length\"\n [applicationTheme]=\"applicationTheme()\"\n (selectedIndexChange)=\"select($index, $event)\"\n />\n </div>\n }\n</div>\n"],"mappings":";;;;;;;;;;AAoBA,IAAa,sBAAb,MAAa,oBAAmB;CAVhC,cAAA;EAkBS,KAAA,mBAAmB,MAAwB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,mBAAA,CAAA,+BAAA,CAAA,CAAA;EASnD,KAAA,aAAa,MAAM,SAAuB,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;EAS1C,KAAA,SAAS,MAAM,SAAoB,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;EACnC,KAAA,uBAAuB,MAAM,OAAM,GAAA,YAAA,CAAA,EAAA,WAAA,uBAAA,CAAA,+BAAA,CAAA,CAAA;EACnC,KAAA,kBAAkB,OAAM;EAI/B,KAAA,aAAa,eAAe,KAAK,OAAM,CAAE,CAAC,QAAO,GAAA,YAAA,CAAA,EAAA,WAAA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