@testgorilla/tgo-ui 11.22.3 → 12.0.0
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-gaussian-chart.mjs","sources":["../../../components/gaussian-chart/gaussian-chart.component.ts","../../../components/gaussian-chart/gaussian-chart.component.html","../../../components/gaussian-chart/gaussian-chart.module.ts","../../../components/gaussian-chart/testgorilla-tgo-ui-components-gaussian-chart.ts"],"sourcesContent":["import { NgTemplateOutlet, NgClass, AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Chart, ChartData, ChartOptions } from 'chart.js';\nimport gaussian from 'gaussian';\nimport { BaseChartDirective } from 'ng2-charts';\n\nimport { ApplicationTheme, Color, UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nconst PercentileThreshold = {\n LOWEST: 20,\n LOWER: 40,\n AVERAGE: 60,\n HIGHER: 80,\n HIGHEST: 100,\n} as const;\ntype PercentileThreshold = (typeof PercentileThreshold)[keyof typeof PercentileThreshold];\n\nexport type LegendPosition = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';\n\n@Component({\n selector: 'ui-gaussian-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './gaussian-chart.component.html',\n styleUrls: ['./gaussian-chart.component.scss'],\n imports: [\n NgTemplateOutlet,\n BaseChartDirective,\n IconComponentModule,\n MatTooltip,\n NgClass,\n UiTranslatePipe,\n AsyncPipe,\n MemoizeFuncPipe,\n ],\n})\nexport class GaussianChartComponent implements OnInit {\n /**\n * The candidate score to be displayed on the chart.\n * @type {number}\n * @memberof GaussianChartComponent\n */\n @Input() score!: number;\n\n /**\n * The best candidate score to be displayed on the chart.\n * @type {number}\n * @memberof GaussianChartComponent\n */\n @Input() bestCandidateScore!: number;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof SpinnerComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Controls the position of the legend relative to the chart.\n * @type {LegendPosition}\n * @memberof GaussianChartComponent\n */\n @Input() legendPosition: LegendPosition = 'bottom-start';\n\n readonly minXValue = -3;\n readonly maxXValue = 3;\n readonly minYValue = 0;\n readonly stepSize = 0.1;\n readonly pointsToSkip = 2;\n readonly actualMinXvalue = this.minXValue + this.pointsToSkip * this.stepSize;\n readonly actualMaxXvalue = this.maxXValue - this.pointsToSkip * this.stepSize;\n readonly normalContainerPadding = 50; //in px\n readonly bestScoreThreshold = 92;\n readonly bestScoreSpacingRight = '4px';\n readonly bestScoreSpacingLeft = '-39px';\n\n PercentileThreshold = PercentileThreshold;\n chart: Chart;\n gaussianDistribution: gaussian.Gaussian;\n activeBucket: PercentileThreshold;\n overlayXValue: number;\n overlayYValue: number;\n overlayXBestScoreValue: number;\n overlayYBestScoreValue: number;\n maxYValue: number;\n\n gaussianChartData: ChartData<'line'> = {\n labels: [],\n datasets: [],\n };\n gaussianChartOptions: ChartOptions<'line'>;\n protected readonly translationContext = 'CHARTS.GAUSSIAN_CHART.';\n\n ngOnInit(): void {\n if (this.score === undefined || this.score === null) {\n throw new Error('Input \"score\" is required for GaussianChartComponent.');\n }\n if (this.bestCandidateScore === undefined || this.bestCandidateScore === null) {\n throw new Error('Input \"bestCandidateScore\" is required for GaussianChartComponent.');\n }\n this.setActiveBucket();\n this.gaussianDistribution = gaussian(0, 1);\n this.maxYValue = this.gaussianDistribution.pdf(0);\n this.setOverlayValues();\n this.setOverlayValuesForBestScore();\n this.setChartData();\n this.setChartOptions();\n }\n\n private setChartData() {\n const xValues: number[] = [];\n const yValues: number[] = [];\n const labels = this.generateLabels(this.minXValue, this.maxXValue, this.stepSize);\n\n for (let x = this.minXValue; x < this.maxXValue + this.stepSize; x = Number((x + this.stepSize).toFixed(2))) {\n xValues.push(x);\n yValues.push(this.gaussianDistribution.pdf(x));\n }\n\n this.gaussianChartData = {\n labels,\n datasets: this.generateDataset(yValues),\n };\n }\n\n private setChartOptions() {\n this.gaussianChartOptions = {\n responsive: true,\n maintainAspectRatio: false,\n scales: this.getScale(),\n plugins: {\n // To be used only for dev purpose\n // tooltip: this.getTooltip(),\n // Comment the below line if you enable the call for tooltip\n tooltip: {\n enabled: false,\n },\n legend: {\n display: false,\n },\n },\n };\n }\n\n private getTooltip() {\n return {\n intersect: false,\n mode: 'nearest',\n displayColors: false,\n callbacks: {\n label: (tooltipItem: { label: string }) => {\n const value = (this.gaussianDistribution.cdf(parseFloat(tooltipItem.label)) * 100).toFixed(2);\n return `${value}%`;\n },\n title: () => '', // Disable the default title\n },\n };\n }\n\n private getScale(): {\n x: { display: boolean; grid: { display: boolean } };\n y: { display: boolean; grid: { display: boolean } };\n } {\n return {\n x: {\n display: false,\n grid: {\n display: false, // Disable grid lines for x-axis\n },\n },\n y: {\n display: false,\n grid: {\n display: false, // Disable grid lines for y-axis\n },\n },\n };\n }\n\n private generateDataset(yValues: number[]): {\n data: (number | null)[];\n label: string;\n borderColor: Color;\n borderWidth: number;\n pointRadius: number;\n fill: boolean;\n }[] {\n return [\n {\n data: [\n ...yValues.slice(0, this.pointsToSkip),\n ...Array<number | null>(yValues.length - this.pointsToSkip).fill(null),\n ],\n label: '',\n borderColor: this.activeBucket === PercentileThreshold.LOWEST ? Color.ACCENT_20 : Color.TGO_WHITE,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n {\n data: [\n ...Array<number | null>(this.pointsToSkip).fill(null),\n ...yValues.slice(this.pointsToSkip, yValues.length - this.pointsToSkip),\n ...Array<number | null>(this.pointsToSkip).fill(null),\n ],\n label: '',\n borderColor: Color.BLACK,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n {\n data: [\n ...Array<number | null>(yValues.length - this.pointsToSkip).fill(null),\n ...yValues.slice(yValues.length - this.pointsToSkip, yValues.length),\n ],\n label: '',\n borderColor: this.activeBucket === PercentileThreshold.HIGHEST ? Color.ACCENT_20 : Color.TGO_WHITE,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n ];\n }\n\n private generateLabels(min: number, max: number, step: number): string[] {\n const labels = [];\n for (let x = min; x < max + step; x = Number((x + step).toFixed(2))) {\n labels.push(x.toFixed(1));\n }\n return labels;\n }\n\n private setActiveBucket(): void {\n const score = this.score;\n if (score < PercentileThreshold.LOWEST) {\n this.activeBucket = PercentileThreshold.LOWEST;\n } else if (score >= PercentileThreshold.LOWEST && score < PercentileThreshold.LOWER) {\n this.activeBucket = PercentileThreshold.LOWER;\n } else if (score >= PercentileThreshold.LOWER && score < PercentileThreshold.AVERAGE) {\n this.activeBucket = PercentileThreshold.AVERAGE;\n } else if (score >= PercentileThreshold.AVERAGE && score < PercentileThreshold.HIGHER) {\n this.activeBucket = PercentileThreshold.HIGHER;\n } else if (score >= PercentileThreshold.HIGHER) {\n this.activeBucket = PercentileThreshold.HIGHEST;\n }\n }\n\n // For more context: https://testgorilla.atlassian.net/wiki/spaces/SR/pages/1813905736/Percentiles+curve+FE+implementation\n private setOverlayValues(): void {\n const { overlayXValue, overlayYValue } = this.calculateOverlayValues(this.score);\n this.overlayXValue = overlayXValue;\n this.overlayYValue = overlayYValue;\n }\n\n private setOverlayValuesForBestScore(): void {\n const { overlayXValue, overlayYValue } = this.calculateOverlayValues(this.bestCandidateScore);\n this.overlayXBestScoreValue = overlayXValue;\n this.overlayYBestScoreValue = overlayYValue;\n }\n\n private calculateOverlayValues(score: number): { overlayXValue: number; overlayYValue: number } {\n const xValue = this.mapRange(score, 0, 100, this.minXValue, this.maxXValue);\n const yValue = this.gaussianDistribution.pdf(xValue);\n let overlayXValue = score;\n let overlayYValue = this.mapRange(yValue, this.minYValue, this.maxYValue, 0, 100);\n\n if (xValue <= this.actualMinXvalue || xValue >= this.actualMaxXvalue) {\n const xValueExtreme = xValue <= this.actualMinXvalue ? this.actualMinXvalue : this.actualMaxXvalue;\n const yValueExtreme = this.gaussianDistribution.pdf(xValueExtreme);\n overlayXValue = this.mapRange(xValueExtreme, this.minXValue, this.maxXValue, 0, 100);\n overlayYValue = this.mapRange(yValueExtreme, this.minYValue, this.maxYValue, 0, 100);\n }\n\n return { overlayXValue, overlayYValue };\n }\n\n private mapRange(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;\n }\n\n getCalcPosition([percentage, pixels, operation = 'add']: [number, number, 'add' | 'subtract']): string {\n const operator = operation === 'add' ? '+' : '-';\n return `calc(${percentage}% ${operator} ${pixels}px)`;\n }\n\n getBestScoreContentPosition(bestScore: number): string {\n return bestScore < this.bestScoreThreshold ? this.bestScoreSpacingRight : this.bestScoreSpacingLeft;\n }\n\n getScoreTranslationKey(score: number): string {\n if (score < PercentileThreshold.LOWEST) {\n return 'PERCENTILE_LABEL_TYPES.WELL_BELOW_AVERAGE';\n } else if (score >= PercentileThreshold.LOWEST && score < PercentileThreshold.LOWER) {\n return 'PERCENTILE_LABEL_TYPES.BELOW_AVERAGE';\n } else if (score >= PercentileThreshold.LOWER && score < PercentileThreshold.AVERAGE) {\n return 'PERCENTILE_LABEL_TYPES.AVERAGE';\n } else if (score >= PercentileThreshold.AVERAGE && score < PercentileThreshold.HIGHER) {\n return 'PERCENTILE_LABEL_TYPES.ABOVE_AVERAGE';\n } else {\n return 'PERCENTILE_LABEL_TYPES.WELL_ABOVE_AVERAGE';\n }\n }\n}\n","@if (score) {\n <div\n class=\"chart-section\"\n [attr.aria-label]=\"\n translationContext + 'ARIA_LABEL'\n | uiTranslate\n : {\n score: score,\n activeBucket: getScoreTranslationKey(score) | uiTranslate | async,\n bestCandidateScore: bestCandidateScore,\n activeBucketBestScore: getScoreTranslationKey(bestCandidateScore) | uiTranslate | async,\n }\n | async\n \"\n tabindex=\"0\"\n >\n <!-- Legend positioned at top -->\n @if (legendPosition === 'top-start' || legendPosition === 'top-end') {\n <ng-container [ngTemplateOutlet]=\"legendTemplate\"></ng-container>\n }\n <div class=\"chart-range-wrapper\">\n <div class=\"normal-chart-container\">\n <div class=\"normal-chart\">\n <canvas baseChart [data]=\"gaussianChartData\" [options]=\"gaussianChartOptions\" type=\"line\" class=\"chart\">\n </canvas>\n <div\n class=\"overlay-icon\"\n [style.bottom]=\"[overlayYValue, 3, 'subtract'] | memoizeFunc: getCalcPosition\"\n [style.left]=\"[overlayXValue, 20, 'subtract'] | memoizeFunc: getCalcPosition\"\n >\n <div class=\"drop-icon\">\n <ui-icon name=\"Pin-marker\" size=\"40\"></ui-icon>\n <span class=\"curve-score\">{{ score }}</span>\n </div>\n </div>\n <div\n class=\"best-score\"\n [style.height]=\"\n [100 - overlayYBestScoreValue, normalContainerPadding, 'add'] | memoizeFunc: getCalcPosition\n \"\n [style.bottom]=\"overlayYBestScoreValue + '%'\"\n [style.left]=\"overlayXBestScoreValue + '%'\"\n >\n <div\n class=\"best-score-content\"\n [style.left]=\"bestCandidateScore | memoizeFunc: getBestScoreContentPosition : this\"\n >\n <ui-icon name=\"Trophy\"></ui-icon>\n {{ bestCandidateScore }}\n </div>\n </div>\n </div>\n <div class=\"overlay\">\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.LOWEST\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.LOWEST\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWEST_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWEST' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.LOWER\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.LOWER\"\n [matTooltip]=\"(translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWER_TOOLTIP' | uiTranslate | async) || ''\"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWER' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.AVERAGE\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.AVERAGE\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.AVERAGE_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.AVERAGE' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.HIGHER\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.HIGHER\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHER_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHER' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.HIGHEST\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.HIGHEST\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHEST_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHEST' | uiTranslate | async }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"range\">\n <div>1</div>\n <div>20</div>\n <div>40</div>\n <div>60</div>\n <div>80</div>\n <div>99</div>\n </div>\n </div>\n <!-- Legend positioned at bottom -->\n @if (legendPosition === 'bottom-start' || legendPosition === 'bottom-end') {\n <ng-container [ngTemplateOutlet]=\"legendTemplate\"></ng-container>\n }\n </div>\n}\n\n<!-- Reusable legend template -->\n<ng-template #legendTemplate>\n <div class=\"legend-container\" [ngClass]=\"'legend-' + legendPosition\">\n <div class=\"legend\">\n <ui-icon name=\"Dot\" color=\"gray\"></ui-icon>\n {{ translationContext + 'CANDIDATE_SCORE' | uiTranslate | async }}\n </div>\n <div class=\"legend\">\n <ui-icon name=\"Trophy\" color=\"gray\"></ui-icon>\n {{ translationContext + 'HIGHEST_SCORE' | uiTranslate | async }}\n </div>\n </div>\n</ng-template>\n","import { CommonModule, NgClass } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Chart, registerables } from 'chart.js';\nimport { BaseChartDirective } from 'ng2-charts';\n\nimport { UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { GaussianChartComponent } from './gaussian-chart.component';\n\nChart.register(...registerables);\n\n@NgModule({\n exports: [GaussianChartComponent],\n imports: [\n NgClass,\n UiTranslatePipe,\n BaseChartDirective,\n MatTooltipModule,\n CommonModule,\n IconComponentModule,\n MemoizeFuncPipe,\n GaussianChartComponent,\n ],\n})\nexport class GaussianChartComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;AAUA,MAAM,mBAAmB,GAAG;AAC1B,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,KAAK,EAAE,EAAE;AACT,IAAA,OAAO,EAAE,EAAE;AACX,IAAA,MAAM,EAAE,EAAE;AACV,IAAA,OAAO,E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A,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,4BAA4B,YAPrC,gBAAgB;YAChB,YAAY;YACZ,mBAAmB;YAEnB,sBAAsB,CAAA,EAAA,CAAA,CAAA;;4FAGb,4BAA4B,EAAA,UAAA,EAAA,CAAA;kBAbxC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,sBAAsB,CAAC;AACjC,oBAAA,OAAO,EAAE;wBACP,OAAO;wBACP,eAAe;wBACf,kBAAkB;wBAClB,gBAAgB;wBAChB,YAAY;wBACZ,mBAAmB;wBACnB,eAAe;wBACf,sBAAsB;AACvB,qBAAA;AACF,iBAAA;;;ACzBD;;AAEG;;"}
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-gaussian-chart.mjs","names":[],"sources":["../../../components/gaussian-chart/gaussian-chart.component.ts","../../../components/gaussian-chart/gaussian-chart.component.html","../../../components/gaussian-chart/gaussian-chart.module.ts"],"sourcesContent":["import { NgTemplateOutlet, NgClass, AsyncPipe } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Input, OnInit } from '@angular/core';\nimport { MatTooltip } from '@angular/material/tooltip';\nimport { Chart, ChartData, ChartOptions } from 'chart.js';\nimport gaussian from 'gaussian';\nimport { BaseChartDirective } from 'ng2-charts';\n\nimport { ApplicationTheme, Color, UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nconst PercentileThreshold = {\n LOWEST: 20,\n LOWER: 40,\n AVERAGE: 60,\n HIGHER: 80,\n HIGHEST: 100,\n} as const;\ntype PercentileThreshold = (typeof PercentileThreshold)[keyof typeof PercentileThreshold];\n\nexport type LegendPosition = 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';\n\n@Component({\n selector: 'ui-gaussian-chart',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './gaussian-chart.component.html',\n styleUrls: ['./gaussian-chart.component.scss'],\n imports: [\n NgTemplateOutlet,\n BaseChartDirective,\n IconComponentModule,\n MatTooltip,\n NgClass,\n UiTranslatePipe,\n AsyncPipe,\n MemoizeFuncPipe,\n ],\n})\nexport class GaussianChartComponent implements OnInit {\n /**\n * The candidate score to be displayed on the chart.\n * @type {number}\n * @memberof GaussianChartComponent\n */\n @Input() score!: number;\n\n /**\n * The best candidate score to be displayed on the chart.\n * @type {number}\n * @memberof GaussianChartComponent\n */\n @Input() bestCandidateScore!: number;\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof SpinnerComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n /**\n * Controls the position of the legend relative to the chart.\n * @type {LegendPosition}\n * @memberof GaussianChartComponent\n */\n @Input() legendPosition: LegendPosition = 'bottom-start';\n\n readonly minXValue = -3;\n readonly maxXValue = 3;\n readonly minYValue = 0;\n readonly stepSize = 0.1;\n readonly pointsToSkip = 2;\n readonly actualMinXvalue = this.minXValue + this.pointsToSkip * this.stepSize;\n readonly actualMaxXvalue = this.maxXValue - this.pointsToSkip * this.stepSize;\n readonly normalContainerPadding = 50; //in px\n readonly bestScoreThreshold = 92;\n readonly bestScoreSpacingRight = '4px';\n readonly bestScoreSpacingLeft = '-39px';\n\n PercentileThreshold = PercentileThreshold;\n chart: Chart;\n gaussianDistribution: gaussian.Gaussian;\n activeBucket: PercentileThreshold;\n overlayXValue: number;\n overlayYValue: number;\n overlayXBestScoreValue: number;\n overlayYBestScoreValue: number;\n maxYValue: number;\n\n gaussianChartData: ChartData<'line'> = {\n labels: [],\n datasets: [],\n };\n gaussianChartOptions: ChartOptions<'line'>;\n protected readonly translationContext = 'CHARTS.GAUSSIAN_CHART.';\n\n ngOnInit(): void {\n if (this.score === undefined || this.score === null) {\n throw new Error('Input \"score\" is required for GaussianChartComponent.');\n }\n if (this.bestCandidateScore === undefined || this.bestCandidateScore === null) {\n throw new Error('Input \"bestCandidateScore\" is required for GaussianChartComponent.');\n }\n this.setActiveBucket();\n this.gaussianDistribution = gaussian(0, 1);\n this.maxYValue = this.gaussianDistribution.pdf(0);\n this.setOverlayValues();\n this.setOverlayValuesForBestScore();\n this.setChartData();\n this.setChartOptions();\n }\n\n private setChartData() {\n const xValues: number[] = [];\n const yValues: number[] = [];\n const labels = this.generateLabels(this.minXValue, this.maxXValue, this.stepSize);\n\n for (let x = this.minXValue; x < this.maxXValue + this.stepSize; x = Number((x + this.stepSize).toFixed(2))) {\n xValues.push(x);\n yValues.push(this.gaussianDistribution.pdf(x));\n }\n\n this.gaussianChartData = {\n labels,\n datasets: this.generateDataset(yValues),\n };\n }\n\n private setChartOptions() {\n this.gaussianChartOptions = {\n responsive: true,\n maintainAspectRatio: false,\n scales: this.getScale(),\n plugins: {\n // To be used only for dev purpose\n // tooltip: this.getTooltip(),\n // Comment the below line if you enable the call for tooltip\n tooltip: {\n enabled: false,\n },\n legend: {\n display: false,\n },\n },\n };\n }\n\n private getTooltip() {\n return {\n intersect: false,\n mode: 'nearest',\n displayColors: false,\n callbacks: {\n label: (tooltipItem: { label: string }) => {\n const value = (this.gaussianDistribution.cdf(parseFloat(tooltipItem.label)) * 100).toFixed(2);\n return `${value}%`;\n },\n title: () => '', // Disable the default title\n },\n };\n }\n\n private getScale(): {\n x: { display: boolean; grid: { display: boolean } };\n y: { display: boolean; grid: { display: boolean } };\n } {\n return {\n x: {\n display: false,\n grid: {\n display: false, // Disable grid lines for x-axis\n },\n },\n y: {\n display: false,\n grid: {\n display: false, // Disable grid lines for y-axis\n },\n },\n };\n }\n\n private generateDataset(yValues: number[]): {\n data: (number | null)[];\n label: string;\n borderColor: Color;\n borderWidth: number;\n pointRadius: number;\n fill: boolean;\n }[] {\n return [\n {\n data: [\n ...yValues.slice(0, this.pointsToSkip),\n ...Array<number | null>(yValues.length - this.pointsToSkip).fill(null),\n ],\n label: '',\n borderColor: this.activeBucket === PercentileThreshold.LOWEST ? Color.ACCENT_20 : Color.TGO_WHITE,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n {\n data: [\n ...Array<number | null>(this.pointsToSkip).fill(null),\n ...yValues.slice(this.pointsToSkip, yValues.length - this.pointsToSkip),\n ...Array<number | null>(this.pointsToSkip).fill(null),\n ],\n label: '',\n borderColor: Color.BLACK,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n {\n data: [\n ...Array<number | null>(yValues.length - this.pointsToSkip).fill(null),\n ...yValues.slice(yValues.length - this.pointsToSkip, yValues.length),\n ],\n label: '',\n borderColor: this.activeBucket === PercentileThreshold.HIGHEST ? Color.ACCENT_20 : Color.TGO_WHITE,\n borderWidth: 2,\n pointRadius: 0,\n fill: false,\n },\n ];\n }\n\n private generateLabels(min: number, max: number, step: number): string[] {\n const labels = [];\n for (let x = min; x < max + step; x = Number((x + step).toFixed(2))) {\n labels.push(x.toFixed(1));\n }\n return labels;\n }\n\n private setActiveBucket(): void {\n const score = this.score;\n if (score < PercentileThreshold.LOWEST) {\n this.activeBucket = PercentileThreshold.LOWEST;\n } else if (score >= PercentileThreshold.LOWEST && score < PercentileThreshold.LOWER) {\n this.activeBucket = PercentileThreshold.LOWER;\n } else if (score >= PercentileThreshold.LOWER && score < PercentileThreshold.AVERAGE) {\n this.activeBucket = PercentileThreshold.AVERAGE;\n } else if (score >= PercentileThreshold.AVERAGE && score < PercentileThreshold.HIGHER) {\n this.activeBucket = PercentileThreshold.HIGHER;\n } else if (score >= PercentileThreshold.HIGHER) {\n this.activeBucket = PercentileThreshold.HIGHEST;\n }\n }\n\n // For more context: https://testgorilla.atlassian.net/wiki/spaces/SR/pages/1813905736/Percentiles+curve+FE+implementation\n private setOverlayValues(): void {\n const { overlayXValue, overlayYValue } = this.calculateOverlayValues(this.score);\n this.overlayXValue = overlayXValue;\n this.overlayYValue = overlayYValue;\n }\n\n private setOverlayValuesForBestScore(): void {\n const { overlayXValue, overlayYValue } = this.calculateOverlayValues(this.bestCandidateScore);\n this.overlayXBestScoreValue = overlayXValue;\n this.overlayYBestScoreValue = overlayYValue;\n }\n\n private calculateOverlayValues(score: number): { overlayXValue: number; overlayYValue: number } {\n const xValue = this.mapRange(score, 0, 100, this.minXValue, this.maxXValue);\n const yValue = this.gaussianDistribution.pdf(xValue);\n let overlayXValue = score;\n let overlayYValue = this.mapRange(yValue, this.minYValue, this.maxYValue, 0, 100);\n\n if (xValue <= this.actualMinXvalue || xValue >= this.actualMaxXvalue) {\n const xValueExtreme = xValue <= this.actualMinXvalue ? this.actualMinXvalue : this.actualMaxXvalue;\n const yValueExtreme = this.gaussianDistribution.pdf(xValueExtreme);\n overlayXValue = this.mapRange(xValueExtreme, this.minXValue, this.maxXValue, 0, 100);\n overlayYValue = this.mapRange(yValueExtreme, this.minYValue, this.maxYValue, 0, 100);\n }\n\n return { overlayXValue, overlayYValue };\n }\n\n private mapRange(value: number, inMin: number, inMax: number, outMin: number, outMax: number): number {\n return ((value - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;\n }\n\n getCalcPosition([percentage, pixels, operation = 'add']: [number, number, 'add' | 'subtract']): string {\n const operator = operation === 'add' ? '+' : '-';\n return `calc(${percentage}% ${operator} ${pixels}px)`;\n }\n\n getBestScoreContentPosition(bestScore: number): string {\n return bestScore < this.bestScoreThreshold ? this.bestScoreSpacingRight : this.bestScoreSpacingLeft;\n }\n\n getScoreTranslationKey(score: number): string {\n if (score < PercentileThreshold.LOWEST) {\n return 'PERCENTILE_LABEL_TYPES.WELL_BELOW_AVERAGE';\n } else if (score >= PercentileThreshold.LOWEST && score < PercentileThreshold.LOWER) {\n return 'PERCENTILE_LABEL_TYPES.BELOW_AVERAGE';\n } else if (score >= PercentileThreshold.LOWER && score < PercentileThreshold.AVERAGE) {\n return 'PERCENTILE_LABEL_TYPES.AVERAGE';\n } else if (score >= PercentileThreshold.AVERAGE && score < PercentileThreshold.HIGHER) {\n return 'PERCENTILE_LABEL_TYPES.ABOVE_AVERAGE';\n } else {\n return 'PERCENTILE_LABEL_TYPES.WELL_ABOVE_AVERAGE';\n }\n }\n}\n","@if (score) {\n <div\n class=\"chart-section\"\n [attr.aria-label]=\"\n translationContext + 'ARIA_LABEL'\n | uiTranslate\n : {\n score: score,\n activeBucket: getScoreTranslationKey(score) | uiTranslate | async,\n bestCandidateScore: bestCandidateScore,\n activeBucketBestScore: getScoreTranslationKey(bestCandidateScore) | uiTranslate | async,\n }\n | async\n \"\n tabindex=\"0\"\n >\n <!-- Legend positioned at top -->\n @if (legendPosition === 'top-start' || legendPosition === 'top-end') {\n <ng-container [ngTemplateOutlet]=\"legendTemplate\"></ng-container>\n }\n <div class=\"chart-range-wrapper\">\n <div class=\"normal-chart-container\">\n <div class=\"normal-chart\">\n <canvas baseChart [data]=\"gaussianChartData\" [options]=\"gaussianChartOptions\" type=\"line\" class=\"chart\">\n </canvas>\n <div\n class=\"overlay-icon\"\n [style.bottom]=\"[overlayYValue, 3, 'subtract'] | memoizeFunc: getCalcPosition\"\n [style.left]=\"[overlayXValue, 20, 'subtract'] | memoizeFunc: getCalcPosition\"\n >\n <div class=\"drop-icon\">\n <ui-icon name=\"Pin-marker\" size=\"40\"></ui-icon>\n <span class=\"curve-score\">{{ score }}</span>\n </div>\n </div>\n <div\n class=\"best-score\"\n [style.height]=\"\n [100 - overlayYBestScoreValue, normalContainerPadding, 'add'] | memoizeFunc: getCalcPosition\n \"\n [style.bottom]=\"overlayYBestScoreValue + '%'\"\n [style.left]=\"overlayXBestScoreValue + '%'\"\n >\n <div\n class=\"best-score-content\"\n [style.left]=\"bestCandidateScore | memoizeFunc: getBestScoreContentPosition : this\"\n >\n <ui-icon name=\"Trophy\"></ui-icon>\n {{ bestCandidateScore }}\n </div>\n </div>\n </div>\n <div class=\"overlay\">\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.LOWEST\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.LOWEST\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWEST_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWEST' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.LOWER\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.LOWER\"\n [matTooltip]=\"(translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWER_TOOLTIP' | uiTranslate | async) || ''\"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.LOWER' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.AVERAGE\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.AVERAGE\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.AVERAGE_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.AVERAGE' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.HIGHER\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.HIGHER\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHER_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHER' | uiTranslate | async }}\n </div>\n </div>\n <div class=\"overlay-column\" [class.active]=\"activeBucket === PercentileThreshold.HIGHEST\">\n <div\n class=\"column-item\"\n [class.text-bold]=\"activeBucket === PercentileThreshold.HIGHEST\"\n [matTooltip]=\"\n (translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHEST_TOOLTIP' | uiTranslate | async) || ''\n \"\n >\n {{ translationContext + 'PERCENTAGE_BUCKETS_GRAPH.HIGHEST' | uiTranslate | async }}\n </div>\n </div>\n </div>\n </div>\n <div class=\"range\">\n <div>1</div>\n <div>20</div>\n <div>40</div>\n <div>60</div>\n <div>80</div>\n <div>99</div>\n </div>\n </div>\n <!-- Legend positioned at bottom -->\n @if (legendPosition === 'bottom-start' || legendPosition === 'bottom-end') {\n <ng-container [ngTemplateOutlet]=\"legendTemplate\"></ng-container>\n }\n </div>\n}\n\n<!-- Reusable legend template -->\n<ng-template #legendTemplate>\n <div class=\"legend-container\" [ngClass]=\"'legend-' + legendPosition\">\n <div class=\"legend\">\n <ui-icon name=\"Dot\" color=\"gray\"></ui-icon>\n {{ translationContext + 'CANDIDATE_SCORE' | uiTranslate | async }}\n </div>\n <div class=\"legend\">\n <ui-icon name=\"Trophy\" color=\"gray\"></ui-icon>\n {{ translationContext + 'HIGHEST_SCORE' | uiTranslate | async }}\n </div>\n </div>\n</ng-template>\n","import { CommonModule, NgClass } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatTooltipModule } from '@angular/material/tooltip';\nimport { Chart, registerables } from 'chart.js';\nimport { BaseChartDirective } from 'ng2-charts';\n\nimport { UiTranslatePipe, MemoizeFuncPipe } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { GaussianChartComponent } from './gaussian-chart.component';\n\nChart.register(...registerables);\n\n@NgModule({\n exports: [GaussianChartComponent],\n imports: [\n NgClass,\n UiTranslatePipe,\n BaseChartDirective,\n MatTooltipModule,\n CommonModule,\n IconComponentModule,\n MemoizeFuncPipe,\n GaussianChartComponent,\n ],\n})\nexport class GaussianChartComponentModule {}\n"],"mappings":";;;;;;;;;;AAUA,MAAM,sBAAsB;CAC1B,QAAQ;CACR,OAAO;CACP,SAAS;CACT,QAAQ;CACR,SAAS;AACD;AAqBV,IAAa,yBAAb,MAAa,uBAAsB;CAhBnC,cAAA;EAsCW,KAAA,mBAAqC;EAOrC,KAAA,iBAAiC;EAE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AAA;GAAA,MAAA;GAA4B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA5B;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA4B,SAAA;IAVrC;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GAAsB;GAAA,SAAA,CATd,sBAAsB;EAAA,CAAA;CAAA;CAYrB;EAAA,KAAA,OAAA,GAAA,oBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA4B,SAAA;IAPrC;IACA;IACA;IAEA;GAAsB;EAAA,CAAA;CAAA;;AAGb,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA4B,YAAA,CAAA;EAbxC,MAAA;EAAS,MAAA,CAAA;GACR,SAAS,CAAC,sBAAsB;GAChC,SAAS;IACP;IACA;IACA;IACA;IACA;IACA;IACA;IACA;GACD;EACF,CAAA"}
|
|
@@ -1,96 +1,163 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import * as i1 from
|
|
4
|
-
import { IconComponentModule } from
|
|
5
|
-
import { CommonModule } from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { ChangeDetectionStrategy, Component, HostBinding, Inject, Input, NgModule, Optional } from "@angular/core";
|
|
3
|
+
import * as i1 from "@testgorilla/tgo-ui/components/icon";
|
|
4
|
+
import { IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
|
|
5
|
+
import { CommonModule } from "@angular/common";
|
|
6
|
+
var IconLabelComponent = class IconLabelComponent {
|
|
7
|
+
constructor(defaultAppTheme) {
|
|
8
|
+
this.defaultAppTheme = defaultAppTheme;
|
|
9
|
+
this.iconSize = "16";
|
|
10
|
+
this.text = "";
|
|
11
|
+
this.iconColor = "";
|
|
12
|
+
this.iconIndent = "8";
|
|
13
|
+
this.applicationTheme = "light";
|
|
14
|
+
if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
|
|
15
|
+
}
|
|
16
|
+
static {
|
|
17
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
18
|
+
minVersion: "12.0.0",
|
|
19
|
+
version: "22.2.4",
|
|
20
|
+
ngImport: i0,
|
|
21
|
+
type: IconLabelComponent,
|
|
22
|
+
deps: [{
|
|
23
|
+
token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
|
|
24
|
+
optional: true
|
|
25
|
+
}],
|
|
26
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
static {
|
|
30
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
31
|
+
minVersion: "14.0.0",
|
|
32
|
+
version: "22.2.4",
|
|
33
|
+
type: IconLabelComponent,
|
|
34
|
+
isStandalone: true,
|
|
35
|
+
selector: "ui-icon-label",
|
|
36
|
+
inputs: {
|
|
37
|
+
iconSize: "iconSize",
|
|
38
|
+
iconName: "iconName",
|
|
39
|
+
text: "text",
|
|
40
|
+
iconColor: "iconColor",
|
|
41
|
+
iconIndent: "iconIndent",
|
|
42
|
+
applicationTheme: "applicationTheme"
|
|
43
|
+
},
|
|
44
|
+
host: { properties: { "style.--icon-indent": "this.iconIndent" } },
|
|
45
|
+
ngImport: i0,
|
|
46
|
+
template: "<ui-icon [name]=\"iconName\" [size]=\"iconSize\" [color]=\"iconColor\" aria-hidden=\"true\"></ui-icon>\n<span>{{ text }}</span>\n",
|
|
47
|
+
styles: [":host{display:flex;align-items:center}:host ui-icon{margin-right:calc(var(--icon-indent) * 1px)}\n"],
|
|
48
|
+
dependencies: [{
|
|
49
|
+
kind: "ngmodule",
|
|
50
|
+
type: IconComponentModule
|
|
51
|
+
}, {
|
|
52
|
+
kind: "component",
|
|
53
|
+
type: i1.IconComponent,
|
|
54
|
+
selector: "ui-icon",
|
|
55
|
+
inputs: [
|
|
56
|
+
"size",
|
|
57
|
+
"cssClass",
|
|
58
|
+
"name",
|
|
59
|
+
"color",
|
|
60
|
+
"filled",
|
|
61
|
+
"toggleIconStyle",
|
|
62
|
+
"applicationTheme",
|
|
63
|
+
"useFullIconName"
|
|
64
|
+
]
|
|
65
|
+
}],
|
|
66
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
71
|
+
minVersion: "12.0.0",
|
|
72
|
+
version: "22.2.4",
|
|
73
|
+
ngImport: i0,
|
|
74
|
+
type: IconLabelComponent,
|
|
75
|
+
decorators: [{
|
|
76
|
+
type: Component,
|
|
77
|
+
args: [{
|
|
78
|
+
selector: "ui-icon-label",
|
|
79
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
80
|
+
imports: [IconComponentModule],
|
|
81
|
+
template: "<ui-icon [name]=\"iconName\" [size]=\"iconSize\" [color]=\"iconColor\" aria-hidden=\"true\"></ui-icon>\n<span>{{ text }}</span>\n",
|
|
82
|
+
styles: [":host{display:flex;align-items:center}:host ui-icon{margin-right:calc(var(--icon-indent) * 1px)}\n"]
|
|
83
|
+
}]
|
|
84
|
+
}],
|
|
85
|
+
ctorParameters: () => [{
|
|
86
|
+
type: void 0,
|
|
87
|
+
decorators: [{ type: Optional }, {
|
|
88
|
+
type: Inject,
|
|
89
|
+
args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
|
|
90
|
+
}]
|
|
91
|
+
}],
|
|
92
|
+
propDecorators: {
|
|
93
|
+
iconSize: [{ type: Input }],
|
|
94
|
+
iconName: [{ type: Input }],
|
|
95
|
+
text: [{ type: Input }],
|
|
96
|
+
iconColor: [{ type: Input }],
|
|
97
|
+
iconIndent: [{
|
|
98
|
+
type: HostBinding,
|
|
99
|
+
args: ["style.--icon-indent"]
|
|
100
|
+
}, { type: Input }],
|
|
101
|
+
applicationTheme: [{ type: Input }]
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
var IconLabelComponentModule = class IconLabelComponentModule {
|
|
105
|
+
static {
|
|
106
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
107
|
+
minVersion: "12.0.0",
|
|
108
|
+
version: "22.2.4",
|
|
109
|
+
ngImport: i0,
|
|
110
|
+
type: IconLabelComponentModule,
|
|
111
|
+
deps: [],
|
|
112
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
static {
|
|
116
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
117
|
+
minVersion: "14.0.0",
|
|
118
|
+
version: "22.2.4",
|
|
119
|
+
ngImport: i0,
|
|
120
|
+
type: IconLabelComponentModule,
|
|
121
|
+
imports: [
|
|
122
|
+
CommonModule,
|
|
123
|
+
IconComponentModule,
|
|
124
|
+
IconLabelComponent
|
|
125
|
+
],
|
|
126
|
+
exports: [IconLabelComponent]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
static {
|
|
130
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
131
|
+
minVersion: "12.0.0",
|
|
132
|
+
version: "22.2.4",
|
|
133
|
+
ngImport: i0,
|
|
134
|
+
type: IconLabelComponentModule,
|
|
135
|
+
imports: [
|
|
136
|
+
CommonModule,
|
|
137
|
+
IconComponentModule,
|
|
138
|
+
IconLabelComponent
|
|
139
|
+
]
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
};
|
|
143
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
144
|
+
minVersion: "12.0.0",
|
|
145
|
+
version: "22.2.4",
|
|
146
|
+
ngImport: i0,
|
|
147
|
+
type: IconLabelComponentModule,
|
|
148
|
+
decorators: [{
|
|
149
|
+
type: NgModule,
|
|
150
|
+
args: [{
|
|
151
|
+
imports: [
|
|
152
|
+
CommonModule,
|
|
153
|
+
IconComponentModule,
|
|
154
|
+
IconLabelComponent
|
|
155
|
+
],
|
|
156
|
+
exports: [IconLabelComponent],
|
|
157
|
+
providers: []
|
|
158
|
+
}]
|
|
159
|
+
}]
|
|
160
|
+
});
|
|
95
161
|
export { IconLabelComponent, IconLabelComponentModule };
|
|
96
|
-
|
|
162
|
+
|
|
163
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-icon-label.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"testgorilla-tgo-ui-components-icon-label.mjs","sources":["../../../components/icon-label/icon-label.component.ts","../../../components/icon-label/icon-label.component.html","../../../components/icon-label/icon-label.component.module.ts"
|
|
1
|
+
{"version":3,"file":"testgorilla-tgo-ui-components-icon-label.mjs","names":[],"sources":["../../../components/icon-label/icon-label.component.ts","../../../components/icon-label/icon-label.component.html","../../../components/icon-label/icon-label.component.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, HostBinding, Inject, Input, Optional } from '@angular/core';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IconName, IconSize, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\n@Component({\n selector: 'ui-icon-label',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './icon-label.component.html',\n styleUrls: ['./icon-label.component.scss'],\n imports: [IconComponentModule],\n})\nexport class IconLabelComponent {\n /**\n * Icon size\n *\n * @type {IconSize}\n * @memberof IconLabelComponent\n */\n @Input() iconSize: IconSize = '16';\n\n /**\n * Icon name\n *\n * @type {IconName}\n * @memberof IconLabelComponent\n */\n @Input() iconName: IconName;\n\n /**\n * Label\n *\n * @memberof IconLabelComponent\n */\n @Input() text = '';\n\n /**\n * Icon color\n *\n * @type {IconColor}\n * @memberof IconLabelComponent\n */\n @Input() iconColor? = '';\n\n /**\n * Indent between icon and label\n *\n * @type {string}\n * @memberof IconLabelComponent\n */\n @HostBinding('style.--icon-indent')\n @Input()\n iconIndent? = '8';\n\n /**\n *\n * Defines the application theme\n *\n * @type {ApplicationTheme}\n * @memberof IconLabelComponent\n */\n @Input() applicationTheme: ApplicationTheme = 'light';\n\n constructor(\n @Optional() @Inject('CANOPYUI_DEFAULT_APPLICATION_THEME') private readonly defaultAppTheme: ApplicationTheme\n ) {\n if (defaultAppTheme) {\n this.applicationTheme = defaultAppTheme;\n }\n }\n}\n","<ui-icon [name]=\"iconName\" [size]=\"iconSize\" [color]=\"iconColor\" aria-hidden=\"true\"></ui-icon>\n<span>{{ text }}</span>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { IconComponentModule } from '@testgorilla/tgo-ui/components/icon';\n\nimport { IconLabelComponent } from './icon-label.component';\n\n@NgModule({\n imports: [CommonModule, IconComponentModule, IconLabelComponent],\n exports: [IconLabelComponent],\n providers: [],\n})\nexport class IconLabelComponentModule {}\n"],"mappings":";;;;;AAYA,IAAa,qBAAb,MAAa,mBAAkB;CAmD7B,YAC6E,iBAAiC;EAAjC,KAAA,kBAAA;EA7CpE,KAAA,WAAqB;EAerB,KAAA,OAAO;EAQP,KAAA,YAAa;EAUtB,KAAA,aAAc;EASL,KAAA,mBAAqC;EAK5C,IAAI,iBACF,KAAK,mBAAmB;CAE5B;CAzDW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,MAAA,CAAA;IAAA,OAoDP;IAAoC,UAAA;GAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CApD/C;EAAA,KAAA,OAAA,GAAA,qBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,MAAA;GAAkB,cAAA;GAAA,UAAA;GAAA,QAAA;IAAA,UAAA;IAAA,UAAA;IAAA,MAAA;IAAA,WAAA;IAAA,YAAA;IAAA,kBAAA;GAAA;GAAA,MAAA,EAAA,YAAA,EAAA,uBAAA,kBAAA,EAAA;GAAA,UAAA;GAAA,UCZ/B;GAEA,QAAA,CAAA,oGAAA;GAAA,cAAA,CAAA;IAAA,MAAA;IAAA,MDQY;GAAmB,GAAA;IAAA,MAAA;IAAA,MAAA,GAAA;IAAA,UAAA;IAAA,QAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;KAAA;IAAA;GAAA,CAAA;GAAA,iBAAA,GAAA,wBAAA;EA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