@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.
Files changed (227) hide show
  1. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +335 -229
  2. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +547 -465
  4. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
  5. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +160 -75
  6. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  7. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +678 -278
  8. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  9. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +337 -274
  10. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +351 -192
  12. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  13. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1950 -960
  14. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
  15. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1206 -1044
  16. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +328 -182
  18. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  19. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +383 -203
  20. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +553 -261
  22. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +709 -739
  24. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  25. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +219 -184
  26. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +515 -458
  28. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +423 -162
  30. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +10784 -10996
  32. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +810 -533
  34. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +473 -116
  36. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +1149 -540
  38. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +148 -84
  40. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +239 -142
  42. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +599 -467
  44. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +126 -70
  46. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +324 -329
  48. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +969 -648
  50. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +553 -419
  52. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +847 -452
  54. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +398 -302
  56. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +162 -95
  58. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1825 -1789
  60. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  61. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +1018 -672
  62. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +758 -368
  64. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  65. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +204 -212
  66. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  67. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +183 -48
  68. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  69. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +243 -79
  70. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +751 -361
  72. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  73. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +1122 -385
  74. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +689 -413
  76. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +227 -92
  78. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +174 -113
  80. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +367 -165
  82. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +253 -118
  84. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +730 -444
  86. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +533 -221
  88. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +274 -76
  90. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +184 -124
  92. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1223 -574
  94. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +249 -160
  96. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  97. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +447 -439
  98. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  99. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +226 -150
  100. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  101. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +255 -67
  102. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  103. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +205 -162
  104. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  105. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +245 -153
  106. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +274 -140
  108. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +319 -147
  110. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +286 -84
  112. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +660 -208
  114. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +579 -320
  116. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +419 -200
  118. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +132 -80
  120. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  121. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +741 -390
  122. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
  123. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +455 -329
  124. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  125. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +543 -514
  126. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  127. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +193 -104
  128. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  129. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +760 -524
  130. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  131. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +714 -415
  132. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  133. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +847 -438
  134. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  135. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +535 -275
  136. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  137. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +316 -246
  138. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  139. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +404 -284
  140. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  141. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +664 -383
  142. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  143. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +201 -112
  144. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  145. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1014 -458
  146. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
  147. package/fesm2022/testgorilla-tgo-ui.mjs +147 -155
  148. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  149. package/mcp/catalog.json +1 -1
  150. package/package.json +16 -17
  151. package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-filled.svg +3 -0
  152. package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-in-line.svg +3 -0
  153. package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
  154. package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
  155. package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
  156. package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
  157. package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
  158. package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
  159. package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
  160. package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
  161. package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
  162. package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
  163. package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
  164. package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
  165. package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
  166. package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
  167. package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
  168. package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
  169. package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
  170. package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
  171. package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
  172. package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
  173. package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
  174. package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
  175. package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
  176. package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
  177. package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
  178. package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
  179. package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
  180. package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
  181. package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
  182. package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
  183. package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
  184. package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
  185. package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
  186. package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
  187. package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
  188. package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
  189. package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
  190. package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
  191. package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
  192. package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
  193. package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
  194. package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
  195. package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
  196. package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
  197. package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
  198. package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
  199. package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
  200. package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
  201. package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
  202. package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
  203. package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
  204. package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
  205. package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
  206. package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
  207. package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
  208. package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
  209. package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
  210. package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
  211. package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
  212. package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
  213. package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
  214. package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
  215. package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
  216. package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
  217. package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
  218. package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
  219. package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
  220. package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
  221. package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
  222. package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
  223. package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
  224. package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
  225. package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
  226. package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
  227. package/types/testgorilla-tgo-ui.d.ts +52 -45
