@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,80 +1,244 @@
1
- import * as i2 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { Inject, ChangeDetectionStrategy, Component } from '@angular/core';
5
- import * as i1 from '@angular/material/dialog';
6
- import { MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
7
- import * as i3 from '@testgorilla/tgo-ui/components/button';
8
- import { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';
9
- import * as i4 from '@testgorilla/tgo-ui/components/dialog';
10
- import { DialogComponentModule } from '@testgorilla/tgo-ui/components/dialog';
11
- import * as i5 from '@testgorilla/tgo-ui/components/progress-bar';
12
- import { ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';
13
-
14
- class MediaDialogComponent {
15
- constructor(dialogRef, data) {
16
- this.dialogRef = dialogRef;
17
- this.data = data;
18
- this.primaryButtonDataTestId = 'media-dialog.confirm-button';
19
- this.secondaryButtonDataTestId = 'media-dialog.cancel-button';
20
- this.backButtonDataTestId = 'media-dialog.back-button';
21
- this.currentStepIndex = 0;
22
- this.steps = [];
23
- this.steps = data.steps ?? [];
24
- if (this.steps.length < 1) {
25
- this.dialogRef.close();
26
- throw new Error('MediaDialogComponent: steps must contain at least one step.');
27
- }
28
- this.setStep(0);
29
- }
30
- setStep(index) {
31
- const step = this.steps[index];
32
- this.currentStepIndex = index;
33
- this.title = step.title;
34
- this.subheader = step.subheader;
35
- this.body = step.body ?? '';
36
- this.mediaContainer = step.mediaContainer;
37
- this.primaryButtonLabel = step?.primaryButtonLabel;
38
- this.secondaryButtonLabel = step?.secondaryButtonLabel;
39
- this.backButtonLabel = step?.backButtonLabel;
40
- this.primaryButtonDataTestId = step?.primaryButtonDataTestId ?? 'media-dialog.confirm-button';
41
- this.secondaryButtonDataTestId = step?.secondaryButtonDataTestId ?? 'media-dialog.cancel-button';
42
- this.backButtonDataTestId = step?.backButtonDataTestId ?? 'media-dialog.back-button';
43
- }
44
- onPrimaryButtonClick() {
45
- const isLastStep = this.currentStepIndex === this.steps.length - 1;
46
- if (isLastStep) {
47
- this.dialogRef.close(true);
48
- }
49
- else {
50
- this.setStep(this.currentStepIndex + 1);
51
- }
52
- }
53
- onBackButtonClick() {
54
- if (this.currentStepIndex > 0) {
55
- this.setStep(this.currentStepIndex - 1);
56
- }
57
- }
58
- onSecondaryButtonClick() {
59
- this.dialogRef.close(false);
60
- }
61
- dismiss() {
62
- this.dialogRef.close(null);
63
- }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: MediaDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: MediaDialogComponent, isStandalone: true, selector: "ui-media-dialog", ngImport: i0, template: "<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n", styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}ui-progress-bar{position:absolute;top:0;left:0;width:100%}.media-container{width:536px;height:302px;border-radius:10px;margin-bottom:16px;overflow:hidden}.subheader{margin:0 0 8px!important}.footer{display:flex;justify-content:space-between;align-items:center}.footer .action-buttons{display:flex;gap:8px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: ButtonComponentModule }, { kind: "component", type: i3.ButtonComponent, selector: "ui-button", inputs: ["size", "variant", "label", "iconPosition", "justIcon", "iconName", "trailingIconName", "trailingIconFilled", "disabled", "loading", "loadingWithLabel", "fullWidth", "url", "urlTarget", "value", "tooltip", "isPremium", "type", "companyColor", "buttonBadgeConfig", "applicationTheme", "disabledScaleOnClick", "ariaLabel", "ariaExpanded", "ariaControls", "ariaPressed", "ariaRequired", "ariaLabelledby", "ariaDescribedby", "preventDefault", "hasBackground", "tooltipPosition", "role", "iconFilled", "testId"], outputs: ["buttonClickEvent", "buttonHoverEvent"] }, { kind: "ngmodule", type: DialogComponentModule }, { kind: "component", type: i4.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: "ngmodule", type: ProgressBarComponentModule }, { kind: "component", type: i5.ProgressBarComponent, selector: "ui-progress-bar", inputs: ["companyColor", "progress", "mode", "buffer", "applicationTheme", "ariaLabel", "ariaDescribedBy", "showPercentage"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: MediaDialogComponent, decorators: [{
68
- type: Component,
69
- args: [{ selector: 'ui-media-dialog', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CommonModule, MatDialogModule, ButtonComponentModule, DialogComponentModule, ProgressBarComponentModule], template: "<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n", styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}ui-progress-bar{position:absolute;top:0;left:0;width:100%}.media-container{width:536px;height:302px;border-radius:10px;margin-bottom:16px;overflow:hidden}.subheader{margin:0 0 8px!important}.footer{display:flex;justify-content:space-between;align-items:center}.footer .action-buttons{display:flex;gap:8px}\n"] }]
70
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
71
- type: Inject,
72
- args: [MAT_DIALOG_DATA]
73
- }] }] });
74
-
75
- /**
76
- * Generated bundle index. Do not edit.
77
- */
78
-
1
+ import * as i2 from "@angular/common";
2
+ import { CommonModule } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, Inject } from "@angular/core";
5
+ import * as i1 from "@angular/material/dialog";
6
+ import { MAT_DIALOG_DATA, MatDialogModule } from "@angular/material/dialog";
7
+ import * as i3 from "@testgorilla/tgo-ui/components/button";
8
+ import { ButtonComponentModule } from "@testgorilla/tgo-ui/components/button";
9
+ import * as i4 from "@testgorilla/tgo-ui/components/dialog";
10
+ import { DialogComponentModule } from "@testgorilla/tgo-ui/components/dialog";
11
+ import * as i5 from "@testgorilla/tgo-ui/components/progress-bar";
12
+ import { ProgressBarComponentModule } from "@testgorilla/tgo-ui/components/progress-bar";
13
+ var MediaDialogComponent = class MediaDialogComponent {
14
+ constructor(dialogRef, data) {
15
+ this.dialogRef = dialogRef;
16
+ this.data = data;
17
+ this.primaryButtonDataTestId = "media-dialog.confirm-button";
18
+ this.secondaryButtonDataTestId = "media-dialog.cancel-button";
19
+ this.backButtonDataTestId = "media-dialog.back-button";
20
+ this.currentStepIndex = 0;
21
+ this.steps = [];
22
+ this.steps = data.steps ?? [];
23
+ if (this.steps.length < 1) {
24
+ this.dialogRef.close();
25
+ throw new Error("MediaDialogComponent: steps must contain at least one step.");
26
+ }
27
+ this.setStep(0);
28
+ }
29
+ setStep(index) {
30
+ const step = this.steps[index];
31
+ this.currentStepIndex = index;
32
+ this.title = step.title;
33
+ this.subheader = step.subheader;
34
+ this.body = step.body ?? "";
35
+ this.mediaContainer = step.mediaContainer;
36
+ this.primaryButtonLabel = step?.primaryButtonLabel;
37
+ this.secondaryButtonLabel = step?.secondaryButtonLabel;
38
+ this.backButtonLabel = step?.backButtonLabel;
39
+ this.primaryButtonDataTestId = step?.primaryButtonDataTestId ?? "media-dialog.confirm-button";
40
+ this.secondaryButtonDataTestId = step?.secondaryButtonDataTestId ?? "media-dialog.cancel-button";
41
+ this.backButtonDataTestId = step?.backButtonDataTestId ?? "media-dialog.back-button";
42
+ }
43
+ onPrimaryButtonClick() {
44
+ if (this.currentStepIndex === this.steps.length - 1) this.dialogRef.close(true);
45
+ else this.setStep(this.currentStepIndex + 1);
46
+ }
47
+ onBackButtonClick() {
48
+ if (this.currentStepIndex > 0) this.setStep(this.currentStepIndex - 1);
49
+ }
50
+ onSecondaryButtonClick() {
51
+ this.dialogRef.close(false);
52
+ }
53
+ dismiss() {
54
+ this.dialogRef.close(null);
55
+ }
56
+ static {
57
+ this.ɵfac = i0.ɵɵngDeclareFactory({
58
+ minVersion: "12.0.0",
59
+ version: "22.2.4",
60
+ ngImport: i0,
61
+ type: MediaDialogComponent,
62
+ deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }],
63
+ target: i0.ɵɵFactoryTarget.Component
64
+ });
65
+ }
66
+ static {
67
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
68
+ minVersion: "17.0.0",
69
+ version: "22.2.4",
70
+ type: MediaDialogComponent,
71
+ isStandalone: true,
72
+ selector: "ui-media-dialog",
73
+ ngImport: i0,
74
+ template: "<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n",
75
+ styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}ui-progress-bar{position:absolute;top:0;left:0;width:100%}.media-container{width:536px;height:302px;border-radius:10px;margin-bottom:16px;overflow:hidden}.subheader{margin:0 0 8px!important}.footer{display:flex;justify-content:space-between;align-items:center}.footer .action-buttons{display:flex;gap:8px}\n"],
76
+ dependencies: [
77
+ {
78
+ kind: "ngmodule",
79
+ type: CommonModule
80
+ },
81
+ {
82
+ kind: "directive",
83
+ type: i2.NgTemplateOutlet,
84
+ selector: "[ngTemplateOutlet]",
85
+ inputs: [
86
+ "ngTemplateOutletContext",
87
+ "ngTemplateOutlet",
88
+ "ngTemplateOutletInjector"
89
+ ]
90
+ },
91
+ {
92
+ kind: "ngmodule",
93
+ type: MatDialogModule
94
+ },
95
+ {
96
+ kind: "directive",
97
+ type: i1.MatDialogActions,
98
+ selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]",
99
+ inputs: ["align"]
100
+ },
101
+ {
102
+ kind: "ngmodule",
103
+ type: ButtonComponentModule
104
+ },
105
+ {
106
+ kind: "component",
107
+ type: i3.ButtonComponent,
108
+ selector: "ui-button",
109
+ inputs: [
110
+ "size",
111
+ "variant",
112
+ "label",
113
+ "iconPosition",
114
+ "justIcon",
115
+ "iconName",
116
+ "trailingIconName",
117
+ "trailingIconFilled",
118
+ "disabled",
119
+ "loading",
120
+ "loadingWithLabel",
121
+ "fullWidth",
122
+ "url",
123
+ "urlTarget",
124
+ "value",
125
+ "tooltip",
126
+ "isPremium",
127
+ "type",
128
+ "companyColor",
129
+ "buttonBadgeConfig",
130
+ "applicationTheme",
131
+ "disabledScaleOnClick",
132
+ "ariaLabel",
133
+ "ariaExpanded",
134
+ "ariaControls",
135
+ "ariaPressed",
136
+ "ariaRequired",
137
+ "ariaLabelledby",
138
+ "ariaDescribedby",
139
+ "preventDefault",
140
+ "hasBackground",
141
+ "tooltipPosition",
142
+ "role",
143
+ "iconFilled",
144
+ "testId"
145
+ ],
146
+ outputs: ["buttonClickEvent", "buttonHoverEvent"]
147
+ },
148
+ {
149
+ kind: "ngmodule",
150
+ type: DialogComponentModule
151
+ },
152
+ {
153
+ kind: "component",
154
+ type: i4.DialogComponent,
155
+ selector: "ui-dialog",
156
+ inputs: [
157
+ "title",
158
+ "showCloseButton",
159
+ "canCloseFn",
160
+ "secondaryButtonLabel",
161
+ "footerMessage",
162
+ "primaryButtonLabel",
163
+ "primaryButtonIconName",
164
+ "secondaryButtonType",
165
+ "primaryButtonType",
166
+ "primaryButtonDataTestId",
167
+ "testId",
168
+ "closeButtonTestId",
169
+ "closeButtonAriaLabel",
170
+ "secondaryButtonDataTestId",
171
+ "companyColor",
172
+ "applicationTheme",
173
+ "disablePrimaryButton",
174
+ "primaryButtonLoading",
175
+ "primaryButtonTooltip",
176
+ "disableClose",
177
+ "shouldDisableButtons",
178
+ "ariaLabelledby",
179
+ "ariaDescribedby",
180
+ "keyboardOpen",
181
+ "primaryButtonIconPosition"
182
+ ],
183
+ outputs: [
184
+ "closeEvent",
185
+ "secondaryButtonClickEvent",
186
+ "primaryButtonClickEvent"
187
+ ]
188
+ },
189
+ {
190
+ kind: "ngmodule",
191
+ type: ProgressBarComponentModule
192
+ },
193
+ {
194
+ kind: "component",
195
+ type: i5.ProgressBarComponent,
196
+ selector: "ui-progress-bar",
197
+ inputs: [
198
+ "companyColor",
199
+ "progress",
200
+ "mode",
201
+ "buffer",
202
+ "applicationTheme",
203
+ "ariaLabel",
204
+ "ariaDescribedBy",
205
+ "showPercentage"
206
+ ]
207
+ }
208
+ ],
209
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
210
+ });
211
+ }
212
+ };
213
+ i0.ɵɵngDeclareClassMetadata({
214
+ minVersion: "12.0.0",
215
+ version: "22.2.4",
216
+ ngImport: i0,
217
+ type: MediaDialogComponent,
218
+ decorators: [{
219
+ type: Component,
220
+ args: [{
221
+ selector: "ui-media-dialog",
222
+ changeDetection: ChangeDetectionStrategy.OnPush,
223
+ imports: [
224
+ CommonModule,
225
+ MatDialogModule,
226
+ ButtonComponentModule,
227
+ DialogComponentModule,
228
+ ProgressBarComponentModule
229
+ ],
230
+ template: "<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n",
231
+ styles: ["::ng-deep .ui-dialog-wrapper{max-width:600px!important}ui-progress-bar{position:absolute;top:0;left:0;width:100%}.media-container{width:536px;height:302px;border-radius:10px;margin-bottom:16px;overflow:hidden}.subheader{margin:0 0 8px!important}.footer{display:flex;justify-content:space-between;align-items:center}.footer .action-buttons{display:flex;gap:8px}\n"]
232
+ }]
233
+ }],
234
+ ctorParameters: () => [{ type: i1.MatDialogRef }, {
235
+ type: void 0,
236
+ decorators: [{
237
+ type: Inject,
238
+ args: [MAT_DIALOG_DATA]
239
+ }]
240
+ }]
241
+ });
79
242
  export { MediaDialogComponent };
