@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,420 +1,554 @@
1
- import { trigger, transition, style, animate } from '@angular/animations';
2
- import { NgClass, NgTemplateOutlet, AsyncPipe, LowerCasePipe, CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { EventEmitter, HostListener, Output, HostBinding, Directive, inject, ChangeDetectorRef, forwardRef, ViewChild, Input, Optional, Inject, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
5
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
6
- import { Color, UiTranslatePipe } from '@testgorilla/tgo-ui/components/core';
7
- import { IconComponent, IconComponentModule } from '@testgorilla/tgo-ui/components/icon';
8
- import { ProgressBarComponent, ProgressBarComponentModule } from '@testgorilla/tgo-ui/components/progress-bar';
9
- import { MatFormFieldModule } from '@angular/material/form-field';
10
- import { MatInputModule } from '@angular/material/input';
11
-
12
- class DragDropDirective {
13
- constructor() {
14
- this.fileDropped = new EventEmitter();
15
- }
16
- // Dragover listener
17
- onDragOver(event) {
18
- event.preventDefault();
19
- event.stopPropagation();
20
- this.file = true;
21
- }
22
- // Dragleave listener
23
- onDragLeave(event) {
24
- event.preventDefault();
25
- event.stopPropagation();
26
- this.file = false;
27
- }
28
- // Drop listener
29
- ondrop(event) {
30
- event.preventDefault();
31
- event.stopPropagation();
32
- this.file = false;
33
- let files;
34
- if (event.dataTransfer) {
35
- files = event.dataTransfer.files;
36
- if (files.length > 0) {
37
- this.fileDropped.emit(files);
38
- }
39
- }
40
- }
41
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DragDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
42
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.25", type: DragDropDirective, isStandalone: true, selector: "[uiDragDrop]", outputs: { fileDropped: "fileDropped" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "ondrop($event)" }, properties: { "class.file-over": "this.file" } }, ngImport: i0 }); }
43
- }
44
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DragDropDirective, decorators: [{
45
- type: Directive,
46
- args: [{ selector: '[uiDragDrop]' }]
47
- }], ctorParameters: () => [], propDecorators: { file: [{
48
- type: HostBinding,
49
- args: ['class.file-over']
50
- }], fileDropped: [{
51
- type: Output
52
- }], onDragOver: [{
53
- type: HostListener,
54
- args: ['dragover', ['$event']]
55
- }], onDragLeave: [{
56
- type: HostListener,
57
- args: ['dragleave', ['$event']]
58
- }], ondrop: [{
59
- type: HostListener,
60
- args: ['drop', ['$event']]
61
- }] } });
62
-
63
- class FileUploadComponent {
64
- get successInputTestId() {
65
- return this.testId ? `${this.testId}-success` : 'file-upload-success-input';
66
- }
67
- get fileSizeInMB() {
68
- return this.file ? (this.file.size / (1024 * 1024)).toFixed(2) : null;
69
- }
70
- constructor(defaultAppTheme) {
71
- this.defaultAppTheme = defaultAppTheme;
72
- this.class = 'ui-file-upload';
73
- /**
74
- * Show Upload progress percentage or not
75
- *
76
- * @type {boolean}
77
- * @memberof FileUploadComponent
78
- */
79
- this.showUploadProgress = true;
80
- /**
81
- * File upload disabled
82
- *
83
- * @type {boolean}
84
- * @memberof FileUploadComponent
85
- */
86
- this.disabled = false;
87
- this.testId = null;
88
- /**
89
- * Existing file information
90
- *
91
- * @type {(File | null)}
92
- * @memberof FileUploadComponent
93
- */
94
- this.file = null;
95
- /**
96
- * Color of the file upload.
97
- * Defaults to Test Gorilla primary color.
98
- *
99
- * @type {string}
100
- * @memberof FileUploadComponent
101
- */
102
- this.companyColor = '';
103
- /**
104
- *
105
- * Defines the application theme
106
- *
107
- * @type {ApplicationTheme}
108
- * @memberof FileUploadComponent
109
- */
110
- this.applicationTheme = 'light';
111
- /**
112
- * A string representing the ARIA requirement for accessibility.
113
- * This attribute is used to indicate whether an input field is required for form submission.
114
- * @type {boolean}
115
- * @memberof FileUploadComponent
116
- */
117
- this.ariaRequired = false;
118
- /**
119
- * Whether to show the file size information.
120
- * @type {boolean}
121
- * @memberof FileUploadComponent
122
- */
123
- this.showFileSize = true;
124
- this.OnDrop = new EventEmitter();
125
- this.translationContext = 'FILE_UPLOAD.';
126
- /**
127
- * @ignore
128
- */
129
- this.onChange = (_value) => { };
130
- /**
131
- * @ignore
132
- */
133
- this.onTouch = () => { };
134
- this.isMissedMinSize = false;
135
- this.progress = false;
136
- this.success = false;
137
- this.isCanceled = false;
138
- this.colorUploadSuccess = Color.SUCCESS_50;
139
- this.cdr = inject(ChangeDetectorRef);
140
- if (defaultAppTheme) {
141
- this.applicationTheme = defaultAppTheme;
142
- }
143
- }
144
- ngOnInit() {
145
- this.browse = true;
146
- }
147
- //When file is dropped
148
- onFileDropped(files) {
149
- this.emitFile(files);
150
- }
151
- //When input changes
152
- onChangeUpload(event) {
153
- this.isCanceled = false;
154
- const element = event.currentTarget;
155
- // Prevents clearing items when user selects cancel in the dialog. Cancel event can emit empty file list.
156
- if (element.files?.length) {
157
- this.emitFile(element.files || new FileList());
158
- }
159
- }
160
- //Emit drop file
161
- emitFile(files) {
162
- const [file] = Array.from(files);
163
- this.file = file;
164
- this.errors = null;
165
- this.onTouch();
166
- this.isMissedMinSize =
167
- !file?.size && !this.minFileSizeMB ? true : this.fileSizeToMB(file?.size ?? 0) <= this.minFileSizeMB;
168
- if (!this.isMissedMinSize) {
169
- this.onChange(this.file);
170
- this.OnDrop.emit(file);
171
- }
172
- }
173
- //Show progress-bar
174
- showProgress() {
175
- this.browse = false;
176
- return Boolean(this.file && !this.errors && !this.isMissedMinSize);
177
- }
178
- //Show success elements
179
- showSuccess() {
180
- return Boolean(this.file && this.uploadProgress === 100 && !this.errors && !this.isMissedMinSize);
181
- }
182
- //Show browse when there are error
183
- showBrowse() {
184
- return Boolean(this.errors) || this.isMissedMinSize;
185
- }
186
- ngOnChanges(changes) {
187
- if (!this.isCanceled) {
188
- if (changes['uploadProgress'] || changes['file']) {
189
- this.progress = this.showProgress();
190
- this.success = this.showSuccess();
191
- this.browse = this.showBrowse();
192
- }
193
- if (changes['errors']) {
194
- this.progress = this.showProgress();
195
- this.success = this.showSuccess();
196
- this.browse = this.showBrowse();
197
- }
198
- if (changes['applicationTheme']) {
199
- this.compColor = this.getCompanyColor();
200
- }
201
- }
202
- }
203
- writeValue(value) {
204
- if (value) {
205
- this.file = value || null;
206
- }
207
- else {
208
- this.file = null;
209
- }
210
- // The forms API calls this from outside the component's own change
211
- // detection — under OnPush the view must be marked explicitly.
212
- this.cdr.markForCheck();
213
- }
214
- registerOnChange(fn) {
215
- this.onChange = fn;
216
- }
217
- registerOnTouched(fn) {
218
- this.onTouch = fn;
219
- }
220
- setDisabledState(isDisabled) {
221
- this.disabled = isDisabled;
222
- this.cdr.markForCheck();
223
- }
224
- getCompanyColor() {
225
- // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- empty companyColor falls back to the theme colour
226
- return this.companyColor || (this.applicationTheme === 'classic' ? '#46A997' : '#D410AA');
227
- }
228
- fileSizeToMB(fileSize) {
229
- return fileSize / 1024 / 1024;
230
- }
231
- onKeydown(ev) {
232
- if (ev.key === 'Enter' || ev.key === ' ') {
233
- this.fileDrop?.nativeElement?.click();
234
- }
235
- else if (ev.key === 'Escape') {
236
- this.file = null;
237
- this.success = false;
238
- this.progress = false;
239
- this.errors = null;
240
- this.isMissedMinSize = false;
241
- this.browse = true;
242
- this.isCanceled = true;
243
- }
244
- }
245
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponent, deps: [{ token: 'CANOPYUI_DEFAULT_APPLICATION_THEME', optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
246
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: FileUploadComponent, isStandalone: true, selector: "ui-file-upload", inputs: { maxFileSizeMB: "maxFileSizeMB", minFileSizeMB: "minFileSizeMB", supportedFileTypes: "supportedFileTypes", uploadProgress: "uploadProgress", showUploadProgress: "showUploadProgress", fileProcessingMessage: "fileProcessingMessage", errors: "errors", disabled: "disabled", testId: "testId", file: "file", companyColor: "companyColor", applicationTheme: "applicationTheme", ariaLabel: "ariaLabel", ariaRequired: "ariaRequired", showFileSize: "showFileSize" }, outputs: { OnDrop: "OnDrop" }, host: { properties: { "class": "this.class", "style.--color": "this.compColor" } }, providers: [
247
- {
248
- provide: NG_VALUE_ACCESSOR,
249
- useExisting: forwardRef(() => FileUploadComponent),
250
- multi: true,
251
- },
252
- ], viewQueries: [{ propertyName: "fileDrop", first: true, predicate: ["fileDrop"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<ng-container>\n <div\n class=\"upload-file-container\"\n uiDragDrop\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{ 'upload-errors': !!errors || isMissedMinSize, 'upload-file-container-disabled': disabled }\"\n (fileDropped)=\"onFileDropped($event)\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"fileDrop?.nativeElement?.click()\"\n >\n @if (browse && !(success && !!file && progress)) {\n <div [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n @if (!!errors || isMissedMinSize) {\n <div class=\"errors\" role=\"alert\">\n @if (!!errors) {\n @for (error of errors; track error) {\n <span><ui-icon name=\"Error\" class=\"error-icon\"></ui-icon> {{ error }}</span>\n }\n }\n @if (isMissedMinSize) {\n <span>\n <ui-icon name=\"Error\" class=\"error-icon\"></ui-icon>\n {{ translationContext + 'MIN_SIZE_ERROR' | uiTranslate: { min: minFileSizeMB } | async }}\n </span>\n }\n </div>\n }\n <input\n [attr.data-testid]=\"testId ?? 'file-upload-input'\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"'upload-supported-files'\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"file\"\n [accept]=\"supportedFileTypes\"\n [disabled]=\"disabled\"\n (change)=\"onChangeUpload($event)\"\n />\n @if (applicationTheme === 'classic') {\n <p>\n {{ translationContext + 'DRAG_AND_DROP_OR' | uiTranslate | async }}\n <span class=\"semibold\"> {{ translationContext + 'BROWSE' | uiTranslate | async | lowercase }}</span>\n {{ translationContext + 'YOUR_FILES' | uiTranslate | async }}\n </p>\n } @else {\n <p id=\"drag-and-drop\">{{ translationContext + 'DRAG_AND_DROP' | uiTranslate | async }}</p>\n }\n <span class=\"upload-text\"\n >{{ maxFileSizeMB }}{{ translationContext + 'MAX_SIZE' | uiTranslate | async }}</span\n >\n @if (minFileSizeMB) {\n <span class=\"upload-text\"\n >{{ minFileSizeMB }}{{ translationContext + 'MIN_SIZE' | uiTranslate | async }}</span\n >\n }\n </div>\n </div>\n }\n @if (success) {\n <div class=\"upload-success\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n <span class=\"upload-success-text\"\n ><ui-icon name=\"Check-round-in-line\" [color]=\"colorUploadSuccess\"></ui-icon\n >{{ translationContext + 'FILE_UPLOADING_SUCCESS' | uiTranslate | async }}</span\n >\n <input\n [attr.data-testid]=\"successInputTestId\"\n [tabIndex]=\"-1\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"success || progress ? '' : 'supported-file-types'\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileTest\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <span class=\"upload-text\">{{ file?.name }}</span>\n @if (showFileSize) {\n <span class=\"upload-text\">{{\n translationContext + 'FILE_SIZE' | uiTranslate: { fileSize: fileSizeInMB } | async\n }}</span>\n }\n </div>\n }\n @if (!!progress && !!file && !success) {\n <div class=\"upload-progress\" [@inOutAnimationProgress]>\n <p>{{ file.name }}</p>\n <ui-progress-bar\n [progress]=\"uploadProgress\"\n [companyColor]=\"compColor\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>\n <p class=\"upload-text\">\n {{ fileProcessingMessage ?? (translationContext + 'UPLOADING' | uiTranslate | async) }}\n @if (showUploadProgress) {\n <span>{{ uploadProgress }}</span\n >%\n }\n </p>\n </div>\n }\n\n <ng-template #iconTpl>\n @if (applicationTheme === 'classic') {\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n } @else {\n <ui-icon class=\"upload-icon\" name=\"Upload\" [size]=\"'24'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n </ng-template>\n\n @if (!!supportedFileTypes) {\n <div [attr.theme]=\"applicationTheme\" class=\"upload-supported-files\" id=\"upload-supported-files\">\n <span>{{ translationContext + 'SUPPORTED_FILE_TYPES' | uiTranslate | async }}</span\n >{{ supportedFileTypes }}\n </div>\n }\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.upload-file-container{border-radius:8px;border:1px dashed #888888;background:#fff;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px;cursor:pointer}.upload-file-container:focus-visible{outline-offset:2px;outline:2px solid #242424;animation:focus-ring-animation .4s forwards}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-success,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-success ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-success ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-success input,.upload-file-container .upload-browse input{visibility:hidden;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-success .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:16px}.upload-file-container .upload-success .upload-success-text,.upload-file-container .upload-browse .upload-success-text{color:#3c9a13;display:flex;align-items:center;gap:8px}.upload-file-container .upload-success p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-success p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline;color:var(--color)}.upload-file-container .upload-success .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:16px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-success .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-success .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-success .errors .error-icon,.upload-file-container .upload-browse .errors .error-icon{margin-right:4px}.upload-file-container .upload-success .errors .error-icon svg,.upload-file-container .upload-browse .errors .error-icon svg{color:#cb7b7a}.upload-file-container .upload-success .errors .error-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors .error-icon mat-icon.size-16 svg{width:16px;height:16px}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-file-container[theme=dark],.upload-file-container[theme=light]{border-radius:10px;border-color:#242424}.upload-file-container[theme=dark].upload-file-container-disabled,.upload-file-container[theme=light].upload-file-container-disabled{border-color:#919191;color:#919191;background-color:#f4f4f4}.upload-file-container[theme=dark].upload-file-container-disabled .upload-icon svg,.upload-file-container[theme=light].upload-file-container-disabled .upload-icon svg{color:#919191}.upload-file-container[theme=dark].upload-errors,.upload-file-container[theme=light].upload-errors{border-color:#e02800}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):hover,.upload-file-container[theme=light]:not(.upload-file-container-disabled):hover{background:#f4f4f4;border-style:solid}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):active,.upload-file-container[theme=light]:not(.upload-file-container-disabled):active{background:#f4f4f4;transform:scale(.98)}.upload-file-container[theme=dark] .errors,.upload-file-container[theme=light] .errors{color:#e02800;font-size:14px}.upload-file-container[theme=dark] .errors .error-icon svg,.upload-file-container[theme=light] .errors .error-icon svg{color:#e02800}.upload-supported-files{left:0;position:absolute;top:100%;font-size:12px;line-height:16px;margin-top:8px;width:100%}.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:563px}.upload-supported-files span{font-weight:700;margin-right:5px}@media(max-width:600px){.upload-file-container,.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:100%}}.transparent{opacity:0}\n"], dependencies: [{ kind: "directive", type: DragDropDirective, selector: "[uiDragDrop]", outputs: ["fileDropped"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: ProgressBarComponent, selector: "ui-progress-bar", inputs: ["companyColor", "progress", "mode", "buffer", "applicationTheme", "ariaLabel", "ariaDescribedBy", "showPercentage"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: LowerCasePipe, name: "lowercase" }, { kind: "pipe", type: UiTranslatePipe, name: "uiTranslate" }], animations: [
253
- trigger('inOutAnimation', [
254
- transition(':enter', [
255
- style({ opacity: 0, height: 0 }),
256
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
257
- ]),
258
- transition(':leave', [
259
- style({ opacity: 1, height: '196px' }),
260
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
261
- ]),
262
- ]),
263
- trigger('inOutAnimationProgress', [
264
- transition(':enter', [
265
- style({ opacity: 0, height: 0 }),
266
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
267
- ]),
268
- transition(':leave', [
269
- style({ opacity: 1, height: '196px' }),
270
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
271
- ]),
272
- ]),
273
- trigger('inOutAnimationChange', [
274
- transition(':enter', [
275
- style({ opacity: 0, height: 0 }),
276
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
277
- ]),
278
- transition(':leave', [
279
- style({ opacity: 1, height: '196px' }),
280
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
281
- ]),
282
- ]),
283
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
284
- }
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponent, decorators: [{
286
- type: Component,
287
- args: [{ selector: 'ui-file-upload', encapsulation: ViewEncapsulation.None, providers: [
288
- {
289
- provide: NG_VALUE_ACCESSOR,
290
- useExisting: forwardRef(() => FileUploadComponent),
291
- multi: true,
292
- },
293
- ], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
294
- trigger('inOutAnimation', [
295
- transition(':enter', [
296
- style({ opacity: 0, height: 0 }),
297
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
298
- ]),
299
- transition(':leave', [
300
- style({ opacity: 1, height: '196px' }),
301
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
302
- ]),
303
- ]),
304
- trigger('inOutAnimationProgress', [
305
- transition(':enter', [
306
- style({ opacity: 0, height: 0 }),
307
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
308
- ]),
309
- transition(':leave', [
310
- style({ opacity: 1, height: '196px' }),
311
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
312
- ]),
313
- ]),
314
- trigger('inOutAnimationChange', [
315
- transition(':enter', [
316
- style({ opacity: 0, height: 0 }),
317
- animate('0.2s ease-out', style({ opacity: 1, height: '196px' })),
318
- ]),
319
- transition(':leave', [
320
- style({ opacity: 1, height: '196px' }),
321
- animate('0.2s ease-in', style({ opacity: 0, height: 0 })),
322
- ]),
323
- ]),
324
- ], imports: [
325
- DragDropDirective,
326
- NgClass,
327
- NgTemplateOutlet,
328
- IconComponent,
329
- ProgressBarComponent,
330
- AsyncPipe,
331
- LowerCasePipe,
332
- UiTranslatePipe,
333
- ], template: "<ng-container>\n <div\n class=\"upload-file-container\"\n uiDragDrop\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{ 'upload-errors': !!errors || isMissedMinSize, 'upload-file-container-disabled': disabled }\"\n (fileDropped)=\"onFileDropped($event)\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"fileDrop?.nativeElement?.click()\"\n >\n @if (browse && !(success && !!file && progress)) {\n <div [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n @if (!!errors || isMissedMinSize) {\n <div class=\"errors\" role=\"alert\">\n @if (!!errors) {\n @for (error of errors; track error) {\n <span><ui-icon name=\"Error\" class=\"error-icon\"></ui-icon> {{ error }}</span>\n }\n }\n @if (isMissedMinSize) {\n <span>\n <ui-icon name=\"Error\" class=\"error-icon\"></ui-icon>\n {{ translationContext + 'MIN_SIZE_ERROR' | uiTranslate: { min: minFileSizeMB } | async }}\n </span>\n }\n </div>\n }\n <input\n [attr.data-testid]=\"testId ?? 'file-upload-input'\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"'upload-supported-files'\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"file\"\n [accept]=\"supportedFileTypes\"\n [disabled]=\"disabled\"\n (change)=\"onChangeUpload($event)\"\n />\n @if (applicationTheme === 'classic') {\n <p>\n {{ translationContext + 'DRAG_AND_DROP_OR' | uiTranslate | async }}\n <span class=\"semibold\"> {{ translationContext + 'BROWSE' | uiTranslate | async | lowercase }}</span>\n {{ translationContext + 'YOUR_FILES' | uiTranslate | async }}\n </p>\n } @else {\n <p id=\"drag-and-drop\">{{ translationContext + 'DRAG_AND_DROP' | uiTranslate | async }}</p>\n }\n <span class=\"upload-text\"\n >{{ maxFileSizeMB }}{{ translationContext + 'MAX_SIZE' | uiTranslate | async }}</span\n >\n @if (minFileSizeMB) {\n <span class=\"upload-text\"\n >{{ minFileSizeMB }}{{ translationContext + 'MIN_SIZE' | uiTranslate | async }}</span\n >\n }\n </div>\n </div>\n }\n @if (success) {\n <div class=\"upload-success\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n <span class=\"upload-success-text\"\n ><ui-icon name=\"Check-round-in-line\" [color]=\"colorUploadSuccess\"></ui-icon\n >{{ translationContext + 'FILE_UPLOADING_SUCCESS' | uiTranslate | async }}</span\n >\n <input\n [attr.data-testid]=\"successInputTestId\"\n [tabIndex]=\"-1\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"success || progress ? '' : 'supported-file-types'\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileTest\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <span class=\"upload-text\">{{ file?.name }}</span>\n @if (showFileSize) {\n <span class=\"upload-text\">{{\n translationContext + 'FILE_SIZE' | uiTranslate: { fileSize: fileSizeInMB } | async\n }}</span>\n }\n </div>\n }\n @if (!!progress && !!file && !success) {\n <div class=\"upload-progress\" [@inOutAnimationProgress]>\n <p>{{ file.name }}</p>\n <ui-progress-bar\n [progress]=\"uploadProgress\"\n [companyColor]=\"compColor\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>\n <p class=\"upload-text\">\n {{ fileProcessingMessage ?? (translationContext + 'UPLOADING' | uiTranslate | async) }}\n @if (showUploadProgress) {\n <span>{{ uploadProgress }}</span\n >%\n }\n </p>\n </div>\n }\n\n <ng-template #iconTpl>\n @if (applicationTheme === 'classic') {\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n } @else {\n <ui-icon class=\"upload-icon\" name=\"Upload\" [size]=\"'24'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n </ng-template>\n\n @if (!!supportedFileTypes) {\n <div [attr.theme]=\"applicationTheme\" class=\"upload-supported-files\" id=\"upload-supported-files\">\n <span>{{ translationContext + 'SUPPORTED_FILE_TYPES' | uiTranslate | async }}</span\n >{{ supportedFileTypes }}\n </div>\n }\n </div>\n</ng-container>\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}.upload-file-container{border-radius:8px;border:1px dashed #888888;background:#fff;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px;cursor:pointer}.upload-file-container:focus-visible{outline-offset:2px;outline:2px solid #242424;animation:focus-ring-animation .4s forwards}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-success,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-success ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-success ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-success input,.upload-file-container .upload-browse input{visibility:hidden;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-success .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:16px}.upload-file-container .upload-success .upload-success-text,.upload-file-container .upload-browse .upload-success-text{color:#3c9a13;display:flex;align-items:center;gap:8px}.upload-file-container .upload-success p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-success p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline;color:var(--color)}.upload-file-container .upload-success .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:16px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-success .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-success .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-success .errors .error-icon,.upload-file-container .upload-browse .errors .error-icon{margin-right:4px}.upload-file-container .upload-success .errors .error-icon svg,.upload-file-container .upload-browse .errors .error-icon svg{color:#cb7b7a}.upload-file-container .upload-success .errors .error-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors .error-icon mat-icon.size-16 svg{width:16px;height:16px}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-file-container[theme=dark],.upload-file-container[theme=light]{border-radius:10px;border-color:#242424}.upload-file-container[theme=dark].upload-file-container-disabled,.upload-file-container[theme=light].upload-file-container-disabled{border-color:#919191;color:#919191;background-color:#f4f4f4}.upload-file-container[theme=dark].upload-file-container-disabled .upload-icon svg,.upload-file-container[theme=light].upload-file-container-disabled .upload-icon svg{color:#919191}.upload-file-container[theme=dark].upload-errors,.upload-file-container[theme=light].upload-errors{border-color:#e02800}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):hover,.upload-file-container[theme=light]:not(.upload-file-container-disabled):hover{background:#f4f4f4;border-style:solid}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):active,.upload-file-container[theme=light]:not(.upload-file-container-disabled):active{background:#f4f4f4;transform:scale(.98)}.upload-file-container[theme=dark] .errors,.upload-file-container[theme=light] .errors{color:#e02800;font-size:14px}.upload-file-container[theme=dark] .errors .error-icon svg,.upload-file-container[theme=light] .errors .error-icon svg{color:#e02800}.upload-supported-files{left:0;position:absolute;top:100%;font-size:12px;line-height:16px;margin-top:8px;width:100%}.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:563px}.upload-supported-files span{font-weight:700;margin-right:5px}@media(max-width:600px){.upload-file-container,.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:100%}}.transparent{opacity:0}\n"] }]
334
- }], ctorParameters: () => [{ type: undefined, decorators: [{
335
- type: Optional
336
- }, {
337
- type: Inject,
338
- args: ['CANOPYUI_DEFAULT_APPLICATION_THEME']
339
- }] }], propDecorators: { class: [{
340
- type: HostBinding
341
- }], maxFileSizeMB: [{
342
- type: Input
343
- }], minFileSizeMB: [{
344
- type: Input
345
- }], supportedFileTypes: [{
346
- type: Input
347
- }], uploadProgress: [{
348
- type: Input
349
- }], showUploadProgress: [{
350
- type: Input
351
- }], fileProcessingMessage: [{
352
- type: Input
353
- }], errors: [{
354
- type: Input
355
- }], disabled: [{
356
- type: Input
357
- }], testId: [{
358
- type: Input
359
- }], file: [{
360
- type: Input
361
- }], companyColor: [{
362
- type: Input
363
- }], compColor: [{
364
- type: HostBinding,
365
- args: ['style.--color']
366
- }], applicationTheme: [{
367
- type: Input
368
- }], ariaLabel: [{
369
- type: Input
370
- }], ariaRequired: [{
371
- type: Input
372
- }], showFileSize: [{
373
- type: Input
374
- }], OnDrop: [{
375
- type: Output
376
- }], fileDrop: [{
377
- type: ViewChild,
378
- args: ['fileDrop']
379
- }] } });
380
-
381
- class FileUploadComponentModule {
382
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
383
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponentModule, imports: [CommonModule,
384
- MatFormFieldModule,
385
- MatInputModule,
386
- IconComponentModule,
387
- ProgressBarComponentModule,
388
- UiTranslatePipe,
389
- FileUploadComponent,
390
- DragDropDirective], exports: [FileUploadComponent] }); }
391
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponentModule, imports: [CommonModule,
392
- MatFormFieldModule,
393
- MatInputModule,
394
- IconComponentModule,
395
- ProgressBarComponentModule,
396
- FileUploadComponent] }); }
397
- }
398
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: FileUploadComponentModule, decorators: [{
399
- type: NgModule,
400
- args: [{
401
- imports: [
402
- CommonModule,
403
- MatFormFieldModule,
404
- MatInputModule,
405
- IconComponentModule,
406
- ProgressBarComponentModule,
407
- UiTranslatePipe,
408
- FileUploadComponent,
409
- DragDropDirective,
410
- ],
411
- exports: [FileUploadComponent],
412
- }]
413
- }] });
414
-
415
- /**
416
- * Generated bundle index. Do not edit.
417
- */
418
-
1
+ import { animate, style, transition, trigger } from "@angular/animations";
2
+ import { AsyncPipe, CommonModule, LowerCasePipe, NgClass, NgTemplateOutlet } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Directive, EventEmitter, HostBinding, HostListener, Inject, Input, NgModule, Optional, Output, ViewChild, ViewEncapsulation, forwardRef, inject } from "@angular/core";
5
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
6
+ import { Color, UiTranslatePipe } from "@testgorilla/tgo-ui/components/core";
7
+ import { IconComponent, IconComponentModule } from "@testgorilla/tgo-ui/components/icon";
8
+ import { ProgressBarComponent, ProgressBarComponentModule } from "@testgorilla/tgo-ui/components/progress-bar";
9
+ import { MatFormFieldModule } from "@angular/material/form-field";
10
+ import { MatInputModule } from "@angular/material/input";
11
+ var DragDropDirective = class DragDropDirective {
12
+ constructor() {
13
+ this.fileDropped = new EventEmitter();
14
+ }
15
+ onDragOver(event) {
16
+ event.preventDefault();
17
+ event.stopPropagation();
18
+ this.file = true;
19
+ }
20
+ onDragLeave(event) {
21
+ event.preventDefault();
22
+ event.stopPropagation();
23
+ this.file = false;
24
+ }
25
+ ondrop(event) {
26
+ event.preventDefault();
27
+ event.stopPropagation();
28
+ this.file = false;
29
+ let files;
30
+ if (event.dataTransfer) {
31
+ files = event.dataTransfer.files;
32
+ if (files.length > 0) this.fileDropped.emit(files);
33
+ }
34
+ }
35
+ static {
36
+ this.ɵfac = i0.ɵɵngDeclareFactory({
37
+ minVersion: "12.0.0",
38
+ version: "22.2.4",
39
+ ngImport: i0,
40
+ type: DragDropDirective,
41
+ deps: [],
42
+ target: i0.ɵɵFactoryTarget.Directive
43
+ });
44
+ }
45
+ static {
46
+ this.ɵdir = i0.ɵɵngDeclareDirective({
47
+ minVersion: "14.0.0",
48
+ version: "22.2.4",
49
+ type: DragDropDirective,
50
+ isStandalone: true,
51
+ selector: "[uiDragDrop]",
52
+ outputs: { fileDropped: "fileDropped" },
53
+ host: {
54
+ listeners: {
55
+ "dragover": "onDragOver($event)",
56
+ "dragleave": "onDragLeave($event)",
57
+ "drop": "ondrop($event)"
58
+ },
59
+ properties: { "class.file-over": "this.file" }
60
+ },
61
+ ngImport: i0
62
+ });
63
+ }
64
+ };
65
+ i0.ɵɵngDeclareClassMetadata({
66
+ minVersion: "12.0.0",
67
+ version: "22.2.4",
68
+ ngImport: i0,
69
+ type: DragDropDirective,
70
+ decorators: [{
71
+ type: Directive,
72
+ args: [{ selector: "[uiDragDrop]" }]
73
+ }],
74
+ ctorParameters: () => [],
75
+ propDecorators: {
76
+ file: [{
77
+ type: HostBinding,
78
+ args: ["class.file-over"]
79
+ }],
80
+ fileDropped: [{ type: Output }],
81
+ onDragOver: [{
82
+ type: HostListener,
83
+ args: ["dragover", ["$event"]]
84
+ }],
85
+ onDragLeave: [{
86
+ type: HostListener,
87
+ args: ["dragleave", ["$event"]]
88
+ }],
89
+ ondrop: [{
90
+ type: HostListener,
91
+ args: ["drop", ["$event"]]
92
+ }]
93
+ }
94
+ });
95
+ var FileUploadComponent = class FileUploadComponent {
96
+ get successInputTestId() {
97
+ return this.testId ? `${this.testId}-success` : "file-upload-success-input";
98
+ }
99
+ get fileSizeInMB() {
100
+ return this.file ? (this.file.size / 1048576).toFixed(2) : null;
101
+ }
102
+ constructor(defaultAppTheme) {
103
+ this.defaultAppTheme = defaultAppTheme;
104
+ this.class = "ui-file-upload";
105
+ this.showUploadProgress = true;
106
+ this.disabled = false;
107
+ this.testId = null;
108
+ this.file = null;
109
+ this.companyColor = "";
110
+ this.applicationTheme = "light";
111
+ this.ariaRequired = false;
112
+ this.showFileSize = true;
113
+ this.OnDrop = new EventEmitter();
114
+ this.translationContext = "FILE_UPLOAD.";
115
+ this.onChange = (_value) => {};
116
+ this.onTouch = () => {};
117
+ this.isMissedMinSize = false;
118
+ this.progress = false;
119
+ this.success = false;
120
+ this.isCanceled = false;
121
+ this.colorUploadSuccess = Color.SUCCESS_50;
122
+ this.cdr = inject(ChangeDetectorRef);
123
+ if (defaultAppTheme) this.applicationTheme = defaultAppTheme;
124
+ }
125
+ ngOnInit() {
126
+ this.browse = true;
127
+ }
128
+ onFileDropped(files) {
129
+ this.emitFile(files);
130
+ }
131
+ onChangeUpload(event) {
132
+ this.isCanceled = false;
133
+ const element = event.currentTarget;
134
+ if (element.files?.length) this.emitFile(element.files || new FileList());
135
+ }
136
+ emitFile(files) {
137
+ const [file] = Array.from(files);
138
+ this.file = file;
139
+ this.errors = null;
140
+ this.onTouch();
141
+ this.isMissedMinSize = !file?.size && !this.minFileSizeMB ? true : this.fileSizeToMB(file?.size ?? 0) <= this.minFileSizeMB;
142
+ if (!this.isMissedMinSize) {
143
+ this.onChange(this.file);
144
+ this.OnDrop.emit(file);
145
+ }
146
+ }
147
+ showProgress() {
148
+ this.browse = false;
149
+ return Boolean(this.file && !this.errors && !this.isMissedMinSize);
150
+ }
151
+ showSuccess() {
152
+ return Boolean(this.file && this.uploadProgress === 100 && !this.errors && !this.isMissedMinSize);
153
+ }
154
+ showBrowse() {
155
+ return Boolean(this.errors) || this.isMissedMinSize;
156
+ }
157
+ ngOnChanges(changes) {
158
+ if (!this.isCanceled) {
159
+ if (changes["uploadProgress"] || changes["file"]) {
160
+ this.progress = this.showProgress();
161
+ this.success = this.showSuccess();
162
+ this.browse = this.showBrowse();
163
+ }
164
+ if (changes["errors"]) {
165
+ this.progress = this.showProgress();
166
+ this.success = this.showSuccess();
167
+ this.browse = this.showBrowse();
168
+ }
169
+ if (changes["applicationTheme"]) this.compColor = this.getCompanyColor();
170
+ }
171
+ }
172
+ writeValue(value) {
173
+ if (value) this.file = value || null;
174
+ else this.file = null;
175
+ this.cdr.markForCheck();
176
+ }
177
+ registerOnChange(fn) {
178
+ this.onChange = fn;
179
+ }
180
+ registerOnTouched(fn) {
181
+ this.onTouch = fn;
182
+ }
183
+ setDisabledState(isDisabled) {
184
+ this.disabled = isDisabled;
185
+ this.cdr.markForCheck();
186
+ }
187
+ getCompanyColor() {
188
+ return this.companyColor || (this.applicationTheme === "classic" ? "#46A997" : "#D410AA");
189
+ }
190
+ fileSizeToMB(fileSize) {
191
+ return fileSize / 1024 / 1024;
192
+ }
193
+ onKeydown(ev) {
194
+ if (ev.key === "Enter" || ev.key === " ") this.fileDrop?.nativeElement?.click();
195
+ else if (ev.key === "Escape") {
196
+ this.file = null;
197
+ this.success = false;
198
+ this.progress = false;
199
+ this.errors = null;
200
+ this.isMissedMinSize = false;
201
+ this.browse = true;
202
+ this.isCanceled = true;
203
+ }
204
+ }
205
+ static {
206
+ this.ɵfac = i0.ɵɵngDeclareFactory({
207
+ minVersion: "12.0.0",
208
+ version: "22.2.4",
209
+ ngImport: i0,
210
+ type: FileUploadComponent,
211
+ deps: [{
212
+ token: "CANOPYUI_DEFAULT_APPLICATION_THEME",
213
+ optional: true
214
+ }],
215
+ target: i0.ɵɵFactoryTarget.Component
216
+ });
217
+ }
218
+ static {
219
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
220
+ minVersion: "17.0.0",
221
+ version: "22.2.4",
222
+ type: FileUploadComponent,
223
+ isStandalone: true,
224
+ selector: "ui-file-upload",
225
+ inputs: {
226
+ maxFileSizeMB: "maxFileSizeMB",
227
+ minFileSizeMB: "minFileSizeMB",
228
+ supportedFileTypes: "supportedFileTypes",
229
+ uploadProgress: "uploadProgress",
230
+ showUploadProgress: "showUploadProgress",
231
+ fileProcessingMessage: "fileProcessingMessage",
232
+ errors: "errors",
233
+ disabled: "disabled",
234
+ testId: "testId",
235
+ file: "file",
236
+ companyColor: "companyColor",
237
+ applicationTheme: "applicationTheme",
238
+ ariaLabel: "ariaLabel",
239
+ ariaRequired: "ariaRequired",
240
+ showFileSize: "showFileSize"
241
+ },
242
+ outputs: { OnDrop: "OnDrop" },
243
+ host: { properties: {
244
+ "class": "this.class",
245
+ "style.--color": "this.compColor"
246
+ } },
247
+ providers: [{
248
+ provide: NG_VALUE_ACCESSOR,
249
+ useExisting: forwardRef(() => FileUploadComponent),
250
+ multi: true
251
+ }],
252
+ viewQueries: [{
253
+ propertyName: "fileDrop",
254
+ first: true,
255
+ predicate: ["fileDrop"],
256
+ descendants: true
257
+ }],
258
+ usesOnChanges: true,
259
+ ngImport: i0,
260
+ template: "<ng-container>\n <div\n class=\"upload-file-container\"\n uiDragDrop\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{ 'upload-errors': !!errors || isMissedMinSize, 'upload-file-container-disabled': disabled }\"\n (fileDropped)=\"onFileDropped($event)\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"fileDrop?.nativeElement?.click()\"\n >\n @if (browse && !(success && !!file && progress)) {\n <div [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n @if (!!errors || isMissedMinSize) {\n <div class=\"errors\" role=\"alert\">\n @if (!!errors) {\n @for (error of errors; track error) {\n <span><ui-icon name=\"Error\" class=\"error-icon\"></ui-icon> {{ error }}</span>\n }\n }\n @if (isMissedMinSize) {\n <span>\n <ui-icon name=\"Error\" class=\"error-icon\"></ui-icon>\n {{ translationContext + 'MIN_SIZE_ERROR' | uiTranslate: { min: minFileSizeMB } | async }}\n </span>\n }\n </div>\n }\n <input\n [attr.data-testid]=\"testId ?? 'file-upload-input'\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"'upload-supported-files'\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"file\"\n [accept]=\"supportedFileTypes\"\n [disabled]=\"disabled\"\n (change)=\"onChangeUpload($event)\"\n />\n @if (applicationTheme === 'classic') {\n <p>\n {{ translationContext + 'DRAG_AND_DROP_OR' | uiTranslate | async }}\n <span class=\"semibold\"> {{ translationContext + 'BROWSE' | uiTranslate | async | lowercase }}</span>\n {{ translationContext + 'YOUR_FILES' | uiTranslate | async }}\n </p>\n } @else {\n <p id=\"drag-and-drop\">{{ translationContext + 'DRAG_AND_DROP' | uiTranslate | async }}</p>\n }\n <span class=\"upload-text\"\n >{{ maxFileSizeMB }}{{ translationContext + 'MAX_SIZE' | uiTranslate | async }}</span\n >\n @if (minFileSizeMB) {\n <span class=\"upload-text\"\n >{{ minFileSizeMB }}{{ translationContext + 'MIN_SIZE' | uiTranslate | async }}</span\n >\n }\n </div>\n </div>\n }\n @if (success) {\n <div class=\"upload-success\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n <span class=\"upload-success-text\"\n ><ui-icon name=\"Check-round-in-line\" [color]=\"colorUploadSuccess\"></ui-icon\n >{{ translationContext + 'FILE_UPLOADING_SUCCESS' | uiTranslate | async }}</span\n >\n <input\n [attr.data-testid]=\"successInputTestId\"\n [tabIndex]=\"-1\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"success || progress ? '' : 'supported-file-types'\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileTest\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <span class=\"upload-text\">{{ file?.name }}</span>\n @if (showFileSize) {\n <span class=\"upload-text\">{{\n translationContext + 'FILE_SIZE' | uiTranslate: { fileSize: fileSizeInMB } | async\n }}</span>\n }\n </div>\n }\n @if (!!progress && !!file && !success) {\n <div class=\"upload-progress\" [@inOutAnimationProgress]>\n <p>{{ file.name }}</p>\n <ui-progress-bar\n [progress]=\"uploadProgress\"\n [companyColor]=\"compColor\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>\n <p class=\"upload-text\">\n {{ fileProcessingMessage ?? (translationContext + 'UPLOADING' | uiTranslate | async) }}\n @if (showUploadProgress) {\n <span>{{ uploadProgress }}</span\n >%\n }\n </p>\n </div>\n }\n\n <ng-template #iconTpl>\n @if (applicationTheme === 'classic') {\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n } @else {\n <ui-icon class=\"upload-icon\" name=\"Upload\" [size]=\"'24'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n </ng-template>\n\n @if (!!supportedFileTypes) {\n <div [attr.theme]=\"applicationTheme\" class=\"upload-supported-files\" id=\"upload-supported-files\">\n <span>{{ translationContext + 'SUPPORTED_FILE_TYPES' | uiTranslate | async }}</span\n >{{ supportedFileTypes }}\n </div>\n }\n </div>\n</ng-container>\n",
261
+ 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}.upload-file-container{border-radius:8px;border:1px dashed #888888;background:#fff;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px;cursor:pointer}.upload-file-container:focus-visible{outline-offset:2px;outline:2px solid #242424;animation:focus-ring-animation .4s forwards}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-success,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-success ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-success ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-success input,.upload-file-container .upload-browse input{visibility:hidden;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-success .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:16px}.upload-file-container .upload-success .upload-success-text,.upload-file-container .upload-browse .upload-success-text{color:#3c9a13;display:flex;align-items:center;gap:8px}.upload-file-container .upload-success p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-success p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline;color:var(--color)}.upload-file-container .upload-success .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:16px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-success .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-success .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-success .errors .error-icon,.upload-file-container .upload-browse .errors .error-icon{margin-right:4px}.upload-file-container .upload-success .errors .error-icon svg,.upload-file-container .upload-browse .errors .error-icon svg{color:#cb7b7a}.upload-file-container .upload-success .errors .error-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors .error-icon mat-icon.size-16 svg{width:16px;height:16px}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-file-container[theme=dark],.upload-file-container[theme=light]{border-radius:10px;border-color:#242424}.upload-file-container[theme=dark].upload-file-container-disabled,.upload-file-container[theme=light].upload-file-container-disabled{border-color:#919191;color:#919191;background-color:#f4f4f4}.upload-file-container[theme=dark].upload-file-container-disabled .upload-icon svg,.upload-file-container[theme=light].upload-file-container-disabled .upload-icon svg{color:#919191}.upload-file-container[theme=dark].upload-errors,.upload-file-container[theme=light].upload-errors{border-color:#e02800}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):hover,.upload-file-container[theme=light]:not(.upload-file-container-disabled):hover{background:#f4f4f4;border-style:solid}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):active,.upload-file-container[theme=light]:not(.upload-file-container-disabled):active{background:#f4f4f4;transform:scale(.98)}.upload-file-container[theme=dark] .errors,.upload-file-container[theme=light] .errors{color:#e02800;font-size:14px}.upload-file-container[theme=dark] .errors .error-icon svg,.upload-file-container[theme=light] .errors .error-icon svg{color:#e02800}.upload-supported-files{left:0;position:absolute;top:100%;font-size:12px;line-height:16px;margin-top:8px;width:100%}.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:563px}.upload-supported-files span{font-weight:700;margin-right:5px}@media(max-width:600px){.upload-file-container,.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:100%}}.transparent{opacity:0}\n"],
262
+ dependencies: [
263
+ {
264
+ kind: "directive",
265
+ type: DragDropDirective,
266
+ selector: "[uiDragDrop]",
267
+ outputs: ["fileDropped"]
268
+ },
269
+ {
270
+ kind: "directive",
271
+ type: NgClass,
272
+ selector: "[ngClass]",
273
+ inputs: ["class", "ngClass"]
274
+ },
275
+ {
276
+ kind: "directive",
277
+ type: NgTemplateOutlet,
278
+ selector: "[ngTemplateOutlet]",
279
+ inputs: [
280
+ "ngTemplateOutletContext",
281
+ "ngTemplateOutlet",
282
+ "ngTemplateOutletInjector"
283
+ ]
284
+ },
285
+ {
286
+ kind: "component",
287
+ type: IconComponent,
288
+ selector: "ui-icon",
289
+ inputs: [
290
+ "size",
291
+ "cssClass",
292
+ "name",
293
+ "color",
294
+ "filled",
295
+ "toggleIconStyle",
296
+ "applicationTheme",
297
+ "useFullIconName"
298
+ ]
299
+ },
300
+ {
301
+ kind: "component",
302
+ type: ProgressBarComponent,
303
+ selector: "ui-progress-bar",
304
+ inputs: [
305
+ "companyColor",
306
+ "progress",
307
+ "mode",
308
+ "buffer",
309
+ "applicationTheme",
310
+ "ariaLabel",
311
+ "ariaDescribedBy",
312
+ "showPercentage"
313
+ ]
314
+ },
315
+ {
316
+ kind: "pipe",
317
+ type: AsyncPipe,
318
+ name: "async"
319
+ },
320
+ {
321
+ kind: "pipe",
322
+ type: LowerCasePipe,
323
+ name: "lowercase"
324
+ },
325
+ {
326
+ kind: "pipe",
327
+ type: UiTranslatePipe,
328
+ name: "uiTranslate"
329
+ }
330
+ ],
331
+ animations: [
332
+ trigger("inOutAnimation", [transition(":enter", [style({
333
+ opacity: 0,
334
+ height: 0
335
+ }), animate("0.2s ease-out", style({
336
+ opacity: 1,
337
+ height: "196px"
338
+ }))]), transition(":leave", [style({
339
+ opacity: 1,
340
+ height: "196px"
341
+ }), animate("0.2s ease-in", style({
342
+ opacity: 0,
343
+ height: 0
344
+ }))])]),
345
+ trigger("inOutAnimationProgress", [transition(":enter", [style({
346
+ opacity: 0,
347
+ height: 0
348
+ }), animate("0.2s ease-out", style({
349
+ opacity: 1,
350
+ height: "196px"
351
+ }))]), transition(":leave", [style({
352
+ opacity: 1,
353
+ height: "196px"
354
+ }), animate("0.2s ease-in", style({
355
+ opacity: 0,
356
+ height: 0
357
+ }))])]),
358
+ trigger("inOutAnimationChange", [transition(":enter", [style({
359
+ opacity: 0,
360
+ height: 0
361
+ }), animate("0.2s ease-out", style({
362
+ opacity: 1,
363
+ height: "196px"
364
+ }))]), transition(":leave", [style({
365
+ opacity: 1,
366
+ height: "196px"
367
+ }), animate("0.2s ease-in", style({
368
+ opacity: 0,
369
+ height: 0
370
+ }))])])
371
+ ],
372
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
373
+ encapsulation: i0.ViewEncapsulation.None
374
+ });
375
+ }
376
+ };
377
+ i0.ɵɵngDeclareClassMetadata({
378
+ minVersion: "12.0.0",
379
+ version: "22.2.4",
380
+ ngImport: i0,
381
+ type: FileUploadComponent,
382
+ decorators: [{
383
+ type: Component,
384
+ args: [{
385
+ selector: "ui-file-upload",
386
+ encapsulation: ViewEncapsulation.None,
387
+ providers: [{
388
+ provide: NG_VALUE_ACCESSOR,
389
+ useExisting: forwardRef(() => FileUploadComponent),
390
+ multi: true
391
+ }],
392
+ changeDetection: ChangeDetectionStrategy.OnPush,
393
+ animations: [
394
+ trigger("inOutAnimation", [transition(":enter", [style({
395
+ opacity: 0,
396
+ height: 0
397
+ }), animate("0.2s ease-out", style({
398
+ opacity: 1,
399
+ height: "196px"
400
+ }))]), transition(":leave", [style({
401
+ opacity: 1,
402
+ height: "196px"
403
+ }), animate("0.2s ease-in", style({
404
+ opacity: 0,
405
+ height: 0
406
+ }))])]),
407
+ trigger("inOutAnimationProgress", [transition(":enter", [style({
408
+ opacity: 0,
409
+ height: 0
410
+ }), animate("0.2s ease-out", style({
411
+ opacity: 1,
412
+ height: "196px"
413
+ }))]), transition(":leave", [style({
414
+ opacity: 1,
415
+ height: "196px"
416
+ }), animate("0.2s ease-in", style({
417
+ opacity: 0,
418
+ height: 0
419
+ }))])]),
420
+ trigger("inOutAnimationChange", [transition(":enter", [style({
421
+ opacity: 0,
422
+ height: 0
423
+ }), animate("0.2s ease-out", style({
424
+ opacity: 1,
425
+ height: "196px"
426
+ }))]), transition(":leave", [style({
427
+ opacity: 1,
428
+ height: "196px"
429
+ }), animate("0.2s ease-in", style({
430
+ opacity: 0,
431
+ height: 0
432
+ }))])])
433
+ ],
434
+ imports: [
435
+ DragDropDirective,
436
+ NgClass,
437
+ NgTemplateOutlet,
438
+ IconComponent,
439
+ ProgressBarComponent,
440
+ AsyncPipe,
441
+ LowerCasePipe,
442
+ UiTranslatePipe
443
+ ],
444
+ template: "<ng-container>\n <div\n class=\"upload-file-container\"\n uiDragDrop\n [attr.aria-label]=\"ariaLabel\"\n [attr.aria-required]=\"ariaRequired\"\n [attr.theme]=\"applicationTheme\"\n [ngClass]=\"{ 'upload-errors': !!errors || isMissedMinSize, 'upload-file-container-disabled': disabled }\"\n (fileDropped)=\"onFileDropped($event)\"\n tabindex=\"0\"\n [tabIndex]=\"0\"\n (keydown)=\"onKeydown($event)\"\n (click)=\"fileDrop?.nativeElement?.click()\"\n >\n @if (browse && !(success && !!file && progress)) {\n <div [@inOutAnimation] class=\"upload-files\">\n <div class=\"upload-browse\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n @if (!!errors || isMissedMinSize) {\n <div class=\"errors\" role=\"alert\">\n @if (!!errors) {\n @for (error of errors; track error) {\n <span><ui-icon name=\"Error\" class=\"error-icon\"></ui-icon> {{ error }}</span>\n }\n }\n @if (isMissedMinSize) {\n <span>\n <ui-icon name=\"Error\" class=\"error-icon\"></ui-icon>\n {{ translationContext + 'MIN_SIZE_ERROR' | uiTranslate: { min: minFileSizeMB } | async }}\n </span>\n }\n </div>\n }\n <input\n [attr.data-testid]=\"testId ?? 'file-upload-input'\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"'upload-supported-files'\"\n [tabIndex]=\"-1\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"file\"\n [accept]=\"supportedFileTypes\"\n [disabled]=\"disabled\"\n (change)=\"onChangeUpload($event)\"\n />\n @if (applicationTheme === 'classic') {\n <p>\n {{ translationContext + 'DRAG_AND_DROP_OR' | uiTranslate | async }}\n <span class=\"semibold\"> {{ translationContext + 'BROWSE' | uiTranslate | async | lowercase }}</span>\n {{ translationContext + 'YOUR_FILES' | uiTranslate | async }}\n </p>\n } @else {\n <p id=\"drag-and-drop\">{{ translationContext + 'DRAG_AND_DROP' | uiTranslate | async }}</p>\n }\n <span class=\"upload-text\"\n >{{ maxFileSizeMB }}{{ translationContext + 'MAX_SIZE' | uiTranslate | async }}</span\n >\n @if (minFileSizeMB) {\n <span class=\"upload-text\"\n >{{ minFileSizeMB }}{{ translationContext + 'MIN_SIZE' | uiTranslate | async }}</span\n >\n }\n </div>\n </div>\n }\n @if (success) {\n <div class=\"upload-success\">\n <ng-container [ngTemplateOutlet]=\"iconTpl\"></ng-container>\n <span class=\"upload-success-text\"\n ><ui-icon name=\"Check-round-in-line\" [color]=\"colorUploadSuccess\"></ui-icon\n >{{ translationContext + 'FILE_UPLOADING_SUCCESS' | uiTranslate | async }}</span\n >\n <input\n [attr.data-testid]=\"successInputTestId\"\n [tabIndex]=\"-1\"\n [attr.aria-labelledby]=\"success || progress ? '' : 'drag-and-drop'\"\n [attr.aria-describedby]=\"success || progress ? '' : 'supported-file-types'\"\n class=\"form-control\"\n #fileDrop\n type=\"file\"\n id=\"fileTest\"\n [accept]=\"supportedFileTypes\"\n (change)=\"onChangeUpload($event)\"\n [disabled]=\"disabled\"\n />\n <span class=\"upload-text\">{{ file?.name }}</span>\n @if (showFileSize) {\n <span class=\"upload-text\">{{\n translationContext + 'FILE_SIZE' | uiTranslate: { fileSize: fileSizeInMB } | async\n }}</span>\n }\n </div>\n }\n @if (!!progress && !!file && !success) {\n <div class=\"upload-progress\" [@inOutAnimationProgress]>\n <p>{{ file.name }}</p>\n <ui-progress-bar\n [progress]=\"uploadProgress\"\n [companyColor]=\"compColor\"\n [applicationTheme]=\"applicationTheme\"\n ></ui-progress-bar>\n <p class=\"upload-text\">\n {{ fileProcessingMessage ?? (translationContext + 'UPLOADING' | uiTranslate | async) }}\n @if (showUploadProgress) {\n <span>{{ uploadProgress }}</span\n >%\n }\n </p>\n </div>\n }\n\n <ng-template #iconTpl>\n @if (applicationTheme === 'classic') {\n <ui-icon class=\"upload-icon\" name=\"File-upload\"></ui-icon>\n } @else {\n <ui-icon class=\"upload-icon\" name=\"Upload\" [size]=\"'24'\" [applicationTheme]=\"applicationTheme\"></ui-icon>\n }\n </ng-template>\n\n @if (!!supportedFileTypes) {\n <div [attr.theme]=\"applicationTheme\" class=\"upload-supported-files\" id=\"upload-supported-files\">\n <span>{{ translationContext + 'SUPPORTED_FILE_TYPES' | uiTranslate | async }}</span\n >{{ supportedFileTypes }}\n </div>\n }\n </div>\n</ng-container>\n",
445
+ 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}.upload-file-container{border-radius:8px;border:1px dashed #888888;background:#fff;display:flex;justify-content:center;align-items:center;height:196px;flex-flow:column;position:relative;max-width:563px;cursor:pointer}.upload-file-container:focus-visible{outline-offset:2px;outline:2px solid #242424;animation:focus-ring-animation .4s forwards}@keyframes focus-ring-animation{0%{outline-width:4px}to{outline-width:2px}}.upload-file-container.upload-errors{border:1px dashed #cb7b7a}.upload-file-container .upload-files{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;height:196px}.upload-file-container .upload-success,.upload-file-container .upload-browse{display:flex;flex-flow:column;align-items:center;justify-content:center;width:100%;position:relative;height:196px}.upload-file-container .upload-success ui-icon.upload-icon,.upload-file-container .upload-browse ui-icon.upload-icon{margin-bottom:16px}.upload-file-container .upload-success ui-icon.upload-icon mat-icon.size-16 svg,.upload-file-container .upload-browse ui-icon.upload-icon mat-icon.size-16 svg{width:32px;height:32px}.upload-file-container .upload-success input,.upload-file-container .upload-browse input{visibility:hidden;position:absolute;z-index:2;width:100%;height:100%;cursor:pointer}.upload-file-container .upload-success .upload-text,.upload-file-container .upload-browse .upload-text{margin-top:16px}.upload-file-container .upload-success .upload-success-text,.upload-file-container .upload-browse .upload-success-text{color:#3c9a13;display:flex;align-items:center;gap:8px}.upload-file-container .upload-success p,.upload-file-container .upload-browse p{margin:0}.upload-file-container .upload-success p .semibold,.upload-file-container .upload-browse p .semibold{font-weight:400;text-decoration:underline;color:var(--color)}.upload-file-container .upload-success .errors,.upload-file-container .upload-browse .errors{width:100%;display:flex;align-items:center;justify-content:center;flex-direction:column;margin-bottom:16px;font-size:12px;line-height:16px;color:#cb7b7a}.upload-file-container .upload-success .errors span,.upload-file-container .upload-browse .errors span{display:flex;align-items:center;margin-bottom:5px}.upload-file-container .upload-success .errors span:last-child,.upload-file-container .upload-browse .errors span:last-child{margin-bottom:0}.upload-file-container .upload-success .errors .error-icon,.upload-file-container .upload-browse .errors .error-icon{margin-right:4px}.upload-file-container .upload-success .errors .error-icon svg,.upload-file-container .upload-browse .errors .error-icon svg{color:#cb7b7a}.upload-file-container .upload-success .errors .error-icon mat-icon.size-16 svg,.upload-file-container .upload-browse .errors .error-icon mat-icon.size-16 svg{width:16px;height:16px}.upload-file-container .upload-progress{padding:0 32px;width:100%}.upload-file-container .upload-text{text-align:right}.upload-file-container[theme=dark],.upload-file-container[theme=light]{border-radius:10px;border-color:#242424}.upload-file-container[theme=dark].upload-file-container-disabled,.upload-file-container[theme=light].upload-file-container-disabled{border-color:#919191;color:#919191;background-color:#f4f4f4}.upload-file-container[theme=dark].upload-file-container-disabled .upload-icon svg,.upload-file-container[theme=light].upload-file-container-disabled .upload-icon svg{color:#919191}.upload-file-container[theme=dark].upload-errors,.upload-file-container[theme=light].upload-errors{border-color:#e02800}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):hover,.upload-file-container[theme=light]:not(.upload-file-container-disabled):hover{background:#f4f4f4;border-style:solid}.upload-file-container[theme=dark]:not(.upload-file-container-disabled):active,.upload-file-container[theme=light]:not(.upload-file-container-disabled):active{background:#f4f4f4;transform:scale(.98)}.upload-file-container[theme=dark] .errors,.upload-file-container[theme=light] .errors{color:#e02800;font-size:14px}.upload-file-container[theme=dark] .errors .error-icon svg,.upload-file-container[theme=light] .errors .error-icon svg{color:#e02800}.upload-supported-files{left:0;position:absolute;top:100%;font-size:12px;line-height:16px;margin-top:8px;width:100%}.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:563px}.upload-supported-files span{font-weight:700;margin-right:5px}@media(max-width:600px){.upload-file-container,.upload-supported-files[theme=dark],.upload-supported-files[theme=light]{max-width:100%}}.transparent{opacity:0}\n"]
446
+ }]
447
+ }],
448
+ ctorParameters: () => [{
449
+ type: void 0,
450
+ decorators: [{ type: Optional }, {
451
+ type: Inject,
452
+ args: ["CANOPYUI_DEFAULT_APPLICATION_THEME"]
453
+ }]
454
+ }],
455
+ propDecorators: {
456
+ class: [{ type: HostBinding }],
457
+ maxFileSizeMB: [{ type: Input }],
458
+ minFileSizeMB: [{ type: Input }],
459
+ supportedFileTypes: [{ type: Input }],
460
+ uploadProgress: [{ type: Input }],
461
+ showUploadProgress: [{ type: Input }],
462
+ fileProcessingMessage: [{ type: Input }],
463
+ errors: [{ type: Input }],
464
+ disabled: [{ type: Input }],
465
+ testId: [{ type: Input }],
466
+ file: [{ type: Input }],
467
+ companyColor: [{ type: Input }],
468
+ compColor: [{
469
+ type: HostBinding,
470
+ args: ["style.--color"]
471
+ }],
472
+ applicationTheme: [{ type: Input }],
473
+ ariaLabel: [{ type: Input }],
474
+ ariaRequired: [{ type: Input }],
475
+ showFileSize: [{ type: Input }],
476
+ OnDrop: [{ type: Output }],
477
+ fileDrop: [{
478
+ type: ViewChild,
479
+ args: ["fileDrop"]
480
+ }]
481
+ }
482
+ });
483
+ var FileUploadComponentModule = class FileUploadComponentModule {
484
+ static {
485
+ this.ɵfac = i0.ɵɵngDeclareFactory({
486
+ minVersion: "12.0.0",
487
+ version: "22.2.4",
488
+ ngImport: i0,
489
+ type: FileUploadComponentModule,
490
+ deps: [],
491
+ target: i0.ɵɵFactoryTarget.NgModule
492
+ });
493
+ }
494
+ static {
495
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
496
+ minVersion: "14.0.0",
497
+ version: "22.2.4",
498
+ ngImport: i0,
499
+ type: FileUploadComponentModule,
500
+ imports: [
501
+ CommonModule,
502
+ MatFormFieldModule,
503
+ MatInputModule,
504
+ IconComponentModule,
505
+ ProgressBarComponentModule,
506
+ UiTranslatePipe,
507
+ FileUploadComponent,
508
+ DragDropDirective
509
+ ],
510
+ exports: [FileUploadComponent]
511
+ });
512
+ }
513
+ static {
514
+ this.ɵinj = i0.ɵɵngDeclareInjector({
515
+ minVersion: "12.0.0",
516
+ version: "22.2.4",
517
+ ngImport: i0,
518
+ type: FileUploadComponentModule,
519
+ imports: [
520
+ CommonModule,
521
+ MatFormFieldModule,
522
+ MatInputModule,
523
+ IconComponentModule,
524
+ ProgressBarComponentModule,
525
+ FileUploadComponent
526
+ ]
527
+ });
528
+ }
529
+ };
530
+ i0.ɵɵngDeclareClassMetadata({
531
+ minVersion: "12.0.0",
532
+ version: "22.2.4",
533
+ ngImport: i0,
534
+ type: FileUploadComponentModule,
535
+ decorators: [{
536
+ type: NgModule,
537
+ args: [{
538
+ imports: [
539
+ CommonModule,
540
+ MatFormFieldModule,
541
+ MatInputModule,
542
+ IconComponentModule,
543
+ ProgressBarComponentModule,
544
+ UiTranslatePipe,
545
+ FileUploadComponent,
546
+ DragDropDirective
547
+ ],
548
+ exports: [FileUploadComponent]
549
+ }]
550
+ }]
551
+ });
419
552
  export { FileUploadComponent, FileUploadComponentModule };
420
- //# sourceMappingURL=testgorilla-tgo-ui-components-file-upload.mjs.map
553
+
554
+ //# sourceMappingURL=testgorilla-tgo-ui-components-file-upload.mjs.map