@@ -1,541 +1,1150 @@
1
- import { CdkScrollable } from '@angular/cdk/scrolling';
2
- import { AsyncPipe, CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { input, booleanAttribute, EventEmitter, ContentChild, HostListener, ViewChild, Output, Input, HostBinding, Optional, Inject, ViewEncapsulation, ChangeDetectionStrategy, Component, Injectable, NgModule } from '@angular/core';
5
- import * as i1 from '@angular/material/dialog';
6
- import { MatDialogState, MAT_DIALOG_DATA, MatDialogTitle, MatDialogContent, MatDialogActions, MatDialogModule, MatDialogRef } from '@angular/material/dialog';
7
- import { ButtonComponent, ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';
8
- import { UiTranslatePipe, LanguageService } from '@testgorilla/tgo-ui/components/core';
9
- import { TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';
10
- import { ToggleComponent, ToggleComponentModule } from '@testgorilla/tgo-ui/components/toggle';
11
-
12
- class DialogComponent {
13
- onEsc() {
14
- this.dismiss();
15
- }
16
- constructor(defaultAppTheme, dialogRef, data) {
17
- this.defaultAppTheme = defaultAppTheme;
18
- this.dialogRef = dialogRef;
19
- this.data = data;
20
- /**
21
- * Dialog title
22
- *
23
- * @memberof DialogComponent
24
- */
25
- this.title = '';
26
- /**
27
- * Show close button
28
- *
29
- * @memberof DialogComponent
30
- */
31
- this.showCloseButton = true;
32
- /**
33
- * Fuction called before dialgo is closed
34
- *
35
- * @memberof DialogComponent
36
- */
37
- this.canCloseFn = () => true;
38
- /**
39
- * Secondary button label
40
- *
41
- * @memberof DialogComponent
42
- */
43
- this.secondaryButtonLabel = '';
44
- /**
45
- * Footer dialog message
46
- *
47
- * @memberof DialogComponent
48
- */
49
- this.footerMessage = '';
50
- /**
51
- * Primary button label
52
- *
53
- * @memberof DialogComponent
54
- */
55
- this.primaryButtonLabel = '';
56
- /**
57
- * Primary button icon name
58
- *
59
- * @memberof DialogComponent
60
- */
61
- this.primaryButtonIconName = '';
62
- /**
63
- * Secondary button type
64
- *
65
- * @memberof DialogComponent
66
- */
67
- this.secondaryButtonType = 'ghost';
68
- /**
69
- * Primary button type
70
- *
71
- * @memberof DialogComponent
72
- */
73
- this.primaryButtonType = 'primary';
74
- /**
75
- * Primary button test id
76
- *
77
- * @memberof DialogComponent
78
- */
79
- this.primaryButtonDataTestId = null;
80
- this.testId = null;
81
- this.closeButtonTestId = null;
82
- this.closeButtonAriaLabel = '';
83
- /**
84
- * Secondary button test id
85
- *
86
- * @memberof DialogComponent
87
- */
88
- this.secondaryButtonDataTestId = null;
89
- /**
90
- * Color of the dialog.
91
- * Defaults to Test Gorilla primary color.
92
- *
93
- * @type {string}
94
- * @memberof DialogComponent
95
- */
96
- this.companyColor = '';
97
- /**
98
- *
99
- * Defines the application theme
100
- *
101
- * @type {ApplicationTheme}
102
- * @memberof DialogComponent
103
- */
104
- this.applicationTheme = 'light';
105
- /**
106
- *
107
- * Disable primary button
108
- *
109
- * @type {boolean}
110
- * @memberof DialogComponent
111
- */
112
- this.disablePrimaryButton = false;
113
- /**
114
- *
115
- * Show a spinner in place of the primary button label while the action runs.
116
- * Also disables the button, so a second click cannot fire
117
- * `primaryButtonClickEvent` while the first is still in flight.
118
- *
119
- * @memberof DialogComponent
120
- */
121
- this.primaryButtonLoading = input(false, { ...(ngDevMode ? { debugName: "primaryButtonLoading" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
122
- /**
123
- *
124
- * Tooltip shown when hovering the primary button. Bound to a wrapper around the
125
- * button so it also shows while the button is disabled (a disabled button
126
- * receives no pointer events), e.g. to explain why the action is unavailable.
127
- *
128
- * @type {string}
129
- * @memberof DialogComponent
130
- */
131
- this.primaryButtonTooltip = '';
132
- /**
133
- *
134
- * Disable close button
135
- *
136
- * @type {boolean}
137
- * @memberof DialogComponent
138
- */
139
- this.disableClose = false;
140
- /**
141
- *
142
- * Disable button when canCloseFn is used
143
- *
144
- * @type {boolean}
145
- * @memberof DialogComponent
146
- */
147
- this.shouldDisableButtons = true;
148
- /**
149
- * A string representing the ARIA requirement for accessibility.
150
- * This attribute is used to indicate whether an input field is required for form submission.
151
- * @type {string}
152
- * @memberof DialogComponent
153
- */
154
- this.ariaLabelledby = '';
155
- /**
156
- * A string representing the ARIA requirement for accessibility.
157
- * This attribute is used to indicate whether an input field is required for form submission.
158
- * @type {string}
159
- * @memberof DialogComponent
160
- */
161
- this.ariaDescribedby = '';
162
- /**
163
- * Defines how modal was opened (with keyboard or not)
164
- *
165
- * @type {boolean}
166
- * @memberof DialogComponent
167
- */
168
- this.keyboardOpen = false;
169
- this.primaryButtonIconPosition = input('left', ...(ngDevMode ? [{ debugName: "primaryButtonIconPosition" }] : /* istanbul ignore next */ []));
170
- this.closeEvent = new EventEmitter();
171
- this.secondaryButtonClickEvent = new EventEmitter();
172
- this.primaryButtonClickEvent = new EventEmitter();
173
- this.modalClosed = false;
174
- this.disableButtons = false;
175
- this.translationContext = 'DIALOG.';
176
- if (defaultAppTheme) {
177
- this.applicationTheme = defaultAppTheme;
178
- }
179
- }
180
- get hasCustomHeader() {
181
- return Boolean(this.customHeader);
182
- }
183
- ngOnInit() {
184
- this.areButtonsDisabled();
185
- if (this.data?.applicationTheme) {
186
- this.applicationTheme = this.data.applicationTheme;
187
- }
188
- if (this.applicationTheme !== 'classic') {
189
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour
190
- this.companyColor = this.companyColor || '#D410AA';
191
- }
192
- else {
193
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour
194
- this.companyColor = this.companyColor || '#46A997';
195
- }
196
- }
197
- ngOnChanges(changes) {
198
- if (changes['canCloseFn']) {
199
- this.dialogRef.disableClose = !this.canCloseFn();
200
- this.areButtonsDisabled();
201
- }
202
- }
203
- ngAfterViewInit() {
204
- if (this.keyboardOpen) {
205
- setTimeout(() => {
206
- this.closeButton.buttonElement.focus('keyboard');
207
- }, 100);
208
- }
209
- }
210
- //Disable primary button when canClose is false
211
- areButtonsDisabled() {
212
- this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;
213
- }
214
- //Close modal
215
- dismiss() {
216
- if (this.canCloseFn()) {
217
- this.dialogRef.disableClose = false;
218
- this.dialogRef.close();
219
- this.modalClosed = true;
220
- }
221
- }
222
- onClose(event) {
223
- this.closeEvent.emit(event);
224
- this.modalClosed = true;
225
- }
226
- onSecondaryButtonClick(event) {
227
- this.secondaryButtonClickEvent.emit(event);
228
- }
229
- onPrimaryButtonClick(event) {
230
- this.primaryButtonClickEvent.emit(event);
231
- // The consumer may have closed the dialog with its own result. Closing again
232
- // would overwrite that result with undefined, and consumers read a missing
233
- // result as a cancel (ASM-157).
234
- if (this.dialogRef.getState() === MatDialogState.OPEN) {
235
- this.dismiss();
236
- }
237
- }
238
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
239
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: DialogComponent, isStandalone: true, selector: "ui-dialog", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: false, isRequired: false, transformFunction: null }, showCloseButton: { classPropertyName: "showCloseButton", publicName: "showCloseButton", isSignal: false, isRequired: false, transformFunction: null }, canCloseFn: { classPropertyName: "canCloseFn", publicName: "canCloseFn", isSignal: false, isRequired: false, transformFunction: null }, secondaryButtonLabel: { classPropertyName: "secondaryButtonLabel", publicName: "secondaryButtonLabel", isSignal: false, isRequired: false, transformFunction: null }, footerMessage: { classPropertyName: "footerMessage", publicName: "footerMessage", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonLabel: { classPropertyName: "primaryButtonLabel", publicName: "primaryButtonLabel", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonIconName: { classPropertyName: "primaryButtonIconName", publicName: "primaryButtonIconName", isSignal: false, isRequired: false, transformFunction: null }, secondaryButtonType: { classPropertyName: "secondaryButtonType", publicName: "secondaryButtonType", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonType: { classPropertyName: "primaryButtonType", publicName: "primaryButtonType", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonDataTestId: { classPropertyName: "primaryButtonDataTestId", publicName: "primaryButtonDataTestId", isSignal: false, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: false, isRequired: false, transformFunction: null }, closeButtonTestId: { classPropertyName: "closeButtonTestId", publicName: "closeButtonTestId", isSignal: false, isRequired: false, transformFunction: null }, closeButtonAriaLabel: { classPropertyName: "closeButtonAriaLabel", publicName: "closeButtonAriaLabel", isSignal: false, isRequired: false, transformFunction: null }, secondaryButtonDataTestId: { classPropertyName: "secondaryButtonDataTestId", publicName: "secondaryButtonDataTestId", isSignal: false, isRequired: false, transformFunction: null }, companyColor: { classPropertyName: "companyColor", publicName: "companyColor", isSignal: false, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: false, isRequired: false, transformFunction: null }, disablePrimaryButton: { classPropertyName: "disablePrimaryButton", publicName: "disablePrimaryButton", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonLoading: { classPropertyName: "primaryButtonLoading", publicName: "primaryButtonLoading", isSignal: true, isRequired: false, transformFunction: null }, primaryButtonTooltip: { classPropertyName: "primaryButtonTooltip", publicName: "primaryButtonTooltip", isSignal: false, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: false, isRequired: false, transformFunction: null }, shouldDisableButtons: { classPropertyName: "shouldDisableButtons", publicName: "shouldDisableButtons", isSignal: false, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "ariaLabelledby", isSignal: false, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "ariaDescribedby", isSignal: false, isRequired: false, transformFunction: null }, keyboardOpen: { classPropertyName: "keyboardOpen", publicName: "keyboardOpen", isSignal: false, isRequired: false, transformFunction: null }, primaryButtonIconPosition: { classPropertyName: "primaryButtonIconPosition", publicName: "primaryButtonIconPosition", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closeEvent: "closeEvent", secondaryButtonClickEvent: "secondaryButtonClickEvent", primaryButtonClickEvent: "primaryButtonClickEvent" }, host: { listeners: { "keydown.esc": "onEsc()" }, properties: { "style.--color": "this.companyColor" } }, queries: [{ propertyName: "customHeader", first: true, predicate: ["dialogHeader"], descendants: true }], viewQueries: [{ propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\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}.ui-dialog-wrapper{display:flex;flex-flow:column}.ui-dialog-wrapper.small{width:600px}.ui-dialog-wrapper.large{width:956px}.ui-dialog-wrapper.x-large{width:1312px}.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:8px;padding:16px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:10px}.ui-dialog-wrapper.dark .dialog-title,.ui-dialog-wrapper.light .dialog-title{height:40px;padding:0;margin-bottom:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-content,.ui-dialog-wrapper.light .mat-mdc-dialog-content{padding:0}.ui-dialog-wrapper.dark .mat-mdc-dialog-actions,.ui-dialog-wrapper.light .mat-mdc-dialog-actions{padding:0;margin-top:32px}.ui-dialog-wrapper .mat-mdc-dialog-content{font-size:14px;color:#000;line-height:20px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container{--mdc-dialog-container-color: #424242}.ui-dialog-wrapper.dark .mat-mdc-dialog-content{color:#fff!important}.ui-dialog-wrapper.dark .dialog-title{--mdc-dialog-subhead-color: #ffffff}.dialog-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin:0}.dialog-title .close{margin-right:-24px}.dialog-title:before{content:none}.mat-mdc-dialog-actions{display:flex;justify-content:flex-end;column-gap:16px;padding:16px 0 0;margin-bottom:0;min-height:48px}.mat-mdc-dialog-actions.dialog-action-w-message{justify-content:space-between}.mat-mdc-dialog-actions .actions-footer-message{flex:1 0 auto}.mat-mdc-dialog-actions [dialogFooter]{margin-right:auto}.mat-mdc-dialog-actions .primary-button-tooltip-trigger{display:inline-flex}@media(max-width:1024px){.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:320px;max-width:600px;border-radius:0}.mat-mdc-dialog-content{max-height:524px}}@media(max-width:600px){.cdk-overlay-pane.ui-dialog-wrapper{max-width:100%!important;min-height:100%;display:flex;justify-content:center}.cdk-overlay-pane.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:100%;max-width:100%;height:100%;display:flex;flex-grow:1;border-radius:0}.cdk-overlay-pane.ui-dialog-wrapper.x-large{height:100%}.cdk-overlay-pane.ui-dialog-wrapper.x-large .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:16px}ui-dialog{height:100%;display:flex;flex-flow:column}.mat-mdc-dialog-content{max-height:unset;display:flex;flex-grow:1;flex-direction:column}}\n"], dependencies: [{ kind: "directive", type: MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "component", type: TooltipComponent, selector: "ui-tooltip", inputs: ["position", "disabled", "message", "applicationTheme", "labelForDefinition", "definitionTooltipSize", "variant"] }, { 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: "directive", type: MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
240
- }
241
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponent, decorators: [{
242
- type: Component,
243
- args: [{ selector: 'ui-dialog', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [
244
- MatDialogTitle,
245
- TooltipComponent,
246
- ButtonComponent,
247
- CdkScrollable,
248
- MatDialogContent,
249
- MatDialogActions,
250
- AsyncPipe,
251
- UiTranslatePipe,
252
- ], template: "<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\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}.ui-dialog-wrapper{display:flex;flex-flow:column}.ui-dialog-wrapper.small{width:600px}.ui-dialog-wrapper.large{width:956px}.ui-dialog-wrapper.x-large{width:1312px}.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:8px;padding:16px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:10px}.ui-dialog-wrapper.dark .dialog-title,.ui-dialog-wrapper.light .dialog-title{height:40px;padding:0;margin-bottom:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-content,.ui-dialog-wrapper.light .mat-mdc-dialog-content{padding:0}.ui-dialog-wrapper.dark .mat-mdc-dialog-actions,.ui-dialog-wrapper.light .mat-mdc-dialog-actions{padding:0;margin-top:32px}.ui-dialog-wrapper .mat-mdc-dialog-content{font-size:14px;color:#000;line-height:20px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container{--mdc-dialog-container-color: #424242}.ui-dialog-wrapper.dark .mat-mdc-dialog-content{color:#fff!important}.ui-dialog-wrapper.dark .dialog-title{--mdc-dialog-subhead-color: #ffffff}.dialog-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin:0}.dialog-title .close{margin-right:-24px}.dialog-title:before{content:none}.mat-mdc-dialog-actions{display:flex;justify-content:flex-end;column-gap:16px;padding:16px 0 0;margin-bottom:0;min-height:48px}.mat-mdc-dialog-actions.dialog-action-w-message{justify-content:space-between}.mat-mdc-dialog-actions .actions-footer-message{flex:1 0 auto}.mat-mdc-dialog-actions [dialogFooter]{margin-right:auto}.mat-mdc-dialog-actions .primary-button-tooltip-trigger{display:inline-flex}@media(max-width:1024px){.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:320px;max-width:600px;border-radius:0}.mat-mdc-dialog-content{max-height:524px}}@media(max-width:600px){.cdk-overlay-pane.ui-dialog-wrapper{max-width:100%!important;min-height:100%;display:flex;justify-content:center}.cdk-overlay-pane.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:100%;max-width:100%;height:100%;display:flex;flex-grow:1;border-radius:0}.cdk-overlay-pane.ui-dialog-wrapper.x-large{height:100%}.cdk-overlay-pane.ui-dialog-wrapper.x-large .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:16px}ui-dialog{height:100%;display:flex;flex-flow:column}.mat-mdc-dialog-content{max-height:unset;display:flex;flex-grow:1;flex-direction:column}}\n"] }]
253
- }], ctorParameters: () => [{ type: undefined, decorators: [{
254
- type: Optional
255
- }, {
256
- type: Inject,
257
- args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
258
- }] }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
259
- type: Inject,
260
- args: [MAT_DIALOG_DATA]
261
- }] }], propDecorators: { title: [{
262
- type: Input
263
- }], showCloseButton: [{
264
- type: Input
265
- }], canCloseFn: [{
266
- type: Input
267
- }], secondaryButtonLabel: [{
268
- type: Input
269
- }], footerMessage: [{
270
- type: Input
271
- }], primaryButtonLabel: [{
272
- type: Input
273
- }], primaryButtonIconName: [{
274
- type: Input
275
- }], secondaryButtonType: [{
276
- type: Input
277
- }], primaryButtonType: [{
278
- type: Input
279
- }], primaryButtonDataTestId: [{
280
- type: Input
281
- }], testId: [{
282
- type: Input
283
- }], closeButtonTestId: [{
284
- type: Input
285
- }], closeButtonAriaLabel: [{
286
- type: Input
287
- }], secondaryButtonDataTestId: [{
288
- type: Input
289
- }], companyColor: [{
290
- type: HostBinding,
291
- args: ['style.--color']
292
- }, {
293
- type: Input
294
- }], applicationTheme: [{
295
- type: Input
296
- }], disablePrimaryButton: [{
297
- type: Input
298
- }], primaryButtonLoading: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryButtonLoading", required: false }] }], primaryButtonTooltip: [{
299
- type: Input
300
- }], disableClose: [{
301
- type: Input
302
- }], shouldDisableButtons: [{
303
- type: Input
304
- }], ariaLabelledby: [{
305
- type: Input
306
- }], ariaDescribedby: [{
307
- type: Input
308
- }], keyboardOpen: [{
309
- type: Input
310
- }], primaryButtonIconPosition: [{ type: i0.Input, args: [{ isSignal: true, alias: "primaryButtonIconPosition", required: false }] }], closeEvent: [{
311
- type: Output
312
- }], secondaryButtonClickEvent: [{
313
- type: Output
314
- }], primaryButtonClickEvent: [{
315
- type: Output
316
- }], closeButton: [{
317
- type: ViewChild,
318
- args: ['closeButton']
319
- }], onEsc: [{
320
- type: HostListener,
321
- args: ['keydown.esc']
322
- }], customHeader: [{
323
- type: ContentChild,
324
- args: ['dialogHeader']
325
- }] } });
326
-
327
- class DialogService {
328
- constructor(matDialog, defaultAppTheme) {
329
- this.matDialog = matDialog;
330
- this.defaultAppTheme = defaultAppTheme;
331
- }
332
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- mirrors MatDialog.open<T, D = any, R = any>: untyped-by-default data/result types for consumer ergonomics
333
- open(dialogComponent, dialogConfig) {
334
- const { applicationTheme = 'light', size = 'small', panelClass = '', extraData = {}, backdropClass = '', keyboardOpen = false, config = {}, } = dialogConfig ?? {};
335
- // Open the dialog using UI custom styles
336
- return this.matDialog.open(dialogComponent, {
337
- ...config,
338
- data: {
339
- applicationTheme: this.defaultAppTheme ?? applicationTheme,
340
- ...extraData,
341
- keyboardOpen,
342
- },
343
- backdropClass: backdropClass || '',
344
- panelClass: applicationTheme === 'classic'
345
- ? ['ui-dialog-wrapper', panelClass, size]
346
- : ['ui-dialog-wrapper', panelClass, applicationTheme, size],
347
- });
348
- }
349
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogService, deps: [{ token: i1.MatDialog }, { token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); }
350
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogService }); }
351
- }
352
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogService, decorators: [{
353
- type: Injectable
354
- }], ctorParameters: () => [{ type: i1.MatDialog }, { type: undefined, decorators: [{
355
- type: Optional
356
- }, {
357
- type: Inject,
358
- args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
359
- }] }] });
360
-
361
- class DialogComponentModule {
362
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
363
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: DialogComponentModule, imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent], exports: [DialogComponent] }); }
364
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponentModule, providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService], imports: [CommonModule, MatDialogModule, ButtonComponentModule, DialogComponent] }); }
365
- }
366
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogComponentModule, decorators: [{
367
- type: NgModule,
368
- args: [{
369
- imports: [CommonModule, MatDialogModule, ButtonComponentModule, UiTranslatePipe, DialogComponent],
370
- exports: [DialogComponent],
371
- providers: [{ provide: MAT_DIALOG_DATA, useValue: {} }, { provide: MatDialogRef, useValue: {} }, DialogService],
372
- }]
373
- }] });
374
-
375
- class ConfirmDialogComponent {
376
- constructor(defaultAppTheme, dialogRef, data) {
377
- this.defaultAppTheme = defaultAppTheme;
378
- this.dialogRef = dialogRef;
379
- this.data = data;
380
- this.lang = LanguageService.defaultLanguage;
381
- this.showCloseButton = false;
382
- this.showSecondaryButton = true;
383
- this.primaryButtonDataTestId = 'confirm-dialog.confirm-button';
384
- this.secondaryButtonDataTestId = 'confirm-dialog.cancel-button';
385
- /**
386
- *
387
- * Defines the application theme
388
- *
389
- * @type {ApplicationTheme}
390
- * @memberof DialogComponent
391
- */
392
- this.applicationTheme = 'light';
393
- this.confirmMessage = data.message;
394
- this.confirmButtonText = data.confirmButtonText;
395
- this.cancelButtonText = data.cancelButtonText;
396
- this.title = data.title;
397
- this.lang = data.language ?? LanguageService.defaultLanguage;
398
- this.confirmMessageHtml = data.messageHtml ?? undefined;
399
- this.showCloseButton = data.showCloseButton ?? false;
400
- this.showSecondaryButton = data.showSecondaryButton ?? true;
401
- this.color = data.color ?? null;
402
- this.primaryButtonType = data.primaryButtonType ?? 'primary';
403
- this.secondaryButtonType = data.secondaryButtonType ?? 'ghost';
404
- this.primaryButtonIconName = data.primaryButtonIconName ?? undefined;
405
- this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? 'confirm-dialog.confirm-button';
406
- this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? 'confirm-dialog.cancel-button';
407
- this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? 'left';
408
- if (defaultAppTheme) {
409
- this.applicationTheme = defaultAppTheme;
410
- }
411
- }
412
- onConfirm() {
413
- if (this.data.onConfirm) {
414
- this.data.onConfirm();
415
- }
416
- this.dialogRef.close(true);
417
- }
418
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: ConfirmDialogComponent, isStandalone: true, selector: "ui-confirm-dialog", inputs: { applicationTheme: "applicationTheme" }, ngImport: i0, template: "<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n", styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}\n"], dependencies: [{ kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["title", "showCloseButton", "canCloseFn", "secondaryButtonLabel", "footerMessage", "primaryButtonLabel", "primaryButtonIconName", "secondaryButtonType", "primaryButtonType", "primaryButtonDataTestId", "testId", "closeButtonTestId", "closeButtonAriaLabel", "secondaryButtonDataTestId", "companyColor", "applicationTheme", "disablePrimaryButton", "primaryButtonLoading", "primaryButtonTooltip", "disableClose", "shouldDisableButtons", "ariaLabelledby", "ariaDescribedby", "keyboardOpen", "primaryButtonIconPosition"], outputs: ["closeEvent", "secondaryButtonClickEvent", "primaryButtonClickEvent"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
420
- }
421
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
422
- type: Component,
423
- args: [{ selector: 'ui-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [DialogComponent, AsyncPipe, UiTranslatePipe], template: "<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n", styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}\n"] }]
424
- }], ctorParameters: () => [{ type: undefined, decorators: [{
425
- type: Optional
426
- }, {
427
- type: Inject,
428
- args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
429
- }] }, { type: i1.MatDialogRef }, { type: undefined, decorators: [{
430
- type: Inject,
431
- args: [MAT_DIALOG_DATA]
432
- }] }], propDecorators: { applicationTheme: [{
433
- type: Input
434
- }] } });
435
-
436
- class ConfirmDialogComponentModule {
437
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
438
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponentModule, imports: [CommonModule,
439
- MatDialogModule,
440
- ButtonComponentModule,
441
- DialogComponentModule,
442
- UiTranslatePipe,
443
- ConfirmDialogComponent], exports: [ConfirmDialogComponent] }); }
444
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponentModule, providers: [
445
- { provide: MAT_DIALOG_DATA, useValue: {} },
446
- { provide: MatDialogRef, useValue: {} },
447
- ], imports: [CommonModule,
448
- MatDialogModule,
449
- ButtonComponentModule,
450
- DialogComponentModule,
451
- ConfirmDialogComponent] }); }
452
- }
453
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: ConfirmDialogComponentModule, decorators: [{
454
- type: NgModule,
455
- args: [{
456
- exports: [ConfirmDialogComponent],
457
- providers: [
458
- { provide: MAT_DIALOG_DATA, useValue: {} },
459
- { provide: MatDialogRef, useValue: {} },
460
- ],
461
- imports: [
462
- CommonModule,
463
- MatDialogModule,
464
- ButtonComponentModule,
465
- DialogComponentModule,
466
- UiTranslatePipe,
467
- ConfirmDialogComponent,
468
- ],
469
- }]
470
- }] });
471
-
472
- class DialogCustomComponent {
473
- constructor(defaultAppTheme, data, cdr) {
474
- this.defaultAppTheme = defaultAppTheme;
475
- this.data = data;
476
- this.cdr = cdr;
477
- /**
478
- *
479
- * Defines the application theme
480
- *
481
- * @type {ApplicationTheme}
482
- * @memberof DialogComponent
483
- */
484
- this.applicationTheme = 'light';
485
- if (defaultAppTheme) {
486
- this.applicationTheme = defaultAppTheme;
487
- }
488
- }
489
- ngOnInit() {
490
- this.canClose = this.canCloseFalse.bind(this);
491
- setTimeout(() => {
492
- this.canClose = this.canCloseTrue.bind(this);
493
- // `canClose` is template-bound and swapped from a timer.
494
- this.cdr.markForCheck();
495
- }, 2000);
496
- }
497
- //canCloseFn @input demo with false value
498
- canCloseFalse() {
499
- return false;
500
- }
501
- //canCloseFn @input demo with true value
502
- canCloseTrue() {
503
- return true;
504
- }
505
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }, { token: MAT_DIALOG_DATA }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
506
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: DialogCustomComponent, isStandalone: true, selector: "ui-dialog-custom", inputs: { applicationTheme: "applicationTheme" }, ngImport: i0, template: "<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n", styles: [".custom-header{width:100%}.custom-header .button-group{display:flex;gap:8px;align-items:center;margin-left:auto}\n"], dependencies: [{ kind: "component", type: DialogComponent, selector: "ui-dialog", inputs: ["title", "showCloseButton", "canCloseFn", "secondaryButtonLabel", "footerMessage", "primaryButtonLabel", "primaryButtonIconName", "secondaryButtonType", "primaryButtonType", "primaryButtonDataTestId", "testId", "closeButtonTestId", "closeButtonAriaLabel", "secondaryButtonDataTestId", "companyColor", "applicationTheme", "disablePrimaryButton", "primaryButtonLoading", "primaryButtonTooltip", "disableClose", "shouldDisableButtons", "ariaLabelledby", "ariaDescribedby", "keyboardOpen", "primaryButtonIconPosition"], outputs: ["closeEvent", "secondaryButtonClickEvent", "primaryButtonClickEvent"] }, { 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: ToggleComponent, selector: "ui-toggle", inputs: ["selected", "disabled", "label", "message", "maxWidth", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "preventClick", "loading", "ariaDescribedby"], outputs: ["toggle"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
507
- }
508
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponent, decorators: [{
509
- type: Component,
510
- args: [{ selector: 'ui-dialog-custom', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, imports: [DialogComponent, ButtonComponent, ToggleComponent], template: "<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n", styles: [".custom-header{width:100%}.custom-header .button-group{display:flex;gap:8px;align-items:center;margin-left:auto}\n"] }]
511
- }], ctorParameters: () => [{ type: undefined, decorators: [{
512
- type: Optional
513
- }, {
514
- type: Inject,
515
- args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
516
- }] }, { type: undefined, decorators: [{
517
- type: Inject,
518
- args: [MAT_DIALOG_DATA]
519
- }] }, { type: i0.ChangeDetectorRef }], propDecorators: { applicationTheme: [{
520
- type: Input
521
- }] } });
522
-
523
- class DialogCustomComponentModule {
524
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
525
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponentModule, imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent], exports: [DialogCustomComponent] }); }
526
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponentModule, imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent] }); }
527
- }
528
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DialogCustomComponentModule, decorators: [{
529
- type: NgModule,
530
- args: [{
531
- imports: [CommonModule, DialogComponentModule, ButtonComponentModule, ToggleComponentModule, DialogCustomComponent],
532
- exports: [DialogCustomComponent],
533
- }]
534
- }] });
535
-
536
- /**
537
- * Generated bundle index. Do not edit.
538
- */
539
-
1
+ import { CdkScrollable } from "@angular/cdk/scrolling";
2
+ import { AsyncPipe, CommonModule } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, HostBinding, HostListener, Inject, Injectable, Input, NgModule, Optional, Output, ViewChild, ViewEncapsulation, booleanAttribute, input } from "@angular/core";
5
+ import * as i1 from "@angular/material/dialog";
6
+ import { MAT_DIALOG_DATA, MatDialogActions, MatDialogContent, MatDialogModule, MatDialogRef, MatDialogState, MatDialogTitle } from "@angular/material/dialog";
7
+ import { ButtonComponent, ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
8
+ import { LanguageService, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
9
+ import { TooltipComponent } from "@testgorilla/tgo-ui/components/tooltip";
10
+ import { ToggleComponent, ToggleComponentModule } from "@testgorilla/tgo-ui/components/toggle";
11
+ var DialogComponent = class DialogComponent {
12
+ onEsc() {
13
+ this.dismiss();
14
+ }
15
+ constructor(defaultAppTheme, dialogRef, data) {
16
+ this.defaultAppTheme = defaultAppTheme;
17
+ this.dialogRef = dialogRef;
18
+ this.data = data;
19
+ this.title = "";
20
+ this.showCloseButton = true;
21
+ this.canCloseFn = () => true;
22
+ this.secondaryButtonLabel = "";
23
+ this.footerMessage = "";
24
+ this.primaryButtonLabel = "";
25
+ this.primaryButtonIconName = "";
26
+ this.secondaryButtonType = "ghost";
27
+ this.primaryButtonType = "primary";
28
+ this.primaryButtonDataTestId = null;
29
+ this.testId = null;
30
+ this.closeButtonTestId = null;
31
+ this.closeButtonAriaLabel = "";
32
+ this.secondaryButtonDataTestId = null;
33
+ this.companyColor = "";
34
+ this.applicationTheme = "light";
35
+ this.disablePrimaryButton = false;
36
+ this.primaryButtonLoading = input(false, {
37
+ ...ngDevMode ? { debugName: "primaryButtonLoading" } : /* istanbul ignore next */ {},
38
+ transform: booleanAttribute
39
+ });
40
+ this.primaryButtonTooltip = "";
41
+ this.disableClose = false;
42
+ this.shouldDisableButtons = true;
43
+ this.ariaLabelledby = "";
44
+ this.ariaDescribedby = "";
45
+ this.keyboardOpen = false;
46
+ this.primaryButtonIconPosition = input("left", ...ngDevMode ? [{ debugName: "primaryButtonIconPosition" }] : /* istanbul ignore next */ []);
47
+ this.closeEvent = new EventEmitter();
48
+ this.secondaryButtonClickEvent = new EventEmitter();
49
+ this.primaryButtonClickEvent = new EventEmitter();
50
+ this.modalClosed = false;
51
+ this.disableButtons = false;
52
+ this.translationContext = "DIALOG.";
53
+ if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
54
+ }
55
+ get hasCustomHeader() {
56
+ return Boolean(this.customHeader);
57
+ }
58
+ ngOnInit() {
59
+ this.areButtonsDisabled();
60
+ if (this.data?.applicationTheme) this.applicationTheme = this.data.applicationTheme;
61
+ if (this.applicationTheme !== "classic") this.companyColor = this.companyColor || "#D410AA";
62
+ else this.companyColor = this.companyColor || "#46A997";
63
+ }
64
+ ngOnChanges(changes) {
65
+ if (changes["canCloseFn"]) {
66
+ this.dialogRef.disableClose = !this.canCloseFn();
67
+ this.areButtonsDisabled();
68
+ }
69
+ }
70
+ ngAfterViewInit() {
71
+ if (this.keyboardOpen) setTimeout(() => {
72
+ this.closeButton.buttonElement.focus("keyboard");
73
+ }, 100);
74
+ }
75
+ areButtonsDisabled() {
76
+ this.disableButtons = !this.canCloseFn() && this.shouldDisableButtons;
77
+ }
78
+ dismiss() {
79
+ if (this.canCloseFn()) {
80
+ this.dialogRef.disableClose = false;
81
+ this.dialogRef.close();
82
+ this.modalClosed = true;
83
+ }
84
+ }
85
+ onClose(event) {
86
+ this.closeEvent.emit(event);
87
+ this.modalClosed = true;
88
+ }
89
+ onSecondaryButtonClick(event) {
90
+ this.secondaryButtonClickEvent.emit(event);
91
+ }
92
+ onPrimaryButtonClick(event) {
93
+ this.primaryButtonClickEvent.emit(event);
94
+ if (this.dialogRef.getState() === MatDialogState.OPEN) this.dismiss();
95
+ }
96
+ static {
97
+ this.ɵfac = i0.ɵɵngDeclareFactory({
98
+ minVersion: "12.0.0",
99
+ version: "22.2.4",
100
+ ngImport: i0,
101
+ type: DialogComponent,
102
+ deps: [
103
+ {
104
+ token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
105
+ optional: true
106
+ },
107
+ { token: i1.MatDialogRef },
108
+ { token: MAT_DIALOG_DATA }
109
+ ],
110
+ target: i0.ɵɵFactoryTarget.Component
111
+ });
112
+ }
113
+ static {
114
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
115
+ minVersion: "17.0.0",
116
+ version: "22.2.4",
117
+ type: DialogComponent,
118
+ isStandalone: true,
119
+ selector: "ui-dialog",
120
+ inputs: {
121
+ title: {
122
+ classPropertyName: "title",
123
+ publicName: "title",
124
+ isSignal: false,
125
+ isRequired: false,
126
+ transformFunction: null
127
+ },
128
+ showCloseButton: {
129
+ classPropertyName: "showCloseButton",
130
+ publicName: "showCloseButton",
131
+ isSignal: false,
132
+ isRequired: false,
133
+ transformFunction: null
134
+ },
135
+ canCloseFn: {
136
+ classPropertyName: "canCloseFn",
137
+ publicName: "canCloseFn",
138
+ isSignal: false,
139
+ isRequired: false,
140
+ transformFunction: null
141
+ },
142
+ secondaryButtonLabel: {
143
+ classPropertyName: "secondaryButtonLabel",
144
+ publicName: "secondaryButtonLabel",
145
+ isSignal: false,
146
+ isRequired: false,
147
+ transformFunction: null
148
+ },
149
+ footerMessage: {
150
+ classPropertyName: "footerMessage",
151
+ publicName: "footerMessage",
152
+ isSignal: false,
153
+ isRequired: false,
154
+ transformFunction: null
155
+ },
156
+ primaryButtonLabel: {
157
+ classPropertyName: "primaryButtonLabel",
158
+ publicName: "primaryButtonLabel",
159
+ isSignal: false,
160
+ isRequired: false,
161
+ transformFunction: null
162
+ },
163
+ primaryButtonIconName: {
164
+ classPropertyName: "primaryButtonIconName",
165
+ publicName: "primaryButtonIconName",
166
+ isSignal: false,
167
+ isRequired: false,
168
+ transformFunction: null
169
+ },
170
+ secondaryButtonType: {
171
+ classPropertyName: "secondaryButtonType",
172
+ publicName: "secondaryButtonType",
173
+ isSignal: false,
174
+ isRequired: false,
175
+ transformFunction: null
176
+ },
177
+ primaryButtonType: {
178
+ classPropertyName: "primaryButtonType",
179
+ publicName: "primaryButtonType",
180
+ isSignal: false,
181
+ isRequired: false,
182
+ transformFunction: null
183
+ },
184
+ primaryButtonDataTestId: {
185
+ classPropertyName: "primaryButtonDataTestId",
186
+ publicName: "primaryButtonDataTestId",
187
+ isSignal: false,
188
+ isRequired: false,
189
+ transformFunction: null
190
+ },
191
+ testId: {
192
+ classPropertyName: "testId",
193
+ publicName: "testId",
194
+ isSignal: false,
195
+ isRequired: false,
196
+ transformFunction: null
197
+ },
198
+ closeButtonTestId: {
199
+ classPropertyName: "closeButtonTestId",
200
+ publicName: "closeButtonTestId",
201
+ isSignal: false,
202
+ isRequired: false,
203
+ transformFunction: null
204
+ },
205
+ closeButtonAriaLabel: {
206
+ classPropertyName: "closeButtonAriaLabel",
207
+ publicName: "closeButtonAriaLabel",
208
+ isSignal: false,
209
+ isRequired: false,
210
+ transformFunction: null
211
+ },
212
+ secondaryButtonDataTestId: {
213
+ classPropertyName: "secondaryButtonDataTestId",
214
+ publicName: "secondaryButtonDataTestId",
215
+ isSignal: false,
216
+ isRequired: false,
217
+ transformFunction: null
218
+ },
219
+ companyColor: {
220
+ classPropertyName: "companyColor",
221
+ publicName: "companyColor",
222
+ isSignal: false,
223
+ isRequired: false,
224
+ transformFunction: null
225
+ },
226
+ applicationTheme: {
227
+ classPropertyName: "applicationTheme",
228
+ publicName: "applicationTheme",
229
+ isSignal: false,
230
+ isRequired: false,
231
+ transformFunction: null
232
+ },
233
+ disablePrimaryButton: {
234
+ classPropertyName: "disablePrimaryButton",
235
+ publicName: "disablePrimaryButton",
236
+ isSignal: false,
237
+ isRequired: false,
238
+ transformFunction: null
239
+ },
240
+ primaryButtonLoading: {
241
+ classPropertyName: "primaryButtonLoading",
242
+ publicName: "primaryButtonLoading",
243
+ isSignal: true,
244
+ isRequired: false,
245
+ transformFunction: null
246
+ },
247
+ primaryButtonTooltip: {
248
+ classPropertyName: "primaryButtonTooltip",
249
+ publicName: "primaryButtonTooltip",
250
+ isSignal: false,
251
+ isRequired: false,
252
+ transformFunction: null
253
+ },
254
+ disableClose: {
255
+ classPropertyName: "disableClose",
256
+ publicName: "disableClose",
257
+ isSignal: false,
258
+ isRequired: false,
259
+ transformFunction: null
260
+ },
261
+ shouldDisableButtons: {
262
+ classPropertyName: "shouldDisableButtons",
263
+ publicName: "shouldDisableButtons",
264
+ isSignal: false,
265
+ isRequired: false,
266
+ transformFunction: null
267
+ },
268
+ ariaLabelledby: {
269
+ classPropertyName: "ariaLabelledby",
270
+ publicName: "ariaLabelledby",
271
+ isSignal: false,
272
+ isRequired: false,
273
+ transformFunction: null
274
+ },
275
+ ariaDescribedby: {
276
+ classPropertyName: "ariaDescribedby",
277
+ publicName: "ariaDescribedby",
278
+ isSignal: false,
279
+ isRequired: false,
280
+ transformFunction: null
281
+ },
282
+ keyboardOpen: {
283
+ classPropertyName: "keyboardOpen",
284
+ publicName: "keyboardOpen",
285
+ isSignal: false,
286
+ isRequired: false,
287
+ transformFunction: null
288
+ },
289
+ primaryButtonIconPosition: {
290
+ classPropertyName: "primaryButtonIconPosition",
291
+ publicName: "primaryButtonIconPosition",
292
+ isSignal: true,
293
+ isRequired: false,
294
+ transformFunction: null
295
+ }
296
+ },
297
+ outputs: {
298
+ closeEvent: "closeEvent",
299
+ secondaryButtonClickEvent: "secondaryButtonClickEvent",
300
+ primaryButtonClickEvent: "primaryButtonClickEvent"
301
+ },
302
+ host: {
303
+ listeners: { "keydown.esc": "onEsc()" },
304
+ properties: { "style.--color": "this.companyColor" }
305
+ },
306
+ queries: [{
307
+ propertyName: "customHeader",
308
+ first: true,
309
+ predicate: ["dialogHeader"],
310
+ descendants: true
311
+ }],
312
+ viewQueries: [{
313
+ propertyName: "closeButton",
314
+ first: true,
315
+ predicate: ["closeButton"],
316
+ descendants: true
317
+ }],
318
+ usesOnChanges: true,
319
+ ngImport: i0,
320
+ template: "<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n",
321
+ 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}.ui-dialog-wrapper{display:flex;flex-flow:column}.ui-dialog-wrapper.small{width:600px}.ui-dialog-wrapper.large{width:956px}.ui-dialog-wrapper.x-large{width:1312px}.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:8px;padding:16px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:10px}.ui-dialog-wrapper.dark .dialog-title,.ui-dialog-wrapper.light .dialog-title{height:40px;padding:0;margin-bottom:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-content,.ui-dialog-wrapper.light .mat-mdc-dialog-content{padding:0}.ui-dialog-wrapper.dark .mat-mdc-dialog-actions,.ui-dialog-wrapper.light .mat-mdc-dialog-actions{padding:0;margin-top:32px}.ui-dialog-wrapper .mat-mdc-dialog-content{font-size:14px;color:#000;line-height:20px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container{--mdc-dialog-container-color: #424242}.ui-dialog-wrapper.dark .mat-mdc-dialog-content{color:#fff!important}.ui-dialog-wrapper.dark .dialog-title{--mdc-dialog-subhead-color: #ffffff}.dialog-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin:0}.dialog-title .close{margin-right:-24px}.dialog-title:before{content:none}.mat-mdc-dialog-actions{display:flex;justify-content:flex-end;column-gap:16px;padding:16px 0 0;margin-bottom:0;min-height:48px}.mat-mdc-dialog-actions.dialog-action-w-message{justify-content:space-between}.mat-mdc-dialog-actions .actions-footer-message{flex:1 0 auto}.mat-mdc-dialog-actions [dialogFooter]{margin-right:auto}.mat-mdc-dialog-actions .primary-button-tooltip-trigger{display:inline-flex}@media(max-width:1024px){.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:320px;max-width:600px;border-radius:0}.mat-mdc-dialog-content{max-height:524px}}@media(max-width:600px){.cdk-overlay-pane.ui-dialog-wrapper{max-width:100%!important;min-height:100%;display:flex;justify-content:center}.cdk-overlay-pane.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:100%;max-width:100%;height:100%;display:flex;flex-grow:1;border-radius:0}.cdk-overlay-pane.ui-dialog-wrapper.x-large{height:100%}.cdk-overlay-pane.ui-dialog-wrapper.x-large .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:16px}ui-dialog{height:100%;display:flex;flex-flow:column}.mat-mdc-dialog-content{max-height:unset;display:flex;flex-grow:1;flex-direction:column}}\n"],
322
+ dependencies: [
323
+ {
324
+ kind: "directive",
325
+ type: MatDialogTitle,
326
+ selector: "[mat-dialog-title], [matDialogTitle]",
327
+ inputs: ["id"],
328
+ exportAs: ["matDialogTitle"]
329
+ },
330
+ {
331
+ kind: "component",
332
+ type: TooltipComponent,
333
+ selector: "ui-tooltip",
334
+ inputs: [
335
+ "position",
336
+ "disabled",
337
+ "message",
338
+ "applicationTheme",
339
+ "labelForDefinition",
340
+ "definitionTooltipSize",
341
+ "variant"
342
+ ]
343
+ },
344
+ {
345
+ kind: "component",
346
+ type: ButtonComponent,
347
+ selector: "ui-button",
348
+ inputs: [
349
+ "size",
350
+ "variant",
351
+ "label",
352
+ "iconPosition",
353
+ "justIcon",
354
+ "iconName",
355
+ "trailingIconName",
356
+ "trailingIconFilled",
357
+ "disabled",
358
+ "loading",
359
+ "loadingWithLabel",
360
+ "fullWidth",
361
+ "url",
362
+ "urlTarget",
363
+ "value",
364
+ "tooltip",
365
+ "isPremium",
366
+ "type",
367
+ "companyColor",
368
+ "buttonBadgeConfig",
369
+ "applicationTheme",
370
+ "disabledScaleOnClick",
371
+ "ariaLabel",
372
+ "ariaExpanded",
373
+ "ariaControls",
374
+ "ariaPressed",
375
+ "ariaRequired",
376
+ "ariaLabelledby",
377
+ "ariaDescribedby",
378
+ "preventDefault",
379
+ "hasBackground",
380
+ "tooltipPosition",
381
+ "role",
382
+ "iconFilled",
383
+ "testId"
384
+ ],
385
+ outputs: ["buttonClickEvent", "buttonHoverEvent"]
386
+ },
387
+ {
388
+ kind: "directive",
389
+ type: MatDialogContent,
390
+ selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]"
391
+ },
392
+ {
393
+ kind: "directive",
394
+ type: MatDialogActions,
395
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
396
+ inputs: ["align"]
397
+ },
398
+ {
399
+ kind: "pipe",
400
+ type: AsyncPipe,
401
+ name: "async"
402
+ },
403
+ {
404
+ kind: "pipe",
405
+ type: UiTranslatePipe,
406
+ name: "uiTranslate"
407
+ }
408
+ ],
409
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
410
+ encapsulation: i0.ViewEncapsulation.None
411
+ });
412
+ }
413
+ };
414
+ i0.ɵɵngDeclareClassMetadata({
415
+ minVersion: "12.0.0",
416
+ version: "22.2.4",
417
+ ngImport: i0,
418
+ type: DialogComponent,
419
+ decorators: [{
420
+ type: Component,
421
+ args: [{
422
+ selector: "ui-dialog",
423
+ changeDetection: ChangeDetectionStrategy.OnPush,
424
+ encapsulation: ViewEncapsulation.None,
425
+ imports: [
426
+ MatDialogTitle,
427
+ TooltipComponent,
428
+ ButtonComponent,
429
+ CdkScrollable,
430
+ MatDialogContent,
431
+ MatDialogActions,
432
+ AsyncPipe,
433
+ UiTranslatePipe
434
+ ],
435
+ template: "<div class=\"dialog-container\" [attr.theme]=\"applicationTheme\" [attr.data-testid]=\"testId\">\n <div\n mat-dialog-title\n class=\"dialog-title\"\n [attr.aria-modal]=\"true\"\n [attr.aria-labelledby]=\"'labelledby'\"\n [attr.aria-describedby]=\"'ariaDescribedby'\"\n >\n <span [style.display]=\"'none'\" id=\"ariaDescribedby\">{{ ariaDescribedby }}</span>\n\n <!-- Default header content -->\n @if (!hasCustomHeader) {\n <h3 class=\"bold\" id=\"labelledby\">{{ title }}</h3>\n @if (showCloseButton) {\n <div>\n <ui-button\n #closeButton\n [variant]=\"'icon-button'\"\n [iconName]=\"'Close'\"\n [companyColor]=\"applicationTheme === 'classic' ? '#000' : '#242424'\"\n [applicationTheme]=\"applicationTheme\"\n [tooltip]=\"('COMMON.CLOSE' | uiTranslate | async)!\"\n (click)=\"onClose($event)\"\n (buttonClickEvent)=\"dismiss()\"\n [testId]=\"closeButtonTestId\"\n [ariaLabel]=\"closeButtonAriaLabel || ('COMMON.CLOSE' | uiTranslate | async)!\"\n id=\"dialog-close-button\"\n ></ui-button>\n </div>\n }\n }\n\n <!-- Custom header content projection -->\n <ng-content select=\"[dialogHeader]\"></ng-content>\n </div>\n <mat-dialog-content>\n <ng-content></ng-content>\n </mat-dialog-content>\n @if (secondaryButtonLabel !== '' || primaryButtonLabel !== '') {\n <div mat-dialog-actions [class.dialog-action-w-message]=\"!!footerMessage\">\n @if (footerMessage) {\n <div class=\"actions-footer-message\">{{ footerMessage }}</div>\n }\n\n <!-- Projected footer content, rendered to the left of the action buttons -->\n <ng-content select=\"[dialogFooter]\"></ng-content>\n\n @if (!!secondaryButtonLabel) {\n <!-- Action-button ids stay on the ui-button wrappers: five tgo-qa-automation page objects descend from them. -->\n <ui-button\n [companyColor]=\"companyColor\"\n [variant]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick($event)\"\n ></ui-button>\n }\n @if (!!primaryButtonLabel) {\n <!-- The tooltip wraps the button: a disabled ui-button receives no pointer\n events, so the tooltip must trigger from an enclosing element. -->\n <ui-tooltip\n class=\"primary-button-tooltip-trigger\"\n [message]=\"primaryButtonTooltip\"\n [applicationTheme]=\"applicationTheme\"\n >\n <ui-button\n [iconPosition]=\"primaryButtonIconPosition()\"\n [iconName]=\"primaryButtonIconName ? primaryButtonIconName : undefined\"\n [variant]=\"primaryButtonType\"\n [loading]=\"primaryButtonLoading()\"\n [ariaLabel]=\"primaryButtonLoading() ? primaryButtonLabel : ''\"\n [disabled]=\"disableButtons || disablePrimaryButton || primaryButtonLoading()\"\n [applicationTheme]=\"applicationTheme\"\n (click)=\"onPrimaryButtonClick($event)\"\n [label]=\"primaryButtonLabel\"\n [companyColor]=\"companyColor\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n ></ui-button>\n </ui-tooltip>\n }\n </div>\n }\n\n <!-- This is announcement for screen reader that dialog was closed-->\n <div aria-live=\"assertive\" role=\"alert\" style=\"position: absolute; left: -9999px\">\n @if (modalClosed) {\n <span>{{ 'DIALOG.CLOSED' | uiTranslate | async }}</span>\n }\n </div>\n</div>\n",
436
+ 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}.ui-dialog-wrapper{display:flex;flex-flow:column}.ui-dialog-wrapper.small{width:600px}.ui-dialog-wrapper.large{width:956px}.ui-dialog-wrapper.x-large{width:1312px}.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:8px;padding:16px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface,.ui-dialog-wrapper.light .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{border-radius:10px}.ui-dialog-wrapper.dark .dialog-title,.ui-dialog-wrapper.light .dialog-title{height:40px;padding:0;margin-bottom:32px}.ui-dialog-wrapper.dark .mat-mdc-dialog-content,.ui-dialog-wrapper.light .mat-mdc-dialog-content{padding:0}.ui-dialog-wrapper.dark .mat-mdc-dialog-actions,.ui-dialog-wrapper.light .mat-mdc-dialog-actions{padding:0;margin-top:32px}.ui-dialog-wrapper .mat-mdc-dialog-content{font-size:14px;color:#000;line-height:20px}.ui-dialog-wrapper.dark .mat-mdc-dialog-container{--mdc-dialog-container-color: #424242}.ui-dialog-wrapper.dark .mat-mdc-dialog-content{color:#fff!important}.ui-dialog-wrapper.dark .dialog-title{--mdc-dialog-subhead-color: #ffffff}.dialog-title{display:flex;flex-direction:row;justify-content:space-between;align-items:center;margin:0}.dialog-title .close{margin-right:-24px}.dialog-title:before{content:none}.mat-mdc-dialog-actions{display:flex;justify-content:flex-end;column-gap:16px;padding:16px 0 0;margin-bottom:0;min-height:48px}.mat-mdc-dialog-actions.dialog-action-w-message{justify-content:space-between}.mat-mdc-dialog-actions .actions-footer-message{flex:1 0 auto}.mat-mdc-dialog-actions [dialogFooter]{margin-right:auto}.mat-mdc-dialog-actions .primary-button-tooltip-trigger{display:inline-flex}@media(max-width:1024px){.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:320px;max-width:600px;border-radius:0}.mat-mdc-dialog-content{max-height:524px}}@media(max-width:600px){.cdk-overlay-pane.ui-dialog-wrapper{max-width:100%!important;min-height:100%;display:flex;justify-content:center}.cdk-overlay-pane.ui-dialog-wrapper .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{min-width:100%;max-width:100%;height:100%;display:flex;flex-grow:1;border-radius:0}.cdk-overlay-pane.ui-dialog-wrapper.x-large{height:100%}.cdk-overlay-pane.ui-dialog-wrapper.x-large .mat-mdc-dialog-container .mdc-dialog__container .mat-mdc-dialog-surface{padding:16px}ui-dialog{height:100%;display:flex;flex-flow:column}.mat-mdc-dialog-content{max-height:unset;display:flex;flex-grow:1;flex-direction:column}}\n"]
437
+ }]
438
+ }],
439
+ ctorParameters: () => [
440
+ {
441
+ type: void 0,
442
+ decorators: [{ type: Optional }, {
443
+ type: Inject,
444
+ args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
445
+ }]
446
+ },
447
+ { type: i1.MatDialogRef },
448
+ {
449
+ type: void 0,
450
+ decorators: [{
451
+ type: Inject,
452
+ args: [MAT_DIALOG_DATA]
453
+ }]
454
+ }
455
+ ],
456
+ propDecorators: {
457
+ title: [{ type: Input }],
458
+ showCloseButton: [{ type: Input }],
459
+ canCloseFn: [{ type: Input }],
460
+ secondaryButtonLabel: [{ type: Input }],
461
+ footerMessage: [{ type: Input }],
462
+ primaryButtonLabel: [{ type: Input }],
463
+ primaryButtonIconName: [{ type: Input }],
464
+ secondaryButtonType: [{ type: Input }],
465
+ primaryButtonType: [{ type: Input }],
466
+ primaryButtonDataTestId: [{ type: Input }],
467
+ testId: [{ type: Input }],
468
+ closeButtonTestId: [{ type: Input }],
469
+ closeButtonAriaLabel: [{ type: Input }],
470
+ secondaryButtonDataTestId: [{ type: Input }],
471
+ companyColor: [{
472
+ type: HostBinding,
473
+ args: ["style.--color"]
474
+ }, { type: Input }],
475
+ applicationTheme: [{ type: Input }],
476
+ disablePrimaryButton: [{ type: Input }],
477
+ primaryButtonLoading: [{
478
+ type: i0.Input,
479
+ args: [{
480
+ isSignal: true,
481
+ alias: "primaryButtonLoading",
482
+ required: false
483
+ }]
484
+ }],
485
+ primaryButtonTooltip: [{ type: Input }],
486
+ disableClose: [{ type: Input }],
487
+ shouldDisableButtons: [{ type: Input }],
488
+ ariaLabelledby: [{ type: Input }],
489
+ ariaDescribedby: [{ type: Input }],
490
+ keyboardOpen: [{ type: Input }],
491
+ primaryButtonIconPosition: [{
492
+ type: i0.Input,
493
+ args: [{
494
+ isSignal: true,
495
+ alias: "primaryButtonIconPosition",
496
+ required: false
497
+ }]
498
+ }],
499
+ closeEvent: [{ type: Output }],
500
+ secondaryButtonClickEvent: [{ type: Output }],
501
+ primaryButtonClickEvent: [{ type: Output }],
502
+ closeButton: [{
503
+ type: ViewChild,
504
+ args: ["closeButton"]
505
+ }],
506
+ onEsc: [{
507
+ type: HostListener,
508
+ args: ["keydown.esc"]
509
+ }],
510
+ customHeader: [{
511
+ type: ContentChild,
512
+ args: ["dialogHeader"]
513
+ }]
514
+ }
515
+ });
516
+ var DialogService = class DialogService {
517
+ constructor(matDialog, defaultAppTheme) {
518
+ this.matDialog = matDialog;
519
+ this.defaultAppTheme = defaultAppTheme;
520
+ }
521
+ open(dialogComponent, dialogConfig) {
522
+ const { applicationTheme = "light", size = "small", panelClass = "", extraData = {}, backdropClass = "", keyboardOpen = false, config = {} } = dialogConfig ?? {};
523
+ return this.matDialog.open(dialogComponent, {
524
+ ...config,
525
+ data: {
526
+ applicationTheme: this.defaultAppTheme ?? applicationTheme,
527
+ ...extraData,
528
+ keyboardOpen
529
+ },
530
+ backdropClass: backdropClass || "",
531
+ panelClass: applicationTheme === "classic" ? [
532
+ "ui-dialog-wrapper",
533
+ panelClass,
534
+ size
535
+ ] : [
536
+ "ui-dialog-wrapper",
537
+ panelClass,
538
+ applicationTheme,
539
+ size
540
+ ]
541
+ });
542
+ }
543
+ static {
544
+ this.ɵfac = i0.ɵɵngDeclareFactory({
545
+ minVersion: "12.0.0",
546
+ version: "22.2.4",
547
+ ngImport: i0,
548
+ type: DialogService,
549
+ deps: [{ token: i1.MatDialog }, {
550
+ token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
551
+ optional: true
552
+ }],
553
+ target: i0.ɵɵFactoryTarget.Injectable
554
+ });
555
+ }
556
+ static {
557
+ this.ɵprov = i0.ɵɵngDeclareInjectable({
558
+ minVersion: "12.0.0",
559
+ version: "22.2.4",
560
+ ngImport: i0,
561
+ type: DialogService
562
+ });
563
+ }
564
+ };
565
+ i0.ɵɵngDeclareClassMetadata({
566
+ minVersion: "12.0.0",
567
+ version: "22.2.4",
568
+ ngImport: i0,
569
+ type: DialogService,
570
+ decorators: [{ type: Injectable }],
571
+ ctorParameters: () => [{ type: i1.MatDialog }, {
572
+ type: void 0,
573
+ decorators: [{ type: Optional }, {
574
+ type: Inject,
575
+ args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
576
+ }]
577
+ }]
578
+ });
579
+ var DialogComponentModule = class DialogComponentModule {
580
+ static {
581
+ this.ɵfac = i0.ɵɵngDeclareFactory({
582
+ minVersion: "12.0.0",
583
+ version: "22.2.4",
584
+ ngImport: i0,
585
+ type: DialogComponentModule,
586
+ deps: [],
587
+ target: i0.ɵɵFactoryTarget.NgModule
588
+ });
589
+ }
590
+ static {
591
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
592
+ minVersion: "14.0.0",
593
+ version: "22.2.4",
594
+ ngImport: i0,
595
+ type: DialogComponentModule,
596
+ imports: [
597
+ CommonModule,
598
+ MatDialogModule,
599
+ ButtonComponentModule,
600
+ UiTranslatePipe,
601
+ DialogComponent
602
+ ],
603
+ exports: [DialogComponent]
604
+ });
605
+ }
606
+ static {
607
+ this.ɵinj = i0.ɵɵngDeclareInjector({
608
+ minVersion: "12.0.0",
609
+ version: "22.2.4",
610
+ ngImport: i0,
611
+ type: DialogComponentModule,
612
+ providers: [
613
+ {
614
+ provide: MAT_DIALOG_DATA,
615
+ useValue: {}
616
+ },
617
+ {
618
+ provide: MatDialogRef,
619
+ useValue: {}
620
+ },
621
+ DialogService
622
+ ],
623
+ imports: [
624
+ CommonModule,
625
+ MatDialogModule,
626
+ ButtonComponentModule,
627
+ DialogComponent
628
+ ]
629
+ });
630
+ }
631
+ };
632
+ i0.ɵɵngDeclareClassMetadata({
633
+ minVersion: "12.0.0",
634
+ version: "22.2.4",
635
+ ngImport: i0,
636
+ type: DialogComponentModule,
637
+ decorators: [{
638
+ type: NgModule,
639
+ args: [{
640
+ imports: [
641
+ CommonModule,
642
+ MatDialogModule,
643
+ ButtonComponentModule,
644
+ UiTranslatePipe,
645
+ DialogComponent
646
+ ],
647
+ exports: [DialogComponent],
648
+ providers: [
649
+ {
650
+ provide: MAT_DIALOG_DATA,
651
+ useValue: {}
652
+ },
653
+ {
654
+ provide: MatDialogRef,
655
+ useValue: {}
656
+ },
657
+ DialogService
658
+ ]
659
+ }]
660
+ }]
661
+ });
662
+ var ConfirmDialogComponent = class ConfirmDialogComponent {
663
+ constructor(defaultAppTheme, dialogRef, data) {
664
+ this.defaultAppTheme = defaultAppTheme;
665
+ this.dialogRef = dialogRef;
666
+ this.data = data;
667
+ this.lang = LanguageService.defaultLanguage;
668
+ this.showCloseButton = false;
669
+ this.showSecondaryButton = true;
670
+ this.primaryButtonDataTestId = "confirm-dialog.confirm-button";
671
+ this.secondaryButtonDataTestId = "confirm-dialog.cancel-button";
672
+ this.applicationTheme = "light";
673
+ this.confirmMessage = data.message;
674
+ this.confirmButtonText = data.confirmButtonText;
675
+ this.cancelButtonText = data.cancelButtonText;
676
+ this.title = data.title;
677
+ this.lang = data.language ?? LanguageService.defaultLanguage;
678
+ this.confirmMessageHtml = data.messageHtml ?? void 0;
679
+ this.showCloseButton = data.showCloseButton ?? false;
680
+ this.showSecondaryButton = data.showSecondaryButton ?? true;
681
+ this.color = data.color ?? null;
682
+ this.primaryButtonType = data.primaryButtonType ?? "primary";
683
+ this.secondaryButtonType = data.secondaryButtonType ?? "ghost";
684
+ this.primaryButtonIconName = data.primaryButtonIconName ?? void 0;
685
+ this.primaryButtonDataTestId = data.primaryButtonDataTestId ?? "confirm-dialog.confirm-button";
686
+ this.secondaryButtonDataTestId = data.secondaryButtonDataTestId ?? "confirm-dialog.cancel-button";
687
+ this.primaryButtonIconPosition = data.primaryButtonIconPosition ?? "left";
688
+ if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
689
+ }
690
+ onConfirm() {
691
+ if (this.data.onConfirm) this.data.onConfirm();
692
+ this.dialogRef.close(true);
693
+ }
694
+ static {
695
+ this.ɵfac = i0.ɵɵngDeclareFactory({
696
+ minVersion: "12.0.0",
697
+ version: "22.2.4",
698
+ ngImport: i0,
699
+ type: ConfirmDialogComponent,
700
+ deps: [
701
+ {
702
+ token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
703
+ optional: true
704
+ },
705
+ { token: i1.MatDialogRef },
706
+ { token: MAT_DIALOG_DATA }
707
+ ],
708
+ target: i0.ɵɵFactoryTarget.Component
709
+ });
710
+ }
711
+ static {
712
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
713
+ minVersion: "17.0.0",
714
+ version: "22.2.4",
715
+ type: ConfirmDialogComponent,
716
+ isStandalone: true,
717
+ selector: "ui-confirm-dialog",
718
+ inputs: { applicationTheme: "applicationTheme" },
719
+ ngImport: i0,
720
+ template: "<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n",
721
+ styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}\n"],
722
+ dependencies: [
723
+ {
724
+ kind: "component",
725
+ type: DialogComponent,
726
+ selector: "ui-dialog",
727
+ inputs: [
728
+ "title",
729
+ "showCloseButton",
730
+ "canCloseFn",
731
+ "secondaryButtonLabel",
732
+ "footerMessage",
733
+ "primaryButtonLabel",
734
+ "primaryButtonIconName",
735
+ "secondaryButtonType",
736
+ "primaryButtonType",
737
+ "primaryButtonDataTestId",
738
+ "testId",
739
+ "closeButtonTestId",
740
+ "closeButtonAriaLabel",
741
+ "secondaryButtonDataTestId",
742
+ "companyColor",
743
+ "applicationTheme",
744
+ "disablePrimaryButton",
745
+ "primaryButtonLoading",
746
+ "primaryButtonTooltip",
747
+ "disableClose",
748
+ "shouldDisableButtons",
749
+ "ariaLabelledby",
750
+ "ariaDescribedby",
751
+ "keyboardOpen",
752
+ "primaryButtonIconPosition"
753
+ ],
754
+ outputs: [
755
+ "closeEvent",
756
+ "secondaryButtonClickEvent",
757
+ "primaryButtonClickEvent"
758
+ ]
759
+ },
760
+ {
761
+ kind: "pipe",
762
+ type: AsyncPipe,
763
+ name: "async"
764
+ },
765
+ {
766
+ kind: "pipe",
767
+ type: UiTranslatePipe,
768
+ name: "uiTranslate"
769
+ }
770
+ ],
771
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
772
+ });
773
+ }
774
+ };
775
+ i0.ɵɵngDeclareClassMetadata({
776
+ minVersion: "12.0.0",
777
+ version: "22.2.4",
778
+ ngImport: i0,
779
+ type: ConfirmDialogComponent,
780
+ decorators: [{
781
+ type: Component,
782
+ args: [{
783
+ selector: "ui-confirm-dialog",
784
+ changeDetection: ChangeDetectionStrategy.OnPush,
785
+ imports: [
786
+ DialogComponent,
787
+ AsyncPipe,
788
+ UiTranslatePipe
789
+ ],
790
+ template: "<ng-container>\n <ui-dialog\n [title]=\"title ?? ('COMMON.CONFIRM' | uiTranslate | async)!\"\n [primaryButtonLabel]=\"confirmButtonText ?? ('COMMON.YES' | uiTranslate | async)!\"\n [secondaryButtonLabel]=\"\n showSecondaryButton ? (cancelButtonText ?? ('COMMON.CANCEL' | uiTranslate | async)!) : undefined\n \"\n (primaryButtonClickEvent)=\"onConfirm()\"\n (secondaryButtonClickEvent)=\"dialogRef.close(false)\"\n (closeEvent)=\"dialogRef.close(null)\"\n [primaryButtonType]=\"primaryButtonType\"\n [primaryButtonIconName]=\"primaryButtonIconName\"\n [secondaryButtonType]=\"secondaryButtonType\"\n [applicationTheme]=\"applicationTheme\"\n [showCloseButton]=\"showCloseButton\"\n [companyColor]=\"color\"\n [primaryButtonDataTestId]=\"primaryButtonDataTestId\"\n [secondaryButtonDataTestId]=\"secondaryButtonDataTestId\"\n [primaryButtonIconPosition]=\"primaryButtonIconPosition\"\n >\n <div class=\"message\">{{ confirmMessage }}</div>\n @if (confirmMessageHtml) {\n <div class=\"message\" [innerHTML]=\"confirmMessageHtml\"></div>\n }\n </ui-dialog>\n</ng-container>\n",
791
+ styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}\n"]
792
+ }]
793
+ }],
794
+ ctorParameters: () => [
795
+ {
796
+ type: void 0,
797
+ decorators: [{ type: Optional }, {
798
+ type: Inject,
799
+ args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
800
+ }]
801
+ },
802
+ { type: i1.MatDialogRef },
803
+ {
804
+ type: void 0,
805
+ decorators: [{
806
+ type: Inject,
807
+ args: [MAT_DIALOG_DATA]
808
+ }]
809
+ }
810
+ ],
811
+ propDecorators: { applicationTheme: [{ type: Input }] }
812
+ });
813
+ var ConfirmDialogComponentModule = class ConfirmDialogComponentModule {
814
+ static {
815
+ this.ɵfac = i0.ɵɵngDeclareFactory({
816
+ minVersion: "12.0.0",
817
+ version: "22.2.4",
818
+ ngImport: i0,
819
+ type: ConfirmDialogComponentModule,
820
+ deps: [],
821
+ target: i0.ɵɵFactoryTarget.NgModule
822
+ });
823
+ }
824
+ static {
825
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
826
+ minVersion: "14.0.0",
827
+ version: "22.2.4",
828
+ ngImport: i0,
829
+ type: ConfirmDialogComponentModule,
830
+ imports: [
831
+ CommonModule,
832
+ MatDialogModule,
833
+ ButtonComponentModule,
834
+ DialogComponentModule,
835
+ UiTranslatePipe,
836
+ ConfirmDialogComponent
837
+ ],
838
+ exports: [ConfirmDialogComponent]
839
+ });
840
+ }
841
+ static {
842
+ this.ɵinj = i0.ɵɵngDeclareInjector({
843
+ minVersion: "12.0.0",
844
+ version: "22.2.4",
845
+ ngImport: i0,
846
+ type: ConfirmDialogComponentModule,
847
+ providers: [{
848
+ provide: MAT_DIALOG_DATA,
849
+ useValue: {}
850
+ }, {
851
+ provide: MatDialogRef,
852
+ useValue: {}
853
+ }],
854
+ imports: [
855
+ CommonModule,
856
+ MatDialogModule,
857
+ ButtonComponentModule,
858
+ DialogComponentModule,
859
+ ConfirmDialogComponent
860
+ ]
861
+ });
862
+ }
863
+ };
864
+ i0.ɵɵngDeclareClassMetadata({
865
+ minVersion: "12.0.0",
866
+ version: "22.2.4",
867
+ ngImport: i0,
868
+ type: ConfirmDialogComponentModule,
869
+ decorators: [{
870
+ type: NgModule,
871
+ args: [{
872
+ exports: [ConfirmDialogComponent],
873
+ providers: [{
874
+ provide: MAT_DIALOG_DATA,
875
+ useValue: {}
876
+ }, {
877
+ provide: MatDialogRef,
878
+ useValue: {}
879
+ }],
880
+ imports: [
881
+ CommonModule,
882
+ MatDialogModule,
883
+ ButtonComponentModule,
884
+ DialogComponentModule,
885
+ UiTranslatePipe,
886
+ ConfirmDialogComponent
887
+ ]
888
+ }]
889
+ }]
890
+ });
891
+ var DialogCustomComponent = class DialogCustomComponent {
892
+ constructor(defaultAppTheme, data, cdr) {
893
+ this.defaultAppTheme = defaultAppTheme;
894
+ this.data = data;
895
+ this.cdr = cdr;
896
+ this.applicationTheme = "light";
897
+ if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
898
+ }
899
+ ngOnInit() {
900
+ this.canClose = this.canCloseFalse.bind(this);
901
+ setTimeout(() => {
902
+ this.canClose = this.canCloseTrue.bind(this);
903
+ this.cdr.markForCheck();
904
+ }, 2e3);
905
+ }
906
+ canCloseFalse() {
907
+ return false;
908
+ }
909
+ canCloseTrue() {
910
+ return true;
911
+ }
912
+ static {
913
+ this.ɵfac = i0.ɵɵngDeclareFactory({
914
+ minVersion: "12.0.0",
915
+ version: "22.2.4",
916
+ ngImport: i0,
917
+ type: DialogCustomComponent,
918
+ deps: [
919
+ {
920
+ token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
921
+ optional: true
922
+ },
923
+ { token: MAT_DIALOG_DATA },
924
+ { token: i0.ChangeDetectorRef }
925
+ ],
926
+ target: i0.ɵɵFactoryTarget.Component
927
+ });
928
+ }
929
+ static {
930
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
931
+ minVersion: "17.0.0",
932
+ version: "22.2.4",
933
+ type: DialogCustomComponent,
934
+ isStandalone: true,
935
+ selector: "ui-dialog-custom",
936
+ inputs: { applicationTheme: "applicationTheme" },
937
+ ngImport: i0,
938
+ template: "<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n",
939
+ styles: [".custom-header{width:100%}.custom-header .button-group{display:flex;gap:8px;align-items:center;margin-left:auto}\n"],
940
+ dependencies: [
941
+ {
942
+ kind: "component",
943
+ type: DialogComponent,
944
+ selector: "ui-dialog",
945
+ inputs: [
946
+ "title",
947
+ "showCloseButton",
948
+ "canCloseFn",
949
+ "secondaryButtonLabel",
950
+ "footerMessage",
951
+ "primaryButtonLabel",
952
+ "primaryButtonIconName",
953
+ "secondaryButtonType",
954
+ "primaryButtonType",
955
+ "primaryButtonDataTestId",
956
+ "testId",
957
+ "closeButtonTestId",
958
+ "closeButtonAriaLabel",
959
+ "secondaryButtonDataTestId",
960
+ "companyColor",
961
+ "applicationTheme",
962
+ "disablePrimaryButton",
963
+ "primaryButtonLoading",
964
+ "primaryButtonTooltip",
965
+ "disableClose",
966
+ "shouldDisableButtons",
967
+ "ariaLabelledby",
968
+ "ariaDescribedby",
969
+ "keyboardOpen",
970
+ "primaryButtonIconPosition"
971
+ ],
972
+ outputs: [
973
+ "closeEvent",
974
+ "secondaryButtonClickEvent",
975
+ "primaryButtonClickEvent"
976
+ ]
977
+ },
978
+ {
979
+ kind: "component",
980
+ type: ButtonComponent,
981
+ selector: "ui-button",
982
+ inputs: [
983
+ "size",
984
+ "variant",
985
+ "label",
986
+ "iconPosition",
987
+ "justIcon",
988
+ "iconName",
989
+ "trailingIconName",
990
+ "trailingIconFilled",
991
+ "disabled",
992
+ "loading",
993
+ "loadingWithLabel",
994
+ "fullWidth",
995
+ "url",
996
+ "urlTarget",
997
+ "value",
998
+ "tooltip",
999
+ "isPremium",
1000
+ "type",
1001
+ "companyColor",
1002
+ "buttonBadgeConfig",
1003
+ "applicationTheme",
1004
+ "disabledScaleOnClick",
1005
+ "ariaLabel",
1006
+ "ariaExpanded",
1007
+ "ariaControls",
1008
+ "ariaPressed",
1009
+ "ariaRequired",
1010
+ "ariaLabelledby",
1011
+ "ariaDescribedby",
1012
+ "preventDefault",
1013
+ "hasBackground",
1014
+ "tooltipPosition",
1015
+ "role",
1016
+ "iconFilled",
1017
+ "testId"
1018
+ ],
1019
+ outputs: ["buttonClickEvent", "buttonHoverEvent"]
1020
+ },
1021
+ {
1022
+ kind: "component",
1023
+ type: ToggleComponent,
1024
+ selector: "ui-toggle",
1025
+ inputs: [
1026
+ "selected",
1027
+ "disabled",
1028
+ "label",
1029
+ "message",
1030
+ "maxWidth",
1031
+ "applicationTheme",
1032
+ "ariaLabel",
1033
+ "testId",
1034
+ "ariaRequired",
1035
+ "preventClick",
1036
+ "loading",
1037
+ "ariaDescribedby"
1038
+ ],
1039
+ outputs: ["toggle"]
1040
+ }
1041
+ ],
1042
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
1043
+ encapsulation: i0.ViewEncapsulation.None
1044
+ });
1045
+ }
1046
+ };
1047
+ i0.ɵɵngDeclareClassMetadata({
1048
+ minVersion: "12.0.0",
1049
+ version: "22.2.4",
1050
+ ngImport: i0,
1051
+ type: DialogCustomComponent,
1052
+ decorators: [{
1053
+ type: Component,
1054
+ args: [{
1055
+ selector: "ui-dialog-custom",
1056
+ changeDetection: ChangeDetectionStrategy.OnPush,
1057
+ encapsulation: ViewEncapsulation.None,
1058
+ imports: [
1059
+ DialogComponent,
1060
+ ButtonComponent,
1061
+ ToggleComponent
1062
+ ],
1063
+ template: "<ui-dialog\n [title]=\"data.title\"\n [showCloseButton]=\"data.showCloseButton\"\n [applicationTheme]=\"applicationTheme\"\n [primaryButtonLabel]=\"'OK'\"\n [secondaryButtonLabel]=\"'Cancel'\"\n [canCloseFn]=\"canClose\"\n [keyboardOpen]=\"data.keyboardOpen\"\n [footerMessage]=\"data.footerMessage\"\n [disablePrimaryButton]=\"data.type === 'disabled-primary-tooltip'\"\n [primaryButtonTooltip]=\"data.primaryButtonTooltip ?? ''\"\n>\n <!-- Custom header content -->\n @if (data.type === 'custom-header') {\n <div dialogHeader class=\"custom-header\">\n <div class=\"button-group\">\n <ui-button label=\"Action 1\" [variant]=\"'ghost'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n <ui-button label=\"Action 2\" [variant]=\"'primary'\" [applicationTheme]=\"applicationTheme\"></ui-button>\n </div>\n </div>\n }\n\n <!-- Custom footer content projection -->\n @if (data.type === 'footer-content') {\n <ui-toggle dialogFooter label=\"Don't show this again\" [applicationTheme]=\"applicationTheme\"></ui-toggle>\n }\n\n <!-- Dialog content -->\n <div class=\"dialog-content\">\n @if (data.type === 'default') {\n <p class=\"dialog-message\">This is a default dialog example with a standard header.</p>\n }\n @if (data.type === 'custom-header') {\n <p class=\"dialog-message\">This dialog uses a custom header with content projection.</p>\n }\n @if (data.type === 'footer-content') {\n <p class=\"dialog-message\">\n This dialog projects a <code>ui-toggle</code> into the footer, to the left of the action buttons.\n </p>\n }\n @if (data.type === 'disabled-primary-tooltip') {\n <p class=\"dialog-message\">\n The primary button is disabled; hover it to see the tooltip explaining why the action is unavailable.\n </p>\n }\n <p class=\"dialog-message\">The dialog will be closeable in 2 seconds (demonstrating canCloseFn).</p>\n </div>\n</ui-dialog>\n",
1064
+ styles: [".custom-header{width:100%}.custom-header .button-group{display:flex;gap:8px;align-items:center;margin-left:auto}\n"]
1065
+ }]
1066
+ }],
1067
+ ctorParameters: () => [
1068
+ {
1069
+ type: void 0,
1070
+ decorators: [{ type: Optional }, {
1071
+ type: Inject,
1072
+ args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
1073
+ }]
1074
+ },
1075
+ {
1076
+ type: void 0,
1077
+ decorators: [{
1078
+ type: Inject,
1079
+ args: [MAT_DIALOG_DATA]
1080
+ }]
1081
+ },
1082
+ { type: i0.ChangeDetectorRef }
1083
+ ],
1084
+ propDecorators: { applicationTheme: [{ type: Input }] }
1085
+ });
1086
+ var DialogCustomComponentModule = class DialogCustomComponentModule {
1087
+ static {
1088
+ this.ɵfac = i0.ɵɵngDeclareFactory({
1089
+ minVersion: "12.0.0",
1090
+ version: "22.2.4",
1091
+ ngImport: i0,
1092
+ type: DialogCustomComponentModule,
1093
+ deps: [],
1094
+ target: i0.ɵɵFactoryTarget.NgModule
1095
+ });
1096
+ }
1097
+ static {
1098
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
1099
+ minVersion: "14.0.0",
1100
+ version: "22.2.4",
1101
+ ngImport: i0,
1102
+ type: DialogCustomComponentModule,
1103
+ imports: [
1104
+ CommonModule,
1105
+ DialogComponentModule,
1106
+ ButtonComponentModule,
1107
+ ToggleComponentModule,
1108
+ DialogCustomComponent
1109
+ ],
1110
+ exports: [DialogCustomComponent]
1111
+ });
1112
+ }
1113
+ static {
1114
+ this.ɵinj = i0.ɵɵngDeclareInjector({
1115
+ minVersion: "12.0.0",
1116
+ version: "22.2.4",
1117
+ ngImport: i0,
1118
+ type: DialogCustomComponentModule,
1119
+ imports: [
1120
+ CommonModule,
1121
+ DialogComponentModule,
1122
+ ButtonComponentModule,
1123
+ ToggleComponentModule,
1124
+ DialogCustomComponent
1125
+ ]
1126
+ });
1127
+ }
1128
+ };
1129
+ i0.ɵɵngDeclareClassMetadata({
1130
+ minVersion: "12.0.0",
1131
+ version: "22.2.4",
1132
+ ngImport: i0,
1133
+ type: DialogCustomComponentModule,
1134
+ decorators: [{
1135
+ type: NgModule,
1136
+ args: [{
1137
+ imports: [
1138
+ CommonModule,
1139
+ DialogComponentModule,
1140
+ ButtonComponentModule,
1141
+ ToggleComponentModule,
1142
+ DialogCustomComponent
1143
+ ],
1144
+ exports: [DialogCustomComponent]
1145
+ }]
1146
+ }]
1147
+ });
540
1148
  export { ConfirmDialogComponent, ConfirmDialogComponentModule, DialogComponent, DialogComponentModule, DialogCustomComponent, DialogCustomComponentModule, DialogService };
541
- //# sourceMappingURL=testgorilla-tgo-ui-components-dialog.mjs.map
1149
+
1150
+ //# sourceMappingURL=testgorilla-tgo-ui-components-dialog.mjs.map