@testgorilla/tgo-ui 11.22.2 → 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 -1789
- 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/assets/icons/rebrand/Sequences-filled.svg +3 -0
- package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-in-line.svg +3 -0
- 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,518 +1,547 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import { MatTooltip, MatTooltipModule } from
|
|
5
|
-
import { BaseChartDirective } from
|
|
6
|
-
import { Color,
|
|
7
|
-
import { SpinnerComponent, SpinnerComponentModule } from
|
|
8
|
-
import { Chart, registerables } from
|
|
9
|
-
|
|
10
|
-
// These are the sizes of the canvas, not the chart itself. It includes 40px of padding on all sides.
|
|
1
|
+
import { AsyncPipe, CommonModule, NgClass } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, NgModule, ViewChild, ViewChildren, inject } from "@angular/core";
|
|
4
|
+
import { MatTooltip, MatTooltipModule } from "@angular/material/tooltip";
|
|
5
|
+
import { BaseChartDirective } from "ng2-charts";
|
|
6
|
+
import { Color, MemoizeFuncPipe, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
|
|
7
|
+
import { SpinnerComponent, SpinnerComponentModule } from "@testgorilla/tgo-ui/components/spinner";
|
|
8
|
+
import { Chart, registerables } from "chart.js";
|
|
11
9
|
const SmallSpiderChartSize = 200;
|
|
12
10
|
const LargeSpiderChartSize = 280;
|
|
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
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
else if (event.
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: SpiderChartComponent, isStandalone: true, selector: "ui-spider-chart", inputs: { size: "size", spiderChartData: "spiderChartData", stepSize: "stepSize", ariaLabel: "ariaLabel", loading: "loading", applicationTheme: "applicationTheme" }, viewQueries: [{ propertyName: "chart", first: true, predicate: BaseChartDirective, descendants: true }, { propertyName: "labelContainers", predicate: ["labelContainer"], descendants: true }, { propertyName: "fakeDataPoints", predicate: ["fakeDataPoints"], descendants: true }, { propertyName: "fakeDataPointsSecondary", predicate: ["fakeDataPointsSecondary"], descendants: true }, { propertyName: "legendItems", predicate: ["legendItem"], descendants: true }], ngImport: i0, template: "<div class=\"spider-chart-container\" tabindex=\"0\" [attr.aria-label]=\"ariaLabel\">\n <div\n class=\"spacing-container\"\n [ngClass]=\"{ 'small-spacing': radarChartData.labels && radarChartData.labels.length % 2 === 1 && !loading }\"\n >\n <div\n class=\"chart-container\"\n [style.width]=\"size === 'large' ? '280px' : '200px'\"\n [style.height]=\"size === 'large' ? '280px' : '200px'\"\n >\n @if (!loading) {\n <canvas baseChart [data]=\"radarChartData\" [options]=\"radarChartOptions\" type=\"radar\" class=\"chart\"> </canvas>\n } @else {\n <canvas baseChart [data]=\"loadingChartData\" [options]=\"loadingChartOptions\" type=\"radar\" class=\"chart\">\n </canvas>\n <ui-spinner></ui-spinner>\n }\n\n @if (labelPositionsVisible) {\n <div class=\"overlay-container\" [style.visibility]=\"labelStylesCached ? 'visible' : 'hidden'\">\n @for (label of spiderChartData.labels; track label) {\n <div\n class=\"label-container\"\n #labelContainer\n [matTooltip]=\"spiderChartData.labelDescription[$index]\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n (keydown)=\"onLabelKeyDown($event, $index)\"\n [attr.aria-label]=\"spiderChartData.labelDescription[$index]\"\n [style.left]=\"labelStyles[label]?.left\"\n [style.bottom]=\"labelStyles[label]?.bottom\"\n >\n @if (!(label.length > 20 && size === 'large' && spiderChartData.labels.length < 9)) {\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label }}\n </div>\n } @else {\n <div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getFirstLine }}\n </div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getSecondLine : this }}\n </div>\n </div>\n }\n <span class=\"value\">{{ spiderChartData.plotData[0].data[$index] }}</span>\n </div>\n <span\n class=\"fake-data-points\"\n #fakeDataPoints\n [tabindex]=\"focusedLabelIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedLabelIndex ? showTooltipForDataPoint($index) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index)\"\n >\n </span>\n @if (radarChartData.datasets.length > 1) {\n <span\n class=\"fake-data-points-secondary\"\n #fakeDataPointsSecondary\n [tabindex]=\"focusedFakeDataPointIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedFakeDataPointIndex ? showTooltipForDataPoint($index, true) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index, true)\"\n >\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (radarChartData.datasets.length > 0) {\n <div class=\"legend-container\">\n @for (dataset of radarChartData.datasets; track dataset.label) {\n <div\n class=\"legend-item\"\n (click)=\"toggleDatasetVisibility($index)\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n role=\"button\"\n [attr.aria-pressed]=\"isDatasetVisible($index) ? false : true\"\n [attr.aria-label]=\"\n isDatasetVisible($index)\n ? (translationContext + 'DATASET_VISIBLE' | uiTranslate: { dataset: dataset.label } | async)\n : (translationContext + 'DATASET_HIDDEN' | uiTranslate: { dataset: dataset.label } | async)\n \"\n (keydown)=\"onLegendItemKeyDown($event, $index)\"\n #legendItem\n >\n <span class=\"legend-line\" [ngClass]=\"{ 'solid-line': $index === 0, 'dashed-line': $index === 1 }\"></span>\n <span class=\"legend-label\" [style.text-decoration]=\"isDatasetVisible($index) ? 'none' : 'line-through'\">\n {{ dataset.label }}\n </span>\n </div>\n }\n </div>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.spider-chart-container{display:flex;flex-direction:column;align-items:center}.spider-chart-container .spacing-container{padding:40px 140px}.spider-chart-container .spacing-container.small-spacing{padding:0 80px}.spider-chart-container .spacing-container .chart-container{position:relative}.spider-chart-container .spacing-container .chart-container .overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container{display:flex;gap:4px;position:absolute;pointer-events:all;cursor:pointer}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .fake-data-points{visibility:hidden}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container:focus{outline:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .label{font-size:12px;border-bottom:1px dashed #d3d3d3;white-space:nowrap;overflow:hidden;width:fit-content;text-overflow:ellipsis}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .value{font-weight:700}.spider-chart-container .legend-container{display:flex;gap:16px;cursor:pointer}.spider-chart-container .legend-container .legend-item{display:flex;align-items:center;gap:8px}.spider-chart-container .legend-container .legend-item .legend-line{display:inline-block;width:11px;height:4px}.spider-chart-container .legend-container .legend-item .solid-line{background-color:#d410aa}.spider-chart-container .legend-container .legend-item .dashed-line{border-top:2px dashed #242424}:host ::ng-deep .spider-chart-container .spinner-container.loader{position:absolute}\n"], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: BaseChartDirective, selector: "canvas[baseChart]", inputs: ["type", "legend", "data", "options", "plugins", "labels", "datasets"], outputs: ["chartClick", "chartHover"], exportAs: ["base-chart"] }, { kind: "component", type: SpinnerComponent, selector: "ui-spinner", inputs: ["size", "isLoader", "text", "applicationTheme", "iconName", "iconSize"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: MemoizeFuncPipe, name: "memoizeFunc" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
11
|
+
var SpiderChartComponent = class SpiderChartComponent {
|
|
12
|
+
constructor() {
|
|
13
|
+
this.size = "large";
|
|
14
|
+
this.stepSize = 20;
|
|
15
|
+
this.ariaLabel = "Radar chart. Press tab to navigate through the chart.";
|
|
16
|
+
this.loading = false;
|
|
17
|
+
this.applicationTheme = "light";
|
|
18
|
+
this.radarChartData = {
|
|
19
|
+
labels: [],
|
|
20
|
+
datasets: []
|
|
21
|
+
};
|
|
22
|
+
this.labelPositions = {};
|
|
23
|
+
this.labelStyles = {};
|
|
24
|
+
this.labelPositionsVisible = false;
|
|
25
|
+
this.labelStylesCached = false;
|
|
26
|
+
this.focusedLabelIndex = 0;
|
|
27
|
+
this.focusedFakeDataPointIndex = 0;
|
|
28
|
+
this.loadingChartData = {
|
|
29
|
+
labels: [
|
|
30
|
+
1,
|
|
31
|
+
2,
|
|
32
|
+
3,
|
|
33
|
+
4,
|
|
34
|
+
5,
|
|
35
|
+
6
|
|
36
|
+
],
|
|
37
|
+
datasets: []
|
|
38
|
+
};
|
|
39
|
+
this.loadingChartOptions = {
|
|
40
|
+
responsive: true,
|
|
41
|
+
layout: { padding: {
|
|
42
|
+
left: 40,
|
|
43
|
+
right: 40,
|
|
44
|
+
top: 40,
|
|
45
|
+
bottom: 40
|
|
46
|
+
} },
|
|
47
|
+
scales: { r: {
|
|
48
|
+
angleLines: {
|
|
49
|
+
display: true,
|
|
50
|
+
color: Color.GRAYSCALE_30
|
|
51
|
+
},
|
|
52
|
+
grid: { color: () => Color.GRAYSCALE_30 },
|
|
53
|
+
pointLabels: { display: false },
|
|
54
|
+
suggestedMin: 0,
|
|
55
|
+
suggestedMax: 100,
|
|
56
|
+
ticks: {
|
|
57
|
+
stepSize: this.stepSize,
|
|
58
|
+
display: false
|
|
59
|
+
}
|
|
60
|
+
} }
|
|
61
|
+
};
|
|
62
|
+
this.translationContext = "CHARTS.SPIDER.";
|
|
63
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
64
|
+
}
|
|
65
|
+
ngOnInit() {
|
|
66
|
+
if (!this.loading) {
|
|
67
|
+
this.handleInputErrors();
|
|
68
|
+
this.setChartData();
|
|
69
|
+
this.setChartOptions();
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
handleInputErrors() {
|
|
73
|
+
if (!this.spiderChartData.labels || this.spiderChartData.labels.length === 0) throw new Error("The \"labels\" input is required and cannot be empty.");
|
|
74
|
+
if (!this.spiderChartData.labelDescription || this.spiderChartData.labelDescription.length === 0) throw new Error("The \"labelDescription\" input is required and cannot be empty.");
|
|
75
|
+
if (this.spiderChartData.labelDescription && this.spiderChartData.labelDescription.length !== this.spiderChartData.labels.length) throw new Error("The \"labelDescription\" input must have the same length as \"labels\".");
|
|
76
|
+
if (!this.spiderChartData.plotData[0].databaseLabel) throw new Error("The \"plotData.databaseLabel\" input is required.");
|
|
77
|
+
if (!this.spiderChartData.plotData[0].data || this.spiderChartData.plotData[0].data.length === 0) throw new Error("The \"plotData.data\" input is required and cannot be empty.");
|
|
78
|
+
if (this.spiderChartData.plotData[0].data.length !== this.spiderChartData.labels.length) throw new Error("The \"plotData.data\" input must have the same length as \"labels\".");
|
|
79
|
+
if (this.spiderChartData.plotData.length === 2 && this.spiderChartData.labels.length > 0 && this.spiderChartData.plotData[1].data && this.spiderChartData.plotData[1].data.length !== this.spiderChartData.labels.length) throw new Error("The \"plotData.data\" input must have the same length as \"labels\".");
|
|
80
|
+
}
|
|
81
|
+
setChartData() {
|
|
82
|
+
const datasets = [];
|
|
83
|
+
datasets.push({
|
|
84
|
+
label: this.spiderChartData.plotData[0].databaseLabel,
|
|
85
|
+
data: this.spiderChartData.plotData[0].data,
|
|
86
|
+
fill: true,
|
|
87
|
+
backgroundColor: "rgba(212, 16, 170, 0.2)",
|
|
88
|
+
borderColor: Color.BRAND_50,
|
|
89
|
+
pointBackgroundColor: Color.BRAND_50,
|
|
90
|
+
pointBorderColor: Color.TGO_WHITE,
|
|
91
|
+
pointHoverBackgroundColor: Color.TGO_WHITE,
|
|
92
|
+
pointHoverBorderColor: Color.BRAND_50
|
|
93
|
+
});
|
|
94
|
+
if (this.spiderChartData.plotData.length === 2) datasets.push({
|
|
95
|
+
label: this.spiderChartData.plotData[1].databaseLabel,
|
|
96
|
+
data: this.spiderChartData.plotData[1].data,
|
|
97
|
+
fill: false,
|
|
98
|
+
borderColor: Color.BLACK,
|
|
99
|
+
borderDash: [5, 5],
|
|
100
|
+
borderWidth: 1,
|
|
101
|
+
pointBackgroundColor: Color.BLACK,
|
|
102
|
+
pointBorderColor: Color.TGO_WHITE,
|
|
103
|
+
pointHoverBackgroundColor: Color.TGO_WHITE,
|
|
104
|
+
pointHoverBorderColor: Color.BLACK
|
|
105
|
+
});
|
|
106
|
+
this.radarChartData = {
|
|
107
|
+
labels: this.spiderChartData.labels,
|
|
108
|
+
datasets
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
setChartOptions() {
|
|
112
|
+
this.radarChartOptions = {
|
|
113
|
+
responsive: true,
|
|
114
|
+
elements: { line: { borderWidth: 3 } },
|
|
115
|
+
layout: { padding: {
|
|
116
|
+
left: 40,
|
|
117
|
+
right: 40,
|
|
118
|
+
top: 40,
|
|
119
|
+
bottom: 40
|
|
120
|
+
} },
|
|
121
|
+
scales: { r: {
|
|
122
|
+
angleLines: {
|
|
123
|
+
display: true,
|
|
124
|
+
color: Color.BLACK
|
|
125
|
+
},
|
|
126
|
+
grid: { color: (context) => {
|
|
127
|
+
if (context.tick.value === 100) return Color.BLACK;
|
|
128
|
+
return Color.GRAYSCALE_30;
|
|
129
|
+
} },
|
|
130
|
+
pointLabels: {
|
|
131
|
+
color: "black",
|
|
132
|
+
font: {
|
|
133
|
+
family: "Arial",
|
|
134
|
+
size: 14
|
|
135
|
+
},
|
|
136
|
+
display: false
|
|
137
|
+
},
|
|
138
|
+
suggestedMin: 0,
|
|
139
|
+
suggestedMax: 100,
|
|
140
|
+
ticks: {
|
|
141
|
+
stepSize: this.stepSize,
|
|
142
|
+
display: false
|
|
143
|
+
}
|
|
144
|
+
} },
|
|
145
|
+
plugins: { legend: { display: false } }
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
ngAfterViewInit() {
|
|
149
|
+
if (this.chart?.chart && !this.loading) {
|
|
150
|
+
this.logCornerCoordinates(this.chart.chart);
|
|
151
|
+
this.cdr.detectChanges();
|
|
152
|
+
setTimeout(() => this.cacheLabelStyles());
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
cacheLabelStyles() {
|
|
156
|
+
if (!this.labelContainers) return;
|
|
157
|
+
this.labelContainers.forEach((ref, index) => {
|
|
158
|
+
const label = this.spiderChartData.labels[index];
|
|
159
|
+
const el = ref.nativeElement;
|
|
160
|
+
this.labelStyles[label] = {
|
|
161
|
+
left: this.getCenteredLabelLeftPosition(label, el.offsetWidth),
|
|
162
|
+
bottom: this.getCenteredLabelBottomPosition(label, el.offsetHeight)
|
|
163
|
+
};
|
|
164
|
+
});
|
|
165
|
+
this.labelStylesCached = true;
|
|
166
|
+
this.cdr.detectChanges();
|
|
167
|
+
}
|
|
168
|
+
logCornerCoordinates(chart) {
|
|
169
|
+
const scale = chart.scales["r"];
|
|
170
|
+
const canvasWidth = this.size === "large" ? 280 : 200;
|
|
171
|
+
const canvasHeight = this.size === "large" ? 280 : 200;
|
|
172
|
+
this.spiderChartData.labels.forEach((label, index) => {
|
|
173
|
+
const position = scale.getPointPositionForValue(index, scale.max);
|
|
174
|
+
const xPercent = position.x / canvasWidth * 100;
|
|
175
|
+
const yPercent = (canvasHeight - position.y) / canvasHeight * 100;
|
|
176
|
+
this.labelPositions[label] = {
|
|
177
|
+
x: Number(xPercent.toFixed(2)),
|
|
178
|
+
y: Number(yPercent.toFixed(2))
|
|
179
|
+
};
|
|
180
|
+
});
|
|
181
|
+
this.labelPositionsVisible = true;
|
|
182
|
+
}
|
|
183
|
+
getCenteredLabelBottomPosition(label, height) {
|
|
184
|
+
const position = this.labelPositions[label];
|
|
185
|
+
const padding = 7;
|
|
186
|
+
if (position.x > 50 || position.x < 50) return `calc(${position.y}% - ${height / 2}px)`;
|
|
187
|
+
else if (position.y < 50) return `calc(${position.y}% - ${height}px - ${padding}px)`;
|
|
188
|
+
else return `calc(${position.y}% + ${padding}px)`;
|
|
189
|
+
}
|
|
190
|
+
getCenteredLabelLeftPosition(label, width) {
|
|
191
|
+
const position = this.labelPositions[label];
|
|
192
|
+
const padding = 15;
|
|
193
|
+
if (position.x === 50) return `calc(${position.x}% - ${width / 2}px)`;
|
|
194
|
+
else if (position.x < 50) return `calc(${position.x}% - ${width}px - ${padding}px)`;
|
|
195
|
+
else return `calc(${position.x}% + ${padding}px)`;
|
|
196
|
+
}
|
|
197
|
+
onLabelKeyDown(event, index) {
|
|
198
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") this.focusNextLabel(index);
|
|
199
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") this.focusPreviousLabel(index);
|
|
200
|
+
}
|
|
201
|
+
focusNextLabel(index) {
|
|
202
|
+
const nextIndex = index + 1;
|
|
203
|
+
if (nextIndex < this.labelContainers.length) this.labelContainers.get(nextIndex)?.nativeElement.focus();
|
|
204
|
+
else this.labelContainers.first?.nativeElement.focus();
|
|
205
|
+
this.focusedLabelIndex = nextIndex;
|
|
206
|
+
}
|
|
207
|
+
focusPreviousLabel(index) {
|
|
208
|
+
const previousIndex = index - 1;
|
|
209
|
+
if (previousIndex >= 0) this.labelContainers.get(previousIndex)?.nativeElement.focus();
|
|
210
|
+
else this.labelContainers.last?.nativeElement.focus();
|
|
211
|
+
this.focusedLabelIndex = previousIndex;
|
|
212
|
+
}
|
|
213
|
+
onLegendItemKeyDown(event, index) {
|
|
214
|
+
if (event.key === "Enter") this.toggleDatasetVisibility(index);
|
|
215
|
+
else if (event.key === "ArrowRight" || event.key === "ArrowDown") this.focusNextLegendItem(index);
|
|
216
|
+
else if (event.key === "ArrowLeft" || event.key === "ArrowUp") this.focusPreviousLegendItem(index);
|
|
217
|
+
}
|
|
218
|
+
focusNextLegendItem(index) {
|
|
219
|
+
const nextIndex = index + 1;
|
|
220
|
+
if (nextIndex < this.legendItems.length) this.legendItems.get(nextIndex)?.nativeElement.focus();
|
|
221
|
+
else this.legendItems.first?.nativeElement.focus();
|
|
222
|
+
}
|
|
223
|
+
focusPreviousLegendItem(index) {
|
|
224
|
+
const previousIndex = index - 1;
|
|
225
|
+
if (previousIndex >= 0) this.legendItems.get(previousIndex)?.nativeElement.focus();
|
|
226
|
+
else this.legendItems.last?.nativeElement.focus();
|
|
227
|
+
}
|
|
228
|
+
onFakeDataPointsKeyDown(event, index, isSecondary = false) {
|
|
229
|
+
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
|
230
|
+
this.focusNextFakeDataPoint(index, isSecondary);
|
|
231
|
+
this.showTooltipForDataPoint(index + 1 > this.spiderChartData.labels.length ? 0 : index + 1, isSecondary);
|
|
232
|
+
} else if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
|
233
|
+
this.focusPreviousFakeDataPoint(index, isSecondary);
|
|
234
|
+
this.showTooltipForDataPoint(index - 1 < 0 ? this.spiderChartData.labels.length - 1 : index - 1, isSecondary);
|
|
235
|
+
} else if (event.key === "Tab") this.resetActiveElement();
|
|
236
|
+
}
|
|
237
|
+
focusNextFakeDataPoint(index, isSecondary = false) {
|
|
238
|
+
const nextIndex = index + 1;
|
|
239
|
+
if (nextIndex < this.fakeDataPoints.length) (isSecondary ? this.fakeDataPointsSecondary : this.fakeDataPoints).get(nextIndex)?.nativeElement.focus();
|
|
240
|
+
else (isSecondary ? this.fakeDataPointsSecondary : this.fakeDataPoints).first?.nativeElement.focus();
|
|
241
|
+
if (!isSecondary) this.focusedFakeDataPointIndex = nextIndex;
|
|
242
|
+
}
|
|
243
|
+
focusPreviousFakeDataPoint(index, isSecondary = false) {
|
|
244
|
+
const previousIndex = index - 1;
|
|
245
|
+
if (previousIndex >= 0) (isSecondary ? this.fakeDataPointsSecondary : this.fakeDataPoints).get(previousIndex)?.nativeElement.focus();
|
|
246
|
+
else (isSecondary ? this.fakeDataPointsSecondary : this.fakeDataPoints).last?.nativeElement.focus();
|
|
247
|
+
if (!isSecondary) this.focusedFakeDataPointIndex = previousIndex;
|
|
248
|
+
}
|
|
249
|
+
showTooltipForDataPoint(index, isSecondary = false) {
|
|
250
|
+
const chartInstance = this.chart?.chart;
|
|
251
|
+
if (!chartInstance) return;
|
|
252
|
+
const activeElement = [{
|
|
253
|
+
datasetIndex: isSecondary ? 1 : 0,
|
|
254
|
+
index
|
|
255
|
+
}];
|
|
256
|
+
const dataPoint = chartInstance.getDatasetMeta(isSecondary ? 1 : 0).data[index];
|
|
257
|
+
const eventPosition = {
|
|
258
|
+
x: dataPoint.x,
|
|
259
|
+
y: dataPoint.y
|
|
260
|
+
};
|
|
261
|
+
if (!isSecondary) this.focusedFakeDataPointIndex = index;
|
|
262
|
+
chartInstance.tooltip?.setActiveElements(activeElement, eventPosition);
|
|
263
|
+
chartInstance.update();
|
|
264
|
+
}
|
|
265
|
+
resetActiveElement() {
|
|
266
|
+
const chartInstance = this.chart?.chart;
|
|
267
|
+
if (!chartInstance) return;
|
|
268
|
+
chartInstance.tooltip?.setActiveElements([], {
|
|
269
|
+
x: 0,
|
|
270
|
+
y: 0
|
|
271
|
+
});
|
|
272
|
+
chartInstance.update();
|
|
273
|
+
}
|
|
274
|
+
toggleDatasetVisibility(datasetIndex) {
|
|
275
|
+
const chartInstance = this.chart?.chart;
|
|
276
|
+
if (!chartInstance) return;
|
|
277
|
+
const dataset = chartInstance.data.datasets[datasetIndex];
|
|
278
|
+
dataset.hidden = !dataset.hidden;
|
|
279
|
+
chartInstance.update();
|
|
280
|
+
}
|
|
281
|
+
isDatasetVisible(datasetIndex) {
|
|
282
|
+
const chartInstance = this.chart?.chart;
|
|
283
|
+
if (!chartInstance) return;
|
|
284
|
+
return !chartInstance.data.datasets[datasetIndex].hidden;
|
|
285
|
+
}
|
|
286
|
+
getFirstLine(label) {
|
|
287
|
+
const words = label.split(" ");
|
|
288
|
+
let firstLine = "";
|
|
289
|
+
for (const word of words) if ((firstLine + word).length <= 20) firstLine += (firstLine ? " " : "") + word;
|
|
290
|
+
else break;
|
|
291
|
+
return firstLine;
|
|
292
|
+
}
|
|
293
|
+
getSecondLine(label) {
|
|
294
|
+
const firstLine = this.getFirstLine(label);
|
|
295
|
+
return label.substring(firstLine.length).trim();
|
|
296
|
+
}
|
|
297
|
+
static {
|
|
298
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
299
|
+
minVersion: "12.0.0",
|
|
300
|
+
version: "22.2.4",
|
|
301
|
+
ngImport: i0,
|
|
302
|
+
type: SpiderChartComponent,
|
|
303
|
+
deps: [],
|
|
304
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
static {
|
|
308
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
309
|
+
minVersion: "17.0.0",
|
|
310
|
+
version: "22.2.4",
|
|
311
|
+
type: SpiderChartComponent,
|
|
312
|
+
isStandalone: true,
|
|
313
|
+
selector: "ui-spider-chart",
|
|
314
|
+
inputs: {
|
|
315
|
+
size: "size",
|
|
316
|
+
spiderChartData: "spiderChartData",
|
|
317
|
+
stepSize: "stepSize",
|
|
318
|
+
ariaLabel: "ariaLabel",
|
|
319
|
+
loading: "loading",
|
|
320
|
+
applicationTheme: "applicationTheme"
|
|
321
|
+
},
|
|
322
|
+
viewQueries: [
|
|
323
|
+
{
|
|
324
|
+
propertyName: "chart",
|
|
325
|
+
first: true,
|
|
326
|
+
predicate: BaseChartDirective,
|
|
327
|
+
descendants: true
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
propertyName: "labelContainers",
|
|
331
|
+
predicate: ["labelContainer"],
|
|
332
|
+
descendants: true
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
propertyName: "fakeDataPoints",
|
|
336
|
+
predicate: ["fakeDataPoints"],
|
|
337
|
+
descendants: true
|
|
338
|
+
},
|
|
339
|
+
{
|
|
340
|
+
propertyName: "fakeDataPointsSecondary",
|
|
341
|
+
predicate: ["fakeDataPointsSecondary"],
|
|
342
|
+
descendants: true
|
|
343
|
+
},
|
|
344
|
+
{
|
|
345
|
+
propertyName: "legendItems",
|
|
346
|
+
predicate: ["legendItem"],
|
|
347
|
+
descendants: true
|
|
348
|
+
}
|
|
349
|
+
],
|
|
350
|
+
ngImport: i0,
|
|
351
|
+
template: "<div class=\"spider-chart-container\" tabindex=\"0\" [attr.aria-label]=\"ariaLabel\">\n <div\n class=\"spacing-container\"\n [ngClass]=\"{ 'small-spacing': radarChartData.labels && radarChartData.labels.length % 2 === 1 && !loading }\"\n >\n <div\n class=\"chart-container\"\n [style.width]=\"size === 'large' ? '280px' : '200px'\"\n [style.height]=\"size === 'large' ? '280px' : '200px'\"\n >\n @if (!loading) {\n <canvas baseChart [data]=\"radarChartData\" [options]=\"radarChartOptions\" type=\"radar\" class=\"chart\"> </canvas>\n } @else {\n <canvas baseChart [data]=\"loadingChartData\" [options]=\"loadingChartOptions\" type=\"radar\" class=\"chart\">\n </canvas>\n <ui-spinner></ui-spinner>\n }\n\n @if (labelPositionsVisible) {\n <div class=\"overlay-container\" [style.visibility]=\"labelStylesCached ? 'visible' : 'hidden'\">\n @for (label of spiderChartData.labels; track label) {\n <div\n class=\"label-container\"\n #labelContainer\n [matTooltip]=\"spiderChartData.labelDescription[$index]\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n (keydown)=\"onLabelKeyDown($event, $index)\"\n [attr.aria-label]=\"spiderChartData.labelDescription[$index]\"\n [style.left]=\"labelStyles[label]?.left\"\n [style.bottom]=\"labelStyles[label]?.bottom\"\n >\n @if (!(label.length > 20 && size === 'large' && spiderChartData.labels.length < 9)) {\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label }}\n </div>\n } @else {\n <div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getFirstLine }}\n </div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getSecondLine : this }}\n </div>\n </div>\n }\n <span class=\"value\">{{ spiderChartData.plotData[0].data[$index] }}</span>\n </div>\n <span\n class=\"fake-data-points\"\n #fakeDataPoints\n [tabindex]=\"focusedLabelIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedLabelIndex ? showTooltipForDataPoint($index) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index)\"\n >\n </span>\n @if (radarChartData.datasets.length > 1) {\n <span\n class=\"fake-data-points-secondary\"\n #fakeDataPointsSecondary\n [tabindex]=\"focusedFakeDataPointIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedFakeDataPointIndex ? showTooltipForDataPoint($index, true) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index, true)\"\n >\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (radarChartData.datasets.length > 0) {\n <div class=\"legend-container\">\n @for (dataset of radarChartData.datasets; track dataset.label) {\n <div\n class=\"legend-item\"\n (click)=\"toggleDatasetVisibility($index)\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n role=\"button\"\n [attr.aria-pressed]=\"isDatasetVisible($index) ? false : true\"\n [attr.aria-label]=\"\n isDatasetVisible($index)\n ? (translationContext + 'DATASET_VISIBLE' | uiTranslate: { dataset: dataset.label } | async)\n : (translationContext + 'DATASET_HIDDEN' | uiTranslate: { dataset: dataset.label } | async)\n \"\n (keydown)=\"onLegendItemKeyDown($event, $index)\"\n #legendItem\n >\n <span class=\"legend-line\" [ngClass]=\"{ 'solid-line': $index === 0, 'dashed-line': $index === 1 }\"></span>\n <span class=\"legend-label\" [style.text-decoration]=\"isDatasetVisible($index) ? 'none' : 'line-through'\">\n {{ dataset.label }}\n </span>\n </div>\n }\n </div>\n }\n</div>\n",
|
|
352
|
+
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}.spider-chart-container{display:flex;flex-direction:column;align-items:center}.spider-chart-container .spacing-container{padding:40px 140px}.spider-chart-container .spacing-container.small-spacing{padding:0 80px}.spider-chart-container .spacing-container .chart-container{position:relative}.spider-chart-container .spacing-container .chart-container .overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container{display:flex;gap:4px;position:absolute;pointer-events:all;cursor:pointer}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .fake-data-points{visibility:hidden}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container:focus{outline:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .label{font-size:12px;border-bottom:1px dashed #d3d3d3;white-space:nowrap;overflow:hidden;width:fit-content;text-overflow:ellipsis}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .value{font-weight:700}.spider-chart-container .legend-container{display:flex;gap:16px;cursor:pointer}.spider-chart-container .legend-container .legend-item{display:flex;align-items:center;gap:8px}.spider-chart-container .legend-container .legend-item .legend-line{display:inline-block;width:11px;height:4px}.spider-chart-container .legend-container .legend-item .solid-line{background-color:#d410aa}.spider-chart-container .legend-container .legend-item .dashed-line{border-top:2px dashed #242424}:host ::ng-deep .spider-chart-container .spinner-container.loader{position:absolute}\n"],
|
|
353
|
+
dependencies: [
|
|
354
|
+
{
|
|
355
|
+
kind: "directive",
|
|
356
|
+
type: NgClass,
|
|
357
|
+
selector: "[ngClass]",
|
|
358
|
+
inputs: ["class", "ngClass"]
|
|
359
|
+
},
|
|
360
|
+
{
|
|
361
|
+
kind: "directive",
|
|
362
|
+
type: BaseChartDirective,
|
|
363
|
+
selector: "canvas[baseChart]",
|
|
364
|
+
inputs: [
|
|
365
|
+
"type",
|
|
366
|
+
"legend",
|
|
367
|
+
"data",
|
|
368
|
+
"options",
|
|
369
|
+
"plugins",
|
|
370
|
+
"labels",
|
|
371
|
+
"datasets"
|
|
372
|
+
],
|
|
373
|
+
outputs: ["chartClick", "chartHover"],
|
|
374
|
+
exportAs: ["base-chart"]
|
|
375
|
+
},
|
|
376
|
+
{
|
|
377
|
+
kind: "component",
|
|
378
|
+
type: SpinnerComponent,
|
|
379
|
+
selector: "ui-spinner",
|
|
380
|
+
inputs: [
|
|
381
|
+
"size",
|
|
382
|
+
"isLoader",
|
|
383
|
+
"text",
|
|
384
|
+
"applicationTheme",
|
|
385
|
+
"iconName",
|
|
386
|
+
"iconSize"
|
|
387
|
+
]
|
|
388
|
+
},
|
|
389
|
+
{
|
|
390
|
+
kind: "directive",
|
|
391
|
+
type: MatTooltip,
|
|
392
|
+
selector: "[matTooltip]",
|
|
393
|
+
inputs: [
|
|
394
|
+
"matTooltipPosition",
|
|
395
|
+
"matTooltipPositionAtOrigin",
|
|
396
|
+
"matTooltipDisabled",
|
|
397
|
+
"matTooltipShowDelay",
|
|
398
|
+
"matTooltipHideDelay",
|
|
399
|
+
"matTooltipTouchGestures",
|
|
400
|
+
"matTooltip",
|
|
401
|
+
"matTooltipClass"
|
|
402
|
+
],
|
|
403
|
+
exportAs: ["matTooltip"]
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
kind: "pipe",
|
|
407
|
+
type: UiTranslatePipe,
|
|
408
|
+
name: "uiTranslate"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
kind: "pipe",
|
|
412
|
+
type: MemoizeFuncPipe,
|
|
413
|
+
name: "memoizeFunc"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
kind: "pipe",
|
|
417
|
+
type: AsyncPipe,
|
|
418
|
+
name: "async"
|
|
419
|
+
}
|
|
420
|
+
],
|
|
421
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
422
|
+
});
|
|
423
|
+
}
|
|
424
|
+
};
|
|
425
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
426
|
+
minVersion: "12.0.0",
|
|
427
|
+
version: "22.2.4",
|
|
428
|
+
ngImport: i0,
|
|
429
|
+
type: SpiderChartComponent,
|
|
430
|
+
decorators: [{
|
|
431
|
+
type: Component,
|
|
432
|
+
args: [{
|
|
433
|
+
selector: "ui-spider-chart",
|
|
434
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
435
|
+
imports: [
|
|
436
|
+
NgClass,
|
|
437
|
+
BaseChartDirective,
|
|
438
|
+
SpinnerComponent,
|
|
439
|
+
MatTooltip,
|
|
440
|
+
UiTranslatePipe,
|
|
441
|
+
MemoizeFuncPipe,
|
|
442
|
+
AsyncPipe
|
|
443
|
+
],
|
|
444
|
+
template: "<div class=\"spider-chart-container\" tabindex=\"0\" [attr.aria-label]=\"ariaLabel\">\n <div\n class=\"spacing-container\"\n [ngClass]=\"{ 'small-spacing': radarChartData.labels && radarChartData.labels.length % 2 === 1 && !loading }\"\n >\n <div\n class=\"chart-container\"\n [style.width]=\"size === 'large' ? '280px' : '200px'\"\n [style.height]=\"size === 'large' ? '280px' : '200px'\"\n >\n @if (!loading) {\n <canvas baseChart [data]=\"radarChartData\" [options]=\"radarChartOptions\" type=\"radar\" class=\"chart\"> </canvas>\n } @else {\n <canvas baseChart [data]=\"loadingChartData\" [options]=\"loadingChartOptions\" type=\"radar\" class=\"chart\">\n </canvas>\n <ui-spinner></ui-spinner>\n }\n\n @if (labelPositionsVisible) {\n <div class=\"overlay-container\" [style.visibility]=\"labelStylesCached ? 'visible' : 'hidden'\">\n @for (label of spiderChartData.labels; track label) {\n <div\n class=\"label-container\"\n #labelContainer\n [matTooltip]=\"spiderChartData.labelDescription[$index]\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n (keydown)=\"onLabelKeyDown($event, $index)\"\n [attr.aria-label]=\"spiderChartData.labelDescription[$index]\"\n [style.left]=\"labelStyles[label]?.left\"\n [style.bottom]=\"labelStyles[label]?.bottom\"\n >\n @if (!(label.length > 20 && size === 'large' && spiderChartData.labels.length < 9)) {\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label }}\n </div>\n } @else {\n <div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getFirstLine }}\n </div>\n <div class=\"label\" [style.max-width]=\"size === 'large' ? '135px' : '100px'\">\n {{ label | memoizeFunc: getSecondLine : this }}\n </div>\n </div>\n }\n <span class=\"value\">{{ spiderChartData.plotData[0].data[$index] }}</span>\n </div>\n <span\n class=\"fake-data-points\"\n #fakeDataPoints\n [tabindex]=\"focusedLabelIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedLabelIndex ? showTooltipForDataPoint($index) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index)\"\n >\n </span>\n @if (radarChartData.datasets.length > 1) {\n <span\n class=\"fake-data-points-secondary\"\n #fakeDataPointsSecondary\n [tabindex]=\"focusedFakeDataPointIndex === $index ? '0' : '-1'\"\n (focus)=\"$index === focusedFakeDataPointIndex ? showTooltipForDataPoint($index, true) : null\"\n (keydown)=\"onFakeDataPointsKeyDown($event, $index, true)\"\n >\n </span>\n }\n }\n </div>\n }\n </div>\n </div>\n @if (radarChartData.datasets.length > 0) {\n <div class=\"legend-container\">\n @for (dataset of radarChartData.datasets; track dataset.label) {\n <div\n class=\"legend-item\"\n (click)=\"toggleDatasetVisibility($index)\"\n [tabindex]=\"$index === 0 ? '0' : '-1'\"\n role=\"button\"\n [attr.aria-pressed]=\"isDatasetVisible($index) ? false : true\"\n [attr.aria-label]=\"\n isDatasetVisible($index)\n ? (translationContext + 'DATASET_VISIBLE' | uiTranslate: { dataset: dataset.label } | async)\n : (translationContext + 'DATASET_HIDDEN' | uiTranslate: { dataset: dataset.label } | async)\n \"\n (keydown)=\"onLegendItemKeyDown($event, $index)\"\n #legendItem\n >\n <span class=\"legend-line\" [ngClass]=\"{ 'solid-line': $index === 0, 'dashed-line': $index === 1 }\"></span>\n <span class=\"legend-label\" [style.text-decoration]=\"isDatasetVisible($index) ? 'none' : 'line-through'\">\n {{ dataset.label }}\n </span>\n </div>\n }\n </div>\n }\n</div>\n",
|
|
445
|
+
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}.spider-chart-container{display:flex;flex-direction:column;align-items:center}.spider-chart-container .spacing-container{padding:40px 140px}.spider-chart-container .spacing-container.small-spacing{padding:0 80px}.spider-chart-container .spacing-container .chart-container{position:relative}.spider-chart-container .spacing-container .chart-container .overlay-container{position:absolute;top:0;left:0;width:100%;height:100%;pointer-events:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container{display:flex;gap:4px;position:absolute;pointer-events:all;cursor:pointer}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .fake-data-points{visibility:hidden}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container:focus{outline:none}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .label{font-size:12px;border-bottom:1px dashed #d3d3d3;white-space:nowrap;overflow:hidden;width:fit-content;text-overflow:ellipsis}.spider-chart-container .spacing-container .chart-container .overlay-container .label-container .value{font-weight:700}.spider-chart-container .legend-container{display:flex;gap:16px;cursor:pointer}.spider-chart-container .legend-container .legend-item{display:flex;align-items:center;gap:8px}.spider-chart-container .legend-container .legend-item .legend-line{display:inline-block;width:11px;height:4px}.spider-chart-container .legend-container .legend-item .solid-line{background-color:#d410aa}.spider-chart-container .legend-container .legend-item .dashed-line{border-top:2px dashed #242424}:host ::ng-deep .spider-chart-container .spinner-container.loader{position:absolute}\n"]
|
|
446
|
+
}]
|
|
447
|
+
}],
|
|
448
|
+
propDecorators: {
|
|
449
|
+
size: [{ type: Input }],
|
|
450
|
+
spiderChartData: [{ type: Input }],
|
|
451
|
+
stepSize: [{ type: Input }],
|
|
452
|
+
ariaLabel: [{ type: Input }],
|
|
453
|
+
loading: [{ type: Input }],
|
|
454
|
+
applicationTheme: [{ type: Input }],
|
|
455
|
+
chart: [{
|
|
456
|
+
type: ViewChild,
|
|
457
|
+
args: [BaseChartDirective]
|
|
458
|
+
}],
|
|
459
|
+
labelContainers: [{
|
|
460
|
+
type: ViewChildren,
|
|
461
|
+
args: ["labelContainer"]
|
|
462
|
+
}],
|
|
463
|
+
fakeDataPoints: [{
|
|
464
|
+
type: ViewChildren,
|
|
465
|
+
args: ["fakeDataPoints"]
|
|
466
|
+
}],
|
|
467
|
+
fakeDataPointsSecondary: [{
|
|
468
|
+
type: ViewChildren,
|
|
469
|
+
args: ["fakeDataPointsSecondary"]
|
|
470
|
+
}],
|
|
471
|
+
legendItems: [{
|
|
472
|
+
type: ViewChildren,
|
|
473
|
+
args: ["legendItem"]
|
|
474
|
+
}]
|
|
475
|
+
}
|
|
476
|
+
});
|
|
480
477
|
Chart.register(...registerables);
|
|
481
|
-
class SpiderChartComponentModule {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
478
|
+
var SpiderChartComponentModule = class SpiderChartComponentModule {
|
|
479
|
+
static {
|
|
480
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
481
|
+
minVersion: "12.0.0",
|
|
482
|
+
version: "22.2.4",
|
|
483
|
+
ngImport: i0,
|
|
484
|
+
type: SpiderChartComponentModule,
|
|
485
|
+
deps: [],
|
|
486
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
487
|
+
});
|
|
488
|
+
}
|
|
489
|
+
static {
|
|
490
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
491
|
+
minVersion: "14.0.0",
|
|
492
|
+
version: "22.2.4",
|
|
493
|
+
ngImport: i0,
|
|
494
|
+
type: SpiderChartComponentModule,
|
|
495
|
+
imports: [
|
|
496
|
+
NgClass,
|
|
497
|
+
UiTranslatePipe,
|
|
498
|
+
BaseChartDirective,
|
|
499
|
+
MatTooltipModule,
|
|
500
|
+
MemoizeFuncPipe,
|
|
501
|
+
SpinnerComponentModule,
|
|
502
|
+
CommonModule,
|
|
503
|
+
SpiderChartComponent
|
|
504
|
+
],
|
|
505
|
+
exports: [SpiderChartComponent]
|
|
506
|
+
});
|
|
507
|
+
}
|
|
508
|
+
static {
|
|
509
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
510
|
+
minVersion: "12.0.0",
|
|
511
|
+
version: "22.2.4",
|
|
512
|
+
ngImport: i0,
|
|
513
|
+
type: SpiderChartComponentModule,
|
|
514
|
+
imports: [
|
|
515
|
+
MatTooltipModule,
|
|
516
|
+
SpinnerComponentModule,
|
|
517
|
+
CommonModule,
|
|
518
|
+
SpiderChartComponent
|
|
519
|
+
]
|
|
520
|
+
});
|
|
521
|
+
}
|
|
522
|
+
};
|
|
523
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
524
|
+
minVersion: "12.0.0",
|
|
525
|
+
version: "22.2.4",
|
|
526
|
+
ngImport: i0,
|
|
527
|
+
type: SpiderChartComponentModule,
|
|
528
|
+
decorators: [{
|
|
529
|
+
type: NgModule,
|
|
530
|
+
args: [{
|
|
531
|
+
exports: [SpiderChartComponent],
|
|
532
|
+
imports: [
|
|
533
|
+
NgClass,
|
|
534
|
+
UiTranslatePipe,
|
|
535
|
+
BaseChartDirective,
|
|
536
|
+
MatTooltipModule,
|
|
537
|
+
MemoizeFuncPipe,
|
|
538
|
+
SpinnerComponentModule,
|
|
539
|
+
CommonModule,
|
|
540
|
+
SpiderChartComponent
|
|
541
|
+
]
|
|
542
|
+
}]
|
|
543
|
+
}]
|
|
544
|
+
});
|
|
517
545
|
export { LargeSpiderChartSize, SmallSpiderChartSize, SpiderChartComponent, SpiderChartComponentModule };
|
|
518
|
-
|
|
546
|
+
|
|
547
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-spider-chart.mjs.map
|