80
- //# sourceMappingURL=testgorilla-tgo-ui-components-media-dialog.mjs.map
243
+
244
+ //# sourceMappingURL=testgorilla-tgo-ui-components-media-dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-media-dialog.mjs","sources":["../../../components/media-dialog/media-dialog.component.ts","../../../components/media-dialog/media-dialog.component.html","../../../components/media-dialog/testgorilla-tgo-ui-components-media-dialog.ts"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, TemplateRef } from '@angular/core';\nimport { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { DialogComponentModule } from '@testgorilla/tgo-ui/components/dialog';\nimport { ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';\n\nimport { MediaDialogData, MediaDialogStep } from './media-dialog.model';\n\n@Component({\n selector: 'ui-media-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './media-dialog.component.html',\n styleUrls: ['./media-dialog.component.scss'],\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, DialogComponentModule, ProgressBarComponentModule],\n})\nexport class MediaDialogComponent {\n primaryButtonLabel: string | undefined;\n secondaryButtonLabel: string | undefined;\n backButtonLabel: string | undefined;\n title: string | undefined;\n primaryButtonDataTestId = 'media-dialog.confirm-button';\n secondaryButtonDataTestId = 'media-dialog.cancel-button';\n backButtonDataTestId = 'media-dialog.back-button';\n\n mediaContainer: TemplateRef<unknown>;\n subheader: string | undefined;\n body: string;\n\n currentStepIndex = 0;\n steps: MediaDialogStep[] = [];\n\n constructor(\n public dialogRef: MatDialogRef<MediaDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: MediaDialogData\n ) {\n this.steps = data.steps ?? [];\n if (this.steps.length < 1) {\n this.dialogRef.close();\n throw new Error('MediaDialogComponent: steps must contain at least one step.');\n }\n this.setStep(0);\n }\n\n private setStep(index: number): void {\n const step = this.steps[index];\n this.currentStepIndex = index;\n this.title = step.title;\n this.subheader = step.subheader;\n this.body = step.body ?? '';\n this.mediaContainer = step.mediaContainer;\n this.primaryButtonLabel = step?.primaryButtonLabel;\n this.secondaryButtonLabel = step?.secondaryButtonLabel;\n this.backButtonLabel = step?.backButtonLabel;\n this.primaryButtonDataTestId = step?.primaryButtonDataTestId ?? 'media-dialog.confirm-button';\n this.secondaryButtonDataTestId = step?.secondaryButtonDataTestId ?? 'media-dialog.cancel-button';\n this.backButtonDataTestId = step?.backButtonDataTestId ?? 'media-dialog.back-button';\n }\n\n onPrimaryButtonClick(): void {\n const isLastStep = this.currentStepIndex === this.steps.length - 1;\n\n if (isLastStep) {\n this.dialogRef.close(true);\n } else {\n this.setStep(this.currentStepIndex + 1);\n }\n }\n\n onBackButtonClick(): void {\n if (this.currentStepIndex > 0) {\n this.setStep(this.currentStepIndex - 1);\n }\n }\n\n onSecondaryButtonClick(): void {\n this.dialogRef.close(false);\n }\n\n dismiss(): void {\n this.dialogRef.close(null);\n }\n}\n","<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAiBa,oBAAoB,CAAA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AAA,YAAA,EAAA,sBAAA,EAAA,eAAA,EAAA,oBAAA,EAAA,uBAAA,EAAA,qBAAA,EAAA,mBAAA,EAAA,yBAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,sBAAA,EAAA,2BAAA,EAAA,cAAA,EAAA,kBAAA,EAAA,sBAAA,EAAA,sBAAA,EAAA,sBAAA,EAAA,cAAA,EAAA,sBAAA,EAAA,gBAAA,EAAA,iBAAA,EAAA,cAAA,EAAA,2BAAA,CAAA,EAAA,OAAA,EAAA,CAAA,YAAA,EAAA,2BAAA,EAAA,yBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAE,0BAA0B,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,oBAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,CAAA,cAAA,EAAA,UAAA,EAAA,MAAA,EAAA,QAAA,EAAA,kBAAA,EAAA,WAAA,EAAA,iBAAA,EAAA,gBAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;4FAEtG,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAPhC,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,iBAAiB,EAAA,eAAA,EACV,uBAAuB,CAAC,MAAM,WAGtC,CAAC,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,0BAA0B,CAAC,EAAA,QAAA,EAAA,0mDAAA,EAAA,MAAA,EAAA,CAAA,4WAAA,CAAA,EAAA;;0BAoB/G,MAAM;2BAAC,eAAe;;;AEnC3B;;AAEG;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-media-dialog.mjs","names":[],"sources":["../../../components/media-dialog/media-dialog.component.ts","../../../components/media-dialog/media-dialog.component.html"],"sourcesContent":["import { CommonModule } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, Inject, TemplateRef } from '@angular/core';\nimport { MatDialogModule, MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nimport { ButtonComponentModule } from '@testgorilla/tgo-ui/components/button';\nimport { DialogComponentModule } from '@testgorilla/tgo-ui/components/dialog';\nimport { ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';\n\nimport { MediaDialogData, MediaDialogStep } from './media-dialog.model';\n\n@Component({\n selector: 'ui-media-dialog',\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './media-dialog.component.html',\n styleUrls: ['./media-dialog.component.scss'],\n imports: [CommonModule, MatDialogModule, ButtonComponentModule, DialogComponentModule, ProgressBarComponentModule],\n})\nexport class MediaDialogComponent {\n primaryButtonLabel: string | undefined;\n secondaryButtonLabel: string | undefined;\n backButtonLabel: string | undefined;\n title: string | undefined;\n primaryButtonDataTestId = 'media-dialog.confirm-button';\n secondaryButtonDataTestId = 'media-dialog.cancel-button';\n backButtonDataTestId = 'media-dialog.back-button';\n\n mediaContainer: TemplateRef<unknown>;\n subheader: string | undefined;\n body: string;\n\n currentStepIndex = 0;\n steps: MediaDialogStep[] = [];\n\n constructor(\n public dialogRef: MatDialogRef<MediaDialogComponent>,\n @Inject(MAT_DIALOG_DATA) private readonly data: MediaDialogData\n ) {\n this.steps = data.steps ?? [];\n if (this.steps.length < 1) {\n this.dialogRef.close();\n throw new Error('MediaDialogComponent: steps must contain at least one step.');\n }\n this.setStep(0);\n }\n\n private setStep(index: number): void {\n const step = this.steps[index];\n this.currentStepIndex = index;\n this.title = step.title;\n this.subheader = step.subheader;\n this.body = step.body ?? '';\n this.mediaContainer = step.mediaContainer;\n this.primaryButtonLabel = step?.primaryButtonLabel;\n this.secondaryButtonLabel = step?.secondaryButtonLabel;\n this.backButtonLabel = step?.backButtonLabel;\n this.primaryButtonDataTestId = step?.primaryButtonDataTestId ?? 'media-dialog.confirm-button';\n this.secondaryButtonDataTestId = step?.secondaryButtonDataTestId ?? 'media-dialog.cancel-button';\n this.backButtonDataTestId = step?.backButtonDataTestId ?? 'media-dialog.back-button';\n }\n\n onPrimaryButtonClick(): void {\n const isLastStep = this.currentStepIndex === this.steps.length - 1;\n\n if (isLastStep) {\n this.dialogRef.close(true);\n } else {\n this.setStep(this.currentStepIndex + 1);\n }\n }\n\n onBackButtonClick(): void {\n if (this.currentStepIndex > 0) {\n this.setStep(this.currentStepIndex - 1);\n }\n }\n\n onSecondaryButtonClick(): void {\n this.dialogRef.close(false);\n }\n\n dismiss(): void {\n this.dialogRef.close(null);\n }\n}\n","<ng-container>\n @if (steps && steps.length > 1) {\n <ui-progress-bar [progress]=\"(currentStepIndex + 1) * (100 / steps.length)\"></ui-progress-bar>\n }\n\n <ui-dialog [title]=\"title\" (closeEvent)=\"dialogRef.close(null)\" [showCloseButton]=\"true\">\n @if (mediaContainer) {\n <div class=\"media-container\">\n <ng-container [ngTemplateOutlet]=\"mediaContainer\"></ng-container>\n </div>\n }\n\n @if (subheader) {\n <h4 class=\"subheader\">{{ subheader }}</h4>\n }\n\n @if (body) {\n <div [innerHTML]=\"body\"></div>\n }\n\n <div mat-dialog-actions class=\"footer\">\n <div>\n @if (backButtonLabel && currentStepIndex > 0) {\n <ui-button\n variant=\"text-inline\"\n size=\"medium\"\n [label]=\"backButtonLabel\"\n [attr.data-testid]=\"backButtonDataTestId\"\n (click)=\"onBackButtonClick()\"\n ></ui-button>\n }\n </div>\n\n <div class=\"action-buttons\">\n @if (secondaryButtonLabel) {\n <ui-button\n variant=\"ghost\"\n [label]=\"secondaryButtonLabel\"\n [attr.data-testid]=\"secondaryButtonDataTestId\"\n (click)=\"onSecondaryButtonClick()\"\n ></ui-button>\n }\n @if (primaryButtonLabel) {\n <ui-button\n variant=\"primary\"\n [label]=\"primaryButtonLabel\"\n [attr.data-testid]=\"primaryButtonDataTestId\"\n (click)=\"onPrimaryButtonClick()\"\n ></ui-button>\n }\n </div>\n </div>\n </ui-dialog>\n</ng-container>\n"],"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