@bravura/ui 3.8.1 → 5.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 (276) hide show
  1. package/CHANGELOG.md +585 -565
  2. package/LICENSE +6 -6
  3. package/README.md +3 -1
  4. package/alert/alert-container.component.d.ts +1 -1
  5. package/alert/alert-message.component.d.ts +1 -1
  6. package/behavior/await.directive.d.ts +1 -1
  7. package/behavior/observe-content-class.directive.d.ts +1 -1
  8. package/behavior/sizing.directive.d.ts +1 -1
  9. package/clip-note/clip-note.directive.d.ts +1 -1
  10. package/currency-input/currency-input.directive.d.ts +1 -1
  11. package/decimal-input/decimal-input.directive.d.ts +1 -1
  12. package/discrete-input/discrete-input.component.d.ts +1 -1
  13. package/esm2022/alert/alert-container.component.mjs +207 -0
  14. package/esm2022/alert/alert-message.component.mjs +101 -0
  15. package/esm2022/alert/alert.module.mjs +22 -0
  16. package/{esm2020 → esm2022}/alert/public-api.mjs +1 -1
  17. package/esm2022/alert/testing/test-api.mjs +44 -0
  18. package/esm2022/behavior/await.directive.mjs +133 -0
  19. package/esm2022/behavior/behavior.module.mjs +37 -0
  20. package/esm2022/behavior/observe-content-class.directive.mjs +63 -0
  21. package/{esm2020 → esm2022}/behavior/public-api.mjs +1 -1
  22. package/esm2022/behavior/sizing-monitor.directive.mjs +31 -0
  23. package/esm2022/behavior/sizing.directive.mjs +256 -0
  24. package/esm2022/clip-note/clip-note.component.mjs +216 -0
  25. package/esm2022/clip-note/clip-note.directive.mjs +141 -0
  26. package/esm2022/clip-note/clip-note.module.mjs +32 -0
  27. package/{esm2020 → esm2022}/clip-note/public-api.mjs +1 -1
  28. package/{esm2020 → esm2022}/common/common-utils.mjs +1 -1
  29. package/esm2022/common/common.module.mjs +53 -0
  30. package/{esm2020 → esm2022}/common/public-api.mjs +1 -1
  31. package/esm2022/currency-input/currency-input.directive.mjs +276 -0
  32. package/esm2022/currency-input/currency-input.module.mjs +19 -0
  33. package/{esm2020 → esm2022}/currency-input/public-api.mjs +1 -1
  34. package/esm2022/decimal-input/decimal-input.directive.mjs +122 -0
  35. package/{esm2020 → esm2022}/decimal-input/decimal-input.module.mjs +5 -5
  36. package/esm2022/discrete-input/discrete-input.component.mjs +337 -0
  37. package/esm2022/discrete-input/discrete-input.module.mjs +21 -0
  38. package/{esm2020 → esm2022}/discrete-input/public-api.mjs +1 -1
  39. package/esm2022/file-upload/file-upload.component.mjs +400 -0
  40. package/esm2022/file-upload/file-upload.module.mjs +44 -0
  41. package/esm2022/file-upload/file-upload.service.mjs +29 -0
  42. package/{esm2020 → esm2022}/file-upload/public-api.mjs +1 -1
  43. package/esm2022/form-field/form-field.component.mjs +82 -0
  44. package/esm2022/form-field/form-field.module.mjs +33 -0
  45. package/{esm2020 → esm2022}/form-field/public-api.mjs +1 -1
  46. package/esm2022/icon-font/icon-font.module.mjs +22 -0
  47. package/esm2022/icon-font/icon.directive.mjs +102 -0
  48. package/{esm2020 → esm2022}/icon-font/public-api.mjs +1 -1
  49. package/esm2022/icon-font/utilities.mjs +51 -0
  50. package/esm2022/panel/panel-section.component.mjs +41 -0
  51. package/esm2022/panel/panel.component.mjs +87 -0
  52. package/esm2022/panel/panel.module.mjs +23 -0
  53. package/{esm2020 → esm2022}/panel/public-api.mjs +1 -1
  54. package/esm2022/panel/tinted.directive.mjs +60 -0
  55. package/esm2022/phone-number/phone-number.directive.mjs +188 -0
  56. package/{esm2020 → esm2022}/phone-number/phone-number.module.mjs +5 -5
  57. package/esm2022/phone-number/phone-number.pipe.mjs +47 -0
  58. package/esm2022/phone-number/phone-number.validator.mjs +64 -0
  59. package/{esm2020 → esm2022}/phone-number/public-api.mjs +1 -1
  60. package/{esm2020 → esm2022}/public-api.mjs +1 -1
  61. package/esm2022/radio-panel/radio-panel-item.component.mjs +93 -0
  62. package/esm2022/radio-panel/radio-panel.component.mjs +81 -0
  63. package/{esm2020 → esm2022}/radio-panel/radio-panel.module.mjs +5 -5
  64. package/esm2022/radio-panel/testing/test-api.mjs +46 -0
  65. package/{esm2020 → esm2022}/selection-panel/public-api.mjs +1 -1
  66. package/esm2022/selection-panel/selection-panel-item.component.mjs +166 -0
  67. package/esm2022/selection-panel/selection-panel.directive.mjs +119 -0
  68. package/esm2022/selection-panel/selection-panel.module.mjs +23 -0
  69. package/{esm2020 → esm2022}/skeletons/public-api.mjs +1 -1
  70. package/esm2022/skeletons/skeleton-loader-presets.directive.mjs +83 -0
  71. package/esm2022/skeletons/skeleton-loader.component.mjs +76 -0
  72. package/esm2022/skeletons/skeletons.module.mjs +35 -0
  73. package/{esm2020 → esm2022}/stepper/public-api.mjs +1 -1
  74. package/{esm2020 → esm2022}/stepper/stepper-animation.mjs +1 -1
  75. package/esm2022/stepper/stepper.component.mjs +176 -0
  76. package/esm2022/stepper/stepper.module.mjs +52 -0
  77. package/{esm2020 → esm2022}/tooltip/public-api.mjs +1 -1
  78. package/esm2022/tooltip/tooltip.component.mjs +63 -0
  79. package/esm2022/tooltip/tooltip.directive.mjs +148 -0
  80. package/esm2022/tooltip/tooltip.module.mjs +25 -0
  81. package/{fesm2020 → fesm2022}/bravura-ui-alert-testing.mjs +2 -2
  82. package/fesm2022/bravura-ui-alert-testing.mjs.map +1 -0
  83. package/fesm2022/bravura-ui-alert.mjs +327 -0
  84. package/fesm2022/bravura-ui-alert.mjs.map +1 -0
  85. package/{fesm2020 → fesm2022}/bravura-ui-behavior.mjs +45 -45
  86. package/fesm2022/bravura-ui-behavior.mjs.map +1 -0
  87. package/{fesm2020 → fesm2022}/bravura-ui-clip-note.mjs +70 -70
  88. package/fesm2022/bravura-ui-clip-note.mjs.map +1 -0
  89. package/{fesm2020 → fesm2022}/bravura-ui-common.mjs +6 -6
  90. package/fesm2022/bravura-ui-common.mjs.map +1 -0
  91. package/{fesm2020 → fesm2022}/bravura-ui-currency-input.mjs +11 -11
  92. package/fesm2022/bravura-ui-currency-input.mjs.map +1 -0
  93. package/{fesm2020 → fesm2022}/bravura-ui-decimal-input.mjs +12 -12
  94. package/fesm2022/bravura-ui-decimal-input.mjs.map +1 -0
  95. package/{fesm2020 → fesm2022}/bravura-ui-discrete-input.mjs +48 -48
  96. package/fesm2022/bravura-ui-discrete-input.mjs.map +1 -0
  97. package/fesm2022/bravura-ui-file-upload.mjs +474 -0
  98. package/fesm2022/bravura-ui-file-upload.mjs.map +1 -0
  99. package/{fesm2020 → fesm2022}/bravura-ui-form-field.mjs +19 -19
  100. package/fesm2022/bravura-ui-form-field.mjs.map +1 -0
  101. package/{fesm2020 → fesm2022}/bravura-ui-icon-font.mjs +8 -8
  102. package/fesm2022/bravura-ui-icon-font.mjs.map +1 -0
  103. package/fesm2022/bravura-ui-panel.mjs +206 -0
  104. package/fesm2022/bravura-ui-panel.mjs.map +1 -0
  105. package/{fesm2020 → fesm2022}/bravura-ui-phone-number.mjs +30 -30
  106. package/fesm2022/bravura-ui-phone-number.mjs.map +1 -0
  107. package/{fesm2020 → fesm2022}/bravura-ui-radio-panel-testing.mjs +5 -6
  108. package/fesm2022/bravura-ui-radio-panel-testing.mjs.map +1 -0
  109. package/{fesm2020 → fesm2022}/bravura-ui-radio-panel.mjs +32 -32
  110. package/fesm2022/bravura-ui-radio-panel.mjs.map +1 -0
  111. package/fesm2022/bravura-ui-selection-panel.mjs +306 -0
  112. package/fesm2022/bravura-ui-selection-panel.mjs.map +1 -0
  113. package/{fesm2020 → fesm2022}/bravura-ui-skeletons.mjs +43 -43
  114. package/fesm2022/bravura-ui-skeletons.mjs.map +1 -0
  115. package/fesm2022/bravura-ui-stepper.mjs +251 -0
  116. package/fesm2022/bravura-ui-stepper.mjs.map +1 -0
  117. package/{fesm2020 → fesm2022}/bravura-ui-tooltip.mjs +32 -24
  118. package/fesm2022/bravura-ui-tooltip.mjs.map +1 -0
  119. package/fesm2022/bravura-ui.mjs.map +1 -0
  120. package/file-upload/file-upload.component.d.ts +1 -1
  121. package/form-field/form-field.component.d.ts +1 -1
  122. package/icon-font/icon.directive.d.ts +1 -1
  123. package/package.json +88 -132
  124. package/panel/panel.component.d.ts +1 -1
  125. package/panel/tinted.directive.d.ts +1 -1
  126. package/phone-number/phone-number.directive.d.ts +1 -1
  127. package/phone-number/phone-number.validator.d.ts +2 -2
  128. package/radio-panel/radio-panel-item.component.d.ts +1 -1
  129. package/radio-panel/radio-panel.component.d.ts +1 -1
  130. package/radio-panel/testing/test-api.d.ts +2 -3
  131. package/selection-panel/selection-panel-item.component.d.ts +1 -1
  132. package/selection-panel/selection-panel.directive.d.ts +1 -1
  133. package/skeletons/skeleton-loader-presets.directive.d.ts +3 -3
  134. package/stepper/stepper.component.d.ts +1 -1
  135. package/theme/_bui-card.scss +56 -56
  136. package/theme/_ui-theme.scss +3 -3
  137. package/theme/global-style-by-bootstrap.scss +3 -3
  138. package/theme/global-style-by-tailwind.scss +3 -3
  139. package/theme/scrollbar.scss +40 -40
  140. package/tooltip/tooltip.component.d.ts +2 -0
  141. package/tooltip/tooltip.directive.d.ts +3 -5
  142. package/esm2020/alert/alert-container.component.mjs +0 -207
  143. package/esm2020/alert/alert-message.component.mjs +0 -102
  144. package/esm2020/alert/alert.module.mjs +0 -22
  145. package/esm2020/alert/testing/test-api.mjs +0 -44
  146. package/esm2020/behavior/await.directive.mjs +0 -133
  147. package/esm2020/behavior/behavior.module.mjs +0 -37
  148. package/esm2020/behavior/observe-content-class.directive.mjs +0 -63
  149. package/esm2020/behavior/sizing-monitor.directive.mjs +0 -31
  150. package/esm2020/behavior/sizing.directive.mjs +0 -256
  151. package/esm2020/clip-note/clip-note.component.mjs +0 -216
  152. package/esm2020/clip-note/clip-note.directive.mjs +0 -141
  153. package/esm2020/clip-note/clip-note.module.mjs +0 -32
  154. package/esm2020/common/common.module.mjs +0 -53
  155. package/esm2020/currency-input/currency-input.directive.mjs +0 -276
  156. package/esm2020/currency-input/currency-input.module.mjs +0 -19
  157. package/esm2020/decimal-input/decimal-input.directive.mjs +0 -122
  158. package/esm2020/discrete-input/discrete-input.component.mjs +0 -337
  159. package/esm2020/discrete-input/discrete-input.module.mjs +0 -21
  160. package/esm2020/file-upload/file-upload.component.mjs +0 -400
  161. package/esm2020/file-upload/file-upload.module.mjs +0 -44
  162. package/esm2020/file-upload/file-upload.service.mjs +0 -29
  163. package/esm2020/form-field/form-field.component.mjs +0 -82
  164. package/esm2020/form-field/form-field.module.mjs +0 -33
  165. package/esm2020/icon-font/icon-font.module.mjs +0 -22
  166. package/esm2020/icon-font/icon.directive.mjs +0 -102
  167. package/esm2020/icon-font/utilities.mjs +0 -51
  168. package/esm2020/panel/panel-section.component.mjs +0 -41
  169. package/esm2020/panel/panel.component.mjs +0 -87
  170. package/esm2020/panel/panel.module.mjs +0 -23
  171. package/esm2020/panel/tinted.directive.mjs +0 -60
  172. package/esm2020/phone-number/phone-number.directive.mjs +0 -188
  173. package/esm2020/phone-number/phone-number.pipe.mjs +0 -47
  174. package/esm2020/phone-number/phone-number.validator.mjs +0 -64
  175. package/esm2020/radio-panel/radio-panel-item.component.mjs +0 -93
  176. package/esm2020/radio-panel/radio-panel.component.mjs +0 -81
  177. package/esm2020/radio-panel/testing/test-api.mjs +0 -47
  178. package/esm2020/selection-panel/selection-panel-item.component.mjs +0 -166
  179. package/esm2020/selection-panel/selection-panel.directive.mjs +0 -119
  180. package/esm2020/selection-panel/selection-panel.module.mjs +0 -23
  181. package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +0 -83
  182. package/esm2020/skeletons/skeleton-loader.component.mjs +0 -76
  183. package/esm2020/skeletons/skeletons.module.mjs +0 -35
  184. package/esm2020/stepper/stepper.component.mjs +0 -176
  185. package/esm2020/stepper/stepper.module.mjs +0 -52
  186. package/esm2020/tooltip/tooltip.component.mjs +0 -54
  187. package/esm2020/tooltip/tooltip.directive.mjs +0 -149
  188. package/esm2020/tooltip/tooltip.module.mjs +0 -25
  189. package/fesm2015/bravura-ui-alert-testing.mjs +0 -64
  190. package/fesm2015/bravura-ui-alert-testing.mjs.map +0 -1
  191. package/fesm2015/bravura-ui-alert.mjs +0 -340
  192. package/fesm2015/bravura-ui-alert.mjs.map +0 -1
  193. package/fesm2015/bravura-ui-behavior.mjs +0 -515
  194. package/fesm2015/bravura-ui-behavior.mjs.map +0 -1
  195. package/fesm2015/bravura-ui-clip-note.mjs +0 -393
  196. package/fesm2015/bravura-ui-clip-note.mjs.map +0 -1
  197. package/fesm2015/bravura-ui-common.mjs +0 -96
  198. package/fesm2015/bravura-ui-common.mjs.map +0 -1
  199. package/fesm2015/bravura-ui-currency-input.mjs +0 -300
  200. package/fesm2015/bravura-ui-currency-input.mjs.map +0 -1
  201. package/fesm2015/bravura-ui-decimal-input.mjs +0 -145
  202. package/fesm2015/bravura-ui-decimal-input.mjs.map +0 -1
  203. package/fesm2015/bravura-ui-discrete-input.mjs +0 -365
  204. package/fesm2015/bravura-ui-discrete-input.mjs.map +0 -1
  205. package/fesm2015/bravura-ui-file-upload.mjs +0 -478
  206. package/fesm2015/bravura-ui-file-upload.mjs.map +0 -1
  207. package/fesm2015/bravura-ui-form-field.mjs +0 -120
  208. package/fesm2015/bravura-ui-form-field.mjs.map +0 -1
  209. package/fesm2015/bravura-ui-icon-font.mjs +0 -178
  210. package/fesm2015/bravura-ui-icon-font.mjs.map +0 -1
  211. package/fesm2015/bravura-ui-panel.mjs +0 -210
  212. package/fesm2015/bravura-ui-panel.mjs.map +0 -1
  213. package/fesm2015/bravura-ui-phone-number.mjs +0 -327
  214. package/fesm2015/bravura-ui-phone-number.mjs.map +0 -1
  215. package/fesm2015/bravura-ui-radio-panel-testing.mjs +0 -63
  216. package/fesm2015/bravura-ui-radio-panel-testing.mjs.map +0 -1
  217. package/fesm2015/bravura-ui-radio-panel.mjs +0 -200
  218. package/fesm2015/bravura-ui-radio-panel.mjs.map +0 -1
  219. package/fesm2015/bravura-ui-selection-panel.mjs +0 -311
  220. package/fesm2015/bravura-ui-selection-panel.mjs.map +0 -1
  221. package/fesm2015/bravura-ui-skeletons.mjs +0 -195
  222. package/fesm2015/bravura-ui-skeletons.mjs.map +0 -1
  223. package/fesm2015/bravura-ui-stepper.mjs +0 -253
  224. package/fesm2015/bravura-ui-stepper.mjs.map +0 -1
  225. package/fesm2015/bravura-ui-tooltip.mjs +0 -229
  226. package/fesm2015/bravura-ui-tooltip.mjs.map +0 -1
  227. package/fesm2015/bravura-ui.mjs.map +0 -1
  228. package/fesm2020/bravura-ui-alert-testing.mjs.map +0 -1
  229. package/fesm2020/bravura-ui-alert.mjs +0 -328
  230. package/fesm2020/bravura-ui-alert.mjs.map +0 -1
  231. package/fesm2020/bravura-ui-behavior.mjs.map +0 -1
  232. package/fesm2020/bravura-ui-clip-note.mjs.map +0 -1
  233. package/fesm2020/bravura-ui-common.mjs.map +0 -1
  234. package/fesm2020/bravura-ui-currency-input.mjs.map +0 -1
  235. package/fesm2020/bravura-ui-decimal-input.mjs.map +0 -1
  236. package/fesm2020/bravura-ui-discrete-input.mjs.map +0 -1
  237. package/fesm2020/bravura-ui-file-upload.mjs +0 -474
  238. package/fesm2020/bravura-ui-file-upload.mjs.map +0 -1
  239. package/fesm2020/bravura-ui-form-field.mjs.map +0 -1
  240. package/fesm2020/bravura-ui-icon-font.mjs.map +0 -1
  241. package/fesm2020/bravura-ui-panel.mjs +0 -206
  242. package/fesm2020/bravura-ui-panel.mjs.map +0 -1
  243. package/fesm2020/bravura-ui-phone-number.mjs.map +0 -1
  244. package/fesm2020/bravura-ui-radio-panel-testing.mjs.map +0 -1
  245. package/fesm2020/bravura-ui-radio-panel.mjs.map +0 -1
  246. package/fesm2020/bravura-ui-selection-panel.mjs +0 -306
  247. package/fesm2020/bravura-ui-selection-panel.mjs.map +0 -1
  248. package/fesm2020/bravura-ui-skeletons.mjs.map +0 -1
  249. package/fesm2020/bravura-ui-stepper.mjs +0 -251
  250. package/fesm2020/bravura-ui-stepper.mjs.map +0 -1
  251. package/fesm2020/bravura-ui-tooltip.mjs.map +0 -1
  252. package/fesm2020/bravura-ui.mjs +0 -8
  253. package/fesm2020/bravura-ui.mjs.map +0 -1
  254. /package/{esm2020 → esm2022}/alert/bravura-ui-alert.mjs +0 -0
  255. /package/{esm2020 → esm2022}/alert/testing/bravura-ui-alert-testing.mjs +0 -0
  256. /package/{esm2020 → esm2022}/behavior/bravura-ui-behavior.mjs +0 -0
  257. /package/{esm2020 → esm2022}/bravura-ui.mjs +0 -0
  258. /package/{esm2020 → esm2022}/clip-note/bravura-ui-clip-note.mjs +0 -0
  259. /package/{esm2020 → esm2022}/common/bravura-ui-common.mjs +0 -0
  260. /package/{esm2020 → esm2022}/currency-input/bravura-ui-currency-input.mjs +0 -0
  261. /package/{esm2020 → esm2022}/decimal-input/bravura-ui-decimal-input.mjs +0 -0
  262. /package/{esm2020 → esm2022}/decimal-input/public-api.mjs +0 -0
  263. /package/{esm2020 → esm2022}/discrete-input/bravura-ui-discrete-input.mjs +0 -0
  264. /package/{esm2020 → esm2022}/file-upload/bravura-ui-file-upload.mjs +0 -0
  265. /package/{esm2020 → esm2022}/form-field/bravura-ui-form-field.mjs +0 -0
  266. /package/{esm2020 → esm2022}/icon-font/bravura-ui-icon-font.mjs +0 -0
  267. /package/{esm2020 → esm2022}/panel/bravura-ui-panel.mjs +0 -0
  268. /package/{esm2020 → esm2022}/phone-number/bravura-ui-phone-number.mjs +0 -0
  269. /package/{esm2020 → esm2022}/radio-panel/bravura-ui-radio-panel.mjs +0 -0
  270. /package/{esm2020 → esm2022}/radio-panel/public-api.mjs +0 -0
  271. /package/{esm2020 → esm2022}/radio-panel/testing/bravura-ui-radio-panel-testing.mjs +0 -0
  272. /package/{esm2020 → esm2022}/selection-panel/bravura-ui-selection-panel.mjs +0 -0
  273. /package/{esm2020 → esm2022}/skeletons/bravura-ui-skeletons.mjs +0 -0
  274. /package/{esm2020 → esm2022}/stepper/bravura-ui-stepper.mjs +0 -0
  275. /package/{esm2020 → esm2022}/tooltip/bravura-ui-tooltip.mjs +0 -0
  276. /package/{fesm2015 → fesm2022}/bravura-ui.mjs +0 -0
