@testgorilla/tgo-ui 11.22.2 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +335 -229
- package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +547 -465
- package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +160 -75
- package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +678 -278
- package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +337 -274
- package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +351 -192
- package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1950 -960
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1206 -1044
- package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +328 -182
- package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +383 -203
- package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +553 -261
- package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs +709 -739
- package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs +219 -184
- package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +515 -458
- package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +423 -162
- package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs +10784 -10996
- package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +810 -533
- package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +473 -116
- package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +1149 -540
- package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +148 -84
- package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +239 -142
- package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +599 -467
- package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +126 -70
- package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +324 -329
- package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs +969 -648
- package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +553 -419
- package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +847 -452
- package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +398 -302
- package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +162 -95
- package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1825 -1789
- package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +1018 -672
- package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +758 -368
- package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +204 -212
- package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +183 -48
- package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +243 -79
- package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +751 -361
- package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +1122 -385
- package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +689 -413
- package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +227 -92
- package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +174 -113
- package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +367 -165
- package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +253 -118
- package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +730 -444
- package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +533 -221
- package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +274 -76
- package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +184 -124
- package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1223 -574
- package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +249 -160
- package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +447 -439
- package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +226 -150
- package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +255 -67
- package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +205 -162
- package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +245 -153
- package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +274 -140
- package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +319 -147
- package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +286 -84
- package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +660 -208
- package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +579 -320
- package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +419 -200
- package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +132 -80
- package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +741 -390
- package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +455 -329
- package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +543 -514
- package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +193 -104
- package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +760 -524
- package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs +714 -415
- package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +847 -438
- package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +535 -275
- package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +316 -246
- package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +404 -284
- package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +664 -383
- package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +201 -112
- package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1014 -458
- package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
- package/fesm2022/testgorilla-tgo-ui.mjs +147 -155
- package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
- package/mcp/catalog.json +1 -1
- package/package.json +16 -17
- package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-filled.svg +3 -0
- package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-in-line.svg +3 -0
- package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
- package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
- package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
- package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
- package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
- package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
- package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
- package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
- package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
- package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
- package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
- package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
- package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
- package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
- package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
- package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
- package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
- package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
- package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
- package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
- package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
- package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
- package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
- package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
- package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
- package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
- package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
- package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
- package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
- package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
- package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
- package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
- package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
- package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
- package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
- package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
- package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
- package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
- package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
- package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
- package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
- package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
- package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
- package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
- package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
- package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
- package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
- package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
- package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
- package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
- package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
- package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
- package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
- package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
- package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
- package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
- package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
- package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
- package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
- package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
- package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
- package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
- package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
- package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
- package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
- package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
- package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
- package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
- package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
- package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
- package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
- package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
- package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
- package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
- package/types/testgorilla-tgo-ui.d.ts +52 -45
|
@@ -1,459 +1,1015 @@
|
|
|
1
|
-
import { AsyncPipe } from
|
|
2
|
-
import * as i0 from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import * as i1
|
|
6
|
-
import { FormsModule, NG_VALUE_ACCESSOR } from
|
|
7
|
-
import {
|
|
8
|
-
import * as i6 from
|
|
9
|
-
import { AiCaveatComponentModule } from
|
|
10
|
-
import * as i7 from
|
|
11
|
-
import { AlertBannerComponentModule } from
|
|
12
|
-
import * as i3 from
|
|
13
|
-
import { ButtonComponentModule } from
|
|
14
|
-
import { UiTranslatePipe } from
|
|
15
|
-
import * as i2 from
|
|
16
|
-
import { FieldComponentModule } from
|
|
17
|
-
import * as i4 from
|
|
18
|
-
import { IconComponentModule } from
|
|
19
|
-
import * as i5 from
|
|
20
|
-
import { PromptModule } from
|
|
21
|
-
import * as i8 from
|
|
22
|
-
import { TagComponentModule } from
|
|
23
|
-
import * as i1 from
|
|
24
|
-
import { HttpHeaders, HttpParams } from
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
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
|
-
], viewQueries: [{ propertyName: "tagsScrollRef", first: true, predicate: ["tagsScrollContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n class=\"write-with-ai\"\n [class.write-with-ai--standalone]=\"standalone()\"\n [class.write-with-ai--full-height]=\"fullHeight()\"\n>\n @if (!standalone()) {\n <div class=\"write-with-ai__host\">\n <ui-field\n [label]=\"fieldLabel() || (translationContext + 'FIELD_LABEL' | uiTranslate | async)!\"\n type=\"textarea\"\n [showBottomContent]=\"false\"\n [fullHeight]=\"fullHeight()\"\n [borderless]=\"borderless()\"\n [disabled]=\"cvaDisabled()\"\n [ngModel]=\"effectiveValue()\"\n (ngModelChange)=\"handleValueInput($event)\"\n ></ui-field>\n <ui-button\n class=\"write-with-ai__cta\"\n variant=\"ghost-ai\"\n size=\"small\"\n [label]=\"(translationContext + 'AI_ASSIST' | uiTranslate | async)!\"\n iconName=\"Sparkle-in-line\"\n iconPosition=\"left\"\n [disabled]=\"isPanelVisible() || cvaDisabled()\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n </div>\n }\n\n @if (isPanelVisible()) {\n <section\n class=\"write-with-ai__panel\"\n [class.write-with-ai__panel--loading]=\"effectiveStatus() === 'loading'\"\n role=\"region\"\n [attr.aria-label]=\"(translationContext + 'AI_WRITING_ASSISTANT' | uiTranslate | async)!\"\n >\n <header class=\"write-with-ai__panel-header\">\n <div class=\"write-with-ai__panel-heading\">\n <div class=\"write-with-ai__title-row\">\n @if (effectiveStatus() !== 'loading') {\n <ui-icon class=\"write-with-ai__title-icon\" name=\"Sparkle-in-line\" color=\"ai\"></ui-icon>\n }\n <h4 class=\"write-with-ai__title\">\n {{ header() || (translationContext + 'HEADER' | uiTranslate | async) }}\n </h4>\n </div>\n @if (subheader()) {\n <p class=\"write-with-ai__subheader\">{{ subheader() }}</p>\n }\n </div>\n @if (!standalone()) {\n <ui-button\n variant=\"icon-button\"\n iconName=\"Close\"\n size=\"small\"\n [tooltip]=\"(translationContext + 'CLOSE' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'CLOSE_AI_ASSISTANT' | uiTranslate | async)!\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n }\n </header>\n\n @if (effectiveStatus() === 'idle') {\n @if (tagsOnly()) {\n @if (tags().length) {\n <div class=\"write-with-ai__tags-prompt\">\n <div\n class=\"write-with-ai__tags-container\"\n role=\"group\"\n [attr.aria-label]=\"header() || (translationContext + 'HEADER' | uiTranslate | async)\"\n #tagsScrollContainer\n (scroll)=\"measureTagScroll(tagsScrollContainer)\"\n >\n @for (tag of tags(); track tag.id) {\n <ui-tag\n [label]=\"tag.label\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"cvaDisabled()\"\n (press)=\"handleTagClick(tag)\"\n ></ui-tag>\n }\n </div>\n <div class=\"write-with-ai__tags-arrows\">\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-left-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsLeft()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, -1)\"\n ></ui-button>\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-right-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsRight()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, 1)\"\n ></ui-button>\n </div>\n </div>\n }\n } @else {\n <div class=\"write-with-ai__prompt\">\n <ui-prompt\n [ngModel]=\"promptModelData()\"\n (ngModelChange)=\"handlePromptModelChange($event)\"\n [tags]=\"promptTags()\"\n [placeholder]=\"placeholder() || (translationContext + 'PLACEHOLDER' | uiTranslate | async)!\"\n [showSendButton]=\"true\"\n (promptData)=\"handlePromptSubmit($event)\"\n ></ui-prompt>\n </div>\n }\n }\n\n @if (statusConfig(); as cfg) {\n <ui-alert-banner\n [alertType]=\"cfg.alertType\"\n alertVariant=\"callout\"\n [message]=\"(cfg.messageKey | uiTranslate | async)!\"\n [includeDismissButton]=\"false\"\n [isLoading]=\"cfg.variant === 'loading'\"\n [hasIcon]=\"cfg.variant !== 'loading'\"\n [actions]=\"cfg.actions\"\n [isFullWidth]=\"true\"\n ></ui-alert-banner>\n }\n\n <div class=\"write-with-ai__caveat\">\n <ui-ai-caveat></ui-ai-caveat>\n </div>\n </section>\n }\n</div>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.write-with-ai{display:flex;flex-direction:column;gap:8px;padding-top:8px;max-width:100%;overflow:hidden}.write-with-ai--full-height{height:100%}.write-with-ai--full-height .write-with-ai__host{flex:1}.write-with-ai__host{position:relative;display:flex;flex-direction:column}.write-with-ai__cta{position:absolute;right:8px;bottom:8px;z-index:1;background-color:#fff;border-radius:100px}.write-with-ai__panel{border:none;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:8px;background-color:#f4f4f4}.write-with-ai__panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.write-with-ai__panel-heading{display:flex;flex-direction:column;gap:8px}.write-with-ai__title-row{display:flex;align-items:center;gap:8px}.write-with-ai__title{margin:0}.write-with-ai__subheader{margin:0;font-size:14px;line-height:22px;font-weight:400;color:#242424}.write-with-ai__quick-actions{display:flex;gap:8px;flex-wrap:wrap}.write-with-ai__prompt{display:flex;flex-direction:column;gap:4px}.write-with-ai__tags-prompt{display:flex;align-items:center;gap:4px;padding:8px;border:1px solid #919191;border-radius:10px;background-color:#fff}.write-with-ai__tags-container{display:flex;flex-flow:row nowrap;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.write-with-ai__tags-container::-webkit-scrollbar{display:none}.write-with-ai__tags-arrows{display:flex;align-items:center;gap:4px;flex-shrink:0}.write-with-ai__status-actions{display:flex;gap:8px;justify-content:flex-end}.write-with-ai__caveat{font-size:12px}@keyframes pulse-text{0%,to{opacity:1}50%{opacity:.5}}:host ::ng-deep .write-with-ai__host textarea{padding-bottom:48px!important}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: FieldComponentModule }, { kind: "component", type: i2.FieldComponent, selector: "ui-field", inputs: ["fullWidth", "fullHeight", "label", "labelHtml", "labelIcon", "fieldName", "placeholder", "id", "value", "badgeVariant", "errors", "disabled", "required", "readOnly", "hintMessage", "type", "updateOnBlur", "allowOnlyDigits", "isAutocompleteOff", "allowNegative", "showBottomContent", "applicationTheme", "ariaLabel", "testId", "loading", "isValid", "maxCharacters", "trimOnBlur", "trimOnSubmit", "maxRows", "hasTextAreaCounter", "hideBuiltInErrors", "hideLabelInErrors", "max", "min", "textareaHeight", "borderless", "autosizableTextarea", "isAIVariant", "ariaLabelledby", "ariaDescribedby", "hasError"], outputs: ["validateEvent", "fieldBlur"] }, { kind: "ngmodule", type: ButtonComponentModule }, { kind: "component", type: i3.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: "ngmodule", type: IconComponentModule }, { kind: "component", type: i4.IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "ngmodule", type: PromptModule }, { kind: "component", type: i5.PromptComponent, selector: "ui-prompt", inputs: ["tags", "actionTag", "secondaryActionTag", "collapseActionTags", "maxCharacters", "supportedFileTypes", "autoClear", "showSendButton", "sendButtonDisabled", "enableFileUpload", "loading", "placeholder", "errorMessage", "dropdownItems", "dropdownHeading", "showDropdownClose", "showCharacterCount", "helpText", "disabled"], outputs: ["promptData", "actionTagFileSelected", "secondaryActionTagPress", "dropdownItemSelected", "dropdownClosed"] }, { kind: "ngmodule", type: AiCaveatComponentModule }, { kind: "component", type: i6.AiCaveatComponent, selector: "ui-ai-caveat", inputs: ["applicationTheme"] }, { kind: "ngmodule", type: AlertBannerComponentModule }, { kind: "component", type: i7.AlertBannerComponent, selector: "ui-alert-banner", inputs: ["alertType", "alertVariant", "message", "includeDismissButton", "shadow", "linkText", "linkUrl", "linkTarget", "actions", "applicationTheme", "size", "isFullWidth", "closeButtonTooltip", "testId", "hasIcon", "isLoading", "fixed", "ariaDescribedby", "secondaryAlerts"], outputs: ["dismiss"] }, { kind: "ngmodule", type: TagComponentModule }, { kind: "component", type: i8.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: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
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
|
-
|
|
1
|
+
import { AsyncPipe } from "@angular/common";
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
import { ChangeDetectionStrategy, Component, DestroyRef, Injectable, NgModule, afterRenderEffect, booleanAttribute, computed, effect, forwardRef, inject, input, output, signal, untracked, viewChild } from "@angular/core";
|
|
4
|
+
import { takeUntilDestroyed, toSignal } from "@angular/core/rxjs-interop";
|
|
5
|
+
import * as i1 from "@angular/forms";
|
|
6
|
+
import { FormsModule, NG_VALUE_ACCESSOR } from "@angular/forms";
|
|
7
|
+
import { Subject, combineLatest, delay, map, of, takeUntil } from "rxjs";
|
|
8
|
+
import * as i6 from "@testgorilla/tgo-ui/components/ai-caveat";
|
|
9
|
+
import { AiCaveatComponentModule } from "@testgorilla/tgo-ui/components/ai-caveat";
|
|
10
|
+
import * as i7 from "@testgorilla/tgo-ui/components/alert-banner";
|
|
11
|
+
import { AlertBannerComponentModule } from "@testgorilla/tgo-ui/components/alert-banner";
|
|
12
|
+
import * as i3 from "@testgorilla/tgo-ui/components/button";
|
|
13
|
+
import { ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
|
|
14
|
+
import { UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
|
|
15
|
+
import * as i2 from "@testgorilla/tgo-ui/components/field";
|
|
16
|
+
import { FieldComponentModule } from "@testgorilla/tgo-ui/components/field";
|
|
17
|
+
import * as i4 from "@testgorilla/tgo-ui/components/icon";
|
|
18
|
+
import { IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
|
|
19
|
+
import * as i5 from "@testgorilla/tgo-ui/components/prompt";
|
|
20
|
+
import { PromptModule } from "@testgorilla/tgo-ui/components/prompt";
|
|
21
|
+
import * as i8 from "@testgorilla/tgo-ui/components/tag";
|
|
22
|
+
import { TagComponentModule } from "@testgorilla/tgo-ui/components/tag";
|
|
23
|
+
import * as i1$1 from "@angular/common/http";
|
|
24
|
+
import { HttpHeaders, HttpParams } from "@angular/common/http";
|
|
25
|
+
const OPENAI_DEFAULT_ENDPOINT = "https://api.openai.com/v1/chat/completions";
|
|
26
|
+
const OPENAI_DEFAULT_MODEL = "gpt-5-mini";
|
|
27
|
+
const GEMINI_DEFAULT_MODEL = "gemini-3.0-flash";
|
|
28
|
+
var WriteWithAiLlmService = class WriteWithAiLlmService {
|
|
29
|
+
constructor(http) {
|
|
30
|
+
this.http = http;
|
|
31
|
+
}
|
|
32
|
+
generate(request, config) {
|
|
33
|
+
if (!config.apiKey) return this.simulateResponse(request, config);
|
|
34
|
+
if (config.provider === "gemini") return this.callGemini(request, config);
|
|
35
|
+
return this.callOpenAi(request, config);
|
|
36
|
+
}
|
|
37
|
+
resolveEndpoint(config) {
|
|
38
|
+
return config.endpoint ?? config.baseUrl ?? OPENAI_DEFAULT_ENDPOINT;
|
|
39
|
+
}
|
|
40
|
+
callOpenAi(request, config) {
|
|
41
|
+
const endpoint = this.resolveEndpoint(config);
|
|
42
|
+
const body = {
|
|
43
|
+
model: config.model ?? OPENAI_DEFAULT_MODEL,
|
|
44
|
+
messages: [{
|
|
45
|
+
role: "system",
|
|
46
|
+
content: this.buildSystemMessage(request.sourceText, request.context ?? config.context)
|
|
47
|
+
}, {
|
|
48
|
+
role: "user",
|
|
49
|
+
content: request.prompt
|
|
50
|
+
}]
|
|
51
|
+
};
|
|
52
|
+
const headers = new HttpHeaders({
|
|
53
|
+
"Content-Type": "application/json",
|
|
54
|
+
Authorization: `Bearer ${config.apiKey}`
|
|
55
|
+
});
|
|
56
|
+
return this.http.post(endpoint, body, { headers }).pipe(map((res) => res.choices[0]?.message?.content ?? ""));
|
|
57
|
+
}
|
|
58
|
+
callGemini(request, config) {
|
|
59
|
+
const model = config.model ?? GEMINI_DEFAULT_MODEL;
|
|
60
|
+
const baseUrl = config.endpoint ?? config.baseUrl ?? `https://generativelanguage.googleapis.com/v1beta/models/${model}:generateContent`;
|
|
61
|
+
const body = {
|
|
62
|
+
system_instruction: { parts: [{ text: this.buildSystemMessage(request.sourceText, request.context ?? config.context) }] },
|
|
63
|
+
contents: [{
|
|
64
|
+
role: "user",
|
|
65
|
+
parts: [{ text: request.prompt }]
|
|
66
|
+
}]
|
|
67
|
+
};
|
|
68
|
+
const apiKey = config.apiKey;
|
|
69
|
+
if (!apiKey) return this.simulateResponse(request, config);
|
|
70
|
+
const headers = new HttpHeaders({ "Content-Type": "application/json" });
|
|
71
|
+
const params = new HttpParams().set("key", apiKey);
|
|
72
|
+
return this.http.post(baseUrl, body, {
|
|
73
|
+
headers,
|
|
74
|
+
params
|
|
75
|
+
}).pipe(map((res) => res.candidates?.[0]?.content?.parts?.[0]?.text ?? ""));
|
|
76
|
+
}
|
|
77
|
+
simulateResponse(request, _config) {
|
|
78
|
+
const source = request.sourceText?.trim();
|
|
79
|
+
const prompt = request.prompt?.trim();
|
|
80
|
+
let response;
|
|
81
|
+
if (source && prompt) response = `Based on the following text:\n\n"${source.length > 200 ? `${source.substring(0, 200)}…` : source}"\n\nHere is the result for "${prompt}":\n\n${this.generatePlaceholderContent(prompt, source)}`;
|
|
82
|
+
else if (prompt) response = this.generatePlaceholderContent(prompt, "");
|
|
83
|
+
else response = "Please provide a prompt describing what you would like me to write.";
|
|
84
|
+
return of(response).pipe(delay(1200));
|
|
85
|
+
}
|
|
86
|
+
generatePlaceholderContent(prompt, source) {
|
|
87
|
+
const lower = prompt.toLowerCase();
|
|
88
|
+
if (lower.includes("shorter") || lower.includes("concise") || lower.includes("summarize")) {
|
|
89
|
+
const sentences = source.split(/[.!?]+/).filter((s) => s.trim());
|
|
90
|
+
if (sentences.length > 1) return `${sentences.slice(0, Math.ceil(sentences.length / 2)).join(". ").trim()}.`;
|
|
91
|
+
return `${source.substring(0, Math.ceil(source.length * .6)).trim()}…`;
|
|
92
|
+
}
|
|
93
|
+
if (lower.includes("formal") || lower.includes("professional") || lower.includes("tone")) return `Dear Recipient,\n\nI hope this message finds you well. ${source || "I am writing to follow up on our recent discussion."}\n\nPlease do not hesitate to reach out should you require further information.\n\nBest regards`;
|
|
94
|
+
if (lower.includes("email") || lower.includes("draft") || lower.includes("write")) return `Subject: Follow-up\n\nHi there,\n\n${source || "Thank you for your time. I wanted to reach out regarding the next steps."}\n\nLooking forward to hearing from you.\n\nBest regards`;
|
|
95
|
+
return `[Simulated LLM response]\n\nPrompt: ${prompt}\n\nThis is a simulated response. To enable real LLM calls, provide an apiKey in the llmConfig input. The service supports OpenAI-compatible and Gemini endpoints.`;
|
|
96
|
+
}
|
|
97
|
+
buildSystemMessage(sourceText, context) {
|
|
98
|
+
const parts = [];
|
|
99
|
+
if (context) parts.push(context);
|
|
100
|
+
if (sourceText) parts.push(`The user is working with the following source text:\n\n"""${sourceText}"""`);
|
|
101
|
+
parts.push("Respond with only the requested content. Do not include explanations or preamble.");
|
|
102
|
+
return parts.join("\n\n");
|
|
103
|
+
}
|
|
104
|
+
static {
|
|
105
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
106
|
+
minVersion: "12.0.0",
|
|
107
|
+
version: "22.2.4",
|
|
108
|
+
ngImport: i0,
|
|
109
|
+
type: WriteWithAiLlmService,
|
|
110
|
+
deps: [{ token: i1$1.HttpClient }],
|
|
111
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
116
|
+
minVersion: "12.0.0",
|
|
117
|
+
version: "22.2.4",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: WriteWithAiLlmService,
|
|
120
|
+
providedIn: "root"
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
};
|
|
124
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
125
|
+
minVersion: "12.0.0",
|
|
126
|
+
version: "22.2.4",
|
|
127
|
+
ngImport: i0,
|
|
128
|
+
type: WriteWithAiLlmService,
|
|
129
|
+
decorators: [{
|
|
130
|
+
type: Injectable,
|
|
131
|
+
args: [{ providedIn: "root" }]
|
|
132
|
+
}],
|
|
133
|
+
ctorParameters: () => [{ type: i1$1.HttpClient }]
|
|
134
|
+
});
|
|
135
|
+
var WriteWithAiComponent = class WriteWithAiComponent {
|
|
136
|
+
constructor() {
|
|
137
|
+
this.value = input("", ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
|
|
138
|
+
this.standalone = input(false, ...ngDevMode ? [{ debugName: "standalone" }] : /* istanbul ignore next */ []);
|
|
139
|
+
this.defaultOpen = input(false, ...ngDevMode ? [{ debugName: "defaultOpen" }] : /* istanbul ignore next */ []);
|
|
140
|
+
this.fieldLabel = input("", ...ngDevMode ? [{ debugName: "fieldLabel" }] : /* istanbul ignore next */ []);
|
|
141
|
+
this.header = input("", ...ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []);
|
|
142
|
+
this.placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
|
|
143
|
+
this.promptValue = input("", ...ngDevMode ? [{ debugName: "promptValue" }] : /* istanbul ignore next */ []);
|
|
144
|
+
this.tags = input([], ...ngDevMode ? [{ debugName: "tags" }] : /* istanbul ignore next */ []);
|
|
145
|
+
this.status = input("idle", ...ngDevMode ? [{ debugName: "status" }] : /* istanbul ignore next */ []);
|
|
146
|
+
this.subheader = input(void 0, ...ngDevMode ? [{ debugName: "subheader" }] : /* istanbul ignore next */ []);
|
|
147
|
+
this.llmConfig = input(void 0, ...ngDevMode ? [{ debugName: "llmConfig" }] : /* istanbul ignore next */ []);
|
|
148
|
+
this.fullHeight = input(false, ...ngDevMode ? [{ debugName: "fullHeight" }] : /* istanbul ignore next */ []);
|
|
149
|
+
this.borderless = input(false, ...ngDevMode ? [{ debugName: "borderless" }] : /* istanbul ignore next */ []);
|
|
150
|
+
this.tagsOnly = input(false, {
|
|
151
|
+
...ngDevMode ? { debugName: "tagsOnly" } : /* istanbul ignore next */ {},
|
|
152
|
+
transform: booleanAttribute
|
|
153
|
+
});
|
|
154
|
+
this.metadata = input({}, ...ngDevMode ? [{ debugName: "metadata" }] : /* istanbul ignore next */ []);
|
|
155
|
+
this.valueChange = output();
|
|
156
|
+
this.promptChange = output();
|
|
157
|
+
this.promptSubmit = output();
|
|
158
|
+
this.cancelPending = output();
|
|
159
|
+
this.acceptResult = output();
|
|
160
|
+
this.requestRefine = output();
|
|
161
|
+
this.destroyRef = inject(DestroyRef);
|
|
162
|
+
this.llmService = inject(WriteWithAiLlmService);
|
|
163
|
+
this.uiTranslate = inject(UiTranslatePipe);
|
|
164
|
+
this.promptModel = signal("", ...ngDevMode ? [{ debugName: "promptModel" }] : /* istanbul ignore next */ []);
|
|
165
|
+
this.isPanelManuallyOpen = signal(false, ...ngDevMode ? [{ debugName: "isPanelManuallyOpen" }] : /* istanbul ignore next */ []);
|
|
166
|
+
this.internalStatus = signal("idle", ...ngDevMode ? [{ debugName: "internalStatus" }] : /* istanbul ignore next */ []);
|
|
167
|
+
this.internalValue = signal("", ...ngDevMode ? [{ debugName: "internalValue" }] : /* istanbul ignore next */ []);
|
|
168
|
+
this.cancelRequest$ = new Subject();
|
|
169
|
+
this.cvaDisabled = signal(false, ...ngDevMode ? [{ debugName: "cvaDisabled" }] : /* istanbul ignore next */ []);
|
|
170
|
+
this.tagsScrollRef = viewChild("tagsScrollContainer", ...ngDevMode ? [{ debugName: "tagsScrollRef" }] : /* istanbul ignore next */ []);
|
|
171
|
+
this.canScrollTagsLeft = signal(false, ...ngDevMode ? [{ debugName: "canScrollTagsLeft" }] : /* istanbul ignore next */ []);
|
|
172
|
+
this.canScrollTagsRight = signal(false, ...ngDevMode ? [{ debugName: "canScrollTagsRight" }] : /* istanbul ignore next */ []);
|
|
173
|
+
this.onChange = () => {};
|
|
174
|
+
this.onTouched = () => {};
|
|
175
|
+
this.translationContext = "WRITE_WITH_AI.";
|
|
176
|
+
this.labels = toSignal(combineLatest([
|
|
177
|
+
this.uiTranslate.transform(`${this.translationContext}CANCEL`),
|
|
178
|
+
this.uiTranslate.transform(`${this.translationContext}ACCEPT`),
|
|
179
|
+
this.uiTranslate.transform(`${this.translationContext}MAKE_CHANGES`),
|
|
180
|
+
this.uiTranslate.transform(`${this.translationContext}TRY_AGAIN`)
|
|
181
|
+
]).pipe(map(([cancel, accept, makeChanges, tryAgain]) => ({
|
|
182
|
+
cancel,
|
|
183
|
+
accept,
|
|
184
|
+
makeChanges,
|
|
185
|
+
tryAgain
|
|
186
|
+
}))), { initialValue: {
|
|
187
|
+
cancel: "",
|
|
188
|
+
accept: "",
|
|
189
|
+
makeChanges: "",
|
|
190
|
+
tryAgain: ""
|
|
191
|
+
} });
|
|
192
|
+
this.isDefaultMode = computed(() => this.llmConfig()?.default === true, ...ngDevMode ? [{ debugName: "isDefaultMode" }] : /* istanbul ignore next */ []);
|
|
193
|
+
this.effectiveStatus = computed(() => this.isDefaultMode() ? this.internalStatus() : this.status(), ...ngDevMode ? [{ debugName: "effectiveStatus" }] : /* istanbul ignore next */ []);
|
|
194
|
+
this.effectiveValue = computed(() => this.isDefaultMode() ? this.internalValue() : this.value(), ...ngDevMode ? [{ debugName: "effectiveValue" }] : /* istanbul ignore next */ []);
|
|
195
|
+
this.isPanelVisible = computed(() => this.standalone() || this.isPanelManuallyOpen(), ...ngDevMode ? [{ debugName: "isPanelVisible" }] : /* istanbul ignore next */ []);
|
|
196
|
+
this.promptTags = computed(() => this.tags().map((tag) => ({
|
|
197
|
+
id: tag.id,
|
|
198
|
+
label: tag.label,
|
|
199
|
+
autocomplete: tag.description ?? ""
|
|
200
|
+
})), ...ngDevMode ? [{ debugName: "promptTags" }] : /* istanbul ignore next */ []);
|
|
201
|
+
this.statusConfig = computed(() => {
|
|
202
|
+
const l = this.labels();
|
|
203
|
+
switch (this.effectiveStatus()) {
|
|
204
|
+
case "loading": return {
|
|
205
|
+
variant: "loading",
|
|
206
|
+
alertType: "info",
|
|
207
|
+
messageKey: `${this.translationContext}WRITING`,
|
|
208
|
+
actions: [{
|
|
209
|
+
label: l.cancel,
|
|
210
|
+
onClick: () => this.handleCancel()
|
|
211
|
+
}]
|
|
212
|
+
};
|
|
213
|
+
case "success": return {
|
|
214
|
+
variant: "success",
|
|
215
|
+
alertType: "success",
|
|
216
|
+
messageKey: `${this.translationContext}CONTENT_GENERATED`,
|
|
217
|
+
actions: [{
|
|
218
|
+
label: l.makeChanges,
|
|
219
|
+
onClick: () => this.handleRefine()
|
|
220
|
+
}, {
|
|
221
|
+
label: l.accept,
|
|
222
|
+
onClick: () => this.handleAccept()
|
|
223
|
+
}]
|
|
224
|
+
};
|
|
225
|
+
case "error": return {
|
|
226
|
+
variant: "error",
|
|
227
|
+
alertType: "error",
|
|
228
|
+
messageKey: `${this.translationContext}ERROR_MESSAGE`,
|
|
229
|
+
actions: [{
|
|
230
|
+
label: l.tryAgain,
|
|
231
|
+
onClick: () => this.handleRefine()
|
|
232
|
+
}]
|
|
233
|
+
};
|
|
234
|
+
case "idle": return null;
|
|
235
|
+
default: return null;
|
|
236
|
+
}
|
|
237
|
+
}, ...ngDevMode ? [{ debugName: "statusConfig" }] : /* istanbul ignore next */ []);
|
|
238
|
+
this.promptModelData = computed(() => ({
|
|
239
|
+
text: this.promptModel(),
|
|
240
|
+
files: []
|
|
241
|
+
}), ...ngDevMode ? [{ debugName: "promptModelData" }] : /* istanbul ignore next */ []);
|
|
242
|
+
effect(() => {
|
|
243
|
+
const promptValue = this.promptValue();
|
|
244
|
+
if (!this.isDefaultMode()) untracked(() => this.promptModel.set(promptValue));
|
|
245
|
+
});
|
|
246
|
+
effect(() => {
|
|
247
|
+
const value = this.value();
|
|
248
|
+
if (this.isDefaultMode()) untracked(() => this.internalValue.set(value));
|
|
249
|
+
});
|
|
250
|
+
afterRenderEffect({ read: () => {
|
|
251
|
+
this.tags();
|
|
252
|
+
const el = this.tagsScrollRef()?.nativeElement;
|
|
253
|
+
if (el) this.measureTagScroll(el);
|
|
254
|
+
} });
|
|
255
|
+
effect((onCleanup) => {
|
|
256
|
+
const el = this.tagsScrollRef()?.nativeElement;
|
|
257
|
+
if (!el || typeof ResizeObserver === "undefined") return;
|
|
258
|
+
const observer = new ResizeObserver(() => this.measureTagScroll(el));
|
|
259
|
+
observer.observe(el);
|
|
260
|
+
onCleanup(() => observer.disconnect());
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
handlePromptModelChange(value) {
|
|
264
|
+
const text = typeof value === "string" ? value : value?.text ?? "";
|
|
265
|
+
this.promptModel.set(text);
|
|
266
|
+
this.promptChange.emit(text);
|
|
267
|
+
}
|
|
268
|
+
ngOnInit() {
|
|
269
|
+
if (this.defaultOpen()) this.isPanelManuallyOpen.set(true);
|
|
270
|
+
}
|
|
271
|
+
togglePanel() {
|
|
272
|
+
if (this.standalone()) return;
|
|
273
|
+
this.isPanelManuallyOpen.update((current) => !current);
|
|
274
|
+
}
|
|
275
|
+
handleValueInput(value) {
|
|
276
|
+
if (this.isDefaultMode()) this.internalValue.set(value);
|
|
277
|
+
this.valueChange.emit(value);
|
|
278
|
+
this.onChange(value);
|
|
279
|
+
this.onTouched();
|
|
280
|
+
}
|
|
281
|
+
handlePromptSubmit(promptData) {
|
|
282
|
+
const prompt = typeof promptData === "string" ? promptData : promptData?.text ?? this.promptModel();
|
|
283
|
+
this.promptModel.set(prompt);
|
|
284
|
+
this.promptChange.emit(prompt);
|
|
285
|
+
const submitEvent = {
|
|
286
|
+
prompt,
|
|
287
|
+
content: this.effectiveValue(),
|
|
288
|
+
metadata: this.metadata()
|
|
289
|
+
};
|
|
290
|
+
if (this.isDefaultMode()) this.executeDefaultFlow(prompt);
|
|
291
|
+
this.promptSubmit.emit(submitEvent);
|
|
292
|
+
}
|
|
293
|
+
handleTagClick(tag) {
|
|
294
|
+
if (this.cvaDisabled()) return;
|
|
295
|
+
this.handlePromptSubmit(tag.label);
|
|
296
|
+
}
|
|
297
|
+
measureTagScroll(el) {
|
|
298
|
+
this.canScrollTagsLeft.set(el.scrollLeft > 0);
|
|
299
|
+
this.canScrollTagsRight.set(Math.ceil(el.scrollLeft + el.clientWidth) < el.scrollWidth);
|
|
300
|
+
}
|
|
301
|
+
scrollTags(el, direction) {
|
|
302
|
+
el.scrollBy({
|
|
303
|
+
left: direction * el.clientWidth * .8,
|
|
304
|
+
behavior: "smooth"
|
|
305
|
+
});
|
|
306
|
+
}
|
|
307
|
+
handlePrimaryAction() {
|
|
308
|
+
const status = this.effectiveStatus();
|
|
309
|
+
if (status === "loading") this.handleCancel();
|
|
310
|
+
else if (status === "success") this.handleAccept();
|
|
311
|
+
else if (status === "error") this.handleRefine();
|
|
312
|
+
}
|
|
313
|
+
handleSecondaryAction() {
|
|
314
|
+
if (this.effectiveStatus() === "success") this.handleRefine();
|
|
315
|
+
}
|
|
316
|
+
writeValue(value) {
|
|
317
|
+
const v = value ?? "";
|
|
318
|
+
if (this.isDefaultMode()) this.internalValue.set(v);
|
|
319
|
+
this.internalValue.set(v);
|
|
320
|
+
}
|
|
321
|
+
registerOnChange(fn) {
|
|
322
|
+
this.onChange = fn;
|
|
323
|
+
}
|
|
324
|
+
registerOnTouched(fn) {
|
|
325
|
+
this.onTouched = fn;
|
|
326
|
+
}
|
|
327
|
+
setDisabledState(isDisabled) {
|
|
328
|
+
this.cvaDisabled.set(isDisabled);
|
|
329
|
+
}
|
|
330
|
+
executeDefaultFlow(prompt) {
|
|
331
|
+
const config = this.llmConfig();
|
|
332
|
+
if (!config) return;
|
|
333
|
+
this.cancelRequest$.next();
|
|
334
|
+
this.internalStatus.set("loading");
|
|
335
|
+
this.llmService.generate({
|
|
336
|
+
sourceText: this.effectiveValue(),
|
|
337
|
+
prompt,
|
|
338
|
+
context: config.context
|
|
339
|
+
}, config).pipe(takeUntilDestroyed(this.destroyRef), takeUntil(this.cancelRequest$)).subscribe({
|
|
340
|
+
next: (result) => {
|
|
341
|
+
this.internalValue.set(result);
|
|
342
|
+
this.valueChange.emit(result);
|
|
343
|
+
this.onChange(result);
|
|
344
|
+
this.internalStatus.set("success");
|
|
345
|
+
},
|
|
346
|
+
error: () => {
|
|
347
|
+
this.internalStatus.set("error");
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
handleCancel() {
|
|
352
|
+
if (this.isDefaultMode()) {
|
|
353
|
+
this.cancelRequest$.next();
|
|
354
|
+
this.internalStatus.set("idle");
|
|
355
|
+
}
|
|
356
|
+
this.cancelPending.emit();
|
|
357
|
+
}
|
|
358
|
+
handleAccept() {
|
|
359
|
+
if (this.isDefaultMode()) {
|
|
360
|
+
this.internalStatus.set("idle");
|
|
361
|
+
this.promptModel.set("");
|
|
362
|
+
}
|
|
363
|
+
if (!this.standalone()) this.isPanelManuallyOpen.set(false);
|
|
364
|
+
this.acceptResult.emit();
|
|
365
|
+
}
|
|
366
|
+
handleRefine() {
|
|
367
|
+
if (this.isDefaultMode()) this.internalStatus.set("idle");
|
|
368
|
+
this.requestRefine.emit();
|
|
369
|
+
}
|
|
370
|
+
static {
|
|
371
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
372
|
+
minVersion: "12.0.0",
|
|
373
|
+
version: "22.2.4",
|
|
374
|
+
ngImport: i0,
|
|
375
|
+
type: WriteWithAiComponent,
|
|
376
|
+
deps: [],
|
|
377
|
+
target: i0.ɵɵFactoryTarget.Component
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
static {
|
|
381
|
+
this.ɵcmp = i0.ɵɵngDeclareComponent({
|
|
382
|
+
minVersion: "17.0.0",
|
|
383
|
+
version: "22.2.4",
|
|
384
|
+
type: WriteWithAiComponent,
|
|
385
|
+
isStandalone: true,
|
|
386
|
+
selector: "ui-write-with-ai",
|
|
387
|
+
inputs: {
|
|
388
|
+
value: {
|
|
389
|
+
classPropertyName: "value",
|
|
390
|
+
publicName: "value",
|
|
391
|
+
isSignal: true,
|
|
392
|
+
isRequired: false,
|
|
393
|
+
transformFunction: null
|
|
394
|
+
},
|
|
395
|
+
standalone: {
|
|
396
|
+
classPropertyName: "standalone",
|
|
397
|
+
publicName: "standalone",
|
|
398
|
+
isSignal: true,
|
|
399
|
+
isRequired: false,
|
|
400
|
+
transformFunction: null
|
|
401
|
+
},
|
|
402
|
+
defaultOpen: {
|
|
403
|
+
classPropertyName: "defaultOpen",
|
|
404
|
+
publicName: "defaultOpen",
|
|
405
|
+
isSignal: true,
|
|
406
|
+
isRequired: false,
|
|
407
|
+
transformFunction: null
|
|
408
|
+
},
|
|
409
|
+
fieldLabel: {
|
|
410
|
+
classPropertyName: "fieldLabel",
|
|
411
|
+
publicName: "fieldLabel",
|
|
412
|
+
isSignal: true,
|
|
413
|
+
isRequired: false,
|
|
414
|
+
transformFunction: null
|
|
415
|
+
},
|
|
416
|
+
header: {
|
|
417
|
+
classPropertyName: "header",
|
|
418
|
+
publicName: "header",
|
|
419
|
+
isSignal: true,
|
|
420
|
+
isRequired: false,
|
|
421
|
+
transformFunction: null
|
|
422
|
+
},
|
|
423
|
+
placeholder: {
|
|
424
|
+
classPropertyName: "placeholder",
|
|
425
|
+
publicName: "placeholder",
|
|
426
|
+
isSignal: true,
|
|
427
|
+
isRequired: false,
|
|
428
|
+
transformFunction: null
|
|
429
|
+
},
|
|
430
|
+
promptValue: {
|
|
431
|
+
classPropertyName: "promptValue",
|
|
432
|
+
publicName: "promptValue",
|
|
433
|
+
isSignal: true,
|
|
434
|
+
isRequired: false,
|
|
435
|
+
transformFunction: null
|
|
436
|
+
},
|
|
437
|
+
tags: {
|
|
438
|
+
classPropertyName: "tags",
|
|
439
|
+
publicName: "tags",
|
|
440
|
+
isSignal: true,
|
|
441
|
+
isRequired: false,
|
|
442
|
+
transformFunction: null
|
|
443
|
+
},
|
|
444
|
+
status: {
|
|
445
|
+
classPropertyName: "status",
|
|
446
|
+
publicName: "status",
|
|
447
|
+
isSignal: true,
|
|
448
|
+
isRequired: false,
|
|
449
|
+
transformFunction: null
|
|
450
|
+
},
|
|
451
|
+
subheader: {
|
|
452
|
+
classPropertyName: "subheader",
|
|
453
|
+
publicName: "subheader",
|
|
454
|
+
isSignal: true,
|
|
455
|
+
isRequired: false,
|
|
456
|
+
transformFunction: null
|
|
457
|
+
},
|
|
458
|
+
llmConfig: {
|
|
459
|
+
classPropertyName: "llmConfig",
|
|
460
|
+
publicName: "llmConfig",
|
|
461
|
+
isSignal: true,
|
|
462
|
+
isRequired: false,
|
|
463
|
+
transformFunction: null
|
|
464
|
+
},
|
|
465
|
+
fullHeight: {
|
|
466
|
+
classPropertyName: "fullHeight",
|
|
467
|
+
publicName: "fullHeight",
|
|
468
|
+
isSignal: true,
|
|
469
|
+
isRequired: false,
|
|
470
|
+
transformFunction: null
|
|
471
|
+
},
|
|
472
|
+
borderless: {
|
|
473
|
+
classPropertyName: "borderless",
|
|
474
|
+
publicName: "borderless",
|
|
475
|
+
isSignal: true,
|
|
476
|
+
isRequired: false,
|
|
477
|
+
transformFunction: null
|
|
478
|
+
},
|
|
479
|
+
tagsOnly: {
|
|
480
|
+
classPropertyName: "tagsOnly",
|
|
481
|
+
publicName: "tagsOnly",
|
|
482
|
+
isSignal: true,
|
|
483
|
+
isRequired: false,
|
|
484
|
+
transformFunction: null
|
|
485
|
+
},
|
|
486
|
+
metadata: {
|
|
487
|
+
classPropertyName: "metadata",
|
|
488
|
+
publicName: "metadata",
|
|
489
|
+
isSignal: true,
|
|
490
|
+
isRequired: false,
|
|
491
|
+
transformFunction: null
|
|
492
|
+
}
|
|
493
|
+
},
|
|
494
|
+
outputs: {
|
|
495
|
+
valueChange: "valueChange",
|
|
496
|
+
promptChange: "promptChange",
|
|
497
|
+
promptSubmit: "promptSubmit",
|
|
498
|
+
cancelPending: "cancelPending",
|
|
499
|
+
acceptResult: "acceptResult",
|
|
500
|
+
requestRefine: "requestRefine"
|
|
501
|
+
},
|
|
502
|
+
host: { styleAttribute: "display: block" },
|
|
503
|
+
providers: [UiTranslatePipe, {
|
|
504
|
+
provide: NG_VALUE_ACCESSOR,
|
|
505
|
+
useExisting: forwardRef(() => WriteWithAiComponent),
|
|
506
|
+
multi: true
|
|
507
|
+
}],
|
|
508
|
+
viewQueries: [{
|
|
509
|
+
propertyName: "tagsScrollRef",
|
|
510
|
+
first: true,
|
|
511
|
+
predicate: ["tagsScrollContainer"],
|
|
512
|
+
descendants: true,
|
|
513
|
+
isSignal: true
|
|
514
|
+
}],
|
|
515
|
+
ngImport: i0,
|
|
516
|
+
template: "<div\n class=\"write-with-ai\"\n [class.write-with-ai--standalone]=\"standalone()\"\n [class.write-with-ai--full-height]=\"fullHeight()\"\n>\n @if (!standalone()) {\n <div class=\"write-with-ai__host\">\n <ui-field\n [label]=\"fieldLabel() || (translationContext + 'FIELD_LABEL' | uiTranslate | async)!\"\n type=\"textarea\"\n [showBottomContent]=\"false\"\n [fullHeight]=\"fullHeight()\"\n [borderless]=\"borderless()\"\n [disabled]=\"cvaDisabled()\"\n [ngModel]=\"effectiveValue()\"\n (ngModelChange)=\"handleValueInput($event)\"\n ></ui-field>\n <ui-button\n class=\"write-with-ai__cta\"\n variant=\"ghost-ai\"\n size=\"small\"\n [label]=\"(translationContext + 'AI_ASSIST' | uiTranslate | async)!\"\n iconName=\"Sparkle-in-line\"\n iconPosition=\"left\"\n [disabled]=\"isPanelVisible() || cvaDisabled()\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n </div>\n }\n\n @if (isPanelVisible()) {\n <section\n class=\"write-with-ai__panel\"\n [class.write-with-ai__panel--loading]=\"effectiveStatus() === 'loading'\"\n role=\"region\"\n [attr.aria-label]=\"(translationContext + 'AI_WRITING_ASSISTANT' | uiTranslate | async)!\"\n >\n <header class=\"write-with-ai__panel-header\">\n <div class=\"write-with-ai__panel-heading\">\n <div class=\"write-with-ai__title-row\">\n @if (effectiveStatus() !== 'loading') {\n <ui-icon class=\"write-with-ai__title-icon\" name=\"Sparkle-in-line\" color=\"ai\"></ui-icon>\n }\n <h4 class=\"write-with-ai__title\">\n {{ header() || (translationContext + 'HEADER' | uiTranslate | async) }}\n </h4>\n </div>\n @if (subheader()) {\n <p class=\"write-with-ai__subheader\">{{ subheader() }}</p>\n }\n </div>\n @if (!standalone()) {\n <ui-button\n variant=\"icon-button\"\n iconName=\"Close\"\n size=\"small\"\n [tooltip]=\"(translationContext + 'CLOSE' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'CLOSE_AI_ASSISTANT' | uiTranslate | async)!\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n }\n </header>\n\n @if (effectiveStatus() === 'idle') {\n @if (tagsOnly()) {\n @if (tags().length) {\n <div class=\"write-with-ai__tags-prompt\">\n <div\n class=\"write-with-ai__tags-container\"\n role=\"group\"\n [attr.aria-label]=\"header() || (translationContext + 'HEADER' | uiTranslate | async)\"\n #tagsScrollContainer\n (scroll)=\"measureTagScroll(tagsScrollContainer)\"\n >\n @for (tag of tags(); track tag.id) {\n <ui-tag\n [label]=\"tag.label\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"cvaDisabled()\"\n (press)=\"handleTagClick(tag)\"\n ></ui-tag>\n }\n </div>\n <div class=\"write-with-ai__tags-arrows\">\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-left-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsLeft()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, -1)\"\n ></ui-button>\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-right-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsRight()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, 1)\"\n ></ui-button>\n </div>\n </div>\n }\n } @else {\n <div class=\"write-with-ai__prompt\">\n <ui-prompt\n [ngModel]=\"promptModelData()\"\n (ngModelChange)=\"handlePromptModelChange($event)\"\n [tags]=\"promptTags()\"\n [placeholder]=\"placeholder() || (translationContext + 'PLACEHOLDER' | uiTranslate | async)!\"\n [showSendButton]=\"true\"\n (promptData)=\"handlePromptSubmit($event)\"\n ></ui-prompt>\n </div>\n }\n }\n\n @if (statusConfig(); as cfg) {\n <ui-alert-banner\n [alertType]=\"cfg.alertType\"\n alertVariant=\"callout\"\n [message]=\"(cfg.messageKey | uiTranslate | async)!\"\n [includeDismissButton]=\"false\"\n [isLoading]=\"cfg.variant === 'loading'\"\n [hasIcon]=\"cfg.variant !== 'loading'\"\n [actions]=\"cfg.actions\"\n [isFullWidth]=\"true\"\n ></ui-alert-banner>\n }\n\n <div class=\"write-with-ai__caveat\">\n <ui-ai-caveat></ui-ai-caveat>\n </div>\n </section>\n }\n</div>\n",
|
|
517
|
+
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}.write-with-ai{display:flex;flex-direction:column;gap:8px;padding-top:8px;max-width:100%;overflow:hidden}.write-with-ai--full-height{height:100%}.write-with-ai--full-height .write-with-ai__host{flex:1}.write-with-ai__host{position:relative;display:flex;flex-direction:column}.write-with-ai__cta{position:absolute;right:8px;bottom:8px;z-index:1;background-color:#fff;border-radius:100px}.write-with-ai__panel{border:none;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:8px;background-color:#f4f4f4}.write-with-ai__panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.write-with-ai__panel-heading{display:flex;flex-direction:column;gap:8px}.write-with-ai__title-row{display:flex;align-items:center;gap:8px}.write-with-ai__title{margin:0}.write-with-ai__subheader{margin:0;font-size:14px;line-height:22px;font-weight:400;color:#242424}.write-with-ai__quick-actions{display:flex;gap:8px;flex-wrap:wrap}.write-with-ai__prompt{display:flex;flex-direction:column;gap:4px}.write-with-ai__tags-prompt{display:flex;align-items:center;gap:4px;padding:8px;border:1px solid #919191;border-radius:10px;background-color:#fff}.write-with-ai__tags-container{display:flex;flex-flow:row nowrap;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.write-with-ai__tags-container::-webkit-scrollbar{display:none}.write-with-ai__tags-arrows{display:flex;align-items:center;gap:4px;flex-shrink:0}.write-with-ai__status-actions{display:flex;gap:8px;justify-content:flex-end}.write-with-ai__caveat{font-size:12px}@keyframes pulse-text{0%,to{opacity:1}50%{opacity:.5}}:host ::ng-deep .write-with-ai__host textarea{padding-bottom:48px!important}\n"],
|
|
518
|
+
dependencies: [
|
|
519
|
+
{
|
|
520
|
+
kind: "ngmodule",
|
|
521
|
+
type: FormsModule
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
kind: "directive",
|
|
525
|
+
type: i1.NgControlStatus,
|
|
526
|
+
selector: "[formControlName],[ngModel],[formControl]"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
kind: "directive",
|
|
530
|
+
type: i1.NgModel,
|
|
531
|
+
selector: "[ngModel]:not([formControlName]):not([formControl])",
|
|
532
|
+
inputs: [
|
|
533
|
+
"name",
|
|
534
|
+
"disabled",
|
|
535
|
+
"ngModel",
|
|
536
|
+
"ngModelOptions"
|
|
537
|
+
],
|
|
538
|
+
outputs: ["ngModelChange"],
|
|
539
|
+
exportAs: ["ngModel"]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
kind: "ngmodule",
|
|
543
|
+
type: FieldComponentModule
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
kind: "component",
|
|
547
|
+
type: i2.FieldComponent,
|
|
548
|
+
selector: "ui-field",
|
|
549
|
+
inputs: [
|
|
550
|
+
"fullWidth",
|
|
551
|
+
"fullHeight",
|
|
552
|
+
"label",
|
|
553
|
+
"labelHtml",
|
|
554
|
+
"labelIcon",
|
|
555
|
+
"fieldName",
|
|
556
|
+
"placeholder",
|
|
557
|
+
"id",
|
|
558
|
+
"value",
|
|
559
|
+
"badgeVariant",
|
|
560
|
+
"errors",
|
|
561
|
+
"disabled",
|
|
562
|
+
"required",
|
|
563
|
+
"readOnly",
|
|
564
|
+
"hintMessage",
|
|
565
|
+
"type",
|
|
566
|
+
"updateOnBlur",
|
|
567
|
+
"allowOnlyDigits",
|
|
568
|
+
"isAutocompleteOff",
|
|
569
|
+
"allowNegative",
|
|
570
|
+
"showBottomContent",
|
|
571
|
+
"applicationTheme",
|
|
572
|
+
"ariaLabel",
|
|
573
|
+
"testId",
|
|
574
|
+
"loading",
|
|
575
|
+
"isValid",
|
|
576
|
+
"maxCharacters",
|
|
577
|
+
"trimOnBlur",
|
|
578
|
+
"trimOnSubmit",
|
|
579
|
+
"maxRows",
|
|
580
|
+
"hasTextAreaCounter",
|
|
581
|
+
"hideBuiltInErrors",
|
|
582
|
+
"hideLabelInErrors",
|
|
583
|
+
"max",
|
|
584
|
+
"min",
|
|
585
|
+
"textareaHeight",
|
|
586
|
+
"borderless",
|
|
587
|
+
"autosizableTextarea",
|
|
588
|
+
"isAIVariant",
|
|
589
|
+
"ariaLabelledby",
|
|
590
|
+
"ariaDescribedby",
|
|
591
|
+
"hasError"
|
|
592
|
+
],
|
|
593
|
+
outputs: ["validateEvent", "fieldBlur"]
|
|
594
|
+
},
|
|
595
|
+
{
|
|
596
|
+
kind: "ngmodule",
|
|
597
|
+
type: ButtonComponentModule
|
|
598
|
+
},
|
|
599
|
+
{
|
|
600
|
+
kind: "component",
|
|
601
|
+
type: i3.ButtonComponent,
|
|
602
|
+
selector: "ui-button",
|
|
603
|
+
inputs: [
|
|
604
|
+
"size",
|
|
605
|
+
"variant",
|
|
606
|
+
"label",
|
|
607
|
+
"iconPosition",
|
|
608
|
+
"justIcon",
|
|
609
|
+
"iconName",
|
|
610
|
+
"trailingIconName",
|
|
611
|
+
"trailingIconFilled",
|
|
612
|
+
"disabled",
|
|
613
|
+
"loading",
|
|
614
|
+
"loadingWithLabel",
|
|
615
|
+
"fullWidth",
|
|
616
|
+
"url",
|
|
617
|
+
"urlTarget",
|
|
618
|
+
"value",
|
|
619
|
+
"tooltip",
|
|
620
|
+
"isPremium",
|
|
621
|
+
"type",
|
|
622
|
+
"companyColor",
|
|
623
|
+
"buttonBadgeConfig",
|
|
624
|
+
"applicationTheme",
|
|
625
|
+
"disabledScaleOnClick",
|
|
626
|
+
"ariaLabel",
|
|
627
|
+
"ariaExpanded",
|
|
628
|
+
"ariaControls",
|
|
629
|
+
"ariaPressed",
|
|
630
|
+
"ariaRequired",
|
|
631
|
+
"ariaLabelledby",
|
|
632
|
+
"ariaDescribedby",
|
|
633
|
+
"preventDefault",
|
|
634
|
+
"hasBackground",
|
|
635
|
+
"tooltipPosition",
|
|
636
|
+
"role",
|
|
637
|
+
"iconFilled",
|
|
638
|
+
"testId"
|
|
639
|
+
],
|
|
640
|
+
outputs: ["buttonClickEvent", "buttonHoverEvent"]
|
|
641
|
+
},
|
|
642
|
+
{
|
|
643
|
+
kind: "ngmodule",
|
|
644
|
+
type: IconComponentModule
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
kind: "component",
|
|
648
|
+
type: i4.IconComponent,
|
|
649
|
+
selector: "ui-icon",
|
|
650
|
+
inputs: [
|
|
651
|
+
"size",
|
|
652
|
+
"cssClass",
|
|
653
|
+
"name",
|
|
654
|
+
"color",
|
|
655
|
+
"filled",
|
|
656
|
+
"toggleIconStyle",
|
|
657
|
+
"applicationTheme",
|
|
658
|
+
"useFullIconName"
|
|
659
|
+
]
|
|
660
|
+
},
|
|
661
|
+
{
|
|
662
|
+
kind: "ngmodule",
|
|
663
|
+
type: PromptModule
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
kind: "component",
|
|
667
|
+
type: i5.PromptComponent,
|
|
668
|
+
selector: "ui-prompt",
|
|
669
|
+
inputs: [
|
|
670
|
+
"tags",
|
|
671
|
+
"actionTag",
|
|
672
|
+
"secondaryActionTag",
|
|
673
|
+
"collapseActionTags",
|
|
674
|
+
"maxCharacters",
|
|
675
|
+
"supportedFileTypes",
|
|
676
|
+
"autoClear",
|
|
677
|
+
"showSendButton",
|
|
678
|
+
"sendButtonDisabled",
|
|
679
|
+
"enableFileUpload",
|
|
680
|
+
"loading",
|
|
681
|
+
"placeholder",
|
|
682
|
+
"errorMessage",
|
|
683
|
+
"dropdownItems",
|
|
684
|
+
"dropdownHeading",
|
|
685
|
+
"showDropdownClose",
|
|
686
|
+
"showCharacterCount",
|
|
687
|
+
"helpText",
|
|
688
|
+
"disabled"
|
|
689
|
+
],
|
|
690
|
+
outputs: [
|
|
691
|
+
"promptData",
|
|
692
|
+
"actionTagFileSelected",
|
|
693
|
+
"secondaryActionTagPress",
|
|
694
|
+
"dropdownItemSelected",
|
|
695
|
+
"dropdownClosed"
|
|
696
|
+
]
|
|
697
|
+
},
|
|
698
|
+
{
|
|
699
|
+
kind: "ngmodule",
|
|
700
|
+
type: AiCaveatComponentModule
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
kind: "component",
|
|
704
|
+
type: i6.AiCaveatComponent,
|
|
705
|
+
selector: "ui-ai-caveat",
|
|
706
|
+
inputs: ["applicationTheme"]
|
|
707
|
+
},
|
|
708
|
+
{
|
|
709
|
+
kind: "ngmodule",
|
|
710
|
+
type: AlertBannerComponentModule
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
kind: "component",
|
|
714
|
+
type: i7.AlertBannerComponent,
|
|
715
|
+
selector: "ui-alert-banner",
|
|
716
|
+
inputs: [
|
|
717
|
+
"alertType",
|
|
718
|
+
"alertVariant",
|
|
719
|
+
"message",
|
|
720
|
+
"includeDismissButton",
|
|
721
|
+
"shadow",
|
|
722
|
+
"linkText",
|
|
723
|
+
"linkUrl",
|
|
724
|
+
"linkTarget",
|
|
725
|
+
"actions",
|
|
726
|
+
"applicationTheme",
|
|
727
|
+
"size",
|
|
728
|
+
"isFullWidth",
|
|
729
|
+
"closeButtonTooltip",
|
|
730
|
+
"testId",
|
|
731
|
+
"hasIcon",
|
|
732
|
+
"isLoading",
|
|
733
|
+
"fixed",
|
|
734
|
+
"ariaDescribedby",
|
|
735
|
+
"secondaryAlerts"
|
|
736
|
+
],
|
|
737
|
+
outputs: ["dismiss"]
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
kind: "ngmodule",
|
|
741
|
+
type: TagComponentModule
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
kind: "component",
|
|
745
|
+
type: i8.TagComponent,
|
|
746
|
+
selector: "ui-tag",
|
|
747
|
+
inputs: [
|
|
748
|
+
"label",
|
|
749
|
+
"icon",
|
|
750
|
+
"allowClose",
|
|
751
|
+
"readOnly",
|
|
752
|
+
"isSelected",
|
|
753
|
+
"showIconWhenSelected",
|
|
754
|
+
"pinnedBackground",
|
|
755
|
+
"constrainWidth",
|
|
756
|
+
"isDisabled",
|
|
757
|
+
"applicationTheme",
|
|
758
|
+
"ariaLabel",
|
|
759
|
+
"testId",
|
|
760
|
+
"ariaRequired",
|
|
761
|
+
"showBadge",
|
|
762
|
+
"notificationsAmount"
|
|
763
|
+
],
|
|
764
|
+
outputs: [
|
|
765
|
+
"isSelectedChange",
|
|
766
|
+
"close",
|
|
767
|
+
"press"
|
|
768
|
+
]
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
kind: "pipe",
|
|
772
|
+
type: AsyncPipe,
|
|
773
|
+
name: "async"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
kind: "pipe",
|
|
777
|
+
type: UiTranslatePipe,
|
|
778
|
+
name: "uiTranslate"
|
|
779
|
+
}
|
|
780
|
+
],
|
|
781
|
+
changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
782
|
+
});
|
|
783
|
+
}
|
|
784
|
+
};
|
|
785
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
786
|
+
minVersion: "12.0.0",
|
|
787
|
+
version: "22.2.4",
|
|
788
|
+
ngImport: i0,
|
|
789
|
+
type: WriteWithAiComponent,
|
|
790
|
+
decorators: [{
|
|
791
|
+
type: Component,
|
|
792
|
+
args: [{
|
|
793
|
+
selector: "ui-write-with-ai",
|
|
794
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
795
|
+
host: { style: "display: block" },
|
|
796
|
+
providers: [UiTranslatePipe, {
|
|
797
|
+
provide: NG_VALUE_ACCESSOR,
|
|
798
|
+
useExisting: forwardRef(() => WriteWithAiComponent),
|
|
799
|
+
multi: true
|
|
800
|
+
}],
|
|
801
|
+
imports: [
|
|
802
|
+
AsyncPipe,
|
|
803
|
+
FormsModule,
|
|
804
|
+
FieldComponentModule,
|
|
805
|
+
ButtonComponentModule,
|
|
806
|
+
IconComponentModule,
|
|
807
|
+
PromptModule,
|
|
808
|
+
AiCaveatComponentModule,
|
|
809
|
+
AlertBannerComponentModule,
|
|
810
|
+
TagComponentModule,
|
|
811
|
+
UiTranslatePipe
|
|
812
|
+
],
|
|
813
|
+
template: "<div\n class=\"write-with-ai\"\n [class.write-with-ai--standalone]=\"standalone()\"\n [class.write-with-ai--full-height]=\"fullHeight()\"\n>\n @if (!standalone()) {\n <div class=\"write-with-ai__host\">\n <ui-field\n [label]=\"fieldLabel() || (translationContext + 'FIELD_LABEL' | uiTranslate | async)!\"\n type=\"textarea\"\n [showBottomContent]=\"false\"\n [fullHeight]=\"fullHeight()\"\n [borderless]=\"borderless()\"\n [disabled]=\"cvaDisabled()\"\n [ngModel]=\"effectiveValue()\"\n (ngModelChange)=\"handleValueInput($event)\"\n ></ui-field>\n <ui-button\n class=\"write-with-ai__cta\"\n variant=\"ghost-ai\"\n size=\"small\"\n [label]=\"(translationContext + 'AI_ASSIST' | uiTranslate | async)!\"\n iconName=\"Sparkle-in-line\"\n iconPosition=\"left\"\n [disabled]=\"isPanelVisible() || cvaDisabled()\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n </div>\n }\n\n @if (isPanelVisible()) {\n <section\n class=\"write-with-ai__panel\"\n [class.write-with-ai__panel--loading]=\"effectiveStatus() === 'loading'\"\n role=\"region\"\n [attr.aria-label]=\"(translationContext + 'AI_WRITING_ASSISTANT' | uiTranslate | async)!\"\n >\n <header class=\"write-with-ai__panel-header\">\n <div class=\"write-with-ai__panel-heading\">\n <div class=\"write-with-ai__title-row\">\n @if (effectiveStatus() !== 'loading') {\n <ui-icon class=\"write-with-ai__title-icon\" name=\"Sparkle-in-line\" color=\"ai\"></ui-icon>\n }\n <h4 class=\"write-with-ai__title\">\n {{ header() || (translationContext + 'HEADER' | uiTranslate | async) }}\n </h4>\n </div>\n @if (subheader()) {\n <p class=\"write-with-ai__subheader\">{{ subheader() }}</p>\n }\n </div>\n @if (!standalone()) {\n <ui-button\n variant=\"icon-button\"\n iconName=\"Close\"\n size=\"small\"\n [tooltip]=\"(translationContext + 'CLOSE' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'CLOSE_AI_ASSISTANT' | uiTranslate | async)!\"\n (buttonClickEvent)=\"togglePanel()\"\n ></ui-button>\n }\n </header>\n\n @if (effectiveStatus() === 'idle') {\n @if (tagsOnly()) {\n @if (tags().length) {\n <div class=\"write-with-ai__tags-prompt\">\n <div\n class=\"write-with-ai__tags-container\"\n role=\"group\"\n [attr.aria-label]=\"header() || (translationContext + 'HEADER' | uiTranslate | async)\"\n #tagsScrollContainer\n (scroll)=\"measureTagScroll(tagsScrollContainer)\"\n >\n @for (tag of tags(); track tag.id) {\n <ui-tag\n [label]=\"tag.label\"\n [ariaLabel]=\"tag.label\"\n [isDisabled]=\"cvaDisabled()\"\n (press)=\"handleTagClick(tag)\"\n ></ui-tag>\n }\n </div>\n <div class=\"write-with-ai__tags-arrows\">\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-left-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_LEFT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsLeft()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, -1)\"\n ></ui-button>\n <ui-button\n variant=\"icon-button\"\n size=\"small\"\n iconName=\"Arrow-chevron-right-in-line\"\n [tooltip]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [ariaLabel]=\"(translationContext + 'SCROLL_TAGS_RIGHT' | uiTranslate | async)!\"\n [disabled]=\"cvaDisabled() || !canScrollTagsRight()\"\n (buttonClickEvent)=\"scrollTags(tagsScrollContainer, 1)\"\n ></ui-button>\n </div>\n </div>\n }\n } @else {\n <div class=\"write-with-ai__prompt\">\n <ui-prompt\n [ngModel]=\"promptModelData()\"\n (ngModelChange)=\"handlePromptModelChange($event)\"\n [tags]=\"promptTags()\"\n [placeholder]=\"placeholder() || (translationContext + 'PLACEHOLDER' | uiTranslate | async)!\"\n [showSendButton]=\"true\"\n (promptData)=\"handlePromptSubmit($event)\"\n ></ui-prompt>\n </div>\n }\n }\n\n @if (statusConfig(); as cfg) {\n <ui-alert-banner\n [alertType]=\"cfg.alertType\"\n alertVariant=\"callout\"\n [message]=\"(cfg.messageKey | uiTranslate | async)!\"\n [includeDismissButton]=\"false\"\n [isLoading]=\"cfg.variant === 'loading'\"\n [hasIcon]=\"cfg.variant !== 'loading'\"\n [actions]=\"cfg.actions\"\n [isFullWidth]=\"true\"\n ></ui-alert-banner>\n }\n\n <div class=\"write-with-ai__caveat\">\n <ui-ai-caveat></ui-ai-caveat>\n </div>\n </section>\n }\n</div>\n",
|
|
814
|
+
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}.write-with-ai{display:flex;flex-direction:column;gap:8px;padding-top:8px;max-width:100%;overflow:hidden}.write-with-ai--full-height{height:100%}.write-with-ai--full-height .write-with-ai__host{flex:1}.write-with-ai__host{position:relative;display:flex;flex-direction:column}.write-with-ai__cta{position:absolute;right:8px;bottom:8px;z-index:1;background-color:#fff;border-radius:100px}.write-with-ai__panel{border:none;border-radius:10px;padding:16px;display:flex;flex-direction:column;gap:8px;background-color:#f4f4f4}.write-with-ai__panel-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.write-with-ai__panel-heading{display:flex;flex-direction:column;gap:8px}.write-with-ai__title-row{display:flex;align-items:center;gap:8px}.write-with-ai__title{margin:0}.write-with-ai__subheader{margin:0;font-size:14px;line-height:22px;font-weight:400;color:#242424}.write-with-ai__quick-actions{display:flex;gap:8px;flex-wrap:wrap}.write-with-ai__prompt{display:flex;flex-direction:column;gap:4px}.write-with-ai__tags-prompt{display:flex;align-items:center;gap:4px;padding:8px;border:1px solid #919191;border-radius:10px;background-color:#fff}.write-with-ai__tags-container{display:flex;flex-flow:row nowrap;align-items:center;gap:4px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}.write-with-ai__tags-container::-webkit-scrollbar{display:none}.write-with-ai__tags-arrows{display:flex;align-items:center;gap:4px;flex-shrink:0}.write-with-ai__status-actions{display:flex;gap:8px;justify-content:flex-end}.write-with-ai__caveat{font-size:12px}@keyframes pulse-text{0%,to{opacity:1}50%{opacity:.5}}:host ::ng-deep .write-with-ai__host textarea{padding-bottom:48px!important}\n"]
|
|
815
|
+
}]
|
|
816
|
+
}],
|
|
817
|
+
ctorParameters: () => [],
|
|
818
|
+
propDecorators: {
|
|
819
|
+
value: [{
|
|
820
|
+
type: i0.Input,
|
|
821
|
+
args: [{
|
|
822
|
+
isSignal: true,
|
|
823
|
+
alias: "value",
|
|
824
|
+
required: false
|
|
825
|
+
}]
|
|
826
|
+
}],
|
|
827
|
+
standalone: [{
|
|
828
|
+
type: i0.Input,
|
|
829
|
+
args: [{
|
|
830
|
+
isSignal: true,
|
|
831
|
+
alias: "standalone",
|
|
832
|
+
required: false
|
|
833
|
+
}]
|
|
834
|
+
}],
|
|
835
|
+
defaultOpen: [{
|
|
836
|
+
type: i0.Input,
|
|
837
|
+
args: [{
|
|
838
|
+
isSignal: true,
|
|
839
|
+
alias: "defaultOpen",
|
|
840
|
+
required: false
|
|
841
|
+
}]
|
|
842
|
+
}],
|
|
843
|
+
fieldLabel: [{
|
|
844
|
+
type: i0.Input,
|
|
845
|
+
args: [{
|
|
846
|
+
isSignal: true,
|
|
847
|
+
alias: "fieldLabel",
|
|
848
|
+
required: false
|
|
849
|
+
}]
|
|
850
|
+
}],
|
|
851
|
+
header: [{
|
|
852
|
+
type: i0.Input,
|
|
853
|
+
args: [{
|
|
854
|
+
isSignal: true,
|
|
855
|
+
alias: "header",
|
|
856
|
+
required: false
|
|
857
|
+
}]
|
|
858
|
+
}],
|
|
859
|
+
placeholder: [{
|
|
860
|
+
type: i0.Input,
|
|
861
|
+
args: [{
|
|
862
|
+
isSignal: true,
|
|
863
|
+
alias: "placeholder",
|
|
864
|
+
required: false
|
|
865
|
+
}]
|
|
866
|
+
}],
|
|
867
|
+
promptValue: [{
|
|
868
|
+
type: i0.Input,
|
|
869
|
+
args: [{
|
|
870
|
+
isSignal: true,
|
|
871
|
+
alias: "promptValue",
|
|
872
|
+
required: false
|
|
873
|
+
}]
|
|
874
|
+
}],
|
|
875
|
+
tags: [{
|
|
876
|
+
type: i0.Input,
|
|
877
|
+
args: [{
|
|
878
|
+
isSignal: true,
|
|
879
|
+
alias: "tags",
|
|
880
|
+
required: false
|
|
881
|
+
}]
|
|
882
|
+
}],
|
|
883
|
+
status: [{
|
|
884
|
+
type: i0.Input,
|
|
885
|
+
args: [{
|
|
886
|
+
isSignal: true,
|
|
887
|
+
alias: "status",
|
|
888
|
+
required: false
|
|
889
|
+
}]
|
|
890
|
+
}],
|
|
891
|
+
subheader: [{
|
|
892
|
+
type: i0.Input,
|
|
893
|
+
args: [{
|
|
894
|
+
isSignal: true,
|
|
895
|
+
alias: "subheader",
|
|
896
|
+
required: false
|
|
897
|
+
}]
|
|
898
|
+
}],
|
|
899
|
+
llmConfig: [{
|
|
900
|
+
type: i0.Input,
|
|
901
|
+
args: [{
|
|
902
|
+
isSignal: true,
|
|
903
|
+
alias: "llmConfig",
|
|
904
|
+
required: false
|
|
905
|
+
}]
|
|
906
|
+
}],
|
|
907
|
+
fullHeight: [{
|
|
908
|
+
type: i0.Input,
|
|
909
|
+
args: [{
|
|
910
|
+
isSignal: true,
|
|
911
|
+
alias: "fullHeight",
|
|
912
|
+
required: false
|
|
913
|
+
}]
|
|
914
|
+
}],
|
|
915
|
+
borderless: [{
|
|
916
|
+
type: i0.Input,
|
|
917
|
+
args: [{
|
|
918
|
+
isSignal: true,
|
|
919
|
+
alias: "borderless",
|
|
920
|
+
required: false
|
|
921
|
+
}]
|
|
922
|
+
}],
|
|
923
|
+
tagsOnly: [{
|
|
924
|
+
type: i0.Input,
|
|
925
|
+
args: [{
|
|
926
|
+
isSignal: true,
|
|
927
|
+
alias: "tagsOnly",
|
|
928
|
+
required: false
|
|
929
|
+
}]
|
|
930
|
+
}],
|
|
931
|
+
metadata: [{
|
|
932
|
+
type: i0.Input,
|
|
933
|
+
args: [{
|
|
934
|
+
isSignal: true,
|
|
935
|
+
alias: "metadata",
|
|
936
|
+
required: false
|
|
937
|
+
}]
|
|
938
|
+
}],
|
|
939
|
+
valueChange: [{
|
|
940
|
+
type: i0.Output,
|
|
941
|
+
args: ["valueChange"]
|
|
942
|
+
}],
|
|
943
|
+
promptChange: [{
|
|
944
|
+
type: i0.Output,
|
|
945
|
+
args: ["promptChange"]
|
|
946
|
+
}],
|
|
947
|
+
promptSubmit: [{
|
|
948
|
+
type: i0.Output,
|
|
949
|
+
args: ["promptSubmit"]
|
|
950
|
+
}],
|
|
951
|
+
cancelPending: [{
|
|
952
|
+
type: i0.Output,
|
|
953
|
+
args: ["cancelPending"]
|
|
954
|
+
}],
|
|
955
|
+
acceptResult: [{
|
|
956
|
+
type: i0.Output,
|
|
957
|
+
args: ["acceptResult"]
|
|
958
|
+
}],
|
|
959
|
+
requestRefine: [{
|
|
960
|
+
type: i0.Output,
|
|
961
|
+
args: ["requestRefine"]
|
|
962
|
+
}],
|
|
963
|
+
tagsScrollRef: [{
|
|
964
|
+
type: i0.ViewChild,
|
|
965
|
+
args: ["tagsScrollContainer", { isSignal: true }]
|
|
966
|
+
}]
|
|
967
|
+
}
|
|
968
|
+
});
|
|
969
|
+
var WriteWithAiComponentModule = class WriteWithAiComponentModule {
|
|
970
|
+
static {
|
|
971
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
972
|
+
minVersion: "12.0.0",
|
|
973
|
+
version: "22.2.4",
|
|
974
|
+
ngImport: i0,
|
|
975
|
+
type: WriteWithAiComponentModule,
|
|
976
|
+
deps: [],
|
|
977
|
+
target: i0.ɵɵFactoryTarget.NgModule
|
|
978
|
+
});
|
|
979
|
+
}
|
|
980
|
+
static {
|
|
981
|
+
this.ɵmod = i0.ɵɵngDeclareNgModule({
|
|
982
|
+
minVersion: "14.0.0",
|
|
983
|
+
version: "22.2.4",
|
|
984
|
+
ngImport: i0,
|
|
985
|
+
type: WriteWithAiComponentModule,
|
|
986
|
+
imports: [WriteWithAiComponent],
|
|
987
|
+
exports: [WriteWithAiComponent]
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
static {
|
|
991
|
+
this.ɵinj = i0.ɵɵngDeclareInjector({
|
|
992
|
+
minVersion: "12.0.0",
|
|
993
|
+
version: "22.2.4",
|
|
994
|
+
ngImport: i0,
|
|
995
|
+
type: WriteWithAiComponentModule,
|
|
996
|
+
imports: [WriteWithAiComponent]
|
|
997
|
+
});
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
1001
|
+
minVersion: "12.0.0",
|
|
1002
|
+
version: "22.2.4",
|
|
1003
|
+
ngImport: i0,
|
|
1004
|
+
type: WriteWithAiComponentModule,
|
|
1005
|
+
decorators: [{
|
|
1006
|
+
type: NgModule,
|
|
1007
|
+
args: [{
|
|
1008
|
+
imports: [WriteWithAiComponent],
|
|
1009
|
+
exports: [WriteWithAiComponent]
|
|
1010
|
+
}]
|
|
1011
|
+
}]
|
|
1012
|
+
});
|
|
458
1013
|
export { WriteWithAiComponent, WriteWithAiComponentModule, WriteWithAiLlmService };
|
|
459
|
-
|
|
1014
|
+
|
|
1015
|
+
//# sourceMappingURL=testgorilla-tgo-ui-components-write-with-ai.mjs.map
|