@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,281 +1,681 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AsyncPipe, CommonModule } from
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import * as i3 from
|
|
7
|
-
import { FormControl, FormsModule, ReactiveFormsModule } from
|
|
8
|
-
import { Subject, debounceTime, distinctUntilChanged } from
|
|
9
|
-
import { AiCaveatComponent, AiCaveatComponentModule } from
|
|
10
|
-
import { ButtonComponent, ButtonComponentModule } from
|
|
11
|
-
import { CardComponent, CardComponentModule } from
|
|
12
|
-
import { IS_MOBILE_TOKEN,
|
|
13
|
-
import * as i2 from
|
|
14
|
-
import { FieldComponentModule } from
|
|
15
|
-
import * as i1 from
|
|
16
|
-
import { IconComponentModule } from
|
|
17
|
-
import { TagComponent, TagComponentModule } from
|
|
18
|
-
|
|
1
|
+
import { animate, style, transition, trigger } from "@angular/animations";
|
|
2
|
+
import { AsyncPipe, CommonModule } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, NgModule, computed, inject, input, model, output, signal } from "@angular/core";
|
|
5
|
+
import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop";
|
|
6
|
+
import * as i3 from "@angular/forms";
|
|
7
|
+
import { FormControl, FormsModule, ReactiveFormsModule } from "@angular/forms";
|
|
8
|
+
import { Subject, debounceTime, distinctUntilChanged } from "rxjs";
|
|
9
|
+
import { AiCaveatComponent, AiCaveatComponentModule } from "@testgorilla/tgo-ui/components/ai-caveat";
|
|
10
|
+
import { ButtonComponent, ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
|
|
11
|
+
import { CardComponent, CardComponentModule } from "@testgorilla/tgo-ui/components/card";
|
|
12
|
+
import { IS_MOBILE_TOKEN, MemoizeFuncPipe, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
|
|
13
|
+
import * as i2 from "@testgorilla/tgo-ui/components/field";
|
|
14
|
+
import { FieldComponentModule } from "@testgorilla/tgo-ui/components/field";
|
|
15
|
+
import * as i1 from "@testgorilla/tgo-ui/components/icon";
|
|
16
|
+
import { IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
|
|
17
|
+
import { TagComponent, TagComponentModule } from "@testgorilla/tgo-ui/components/tag";
|
|
19
18
|
var AiFeedbackPanelType;
|
|
20
|
-
(function
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
(function(AiFeedbackPanelType) {
|
|
20
|
+
AiFeedbackPanelType["POSITIVE"] = "positive";
|
|
21
|
+
AiFeedbackPanelType["NEGATIVE"] = "negative";
|
|
23
22
|
})(AiFeedbackPanelType || (AiFeedbackPanelType = {}));
|
|
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
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: AiFeedbackComponent, isStandalone: true, selector: "ui-ai-feedback", inputs: { positiveConfig: { classPropertyName: "positiveConfig", publicName: "positiveConfig", isSignal: true, isRequired: false, transformFunction: null }, negativeConfig: { classPropertyName: "negativeConfig", publicName: "negativeConfig", isSignal: true, isRequired: false, transformFunction: null }, skipPanelForPositive: { classPropertyName: "skipPanelForPositive", publicName: "skipPanelForPositive", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, isRatingDisabled: { classPropertyName: "isRatingDisabled", publicName: "isRatingDisabled", isSignal: true, isRequired: false, transformFunction: null }, enableAutoEmit: { classPropertyName: "enableAutoEmit", publicName: "enableAutoEmit", isSignal: true, isRequired: false, transformFunction: null }, isPositiveFeedback: { classPropertyName: "isPositiveFeedback", publicName: "isPositiveFeedback", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { isPositiveFeedback: "isPositiveFeedbackChange", selectionChange: "selectionChange", feedbackSubmitted: "feedbackSubmitted", feedbackCancelled: "feedbackCancelled", feedbackChanged: "feedbackChanged" }, ngImport: i0, template: "<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\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}.ai-feedback-wrapper{position:relative}.ai-feedback{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;gap:16px;padding-right:4px}@media(max-width:600px){.ai-feedback{flex-wrap:wrap}}.ai-feedback-buttons-section{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;color:#666}@media(max-width:600px){.ai-feedback-buttons-section{flex:1 0 100%;justify-content:space-between}}.ai-feedback-buttons{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.ai-feedback-button-positive{margin-right:8px}.ai-feedback-saved{display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.ai-feedback-saved-text{font-size:12px;color:#666}.feedback-panel{display:block;margin-top:16px}.feedback-panel-arrow{position:absolute;top:-8px;width:16px;height:16px;background:inherit;border-left:1px solid;border-top:1px solid;border-color:inherit;transform:rotate(45deg);transition:right .2s ease-out}.feedback-panel.arrow-left .feedback-panel-arrow{right:40px}.feedback-panel.arrow-right .feedback-panel-arrow{right:8px}.feedback-panel-content{position:relative}.feedback-panel-title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.feedback-panel-title{font-size:16px;font-weight:600;color:#242424}.feedback-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.feedback-field{margin-bottom:16px}.feedback-submit-container{display:flex;justify-content:flex-end}@media(max-width:600px){.feedback-submit-container{display:block}}\n"], dependencies: [{ kind: "component", type: AiCaveatComponent, selector: "ui-ai-caveat", inputs: ["applicationTheme"] }, { kind: "ngmodule", type: IconComponentModule }, { kind: "component", type: i1.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "trailingIconName", "trailingIconFilled", "disabled", "loading", "loadingWithLabel", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaExpanded", "ariaControls", "ariaPressed", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled", "testId"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "component", type: CardComponent, selector: "ui-card", inputs: ["size", "sizeVariant", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus", "testId"], outputs: ["cardSelected"] }, { kind: "component", type: TagComponent, selector: "ui-tag", inputs: ["label", "icon", "allowClose", "readOnly", "isSelected", "showIconWhenSelected", "pinnedBackground", "constrainWidth", "isDisabled", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "showBadge", "notificationsAmount"], outputs: ["isSelectedChange", "close", "press"] }, { kind: "ngmodule", type: FieldComponentModule }, { kind: "component", type: i2.FieldComponent, selector: "ui-field", inputs: ["fullWidth", "fullHeight", "label", "labelHtml", "labelIcon", "fieldName", "placeholder", "id", "value", "badgeVariant", "errors", "disabled", "required", "readOnly", "hintMessage", "type", "updateOnBlur", "allowOnlyDigits", "isAutocompleteOff", "allowNegative", "showBottomContent", "applicationTheme", "ariaLabel", "testId", "loading", "isValid", "maxCharacters", "trimOnBlur", "trimOnSubmit", "maxRows", "hasTextAreaCounter", "hideBuiltInErrors", "hideLabelInErrors", "max", "min", "textareaHeight", "borderless", "autosizableTextarea", "isAIVariant", "ariaLabelledby", "ariaDescribedby", "hasError"], outputs: ["validateEvent", "fieldBlur"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }, { kind: "pipe", type: MemoizeFuncPipe, name: "memoizeFunc" }], animations: [
|
|
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
|
-
|
|
23
|
+
var AiFeedbackComponent = class AiFeedbackComponent {
|
|
24
|
+
constructor() {
|
|
25
|
+
this.positiveConfig = input(...ngDevMode ? [void 0, { debugName: "positiveConfig" }] : /* istanbul ignore next */ []);
|
|
26
|
+
this.negativeConfig = input(...ngDevMode ? [void 0, { debugName: "negativeConfig" }] : /* istanbul ignore next */ []);
|
|
27
|
+
this.skipPanelForPositive = input(false, ...ngDevMode ? [{ debugName: "skipPanelForPositive" }] : /* istanbul ignore next */ []);
|
|
28
|
+
this.applicationTheme = input("light", ...ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []);
|
|
29
|
+
this.variant = input("default", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.isRatingDisabled = input(false, ...ngDevMode ? [{ debugName: "isRatingDisabled" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.enableAutoEmit = input(false, ...ngDevMode ? [{ debugName: "enableAutoEmit" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.isPositiveFeedback = model(null, ...ngDevMode ? [{ debugName: "isPositiveFeedback" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.selectionChange = output();
|
|
34
|
+
this.feedbackSubmitted = output();
|
|
35
|
+
this.feedbackCancelled = output();
|
|
36
|
+
this.feedbackChanged = output();
|
|
37
|
+
this.isMobile$ = inject(IS_MOBILE_TOKEN);
|
|
38
|
+
this.destroyRef = inject(DestroyRef);
|
|
39
|
+
this.isMobile = toSignal(this.isMobile$, { initialValue: false });
|
|
40
|
+
this.showPanel = signal(false, ...ngDevMode ? [{ debugName: "showPanel" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this.panelType = signal(null, ...ngDevMode ? [{ debugName: "panelType" }] : /* istanbul ignore next */ []);
|
|
42
|
+
this.selectedOptions = signal([], ...ngDevMode ? [{ debugName: "selectedOptions" }] : /* istanbul ignore next */ []);
|
|
43
|
+
this.otherTextControl = new FormControl("");
|
|
44
|
+
this.otherTextValue = signal("", ...ngDevMode ? [{ debugName: "otherTextValue" }] : /* istanbul ignore next */ []);
|
|
45
|
+
this.selectedOptionsSubject = new Subject();
|
|
46
|
+
this.otherTextSubject = new Subject();
|
|
47
|
+
this.translationContext = "AI_FEEDBACK.";
|
|
48
|
+
this.AiFeedbackPanelType = AiFeedbackPanelType;
|
|
49
|
+
this.defaultPositiveTitle = `${this.translationContext}POSITIVE_TITLE`;
|
|
50
|
+
this.defaultNegativeTitle = `${this.translationContext}NEGATIVE_TITLE`;
|
|
51
|
+
this.OTHER_OPTION_ID = "other";
|
|
52
|
+
this.shouldAutoEmit = computed(() => this.enableAutoEmit() && this.variant() !== "default", ...ngDevMode ? [{ debugName: "shouldAutoEmit" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.activeConfig = computed(() => {
|
|
54
|
+
const type = this.panelType();
|
|
55
|
+
if (type === AiFeedbackPanelType.POSITIVE) {
|
|
56
|
+
const config = this.positiveConfig();
|
|
57
|
+
if (this.variant() === "panel" && config?.options?.length) return this.ensureOtherOption(config);
|
|
58
|
+
return config;
|
|
59
|
+
}
|
|
60
|
+
if (type === AiFeedbackPanelType.NEGATIVE) {
|
|
61
|
+
const config = this.negativeConfig();
|
|
62
|
+
if (this.variant() === "panel" && config?.options?.length) return this.ensureOtherOption(config);
|
|
63
|
+
return config;
|
|
64
|
+
}
|
|
65
|
+
return null;
|
|
66
|
+
}, ...ngDevMode ? [{ debugName: "activeConfig" }] : /* istanbul ignore next */ []);
|
|
67
|
+
this.arrowPosition = computed(() => this.panelType() === AiFeedbackPanelType.POSITIVE ? "left" : "right", ...ngDevMode ? [{ debugName: "arrowPosition" }] : /* istanbul ignore next */ []);
|
|
68
|
+
this.isSubmitDisabled = computed(() => {
|
|
69
|
+
switch (this.variant()) {
|
|
70
|
+
case "input-only": return this.otherTextValue().trim().length === 0;
|
|
71
|
+
case "panel": return this.selectedOptions().length === 0;
|
|
72
|
+
default: return false;
|
|
73
|
+
}
|
|
74
|
+
}, ...ngDevMode ? [{ debugName: "isSubmitDisabled" }] : /* istanbul ignore next */ []);
|
|
75
|
+
}
|
|
76
|
+
ngOnInit() {
|
|
77
|
+
this.otherTextControl.valueChanges.pipe(takeUntilDestroyed(this.destroyRef)).subscribe((value) => {
|
|
78
|
+
this.otherTextValue.set(value ?? "");
|
|
79
|
+
if (this.shouldAutoEmit()) this.otherTextSubject.next(value ?? "");
|
|
80
|
+
});
|
|
81
|
+
this.selectedOptionsSubject.pipe(debounceTime(500), distinctUntilChanged((prev, curr) => JSON.stringify(prev) === JSON.stringify(curr)), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
82
|
+
this.feedbackChanged.emit({
|
|
83
|
+
isPositiveFeedback: this.isPositiveFeedback(),
|
|
84
|
+
selectedOptions: this.selectedOptions(),
|
|
85
|
+
otherText: this.otherTextControl.value || void 0
|
|
86
|
+
});
|
|
87
|
+
});
|
|
88
|
+
this.otherTextSubject.pipe(debounceTime(500), distinctUntilChanged(), takeUntilDestroyed(this.destroyRef)).subscribe(() => {
|
|
89
|
+
this.feedbackChanged.emit({
|
|
90
|
+
isPositiveFeedback: this.isPositiveFeedback(),
|
|
91
|
+
selectedOptions: this.selectedOptions(),
|
|
92
|
+
otherText: this.otherTextControl.value || void 0
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getDefaultPanelTitleTranslation(panelType) {
|
|
97
|
+
return panelType === AiFeedbackPanelType.POSITIVE ? this.defaultPositiveTitle : this.defaultNegativeTitle;
|
|
98
|
+
}
|
|
99
|
+
ensureOtherOption(config) {
|
|
100
|
+
if (this.variant() === "input-only") return config;
|
|
101
|
+
return config.options?.some((opt) => opt.id === this.OTHER_OPTION_ID) ? config : {
|
|
102
|
+
...config,
|
|
103
|
+
options: [...config.options ?? [], {
|
|
104
|
+
id: this.OTHER_OPTION_ID,
|
|
105
|
+
label: "Other"
|
|
106
|
+
}]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
buildFeedbackData() {
|
|
110
|
+
if (this.variant() === "input-only") return {
|
|
111
|
+
isPositiveFeedback: this.isPositiveFeedback(),
|
|
112
|
+
otherText: this.otherTextControl.value || void 0
|
|
113
|
+
};
|
|
114
|
+
return {
|
|
115
|
+
isPositiveFeedback: this.isPositiveFeedback(),
|
|
116
|
+
selectedOptions: this.selectedOptions(),
|
|
117
|
+
otherText: this.otherTextControl.value || void 0
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
resetPanelState() {
|
|
121
|
+
this.showPanel.set(false);
|
|
122
|
+
this.panelType.set(null);
|
|
123
|
+
this.selectedOptions.set([]);
|
|
124
|
+
this.otherTextControl.setValue("");
|
|
125
|
+
}
|
|
126
|
+
shouldShowPanelForVariant() {
|
|
127
|
+
return this.variant() === "panel" || this.variant() === "input-only";
|
|
128
|
+
}
|
|
129
|
+
onSelectionChange(isPositive) {
|
|
130
|
+
if (this.isRatingDisabled()) return;
|
|
131
|
+
const newValue = this.isPositiveFeedback() === isPositive ? null : isPositive;
|
|
132
|
+
this.isPositiveFeedback.set(newValue);
|
|
133
|
+
this.selectionChange.emit(newValue);
|
|
134
|
+
if (newValue !== null) {
|
|
135
|
+
const shouldSkipPanel = isPositive && this.skipPanelForPositive();
|
|
136
|
+
if (this.shouldShowPanelForVariant() && !shouldSkipPanel) {
|
|
137
|
+
this.panelType.set(isPositive ? AiFeedbackPanelType.POSITIVE : AiFeedbackPanelType.NEGATIVE);
|
|
138
|
+
this.showPanel.set(true);
|
|
139
|
+
this.selectedOptions.set([]);
|
|
140
|
+
this.otherTextControl.setValue("");
|
|
141
|
+
}
|
|
142
|
+
} else this.closePanel();
|
|
143
|
+
}
|
|
144
|
+
toggleOption(optionId) {
|
|
145
|
+
const current = this.selectedOptions();
|
|
146
|
+
const updated = current.includes(optionId) ? current.filter((id) => id !== optionId) : [...current, optionId];
|
|
147
|
+
this.selectedOptions.set(updated);
|
|
148
|
+
if (this.shouldAutoEmit()) this.selectedOptionsSubject.next(updated);
|
|
149
|
+
}
|
|
150
|
+
isOptionSelected(optionId) {
|
|
151
|
+
return this.selectedOptions().includes(optionId);
|
|
152
|
+
}
|
|
153
|
+
showOtherField() {
|
|
154
|
+
return this.variant() === "input-only" || this.selectedOptions().includes(this.OTHER_OPTION_ID);
|
|
155
|
+
}
|
|
156
|
+
onSubmit() {
|
|
157
|
+
this.feedbackSubmitted.emit(this.buildFeedbackData());
|
|
158
|
+
this.showPanel.set(false);
|
|
159
|
+
}
|
|
160
|
+
closePanel() {
|
|
161
|
+
this.feedbackCancelled.emit(this.buildFeedbackData());
|
|
162
|
+
this.resetPanelState();
|
|
163
|
+
}
|
|
164
|
+
static {
|
|
165
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
166
|
+
minVersion: "12.0.0",
|
|
167
|
+
version: "22.2.4",
|
|
168
|
+
ngImport: i0,
|
|
169
|
+
type: AiFeedbackComponent,
|
|
170
|
+
deps: [],
|
|
171
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
static {
|
|
175
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
176
|
+
minVersion: "17.0.0",
|
|
177
|
+
version: "22.2.4",
|
|
178
|
+
type: AiFeedbackComponent,
|
|
179
|
+
isStandalone: true,
|
|
180
|
+
selector: "ui-ai-feedback",
|
|
181
|
+
inputs: {
|
|
182
|
+
positiveConfig: {
|
|
183
|
+
classPropertyName: "positiveConfig",
|
|
184
|
+
publicName: "positiveConfig",
|
|
185
|
+
isSignal: true,
|
|
186
|
+
isRequired: false,
|
|
187
|
+
transformFunction: null
|
|
188
|
+
},
|
|
189
|
+
negativeConfig: {
|
|
190
|
+
classPropertyName: "negativeConfig",
|
|
191
|
+
publicName: "negativeConfig",
|
|
192
|
+
isSignal: true,
|
|
193
|
+
isRequired: false,
|
|
194
|
+
transformFunction: null
|
|
195
|
+
},
|
|
196
|
+
skipPanelForPositive: {
|
|
197
|
+
classPropertyName: "skipPanelForPositive",
|
|
198
|
+
publicName: "skipPanelForPositive",
|
|
199
|
+
isSignal: true,
|
|
200
|
+
isRequired: false,
|
|
201
|
+
transformFunction: null
|
|
202
|
+
},
|
|
203
|
+
applicationTheme: {
|
|
204
|
+
classPropertyName: "applicationTheme",
|
|
205
|
+
publicName: "applicationTheme",
|
|
206
|
+
isSignal: true,
|
|
207
|
+
isRequired: false,
|
|
208
|
+
transformFunction: null
|
|
209
|
+
},
|
|
210
|
+
variant: {
|
|
211
|
+
classPropertyName: "variant",
|
|
212
|
+
publicName: "variant",
|
|
213
|
+
isSignal: true,
|
|
214
|
+
isRequired: false,
|
|
215
|
+
transformFunction: null
|
|
216
|
+
},
|
|
217
|
+
isRatingDisabled: {
|
|
218
|
+
classPropertyName: "isRatingDisabled",
|
|
219
|
+
publicName: "isRatingDisabled",
|
|
220
|
+
isSignal: true,
|
|
221
|
+
isRequired: false,
|
|
222
|
+
transformFunction: null
|
|
223
|
+
},
|
|
224
|
+
enableAutoEmit: {
|
|
225
|
+
classPropertyName: "enableAutoEmit",
|
|
226
|
+
publicName: "enableAutoEmit",
|
|
227
|
+
isSignal: true,
|
|
228
|
+
isRequired: false,
|
|
229
|
+
transformFunction: null
|
|
230
|
+
},
|
|
231
|
+
isPositiveFeedback: {
|
|
232
|
+
classPropertyName: "isPositiveFeedback",
|
|
233
|
+
publicName: "isPositiveFeedback",
|
|
234
|
+
isSignal: true,
|
|
235
|
+
isRequired: false,
|
|
236
|
+
transformFunction: null
|
|
237
|
+
}
|
|
238
|
+
},
|
|
239
|
+
outputs: {
|
|
240
|
+
isPositiveFeedback: "isPositiveFeedbackChange",
|
|
241
|
+
selectionChange: "selectionChange",
|
|
242
|
+
feedbackSubmitted: "feedbackSubmitted",
|
|
243
|
+
feedbackCancelled: "feedbackCancelled",
|
|
244
|
+
feedbackChanged: "feedbackChanged"
|
|
245
|
+
},
|
|
246
|
+
ngImport: i0,
|
|
247
|
+
template: "<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n",
|
|
248
|
+
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}.ai-feedback-wrapper{position:relative}.ai-feedback{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;gap:16px;padding-right:4px}@media(max-width:600px){.ai-feedback{flex-wrap:wrap}}.ai-feedback-buttons-section{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;color:#666}@media(max-width:600px){.ai-feedback-buttons-section{flex:1 0 100%;justify-content:space-between}}.ai-feedback-buttons{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.ai-feedback-button-positive{margin-right:8px}.ai-feedback-saved{display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.ai-feedback-saved-text{font-size:12px;color:#666}.feedback-panel{display:block;margin-top:16px}.feedback-panel-arrow{position:absolute;top:-8px;width:16px;height:16px;background:inherit;border-left:1px solid;border-top:1px solid;border-color:inherit;transform:rotate(45deg);transition:right .2s ease-out}.feedback-panel.arrow-left .feedback-panel-arrow{right:40px}.feedback-panel.arrow-right .feedback-panel-arrow{right:8px}.feedback-panel-content{position:relative}.feedback-panel-title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.feedback-panel-title{font-size:16px;font-weight:600;color:#242424}.feedback-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.feedback-field{margin-bottom:16px}.feedback-submit-container{display:flex;justify-content:flex-end}@media(max-width:600px){.feedback-submit-container{display:block}}\n"],
|
|
249
|
+
dependencies: [
|
|
250
|
+
{
|
|
251
|
+
kind: "component",
|
|
252
|
+
type: AiCaveatComponent,
|
|
253
|
+
selector: "ui-ai-caveat",
|
|
254
|
+
inputs: ["applicationTheme"]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
kind: "ngmodule",
|
|
258
|
+
type: IconComponentModule
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
kind: "component",
|
|
262
|
+
type: i1.IconComponent,
|
|
263
|
+
selector: "ui-icon",
|
|
264
|
+
inputs: [
|
|
265
|
+
"size",
|
|
266
|
+
"cssClass",
|
|
267
|
+
"name",
|
|
268
|
+
"color",
|
|
269
|
+
"filled",
|
|
270
|
+
"toggleIconStyle",
|
|
271
|
+
"applicationTheme",
|
|
272
|
+
"useFullIconName"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
kind: "component",
|
|
277
|
+
type: ButtonComponent,
|
|
278
|
+
selector: "ui-button",
|
|
279
|
+
inputs: [
|
|
280
|
+
"size",
|
|
281
|
+
"variant",
|
|
282
|
+
"label",
|
|
283
|
+
"iconPosition",
|
|
284
|
+
"justIcon",
|
|
285
|
+
"iconName",
|
|
286
|
+
"trailingIconName",
|
|
287
|
+
"trailingIconFilled",
|
|
288
|
+
"disabled",
|
|
289
|
+
"loading",
|
|
290
|
+
"loadingWithLabel",
|
|
291
|
+
"fullWidth",
|
|
292
|
+
"url",
|
|
293
|
+
"urlTarget",
|
|
294
|
+
"value",
|
|
295
|
+
"tooltip",
|
|
296
|
+
"isPremium",
|
|
297
|
+
"type",
|
|
298
|
+
"companyColor",
|
|
299
|
+
"buttonBadgeConfig",
|
|
300
|
+
"applicationTheme",
|
|
301
|
+
"disabledScaleOnClick",
|
|
302
|
+
"ariaLabel",
|
|
303
|
+
"ariaExpanded",
|
|
304
|
+
"ariaControls",
|
|
305
|
+
"ariaPressed",
|
|
306
|
+
"ariaRequired",
|
|
307
|
+
"ariaLabelledby",
|
|
308
|
+
"ariaDescribedby",
|
|
309
|
+
"preventDefault",
|
|
310
|
+
"hasBackground",
|
|
311
|
+
"tooltipPosition",
|
|
312
|
+
"role",
|
|
313
|
+
"iconFilled",
|
|
314
|
+
"testId"
|
|
315
|
+
],
|
|
316
|
+
outputs: ["buttonClickEvent", "buttonHoverEvent"]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
kind: "component",
|
|
320
|
+
type: CardComponent,
|
|
321
|
+
selector: "ui-card",
|
|
322
|
+
inputs: [
|
|
323
|
+
"size",
|
|
324
|
+
"sizeVariant",
|
|
325
|
+
"variant",
|
|
326
|
+
"applicationTheme",
|
|
327
|
+
"errors",
|
|
328
|
+
"errorsSize",
|
|
329
|
+
"selected",
|
|
330
|
+
"allowSelect",
|
|
331
|
+
"allowFocus",
|
|
332
|
+
"testId"
|
|
333
|
+
],
|
|
334
|
+
outputs: ["cardSelected"]
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
kind: "component",
|
|
338
|
+
type: TagComponent,
|
|
339
|
+
selector: "ui-tag",
|
|
340
|
+
inputs: [
|
|
341
|
+
"label",
|
|
342
|
+
"icon",
|
|
343
|
+
"allowClose",
|
|
344
|
+
"readOnly",
|
|
345
|
+
"isSelected",
|
|
346
|
+
"showIconWhenSelected",
|
|
347
|
+
"pinnedBackground",
|
|
348
|
+
"constrainWidth",
|
|
349
|
+
"isDisabled",
|
|
350
|
+
"applicationTheme",
|
|
351
|
+
"ariaLabel",
|
|
352
|
+
"testId",
|
|
353
|
+
"ariaRequired",
|
|
354
|
+
"showBadge",
|
|
355
|
+
"notificationsAmount"
|
|
356
|
+
],
|
|
357
|
+
outputs: [
|
|
358
|
+
"isSelectedChange",
|
|
359
|
+
"close",
|
|
360
|
+
"press"
|
|
361
|
+
]
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
kind: "ngmodule",
|
|
365
|
+
type: FieldComponentModule
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
kind: "component",
|
|
369
|
+
type: i2.FieldComponent,
|
|
370
|
+
selector: "ui-field",
|
|
371
|
+
inputs: [
|
|
372
|
+
"fullWidth",
|
|
373
|
+
"fullHeight",
|
|
374
|
+
"label",
|
|
375
|
+
"labelHtml",
|
|
376
|
+
"labelIcon",
|
|
377
|
+
"fieldName",
|
|
378
|
+
"placeholder",
|
|
379
|
+
"id",
|
|
380
|
+
"value",
|
|
381
|
+
"badgeVariant",
|
|
382
|
+
"errors",
|
|
383
|
+
"disabled",
|
|
384
|
+
"required",
|
|
385
|
+
"readOnly",
|
|
386
|
+
"hintMessage",
|
|
387
|
+
"type",
|
|
388
|
+
"updateOnBlur",
|
|
389
|
+
"allowOnlyDigits",
|
|
390
|
+
"isAutocompleteOff",
|
|
391
|
+
"allowNegative",
|
|
392
|
+
"showBottomContent",
|
|
393
|
+
"applicationTheme",
|
|
394
|
+
"ariaLabel",
|
|
395
|
+
"testId",
|
|
396
|
+
"loading",
|
|
397
|
+
"isValid",
|
|
398
|
+
"maxCharacters",
|
|
399
|
+
"trimOnBlur",
|
|
400
|
+
"trimOnSubmit",
|
|
401
|
+
"maxRows",
|
|
402
|
+
"hasTextAreaCounter",
|
|
403
|
+
"hideBuiltInErrors",
|
|
404
|
+
"hideLabelInErrors",
|
|
405
|
+
"max",
|
|
406
|
+
"min",
|
|
407
|
+
"textareaHeight",
|
|
408
|
+
"borderless",
|
|
409
|
+
"autosizableTextarea",
|
|
410
|
+
"isAIVariant",
|
|
411
|
+
"ariaLabelledby",
|
|
412
|
+
"ariaDescribedby",
|
|
413
|
+
"hasError"
|
|
414
|
+
],
|
|
415
|
+
outputs: ["validateEvent", "fieldBlur"]
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
kind: "ngmodule",
|
|
419
|
+
type: FormsModule
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
kind: "directive",
|
|
423
|
+
type: i3.NgControlStatus,
|
|
424
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
kind: "ngmodule",
|
|
428
|
+
type: ReactiveFormsModule
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
kind: "directive",
|
|
432
|
+
type: i3.FormControlDirective,
|
|
433
|
+
selector: "[formControl]",
|
|
434
|
+
inputs: [
|
|
435
|
+
"formControl",
|
|
436
|
+
"disabled",
|
|
437
|
+
"ngModel"
|
|
438
|
+
],
|
|
439
|
+
outputs: ["ngModelChange"],
|
|
440
|
+
exportAs: ["ngForm"]
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
kind: "pipe",
|
|
444
|
+
type: AsyncPipe,
|
|
445
|
+
name: "async"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
kind: "pipe",
|
|
449
|
+
type: UiTranslatePipe,
|
|
450
|
+
name: "uiTranslate"
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
kind: "pipe",
|
|
454
|
+
type: MemoizeFuncPipe,
|
|
455
|
+
name: "memoizeFunc"
|
|
456
|
+
}
|
|
457
|
+
],
|
|
458
|
+
animations: [trigger("slideDown", [transition(":enter", [style({
|
|
459
|
+
height: 0,
|
|
460
|
+
opacity: 0,
|
|
461
|
+
overflow: "hidden"
|
|
462
|
+
}), animate("200ms ease-out", style({
|
|
463
|
+
height: "*",
|
|
464
|
+
opacity: 1
|
|
465
|
+
}))]), transition(":leave", [animate("200ms ease-in", style({
|
|
466
|
+
height: 0,
|
|
467
|
+
opacity: 0,
|
|
468
|
+
overflow: "hidden"
|
|
469
|
+
}))])])],
|
|
470
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
};
|
|
474
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
475
|
+
minVersion: "12.0.0",
|
|
476
|
+
version: "22.2.4",
|
|
477
|
+
ngImport: i0,
|
|
478
|
+
type: AiFeedbackComponent,
|
|
479
|
+
decorators: [{
|
|
480
|
+
type: Component,
|
|
481
|
+
args: [{
|
|
482
|
+
selector: "ui-ai-feedback",
|
|
483
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
484
|
+
animations: [trigger("slideDown", [transition(":enter", [style({
|
|
485
|
+
height: 0,
|
|
486
|
+
opacity: 0,
|
|
487
|
+
overflow: "hidden"
|
|
488
|
+
}), animate("200ms ease-out", style({
|
|
489
|
+
height: "*",
|
|
490
|
+
opacity: 1
|
|
491
|
+
}))]), transition(":leave", [animate("200ms ease-in", style({
|
|
492
|
+
height: 0,
|
|
493
|
+
opacity: 0,
|
|
494
|
+
overflow: "hidden"
|
|
495
|
+
}))])])],
|
|
496
|
+
imports: [
|
|
497
|
+
AiCaveatComponent,
|
|
498
|
+
IconComponentModule,
|
|
499
|
+
ButtonComponent,
|
|
500
|
+
CardComponent,
|
|
501
|
+
TagComponent,
|
|
502
|
+
FieldComponentModule,
|
|
503
|
+
FormsModule,
|
|
504
|
+
ReactiveFormsModule,
|
|
505
|
+
AsyncPipe,
|
|
506
|
+
UiTranslatePipe,
|
|
507
|
+
MemoizeFuncPipe
|
|
508
|
+
],
|
|
509
|
+
template: "<div class=\"ai-feedback-wrapper\">\n <div class=\"ai-feedback\" [attr.aria-label]=\"translationContext + 'TITLE' | uiTranslate\" role=\"group\">\n <ui-ai-caveat [applicationTheme]=\"applicationTheme()\"></ui-ai-caveat>\n\n <div class=\"ai-feedback-buttons-section\">\n @if (isRatingDisabled()) {\n <div class=\"ai-feedback-saved\">\n <span class=\"ai-feedback-saved-text\">{{ translationContext + 'RATING_SAVED' | uiTranslate | async }}</span>\n <ui-icon\n [name]=\"isPositiveFeedback() ? 'Thumb-up-filled' : 'Thumb-down-filled'\"\n [filled]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n [color]=\"'gray'\"\n />\n </div>\n } @else {\n <span class=\"ai-feedback-label\">{{ translationContext + 'TITLE' | uiTranslate | async }}</span>\n\n <div\n class=\"ai-feedback-buttons\"\n role=\"group\"\n [attr.aria-expanded]=\"showPanel()\"\n [attr.aria-controls]=\"showPanel() ? 'feedback-panel' : null\"\n >\n <ui-button\n class=\"ai-feedback-button-positive\"\n data-testid=\"ai-feedback-button-positive\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-up-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.YES' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.YES' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === true\"\n (buttonClickEvent)=\"onSelectionChange(true)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n\n <ui-button\n data-testid=\"ai-feedback-button-negative\"\n [justIcon]=\"true\"\n [iconName]=\"'Thumb-down-in-line'\"\n [size]=\"'small'\"\n [tooltip]=\"('COMMON.NO' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.NO' | uiTranslate | async)!\"\n [iconFilled]=\"isPositiveFeedback() === false\"\n (buttonClickEvent)=\"onSelectionChange(false)\"\n variant=\"icon-button\"\n role=\"button\"\n >\n </ui-button>\n </div>\n }\n </div>\n </div>\n\n @if (showPanel()) {\n @let panelTitle =\n activeConfig()?.title ??\n (panelType() | memoizeFunc: getDefaultPanelTitleTranslation : this | uiTranslate | async);\n\n <ui-card\n id=\"feedback-panel\"\n class=\"feedback-panel\"\n [class.arrow-left]=\"arrowPosition() === 'left'\"\n [class.arrow-right]=\"arrowPosition() === 'right'\"\n [applicationTheme]=\"applicationTheme()\"\n [size]=\"isMobile() ? 'small' : 'medium'\"\n role=\"region\"\n [attr.aria-label]=\"panelTitle\"\n [@slideDown]\n >\n <div class=\"feedback-panel-arrow\"></div>\n\n <div class=\"feedback-panel-content\">\n <div class=\"feedback-panel-title-container\">\n <h4 class=\"feedback-panel-title\">\n {{ panelTitle }}\n </h4>\n\n <ui-button\n [justIcon]=\"true\"\n [iconName]=\"'Close-filled'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Close feedback panel'\"\n variant=\"icon-button\"\n (buttonClickEvent)=\"closePanel()\"\n >\n </ui-button>\n </div>\n\n @if (variant() === 'panel' && activeConfig()?.options && activeConfig()!.options!.length > 0) {\n <div class=\"feedback-options\">\n @for (option of activeConfig()?.options; track option.id) {\n <ui-tag\n [label]=\"option.label\"\n [isSelected]=\"isOptionSelected(option.id)\"\n [showIconWhenSelected]=\"true\"\n [applicationTheme]=\"applicationTheme()\"\n (press)=\"toggleOption(option.id)\"\n >\n </ui-tag>\n }\n </div>\n }\n\n @if (showOtherField()) {\n <ui-field\n class=\"feedback-field\"\n type=\"text\"\n [label]=\"\n activeConfig()?.otherPlaceholder ?? (translationContext + 'OTHER_PLACEHOLDER' | uiTranslate | async) ?? ''\n \"\n [formControl]=\"otherTextControl\"\n [applicationTheme]=\"applicationTheme()\"\n [fullWidth]=\"true\"\n [showBottomContent]=\"false\"\n >\n </ui-field>\n }\n\n <div class=\"feedback-submit-container\">\n <ui-button\n [label]=\"(translationContext + 'SUBMIT' | uiTranslate | async) || ''\"\n [disabled]=\"isSubmitDisabled()\"\n [size]=\"'small'\"\n [fullWidth]=\"isMobile()\"\n (buttonClickEvent)=\"onSubmit()\"\n variant=\"primary\"\n >\n </ui-button>\n </div>\n </div>\n </ui-card>\n }\n</div>\n",
|
|
510
|
+
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}.ai-feedback-wrapper{position:relative}.ai-feedback{display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between;gap:16px;padding-right:4px}@media(max-width:600px){.ai-feedback{flex-wrap:wrap}}.ai-feedback-buttons-section{display:flex;flex-flow:row nowrap;align-items:center;gap:8px;color:#666}@media(max-width:600px){.ai-feedback-buttons-section{flex:1 0 100%;justify-content:space-between}}.ai-feedback-buttons{display:flex;flex-flow:row nowrap;align-items:center;justify-content:center}.ai-feedback-button-positive{margin-right:8px}.ai-feedback-saved{display:flex;flex-flow:row nowrap;align-items:center;gap:8px}.ai-feedback-saved-text{font-size:12px;color:#666}.feedback-panel{display:block;margin-top:16px}.feedback-panel-arrow{position:absolute;top:-8px;width:16px;height:16px;background:inherit;border-left:1px solid;border-top:1px solid;border-color:inherit;transform:rotate(45deg);transition:right .2s ease-out}.feedback-panel.arrow-left .feedback-panel-arrow{right:40px}.feedback-panel.arrow-right .feedback-panel-arrow{right:8px}.feedback-panel-content{position:relative}.feedback-panel-title-container{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}.feedback-panel-title{font-size:16px;font-weight:600;color:#242424}.feedback-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}.feedback-field{margin-bottom:16px}.feedback-submit-container{display:flex;justify-content:flex-end}@media(max-width:600px){.feedback-submit-container{display:block}}\n"]
|
|
511
|
+
}]
|
|
512
|
+
}],
|
|
513
|
+
propDecorators: {
|
|
514
|
+
positiveConfig: [{
|
|
515
|
+
type: i0.Input,
|
|
516
|
+
args: [{
|
|
517
|
+
isSignal: true,
|
|
518
|
+
alias: "positiveConfig",
|
|
519
|
+
required: false
|
|
520
|
+
}]
|
|
521
|
+
}],
|
|
522
|
+
negativeConfig: [{
|
|
523
|
+
type: i0.Input,
|
|
524
|
+
args: [{
|
|
525
|
+
isSignal: true,
|
|
526
|
+
alias: "negativeConfig",
|
|
527
|
+
required: false
|
|
528
|
+
}]
|
|
529
|
+
}],
|
|
530
|
+
skipPanelForPositive: [{
|
|
531
|
+
type: i0.Input,
|
|
532
|
+
args: [{
|
|
533
|
+
isSignal: true,
|
|
534
|
+
alias: "skipPanelForPositive",
|
|
535
|
+
required: false
|
|
536
|
+
}]
|
|
537
|
+
}],
|
|
538
|
+
applicationTheme: [{
|
|
539
|
+
type: i0.Input,
|
|
540
|
+
args: [{
|
|
541
|
+
isSignal: true,
|
|
542
|
+
alias: "applicationTheme",
|
|
543
|
+
required: false
|
|
544
|
+
}]
|
|
545
|
+
}],
|
|
546
|
+
variant: [{
|
|
547
|
+
type: i0.Input,
|
|
548
|
+
args: [{
|
|
549
|
+
isSignal: true,
|
|
550
|
+
alias: "variant",
|
|
551
|
+
required: false
|
|
552
|
+
}]
|
|
553
|
+
}],
|
|
554
|
+
isRatingDisabled: [{
|
|
555
|
+
type: i0.Input,
|
|
556
|
+
args: [{
|
|
557
|
+
isSignal: true,
|
|
558
|
+
alias: "isRatingDisabled",
|
|
559
|
+
required: false
|
|
560
|
+
}]
|
|
561
|
+
}],
|
|
562
|
+
enableAutoEmit: [{
|
|
563
|
+
type: i0.Input,
|
|
564
|
+
args: [{
|
|
565
|
+
isSignal: true,
|
|
566
|
+
alias: "enableAutoEmit",
|
|
567
|
+
required: false
|
|
568
|
+
}]
|
|
569
|
+
}],
|
|
570
|
+
isPositiveFeedback: [{
|
|
571
|
+
type: i0.Input,
|
|
572
|
+
args: [{
|
|
573
|
+
isSignal: true,
|
|
574
|
+
alias: "isPositiveFeedback",
|
|
575
|
+
required: false
|
|
576
|
+
}]
|
|
577
|
+
}, {
|
|
578
|
+
type: i0.Output,
|
|
579
|
+
args: ["isPositiveFeedbackChange"]
|
|
580
|
+
}],
|
|
581
|
+
selectionChange: [{
|
|
582
|
+
type: i0.Output,
|
|
583
|
+
args: ["selectionChange"]
|
|
584
|
+
}],
|
|
585
|
+
feedbackSubmitted: [{
|
|
586
|
+
type: i0.Output,
|
|
587
|
+
args: ["feedbackSubmitted"]
|
|
588
|
+
}],
|
|
589
|
+
feedbackCancelled: [{
|
|
590
|
+
type: i0.Output,
|
|
591
|
+
args: ["feedbackCancelled"]
|
|
592
|
+
}],
|
|
593
|
+
feedbackChanged: [{
|
|
594
|
+
type: i0.Output,
|
|
595
|
+
args: ["feedbackChanged"]
|
|
596
|
+
}]
|
|
597
|
+
}
|
|
598
|
+
});
|
|
599
|
+
var AiFeedbackModule = class AiFeedbackModule {
|
|
600
|
+
static {
|
|
601
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
602
|
+
minVersion: "12.0.0",
|
|
603
|
+
version: "22.2.4",
|
|
604
|
+
ngImport: i0,
|
|
605
|
+
type: AiFeedbackModule,
|
|
606
|
+
deps: [],
|
|
607
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
608
|
+
});
|
|
609
|
+
}
|
|
610
|
+
static {
|
|
611
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
612
|
+
minVersion: "14.0.0",
|
|
613
|
+
version: "22.2.4",
|
|
614
|
+
ngImport: i0,
|
|
615
|
+
type: AiFeedbackModule,
|
|
616
|
+
imports: [
|
|
617
|
+
CommonModule,
|
|
618
|
+
AsyncPipe,
|
|
619
|
+
ReactiveFormsModule,
|
|
620
|
+
ButtonComponentModule,
|
|
621
|
+
CardComponentModule,
|
|
622
|
+
TagComponentModule,
|
|
623
|
+
FieldComponentModule,
|
|
624
|
+
AiCaveatComponentModule,
|
|
625
|
+
IconComponentModule,
|
|
626
|
+
UiTranslatePipe,
|
|
627
|
+
MemoizeFuncPipe,
|
|
628
|
+
AiFeedbackComponent
|
|
629
|
+
],
|
|
630
|
+
exports: [AiFeedbackComponent]
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
static {
|
|
634
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
635
|
+
minVersion: "12.0.0",
|
|
636
|
+
version: "22.2.4",
|
|
637
|
+
ngImport: i0,
|
|
638
|
+
type: AiFeedbackModule,
|
|
639
|
+
imports: [
|
|
640
|
+
CommonModule,
|
|
641
|
+
ReactiveFormsModule,
|
|
642
|
+
ButtonComponentModule,
|
|
643
|
+
CardComponentModule,
|
|
644
|
+
TagComponentModule,
|
|
645
|
+
FieldComponentModule,
|
|
646
|
+
AiCaveatComponentModule,
|
|
647
|
+
IconComponentModule,
|
|
648
|
+
AiFeedbackComponent
|
|
649
|
+
]
|
|
650
|
+
});
|
|
651
|
+
}
|
|
652
|
+
};
|
|
653
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
654
|
+
minVersion: "12.0.0",
|
|
655
|
+
version: "22.2.4",
|
|
656
|
+
ngImport: i0,
|
|
657
|
+
type: AiFeedbackModule,
|
|
658
|
+
decorators: [{
|
|
659
|
+
type: NgModule,
|
|
660
|
+
args: [{
|
|
661
|
+
imports: [
|
|
662
|
+
CommonModule,
|
|
663
|
+
AsyncPipe,
|
|
664
|
+
ReactiveFormsModule,
|
|
665
|
+
ButtonComponentModule,
|
|
666
|
+
CardComponentModule,
|
|
667
|
+
TagComponentModule,
|
|
668
|
+
FieldComponentModule,
|
|
669
|
+
AiCaveatComponentModule,
|
|
670
|
+
IconComponentModule,
|
|
671
|
+
UiTranslatePipe,
|
|
672
|
+
MemoizeFuncPipe,
|
|
673
|
+
AiFeedbackComponent
|
|
674
|
+
],
|
|
675
|
+
exports: [AiFeedbackComponent]
|
|
676
|
+
}]
|
|
677
|
+
}]
|
|
678
|
+
});
|
|
280
679
|
export { AiFeedbackComponent, AiFeedbackModule, AiFeedbackPanelType };
|
|
281
|
-
|
|
680
|
+
|
|
681
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-ai-feedback.mjs.map
|