@@ -1,478 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Injectable, forwardRef, ElementRef, Component, Input, ViewChild, HostListener, NgModule } from '@angular/core';
3
- import * as i2 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import { trigger, transition, query, stagger, animate, style } from '@angular/animations';
6
- import { HttpEventType } from '@angular/common/http';
7
- import { NG_VALUE_ACCESSOR } from '@angular/forms';
8
- import { Observable, of, Subject } from 'rxjs';
9
- import * as i3 from '@angular/material/icon';
10
- import { MatIconModule } from '@angular/material/icon';
11
- import * as i4 from '@bravura/ui/icon-font';
12
- import { IconFontModule } from '@bravura/ui/icon-font';
13
- import * as i5 from '@angular/material/progress-bar';
14
- import { MatProgressBarModule } from '@angular/material/progress-bar';
15
- import * as i6 from '@angular/material/button';
16
- import { MatButtonModule } from '@angular/material/button';
17
- import * as i7 from '@angular/material/divider';
18
- import { MatDividerModule } from '@angular/material/divider';
19
- import * as i8 from '@angular/material/tooltip';
20
- import { MatTooltipModule } from '@angular/material/tooltip';
21
-
22
- /**
23
- * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.
24
- */
25
- class FileUploadItem {
26
- /** @internal */
27
- constructor(_id, _name, _size, _type) {
28
- this.id = _id;
29
- this.name = _name;
30
- this.size = _size;
31
- this.type = _type;
32
- }
33
- }
34
- /**
35
- * This is an API for processing file upload requests.
36
- *
37
- * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.
38
- *
39
- * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.
40
- */
41
- class FileUploadService {
42
- }
43
- FileUploadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
44
- FileUploadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadService });
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadService, decorators: [{
46
- type: Injectable
47
- }] });
48
-
49
- /** @ignore */
50
- class UploadingItem {
51
- constructor(event$, fileOrOncancel, oncomplete, oncancel) {
52
- this.oncancel = oncancel;
53
- this.progress = 0;
54
- if (event$ instanceof Observable) {
55
- this.file = fileOrOncancel;
56
- this.subscription = event$.subscribe({
57
- next: evt => {
58
- if (evt.type === HttpEventType.UploadProgress) {
59
- this.progress = evt.loaded / this.file.size;
60
- }
61
- else if (evt.type === HttpEventType.Response) {
62
- this.uploadedItem = evt.body;
63
- this.progress = 1;
64
- oncomplete();
65
- }
66
- }
67
- });
68
- }
69
- else {
70
- this.subscription = of(event$).subscribe();
71
- this.uploadedItem = event$;
72
- this.oncancel = fileOrOncancel;
73
- }
74
- }
75
- cancel() {
76
- this.subscription.unsubscribe();
77
- this.oncancel(this);
78
- }
79
- get done() {
80
- return !!this.uploadedItem;
81
- }
82
- get name() {
83
- var _a, _b;
84
- return ((_a = this.uploadedItem) === null || _a === void 0 ? void 0 : _a.name) || ((_b = this.file) === null || _b === void 0 ? void 0 : _b.name);
85
- }
86
- get downloading() {
87
- return this.downloadingSubs && !this.downloadingSubs.closed;
88
- }
89
- }
90
- /**
91
- * A control value accessor component to provide the user interface for uploading files.
92
- *
93
- * The application that integrates this UI must provide an implementation of `FileUploadService`.
94
- *
95
- * The control's value is a list of alpha-numerical strings, which are the identifiers to the uploaded files.
96
- *
97
- * Example:
98
- *
99
- * ```html
100
- * <form>
101
- * <bui-file-upload [(ngModel)]="uploadedFileIds" name="myFiles"></bui-file-upload>
102
- * </form>
103
- * ```
104
- *
105
- * @see FileUploadService
106
- */
107
- class FileUploadComponent {
108
- constructor(_service) {
109
- this._service = _service;
110
- /** @ignore */
111
- this._value = null;
112
- /**
113
- * The caption of the button for opening file selection dialog.
114
- */
115
- this.uploadActionText = 'Drag files here to attach or browse';
116
- /**
117
- * The label for listing successful uploaded files.
118
- */
119
- this.fileUploadedLabel = 'List of files uploaded successfully';
120
- /**
121
- * The text to be displayed when the user starts to drag file items over the browser window.
122
- */
123
- this.dragHint = 'Please drag the files here.';
124
- /**
125
- * The text to be displayed when the user is dragging the file items over the drop zone.
126
- */
127
- this.dropHint = 'Please release the mouse button to start uploading.';
128
- /** Specifies the total number of files accepted. A falsy value removes the limit.*/
129
- this.limit = 0;
130
- /**
131
- * specify the number of maximum bytes that can be uploaded.
132
- * if number is specified, bytes are assumed, otherwise enter a string for specific size type.
133
- */
134
- this.fileSize = '10MB';
135
- /** @ignore */
136
- this._fileSizeExceedMsg = '';
137
- /** @ignore */
138
- this._uploadingItems = [];
139
- /** @ignore */
140
- this._accept = '*/*';
141
- /** @ignore */
142
- this._itemAnimationStart = new Subject();
143
- /** @ignore */
144
- this._itemAnimationDone = new Subject();
145
- /** @ignore */
146
- this._itemAnimationInProgress = false;
147
- this._onChange = (_) => { };
148
- this._onTouch = () => { };
149
- this._overFrameCounter = 0;
150
- this._overCounter = 0;
151
- this._typeRegExps = [/.*\/.*/];
152
- this._types = ['*/*'];
153
- this._numberOfFilesDragged = 0;
154
- this._onChange([]);
155
- this._onTouch();
156
- this._frameDndEnter = this._onDndEnterFrame.bind(this);
157
- this._frameDndLeave = this._onDndLeaveFrame.bind(this);
158
- this._frameDndStop = this._onDndStopFrame.bind(this);
159
- this._frameDndOver = event => event.preventDefault();
160
- }
161
- /**
162
- * Accepted MIME types
163
- *
164
- * @example ['text/*', 'image/png']
165
- */
166
- get types() {
167
- return this._types;
168
- }
169
- set types(types) {
170
- if (Array.isArray(types) && (types === null || types === void 0 ? void 0 : types.length)) {
171
- this._typeRegExps = [];
172
- this._types = Array.from(types);
173
- this._accept = this._types.join(',');
174
- types.forEach(t => this._typeRegExps.push(new RegExp(t.replace(/\*/g, '.*'))));
175
- }
176
- }
177
- /** @internal */
178
- ngOnInit() {
179
- document.addEventListener('dragenter', this._frameDndEnter);
180
- document.addEventListener('dragleave', this._frameDndLeave);
181
- document.addEventListener('dragend', this._frameDndStop);
182
- document.addEventListener('drop', this._frameDndStop);
183
- document.addEventListener('dragover', this._frameDndOver);
184
- this._itemAnimationStart.subscribe(() => (this._itemAnimationInProgress = true));
185
- this._itemAnimationDone.subscribe(() => (this._itemAnimationInProgress = false));
186
- }
187
- ngOnDestroy() {
188
- document.removeEventListener('dragenter', this._frameDndEnter);
189
- document.removeEventListener('dragleave', this._frameDndLeave);
190
- document.removeEventListener('dragend', this._frameDndStop);
191
- document.removeEventListener('drop', this._frameDndStop);
192
- document.removeEventListener('dragover', this._frameDndOver);
193
- this._itemAnimationStart.complete();
194
- this._itemAnimationDone.complete();
195
- }
196
- /** @internal */
197
- writeValue(obj) {
198
- if (Array.isArray(obj)) {
199
- if (!this._value) {
200
- this._acceptChange(obj);
201
- return;
202
- }
203
- const common = obj.filter(v => this._value.includes(v));
204
- if (common.length === obj.length && common.length === this._value.length) {
205
- return; // no change
206
- }
207
- this._acceptChange(obj);
208
- }
209
- else {
210
- this._value = null;
211
- }
212
- }
213
- /** @internal */
214
- registerOnChange(fn) {
215
- this._onChange = fn;
216
- }
217
- /** @internal */
218
- registerOnTouched(fn) {
219
- this._onTouch = fn;
220
- }
221
- /** @internal */
222
- onDragEnter(event) {
223
- event.preventDefault();
224
- event.stopPropagation();
225
- this._overCounter++;
226
- }
227
- /** @internal */
228
- onDragOver(event) {
229
- event.preventDefault();
230
- }
231
- /** @internal */
232
- onDragLeave(event) {
233
- event.preventDefault();
234
- event.stopPropagation();
235
- this._overCounter--;
236
- }
237
- /** @internal */
238
- onDndDrop(event) {
239
- var _a;
240
- event.preventDefault();
241
- event.stopPropagation();
242
- this._onDndStopFrame();
243
- const files = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;
244
- if ((files === null || files === void 0 ? void 0 : files.length) && this._validateFileSize(files)) {
245
- this._uploadFiles(Array.from(files));
246
- }
247
- }
248
- /** Open the file selection dialog */
249
- selectFiles() {
250
- this._fileInput.nativeElement.click();
251
- }
252
- /** @ignore */
253
- _openItem(item) {
254
- item.downloadingSubs = this._service.get(item.uploadedItem.id).subscribe(blob => {
255
- const url = URL.createObjectURL(blob);
256
- window.open(url, '_blank');
257
- });
258
- }
259
- /** @ignore */
260
- get _overFrame() {
261
- return this._overFrameCounter > 0;
262
- }
263
- /** @ignore */
264
- get _overDropZone() {
265
- return this._overCounter > 0;
266
- }
267
- /** Whether file uploading is in progress */
268
- get uploading() {
269
- return this._uploadingItems.some(i => !i.done);
270
- }
271
- /** The remaining number of files allowed.*/
272
- get remaining() {
273
- return this.limit ? this.limit - this._uploadingItems.length : Infinity;
274
- }
275
- /** @ignore */
276
- _handleFileSelection() {
277
- const fileList = this._fileInput.nativeElement.files;
278
- if ((fileList === null || fileList === void 0 ? void 0 : fileList.length) && this._validateFileSize(fileList)) {
279
- this._uploadFiles(Array.from(fileList));
280
- this._fileInput.nativeElement.value = '';
281
- }
282
- }
283
- /** @ignore */
284
- get _invalidFilesDragged() {
285
- return this._numberOfFilesDragged > this.remaining && (this._overFrame || this._overDropZone);
286
- }
287
- /** @ignore */
288
- get _initialising() {
289
- return !!this._initSubs && !this._initSubs.closed;
290
- }
291
- returnFileSize(size) {
292
- if (size < 1024) {
293
- return `${size} bytes`;
294
- }
295
- else if (size >= 1024 && size < 1048576) {
296
- return `${(size / 1024).toFixed(1)} KB`;
297
- }
298
- else {
299
- return `${(size / 1048576).toFixed(1)} MB`;
300
- }
301
- }
302
- _validateFileSize(files) {
303
- this._fileSizeExceedMsg = '';
304
- const maxSize = this.returnFileSize(this._getMaxBytes());
305
- for (let i = 0; i < files.length; i++) {
306
- if (files[i].size > this._getMaxBytes()) {
307
- this._fileSizeExceedMsg = `Selected file/s has exceeded the allowable size of ${maxSize} per file`;
308
- return false;
309
- }
310
- }
311
- return true;
312
- }
313
- _getMaxBytes() {
314
- if (typeof this.fileSize === 'string') {
315
- if (this.fileSize.toUpperCase().endsWith('KB')) {
316
- const kiloBytes = this.fileSize.substring(0, this.fileSize.indexOf('KB'));
317
- return Number(kiloBytes) * 1024;
318
- }
319
- else if (this.fileSize.toUpperCase().endsWith('MB')) {
320
- const megaBytes = this.fileSize.substring(0, this.fileSize.indexOf('MB'));
321
- return Number(megaBytes) * 1048576;
322
- }
323
- }
324
- return this.fileSize;
325
- }
326
- _uploadFiles(files) {
327
- if (this._initialising || files.length > this.remaining) {
328
- return;
329
- }
330
- const filtered = files.filter(f => (!f.type || this._typeRegExps.some(regexp => f.type.match(regexp))) &&
331
- !this._uploadingItems.some(i => i.name === f.name));
332
- const observables = this._service.upload(filtered);
333
- const items = filtered.map((f, i) => new UploadingItem(observables[i], f, this._updateItems.bind(this), this._deleteItem.bind(this)));
334
- this._uploadingItems = [...this._uploadingItems, ...items];
335
- }
336
- _onDndEnterFrame(event) {
337
- var _a, _b;
338
- event.preventDefault();
339
- this._numberOfFilesDragged = ((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length) || 0;
340
- this._overFrameCounter++;
341
- }
342
- _onDndLeaveFrame() {
343
- this._overFrameCounter--;
344
- }
345
- _onDndStopFrame() {
346
- this._overFrameCounter = 0;
347
- this._overCounter = 0;
348
- }
349
- _acceptChange(v) {
350
- this._initSubs = this._service.list().subscribe(list => {
351
- this._uploadingItems = list
352
- .filter(i => v.includes(i.id))
353
- .map(f => new UploadingItem(f, this._deleteItem.bind(this)));
354
- });
355
- }
356
- _updateItems() {
357
- const completed = this._uploadingItems.filter(i => !!i.uploadedItem);
358
- this._uploadingItems = [...completed, ...this._uploadingItems.filter(i => !i.uploadedItem)];
359
- this._updateValue(completed);
360
- }
361
- _deleteItem(item) {
362
- var _a;
363
- const key = (_a = item.uploadedItem) === null || _a === void 0 ? void 0 : _a.id;
364
- if (key) {
365
- this._service.delete(key).subscribe(() => {
366
- this._uploadingItems = this._uploadingItems.filter(i => i !== item);
367
- const completed = this._uploadingItems.filter(i => !!i.uploadedItem);
368
- this._updateValue(completed);
369
- });
370
- }
371
- else {
372
- this._uploadingItems = this._uploadingItems.filter(i => i !== item);
373
- const completed = this._uploadingItems.filter(i => !!i.uploadedItem);
374
- this._updateValue(completed);
375
- }
376
- }
377
- _updateValue(completed) {
378
- const completedIds = completed.map(c => c.uploadedItem.id);
379
- this._value = completedIds;
380
- if (!this._value.length) {
381
- this._value = null;
382
- }
383
- this._onChange(completedIds);
384
- }
385
- }
386
- FileUploadComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0.ɵɵFactoryTarget.Component });
387
- FileUploadComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.6", type: FileUploadComponent, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", fileSize: "fileSize", types: "types" }, host: { listeners: { "dragenter": "onDragEnter($event)", "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDndDrop($event)" }, properties: { "class.bui-dnd-active": "_overFrame && remaining >= _numberOfFilesDragged", "class.bui-dnd-over": "_overDropZone && remaining >= _numberOfFilesDragged", "class.bui-dnd-invalid": "_invalidFilesDragged" }, classAttribute: "bui-host bui-file-upload" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: ElementRef, static: true }], ngImport: i0, template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mdc-linear-progress-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"], dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { kind: "component", type: i5.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { kind: "component", type: i6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }, { kind: "directive", type: i8.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "pipe", type: i2.PercentPipe, name: "percent" }], animations: [
388
- trigger('slideOut', [
389
- transition('* => *', [
390
- query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
391
- ])
392
- ])
393
- ] });
394
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadComponent, decorators: [{
395
- type: Component,
396
- args: [{ host: {
397
- class: 'bui-host bui-file-upload',
398
- '[class.bui-dnd-active]': '_overFrame && remaining >= _numberOfFilesDragged',
399
- '[class.bui-dnd-over]': '_overDropZone && remaining >= _numberOfFilesDragged',
400
- '[class.bui-dnd-invalid]': '_invalidFilesDragged'
401
- }, selector: 'bui-file-upload', providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }], animations: [
402
- trigger('slideOut', [
403
- transition('* => *', [
404
- query(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })
405
- ])
406
- ])
407
- ], template: "<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n", styles: [":host:not([hidden]){display:block;border-style:dashed;border-width:1px;border-color:var(--bui-color-muted);transition:all .12s;padding:3px}:host:not([hidden]).bui-dnd-active,:host:not([hidden]).bui-dnd-over{padding:0;border-width:4px}:host:not([hidden]) .bui-file-size-exceed{display:flex;align-items:center;margin-bottom:1rem}:host:not([hidden]) .bui-file-size-exceed mat-icon{margin-left:.2rem}:host:not([hidden]).bui-dnd-invalid{cursor:no-drop}:host:not([hidden]) .bui-file-upload-hint{margin:.5rem;height:40px;justify-content:center;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container{min-height:4rem;display:flex;align-items:center;flex-direction:column;justify-content:center;transition:initial}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link{cursor:pointer;transition:color .1s cubic-bezier(.55,0,.55,.2);display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link:hover{color:var(--bui-color-light)!important}:host:not([hidden]) .bui-file-upload-container .bui-upload-icon-link>*{margin:4px}:host:not([hidden]) .bui-file-upload-list{align-self:stretch;margin-top:calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-uploaded-label{display:block;font-size:smaller;margin:0 calc(1rem - 4px) .5rem calc(1rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item{display:flex;align-items:center;margin:0 calc(1rem - 4px);padding:.25rem 0;justify-content:space-between}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item:last-child{margin-bottom:calc(.5rem - 4px)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.in-progress .bui-file-upload-item-name{font-style:italic}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item.bui-file-upload-item-deleting{background-color:#8080801a;transition:background-color .1s cubic-bezier(.55,0,.55,.2)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name{flex-grow:1;font-size:80%;display:flex;align-items:center;flex-wrap:wrap}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span{word-break:break-all;display:flex;align-items:center}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name>span>mat-icon{width:20px;height:20px;font-size:20px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name a{color:var(--bui-color-primary)}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-name .text{margin-left:.5rem;margin-right:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress{flex-grow:1;min-width:50%;display:flex;justify-content:flex-start;align-items:center;margin:12px 0;--mdc-linear-progress-track-height: 8px}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-mdc-progress-bar{border-radius:1rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress>span{margin-inline-start:.5rem}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-action{display:flex;align-items:center;height:1em;width:1.75em}:host:not([hidden]) .bui-file-upload-list .mat-divider{margin:0 calc(1rem - 4px) 0 calc(1rem - 4px)}:host:not([hidden]) .upload-completed{animation:pulse 1s ease-in-out}@keyframes pulse{0%{transform:scaleY(1)}50%{transform:scaleY(1.5)}to{transform:scaleY(1)}}\n"] }]
408
- }], ctorParameters: function () { return [{ type: FileUploadService }]; }, propDecorators: { uploadActionText: [{
409
- type: Input
410
- }], fileUploadedLabel: [{
411
- type: Input
412
- }], dragHint: [{
413
- type: Input
414
- }], dropHint: [{
415
- type: Input
416
- }], limit: [{
417
- type: Input
418
- }], fileSize: [{
419
- type: Input
420
- }], types: [{
421
- type: Input
422
- }], _fileInput: [{
423
- type: ViewChild,
424
- args: ['fileInput', { read: ElementRef, static: true }]
425
- }], onDragEnter: [{
426
- type: HostListener,
427
- args: ['dragenter', ['$event']]
428
- }], onDragOver: [{
429
- type: HostListener,
430
- args: ['dragover', ['$event']]
431
- }], onDragLeave: [{
432
- type: HostListener,
433
- args: ['dragleave', ['$event']]
434
- }], onDndDrop: [{
435
- type: HostListener,
436
- args: ['drop', ['$event']]
437
- }] } });
438
-
439
- class FileUploadModule {
440
- }
441
- FileUploadModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
442
- FileUploadModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.6", ngImport: i0, type: FileUploadModule, declarations: [FileUploadComponent], imports: [CommonModule,
443
- MatIconModule,
444
- IconFontModule,
445
- MatProgressBarModule,
446
- MatButtonModule,
447
- MatDividerModule,
448
- MatTooltipModule], exports: [FileUploadComponent] });
449
- FileUploadModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadModule, imports: [CommonModule,
450
- MatIconModule,
451
- IconFontModule,
452
- MatProgressBarModule,
453
- MatButtonModule,
454
- MatDividerModule,
455
- MatTooltipModule] });
456
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.6", ngImport: i0, type: FileUploadModule, decorators: [{
457
- type: NgModule,
458
- args: [{
459
- declarations: [FileUploadComponent],
460
- imports: [
461
- CommonModule,
462
- MatIconModule,
463
- IconFontModule,
464
- MatProgressBarModule,
465
- MatButtonModule,
466
- MatDividerModule,
467
- MatTooltipModule
468
- ],
469
- exports: [FileUploadComponent]
470
- }]
471
- }] });
472
-
473
- /**
474
- * Generated bundle index. Do not edit.
475
- */
476
-
477
- export { FileUploadComponent, FileUploadItem, FileUploadModule, FileUploadService };
478
- //# sourceMappingURL=bravura-ui-file-upload.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bravura-ui-file-upload.mjs","sources":["../../../projects/ui/file-upload/file-upload.service.ts","../../../projects/ui/file-upload/file-upload.component.ts","../../../projects/ui/file-upload/file-upload.component.html","../../../projects/ui/file-upload/file-upload.module.ts","../../../projects/ui/file-upload/bravura-ui-file-upload.ts"],"sourcesContent":["import { HttpEvent } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\n\n/**\n * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.\n */\nexport class FileUploadItem {\n\t/** The original filename in the client's filesystem, as provided by the browser. */\n\tname: string;\n\n\t/** The size of the file item. */\n\tsize: number;\n\n\t/** An alpha-numeric string that uniquely identifies the file item. */\n\tid: string;\n\n\t/** The content type (MIME type) of the file. */\n\ttype: string;\n\n\t/** @internal */\n\tconstructor(_id: string, _name: string, _size: number, _type: string) {\n\t\tthis.id = _id;\n\t\tthis.name = _name;\n\t\tthis.size = _size;\n\t\tthis.type = _type;\n\t}\n}\n\n/**\n * This is an API for processing file upload requests.\n *\n * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.\n *\n * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.\n */\n@Injectable()\nexport abstract class FileUploadService {\n\t/**\n\t * Upload a list of selected files from the browser. The returned `Observable` array provides the update of the uploading progress\n\t * through HTTP events.\n\t */\n\tabstract upload(files: File[]): Array<Observable<HttpEvent<FileUploadItem>>>;\n\n\t/** List all the uploaded file items in the current HTTP session. This list excludes the files still in the process of being uploaded*/\n\tabstract list(): Observable<FileUploadItem[]>;\n\n\t/** Get the content of an uploaded file item as a `Blob`. */\n\tabstract get(id: string): Observable<Blob>;\n\n\t/** Delete an uploaded file item from the server. */\n\tabstract delete(id: string): Observable<void>;\n\n\t/** Delete all uploaded file items in the current HTTP session. */\n\tabstract clear?(): Observable<void>;\n}\n","import { animate, query, stagger, style, transition, trigger } from '@angular/animations';\nimport { HttpEvent, HttpEventType } from '@angular/common/http';\nimport { Component, ElementRef, forwardRef, HostListener, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { Observable, of, Subject, Subscription } from 'rxjs';\nimport { FileUploadItem, FileUploadService } from './file-upload.service';\n\n/** @ignore */\nclass UploadingItem {\n\tprogress = 0;\n\tuploadedItem: FileUploadItem | null | undefined;\n\tdownloadingSubs?: Subscription;\n\tprivate subscription: Subscription;\n\tprivate file?: File;\n\n\tconstructor(item: FileUploadItem, oncancel: (item: UploadingItem) => void);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfile: File,\n\t\toncomplete: () => void,\n\t\toncancel: (item: UploadingItem) => void\n\t);\n\tconstructor(\n\t\tevent$: Observable<HttpEvent<FileUploadItem>> | FileUploadItem,\n\t\tfileOrOncancel?: File | ((item: UploadingItem) => void),\n\t\toncomplete?: () => void,\n\t\tprivate oncancel?: (item: UploadingItem) => void\n\t) {\n\t\tif (event$ instanceof Observable) {\n\t\t\tthis.file = fileOrOncancel as File;\n\t\t\tthis.subscription = event$.subscribe({\n\t\t\t\tnext: evt => {\n\t\t\t\t\tif (evt.type === HttpEventType.UploadProgress) {\n\t\t\t\t\t\tthis.progress = evt.loaded / (this.file as File).size;\n\t\t\t\t\t} else if (evt.type === HttpEventType.Response) {\n\t\t\t\t\t\tthis.uploadedItem = evt.body;\n\t\t\t\t\t\tthis.progress = 1;\n\t\t\t\t\t\toncomplete!();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tthis.subscription = of(event$).subscribe();\n\t\t\tthis.uploadedItem = event$;\n\t\t\tthis.oncancel = fileOrOncancel as (item: UploadingItem) => void;\n\t\t}\n\t}\n\n\tcancel() {\n\t\tthis.subscription.unsubscribe();\n\t\tthis.oncancel!(this);\n\t}\n\n\tget done() {\n\t\treturn !!this.uploadedItem;\n\t}\n\n\tget name() {\n\t\treturn this.uploadedItem?.name || this.file?.name;\n\t}\n\n\tget downloading() {\n\t\treturn this.downloadingSubs && !this.downloadingSubs.closed;\n\t}\n}\n/**\n * A control value accessor component to provide the user interface for uploading files.\n *\n * The application that integrates this UI must provide an implementation of `FileUploadService`.\n *\n * The control's value is a list of alpha-numerical strings, which are the identifiers to the uploaded files.\n *\n * Example:\n *\n * ```html\n * <form>\n * <bui-file-upload [(ngModel)]=\"uploadedFileIds\" name=\"myFiles\"></bui-file-upload>\n * </form>\n * ```\n *\n * @see FileUploadService\n */\n@Component({\n\thost: {\n\t\tclass: 'bui-host bui-file-upload',\n\t\t'[class.bui-dnd-active]': '_overFrame && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-over]': '_overDropZone && remaining >= _numberOfFilesDragged',\n\t\t'[class.bui-dnd-invalid]': '_invalidFilesDragged'\n\t},\n\tselector: 'bui-file-upload',\n\ttemplateUrl: './file-upload.component.html',\n\tstyleUrls: ['./file-upload.component.scss'],\n\tproviders: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => FileUploadComponent), multi: true }],\n\tanimations: [\n\t\ttrigger('slideOut', [\n\t\t\ttransition('* => *', [\n\t\t\t\tquery(':leave', stagger(100, animate('0.25s', style({ height: 0, overflow: 'hidden' }))), { optional: true })\n\t\t\t])\n\t\t])\n\t]\n})\nexport class FileUploadComponent implements OnInit, OnDestroy, ControlValueAccessor {\n\t/** @ignore */\n\t_value: string[] | null = null;\n\n\t/**\n\t * The caption of the button for opening file selection dialog.\n\t */\n\t@Input()\n\tuploadActionText = 'Drag files here to attach or browse';\n\n\t/**\n\t * The label for listing successful uploaded files.\n\t */\n\t@Input()\n\tfileUploadedLabel = 'List of files uploaded successfully';\n\n\t/**\n\t * The text to be displayed when the user starts to drag file items over the browser window.\n\t */\n\t@Input()\n\tdragHint = 'Please drag the files here.';\n\n\t/**\n\t * The text to be displayed when the user is dragging the file items over the drop zone.\n\t */\n\t@Input()\n\tdropHint = 'Please release the mouse button to start uploading.';\n\n\t/** Specifies the total number of files accepted. A falsy value removes the limit.*/\n\t@Input()\n\tlimit = 0;\n\n\t/**\n\t * specify the number of maximum bytes that can be uploaded.\n\t * if number is specified, bytes are assumed, otherwise enter a string for specific size type.\n\t */\n\t@Input()\n\tfileSize: number | string = '10MB';\n\n\t/**\n\t * Accepted MIME types\n\t *\n\t * @example ['text/*', 'image/png']\n\t */\n\t@Input()\n\tget types(): string[] {\n\t\treturn this._types;\n\t}\n\tset types(types: string[]) {\n\t\tif (Array.isArray(types) && types?.length) {\n\t\t\tthis._typeRegExps = [];\n\t\t\tthis._types = Array.from(types);\n\t\t\tthis._accept = this._types.join(',');\n\t\t\ttypes.forEach(t => this._typeRegExps.push(new RegExp(t.replace(/\\*/g, '.*'))));\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_fileSizeExceedMsg: string = '';\n\n\t/** @ignore */\n\t_uploadingItems: UploadingItem[] = [];\n\n\t/** @ignore */\n\t_accept = '*/*';\n\n\t/** @ignore */\n\t_itemAnimationStart = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationDone = new Subject<void>();\n\t/** @ignore */\n\t_itemAnimationInProgress = false;\n\n\tprivate _onChange = (_: string[]) => {};\n\tprivate _onTouch = () => {};\n\tprivate _frameDndEnter: (event: DragEvent) => void;\n\tprivate _frameDndLeave: () => void;\n\tprivate _frameDndOver: (event: DragEvent) => void;\n\tprivate _frameDndStop: () => void;\n\tprivate _overFrameCounter = 0;\n\tprivate _overCounter = 0;\n\tprivate _typeRegExps: RegExp[] = [/.*\\/.*/];\n\tprivate _types: string[] = ['*/*'];\n\tprivate _initSubs?: Subscription;\n\tprivate _numberOfFilesDragged = 0;\n\n\t@ViewChild('fileInput', { read: ElementRef, static: true })\n\tprivate _fileInput!: ElementRef<HTMLInputElement>;\n\n\tconstructor(private _service: FileUploadService) {\n\t\tthis._onChange([]);\n\t\tthis._onTouch();\n\t\tthis._frameDndEnter = this._onDndEnterFrame.bind(this);\n\t\tthis._frameDndLeave = this._onDndLeaveFrame.bind(this);\n\t\tthis._frameDndStop = this._onDndStopFrame.bind(this);\n\t\tthis._frameDndOver = event => event.preventDefault();\n\t}\n\n\t/** @internal */\n\tngOnInit(): void {\n\t\tdocument.addEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.addEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.addEventListener('dragend', this._frameDndStop);\n\t\tdocument.addEventListener('drop', this._frameDndStop);\n\t\tdocument.addEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.subscribe(() => (this._itemAnimationInProgress = true));\n\t\tthis._itemAnimationDone.subscribe(() => (this._itemAnimationInProgress = false));\n\t}\n\n\tngOnDestroy(): void {\n\t\tdocument.removeEventListener('dragenter', this._frameDndEnter);\n\t\tdocument.removeEventListener('dragleave', this._frameDndLeave);\n\t\tdocument.removeEventListener('dragend', this._frameDndStop);\n\t\tdocument.removeEventListener('drop', this._frameDndStop);\n\t\tdocument.removeEventListener('dragover', this._frameDndOver);\n\t\tthis._itemAnimationStart.complete();\n\t\tthis._itemAnimationDone.complete();\n\t}\n\n\t/** @internal */\n\twriteValue(obj: any): void {\n\t\tif (Array.isArray(obj)) {\n\t\t\tif (!this._value) {\n\t\t\t\tthis._acceptChange(obj);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst common = obj.filter(v => this._value!.includes(v));\n\t\t\tif (common.length === obj.length && common.length === this._value.length) {\n\t\t\t\treturn; // no change\n\t\t\t}\n\t\t\tthis._acceptChange(obj);\n\t\t} else {\n\t\t\tthis._value = null;\n\t\t}\n\t}\n\n\t/** @internal */\n\tregisterOnChange(fn: any): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/** @internal */\n\tregisterOnTouched(fn: any): void {\n\t\tthis._onTouch = fn;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragenter', ['$event'])\n\tonDragEnter(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter++;\n\t}\n\n\t/** @internal */\n\t@HostListener('dragover', ['$event'])\n\tonDragOver(event: Event) {\n\t\tevent.preventDefault();\n\t}\n\n\t/** @internal */\n\t@HostListener('dragleave', ['$event'])\n\tonDragLeave(event: Event) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._overCounter--;\n\t}\n\n\t/** @internal */\n\t@HostListener('drop', ['$event'])\n\tonDndDrop(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tevent.stopPropagation();\n\t\tthis._onDndStopFrame();\n\t\tconst files = event.dataTransfer?.files;\n\t\tif (files?.length && this._validateFileSize(files)) {\n\t\t\tthis._uploadFiles(Array.from(files));\n\t\t}\n\t}\n\n\t/** Open the file selection dialog */\n\tselectFiles() {\n\t\tthis._fileInput.nativeElement.click();\n\t}\n\n\t/** @ignore */\n\t_openItem(item: UploadingItem) {\n\t\titem.downloadingSubs = this._service.get(item.uploadedItem!.id).subscribe(blob => {\n\t\t\tconst url = URL.createObjectURL(blob);\n\t\t\twindow.open(url, '_blank');\n\t\t});\n\t}\n\n\t/** @ignore */\n\tget _overFrame(): boolean {\n\t\treturn this._overFrameCounter > 0;\n\t}\n\n\t/** @ignore */\n\tget _overDropZone(): boolean {\n\t\treturn this._overCounter > 0;\n\t}\n\n\t/** Whether file uploading is in progress */\n\tget uploading(): boolean {\n\t\treturn this._uploadingItems.some(i => !i.done);\n\t}\n\n\t/** The remaining number of files allowed.*/\n\tget remaining(): number {\n\t\treturn this.limit ? this.limit - this._uploadingItems.length : Infinity;\n\t}\n\n\t/** @ignore */\n\t_handleFileSelection() {\n\t\tconst fileList = this._fileInput.nativeElement.files;\n\t\tif (fileList?.length && this._validateFileSize(fileList)) {\n\t\t\tthis._uploadFiles(Array.from(fileList));\n\t\t\tthis._fileInput.nativeElement.value = '';\n\t\t}\n\t}\n\n\t/** @ignore */\n\tget _invalidFilesDragged(): boolean {\n\t\treturn this._numberOfFilesDragged > this.remaining && (this._overFrame || this._overDropZone);\n\t}\n\n\t/** @ignore */\n\tget _initialising(): boolean {\n\t\treturn !!this._initSubs && !this._initSubs.closed;\n\t}\n\n\tprivate returnFileSize(size: number) {\n\t\tif (size < 1024) {\n\t\t\treturn `${size} bytes`;\n\t\t} else if (size >= 1024 && size < 1048576) {\n\t\t\treturn `${(size / 1024).toFixed(1)} KB`;\n\t\t} else {\n\t\t\treturn `${(size / 1048576).toFixed(1)} MB`;\n\t\t}\n\t}\n\n\tprivate _validateFileSize(files: FileList) {\n\t\tthis._fileSizeExceedMsg = '';\n\t\tconst maxSize = this.returnFileSize(this._getMaxBytes());\n\t\tfor (let i = 0; i < files.length; i++) {\n\t\t\tif (files[i]!.size > this._getMaxBytes()) {\n\t\t\t\tthis._fileSizeExceedMsg = `Selected file/s has exceeded the allowable size of ${maxSize} per file`;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\tprivate _getMaxBytes(): number {\n\t\tif (typeof this.fileSize === 'string') {\n\t\t\tif (this.fileSize.toUpperCase().endsWith('KB')) {\n\t\t\t\tconst kiloBytes = this.fileSize.substring(0, this.fileSize.indexOf('KB'));\n\t\t\t\treturn Number(kiloBytes) * 1024;\n\t\t\t} else if (this.fileSize.toUpperCase().endsWith('MB')) {\n\t\t\t\tconst megaBytes = this.fileSize.substring(0, this.fileSize.indexOf('MB'));\n\t\t\t\treturn Number(megaBytes) * 1048576;\n\t\t\t}\n\t\t}\n\t\treturn this.fileSize as number;\n\t}\n\n\tprivate _uploadFiles(files: File[]) {\n\t\tif (this._initialising || files.length > this.remaining) {\n\t\t\treturn;\n\t\t}\n\t\tconst filtered = files.filter(\n\t\t\tf =>\n\t\t\t\t(!f.type || this._typeRegExps.some(regexp => f.type.match(regexp))) &&\n\t\t\t\t!this._uploadingItems.some(i => i.name === f.name)\n\t\t);\n\t\tconst observables = this._service.upload(filtered);\n\t\tconst items = filtered.map(\n\t\t\t(f, i) => new UploadingItem(observables[i], f, this._updateItems.bind(this), this._deleteItem.bind(this))\n\t\t);\n\t\tthis._uploadingItems = [...this._uploadingItems, ...items];\n\t}\n\n\tprivate _onDndEnterFrame(event: DragEvent) {\n\t\tevent.preventDefault();\n\t\tthis._numberOfFilesDragged = event.dataTransfer?.items?.length || 0;\n\t\tthis._overFrameCounter++;\n\t}\n\n\tprivate _onDndLeaveFrame() {\n\t\tthis._overFrameCounter--;\n\t}\n\n\tprivate _onDndStopFrame() {\n\t\tthis._overFrameCounter = 0;\n\t\tthis._overCounter = 0;\n\t}\n\n\tprivate _acceptChange(v: string[]) {\n\t\tthis._initSubs = this._service.list().subscribe(list => {\n\t\t\tthis._uploadingItems = list\n\t\t\t\t.filter(i => v.includes(i.id))\n\t\t\t\t.map(f => new UploadingItem(f, this._deleteItem.bind(this)));\n\t\t});\n\t}\n\n\tprivate _updateItems() {\n\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\tthis._uploadingItems = [...completed, ...this._uploadingItems.filter(i => !i.uploadedItem)];\n\t\tthis._updateValue(completed);\n\t}\n\n\tprivate _deleteItem(item: UploadingItem) {\n\t\tconst key = item.uploadedItem?.id;\n\t\tif (key) {\n\t\t\tthis._service.delete(key).subscribe(() => {\n\t\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\t\tthis._updateValue(completed);\n\t\t\t});\n\t\t} else {\n\t\t\tthis._uploadingItems = this._uploadingItems.filter(i => i !== item);\n\t\t\tconst completed = this._uploadingItems.filter(i => !!i.uploadedItem);\n\t\t\tthis._updateValue(completed);\n\t\t}\n\t}\n\n\tprivate _updateValue(completed: UploadingItem[]) {\n\t\tconst completedIds = completed.map(c => c.uploadedItem!.id);\n\t\tthis._value = completedIds;\n\t\tif (!this._value.length) {\n\t\t\tthis._value = null;\n\t\t}\n\t\tthis._onChange(completedIds);\n\t}\n}\n","<div class=\"bui-file-upload-container\">\n\t<div\n\t\tclass=\"bui-file-upload-hint\"\n\t\t*ngIf=\"!_initialising && remaining > 0 && (!_itemAnimationInProgress || remaining > 1)\"\n\t>\n\t\t<ng-template [ngIf]=\"_invalidFilesDragged\" [ngIfElse]=\"validDnd\">\n\t\t\t<mat-icon [buiIcon]=\"'block'\" [size]=\"32\" color=\"warn\" variant=\"outlined\" style=\"opacity: 0.6\"></mat-icon>\n\t\t</ng-template>\n\t\t<ng-template #validDnd>\n\t\t\t<div *ngIf=\"!_overFrame && !_overDropZone\" class=\"bui-color-muted bui-upload-icon-link\" (click)=\"selectFiles()\">\n\t\t\t\t<mat-icon [buiIcon]=\"'fas fa-cloud-upload-alt'\" [size]=\"32\"></mat-icon>\n\t\t\t\t<a role=\"button\">{{ uploadActionText }}</a>\n\t\t\t</div>\n\t\t\t<div *ngIf=\"_overFrame && !_overDropZone\" class=\"bui-color-light\">{{ dragHint }}</div>\n\t\t\t<div *ngIf=\"_overDropZone\" class=\"bui-color-light\">{{ dropHint }}</div>\n\t\t</ng-template>\n\t</div>\n\t<div\n\t\tclass=\"bui-file-upload-list\"\n\t\t[@slideOut]=\"_uploadingItems.length\"\n\t\t(@slideOut.start)=\"_itemAnimationStart.next()\"\n\t\t(@slideOut.done)=\"_itemAnimationDone.next()\"\n\t\t*ngIf=\"_uploadingItems.length\"\n\t>\n\t\t<span class=\"bui-file-uploaded-label\">{{ fileUploadedLabel }}</span>\n\n\t\t<ng-container *ngFor=\"let item of _uploadingItems; let idx = index\">\n\t\t\t<div class=\"bui-file-upload-item\" [class.in-progress]=\"!item.done\" #itemDiv>\n\t\t\t\t<div class=\"bui-file-upload-item-name\">\n\t\t\t\t\t<span>\n\t\t\t\t\t\t<mat-icon class=\"bui-color-muted\">description</mat-icon>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\tclass=\"text\"\n\t\t\t\t\t\t\t*ngIf=\"item.done && !item.downloading; else staticName\"\n\t\t\t\t\t\t\thref=\"#{{ item.uploadedItem?.id }}\"\n\t\t\t\t\t\t\t(click)=\"$event.preventDefault(); _openItem(item)\"\n\t\t\t\t\t\t\tcontextmenu=\"false\"\n\t\t\t\t\t\t\tmatTooltip=\"Download\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{{ item.name }}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<ng-template #staticName>\n\t\t\t\t\t\t\t<span class=\"text\">{{ item.name }}</span>\n\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t</span>\n\t\t\t\t\t<div class=\"bui-file-upload-item-progress\">\n\t\t\t\t\t\t<mat-progress-bar\n\t\t\t\t\t\t\tmode=\"determinate\"\n\t\t\t\t\t\t\t[class.upload-completed]=\"item.done\"\n\t\t\t\t\t\t\t*ngIf=\"!item.downloading\"\n\t\t\t\t\t\t\t[value]=\"item.done ? 100 : item.progress * 100\"\n\t\t\t\t\t\t></mat-progress-bar>\n\t\t\t\t\t\t<mat-progress-bar mode=\"buffer\" *ngIf=\"item.downloading\"></mat-progress-bar>\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t<ng-template [ngIf]=\"item.done\" [ngIfElse]=\"inprogress\"> 100% </ng-template>\n\t\t\t\t\t\t\t<ng-template #inprogress>\n\t\t\t\t\t\t\t\t{{ item.progress | percent }}\n\t\t\t\t\t\t\t</ng-template>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"bui-file-upload-item-action\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tmat-icon-button\n\t\t\t\t\t\tcolor=\"primary\"\n\t\t\t\t\t\t(click)=\"item.cancel()\"\n\t\t\t\t\t\t(mouseenter)=\"itemDiv.classList.add('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\t(mouseleave)=\"itemDiv.classList.remove('bui-file-upload-item-deleting')\"\n\t\t\t\t\t\tmatTooltip=\"Delete\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<mat-icon [buiIcon]=\"'cancel'\" style=\"line-height: 0.9\"></mat-icon>\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<mat-divider *ngIf=\"idx < _uploadingItems.length - 1\"></mat-divider>\n\t\t</ng-container>\n\t</div>\n\t<input\n\t\ttype=\"file\"\n\t\t#fileInput\n\t\tstyle=\"display: none\"\n\t\taccept=\"{{ _accept }}\"\n\t\t(change)=\"_handleFileSelection()\"\n\t\t[multiple]=\"remaining > 1\"\n\t/>\n\n\t<div *ngIf=\"_fileSizeExceedMsg\" class=\"bui-color-warn bui-file-size-exceed\">\n\t\t<span> {{ _fileSizeExceedMsg }}</span> <mat-icon role=\"button\" (click)=\"_fileSizeExceedMsg = ''\">cancel</mat-icon>\n\t</div>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FileUploadComponent } from './file-upload.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { IconFontModule } from '@bravura/ui/icon-font';\nimport { MatProgressBarModule } from '@angular/material/progress-bar';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDividerModule } from '@angular/material/divider';\nimport { MatTooltipModule } from '@angular/material/tooltip';\n\n@NgModule({\n\tdeclarations: [FileUploadComponent],\n\timports: [\n\t\tCommonModule,\n\t\tMatIconModule,\n\t\tIconFontModule,\n\t\tMatProgressBarModule,\n\t\tMatButtonModule,\n\t\tMatDividerModule,\n\t\tMatTooltipModule\n\t],\n\texports: [FileUploadComponent]\n})\nexport class FileUploadModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.FileUploadService"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,cAAc,CAAA;;AAc1B,IAAA,WAAA,CAAY,GAAW,EAAE,KAAa,EAAE,KAAa,EAAE,KAAa,EAAA;AACnE,QAAA,IAAI,CAAC,EAAE,GAAG,GAAG,CAAC;AACd,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;AAClB,QAAA,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC;KAClB;AACD,CAAA;AAED;;;;;;AAMG;MAEmB,iBAAiB,CAAA;;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EA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