@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,578 +1,1227 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AsyncPipe,
|
|
3
|
-
import * as i0 from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { NG_VALUE_ACCESSOR } from
|
|
7
|
-
import { MatTooltip } from
|
|
8
|
-
import { debounceTime, fromEvent, map, tap
|
|
9
|
-
import { BadgeComponent, BadgeComponentModule } from
|
|
10
|
-
import { ButtonComponent, ButtonComponentModule } from
|
|
11
|
-
import { UiTranslatePipe } from
|
|
12
|
-
import { FieldComponent, FieldComponentModule } from
|
|
13
|
-
import { IconComponent, IconComponentModule } from
|
|
14
|
-
import { OverflowMenuComponent, OverflowMenuComponentModule } from
|
|
15
|
-
import { PopoverDirective } from
|
|
16
|
-
import { SkeletonComponent } from
|
|
17
|
-
import { TagComponent, TagComponentModule } from
|
|
18
|
-
import { CdkTextareaAutosize } from
|
|
19
|
-
import { CardComponentModule } from
|
|
20
|
-
import { TooltipComponentModule } from
|
|
21
|
-
|
|
22
|
-
/** Throttles outward `ControlValueAccessor` emissions only; the signal write is synchronous. */
|
|
1
|
+
import { CdkConnectedOverlay, CdkOverlayOrigin } from "@angular/cdk/overlay";
|
|
2
|
+
import { AsyncPipe, CommonModule, NgClass } from "@angular/common";
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Input, NgModule, booleanAttribute, computed, effect, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
|
|
5
|
+
import { takeUntilDestroyed, toObservable, toSignal } from "@angular/core/rxjs-interop";
|
|
6
|
+
import { NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
7
|
+
import { MatTooltip } from "@angular/material/tooltip";
|
|
8
|
+
import { debounceTime, firstValueFrom, fromEvent, map, tap } from "rxjs";
|
|
9
|
+
import { BadgeComponent, BadgeComponentModule } from "@testgorilla/tgo-ui/components/badge";
|
|
10
|
+
import { ButtonComponent, ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
|
|
11
|
+
import { UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
|
|
12
|
+
import { FieldComponent, FieldComponentModule } from "@testgorilla/tgo-ui/components/field";
|
|
13
|
+
import { IconComponent, IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
|
|
14
|
+
import { OverflowMenuComponent, OverflowMenuComponentModule } from "@testgorilla/tgo-ui/components/overflow-menu";
|
|
15
|
+
import { PopoverDirective } from "@testgorilla/tgo-ui/components/popover";
|
|
16
|
+
import { SkeletonComponent } from "@testgorilla/tgo-ui/components/skeleton";
|
|
17
|
+
import { TagComponent, TagComponentModule } from "@testgorilla/tgo-ui/components/tag";
|
|
18
|
+
import { CdkTextareaAutosize } from "@angular/cdk/text-field";
|
|
19
|
+
import { CardComponentModule } from "@testgorilla/tgo-ui/components/card";
|
|
20
|
+
import { TooltipComponentModule } from "@testgorilla/tgo-ui/components/tooltip";
|
|
23
21
|
const INPUT_EMIT_DEBOUNCE_MS = 200;
|
|
24
|
-
/** Window after `compositionend` in which an Enter still counts as committing an IME candidate. */
|
|
25
22
|
const IME_COMMIT_GRACE_MS = 50;
|
|
26
|
-
const CHARACTER_COUNT_ANNOUNCE_DEBOUNCE_MS =
|
|
27
|
-
const CHARACTER_COUNT_ANNOUNCE_THRESHOLD =
|
|
23
|
+
const CHARACTER_COUNT_ANNOUNCE_DEBOUNCE_MS = 1e3;
|
|
24
|
+
const CHARACTER_COUNT_ANNOUNCE_THRESHOLD = .1;
|
|
28
25
|
let nextActionsMenuId = 0;
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
], viewQueries: [{ propertyName: "fileDrop", first: true, predicate: ["fileDropRef"], descendants: true, isSignal: true }, { propertyName: "tagDropdown", first: true, predicate: ["tagDropdown"], descendants: true, isSignal: true }, { propertyName: "fieldComponentRef", first: true, predicate: ["textarea"], descendants: true, isSignal: true }, { propertyName: "promptContainer", first: true, predicate: ["promptContainerRef"], descendants: true, isSignal: true }, { propertyName: "actionsPopover", first: true, predicate: PopoverDirective, descendants: true, isSignal: true }, { propertyName: "actionsMenu", first: true, predicate: ["actionsMenu"], descendants: true, isSignal: true }], ngImport: i0, template: "<ng-container>\n <div\n class=\"prompt-container\"\n [class.has-error]=\"!!errorMessage()\"\n [class.disabled]=\"isLocked()\"\n [attr.aria-disabled]=\"isLocked()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n cdkOverlayOrigin\n #promptOrigin=\"cdkOverlayOrigin\"\n #promptContainerRef\n [class.prompt-container-focused]=\"showFocusRing()\"\n (focusin)=\"onContainerFocusIn()\"\n (focusout)=\"onContainerFocusOut($event)\"\n >\n @if (loading()) {\n <div class=\"prompt-loading\" aria-hidden=\"true\" animate.enter=\"cnp-prompt-fade-in\">\n <ui-skeleton [theme]=\"{ width: '100%', height: '20px', margin: '0' }\"></ui-skeleton>\n <ui-skeleton [theme]=\"{ width: '30%', height: '20px', margin: '0' }\"></ui-skeleton>\n </div>\n }\n <div class=\"prompt-autocomplete\" [hidden]=\"loading()\">\n <textarea tabindex=\"-1\" class=\"ghost\" id=\"autocomplete\" [value]=\"autocompleteSuggestion()\" readonly></textarea>\n @if (visibleHelpText(); as help) {\n <!-- The mirror repeats the typed text invisibly so the hint lands right after its last character. -->\n <div class=\"ghost prompt-help-text\" aria-hidden=\"true\">\n <span class=\"prompt-help-text-mirror\">{{ promptTextValue() }}</span\n ><span class=\"prompt-help-text-hint\">{{ ' ' + help }}</span>\n </div>\n }\n\n @let showIcon = !isFieldFocused() && !promptTextValue();\n @if (showIcon) {\n <ui-icon\n class=\"prompt-icon\"\n animate.enter=\"cnp-prompt-icon-in\"\n animate.leave=\"cnp-prompt-icon-out\"\n [color]=\"'inherit'\"\n [class.hovered]=\"isFieldHovered()\"\n [name]=\"'Sparkle-in-line'\"\n ></ui-icon>\n }\n <!-- `keydown.enter` matches unmodified Enter only; Shift+Enter resolves to `shift.enter`\n and falls through to a newline. Do not add a shiftKey check. -->\n <ui-field\n #textarea\n class=\"prompt-text\"\n [class.show-icon]=\"showIcon\"\n role=\"input\"\n [showBottomContent]=\"false\"\n [borderless]=\"true\"\n [type]=\"'multi-line'\"\n [autosizableTextarea]=\"true\"\n [maxCharacters]=\"maxCharacters()\"\n [placeholder]=\"showIcon ? placeholder() || ('PROMPT.ASK_ANYTHING' | uiTranslate | async)! : ''\"\n [value]=\"promptTextValue() || ''\"\n [hasTextAreaCounter]=\"false\"\n [ariaDescribedby]=\"visibleHelpText()\"\n [disabled]=\"disabled\"\n (mouseenter)=\"isFieldHovered.set(true)\"\n (mouseleave)=\"isFieldHovered.set(false)\"\n (focusin)=\"isFieldFocused.set(true)\"\n (fieldBlur)=\"onFieldBlur()\"\n (keydown.tab)=\"onTextareaTab($event)\"\n (keydown.enter)=\"onTextareaEnter($event)\"\n (keydown.escape)=\"onTextareaEscape($event)\"\n ></ui-field>\n </div>\n <div class=\"prompt-footer flex-container\">\n <div class=\"flex-container\">\n @if (showActionsMenuTrigger()) {\n <ui-button\n [uiPopover]=\"actionsMenuTemplate\"\n [popoverTrigger]=\"'click'\"\n [popoverCardSize]=\"'small'\"\n [popoverAlign]=\"'start'\"\n [popoverOffset]=\"8\"\n [popoverAriaLabel]=\"('COMMON.ADD' | uiTranslate | async)!\"\n [uiPopoverDisabled]=\"isLocked()\"\n [variant]=\"'icon-button'\"\n [iconName]=\"isActionsMenuOpen() ? 'Close' : 'Plus'\"\n [tooltip]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [ariaExpanded]=\"isActionsMenuOpen()\"\n [ariaControls]=\"isActionsMenuOpen() ? actionsMenuId : undefined\"\n [disabled]=\"isLocked()\"\n ></ui-button>\n\n <ng-template #actionsMenuTemplate>\n <div\n class=\"actions-menu\"\n role=\"menu\"\n #actionsMenu\n [id]=\"actionsMenuId\"\n (keydown)=\"onActionsMenuKeydown($event)\"\n >\n @for (entry of actionsMenuEntries(); track entry.kind) {\n <div\n class=\"actions-menu-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"entry.tag.ariaLabel ?? entry.tag.label\"\n [attr.aria-disabled]=\"entry.tag.disabled ? 'true' : null\"\n (click)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.enter)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.space)=\"selectActionsMenuEntry(entry, $event)\"\n >\n @if (entry.tag.icon) {\n <ui-icon class=\"actions-menu-item-icon\" [name]=\"entry.tag.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"actions-menu-item-label\">{{ entry.tag.label }}</span>\n @if (entry.trailingIcon) {\n <ui-icon\n class=\"actions-menu-item-trailing\"\n [name]=\"entry.trailingIcon\"\n [color]=\"'inherit'\"\n ></ui-icon>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n\n @if (actionTag(); as at) {\n @if (!collapseActionTags()) {\n <ui-tag\n [label]=\"at.label\"\n [icon]=\"actionTagIcon()\"\n [ariaLabel]=\"at.ariaLabel ?? at.label\"\n [isDisabled]=\"isLocked() || !!at.disabled\"\n (press)=\"onActionTagPress()\"\n ></ui-tag>\n }\n } @else if (enableFileUpload()) {\n <ui-button\n [variant]=\"'icon-button'\"\n [tooltip]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [iconName]=\"'Plus'\"\n [disabled]=\"isLocked()\"\n (click)=\"fileDrop()?.nativeElement?.click()\"\n ></ui-button>\n\n @if (promptFilesList().length) {\n <div class=\"menu\" animate.enter=\"cnp-prompt-pop-in\">\n <ui-badge\n [notificationsAmount]=\"promptFilesList().length\"\n [variant]=\"'notification'\"\n class=\"menu-badge\"\n ></ui-badge>\n <ui-overflow-menu\n [matTooltip]=\"('PROMPT.FILES' | uiTranslate | async)!\"\n [matTooltipPosition]=\"'above'\"\n [buttonSize]=\"'medium'\"\n [iconTrigger]=\"'Document'\"\n [buttonVariant]=\"'ghost'\"\n [buttons]=\"fileListMenuConfig()\"\n [isDynamicMenu]=\"true\"\n [withRemovableOption]=\"true\"\n (selectItem)=\"selectedMenuOption($event)\"\n ></ui-overflow-menu>\n </div>\n }\n }\n\n @if (secondaryActionTag(); as sat) {\n @if (!collapseActionTags()) {\n <ui-tag\n class=\"prompt-secondary-action-tag\"\n [label]=\"sat.label\"\n [icon]=\"sat.icon ?? ''\"\n [ariaLabel]=\"sat.ariaLabel ?? sat.label\"\n [isDisabled]=\"isLocked() || !!sat.disabled\"\n (press)=\"onSecondaryActionTagPress()\"\n ></ui-tag>\n }\n }\n\n @if (actionTag() || enableFileUpload()) {\n <input\n data-testid=\"prompt-file-input\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDropRef\n type=\"file\"\n id=\"file-upload\"\n [accept]=\"fileInputAccept()\"\n [disabled]=\"isLocked()\"\n (change)=\"onFileSelected($event)\"\n />\n }\n </div>\n\n @if (tags()?.length && !promptTextValue()) {\n <div class=\"flex-container carousel\" animate.enter=\"cnp-prompt-row-in\">\n <div class=\"tag-container flex-container\" role=\"list\" #tagsScrollContainer>\n @for (tag of tagsVisible(); track tag) {\n <ui-tag\n [label]=\"tag.label\"\n role=\"listitem\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"isLocked()\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n ></ui-tag>\n }\n\n @if (tagsInDropdown().length) {\n <ui-button\n class=\"view-more\"\n variant=\"text-inline\"\n [label]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [ariaLabel]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [size]=\"'medium'\"\n [disabled]=\"isLocked()\"\n (click)=\"toggleDropdown()\"\n (keydown.enter)=\"focusTagDropdown()\"\n cdkOverlayOrigin\n #dropdownTrigger=\"cdkOverlayOrigin\"\n ></ui-button>\n }\n </div>\n\n <div class=\"flex-container\">\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Scroll left button'\"\n [iconName]=\"'Arrow-chevron-left-in-line'\"\n [disabled]=\"isLocked() || tagsScrollContainer.scrollLeft === 0\"\n (click)=\"tagsScrollContainer.scrollBy({ left: -100, behavior: 'smooth' })\"\n ></ui-button>\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Arrow-chevron-right-in-line'\"\n [ariaLabel]=\"'Scroll right button'\"\n [disabled]=\"\n isLocked() ||\n tagsScrollContainer.scrollLeft + tagsScrollContainer.clientWidth >= tagsScrollContainer.scrollWidth\n \"\n (click)=\"tagsScrollContainer.scrollBy({ left: 100, behavior: 'smooth' })\"\n ></ui-button>\n </div>\n </div>\n }\n\n @if (showCharacterCount()) {\n <span class=\"prompt-character-count\" [class.over-limit]=\"isOverCharacterLimit()\"\n >{{ promptTextValue().length }} / {{ maxCharacters() }}</span\n >\n <span class=\"prompt-character-count-status\" aria-live=\"polite\">\n @if (characterCountAnnouncement(); as announcement) {\n {{ announcement.key | uiTranslate: announcement.params | async }}\n }\n </span>\n }\n\n @if (showSendButton()) {\n <ui-button\n class=\"send-button\"\n animate.enter=\"cnp-prompt-pop-in\"\n [variant]=\"'secondary'\"\n [iconName]=\"'Arrow-up-in-line'\"\n [tooltip]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n [disabled]=\"!canSubmit()\"\n (click)=\"sendPromptData()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"prompt-projected-footer\">\n <ng-content select=\"[promptFooter]\"></ng-content>\n </div>\n </div>\n\n @if (errorMessage()) {\n <div class=\"prompt-error\" animate.enter=\"cnp-prompt-error-in\">\n <ui-icon [name]=\"'Error'\" color=\"red\"></ui-icon>\n <span>{{ errorMessage() }}</span>\n </div>\n }\n\n <!-- Dropdown for hidden tags -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpened() && !isLocked()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"dropdownOutsideClick()\"\n >\n <div class=\"dropdown-container\" role=\"list\" #tagDropdown tabindex=\"0\" animate.enter=\"cnp-prompt-dropdown-in\">\n @for (tag of tagsInDropdown(); track tag) {\n <div\n class=\"dropdown-tag\"\n tabindex=\"0\"\n [attr.aria-label]=\"tag.label\"\n role=\"listitem\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n >\n {{ tag.label }}\n </div>\n }\n </div>\n </ng-template>\n\n <!-- Built-in items dropdown (UI-877) \u2014 opens on focus, typing filters by label -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"itemsDropdownVisible()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"itemsDropdownOutsideClick($event)\"\n >\n <div\n class=\"dropdown-container custom-dropdown-container\"\n animate.enter=\"cnp-prompt-dropdown-in\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (dropdownHeading() || showDropdownClose()) {\n <div class=\"dropdown-header\">\n @if (dropdownHeading()) {\n <span class=\"dropdown-heading\">{{ dropdownHeading() }}</span>\n }\n @if (showDropdownClose()) {\n <ui-button\n class=\"dropdown-close\"\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Close-in-line'\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"closeItemsDropdown()\"\n ></ui-button>\n }\n </div>\n }\n <div role=\"list\">\n @for (item of filteredDropdownItems(); track item.id) {\n <div\n class=\"dropdown-tag dropdown-item\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.label\"\n (click)=\"selectDropdownItem(item, $event)\"\n (keydown.enter)=\"selectDropdownItem(item, $event)\"\n (keydown.space)=\"selectDropdownItem(item, $event)\"\n >\n @if (item.icon) {\n <ui-icon class=\"dropdown-item-icon\" [name]=\"item.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"dropdown-item-label\">{{ item.label }}</span>\n <ui-icon class=\"dropdown-item-chevron\" [name]=\"'Arrow-chevron-right-in-line'\" [color]=\"'inherit'\"></ui-icon>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ng-container>\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}:host ::ng-deep ui-field.prompt-text>mat-form-field{vertical-align:top}:host ::ng-deep ui-field.prompt-text .mat-mdc-text-field-wrapper{border-radius:10px!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{background:transparent}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{padding-bottom:0!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper textarea{max-height:220px!important}:host ::ng-deep ui-button.send-button .rounded-icon .mdc-button{width:48px!important;height:48px!important}:host ::ng-deep ui-overflow-menu button.mat-mdc-unelevated-button.ghost.light-theme.only-icon{border:none}.prompt-container{border:1px solid #919191;border-radius:10px;background-color:#fff;outline:0 solid transparent;outline-offset:-2px;transition:border-color .18s cubic-bezier(.2,0,0,1),outline-color .18s cubic-bezier(.2,0,0,1),outline-width .12s cubic-bezier(.2,0,0,1);--ui-prompt-ring: inset 0 0 0 2px transparent}.prompt-container:after{content:\"\";position:absolute;z-index:1;inset:-1px;border-radius:inherit;box-shadow:var(--ui-prompt-ring);pointer-events:none;transition:box-shadow .18s cubic-bezier(.2,0,0,1)}.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px #000000;border:1px solid black;outline:1px solid black}.prompt-container.disabled{border:1px solid #d3d3d3}.prompt-container.disabled.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px transparent;outline-width:0}.prompt-container.disabled .prompt-icon{color:#d3d3d3}ui-field.prompt-text{transition:padding-left .12s cubic-bezier(.2,0,0,1)}ui-field.show-icon{padding-left:24px}.prompt-icon{position:absolute;top:14px;left:16px;color:#666;transition:color .12s cubic-bezier(.2,0,0,1)}.prompt-icon.hovered{color:#000}.dropdown-container{width:100%}.custom-dropdown-container{overflow:hidden;background-color:#fff;border-radius:0 0 8px 8px;box-shadow:0 8px 16px #00000014}.dropdown-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px}.dropdown-heading{font-weight:700}.dropdown-close{margin-left:auto}.dropdown-item{display:flex;gap:12px;align-items:center}.dropdown-item-icon,.dropdown-item-chevron{flex-shrink:0}.dropdown-item-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-tag{padding:16px;background-color:#fff;transition:background-color .12s cubic-bezier(.2,0,0,1)}.dropdown-tag:hover,.dropdown-tag:focus{background-color:#fff2fc;cursor:pointer}.carousel{flex-grow:1;min-width:0}.tag-container{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tag-container::-webkit-scrollbar{display:none}.tag-container{margin:0 8px}.actions-menu{min-width:228px;margin:-8px}.actions-menu-item{display:flex;gap:12px;align-items:center;padding:8px;border-radius:8px;cursor:pointer;transition:background-color .12s cubic-bezier(.2,0,0,1)}.actions-menu-item:hover,.actions-menu-item:focus-visible{background-color:#fff2fc}.actions-menu-item[aria-disabled=true]{color:#d3d3d3;background-color:transparent;cursor:default}.actions-menu-item-icon,.actions-menu-item-trailing{flex-shrink:0}.actions-menu-item-label{flex:1;white-space:nowrap}#file-upload{display:none}.prompt-footer,.flex-container{display:flex;flex-flow:row nowrap;align-items:center}.prompt-footer{justify-content:space-between;padding:8px 16px}@media(max-width:600px){.prompt-footer{padding:8px}}@media(max-width:320px){.prompt-footer{padding:8px}}.prompt-character-count{margin-left:auto;padding-right:8px;color:#888;font-size:12px;line-height:16px;white-space:nowrap}.prompt-character-count.over-limit{color:#e02800}.prompt-character-count-status{position:absolute;left:-9999px}.prompt-projected-footer{display:none}.prompt-projected-footer:has(*){display:block;overflow:hidden;border-radius:0 0 9px 9px}.menu{display:flex;flex-flow:column nowrap;position:relative}.menu .menu-badge{position:absolute;right:0;z-index:1000}.view-more{margin-left:4px;white-space:nowrap}.view-more ::ng-deep button.mat-mdc-unelevated-button .label{white-space:nowrap}.prompt-container{position:relative}.prompt-container.has-error{--ui-prompt-ring: inset 0 0 0 2px #e02800;border:1px solid #e02800;outline:1px solid #e02800}.prompt-error{margin-top:4px;align-items:center;display:flex;color:#e02800;font-size:12px;line-height:16px}.prompt-error ui-icon{margin-right:4px}.prompt-loading{display:flex;flex-direction:column;gap:4px;padding:12px 16px 0}.prompt-loading ui-skeleton{height:20px}.ghost{position:absolute;top:0;left:0;bottom:16px;color:#888;border:none;pointer-events:none;background:transparent;width:100%;padding:12px 16px;font-size:inherit;line-height:22px;letter-spacing:inherit;font-weight:inherit;font-family:ModernGothic,sans-serif;resize:none}.prompt-help-text{overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word}.prompt-help-text-mirror{color:transparent}.prompt-help-text-hint{color:#919191}@keyframes cnp-prompt-fade-in{0%{opacity:0}}@keyframes cnp-prompt-icon-in{0%{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-icon-out{to{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-row-in{0%{opacity:0;transform:translateY(6px)}}@keyframes cnp-prompt-pop-in{0%{opacity:0;transform:scale(.8)}}@keyframes cnp-prompt-error-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes cnp-prompt-dropdown-in{0%{opacity:0;transform:translateY(-6px)}}.cnp-prompt-fade-in{animation:cnp-prompt-fade-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-in{animation:cnp-prompt-icon-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-out{animation:cnp-prompt-icon-out .12s cubic-bezier(.2,0,0,1) both}.cnp-prompt-row-in{animation:cnp-prompt-row-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-pop-in{animation:cnp-prompt-pop-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-error-in{animation:cnp-prompt-error-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-dropdown-in{animation:cnp-prompt-dropdown-in .18s cubic-bezier(.2,0,0,1) both}@media(prefers-reduced-motion:reduce){.prompt-container,.prompt-container:after,.prompt-icon,.dropdown-tag,ui-field.prompt-text{transition:none}.cnp-prompt-fade-in,.cnp-prompt-icon-in,.cnp-prompt-icon-out,.cnp-prompt-row-in,.cnp-prompt-pop-in,.cnp-prompt-error-in,.cnp-prompt-dropdown-in{animation-duration:1ms}}\n"], dependencies: [{ kind: "directive", type: CdkOverlayOrigin, selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]", exportAs: ["cdkOverlayOrigin"] }, { kind: "component", type: SkeletonComponent, selector: "ui-skeleton", inputs: ["count", "theme", "appearance", "isAiTheme", "applicationTheme"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: 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: "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: "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: BadgeComponent, selector: "ui-badge", inputs: ["label", "staticLabel", "icon", "iconColor", "trailingIcon", "trailingIconColor", "color", "variant", "notificationsAmount", "applicationTheme", "rebrandColor", "truncateLabel", "enableAnimation"] }, { kind: "component", type: OverflowMenuComponent, selector: "ui-overflow-menu", inputs: ["buttons", "iconTrigger", "menuLabel", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "describedby", "contentTemplateRef", "buttonVariant", "buttonSize", "menuConfig", "selectionMode", "menuAnchor", "shouldMatchAnchorWidth", "isDynamicMenu", "withRemovableOption"], outputs: ["selectItem", "menuOpened", "menuClosed"] }, { kind: "directive", type: MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }, { kind: "directive", type: CdkConnectedOverlay, selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]", inputs: ["cdkConnectedOverlayOrigin", "cdkConnectedOverlayPositions", "cdkConnectedOverlayPositionStrategy", "cdkConnectedOverlayOffsetX", "cdkConnectedOverlayOffsetY", "cdkConnectedOverlayWidth", "cdkConnectedOverlayHeight", "cdkConnectedOverlayMinWidth", "cdkConnectedOverlayMinHeight", "cdkConnectedOverlayBackdropClass", "cdkConnectedOverlayPanelClass", "cdkConnectedOverlayViewportMargin", "cdkConnectedOverlayScrollStrategy", "cdkConnectedOverlayOpen", "cdkConnectedOverlayDisableClose", "cdkConnectedOverlayTransformOriginOn", "cdkConnectedOverlayHasBackdrop", "cdkConnectedOverlayLockPosition", "cdkConnectedOverlayFlexibleDimensions", "cdkConnectedOverlayGrowAfterOpen", "cdkConnectedOverlayPush", "cdkConnectedOverlayDisposeOnNavigation", "cdkConnectedOverlayUsePopover", "cdkConnectedOverlayMatchWidth", "cdkConnectedOverlay"], outputs: ["backdropClick", "positionChange", "attach", "detach", "overlayKeydown", "overlayOutsideClick"], exportAs: ["cdkConnectedOverlay"] }, { kind: "directive", type: PopoverDirective, selector: "[uiPopover]", inputs: ["uiPopover", "popoverOffset", "popoverAlign", "popoverOpen", "popoverCard", "popoverCardSize", "popoverTrigger", "popoverAriaLabel", "uiPopoverDisabled"], exportAs: ["uiPopover"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
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
|
-
], template: "<ng-container>\n <div\n class=\"prompt-container\"\n [class.has-error]=\"!!errorMessage()\"\n [class.disabled]=\"isLocked()\"\n [attr.aria-disabled]=\"isLocked()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n cdkOverlayOrigin\n #promptOrigin=\"cdkOverlayOrigin\"\n #promptContainerRef\n [class.prompt-container-focused]=\"showFocusRing()\"\n (focusin)=\"onContainerFocusIn()\"\n (focusout)=\"onContainerFocusOut($event)\"\n >\n @if (loading()) {\n <div class=\"prompt-loading\" aria-hidden=\"true\" animate.enter=\"cnp-prompt-fade-in\">\n <ui-skeleton [theme]=\"{ width: '100%', height: '20px', margin: '0' }\"></ui-skeleton>\n <ui-skeleton [theme]=\"{ width: '30%', height: '20px', margin: '0' }\"></ui-skeleton>\n </div>\n }\n <div class=\"prompt-autocomplete\" [hidden]=\"loading()\">\n <textarea tabindex=\"-1\" class=\"ghost\" id=\"autocomplete\" [value]=\"autocompleteSuggestion()\" readonly></textarea>\n @if (visibleHelpText(); as help) {\n <!-- The mirror repeats the typed text invisibly so the hint lands right after its last character. -->\n <div class=\"ghost prompt-help-text\" aria-hidden=\"true\">\n <span class=\"prompt-help-text-mirror\">{{ promptTextValue() }}</span\n ><span class=\"prompt-help-text-hint\">{{ ' ' + help }}</span>\n </div>\n }\n\n @let showIcon = !isFieldFocused() && !promptTextValue();\n @if (showIcon) {\n <ui-icon\n class=\"prompt-icon\"\n animate.enter=\"cnp-prompt-icon-in\"\n animate.leave=\"cnp-prompt-icon-out\"\n [color]=\"'inherit'\"\n [class.hovered]=\"isFieldHovered()\"\n [name]=\"'Sparkle-in-line'\"\n ></ui-icon>\n }\n <!-- `keydown.enter` matches unmodified Enter only; Shift+Enter resolves to `shift.enter`\n and falls through to a newline. Do not add a shiftKey check. -->\n <ui-field\n #textarea\n class=\"prompt-text\"\n [class.show-icon]=\"showIcon\"\n role=\"input\"\n [showBottomContent]=\"false\"\n [borderless]=\"true\"\n [type]=\"'multi-line'\"\n [autosizableTextarea]=\"true\"\n [maxCharacters]=\"maxCharacters()\"\n [placeholder]=\"showIcon ? placeholder() || ('PROMPT.ASK_ANYTHING' | uiTranslate | async)! : ''\"\n [value]=\"promptTextValue() || ''\"\n [hasTextAreaCounter]=\"false\"\n [ariaDescribedby]=\"visibleHelpText()\"\n [disabled]=\"disabled\"\n (mouseenter)=\"isFieldHovered.set(true)\"\n (mouseleave)=\"isFieldHovered.set(false)\"\n (focusin)=\"isFieldFocused.set(true)\"\n (fieldBlur)=\"onFieldBlur()\"\n (keydown.tab)=\"onTextareaTab($event)\"\n (keydown.enter)=\"onTextareaEnter($event)\"\n (keydown.escape)=\"onTextareaEscape($event)\"\n ></ui-field>\n </div>\n <div class=\"prompt-footer flex-container\">\n <div class=\"flex-container\">\n @if (showActionsMenuTrigger()) {\n <ui-button\n [uiPopover]=\"actionsMenuTemplate\"\n [popoverTrigger]=\"'click'\"\n [popoverCardSize]=\"'small'\"\n [popoverAlign]=\"'start'\"\n [popoverOffset]=\"8\"\n [popoverAriaLabel]=\"('COMMON.ADD' | uiTranslate | async)!\"\n [uiPopoverDisabled]=\"isLocked()\"\n [variant]=\"'icon-button'\"\n [iconName]=\"isActionsMenuOpen() ? 'Close' : 'Plus'\"\n [tooltip]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [ariaExpanded]=\"isActionsMenuOpen()\"\n [ariaControls]=\"isActionsMenuOpen() ? actionsMenuId : undefined\"\n [disabled]=\"isLocked()\"\n ></ui-button>\n\n <ng-template #actionsMenuTemplate>\n <div\n class=\"actions-menu\"\n role=\"menu\"\n #actionsMenu\n [id]=\"actionsMenuId\"\n (keydown)=\"onActionsMenuKeydown($event)\"\n >\n @for (entry of actionsMenuEntries(); track entry.kind) {\n <div\n class=\"actions-menu-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"entry.tag.ariaLabel ?? entry.tag.label\"\n [attr.aria-disabled]=\"entry.tag.disabled ? 'true' : null\"\n (click)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.enter)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.space)=\"selectActionsMenuEntry(entry, $event)\"\n >\n @if (entry.tag.icon) {\n <ui-icon class=\"actions-menu-item-icon\" [name]=\"entry.tag.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"actions-menu-item-label\">{{ entry.tag.label }}</span>\n @if (entry.trailingIcon) {\n <ui-icon\n class=\"actions-menu-item-trailing\"\n [name]=\"entry.trailingIcon\"\n [color]=\"'inherit'\"\n ></ui-icon>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n\n @if (actionTag(); as at) {\n @if (!collapseActionTags()) {\n <ui-tag\n [label]=\"at.label\"\n [icon]=\"actionTagIcon()\"\n [ariaLabel]=\"at.ariaLabel ?? at.label\"\n [isDisabled]=\"isLocked() || !!at.disabled\"\n (press)=\"onActionTagPress()\"\n ></ui-tag>\n }\n } @else if (enableFileUpload()) {\n <ui-button\n [variant]=\"'icon-button'\"\n [tooltip]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [iconName]=\"'Plus'\"\n [disabled]=\"isLocked()\"\n (click)=\"fileDrop()?.nativeElement?.click()\"\n ></ui-button>\n\n @if (promptFilesList().length) {\n <div class=\"menu\" animate.enter=\"cnp-prompt-pop-in\">\n <ui-badge\n [notificationsAmount]=\"promptFilesList().length\"\n [variant]=\"'notification'\"\n class=\"menu-badge\"\n ></ui-badge>\n <ui-overflow-menu\n [matTooltip]=\"('PROMPT.FILES' | uiTranslate | async)!\"\n [matTooltipPosition]=\"'above'\"\n [buttonSize]=\"'medium'\"\n [iconTrigger]=\"'Document'\"\n [buttonVariant]=\"'ghost'\"\n [buttons]=\"fileListMenuConfig()\"\n [isDynamicMenu]=\"true\"\n [withRemovableOption]=\"true\"\n (selectItem)=\"selectedMenuOption($event)\"\n ></ui-overflow-menu>\n </div>\n }\n }\n\n @if (secondaryActionTag(); as sat) {\n @if (!collapseActionTags()) {\n <ui-tag\n class=\"prompt-secondary-action-tag\"\n [label]=\"sat.label\"\n [icon]=\"sat.icon ?? ''\"\n [ariaLabel]=\"sat.ariaLabel ?? sat.label\"\n [isDisabled]=\"isLocked() || !!sat.disabled\"\n (press)=\"onSecondaryActionTagPress()\"\n ></ui-tag>\n }\n }\n\n @if (actionTag() || enableFileUpload()) {\n <input\n data-testid=\"prompt-file-input\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDropRef\n type=\"file\"\n id=\"file-upload\"\n [accept]=\"fileInputAccept()\"\n [disabled]=\"isLocked()\"\n (change)=\"onFileSelected($event)\"\n />\n }\n </div>\n\n @if (tags()?.length && !promptTextValue()) {\n <div class=\"flex-container carousel\" animate.enter=\"cnp-prompt-row-in\">\n <div class=\"tag-container flex-container\" role=\"list\" #tagsScrollContainer>\n @for (tag of tagsVisible(); track tag) {\n <ui-tag\n [label]=\"tag.label\"\n role=\"listitem\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"isLocked()\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n ></ui-tag>\n }\n\n @if (tagsInDropdown().length) {\n <ui-button\n class=\"view-more\"\n variant=\"text-inline\"\n [label]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [ariaLabel]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [size]=\"'medium'\"\n [disabled]=\"isLocked()\"\n (click)=\"toggleDropdown()\"\n (keydown.enter)=\"focusTagDropdown()\"\n cdkOverlayOrigin\n #dropdownTrigger=\"cdkOverlayOrigin\"\n ></ui-button>\n }\n </div>\n\n <div class=\"flex-container\">\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Scroll left button'\"\n [iconName]=\"'Arrow-chevron-left-in-line'\"\n [disabled]=\"isLocked() || tagsScrollContainer.scrollLeft === 0\"\n (click)=\"tagsScrollContainer.scrollBy({ left: -100, behavior: 'smooth' })\"\n ></ui-button>\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Arrow-chevron-right-in-line'\"\n [ariaLabel]=\"'Scroll right button'\"\n [disabled]=\"\n isLocked() ||\n tagsScrollContainer.scrollLeft + tagsScrollContainer.clientWidth >= tagsScrollContainer.scrollWidth\n \"\n (click)=\"tagsScrollContainer.scrollBy({ left: 100, behavior: 'smooth' })\"\n ></ui-button>\n </div>\n </div>\n }\n\n @if (showCharacterCount()) {\n <span class=\"prompt-character-count\" [class.over-limit]=\"isOverCharacterLimit()\"\n >{{ promptTextValue().length }} / {{ maxCharacters() }}</span\n >\n <span class=\"prompt-character-count-status\" aria-live=\"polite\">\n @if (characterCountAnnouncement(); as announcement) {\n {{ announcement.key | uiTranslate: announcement.params | async }}\n }\n </span>\n }\n\n @if (showSendButton()) {\n <ui-button\n class=\"send-button\"\n animate.enter=\"cnp-prompt-pop-in\"\n [variant]=\"'secondary'\"\n [iconName]=\"'Arrow-up-in-line'\"\n [tooltip]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n [disabled]=\"!canSubmit()\"\n (click)=\"sendPromptData()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"prompt-projected-footer\">\n <ng-content select=\"[promptFooter]\"></ng-content>\n </div>\n </div>\n\n @if (errorMessage()) {\n <div class=\"prompt-error\" animate.enter=\"cnp-prompt-error-in\">\n <ui-icon [name]=\"'Error'\" color=\"red\"></ui-icon>\n <span>{{ errorMessage() }}</span>\n </div>\n }\n\n <!-- Dropdown for hidden tags -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpened() && !isLocked()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"dropdownOutsideClick()\"\n >\n <div class=\"dropdown-container\" role=\"list\" #tagDropdown tabindex=\"0\" animate.enter=\"cnp-prompt-dropdown-in\">\n @for (tag of tagsInDropdown(); track tag) {\n <div\n class=\"dropdown-tag\"\n tabindex=\"0\"\n [attr.aria-label]=\"tag.label\"\n role=\"listitem\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n >\n {{ tag.label }}\n </div>\n }\n </div>\n </ng-template>\n\n <!-- Built-in items dropdown (UI-877) \u2014 opens on focus, typing filters by label -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"itemsDropdownVisible()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"itemsDropdownOutsideClick($event)\"\n >\n <div\n class=\"dropdown-container custom-dropdown-container\"\n animate.enter=\"cnp-prompt-dropdown-in\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (dropdownHeading() || showDropdownClose()) {\n <div class=\"dropdown-header\">\n @if (dropdownHeading()) {\n <span class=\"dropdown-heading\">{{ dropdownHeading() }}</span>\n }\n @if (showDropdownClose()) {\n <ui-button\n class=\"dropdown-close\"\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Close-in-line'\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"closeItemsDropdown()\"\n ></ui-button>\n }\n </div>\n }\n <div role=\"list\">\n @for (item of filteredDropdownItems(); track item.id) {\n <div\n class=\"dropdown-tag dropdown-item\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.label\"\n (click)=\"selectDropdownItem(item, $event)\"\n (keydown.enter)=\"selectDropdownItem(item, $event)\"\n (keydown.space)=\"selectDropdownItem(item, $event)\"\n >\n @if (item.icon) {\n <ui-icon class=\"dropdown-item-icon\" [name]=\"item.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"dropdown-item-label\">{{ item.label }}</span>\n <ui-icon class=\"dropdown-item-chevron\" [name]=\"'Arrow-chevron-right-in-line'\" [color]=\"'inherit'\"></ui-icon>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ng-container>\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}:host ::ng-deep ui-field.prompt-text>mat-form-field{vertical-align:top}:host ::ng-deep ui-field.prompt-text .mat-mdc-text-field-wrapper{border-radius:10px!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{background:transparent}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{padding-bottom:0!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper textarea{max-height:220px!important}:host ::ng-deep ui-button.send-button .rounded-icon .mdc-button{width:48px!important;height:48px!important}:host ::ng-deep ui-overflow-menu button.mat-mdc-unelevated-button.ghost.light-theme.only-icon{border:none}.prompt-container{border:1px solid #919191;border-radius:10px;background-color:#fff;outline:0 solid transparent;outline-offset:-2px;transition:border-color .18s cubic-bezier(.2,0,0,1),outline-color .18s cubic-bezier(.2,0,0,1),outline-width .12s cubic-bezier(.2,0,0,1);--ui-prompt-ring: inset 0 0 0 2px transparent}.prompt-container:after{content:\"\";position:absolute;z-index:1;inset:-1px;border-radius:inherit;box-shadow:var(--ui-prompt-ring);pointer-events:none;transition:box-shadow .18s cubic-bezier(.2,0,0,1)}.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px #000000;border:1px solid black;outline:1px solid black}.prompt-container.disabled{border:1px solid #d3d3d3}.prompt-container.disabled.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px transparent;outline-width:0}.prompt-container.disabled .prompt-icon{color:#d3d3d3}ui-field.prompt-text{transition:padding-left .12s cubic-bezier(.2,0,0,1)}ui-field.show-icon{padding-left:24px}.prompt-icon{position:absolute;top:14px;left:16px;color:#666;transition:color .12s cubic-bezier(.2,0,0,1)}.prompt-icon.hovered{color:#000}.dropdown-container{width:100%}.custom-dropdown-container{overflow:hidden;background-color:#fff;border-radius:0 0 8px 8px;box-shadow:0 8px 16px #00000014}.dropdown-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px}.dropdown-heading{font-weight:700}.dropdown-close{margin-left:auto}.dropdown-item{display:flex;gap:12px;align-items:center}.dropdown-item-icon,.dropdown-item-chevron{flex-shrink:0}.dropdown-item-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-tag{padding:16px;background-color:#fff;transition:background-color .12s cubic-bezier(.2,0,0,1)}.dropdown-tag:hover,.dropdown-tag:focus{background-color:#fff2fc;cursor:pointer}.carousel{flex-grow:1;min-width:0}.tag-container{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tag-container::-webkit-scrollbar{display:none}.tag-container{margin:0 8px}.actions-menu{min-width:228px;margin:-8px}.actions-menu-item{display:flex;gap:12px;align-items:center;padding:8px;border-radius:8px;cursor:pointer;transition:background-color .12s cubic-bezier(.2,0,0,1)}.actions-menu-item:hover,.actions-menu-item:focus-visible{background-color:#fff2fc}.actions-menu-item[aria-disabled=true]{color:#d3d3d3;background-color:transparent;cursor:default}.actions-menu-item-icon,.actions-menu-item-trailing{flex-shrink:0}.actions-menu-item-label{flex:1;white-space:nowrap}#file-upload{display:none}.prompt-footer,.flex-container{display:flex;flex-flow:row nowrap;align-items:center}.prompt-footer{justify-content:space-between;padding:8px 16px}@media(max-width:600px){.prompt-footer{padding:8px}}@media(max-width:320px){.prompt-footer{padding:8px}}.prompt-character-count{margin-left:auto;padding-right:8px;color:#888;font-size:12px;line-height:16px;white-space:nowrap}.prompt-character-count.over-limit{color:#e02800}.prompt-character-count-status{position:absolute;left:-9999px}.prompt-projected-footer{display:none}.prompt-projected-footer:has(*){display:block;overflow:hidden;border-radius:0 0 9px 9px}.menu{display:flex;flex-flow:column nowrap;position:relative}.menu .menu-badge{position:absolute;right:0;z-index:1000}.view-more{margin-left:4px;white-space:nowrap}.view-more ::ng-deep button.mat-mdc-unelevated-button .label{white-space:nowrap}.prompt-container{position:relative}.prompt-container.has-error{--ui-prompt-ring: inset 0 0 0 2px #e02800;border:1px solid #e02800;outline:1px solid #e02800}.prompt-error{margin-top:4px;align-items:center;display:flex;color:#e02800;font-size:12px;line-height:16px}.prompt-error ui-icon{margin-right:4px}.prompt-loading{display:flex;flex-direction:column;gap:4px;padding:12px 16px 0}.prompt-loading ui-skeleton{height:20px}.ghost{position:absolute;top:0;left:0;bottom:16px;color:#888;border:none;pointer-events:none;background:transparent;width:100%;padding:12px 16px;font-size:inherit;line-height:22px;letter-spacing:inherit;font-weight:inherit;font-family:ModernGothic,sans-serif;resize:none}.prompt-help-text{overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word}.prompt-help-text-mirror{color:transparent}.prompt-help-text-hint{color:#919191}@keyframes cnp-prompt-fade-in{0%{opacity:0}}@keyframes cnp-prompt-icon-in{0%{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-icon-out{to{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-row-in{0%{opacity:0;transform:translateY(6px)}}@keyframes cnp-prompt-pop-in{0%{opacity:0;transform:scale(.8)}}@keyframes cnp-prompt-error-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes cnp-prompt-dropdown-in{0%{opacity:0;transform:translateY(-6px)}}.cnp-prompt-fade-in{animation:cnp-prompt-fade-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-in{animation:cnp-prompt-icon-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-out{animation:cnp-prompt-icon-out .12s cubic-bezier(.2,0,0,1) both}.cnp-prompt-row-in{animation:cnp-prompt-row-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-pop-in{animation:cnp-prompt-pop-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-error-in{animation:cnp-prompt-error-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-dropdown-in{animation:cnp-prompt-dropdown-in .18s cubic-bezier(.2,0,0,1) both}@media(prefers-reduced-motion:reduce){.prompt-container,.prompt-container:after,.prompt-icon,.dropdown-tag,ui-field.prompt-text{transition:none}.cnp-prompt-fade-in,.cnp-prompt-icon-in,.cnp-prompt-icon-out,.cnp-prompt-row-in,.cnp-prompt-pop-in,.cnp-prompt-error-in,.cnp-prompt-dropdown-in{animation-duration:1ms}}\n"] }]
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
26
|
+
const resolveIcon = (icon, fallback) => icon === null ? "" : icon ?? fallback;
|
|
27
|
+
var PromptComponent = class PromptComponent {
|
|
28
|
+
constructor() {
|
|
29
|
+
this.disabledState = signal(false, ...ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []);
|
|
30
|
+
this.tags = input([], ...ngDevMode ? [{ debugName: "tags" }] : /* istanbul ignore next */ []);
|
|
31
|
+
this.actionTag = input(null, ...ngDevMode ? [{ debugName: "actionTag" }] : /* istanbul ignore next */ []);
|
|
32
|
+
this.secondaryActionTag = input(null, ...ngDevMode ? [{ debugName: "secondaryActionTag" }] : /* istanbul ignore next */ []);
|
|
33
|
+
this.collapseActionTags = input(false, {
|
|
34
|
+
...ngDevMode ? { debugName: "collapseActionTags" } : /* istanbul ignore next */ {},
|
|
35
|
+
transform: booleanAttribute
|
|
36
|
+
});
|
|
37
|
+
this.maxCharacters = input(255, ...ngDevMode ? [{ debugName: "maxCharacters" }] : /* istanbul ignore next */ []);
|
|
38
|
+
this.supportedFileTypes = input("", ...ngDevMode ? [{ debugName: "supportedFileTypes" }] : /* istanbul ignore next */ []);
|
|
39
|
+
this.autoClear = input(true, ...ngDevMode ? [{ debugName: "autoClear" }] : /* istanbul ignore next */ []);
|
|
40
|
+
this.showSendButton = input(false, ...ngDevMode ? [{ debugName: "showSendButton" }] : /* istanbul ignore next */ []);
|
|
41
|
+
this.sendButtonDisabled = input(false, {
|
|
42
|
+
...ngDevMode ? { debugName: "sendButtonDisabled" } : /* istanbul ignore next */ {},
|
|
43
|
+
transform: booleanAttribute
|
|
44
|
+
});
|
|
45
|
+
this.enableFileUpload = input(false, ...ngDevMode ? [{ debugName: "enableFileUpload" }] : /* istanbul ignore next */ []);
|
|
46
|
+
this.loading = input(false, {
|
|
47
|
+
...ngDevMode ? { debugName: "loading" } : /* istanbul ignore next */ {},
|
|
48
|
+
transform: booleanAttribute
|
|
49
|
+
});
|
|
50
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
51
|
+
this.errorMessage = input("", ...ngDevMode ? [{ debugName: "errorMessage" }] : /* istanbul ignore next */ []);
|
|
52
|
+
this.dropdownItems = input([], ...ngDevMode ? [{ debugName: "dropdownItems" }] : /* istanbul ignore next */ []);
|
|
53
|
+
this.dropdownHeading = input("", ...ngDevMode ? [{ debugName: "dropdownHeading" }] : /* istanbul ignore next */ []);
|
|
54
|
+
this.showDropdownClose = input(false, {
|
|
55
|
+
...ngDevMode ? { debugName: "showDropdownClose" } : /* istanbul ignore next */ {},
|
|
56
|
+
transform: booleanAttribute
|
|
57
|
+
});
|
|
58
|
+
this.showCharacterCount = input(false, {
|
|
59
|
+
...ngDevMode ? { debugName: "showCharacterCount" } : /* istanbul ignore next */ {},
|
|
60
|
+
transform: booleanAttribute
|
|
61
|
+
});
|
|
62
|
+
this.helpText = input("", ...ngDevMode ? [{ debugName: "helpText" }] : /* istanbul ignore next */ []);
|
|
63
|
+
this.promptData = output();
|
|
64
|
+
this.actionTagFileSelected = output();
|
|
65
|
+
this.secondaryActionTagPress = output();
|
|
66
|
+
this.dropdownItemSelected = output();
|
|
67
|
+
this.dropdownClosed = output();
|
|
68
|
+
this.promptFilesList = signal([], ...ngDevMode ? [{ debugName: "promptFilesList" }] : /* istanbul ignore next */ []);
|
|
69
|
+
this.promptTextValue = signal("", ...ngDevMode ? [{ debugName: "promptTextValue" }] : /* istanbul ignore next */ []);
|
|
70
|
+
this.fileListMenuConfig = signal([], ...ngDevMode ? [{ debugName: "fileListMenuConfig" }] : /* istanbul ignore next */ []);
|
|
71
|
+
this.tagsVisible = signal([], ...ngDevMode ? [{ debugName: "tagsVisible" }] : /* istanbul ignore next */ []);
|
|
72
|
+
this.tagsInDropdown = signal([], ...ngDevMode ? [{ debugName: "tagsInDropdown" }] : /* istanbul ignore next */ []);
|
|
73
|
+
this.autocompleteSuggestion = signal("", ...ngDevMode ? [{ debugName: "autocompleteSuggestion" }] : /* istanbul ignore next */ []);
|
|
74
|
+
this.isDropdownOpened = signal(false, ...ngDevMode ? [{ debugName: "isDropdownOpened" }] : /* istanbul ignore next */ []);
|
|
75
|
+
this.actionsMenuId = `ui-prompt-actions-menu-${nextActionsMenuId++}`;
|
|
76
|
+
this.keepDropdownClosed = signal(false, ...ngDevMode ? [{ debugName: "keepDropdownClosed" }] : /* istanbul ignore next */ []);
|
|
77
|
+
this.isFieldHovered = signal(false, ...ngDevMode ? [{ debugName: "isFieldHovered" }] : /* istanbul ignore next */ []);
|
|
78
|
+
this.isFieldFocused = signal(false, ...ngDevMode ? [{ debugName: "isFieldFocused" }] : /* istanbul ignore next */ []);
|
|
79
|
+
this.composing = signal(false, ...ngDevMode ? [{ debugName: "composing" }] : /* istanbul ignore next */ []);
|
|
80
|
+
this.compositionEndedAt = 0;
|
|
81
|
+
this.filteredDropdownItems = computed(() => {
|
|
82
|
+
const query = this.promptTextValue().trim().toLowerCase();
|
|
83
|
+
return this.dropdownItems().filter((item) => {
|
|
84
|
+
const label = item.label.toLowerCase();
|
|
85
|
+
return label !== query && (!query || label.includes(query));
|
|
86
|
+
});
|
|
87
|
+
}, ...ngDevMode ? [{ debugName: "filteredDropdownItems" }] : /* istanbul ignore next */ []);
|
|
88
|
+
this.itemsDropdownVisible = computed(() => this.isFieldFocused() && !this.keepDropdownClosed() && this.filteredDropdownItems().length > 0 && !this.isLocked(), ...ngDevMode ? [{ debugName: "itemsDropdownVisible" }] : /* istanbul ignore next */ []);
|
|
89
|
+
this.isContainerFocused = signal(false, ...ngDevMode ? [{ debugName: "isContainerFocused" }] : /* istanbul ignore next */ []);
|
|
90
|
+
this.isHighlighted = computed(() => this.isFieldHovered() || this.isContainerFocused(), ...ngDevMode ? [{ debugName: "isHighlighted" }] : /* istanbul ignore next */ []);
|
|
91
|
+
this.showFocusRing = computed(() => this.isHighlighted() && !this.loading(), ...ngDevMode ? [{ debugName: "showFocusRing" }] : /* istanbul ignore next */ []);
|
|
92
|
+
this.fileInputAccept = computed(() => this.actionTag()?.acceptedFileTypes ?? this.supportedFileTypes(), ...ngDevMode ? [{ debugName: "fileInputAccept" }] : /* istanbul ignore next */ []);
|
|
93
|
+
this.isLocked = computed(() => this.disabledState() || this.loading(), ...ngDevMode ? [{ debugName: "isLocked" }] : /* istanbul ignore next */ []);
|
|
94
|
+
this.visibleHelpText = computed(() => this.promptTextValue() && !this.autocompleteSuggestion() && !this.isLocked() ? this.helpText().trim() : "", ...ngDevMode ? [{ debugName: "visibleHelpText" }] : /* istanbul ignore next */ []);
|
|
95
|
+
this.actionTagIcon = computed(() => resolveIcon(this.actionTag()?.icon, "Plus"), ...ngDevMode ? [{ debugName: "actionTagIcon" }] : /* istanbul ignore next */ []);
|
|
96
|
+
this.actionTagMenuTrailingIcon = computed(() => resolveIcon(this.actionTag()?.menuTrailingIcon, "Plus"), ...ngDevMode ? [{ debugName: "actionTagMenuTrailingIcon" }] : /* istanbul ignore next */ []);
|
|
97
|
+
this.secondaryActionTagMenuTrailingIcon = computed(() => resolveIcon(this.secondaryActionTag()?.menuTrailingIcon, "Arrow-chevron-right-in-line"), ...ngDevMode ? [{ debugName: "secondaryActionTagMenuTrailingIcon" }] : /* istanbul ignore next */ []);
|
|
98
|
+
this.actionsMenuEntries = computed(() => {
|
|
99
|
+
const secondary = this.secondaryActionTag();
|
|
100
|
+
const action = this.actionTag();
|
|
101
|
+
const entries = [];
|
|
102
|
+
if (secondary) entries.push({
|
|
103
|
+
kind: "secondary",
|
|
104
|
+
tag: secondary,
|
|
105
|
+
trailingIcon: this.secondaryActionTagMenuTrailingIcon()
|
|
106
|
+
});
|
|
107
|
+
if (action) entries.push({
|
|
108
|
+
kind: "action",
|
|
109
|
+
tag: action,
|
|
110
|
+
trailingIcon: this.actionTagMenuTrailingIcon()
|
|
111
|
+
});
|
|
112
|
+
return entries.sort((a, b) => (a.tag.menuOrder ?? Infinity) - (b.tag.menuOrder ?? Infinity));
|
|
113
|
+
}, ...ngDevMode ? [{ debugName: "actionsMenuEntries" }] : /* istanbul ignore next */ []);
|
|
114
|
+
this.isActionsMenuOpen = computed(() => this.actionsPopover()?.isOpen() ?? false, ...ngDevMode ? [{ debugName: "isActionsMenuOpen" }] : /* istanbul ignore next */ []);
|
|
115
|
+
this.showActionsMenuTrigger = computed(() => this.collapseActionTags() && Boolean(this.actionTag() ?? this.secondaryActionTag()), ...ngDevMode ? [{ debugName: "showActionsMenuTrigger" }] : /* istanbul ignore next */ []);
|
|
116
|
+
this.hasContent = computed(() => Boolean(this.promptTextValue().trim()) || this.promptFilesList().length > 0, ...ngDevMode ? [{ debugName: "hasContent" }] : /* istanbul ignore next */ []);
|
|
117
|
+
this.canSubmit = computed(() => !this.isLocked() && !this.sendButtonDisabled() && this.hasContent(), ...ngDevMode ? [{ debugName: "canSubmit" }] : /* istanbul ignore next */ []);
|
|
118
|
+
this.isOverCharacterLimit = computed(() => this.promptTextValue().length > this.maxCharacters(), ...ngDevMode ? [{ debugName: "isOverCharacterLimit" }] : /* istanbul ignore next */ []);
|
|
119
|
+
this.announcedTextValue = toSignal(toObservable(computed(() => this.showCharacterCount() ? this.promptTextValue() : "")).pipe(debounceTime(CHARACTER_COUNT_ANNOUNCE_DEBOUNCE_MS)), { initialValue: "" });
|
|
120
|
+
this.characterCountAnnouncement = computed(() => {
|
|
121
|
+
if (!this.showCharacterCount()) return null;
|
|
122
|
+
const max = this.maxCharacters();
|
|
123
|
+
const remaining = max - this.announcedTextValue().length;
|
|
124
|
+
if (remaining < 0) return {
|
|
125
|
+
key: "PROMPT.CHARACTERS_OVER_LIMIT",
|
|
126
|
+
params: { count: -remaining }
|
|
127
|
+
};
|
|
128
|
+
if (remaining <= max * CHARACTER_COUNT_ANNOUNCE_THRESHOLD) return {
|
|
129
|
+
key: "PROMPT.CHARACTERS_REMAINING",
|
|
130
|
+
params: { count: remaining }
|
|
131
|
+
};
|
|
132
|
+
return null;
|
|
133
|
+
}, ...ngDevMode ? [{ debugName: "characterCountAnnouncement" }] : /* istanbul ignore next */ []);
|
|
134
|
+
this.destroyRef = inject(DestroyRef);
|
|
135
|
+
this.translationPipe = inject(UiTranslatePipe);
|
|
136
|
+
this.resetOnLock = effect(() => {
|
|
137
|
+
if (this.isLocked()) {
|
|
138
|
+
this.isDropdownOpened.set(false);
|
|
139
|
+
this.actionsPopover()?.close();
|
|
140
|
+
this.isFieldFocused.set(false);
|
|
141
|
+
this.isFieldHovered.set(false);
|
|
142
|
+
this.isContainerFocused.set(false);
|
|
143
|
+
this.autocompleteSuggestion.set("");
|
|
144
|
+
this.composing.set(false);
|
|
145
|
+
}
|
|
146
|
+
}, ...ngDevMode ? [{ debugName: "resetOnLock" }] : /* istanbul ignore next */ []);
|
|
147
|
+
this.fileDrop = viewChild("fileDropRef", ...ngDevMode ? [{ debugName: "fileDrop" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.tagDropdown = viewChild("tagDropdown", ...ngDevMode ? [{ debugName: "tagDropdown" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.fieldComponentRef = viewChild.required("textarea", ...ngDevMode ? [{ debugName: "fieldComponentRef" }] : /* istanbul ignore next */ []);
|
|
150
|
+
this.promptContainer = viewChild.required("promptContainerRef", ...ngDevMode ? [{ debugName: "promptContainer" }] : /* istanbul ignore next */ []);
|
|
151
|
+
this.actionsPopover = viewChild(PopoverDirective, ...ngDevMode ? [{ debugName: "actionsPopover" }] : /* istanbul ignore next */ []);
|
|
152
|
+
this.actionsMenu = viewChild("actionsMenu", ...ngDevMode ? [{ debugName: "actionsMenu" }] : /* istanbul ignore next */ []);
|
|
153
|
+
this.dropdownPositions = [{
|
|
154
|
+
originX: "start",
|
|
155
|
+
originY: "bottom",
|
|
156
|
+
overlayX: "start",
|
|
157
|
+
overlayY: "top"
|
|
158
|
+
}];
|
|
159
|
+
this.onChange = (_value) => {};
|
|
160
|
+
this.onTouch = () => {};
|
|
161
|
+
}
|
|
162
|
+
get disabled() {
|
|
163
|
+
return this.disabledState();
|
|
164
|
+
}
|
|
165
|
+
set disabled(value) {
|
|
166
|
+
this.setDisabledState(value);
|
|
167
|
+
}
|
|
168
|
+
ngOnInit() {
|
|
169
|
+
this.initTags();
|
|
170
|
+
}
|
|
171
|
+
ngAfterViewInit() {
|
|
172
|
+
setTimeout(() => {
|
|
173
|
+
this.syncInputChange();
|
|
174
|
+
}, 0);
|
|
175
|
+
}
|
|
176
|
+
async uploadFile(event) {
|
|
177
|
+
const files = event.currentTarget.files;
|
|
178
|
+
if (files?.length) {
|
|
179
|
+
this.promptFilesList.update((list) => {
|
|
180
|
+
list.push(files.item(0));
|
|
181
|
+
return list;
|
|
182
|
+
});
|
|
183
|
+
this.emitValue();
|
|
184
|
+
await this.updateFileMenu();
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
sendPromptData() {
|
|
188
|
+
if (!this.canSubmit()) return;
|
|
189
|
+
this.promptData.emit({
|
|
190
|
+
text: this.promptTextValue() || "",
|
|
191
|
+
files: this.promptFilesList()
|
|
192
|
+
});
|
|
193
|
+
if (this.autoClear()) this.clearPromptData();
|
|
194
|
+
}
|
|
195
|
+
selectedMenuOption(menuOptionValue) {
|
|
196
|
+
const updatedConfig = this.fileListMenuConfig().filter((menu) => menu.value !== menuOptionValue);
|
|
197
|
+
const updatedFileList = this.promptFilesList().filter((file) => file.name !== menuOptionValue);
|
|
198
|
+
this.promptFilesList.set(updatedFileList);
|
|
199
|
+
this.fileListMenuConfig.set(updatedConfig);
|
|
200
|
+
}
|
|
201
|
+
selectTag(tag, event) {
|
|
202
|
+
if (this.isLocked()) return;
|
|
203
|
+
event.stopPropagation();
|
|
204
|
+
event.preventDefault();
|
|
205
|
+
this.isDropdownOpened.set(false);
|
|
206
|
+
this.promptTextValue.set(tag.label);
|
|
207
|
+
this.autocompleteSuggestion.set(`${tag.label} ${tag.autocomplete}`);
|
|
208
|
+
this.fieldComponentRef().field.nativeElement.focus();
|
|
209
|
+
this.onTouch();
|
|
210
|
+
}
|
|
211
|
+
onTextareaTab(event) {
|
|
212
|
+
if (this.isLocked()) return;
|
|
213
|
+
if (this.autocompleteSuggestion()) {
|
|
214
|
+
event.preventDefault();
|
|
215
|
+
this.promptTextValue.set(this.autocompleteSuggestion());
|
|
216
|
+
this.autocompleteSuggestion.set("");
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
onTextareaEnter(event) {
|
|
220
|
+
if (event.isComposing || this.composing() || Date.now() - this.compositionEndedAt < IME_COMMIT_GRACE_MS) return;
|
|
221
|
+
event.preventDefault();
|
|
222
|
+
this.sendPromptData();
|
|
223
|
+
}
|
|
224
|
+
dropdownOutsideClick() {
|
|
225
|
+
this.isDropdownOpened.set(false);
|
|
226
|
+
}
|
|
227
|
+
onFieldBlur() {
|
|
228
|
+
this.isFieldFocused.set(false);
|
|
229
|
+
}
|
|
230
|
+
onContainerFocusIn() {
|
|
231
|
+
this.isContainerFocused.set(true);
|
|
232
|
+
}
|
|
233
|
+
onContainerFocusOut(event) {
|
|
234
|
+
const next = event.relatedTarget;
|
|
235
|
+
if (next instanceof Node && this.promptContainer().nativeElement.contains(next)) return;
|
|
236
|
+
this.isContainerFocused.set(false);
|
|
237
|
+
}
|
|
238
|
+
itemsDropdownOutsideClick(event) {
|
|
239
|
+
if (this.promptContainer().nativeElement.contains(event.target)) return;
|
|
240
|
+
this.isFieldFocused.set(false);
|
|
241
|
+
this.dropdownClosed.emit();
|
|
242
|
+
}
|
|
243
|
+
closeItemsDropdown() {
|
|
244
|
+
this.keepDropdownClosed.set(true);
|
|
245
|
+
this.dropdownClosed.emit();
|
|
246
|
+
}
|
|
247
|
+
onTextareaEscape(event) {
|
|
248
|
+
if (this.itemsDropdownVisible()) {
|
|
249
|
+
event.stopPropagation();
|
|
250
|
+
this.closeItemsDropdown();
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
selectDropdownItem(item, event) {
|
|
254
|
+
if (this.isLocked()) return;
|
|
255
|
+
event.stopPropagation();
|
|
256
|
+
event.preventDefault();
|
|
257
|
+
this.keepDropdownClosed.set(true);
|
|
258
|
+
this.promptTextValue.set(item.label);
|
|
259
|
+
this.autocompleteSuggestion.set("");
|
|
260
|
+
this.fieldComponentRef().field.nativeElement.focus();
|
|
261
|
+
this.dropdownItemSelected.emit(item);
|
|
262
|
+
this.emitValue();
|
|
263
|
+
}
|
|
264
|
+
toggleDropdown() {
|
|
265
|
+
if (this.isLocked()) return;
|
|
266
|
+
this.isDropdownOpened.set(!this.isDropdownOpened());
|
|
267
|
+
}
|
|
268
|
+
focusTagDropdown() {
|
|
269
|
+
setTimeout(() => {
|
|
270
|
+
this.tagDropdown()?.nativeElement.focus();
|
|
271
|
+
}, 300);
|
|
272
|
+
}
|
|
273
|
+
syncInputChange() {
|
|
274
|
+
if (!this.fieldComponentRef()?.field?.nativeElement) return;
|
|
275
|
+
const textarea = this.fieldComponentRef().field.nativeElement;
|
|
276
|
+
fromEvent(textarea, "input").pipe(map((event) => event.target.value), tap((value) => {
|
|
277
|
+
this.promptTextValue.set(value);
|
|
278
|
+
this.keepDropdownClosed.set(false);
|
|
279
|
+
if (this.autocompleteSuggestion()) this.autocompleteSuggestion.set("");
|
|
280
|
+
}), debounceTime(INPUT_EMIT_DEBOUNCE_MS), tap(() => this.emitValue()), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
281
|
+
fromEvent(textarea, "compositionstart").pipe(tap(() => this.composing.set(true)), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
282
|
+
fromEvent(textarea, "compositionend").pipe(tap(() => {
|
|
283
|
+
this.composing.set(false);
|
|
284
|
+
this.compositionEndedAt = Date.now();
|
|
285
|
+
}), takeUntilDestroyed(this.destroyRef)).subscribe();
|
|
286
|
+
}
|
|
287
|
+
initTags() {
|
|
288
|
+
if (!this.tags()?.length) return;
|
|
289
|
+
if (this.tags().length <= 5) {
|
|
290
|
+
this.tagsVisible.set(this.tags());
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
this.tagsVisible.set(this.tags().slice(0, 5));
|
|
294
|
+
this.tagsInDropdown.set(this.tags().slice(5));
|
|
295
|
+
}
|
|
296
|
+
async updateFileMenu() {
|
|
297
|
+
const menuConfig = [];
|
|
298
|
+
const tooltip = await firstValueFrom(this.translationPipe.transform("COMMON.DELETE"));
|
|
299
|
+
this.promptFilesList().forEach((file) => {
|
|
300
|
+
menuConfig.push({
|
|
301
|
+
label: file.name,
|
|
302
|
+
value: file.name,
|
|
303
|
+
icon: "Delete",
|
|
304
|
+
tooltipText: tooltip
|
|
305
|
+
});
|
|
306
|
+
});
|
|
307
|
+
this.fileListMenuConfig.set(menuConfig);
|
|
308
|
+
}
|
|
309
|
+
clearPromptData() {
|
|
310
|
+
this.promptTextValue.set("");
|
|
311
|
+
this.promptFilesList.set([]);
|
|
312
|
+
this.fileListMenuConfig.set([]);
|
|
313
|
+
}
|
|
314
|
+
writeValue(value) {
|
|
315
|
+
this.promptTextValue.set(value?.text ?? "");
|
|
316
|
+
this.promptFilesList.set(value?.files ?? []);
|
|
317
|
+
}
|
|
318
|
+
registerOnChange(fn) {
|
|
319
|
+
this.onChange = fn;
|
|
320
|
+
}
|
|
321
|
+
registerOnTouched(fn) {
|
|
322
|
+
this.onTouch = fn;
|
|
323
|
+
}
|
|
324
|
+
setDisabledState(isDisabled) {
|
|
325
|
+
this.disabledState.set(isDisabled);
|
|
326
|
+
}
|
|
327
|
+
async onFileSelected(event) {
|
|
328
|
+
if (this.isLocked()) return;
|
|
329
|
+
if (this.actionTag()) this.handleActionTagFile(event);
|
|
330
|
+
else await this.uploadFile(event);
|
|
331
|
+
}
|
|
332
|
+
onActionTagPress() {
|
|
333
|
+
if (this.isLocked() || this.actionTag()?.disabled) return;
|
|
334
|
+
this.fileDrop()?.nativeElement.click();
|
|
335
|
+
}
|
|
336
|
+
onSecondaryActionTagPress() {
|
|
337
|
+
if (this.isLocked() || this.secondaryActionTag()?.disabled) return;
|
|
338
|
+
this.secondaryActionTagPress.emit();
|
|
339
|
+
}
|
|
340
|
+
closeActionsMenu() {
|
|
341
|
+
this.actionsPopover()?.close();
|
|
342
|
+
}
|
|
343
|
+
onActionsMenuKeydown(event) {
|
|
344
|
+
const items = this.actionsMenuItems();
|
|
345
|
+
const current = items.indexOf(document.activeElement);
|
|
346
|
+
const focusAt = (index) => {
|
|
347
|
+
event.preventDefault();
|
|
348
|
+
items[(index + items.length) % items.length]?.focus();
|
|
349
|
+
};
|
|
350
|
+
switch (event.key) {
|
|
351
|
+
case "ArrowDown":
|
|
352
|
+
focusAt(current + 1);
|
|
353
|
+
break;
|
|
354
|
+
case "ArrowUp":
|
|
355
|
+
focusAt(current - 1);
|
|
356
|
+
break;
|
|
357
|
+
case "Home":
|
|
358
|
+
focusAt(0);
|
|
359
|
+
break;
|
|
360
|
+
case "End":
|
|
361
|
+
focusAt(items.length - 1);
|
|
362
|
+
break;
|
|
363
|
+
case "Escape":
|
|
364
|
+
event.preventDefault();
|
|
365
|
+
event.stopPropagation();
|
|
366
|
+
this.closeActionsMenu();
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
selectActionsMenuEntry(entry, event) {
|
|
370
|
+
if (entry.kind === "action") this.selectActionTagFromMenu(event);
|
|
371
|
+
else this.selectSecondaryActionTagFromMenu(event);
|
|
372
|
+
}
|
|
373
|
+
selectActionTagFromMenu(event) {
|
|
374
|
+
event.preventDefault();
|
|
375
|
+
if (this.actionTag()?.disabled) return;
|
|
376
|
+
this.closeActionsMenu();
|
|
377
|
+
this.onActionTagPress();
|
|
378
|
+
}
|
|
379
|
+
selectSecondaryActionTagFromMenu(event) {
|
|
380
|
+
event.preventDefault();
|
|
381
|
+
if (this.secondaryActionTag()?.disabled) return;
|
|
382
|
+
this.closeActionsMenu();
|
|
383
|
+
this.onSecondaryActionTagPress();
|
|
384
|
+
}
|
|
385
|
+
actionsMenuItems() {
|
|
386
|
+
const menu = this.actionsMenu()?.nativeElement;
|
|
387
|
+
return menu ? Array.from(menu.querySelectorAll("[role=\"menuitem\"]:not([aria-disabled=\"true\"])")) : [];
|
|
388
|
+
}
|
|
389
|
+
handleActionTagFile(event) {
|
|
390
|
+
const inputEl = event.currentTarget;
|
|
391
|
+
const file = inputEl.files?.item(0) ?? null;
|
|
392
|
+
if (file) this.actionTagFileSelected.emit(file);
|
|
393
|
+
inputEl.value = "";
|
|
394
|
+
}
|
|
395
|
+
emitValue() {
|
|
396
|
+
this.onChange({
|
|
397
|
+
text: this.promptTextValue() || "",
|
|
398
|
+
files: this.promptFilesList()
|
|
399
|
+
});
|
|
400
|
+
this.onTouch();
|
|
401
|
+
}
|
|
402
|
+
static {
|
|
403
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
404
|
+
minVersion: "12.0.0",
|
|
405
|
+
version: "22.2.4",
|
|
406
|
+
ngImport: i0,
|
|
407
|
+
type: PromptComponent,
|
|
408
|
+
deps: [],
|
|
409
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
static {
|
|
413
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
414
|
+
minVersion: "17.0.0",
|
|
415
|
+
version: "22.2.4",
|
|
416
|
+
type: PromptComponent,
|
|
417
|
+
isStandalone: true,
|
|
418
|
+
selector: "ui-prompt",
|
|
419
|
+
inputs: {
|
|
420
|
+
tags: {
|
|
421
|
+
classPropertyName: "tags",
|
|
422
|
+
publicName: "tags",
|
|
423
|
+
isSignal: true,
|
|
424
|
+
isRequired: false,
|
|
425
|
+
transformFunction: null
|
|
426
|
+
},
|
|
427
|
+
actionTag: {
|
|
428
|
+
classPropertyName: "actionTag",
|
|
429
|
+
publicName: "actionTag",
|
|
430
|
+
isSignal: true,
|
|
431
|
+
isRequired: false,
|
|
432
|
+
transformFunction: null
|
|
433
|
+
},
|
|
434
|
+
secondaryActionTag: {
|
|
435
|
+
classPropertyName: "secondaryActionTag",
|
|
436
|
+
publicName: "secondaryActionTag",
|
|
437
|
+
isSignal: true,
|
|
438
|
+
isRequired: false,
|
|
439
|
+
transformFunction: null
|
|
440
|
+
},
|
|
441
|
+
collapseActionTags: {
|
|
442
|
+
classPropertyName: "collapseActionTags",
|
|
443
|
+
publicName: "collapseActionTags",
|
|
444
|
+
isSignal: true,
|
|
445
|
+
isRequired: false,
|
|
446
|
+
transformFunction: null
|
|
447
|
+
},
|
|
448
|
+
maxCharacters: {
|
|
449
|
+
classPropertyName: "maxCharacters",
|
|
450
|
+
publicName: "maxCharacters",
|
|
451
|
+
isSignal: true,
|
|
452
|
+
isRequired: false,
|
|
453
|
+
transformFunction: null
|
|
454
|
+
},
|
|
455
|
+
supportedFileTypes: {
|
|
456
|
+
classPropertyName: "supportedFileTypes",
|
|
457
|
+
publicName: "supportedFileTypes",
|
|
458
|
+
isSignal: true,
|
|
459
|
+
isRequired: false,
|
|
460
|
+
transformFunction: null
|
|
461
|
+
},
|
|
462
|
+
autoClear: {
|
|
463
|
+
classPropertyName: "autoClear",
|
|
464
|
+
publicName: "autoClear",
|
|
465
|
+
isSignal: true,
|
|
466
|
+
isRequired: false,
|
|
467
|
+
transformFunction: null
|
|
468
|
+
},
|
|
469
|
+
showSendButton: {
|
|
470
|
+
classPropertyName: "showSendButton",
|
|
471
|
+
publicName: "showSendButton",
|
|
472
|
+
isSignal: true,
|
|
473
|
+
isRequired: false,
|
|
474
|
+
transformFunction: null
|
|
475
|
+
},
|
|
476
|
+
sendButtonDisabled: {
|
|
477
|
+
classPropertyName: "sendButtonDisabled",
|
|
478
|
+
publicName: "sendButtonDisabled",
|
|
479
|
+
isSignal: true,
|
|
480
|
+
isRequired: false,
|
|
481
|
+
transformFunction: null
|
|
482
|
+
},
|
|
483
|
+
enableFileUpload: {
|
|
484
|
+
classPropertyName: "enableFileUpload",
|
|
485
|
+
publicName: "enableFileUpload",
|
|
486
|
+
isSignal: true,
|
|
487
|
+
isRequired: false,
|
|
488
|
+
transformFunction: null
|
|
489
|
+
},
|
|
490
|
+
loading: {
|
|
491
|
+
classPropertyName: "loading",
|
|
492
|
+
publicName: "loading",
|
|
493
|
+
isSignal: true,
|
|
494
|
+
isRequired: false,
|
|
495
|
+
transformFunction: null
|
|
496
|
+
},
|
|
497
|
+
placeholder: {
|
|
498
|
+
classPropertyName: "placeholder",
|
|
499
|
+
publicName: "placeholder",
|
|
500
|
+
isSignal: true,
|
|
501
|
+
isRequired: false,
|
|
502
|
+
transformFunction: null
|
|
503
|
+
},
|
|
504
|
+
errorMessage: {
|
|
505
|
+
classPropertyName: "errorMessage",
|
|
506
|
+
publicName: "errorMessage",
|
|
507
|
+
isSignal: true,
|
|
508
|
+
isRequired: false,
|
|
509
|
+
transformFunction: null
|
|
510
|
+
},
|
|
511
|
+
dropdownItems: {
|
|
512
|
+
classPropertyName: "dropdownItems",
|
|
513
|
+
publicName: "dropdownItems",
|
|
514
|
+
isSignal: true,
|
|
515
|
+
isRequired: false,
|
|
516
|
+
transformFunction: null
|
|
517
|
+
},
|
|
518
|
+
dropdownHeading: {
|
|
519
|
+
classPropertyName: "dropdownHeading",
|
|
520
|
+
publicName: "dropdownHeading",
|
|
521
|
+
isSignal: true,
|
|
522
|
+
isRequired: false,
|
|
523
|
+
transformFunction: null
|
|
524
|
+
},
|
|
525
|
+
showDropdownClose: {
|
|
526
|
+
classPropertyName: "showDropdownClose",
|
|
527
|
+
publicName: "showDropdownClose",
|
|
528
|
+
isSignal: true,
|
|
529
|
+
isRequired: false,
|
|
530
|
+
transformFunction: null
|
|
531
|
+
},
|
|
532
|
+
showCharacterCount: {
|
|
533
|
+
classPropertyName: "showCharacterCount",
|
|
534
|
+
publicName: "showCharacterCount",
|
|
535
|
+
isSignal: true,
|
|
536
|
+
isRequired: false,
|
|
537
|
+
transformFunction: null
|
|
538
|
+
},
|
|
539
|
+
helpText: {
|
|
540
|
+
classPropertyName: "helpText",
|
|
541
|
+
publicName: "helpText",
|
|
542
|
+
isSignal: true,
|
|
543
|
+
isRequired: false,
|
|
544
|
+
transformFunction: null
|
|
545
|
+
},
|
|
546
|
+
disabled: {
|
|
547
|
+
classPropertyName: "disabled",
|
|
548
|
+
publicName: "disabled",
|
|
549
|
+
isSignal: false,
|
|
550
|
+
isRequired: false,
|
|
551
|
+
transformFunction: booleanAttribute
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
outputs: {
|
|
555
|
+
promptData: "promptData",
|
|
556
|
+
actionTagFileSelected: "actionTagFileSelected",
|
|
557
|
+
secondaryActionTagPress: "secondaryActionTagPress",
|
|
558
|
+
dropdownItemSelected: "dropdownItemSelected",
|
|
559
|
+
dropdownClosed: "dropdownClosed"
|
|
560
|
+
},
|
|
561
|
+
providers: [UiTranslatePipe, {
|
|
562
|
+
provide: NG_VALUE_ACCESSOR,
|
|
563
|
+
useExisting: forwardRef(() => PromptComponent),
|
|
564
|
+
multi: true
|
|
565
|
+
}],
|
|
566
|
+
viewQueries: [
|
|
567
|
+
{
|
|
568
|
+
propertyName: "fileDrop",
|
|
569
|
+
first: true,
|
|
570
|
+
predicate: ["fileDropRef"],
|
|
571
|
+
descendants: true,
|
|
572
|
+
isSignal: true
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
propertyName: "tagDropdown",
|
|
576
|
+
first: true,
|
|
577
|
+
predicate: ["tagDropdown"],
|
|
578
|
+
descendants: true,
|
|
579
|
+
isSignal: true
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
propertyName: "fieldComponentRef",
|
|
583
|
+
first: true,
|
|
584
|
+
predicate: ["textarea"],
|
|
585
|
+
descendants: true,
|
|
586
|
+
isSignal: true
|
|
587
|
+
},
|
|
588
|
+
{
|
|
589
|
+
propertyName: "promptContainer",
|
|
590
|
+
first: true,
|
|
591
|
+
predicate: ["promptContainerRef"],
|
|
592
|
+
descendants: true,
|
|
593
|
+
isSignal: true
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
propertyName: "actionsPopover",
|
|
597
|
+
first: true,
|
|
598
|
+
predicate: PopoverDirective,
|
|
599
|
+
descendants: true,
|
|
600
|
+
isSignal: true
|
|
601
|
+
},
|
|
602
|
+
{
|
|
603
|
+
propertyName: "actionsMenu",
|
|
604
|
+
first: true,
|
|
605
|
+
predicate: ["actionsMenu"],
|
|
606
|
+
descendants: true,
|
|
607
|
+
isSignal: true
|
|
608
|
+
}
|
|
609
|
+
],
|
|
610
|
+
ngImport: i0,
|
|
611
|
+
template: "<ng-container>\n <div\n class=\"prompt-container\"\n [class.has-error]=\"!!errorMessage()\"\n [class.disabled]=\"isLocked()\"\n [attr.aria-disabled]=\"isLocked()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n cdkOverlayOrigin\n #promptOrigin=\"cdkOverlayOrigin\"\n #promptContainerRef\n [class.prompt-container-focused]=\"showFocusRing()\"\n (focusin)=\"onContainerFocusIn()\"\n (focusout)=\"onContainerFocusOut($event)\"\n >\n @if (loading()) {\n <div class=\"prompt-loading\" aria-hidden=\"true\" animate.enter=\"cnp-prompt-fade-in\">\n <ui-skeleton [theme]=\"{ width: '100%', height: '20px', margin: '0' }\"></ui-skeleton>\n <ui-skeleton [theme]=\"{ width: '30%', height: '20px', margin: '0' }\"></ui-skeleton>\n </div>\n }\n <div class=\"prompt-autocomplete\" [hidden]=\"loading()\">\n <textarea tabindex=\"-1\" class=\"ghost\" id=\"autocomplete\" [value]=\"autocompleteSuggestion()\" readonly></textarea>\n @if (visibleHelpText(); as help) {\n <!-- The mirror repeats the typed text invisibly so the hint lands right after its last character. -->\n <div class=\"ghost prompt-help-text\" aria-hidden=\"true\">\n <span class=\"prompt-help-text-mirror\">{{ promptTextValue() }}</span\n ><span class=\"prompt-help-text-hint\">{{ ' ' + help }}</span>\n </div>\n }\n\n @let showIcon = !isFieldFocused() && !promptTextValue();\n @if (showIcon) {\n <ui-icon\n class=\"prompt-icon\"\n animate.enter=\"cnp-prompt-icon-in\"\n animate.leave=\"cnp-prompt-icon-out\"\n [color]=\"'inherit'\"\n [class.hovered]=\"isFieldHovered()\"\n [name]=\"'Sparkle-in-line'\"\n ></ui-icon>\n }\n <!-- `keydown.enter` matches unmodified Enter only; Shift+Enter resolves to `shift.enter`\n and falls through to a newline. Do not add a shiftKey check. -->\n <ui-field\n #textarea\n class=\"prompt-text\"\n [class.show-icon]=\"showIcon\"\n role=\"input\"\n [showBottomContent]=\"false\"\n [borderless]=\"true\"\n [type]=\"'multi-line'\"\n [autosizableTextarea]=\"true\"\n [maxCharacters]=\"maxCharacters()\"\n [placeholder]=\"showIcon ? placeholder() || ('PROMPT.ASK_ANYTHING' | uiTranslate | async)! : ''\"\n [value]=\"promptTextValue() || ''\"\n [hasTextAreaCounter]=\"false\"\n [ariaDescribedby]=\"visibleHelpText()\"\n [disabled]=\"disabled\"\n (mouseenter)=\"isFieldHovered.set(true)\"\n (mouseleave)=\"isFieldHovered.set(false)\"\n (focusin)=\"isFieldFocused.set(true)\"\n (fieldBlur)=\"onFieldBlur()\"\n (keydown.tab)=\"onTextareaTab($event)\"\n (keydown.enter)=\"onTextareaEnter($event)\"\n (keydown.escape)=\"onTextareaEscape($event)\"\n ></ui-field>\n </div>\n <div class=\"prompt-footer flex-container\">\n <div class=\"flex-container\">\n @if (showActionsMenuTrigger()) {\n <ui-button\n [uiPopover]=\"actionsMenuTemplate\"\n [popoverTrigger]=\"'click'\"\n [popoverCardSize]=\"'small'\"\n [popoverAlign]=\"'start'\"\n [popoverOffset]=\"8\"\n [popoverAriaLabel]=\"('COMMON.ADD' | uiTranslate | async)!\"\n [uiPopoverDisabled]=\"isLocked()\"\n [variant]=\"'icon-button'\"\n [iconName]=\"isActionsMenuOpen() ? 'Close' : 'Plus'\"\n [tooltip]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [ariaExpanded]=\"isActionsMenuOpen()\"\n [ariaControls]=\"isActionsMenuOpen() ? actionsMenuId : undefined\"\n [disabled]=\"isLocked()\"\n ></ui-button>\n\n <ng-template #actionsMenuTemplate>\n <div\n class=\"actions-menu\"\n role=\"menu\"\n #actionsMenu\n [id]=\"actionsMenuId\"\n (keydown)=\"onActionsMenuKeydown($event)\"\n >\n @for (entry of actionsMenuEntries(); track entry.kind) {\n <div\n class=\"actions-menu-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"entry.tag.ariaLabel ?? entry.tag.label\"\n [attr.aria-disabled]=\"entry.tag.disabled ? 'true' : null\"\n (click)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.enter)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.space)=\"selectActionsMenuEntry(entry, $event)\"\n >\n @if (entry.tag.icon) {\n <ui-icon class=\"actions-menu-item-icon\" [name]=\"entry.tag.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"actions-menu-item-label\">{{ entry.tag.label }}</span>\n @if (entry.trailingIcon) {\n <ui-icon\n class=\"actions-menu-item-trailing\"\n [name]=\"entry.trailingIcon\"\n [color]=\"'inherit'\"\n ></ui-icon>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n\n @if (actionTag(); as at) {\n @if (!collapseActionTags()) {\n <ui-tag\n [label]=\"at.label\"\n [icon]=\"actionTagIcon()\"\n [ariaLabel]=\"at.ariaLabel ?? at.label\"\n [isDisabled]=\"isLocked() || !!at.disabled\"\n (press)=\"onActionTagPress()\"\n ></ui-tag>\n }\n } @else if (enableFileUpload()) {\n <ui-button\n [variant]=\"'icon-button'\"\n [tooltip]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [iconName]=\"'Plus'\"\n [disabled]=\"isLocked()\"\n (click)=\"fileDrop()?.nativeElement?.click()\"\n ></ui-button>\n\n @if (promptFilesList().length) {\n <div class=\"menu\" animate.enter=\"cnp-prompt-pop-in\">\n <ui-badge\n [notificationsAmount]=\"promptFilesList().length\"\n [variant]=\"'notification'\"\n class=\"menu-badge\"\n ></ui-badge>\n <ui-overflow-menu\n [matTooltip]=\"('PROMPT.FILES' | uiTranslate | async)!\"\n [matTooltipPosition]=\"'above'\"\n [buttonSize]=\"'medium'\"\n [iconTrigger]=\"'Document'\"\n [buttonVariant]=\"'ghost'\"\n [buttons]=\"fileListMenuConfig()\"\n [isDynamicMenu]=\"true\"\n [withRemovableOption]=\"true\"\n (selectItem)=\"selectedMenuOption($event)\"\n ></ui-overflow-menu>\n </div>\n }\n }\n\n @if (secondaryActionTag(); as sat) {\n @if (!collapseActionTags()) {\n <ui-tag\n class=\"prompt-secondary-action-tag\"\n [label]=\"sat.label\"\n [icon]=\"sat.icon ?? ''\"\n [ariaLabel]=\"sat.ariaLabel ?? sat.label\"\n [isDisabled]=\"isLocked() || !!sat.disabled\"\n (press)=\"onSecondaryActionTagPress()\"\n ></ui-tag>\n }\n }\n\n @if (actionTag() || enableFileUpload()) {\n <input\n data-testid=\"prompt-file-input\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDropRef\n type=\"file\"\n id=\"file-upload\"\n [accept]=\"fileInputAccept()\"\n [disabled]=\"isLocked()\"\n (change)=\"onFileSelected($event)\"\n />\n }\n </div>\n\n @if (tags()?.length && !promptTextValue()) {\n <div class=\"flex-container carousel\" animate.enter=\"cnp-prompt-row-in\">\n <div class=\"tag-container flex-container\" role=\"list\" #tagsScrollContainer>\n @for (tag of tagsVisible(); track tag) {\n <ui-tag\n [label]=\"tag.label\"\n role=\"listitem\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"isLocked()\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n ></ui-tag>\n }\n\n @if (tagsInDropdown().length) {\n <ui-button\n class=\"view-more\"\n variant=\"text-inline\"\n [label]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [ariaLabel]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [size]=\"'medium'\"\n [disabled]=\"isLocked()\"\n (click)=\"toggleDropdown()\"\n (keydown.enter)=\"focusTagDropdown()\"\n cdkOverlayOrigin\n #dropdownTrigger=\"cdkOverlayOrigin\"\n ></ui-button>\n }\n </div>\n\n <div class=\"flex-container\">\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Scroll left button'\"\n [iconName]=\"'Arrow-chevron-left-in-line'\"\n [disabled]=\"isLocked() || tagsScrollContainer.scrollLeft === 0\"\n (click)=\"tagsScrollContainer.scrollBy({ left: -100, behavior: 'smooth' })\"\n ></ui-button>\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Arrow-chevron-right-in-line'\"\n [ariaLabel]=\"'Scroll right button'\"\n [disabled]=\"\n isLocked() ||\n tagsScrollContainer.scrollLeft + tagsScrollContainer.clientWidth >= tagsScrollContainer.scrollWidth\n \"\n (click)=\"tagsScrollContainer.scrollBy({ left: 100, behavior: 'smooth' })\"\n ></ui-button>\n </div>\n </div>\n }\n\n @if (showCharacterCount()) {\n <span class=\"prompt-character-count\" [class.over-limit]=\"isOverCharacterLimit()\"\n >{{ promptTextValue().length }} / {{ maxCharacters() }}</span\n >\n <span class=\"prompt-character-count-status\" aria-live=\"polite\">\n @if (characterCountAnnouncement(); as announcement) {\n {{ announcement.key | uiTranslate: announcement.params | async }}\n }\n </span>\n }\n\n @if (showSendButton()) {\n <ui-button\n class=\"send-button\"\n animate.enter=\"cnp-prompt-pop-in\"\n [variant]=\"'secondary'\"\n [iconName]=\"'Arrow-up-in-line'\"\n [tooltip]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n [disabled]=\"!canSubmit()\"\n (click)=\"sendPromptData()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"prompt-projected-footer\">\n <ng-content select=\"[promptFooter]\"></ng-content>\n </div>\n </div>\n\n @if (errorMessage()) {\n <div class=\"prompt-error\" animate.enter=\"cnp-prompt-error-in\">\n <ui-icon [name]=\"'Error'\" color=\"red\"></ui-icon>\n <span>{{ errorMessage() }}</span>\n </div>\n }\n\n <!-- Dropdown for hidden tags -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpened() && !isLocked()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"dropdownOutsideClick()\"\n >\n <div class=\"dropdown-container\" role=\"list\" #tagDropdown tabindex=\"0\" animate.enter=\"cnp-prompt-dropdown-in\">\n @for (tag of tagsInDropdown(); track tag) {\n <div\n class=\"dropdown-tag\"\n tabindex=\"0\"\n [attr.aria-label]=\"tag.label\"\n role=\"listitem\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n >\n {{ tag.label }}\n </div>\n }\n </div>\n </ng-template>\n\n <!-- Built-in items dropdown (UI-877) — opens on focus, typing filters by label -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"itemsDropdownVisible()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"itemsDropdownOutsideClick($event)\"\n >\n <div\n class=\"dropdown-container custom-dropdown-container\"\n animate.enter=\"cnp-prompt-dropdown-in\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (dropdownHeading() || showDropdownClose()) {\n <div class=\"dropdown-header\">\n @if (dropdownHeading()) {\n <span class=\"dropdown-heading\">{{ dropdownHeading() }}</span>\n }\n @if (showDropdownClose()) {\n <ui-button\n class=\"dropdown-close\"\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Close-in-line'\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"closeItemsDropdown()\"\n ></ui-button>\n }\n </div>\n }\n <div role=\"list\">\n @for (item of filteredDropdownItems(); track item.id) {\n <div\n class=\"dropdown-tag dropdown-item\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.label\"\n (click)=\"selectDropdownItem(item, $event)\"\n (keydown.enter)=\"selectDropdownItem(item, $event)\"\n (keydown.space)=\"selectDropdownItem(item, $event)\"\n >\n @if (item.icon) {\n <ui-icon class=\"dropdown-item-icon\" [name]=\"item.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"dropdown-item-label\">{{ item.label }}</span>\n <ui-icon class=\"dropdown-item-chevron\" [name]=\"'Arrow-chevron-right-in-line'\" [color]=\"'inherit'\"></ui-icon>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ng-container>\n",
|
|
612
|
+
styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host ::ng-deep ui-field.prompt-text>mat-form-field{vertical-align:top}:host ::ng-deep ui-field.prompt-text .mat-mdc-text-field-wrapper{border-radius:10px!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{background:transparent}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{padding-bottom:0!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper textarea{max-height:220px!important}:host ::ng-deep ui-button.send-button .rounded-icon .mdc-button{width:48px!important;height:48px!important}:host ::ng-deep ui-overflow-menu button.mat-mdc-unelevated-button.ghost.light-theme.only-icon{border:none}.prompt-container{border:1px solid #919191;border-radius:10px;background-color:#fff;outline:0 solid transparent;outline-offset:-2px;transition:border-color .18s cubic-bezier(.2,0,0,1),outline-color .18s cubic-bezier(.2,0,0,1),outline-width .12s cubic-bezier(.2,0,0,1);--ui-prompt-ring: inset 0 0 0 2px transparent}.prompt-container:after{content:\"\";position:absolute;z-index:1;inset:-1px;border-radius:inherit;box-shadow:var(--ui-prompt-ring);pointer-events:none;transition:box-shadow .18s cubic-bezier(.2,0,0,1)}.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px #000000;border:1px solid black;outline:1px solid black}.prompt-container.disabled{border:1px solid #d3d3d3}.prompt-container.disabled.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px transparent;outline-width:0}.prompt-container.disabled .prompt-icon{color:#d3d3d3}ui-field.prompt-text{transition:padding-left .12s cubic-bezier(.2,0,0,1)}ui-field.show-icon{padding-left:24px}.prompt-icon{position:absolute;top:14px;left:16px;color:#666;transition:color .12s cubic-bezier(.2,0,0,1)}.prompt-icon.hovered{color:#000}.dropdown-container{width:100%}.custom-dropdown-container{overflow:hidden;background-color:#fff;border-radius:0 0 8px 8px;box-shadow:0 8px 16px #00000014}.dropdown-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px}.dropdown-heading{font-weight:700}.dropdown-close{margin-left:auto}.dropdown-item{display:flex;gap:12px;align-items:center}.dropdown-item-icon,.dropdown-item-chevron{flex-shrink:0}.dropdown-item-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-tag{padding:16px;background-color:#fff;transition:background-color .12s cubic-bezier(.2,0,0,1)}.dropdown-tag:hover,.dropdown-tag:focus{background-color:#fff2fc;cursor:pointer}.carousel{flex-grow:1;min-width:0}.tag-container{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tag-container::-webkit-scrollbar{display:none}.tag-container{margin:0 8px}.actions-menu{min-width:228px;margin:-8px}.actions-menu-item{display:flex;gap:12px;align-items:center;padding:8px;border-radius:8px;cursor:pointer;transition:background-color .12s cubic-bezier(.2,0,0,1)}.actions-menu-item:hover,.actions-menu-item:focus-visible{background-color:#fff2fc}.actions-menu-item[aria-disabled=true]{color:#d3d3d3;background-color:transparent;cursor:default}.actions-menu-item-icon,.actions-menu-item-trailing{flex-shrink:0}.actions-menu-item-label{flex:1;white-space:nowrap}#file-upload{display:none}.prompt-footer,.flex-container{display:flex;flex-flow:row nowrap;align-items:center}.prompt-footer{justify-content:space-between;padding:8px 16px}@media(max-width:600px){.prompt-footer{padding:8px}}@media(max-width:320px){.prompt-footer{padding:8px}}.prompt-character-count{margin-left:auto;padding-right:8px;color:#888;font-size:12px;line-height:16px;white-space:nowrap}.prompt-character-count.over-limit{color:#e02800}.prompt-character-count-status{position:absolute;left:-9999px}.prompt-projected-footer{display:none}.prompt-projected-footer:has(*){display:block;overflow:hidden;border-radius:0 0 9px 9px}.menu{display:flex;flex-flow:column nowrap;position:relative}.menu .menu-badge{position:absolute;right:0;z-index:1000}.view-more{margin-left:4px;white-space:nowrap}.view-more ::ng-deep button.mat-mdc-unelevated-button .label{white-space:nowrap}.prompt-container{position:relative}.prompt-container.has-error{--ui-prompt-ring: inset 0 0 0 2px #e02800;border:1px solid #e02800;outline:1px solid #e02800}.prompt-error{margin-top:4px;align-items:center;display:flex;color:#e02800;font-size:12px;line-height:16px}.prompt-error ui-icon{margin-right:4px}.prompt-loading{display:flex;flex-direction:column;gap:4px;padding:12px 16px 0}.prompt-loading ui-skeleton{height:20px}.ghost{position:absolute;top:0;left:0;bottom:16px;color:#888;border:none;pointer-events:none;background:transparent;width:100%;padding:12px 16px;font-size:inherit;line-height:22px;letter-spacing:inherit;font-weight:inherit;font-family:ModernGothic,sans-serif;resize:none}.prompt-help-text{overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word}.prompt-help-text-mirror{color:transparent}.prompt-help-text-hint{color:#919191}@keyframes cnp-prompt-fade-in{0%{opacity:0}}@keyframes cnp-prompt-icon-in{0%{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-icon-out{to{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-row-in{0%{opacity:0;transform:translateY(6px)}}@keyframes cnp-prompt-pop-in{0%{opacity:0;transform:scale(.8)}}@keyframes cnp-prompt-error-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes cnp-prompt-dropdown-in{0%{opacity:0;transform:translateY(-6px)}}.cnp-prompt-fade-in{animation:cnp-prompt-fade-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-in{animation:cnp-prompt-icon-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-out{animation:cnp-prompt-icon-out .12s cubic-bezier(.2,0,0,1) both}.cnp-prompt-row-in{animation:cnp-prompt-row-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-pop-in{animation:cnp-prompt-pop-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-error-in{animation:cnp-prompt-error-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-dropdown-in{animation:cnp-prompt-dropdown-in .18s cubic-bezier(.2,0,0,1) both}@media(prefers-reduced-motion:reduce){.prompt-container,.prompt-container:after,.prompt-icon,.dropdown-tag,ui-field.prompt-text{transition:none}.cnp-prompt-fade-in,.cnp-prompt-icon-in,.cnp-prompt-icon-out,.cnp-prompt-row-in,.cnp-prompt-pop-in,.cnp-prompt-error-in,.cnp-prompt-dropdown-in{animation-duration:1ms}}\n"],
|
|
613
|
+
dependencies: [
|
|
614
|
+
{
|
|
615
|
+
kind: "directive",
|
|
616
|
+
type: CdkOverlayOrigin,
|
|
617
|
+
selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
|
|
618
|
+
exportAs: ["cdkOverlayOrigin"]
|
|
619
|
+
},
|
|
620
|
+
{
|
|
621
|
+
kind: "component",
|
|
622
|
+
type: SkeletonComponent,
|
|
623
|
+
selector: "ui-skeleton",
|
|
624
|
+
inputs: [
|
|
625
|
+
"count",
|
|
626
|
+
"theme",
|
|
627
|
+
"appearance",
|
|
628
|
+
"isAiTheme",
|
|
629
|
+
"applicationTheme"
|
|
630
|
+
]
|
|
631
|
+
},
|
|
632
|
+
{
|
|
633
|
+
kind: "component",
|
|
634
|
+
type: IconComponent,
|
|
635
|
+
selector: "ui-icon",
|
|
636
|
+
inputs: [
|
|
637
|
+
"size",
|
|
638
|
+
"cssClass",
|
|
639
|
+
"name",
|
|
640
|
+
"color",
|
|
641
|
+
"filled",
|
|
642
|
+
"toggleIconStyle",
|
|
643
|
+
"applicationTheme",
|
|
644
|
+
"useFullIconName"
|
|
645
|
+
]
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
kind: "component",
|
|
649
|
+
type: FieldComponent,
|
|
650
|
+
selector: "ui-field",
|
|
651
|
+
inputs: [
|
|
652
|
+
"fullWidth",
|
|
653
|
+
"fullHeight",
|
|
654
|
+
"label",
|
|
655
|
+
"labelHtml",
|
|
656
|
+
"labelIcon",
|
|
657
|
+
"fieldName",
|
|
658
|
+
"placeholder",
|
|
659
|
+
"id",
|
|
660
|
+
"value",
|
|
661
|
+
"badgeVariant",
|
|
662
|
+
"errors",
|
|
663
|
+
"disabled",
|
|
664
|
+
"required",
|
|
665
|
+
"readOnly",
|
|
666
|
+
"hintMessage",
|
|
667
|
+
"type",
|
|
668
|
+
"updateOnBlur",
|
|
669
|
+
"allowOnlyDigits",
|
|
670
|
+
"isAutocompleteOff",
|
|
671
|
+
"allowNegative",
|
|
672
|
+
"showBottomContent",
|
|
673
|
+
"applicationTheme",
|
|
674
|
+
"ariaLabel",
|
|
675
|
+
"testId",
|
|
676
|
+
"loading",
|
|
677
|
+
"isValid",
|
|
678
|
+
"maxCharacters",
|
|
679
|
+
"trimOnBlur",
|
|
680
|
+
"trimOnSubmit",
|
|
681
|
+
"maxRows",
|
|
682
|
+
"hasTextAreaCounter",
|
|
683
|
+
"hideBuiltInErrors",
|
|
684
|
+
"hideLabelInErrors",
|
|
685
|
+
"max",
|
|
686
|
+
"min",
|
|
687
|
+
"textareaHeight",
|
|
688
|
+
"borderless",
|
|
689
|
+
"autosizableTextarea",
|
|
690
|
+
"isAIVariant",
|
|
691
|
+
"ariaLabelledby",
|
|
692
|
+
"ariaDescribedby",
|
|
693
|
+
"hasError"
|
|
694
|
+
],
|
|
695
|
+
outputs: ["validateEvent", "fieldBlur"]
|
|
696
|
+
},
|
|
697
|
+
{
|
|
698
|
+
kind: "component",
|
|
699
|
+
type: TagComponent,
|
|
700
|
+
selector: "ui-tag",
|
|
701
|
+
inputs: [
|
|
702
|
+
"label",
|
|
703
|
+
"icon",
|
|
704
|
+
"allowClose",
|
|
705
|
+
"readOnly",
|
|
706
|
+
"isSelected",
|
|
707
|
+
"showIconWhenSelected",
|
|
708
|
+
"pinnedBackground",
|
|
709
|
+
"constrainWidth",
|
|
710
|
+
"isDisabled",
|
|
711
|
+
"applicationTheme",
|
|
712
|
+
"ariaLabel",
|
|
713
|
+
"testId",
|
|
714
|
+
"ariaRequired",
|
|
715
|
+
"showBadge",
|
|
716
|
+
"notificationsAmount"
|
|
717
|
+
],
|
|
718
|
+
outputs: [
|
|
719
|
+
"isSelectedChange",
|
|
720
|
+
"close",
|
|
721
|
+
"press"
|
|
722
|
+
]
|
|
723
|
+
},
|
|
724
|
+
{
|
|
725
|
+
kind: "component",
|
|
726
|
+
type: ButtonComponent,
|
|
727
|
+
selector: "ui-button",
|
|
728
|
+
inputs: [
|
|
729
|
+
"size",
|
|
730
|
+
"variant",
|
|
731
|
+
"label",
|
|
732
|
+
"iconPosition",
|
|
733
|
+
"justIcon",
|
|
734
|
+
"iconName",
|
|
735
|
+
"trailingIconName",
|
|
736
|
+
"trailingIconFilled",
|
|
737
|
+
"disabled",
|
|
738
|
+
"loading",
|
|
739
|
+
"loadingWithLabel",
|
|
740
|
+
"fullWidth",
|
|
741
|
+
"url",
|
|
742
|
+
"urlTarget",
|
|
743
|
+
"value",
|
|
744
|
+
"tooltip",
|
|
745
|
+
"isPremium",
|
|
746
|
+
"type",
|
|
747
|
+
"companyColor",
|
|
748
|
+
"buttonBadgeConfig",
|
|
749
|
+
"applicationTheme",
|
|
750
|
+
"disabledScaleOnClick",
|
|
751
|
+
"ariaLabel",
|
|
752
|
+
"ariaExpanded",
|
|
753
|
+
"ariaControls",
|
|
754
|
+
"ariaPressed",
|
|
755
|
+
"ariaRequired",
|
|
756
|
+
"ariaLabelledby",
|
|
757
|
+
"ariaDescribedby",
|
|
758
|
+
"preventDefault",
|
|
759
|
+
"hasBackground",
|
|
760
|
+
"tooltipPosition",
|
|
761
|
+
"role",
|
|
762
|
+
"iconFilled",
|
|
763
|
+
"testId"
|
|
764
|
+
],
|
|
765
|
+
outputs: ["buttonClickEvent", "buttonHoverEvent"]
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
kind: "component",
|
|
769
|
+
type: BadgeComponent,
|
|
770
|
+
selector: "ui-badge",
|
|
771
|
+
inputs: [
|
|
772
|
+
"label",
|
|
773
|
+
"staticLabel",
|
|
774
|
+
"icon",
|
|
775
|
+
"iconColor",
|
|
776
|
+
"trailingIcon",
|
|
777
|
+
"trailingIconColor",
|
|
778
|
+
"color",
|
|
779
|
+
"variant",
|
|
780
|
+
"notificationsAmount",
|
|
781
|
+
"applicationTheme",
|
|
782
|
+
"rebrandColor",
|
|
783
|
+
"truncateLabel",
|
|
784
|
+
"enableAnimation"
|
|
785
|
+
]
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
kind: "component",
|
|
789
|
+
type: OverflowMenuComponent,
|
|
790
|
+
selector: "ui-overflow-menu",
|
|
791
|
+
inputs: [
|
|
792
|
+
"buttons",
|
|
793
|
+
"iconTrigger",
|
|
794
|
+
"menuLabel",
|
|
795
|
+
"applicationTheme",
|
|
796
|
+
"ariaLabel",
|
|
797
|
+
"testId",
|
|
798
|
+
"ariaRequired",
|
|
799
|
+
"describedby",
|
|
800
|
+
"contentTemplateRef",
|
|
801
|
+
"buttonVariant",
|
|
802
|
+
"buttonSize",
|
|
803
|
+
"menuConfig",
|
|
804
|
+
"selectionMode",
|
|
805
|
+
"menuAnchor",
|
|
806
|
+
"shouldMatchAnchorWidth",
|
|
807
|
+
"isDynamicMenu",
|
|
808
|
+
"withRemovableOption"
|
|
809
|
+
],
|
|
810
|
+
outputs: [
|
|
811
|
+
"selectItem",
|
|
812
|
+
"menuOpened",
|
|
813
|
+
"menuClosed"
|
|
814
|
+
]
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
kind: "directive",
|
|
818
|
+
type: MatTooltip,
|
|
819
|
+
selector: "[matTooltip]",
|
|
820
|
+
inputs: [
|
|
821
|
+
"matTooltipPosition",
|
|
822
|
+
"matTooltipPositionAtOrigin",
|
|
823
|
+
"matTooltipDisabled",
|
|
824
|
+
"matTooltipShowDelay",
|
|
825
|
+
"matTooltipHideDelay",
|
|
826
|
+
"matTooltipTouchGestures",
|
|
827
|
+
"matTooltip",
|
|
828
|
+
"matTooltipClass"
|
|
829
|
+
],
|
|
830
|
+
exportAs: ["matTooltip"]
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
kind: "directive",
|
|
834
|
+
type: CdkConnectedOverlay,
|
|
835
|
+
selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
|
|
836
|
+
inputs: [
|
|
837
|
+
"cdkConnectedOverlayOrigin",
|
|
838
|
+
"cdkConnectedOverlayPositions",
|
|
839
|
+
"cdkConnectedOverlayPositionStrategy",
|
|
840
|
+
"cdkConnectedOverlayOffsetX",
|
|
841
|
+
"cdkConnectedOverlayOffsetY",
|
|
842
|
+
"cdkConnectedOverlayWidth",
|
|
843
|
+
"cdkConnectedOverlayHeight",
|
|
844
|
+
"cdkConnectedOverlayMinWidth",
|
|
845
|
+
"cdkConnectedOverlayMinHeight",
|
|
846
|
+
"cdkConnectedOverlayBackdropClass",
|
|
847
|
+
"cdkConnectedOverlayPanelClass",
|
|
848
|
+
"cdkConnectedOverlayViewportMargin",
|
|
849
|
+
"cdkConnectedOverlayScrollStrategy",
|
|
850
|
+
"cdkConnectedOverlayOpen",
|
|
851
|
+
"cdkConnectedOverlayDisableClose",
|
|
852
|
+
"cdkConnectedOverlayTransformOriginOn",
|
|
853
|
+
"cdkConnectedOverlayHasBackdrop",
|
|
854
|
+
"cdkConnectedOverlayLockPosition",
|
|
855
|
+
"cdkConnectedOverlayFlexibleDimensions",
|
|
856
|
+
"cdkConnectedOverlayGrowAfterOpen",
|
|
857
|
+
"cdkConnectedOverlayPush",
|
|
858
|
+
"cdkConnectedOverlayDisposeOnNavigation",
|
|
859
|
+
"cdkConnectedOverlayUsePopover",
|
|
860
|
+
"cdkConnectedOverlayMatchWidth",
|
|
861
|
+
"cdkConnectedOverlay"
|
|
862
|
+
],
|
|
863
|
+
outputs: [
|
|
864
|
+
"backdropClick",
|
|
865
|
+
"positionChange",
|
|
866
|
+
"attach",
|
|
867
|
+
"detach",
|
|
868
|
+
"overlayKeydown",
|
|
869
|
+
"overlayOutsideClick"
|
|
870
|
+
],
|
|
871
|
+
exportAs: ["cdkConnectedOverlay"]
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
kind: "directive",
|
|
875
|
+
type: PopoverDirective,
|
|
876
|
+
selector: "[uiPopover]",
|
|
877
|
+
inputs: [
|
|
878
|
+
"uiPopover",
|
|
879
|
+
"popoverOffset",
|
|
880
|
+
"popoverAlign",
|
|
881
|
+
"popoverOpen",
|
|
882
|
+
"popoverCard",
|
|
883
|
+
"popoverCardSize",
|
|
884
|
+
"popoverTrigger",
|
|
885
|
+
"popoverAriaLabel",
|
|
886
|
+
"uiPopoverDisabled"
|
|
887
|
+
],
|
|
888
|
+
exportAs: ["uiPopover"]
|
|
889
|
+
},
|
|
890
|
+
{
|
|
891
|
+
kind: "pipe",
|
|
892
|
+
type: AsyncPipe,
|
|
893
|
+
name: "async"
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
kind: "pipe",
|
|
897
|
+
type: UiTranslatePipe,
|
|
898
|
+
name: "uiTranslate"
|
|
899
|
+
}
|
|
900
|
+
],
|
|
901
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
902
|
+
});
|
|
903
|
+
}
|
|
904
|
+
};
|
|
905
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
906
|
+
minVersion: "12.0.0",
|
|
907
|
+
version: "22.2.4",
|
|
908
|
+
ngImport: i0,
|
|
909
|
+
type: PromptComponent,
|
|
910
|
+
decorators: [{
|
|
911
|
+
type: Component,
|
|
912
|
+
args: [{
|
|
913
|
+
selector: "ui-prompt",
|
|
914
|
+
providers: [UiTranslatePipe, {
|
|
915
|
+
provide: NG_VALUE_ACCESSOR,
|
|
916
|
+
useExisting: forwardRef(() => PromptComponent),
|
|
917
|
+
multi: true
|
|
918
|
+
}],
|
|
919
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
920
|
+
imports: [
|
|
921
|
+
CdkOverlayOrigin,
|
|
922
|
+
NgClass,
|
|
923
|
+
SkeletonComponent,
|
|
924
|
+
IconComponent,
|
|
925
|
+
FieldComponent,
|
|
926
|
+
TagComponent,
|
|
927
|
+
ButtonComponent,
|
|
928
|
+
BadgeComponent,
|
|
929
|
+
OverflowMenuComponent,
|
|
930
|
+
MatTooltip,
|
|
931
|
+
CdkConnectedOverlay,
|
|
932
|
+
PopoverDirective,
|
|
933
|
+
AsyncPipe,
|
|
934
|
+
UiTranslatePipe
|
|
935
|
+
],
|
|
936
|
+
template: "<ng-container>\n <div\n class=\"prompt-container\"\n [class.has-error]=\"!!errorMessage()\"\n [class.disabled]=\"isLocked()\"\n [attr.aria-disabled]=\"isLocked()\"\n [attr.aria-busy]=\"loading() ? 'true' : null\"\n cdkOverlayOrigin\n #promptOrigin=\"cdkOverlayOrigin\"\n #promptContainerRef\n [class.prompt-container-focused]=\"showFocusRing()\"\n (focusin)=\"onContainerFocusIn()\"\n (focusout)=\"onContainerFocusOut($event)\"\n >\n @if (loading()) {\n <div class=\"prompt-loading\" aria-hidden=\"true\" animate.enter=\"cnp-prompt-fade-in\">\n <ui-skeleton [theme]=\"{ width: '100%', height: '20px', margin: '0' }\"></ui-skeleton>\n <ui-skeleton [theme]=\"{ width: '30%', height: '20px', margin: '0' }\"></ui-skeleton>\n </div>\n }\n <div class=\"prompt-autocomplete\" [hidden]=\"loading()\">\n <textarea tabindex=\"-1\" class=\"ghost\" id=\"autocomplete\" [value]=\"autocompleteSuggestion()\" readonly></textarea>\n @if (visibleHelpText(); as help) {\n <!-- The mirror repeats the typed text invisibly so the hint lands right after its last character. -->\n <div class=\"ghost prompt-help-text\" aria-hidden=\"true\">\n <span class=\"prompt-help-text-mirror\">{{ promptTextValue() }}</span\n ><span class=\"prompt-help-text-hint\">{{ ' ' + help }}</span>\n </div>\n }\n\n @let showIcon = !isFieldFocused() && !promptTextValue();\n @if (showIcon) {\n <ui-icon\n class=\"prompt-icon\"\n animate.enter=\"cnp-prompt-icon-in\"\n animate.leave=\"cnp-prompt-icon-out\"\n [color]=\"'inherit'\"\n [class.hovered]=\"isFieldHovered()\"\n [name]=\"'Sparkle-in-line'\"\n ></ui-icon>\n }\n <!-- `keydown.enter` matches unmodified Enter only; Shift+Enter resolves to `shift.enter`\n and falls through to a newline. Do not add a shiftKey check. -->\n <ui-field\n #textarea\n class=\"prompt-text\"\n [class.show-icon]=\"showIcon\"\n role=\"input\"\n [showBottomContent]=\"false\"\n [borderless]=\"true\"\n [type]=\"'multi-line'\"\n [autosizableTextarea]=\"true\"\n [maxCharacters]=\"maxCharacters()\"\n [placeholder]=\"showIcon ? placeholder() || ('PROMPT.ASK_ANYTHING' | uiTranslate | async)! : ''\"\n [value]=\"promptTextValue() || ''\"\n [hasTextAreaCounter]=\"false\"\n [ariaDescribedby]=\"visibleHelpText()\"\n [disabled]=\"disabled\"\n (mouseenter)=\"isFieldHovered.set(true)\"\n (mouseleave)=\"isFieldHovered.set(false)\"\n (focusin)=\"isFieldFocused.set(true)\"\n (fieldBlur)=\"onFieldBlur()\"\n (keydown.tab)=\"onTextareaTab($event)\"\n (keydown.enter)=\"onTextareaEnter($event)\"\n (keydown.escape)=\"onTextareaEscape($event)\"\n ></ui-field>\n </div>\n <div class=\"prompt-footer flex-container\">\n <div class=\"flex-container\">\n @if (showActionsMenuTrigger()) {\n <ui-button\n [uiPopover]=\"actionsMenuTemplate\"\n [popoverTrigger]=\"'click'\"\n [popoverCardSize]=\"'small'\"\n [popoverAlign]=\"'start'\"\n [popoverOffset]=\"8\"\n [popoverAriaLabel]=\"('COMMON.ADD' | uiTranslate | async)!\"\n [uiPopoverDisabled]=\"isLocked()\"\n [variant]=\"'icon-button'\"\n [iconName]=\"isActionsMenuOpen() ? 'Close' : 'Plus'\"\n [tooltip]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"((isActionsMenuOpen() ? 'COMMON.CLOSE' : 'COMMON.ADD') | uiTranslate | async)!\"\n [ariaExpanded]=\"isActionsMenuOpen()\"\n [ariaControls]=\"isActionsMenuOpen() ? actionsMenuId : undefined\"\n [disabled]=\"isLocked()\"\n ></ui-button>\n\n <ng-template #actionsMenuTemplate>\n <div\n class=\"actions-menu\"\n role=\"menu\"\n #actionsMenu\n [id]=\"actionsMenuId\"\n (keydown)=\"onActionsMenuKeydown($event)\"\n >\n @for (entry of actionsMenuEntries(); track entry.kind) {\n <div\n class=\"actions-menu-item\"\n role=\"menuitem\"\n tabindex=\"0\"\n [attr.aria-label]=\"entry.tag.ariaLabel ?? entry.tag.label\"\n [attr.aria-disabled]=\"entry.tag.disabled ? 'true' : null\"\n (click)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.enter)=\"selectActionsMenuEntry(entry, $event)\"\n (keydown.space)=\"selectActionsMenuEntry(entry, $event)\"\n >\n @if (entry.tag.icon) {\n <ui-icon class=\"actions-menu-item-icon\" [name]=\"entry.tag.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"actions-menu-item-label\">{{ entry.tag.label }}</span>\n @if (entry.trailingIcon) {\n <ui-icon\n class=\"actions-menu-item-trailing\"\n [name]=\"entry.trailingIcon\"\n [color]=\"'inherit'\"\n ></ui-icon>\n }\n </div>\n }\n </div>\n </ng-template>\n }\n\n @if (actionTag(); as at) {\n @if (!collapseActionTags()) {\n <ui-tag\n [label]=\"at.label\"\n [icon]=\"actionTagIcon()\"\n [ariaLabel]=\"at.ariaLabel ?? at.label\"\n [isDisabled]=\"isLocked() || !!at.disabled\"\n (press)=\"onActionTagPress()\"\n ></ui-tag>\n }\n } @else if (enableFileUpload()) {\n <ui-button\n [variant]=\"'icon-button'\"\n [tooltip]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('PROMPT.ADD_FILES' | uiTranslate | async)!\"\n [iconName]=\"'Plus'\"\n [disabled]=\"isLocked()\"\n (click)=\"fileDrop()?.nativeElement?.click()\"\n ></ui-button>\n\n @if (promptFilesList().length) {\n <div class=\"menu\" animate.enter=\"cnp-prompt-pop-in\">\n <ui-badge\n [notificationsAmount]=\"promptFilesList().length\"\n [variant]=\"'notification'\"\n class=\"menu-badge\"\n ></ui-badge>\n <ui-overflow-menu\n [matTooltip]=\"('PROMPT.FILES' | uiTranslate | async)!\"\n [matTooltipPosition]=\"'above'\"\n [buttonSize]=\"'medium'\"\n [iconTrigger]=\"'Document'\"\n [buttonVariant]=\"'ghost'\"\n [buttons]=\"fileListMenuConfig()\"\n [isDynamicMenu]=\"true\"\n [withRemovableOption]=\"true\"\n (selectItem)=\"selectedMenuOption($event)\"\n ></ui-overflow-menu>\n </div>\n }\n }\n\n @if (secondaryActionTag(); as sat) {\n @if (!collapseActionTags()) {\n <ui-tag\n class=\"prompt-secondary-action-tag\"\n [label]=\"sat.label\"\n [icon]=\"sat.icon ?? ''\"\n [ariaLabel]=\"sat.ariaLabel ?? sat.label\"\n [isDisabled]=\"isLocked() || !!sat.disabled\"\n (press)=\"onSecondaryActionTagPress()\"\n ></ui-tag>\n }\n }\n\n @if (actionTag() || enableFileUpload()) {\n <input\n data-testid=\"prompt-file-input\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDropRef\n type=\"file\"\n id=\"file-upload\"\n [accept]=\"fileInputAccept()\"\n [disabled]=\"isLocked()\"\n (change)=\"onFileSelected($event)\"\n />\n }\n </div>\n\n @if (tags()?.length && !promptTextValue()) {\n <div class=\"flex-container carousel\" animate.enter=\"cnp-prompt-row-in\">\n <div class=\"tag-container flex-container\" role=\"list\" #tagsScrollContainer>\n @for (tag of tagsVisible(); track tag) {\n <ui-tag\n [label]=\"tag.label\"\n role=\"listitem\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"isLocked()\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n ></ui-tag>\n }\n\n @if (tagsInDropdown().length) {\n <ui-button\n class=\"view-more\"\n variant=\"text-inline\"\n [label]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [ariaLabel]=\"('PROMPT.VIEW_MORE' | uiTranslate | async)!\"\n [size]=\"'medium'\"\n [disabled]=\"isLocked()\"\n (click)=\"toggleDropdown()\"\n (keydown.enter)=\"focusTagDropdown()\"\n cdkOverlayOrigin\n #dropdownTrigger=\"cdkOverlayOrigin\"\n ></ui-button>\n }\n </div>\n\n <div class=\"flex-container\">\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [ariaLabel]=\"'Scroll left button'\"\n [iconName]=\"'Arrow-chevron-left-in-line'\"\n [disabled]=\"isLocked() || tagsScrollContainer.scrollLeft === 0\"\n (click)=\"tagsScrollContainer.scrollBy({ left: -100, behavior: 'smooth' })\"\n ></ui-button>\n <ui-button\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Arrow-chevron-right-in-line'\"\n [ariaLabel]=\"'Scroll right button'\"\n [disabled]=\"\n isLocked() ||\n tagsScrollContainer.scrollLeft + tagsScrollContainer.clientWidth >= tagsScrollContainer.scrollWidth\n \"\n (click)=\"tagsScrollContainer.scrollBy({ left: 100, behavior: 'smooth' })\"\n ></ui-button>\n </div>\n </div>\n }\n\n @if (showCharacterCount()) {\n <span class=\"prompt-character-count\" [class.over-limit]=\"isOverCharacterLimit()\"\n >{{ promptTextValue().length }} / {{ maxCharacters() }}</span\n >\n <span class=\"prompt-character-count-status\" aria-live=\"polite\">\n @if (characterCountAnnouncement(); as announcement) {\n {{ announcement.key | uiTranslate: announcement.params | async }}\n }\n </span>\n }\n\n @if (showSendButton()) {\n <ui-button\n class=\"send-button\"\n animate.enter=\"cnp-prompt-pop-in\"\n [variant]=\"'secondary'\"\n [iconName]=\"'Arrow-up-in-line'\"\n [tooltip]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [ariaLabel]=\"('COMMON.SEND' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [size]=\"'medium'\"\n [disabled]=\"!canSubmit()\"\n (click)=\"sendPromptData()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"prompt-projected-footer\">\n <ng-content select=\"[promptFooter]\"></ng-content>\n </div>\n </div>\n\n @if (errorMessage()) {\n <div class=\"prompt-error\" animate.enter=\"cnp-prompt-error-in\">\n <ui-icon [name]=\"'Error'\" color=\"red\"></ui-icon>\n <span>{{ errorMessage() }}</span>\n </div>\n }\n\n <!-- Dropdown for hidden tags -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"isDropdownOpened() && !isLocked()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"dropdownOutsideClick()\"\n >\n <div class=\"dropdown-container\" role=\"list\" #tagDropdown tabindex=\"0\" animate.enter=\"cnp-prompt-dropdown-in\">\n @for (tag of tagsInDropdown(); track tag) {\n <div\n class=\"dropdown-tag\"\n tabindex=\"0\"\n [attr.aria-label]=\"tag.label\"\n role=\"listitem\"\n (click)=\"selectTag(tag, $event)\"\n (keyup.enter)=\"selectTag(tag, $event)\"\n (keyup.space)=\"selectTag(tag, $event)\"\n >\n {{ tag.label }}\n </div>\n }\n </div>\n </ng-template>\n\n <!-- Built-in items dropdown (UI-877) — opens on focus, typing filters by label -->\n <ng-template\n cdkConnectedOverlay\n [cdkConnectedOverlayOrigin]=\"promptOrigin\"\n [cdkConnectedOverlayOpen]=\"itemsDropdownVisible()\"\n [cdkConnectedOverlayPositions]=\"dropdownPositions\"\n [cdkConnectedOverlayWidth]=\"promptContainerRef?.offsetWidth || 0\"\n (overlayOutsideClick)=\"itemsDropdownOutsideClick($event)\"\n >\n <div\n class=\"dropdown-container custom-dropdown-container\"\n animate.enter=\"cnp-prompt-dropdown-in\"\n (mousedown)=\"$event.preventDefault()\"\n >\n @if (dropdownHeading() || showDropdownClose()) {\n <div class=\"dropdown-header\">\n @if (dropdownHeading()) {\n <span class=\"dropdown-heading\">{{ dropdownHeading() }}</span>\n }\n @if (showDropdownClose()) {\n <ui-button\n class=\"dropdown-close\"\n [variant]=\"'icon-button'\"\n [size]=\"'small'\"\n [iconName]=\"'Close-in-line'\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n [tooltipPosition]=\"'above'\"\n [ariaLabel]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"closeItemsDropdown()\"\n ></ui-button>\n }\n </div>\n }\n <div role=\"list\">\n @for (item of filteredDropdownItems(); track item.id) {\n <div\n class=\"dropdown-tag dropdown-item\"\n tabindex=\"0\"\n role=\"listitem\"\n [attr.aria-label]=\"item.label\"\n (click)=\"selectDropdownItem(item, $event)\"\n (keydown.enter)=\"selectDropdownItem(item, $event)\"\n (keydown.space)=\"selectDropdownItem(item, $event)\"\n >\n @if (item.icon) {\n <ui-icon class=\"dropdown-item-icon\" [name]=\"item.icon\" [color]=\"'inherit'\"></ui-icon>\n }\n <span class=\"dropdown-item-label\">{{ item.label }}</span>\n <ui-icon class=\"dropdown-item-chevron\" [name]=\"'Arrow-chevron-right-in-line'\" [color]=\"'inherit'\"></ui-icon>\n </div>\n }\n </div>\n </div>\n </ng-template>\n</ng-container>\n",
|
|
937
|
+
styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host ::ng-deep ui-field.prompt-text>mat-form-field{vertical-align:top}:host ::ng-deep ui-field.prompt-text .mat-mdc-text-field-wrapper{border-radius:10px!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper{background:transparent}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{padding-bottom:0!important}:host ::ng-deep .ui-field .mat-mdc-form-field.multi-line-textarea.mat-mdc-form-field-type-mat-input.mat-form-field-appearance-outline .mat-mdc-text-field-wrapper textarea{max-height:220px!important}:host ::ng-deep ui-button.send-button .rounded-icon .mdc-button{width:48px!important;height:48px!important}:host ::ng-deep ui-overflow-menu button.mat-mdc-unelevated-button.ghost.light-theme.only-icon{border:none}.prompt-container{border:1px solid #919191;border-radius:10px;background-color:#fff;outline:0 solid transparent;outline-offset:-2px;transition:border-color .18s cubic-bezier(.2,0,0,1),outline-color .18s cubic-bezier(.2,0,0,1),outline-width .12s cubic-bezier(.2,0,0,1);--ui-prompt-ring: inset 0 0 0 2px transparent}.prompt-container:after{content:\"\";position:absolute;z-index:1;inset:-1px;border-radius:inherit;box-shadow:var(--ui-prompt-ring);pointer-events:none;transition:box-shadow .18s cubic-bezier(.2,0,0,1)}.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px #000000;border:1px solid black;outline:1px solid black}.prompt-container.disabled{border:1px solid #d3d3d3}.prompt-container.disabled.prompt-container-focused{--ui-prompt-ring: inset 0 0 0 2px transparent;outline-width:0}.prompt-container.disabled .prompt-icon{color:#d3d3d3}ui-field.prompt-text{transition:padding-left .12s cubic-bezier(.2,0,0,1)}ui-field.show-icon{padding-left:24px}.prompt-icon{position:absolute;top:14px;left:16px;color:#666;transition:color .12s cubic-bezier(.2,0,0,1)}.prompt-icon.hovered{color:#000}.dropdown-container{width:100%}.custom-dropdown-container{overflow:hidden;background-color:#fff;border-radius:0 0 8px 8px;box-shadow:0 8px 16px #00000014}.dropdown-header{display:flex;align-items:center;justify-content:space-between;padding:16px 16px 8px}.dropdown-heading{font-weight:700}.dropdown-close{margin-left:auto}.dropdown-item{display:flex;gap:12px;align-items:center}.dropdown-item-icon,.dropdown-item-chevron{flex-shrink:0}.dropdown-item-label{flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dropdown-tag{padding:16px;background-color:#fff;transition:background-color .12s cubic-bezier(.2,0,0,1)}.dropdown-tag:hover,.dropdown-tag:focus{background-color:#fff2fc;cursor:pointer}.carousel{flex-grow:1;min-width:0}.tag-container{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.tag-container::-webkit-scrollbar{display:none}.tag-container{margin:0 8px}.actions-menu{min-width:228px;margin:-8px}.actions-menu-item{display:flex;gap:12px;align-items:center;padding:8px;border-radius:8px;cursor:pointer;transition:background-color .12s cubic-bezier(.2,0,0,1)}.actions-menu-item:hover,.actions-menu-item:focus-visible{background-color:#fff2fc}.actions-menu-item[aria-disabled=true]{color:#d3d3d3;background-color:transparent;cursor:default}.actions-menu-item-icon,.actions-menu-item-trailing{flex-shrink:0}.actions-menu-item-label{flex:1;white-space:nowrap}#file-upload{display:none}.prompt-footer,.flex-container{display:flex;flex-flow:row nowrap;align-items:center}.prompt-footer{justify-content:space-between;padding:8px 16px}@media(max-width:600px){.prompt-footer{padding:8px}}@media(max-width:320px){.prompt-footer{padding:8px}}.prompt-character-count{margin-left:auto;padding-right:8px;color:#888;font-size:12px;line-height:16px;white-space:nowrap}.prompt-character-count.over-limit{color:#e02800}.prompt-character-count-status{position:absolute;left:-9999px}.prompt-projected-footer{display:none}.prompt-projected-footer:has(*){display:block;overflow:hidden;border-radius:0 0 9px 9px}.menu{display:flex;flex-flow:column nowrap;position:relative}.menu .menu-badge{position:absolute;right:0;z-index:1000}.view-more{margin-left:4px;white-space:nowrap}.view-more ::ng-deep button.mat-mdc-unelevated-button .label{white-space:nowrap}.prompt-container{position:relative}.prompt-container.has-error{--ui-prompt-ring: inset 0 0 0 2px #e02800;border:1px solid #e02800;outline:1px solid #e02800}.prompt-error{margin-top:4px;align-items:center;display:flex;color:#e02800;font-size:12px;line-height:16px}.prompt-error ui-icon{margin-right:4px}.prompt-loading{display:flex;flex-direction:column;gap:4px;padding:12px 16px 0}.prompt-loading ui-skeleton{height:20px}.ghost{position:absolute;top:0;left:0;bottom:16px;color:#888;border:none;pointer-events:none;background:transparent;width:100%;padding:12px 16px;font-size:inherit;line-height:22px;letter-spacing:inherit;font-weight:inherit;font-family:ModernGothic,sans-serif;resize:none}.prompt-help-text{overflow:hidden;white-space:pre-wrap;overflow-wrap:break-word}.prompt-help-text-mirror{color:transparent}.prompt-help-text-hint{color:#919191}@keyframes cnp-prompt-fade-in{0%{opacity:0}}@keyframes cnp-prompt-icon-in{0%{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-icon-out{to{opacity:0;transform:translate(-4px) scale(.9)}}@keyframes cnp-prompt-row-in{0%{opacity:0;transform:translateY(6px)}}@keyframes cnp-prompt-pop-in{0%{opacity:0;transform:scale(.8)}}@keyframes cnp-prompt-error-in{0%{opacity:0;transform:translateY(-4px)}}@keyframes cnp-prompt-dropdown-in{0%{opacity:0;transform:translateY(-6px)}}.cnp-prompt-fade-in{animation:cnp-prompt-fade-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-in{animation:cnp-prompt-icon-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-icon-out{animation:cnp-prompt-icon-out .12s cubic-bezier(.2,0,0,1) both}.cnp-prompt-row-in{animation:cnp-prompt-row-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-pop-in{animation:cnp-prompt-pop-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-error-in{animation:cnp-prompt-error-in .18s cubic-bezier(.2,0,0,1) both}.cnp-prompt-dropdown-in{animation:cnp-prompt-dropdown-in .18s cubic-bezier(.2,0,0,1) both}@media(prefers-reduced-motion:reduce){.prompt-container,.prompt-container:after,.prompt-icon,.dropdown-tag,ui-field.prompt-text{transition:none}.cnp-prompt-fade-in,.cnp-prompt-icon-in,.cnp-prompt-icon-out,.cnp-prompt-row-in,.cnp-prompt-pop-in,.cnp-prompt-error-in,.cnp-prompt-dropdown-in{animation-duration:1ms}}\n"]
|
|
938
|
+
}]
|
|
939
|
+
}],
|
|
940
|
+
propDecorators: {
|
|
941
|
+
tags: [{
|
|
942
|
+
type: i0.Input,
|
|
943
|
+
args: [{
|
|
944
|
+
isSignal: true,
|
|
945
|
+
alias: "tags",
|
|
946
|
+
required: false
|
|
947
|
+
}]
|
|
948
|
+
}],
|
|
949
|
+
actionTag: [{
|
|
950
|
+
type: i0.Input,
|
|
951
|
+
args: [{
|
|
952
|
+
isSignal: true,
|
|
953
|
+
alias: "actionTag",
|
|
954
|
+
required: false
|
|
955
|
+
}]
|
|
956
|
+
}],
|
|
957
|
+
secondaryActionTag: [{
|
|
958
|
+
type: i0.Input,
|
|
959
|
+
args: [{
|
|
960
|
+
isSignal: true,
|
|
961
|
+
alias: "secondaryActionTag",
|
|
962
|
+
required: false
|
|
963
|
+
}]
|
|
964
|
+
}],
|
|
965
|
+
collapseActionTags: [{
|
|
966
|
+
type: i0.Input,
|
|
967
|
+
args: [{
|
|
968
|
+
isSignal: true,
|
|
969
|
+
alias: "collapseActionTags",
|
|
970
|
+
required: false
|
|
971
|
+
}]
|
|
972
|
+
}],
|
|
973
|
+
maxCharacters: [{
|
|
974
|
+
type: i0.Input,
|
|
975
|
+
args: [{
|
|
976
|
+
isSignal: true,
|
|
977
|
+
alias: "maxCharacters",
|
|
978
|
+
required: false
|
|
979
|
+
}]
|
|
980
|
+
}],
|
|
981
|
+
supportedFileTypes: [{
|
|
982
|
+
type: i0.Input,
|
|
983
|
+
args: [{
|
|
984
|
+
isSignal: true,
|
|
985
|
+
alias: "supportedFileTypes",
|
|
986
|
+
required: false
|
|
987
|
+
}]
|
|
988
|
+
}],
|
|
989
|
+
autoClear: [{
|
|
990
|
+
type: i0.Input,
|
|
991
|
+
args: [{
|
|
992
|
+
isSignal: true,
|
|
993
|
+
alias: "autoClear",
|
|
994
|
+
required: false
|
|
995
|
+
}]
|
|
996
|
+
}],
|
|
997
|
+
showSendButton: [{
|
|
998
|
+
type: i0.Input,
|
|
999
|
+
args: [{
|
|
1000
|
+
isSignal: true,
|
|
1001
|
+
alias: "showSendButton",
|
|
1002
|
+
required: false
|
|
1003
|
+
}]
|
|
1004
|
+
}],
|
|
1005
|
+
sendButtonDisabled: [{
|
|
1006
|
+
type: i0.Input,
|
|
1007
|
+
args: [{
|
|
1008
|
+
isSignal: true,
|
|
1009
|
+
alias: "sendButtonDisabled",
|
|
1010
|
+
required: false
|
|
1011
|
+
}]
|
|
1012
|
+
}],
|
|
1013
|
+
enableFileUpload: [{
|
|
1014
|
+
type: i0.Input,
|
|
1015
|
+
args: [{
|
|
1016
|
+
isSignal: true,
|
|
1017
|
+
alias: "enableFileUpload",
|
|
1018
|
+
required: false
|
|
1019
|
+
}]
|
|
1020
|
+
}],
|
|
1021
|
+
loading: [{
|
|
1022
|
+
type: i0.Input,
|
|
1023
|
+
args: [{
|
|
1024
|
+
isSignal: true,
|
|
1025
|
+
alias: "loading",
|
|
1026
|
+
required: false
|
|
1027
|
+
}]
|
|
1028
|
+
}],
|
|
1029
|
+
placeholder: [{
|
|
1030
|
+
type: i0.Input,
|
|
1031
|
+
args: [{
|
|
1032
|
+
isSignal: true,
|
|
1033
|
+
alias: "placeholder",
|
|
1034
|
+
required: false
|
|
1035
|
+
}]
|
|
1036
|
+
}],
|
|
1037
|
+
errorMessage: [{
|
|
1038
|
+
type: i0.Input,
|
|
1039
|
+
args: [{
|
|
1040
|
+
isSignal: true,
|
|
1041
|
+
alias: "errorMessage",
|
|
1042
|
+
required: false
|
|
1043
|
+
}]
|
|
1044
|
+
}],
|
|
1045
|
+
dropdownItems: [{
|
|
1046
|
+
type: i0.Input,
|
|
1047
|
+
args: [{
|
|
1048
|
+
isSignal: true,
|
|
1049
|
+
alias: "dropdownItems",
|
|
1050
|
+
required: false
|
|
1051
|
+
}]
|
|
1052
|
+
}],
|
|
1053
|
+
dropdownHeading: [{
|
|
1054
|
+
type: i0.Input,
|
|
1055
|
+
args: [{
|
|
1056
|
+
isSignal: true,
|
|
1057
|
+
alias: "dropdownHeading",
|
|
1058
|
+
required: false
|
|
1059
|
+
}]
|
|
1060
|
+
}],
|
|
1061
|
+
showDropdownClose: [{
|
|
1062
|
+
type: i0.Input,
|
|
1063
|
+
args: [{
|
|
1064
|
+
isSignal: true,
|
|
1065
|
+
alias: "showDropdownClose",
|
|
1066
|
+
required: false
|
|
1067
|
+
}]
|
|
1068
|
+
}],
|
|
1069
|
+
showCharacterCount: [{
|
|
1070
|
+
type: i0.Input,
|
|
1071
|
+
args: [{
|
|
1072
|
+
isSignal: true,
|
|
1073
|
+
alias: "showCharacterCount",
|
|
1074
|
+
required: false
|
|
1075
|
+
}]
|
|
1076
|
+
}],
|
|
1077
|
+
helpText: [{
|
|
1078
|
+
type: i0.Input,
|
|
1079
|
+
args: [{
|
|
1080
|
+
isSignal: true,
|
|
1081
|
+
alias: "helpText",
|
|
1082
|
+
required: false
|
|
1083
|
+
}]
|
|
1084
|
+
}],
|
|
1085
|
+
disabled: [{
|
|
1086
|
+
type: Input,
|
|
1087
|
+
args: [{ transform: booleanAttribute }]
|
|
1088
|
+
}],
|
|
1089
|
+
promptData: [{
|
|
1090
|
+
type: i0.Output,
|
|
1091
|
+
args: ["promptData"]
|
|
1092
|
+
}],
|
|
1093
|
+
actionTagFileSelected: [{
|
|
1094
|
+
type: i0.Output,
|
|
1095
|
+
args: ["actionTagFileSelected"]
|
|
1096
|
+
}],
|
|
1097
|
+
secondaryActionTagPress: [{
|
|
1098
|
+
type: i0.Output,
|
|
1099
|
+
args: ["secondaryActionTagPress"]
|
|
1100
|
+
}],
|
|
1101
|
+
dropdownItemSelected: [{
|
|
1102
|
+
type: i0.Output,
|
|
1103
|
+
args: ["dropdownItemSelected"]
|
|
1104
|
+
}],
|
|
1105
|
+
dropdownClosed: [{
|
|
1106
|
+
type: i0.Output,
|
|
1107
|
+
args: ["dropdownClosed"]
|
|
1108
|
+
}],
|
|
1109
|
+
fileDrop: [{
|
|
1110
|
+
type: i0.ViewChild,
|
|
1111
|
+
args: ["fileDropRef", { isSignal: true }]
|
|
1112
|
+
}],
|
|
1113
|
+
tagDropdown: [{
|
|
1114
|
+
type: i0.ViewChild,
|
|
1115
|
+
args: ["tagDropdown", { isSignal: true }]
|
|
1116
|
+
}],
|
|
1117
|
+
fieldComponentRef: [{
|
|
1118
|
+
type: i0.ViewChild,
|
|
1119
|
+
args: ["textarea", { isSignal: true }]
|
|
1120
|
+
}],
|
|
1121
|
+
promptContainer: [{
|
|
1122
|
+
type: i0.ViewChild,
|
|
1123
|
+
args: ["promptContainerRef", { isSignal: true }]
|
|
1124
|
+
}],
|
|
1125
|
+
actionsPopover: [{
|
|
1126
|
+
type: i0.ViewChild,
|
|
1127
|
+
args: [i0.forwardRef(() => PopoverDirective), { isSignal: true }]
|
|
1128
|
+
}],
|
|
1129
|
+
actionsMenu: [{
|
|
1130
|
+
type: i0.ViewChild,
|
|
1131
|
+
args: ["actionsMenu", { isSignal: true }]
|
|
1132
|
+
}]
|
|
1133
|
+
}
|
|
1134
|
+
});
|
|
1135
|
+
var PromptModule = class PromptModule {
|
|
1136
|
+
static {
|
|
1137
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
1138
|
+
minVersion: "12.0.0",
|
|
1139
|
+
version: "22.2.4",
|
|
1140
|
+
ngImport: i0,
|
|
1141
|
+
type: PromptModule,
|
|
1142
|
+
deps: [],
|
|
1143
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
1144
|
+
});
|
|
1145
|
+
}
|
|
1146
|
+
static {
|
|
1147
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
1148
|
+
minVersion: "14.0.0",
|
|
1149
|
+
version: "22.2.4",
|
|
1150
|
+
ngImport: i0,
|
|
1151
|
+
type: PromptModule,
|
|
1152
|
+
imports: [
|
|
1153
|
+
CommonModule,
|
|
1154
|
+
FieldComponentModule,
|
|
1155
|
+
ButtonComponentModule,
|
|
1156
|
+
OverflowMenuComponentModule,
|
|
1157
|
+
TagComponentModule,
|
|
1158
|
+
BadgeComponentModule,
|
|
1159
|
+
CdkOverlayOrigin,
|
|
1160
|
+
CdkConnectedOverlay,
|
|
1161
|
+
CardComponentModule,
|
|
1162
|
+
CdkTextareaAutosize,
|
|
1163
|
+
TooltipComponentModule,
|
|
1164
|
+
MatTooltip,
|
|
1165
|
+
UiTranslatePipe,
|
|
1166
|
+
IconComponentModule,
|
|
1167
|
+
SkeletonComponent,
|
|
1168
|
+
PromptComponent
|
|
1169
|
+
],
|
|
1170
|
+
exports: [PromptComponent]
|
|
1171
|
+
});
|
|
1172
|
+
}
|
|
1173
|
+
static {
|
|
1174
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
1175
|
+
minVersion: "12.0.0",
|
|
1176
|
+
version: "22.2.4",
|
|
1177
|
+
ngImport: i0,
|
|
1178
|
+
type: PromptModule,
|
|
1179
|
+
imports: [
|
|
1180
|
+
CommonModule,
|
|
1181
|
+
FieldComponentModule,
|
|
1182
|
+
ButtonComponentModule,
|
|
1183
|
+
OverflowMenuComponentModule,
|
|
1184
|
+
TagComponentModule,
|
|
1185
|
+
BadgeComponentModule,
|
|
1186
|
+
CardComponentModule,
|
|
1187
|
+
TooltipComponentModule,
|
|
1188
|
+
IconComponentModule,
|
|
1189
|
+
SkeletonComponent,
|
|
1190
|
+
PromptComponent
|
|
1191
|
+
]
|
|
1192
|
+
});
|
|
1193
|
+
}
|
|
1194
|
+
};
|
|
1195
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1196
|
+
minVersion: "12.0.0",
|
|
1197
|
+
version: "22.2.4",
|
|
1198
|
+
ngImport: i0,
|
|
1199
|
+
type: PromptModule,
|
|
1200
|
+
decorators: [{
|
|
1201
|
+
type: NgModule,
|
|
1202
|
+
args: [{
|
|
1203
|
+
imports: [
|
|
1204
|
+
CommonModule,
|
|
1205
|
+
FieldComponentModule,
|
|
1206
|
+
ButtonComponentModule,
|
|
1207
|
+
OverflowMenuComponentModule,
|
|
1208
|
+
TagComponentModule,
|
|
1209
|
+
BadgeComponentModule,
|
|
1210
|
+
CdkOverlayOrigin,
|
|
1211
|
+
CdkConnectedOverlay,
|
|
1212
|
+
CardComponentModule,
|
|
1213
|
+
CdkTextareaAutosize,
|
|
1214
|
+
TooltipComponentModule,
|
|
1215
|
+
MatTooltip,
|
|
1216
|
+
UiTranslatePipe,
|
|
1217
|
+
IconComponentModule,
|
|
1218
|
+
SkeletonComponent,
|
|
1219
|
+
PromptComponent
|
|
1220
|
+
],
|
|
1221
|
+
exports: [PromptComponent]
|
|
1222
|
+
}]
|
|
1223
|
+
}]
|
|
1224
|
+
});
|
|
577
1225
|
export { PromptComponent, PromptModule };
|
|
578
|
-
|
|
1226
|
+
|
|
1227
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-prompt.mjs.map
|