@bravura/ui 1.21.6 → 2.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 (275) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/README.md +1 -0
  3. package/alert/alert-container.component.d.ts +1 -1
  4. package/alert/alert-message.component.d.ts +1 -1
  5. package/alert/{bravura-ui-alert.d.ts → index.d.ts} +0 -0
  6. package/behavior/await.directive.d.ts +1 -1
  7. package/behavior/{bravura-ui-behavior.d.ts → index.d.ts} +0 -0
  8. package/behavior/sizing-monitor.directive.d.ts +1 -1
  9. package/behavior/sizing.directive.d.ts +1 -1
  10. package/common/{bravura-ui-common.d.ts → index.d.ts} +0 -0
  11. package/currency-input/currency-input.directive.d.ts +1 -1
  12. package/currency-input/{bravura-ui-currency-input.d.ts → index.d.ts} +0 -0
  13. package/decimal-input/decimal-input.directive.d.ts +1 -1
  14. package/decimal-input/{bravura-ui-decimal-input.d.ts → index.d.ts} +0 -0
  15. package/discrete-input/discrete-input.component.d.ts +6 -5
  16. package/discrete-input/{bravura-ui-discrete-input.d.ts → index.d.ts} +0 -0
  17. package/esm2020/alert/alert-container.component.mjs +201 -0
  18. package/esm2020/alert/alert-message.component.mjs +92 -0
  19. package/esm2020/alert/alert.module.mjs +22 -0
  20. package/{esm2015/alert/bravura-ui-alert.js → esm2020/alert/bravura-ui-alert.mjs} +0 -0
  21. package/{esm2015/alert/public-api.js → esm2020/alert/public-api.mjs} +0 -0
  22. package/{esm2015/behavior/await.directive.js → esm2020/behavior/await.directive.mjs} +4 -4
  23. package/esm2020/behavior/behavior.module.mjs +25 -0
  24. package/{esm2015/behavior/bravura-ui-behavior.js → esm2020/behavior/bravura-ui-behavior.mjs} +0 -0
  25. package/{esm2015/behavior/public-api.js → esm2020/behavior/public-api.mjs} +0 -0
  26. package/{esm2015/behavior/sizing-monitor.directive.js → esm2020/behavior/sizing-monitor.directive.mjs} +4 -4
  27. package/{esm2015/behavior/sizing.directive.js → esm2020/behavior/sizing.directive.mjs} +4 -4
  28. package/{esm2015/bravura-ui.js → esm2020/bravura-ui.mjs} +0 -0
  29. package/{esm2015/common/bravura-ui-common.js → esm2020/common/bravura-ui-common.mjs} +0 -0
  30. package/{esm2015/common/common-utils.js → esm2020/common/common-utils.mjs} +0 -0
  31. package/esm2020/common/common.module.mjs +52 -0
  32. package/{esm2015/common/public-api.js → esm2020/common/public-api.mjs} +0 -0
  33. package/{esm2015/currency-input/bravura-ui-currency-input.js → esm2020/currency-input/bravura-ui-currency-input.mjs} +0 -0
  34. package/esm2020/currency-input/currency-input.directive.mjs +279 -0
  35. package/esm2020/currency-input/currency-input.module.mjs +19 -0
  36. package/{esm2015/currency-input/public-api.js → esm2020/currency-input/public-api.mjs} +0 -0
  37. package/{esm2015/decimal-input/bravura-ui-decimal-input.js → esm2020/decimal-input/bravura-ui-decimal-input.mjs} +0 -0
  38. package/{esm2015/decimal-input/decimal-input.directive.js → esm2020/decimal-input/decimal-input.directive.mjs} +4 -4
  39. package/esm2020/decimal-input/decimal-input.module.mjs +19 -0
  40. package/{esm2015/decimal-input/public-api.js → esm2020/decimal-input/public-api.mjs} +0 -0
  41. package/{esm2015/discrete-input/bravura-ui-discrete-input.js → esm2020/discrete-input/bravura-ui-discrete-input.mjs} +0 -0
  42. package/esm2020/discrete-input/discrete-input.component.mjs +326 -0
  43. package/esm2020/discrete-input/discrete-input.module.mjs +21 -0
  44. package/{esm2015/discrete-input/public-api.js → esm2020/discrete-input/public-api.mjs} +0 -0
  45. package/{esm2015/file-upload/bravura-ui-file-upload.js → esm2020/file-upload/bravura-ui-file-upload.mjs} +0 -0
  46. package/esm2020/file-upload/file-upload.component.mjs +356 -0
  47. package/{esm2015/file-upload/file-upload.module.js → esm2020/file-upload/file-upload.module.mjs} +11 -13
  48. package/{esm2015/file-upload/file-upload.service.js → esm2020/file-upload/file-upload.service.mjs} +4 -4
  49. package/{esm2015/file-upload/public-api.js → esm2020/file-upload/public-api.mjs} +0 -0
  50. package/{esm2015/form-field/bravura-ui-form-field.js → esm2020/form-field/bravura-ui-form-field.mjs} +0 -0
  51. package/esm2020/form-field/form-field.component.mjs +96 -0
  52. package/esm2020/form-field/form-field.module.mjs +20 -0
  53. package/{esm2015/form-field/public-api.js → esm2020/form-field/public-api.mjs} +0 -0
  54. package/{esm2015/icon-font/bravura-ui-icon-font.js → esm2020/icon-font/bravura-ui-icon-font.mjs} +0 -0
  55. package/esm2020/icon-font/icon-font.module.mjs +22 -0
  56. package/{esm2015/icon-font/icon.directive.js → esm2020/icon-font/icon.directive.mjs} +4 -4
  57. package/{esm2015/icon-font/public-api.js → esm2020/icon-font/public-api.mjs} +0 -0
  58. package/{esm2015/icon-font/utilities.js → esm2020/icon-font/utilities.mjs} +0 -0
  59. package/{esm2015/phone-number/bravura-ui-phone-number.js → esm2020/phone-number/bravura-ui-phone-number.mjs} +0 -0
  60. package/esm2020/phone-number/phone-number.directive.mjs +187 -0
  61. package/esm2020/phone-number/phone-number.module.mjs +24 -0
  62. package/{esm2015/phone-number/phone-number.pipe.js → esm2020/phone-number/phone-number.pipe.mjs} +4 -4
  63. package/{esm2015/phone-number/phone-number.validator.js → esm2020/phone-number/phone-number.validator.mjs} +4 -4
  64. package/{esm2015/phone-number/public-api.js → esm2020/phone-number/public-api.mjs} +0 -0
  65. package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
  66. package/{esm2015/radio-panel/bravura-ui-radio-panel.js → esm2020/radio-panel/bravura-ui-radio-panel.mjs} +0 -0
  67. package/{esm2015/radio-panel/public-api.js → esm2020/radio-panel/public-api.mjs} +0 -0
  68. package/esm2020/radio-panel/radio-panel-item.component.mjs +97 -0
  69. package/esm2020/radio-panel/radio-panel.component.mjs +89 -0
  70. package/esm2020/radio-panel/radio-panel.module.mjs +25 -0
  71. package/{esm2015/selection-panel/bravura-ui-selection-panel.js → esm2020/selection-panel/bravura-ui-selection-panel.mjs} +0 -0
  72. package/{esm2015/selection-panel/public-api.js → esm2020/selection-panel/public-api.mjs} +0 -0
  73. package/esm2020/selection-panel/selection-panel-item.component.mjs +166 -0
  74. package/esm2020/selection-panel/selection-panel.directive.mjs +119 -0
  75. package/esm2020/selection-panel/selection-panel.module.mjs +23 -0
  76. package/{esm2015/skeletons/bravura-ui-skeletons.js → esm2020/skeletons/bravura-ui-skeletons.mjs} +0 -0
  77. package/{esm2015/skeletons/public-api.js → esm2020/skeletons/public-api.mjs} +0 -0
  78. package/esm2020/skeletons/skeleton-loader-presets.directive.mjs +83 -0
  79. package/{esm2015/skeletons/skeleton-loader.component.js → esm2020/skeletons/skeleton-loader.component.mjs} +4 -4
  80. package/esm2020/skeletons/skeletons.module.mjs +35 -0
  81. package/{esm2015/stepper/bravura-ui-stepper.js → esm2020/stepper/bravura-ui-stepper.mjs} +0 -0
  82. package/{esm2015/stepper/public-api.js → esm2020/stepper/public-api.mjs} +0 -0
  83. package/esm2020/stepper/stepper-animation.mjs +23 -0
  84. package/esm2020/stepper/stepper.component.mjs +166 -0
  85. package/{esm2015/stepper/stepper.module.js → esm2020/stepper/stepper.module.mjs} +13 -15
  86. package/{esm2015/tooltip/bravura-ui-tooltip.js → esm2020/tooltip/bravura-ui-tooltip.mjs} +0 -0
  87. package/{esm2015/tooltip/public-api.js → esm2020/tooltip/public-api.mjs} +0 -0
  88. package/esm2020/tooltip/tooltip.component.mjs +51 -0
  89. package/{esm2015/tooltip/tooltip.directive.js → esm2020/tooltip/tooltip.directive.mjs} +4 -4
  90. package/esm2020/tooltip/tooltip.module.mjs +25 -0
  91. package/fesm2015/bravura-ui-alert.mjs +324 -0
  92. package/fesm2015/bravura-ui-alert.mjs.map +1 -0
  93. package/fesm2015/bravura-ui-behavior.mjs +407 -0
  94. package/fesm2015/bravura-ui-behavior.mjs.map +1 -0
  95. package/fesm2015/bravura-ui-common.mjs +74 -0
  96. package/fesm2015/bravura-ui-common.mjs.map +1 -0
  97. package/fesm2015/bravura-ui-currency-input.mjs +303 -0
  98. package/fesm2015/bravura-ui-currency-input.mjs.map +1 -0
  99. package/fesm2015/bravura-ui-decimal-input.mjs +147 -0
  100. package/fesm2015/bravura-ui-decimal-input.mjs.map +1 -0
  101. package/fesm2015/bravura-ui-discrete-input.mjs +354 -0
  102. package/fesm2015/bravura-ui-discrete-input.mjs.map +1 -0
  103. package/fesm2015/bravura-ui-file-upload.mjs +434 -0
  104. package/fesm2015/bravura-ui-file-upload.mjs.map +1 -0
  105. package/fesm2015/{bravura-ui-form-field.js → bravura-ui-form-field.mjs} +12 -23
  106. package/fesm2015/bravura-ui-form-field.mjs.map +1 -0
  107. package/fesm2015/{bravura-ui-icon-font.js → bravura-ui-icon-font.mjs} +8 -8
  108. package/fesm2015/bravura-ui-icon-font.mjs.map +1 -0
  109. package/fesm2015/{bravura-ui-phone-number.js → bravura-ui-phone-number.mjs} +34 -30
  110. package/fesm2015/bravura-ui-phone-number.mjs.map +1 -0
  111. package/fesm2015/bravura-ui-radio-panel.mjs +212 -0
  112. package/fesm2015/bravura-ui-radio-panel.mjs.map +1 -0
  113. package/fesm2015/{bravura-ui-selection-panel.js → bravura-ui-selection-panel.mjs} +24 -28
  114. package/fesm2015/bravura-ui-selection-panel.mjs.map +1 -0
  115. package/fesm2015/bravura-ui-skeletons.mjs +195 -0
  116. package/fesm2015/bravura-ui-skeletons.mjs.map +1 -0
  117. package/fesm2015/bravura-ui-stepper.mjs +243 -0
  118. package/fesm2015/bravura-ui-stepper.mjs.map +1 -0
  119. package/fesm2015/bravura-ui-tooltip.mjs +195 -0
  120. package/fesm2015/bravura-ui-tooltip.mjs.map +1 -0
  121. package/fesm2015/{bravura-ui.js → bravura-ui.mjs} +1 -1
  122. package/fesm2015/bravura-ui.mjs.map +1 -0
  123. package/fesm2020/bravura-ui-alert.mjs +312 -0
  124. package/fesm2020/bravura-ui-alert.mjs.map +1 -0
  125. package/{fesm2015/bravura-ui-behavior.js → fesm2020/bravura-ui-behavior.mjs} +14 -14
  126. package/fesm2020/bravura-ui-behavior.mjs.map +1 -0
  127. package/{fesm2015/bravura-ui-common.js → fesm2020/bravura-ui-common.mjs} +7 -7
  128. package/fesm2020/bravura-ui-common.mjs.map +1 -0
  129. package/{fesm2015/bravura-ui-currency-input.js → fesm2020/bravura-ui-currency-input.mjs} +9 -10
  130. package/fesm2020/bravura-ui-currency-input.mjs.map +1 -0
  131. package/{fesm2015/bravura-ui-decimal-input.js → fesm2020/bravura-ui-decimal-input.mjs} +8 -8
  132. package/fesm2020/bravura-ui-decimal-input.mjs.map +1 -0
  133. package/{fesm2015/bravura-ui-discrete-input.js → fesm2020/bravura-ui-discrete-input.mjs} +18 -26
  134. package/fesm2020/bravura-ui-discrete-input.mjs.map +1 -0
  135. package/fesm2020/bravura-ui-file-upload.mjs +430 -0
  136. package/fesm2020/bravura-ui-file-upload.mjs.map +1 -0
  137. package/fesm2020/bravura-ui-form-field.mjs +119 -0
  138. package/fesm2020/bravura-ui-form-field.mjs.map +1 -0
  139. package/fesm2020/bravura-ui-icon-font.mjs +178 -0
  140. package/fesm2020/bravura-ui-icon-font.mjs.map +1 -0
  141. package/fesm2020/bravura-ui-phone-number.mjs +317 -0
  142. package/fesm2020/bravura-ui-phone-number.mjs.map +1 -0
  143. package/fesm2020/bravura-ui-radio-panel.mjs +209 -0
  144. package/fesm2020/bravura-ui-radio-panel.mjs.map +1 -0
  145. package/fesm2020/bravura-ui-selection-panel.mjs +306 -0
  146. package/fesm2020/bravura-ui-selection-panel.mjs.map +1 -0
  147. package/{fesm2015/bravura-ui-skeletons.js → fesm2020/bravura-ui-skeletons.mjs} +13 -13
  148. package/fesm2020/bravura-ui-skeletons.mjs.map +1 -0
  149. package/{fesm2015/bravura-ui-stepper.js → fesm2020/bravura-ui-stepper.mjs} +27 -44
  150. package/fesm2020/bravura-ui-stepper.mjs.map +1 -0
  151. package/{fesm2015/bravura-ui-tooltip.js → fesm2020/bravura-ui-tooltip.mjs} +13 -22
  152. package/fesm2020/bravura-ui-tooltip.mjs.map +1 -0
  153. package/fesm2020/bravura-ui.mjs +8 -0
  154. package/fesm2020/bravura-ui.mjs.map +1 -0
  155. package/file-upload/file-upload.component.d.ts +1 -1
  156. package/file-upload/{bravura-ui-file-upload.d.ts → index.d.ts} +0 -0
  157. package/form-field/form-field.component.d.ts +1 -1
  158. package/form-field/{bravura-ui-form-field.d.ts → index.d.ts} +0 -0
  159. package/icon-font/icon.directive.d.ts +1 -1
  160. package/icon-font/{bravura-ui-icon-font.d.ts → index.d.ts} +0 -0
  161. package/{bravura-ui.d.ts → index.d.ts} +0 -0
  162. package/package.json +149 -14
  163. package/phone-number/{bravura-ui-phone-number.d.ts → index.d.ts} +0 -0
  164. package/phone-number/phone-number.directive.d.ts +1 -1
  165. package/phone-number/phone-number.pipe.d.ts +1 -1
  166. package/phone-number/phone-number.validator.d.ts +1 -1
  167. package/radio-panel/{bravura-ui-radio-panel.d.ts → index.d.ts} +0 -0
  168. package/radio-panel/radio-panel-item.component.d.ts +1 -1
  169. package/radio-panel/radio-panel.component.d.ts +1 -1
  170. package/selection-panel/{bravura-ui-selection-panel.d.ts → index.d.ts} +0 -0
  171. package/selection-panel/selection-panel-item.component.d.ts +1 -1
  172. package/selection-panel/selection-panel.directive.d.ts +1 -1
  173. package/skeletons/{bravura-ui-skeletons.d.ts → index.d.ts} +0 -0
  174. package/skeletons/skeleton-loader-presets.directive.d.ts +1 -1
  175. package/skeletons/skeleton-loader.component.d.ts +1 -1
  176. package/stepper/{bravura-ui-stepper.d.ts → index.d.ts} +0 -0
  177. package/stepper/stepper.component.d.ts +1 -1
  178. package/theme/_ui-theme.scss +1 -1
  179. package/tooltip/{bravura-ui-tooltip.d.ts → index.d.ts} +0 -0
  180. package/tooltip/tooltip.component.d.ts +1 -1
  181. package/tooltip/tooltip.directive.d.ts +1 -1
  182. package/alert/package.json +0 -10
  183. package/behavior/package.json +0 -10
  184. package/bundles/bravura-ui-alert.umd.js +0 -745
  185. package/bundles/bravura-ui-alert.umd.js.map +0 -1
  186. package/bundles/bravura-ui-behavior.umd.js +0 -788
  187. package/bundles/bravura-ui-behavior.umd.js.map +0 -1
  188. package/bundles/bravura-ui-common.umd.js +0 -103
  189. package/bundles/bravura-ui-common.umd.js.map +0 -1
  190. package/bundles/bravura-ui-currency-input.umd.js +0 -335
  191. package/bundles/bravura-ui-currency-input.umd.js.map +0 -1
  192. package/bundles/bravura-ui-decimal-input.umd.js +0 -176
  193. package/bundles/bravura-ui-decimal-input.umd.js.map +0 -1
  194. package/bundles/bravura-ui-discrete-input.umd.js +0 -747
  195. package/bundles/bravura-ui-discrete-input.umd.js.map +0 -1
  196. package/bundles/bravura-ui-file-upload.umd.js +0 -845
  197. package/bundles/bravura-ui-file-upload.umd.js.map +0 -1
  198. package/bundles/bravura-ui-form-field.umd.js +0 -494
  199. package/bundles/bravura-ui-form-field.umd.js.map +0 -1
  200. package/bundles/bravura-ui-icon-font.umd.js +0 -539
  201. package/bundles/bravura-ui-icon-font.umd.js.map +0 -1
  202. package/bundles/bravura-ui-phone-number.umd.js +0 -690
  203. package/bundles/bravura-ui-phone-number.umd.js.map +0 -1
  204. package/bundles/bravura-ui-radio-panel.umd.js +0 -595
  205. package/bundles/bravura-ui-radio-panel.umd.js.map +0 -1
  206. package/bundles/bravura-ui-selection-panel.umd.js +0 -699
  207. package/bundles/bravura-ui-selection-panel.umd.js.map +0 -1
  208. package/bundles/bravura-ui-skeletons.umd.js +0 -525
  209. package/bundles/bravura-ui-skeletons.umd.js.map +0 -1
  210. package/bundles/bravura-ui-stepper.umd.js +0 -613
  211. package/bundles/bravura-ui-stepper.umd.js.map +0 -1
  212. package/bundles/bravura-ui-tooltip.umd.js +0 -586
  213. package/bundles/bravura-ui-tooltip.umd.js.map +0 -1
  214. package/bundles/bravura-ui.umd.js +0 -18
  215. package/bundles/bravura-ui.umd.js.map +0 -1
  216. package/common/package.json +0 -10
  217. package/currency-input/package.json +0 -10
  218. package/decimal-input/package.json +0 -10
  219. package/discrete-input/package.json +0 -10
  220. package/esm2015/alert/alert-container.component.js +0 -220
  221. package/esm2015/alert/alert-message.component.js +0 -98
  222. package/esm2015/alert/alert.module.js +0 -22
  223. package/esm2015/behavior/behavior.module.js +0 -25
  224. package/esm2015/common/common.module.js +0 -52
  225. package/esm2015/currency-input/currency-input.directive.js +0 -280
  226. package/esm2015/currency-input/currency-input.module.js +0 -19
  227. package/esm2015/decimal-input/decimal-input.module.js +0 -19
  228. package/esm2015/discrete-input/discrete-input.component.js +0 -334
  229. package/esm2015/discrete-input/discrete-input.module.js +0 -21
  230. package/esm2015/file-upload/file-upload.component.js +0 -367
  231. package/esm2015/form-field/form-field.component.js +0 -107
  232. package/esm2015/form-field/form-field.module.js +0 -20
  233. package/esm2015/icon-font/icon-font.module.js +0 -22
  234. package/esm2015/phone-number/phone-number.directive.js +0 -192
  235. package/esm2015/phone-number/phone-number.module.js +0 -24
  236. package/esm2015/radio-panel/radio-panel-item.component.js +0 -109
  237. package/esm2015/radio-panel/radio-panel.component.js +0 -98
  238. package/esm2015/radio-panel/radio-panel.module.js +0 -25
  239. package/esm2015/selection-panel/selection-panel-item.component.js +0 -174
  240. package/esm2015/selection-panel/selection-panel.directive.js +0 -120
  241. package/esm2015/selection-panel/selection-panel.module.js +0 -23
  242. package/esm2015/skeletons/skeleton-loader-presets.directive.js +0 -83
  243. package/esm2015/skeletons/skeletons.module.js +0 -35
  244. package/esm2015/stepper/stepper-animation.js +0 -23
  245. package/esm2015/stepper/stepper.component.js +0 -181
  246. package/esm2015/tooltip/tooltip.component.js +0 -59
  247. package/esm2015/tooltip/tooltip.module.js +0 -26
  248. package/fesm2015/bravura-ui-alert.js +0 -337
  249. package/fesm2015/bravura-ui-alert.js.map +0 -1
  250. package/fesm2015/bravura-ui-behavior.js.map +0 -1
  251. package/fesm2015/bravura-ui-common.js.map +0 -1
  252. package/fesm2015/bravura-ui-currency-input.js.map +0 -1
  253. package/fesm2015/bravura-ui-decimal-input.js.map +0 -1
  254. package/fesm2015/bravura-ui-discrete-input.js.map +0 -1
  255. package/fesm2015/bravura-ui-file-upload.js +0 -443
  256. package/fesm2015/bravura-ui-file-upload.js.map +0 -1
  257. package/fesm2015/bravura-ui-form-field.js.map +0 -1
  258. package/fesm2015/bravura-ui-icon-font.js.map +0 -1
  259. package/fesm2015/bravura-ui-phone-number.js.map +0 -1
  260. package/fesm2015/bravura-ui-radio-panel.js +0 -230
  261. package/fesm2015/bravura-ui-radio-panel.js.map +0 -1
  262. package/fesm2015/bravura-ui-selection-panel.js.map +0 -1
  263. package/fesm2015/bravura-ui-skeletons.js.map +0 -1
  264. package/fesm2015/bravura-ui-stepper.js.map +0 -1
  265. package/fesm2015/bravura-ui-tooltip.js.map +0 -1
  266. package/fesm2015/bravura-ui.js.map +0 -1
  267. package/file-upload/package.json +0 -10
  268. package/form-field/package.json +0 -10
  269. package/icon-font/package.json +0 -10
  270. package/phone-number/package.json +0 -10
  271. package/radio-panel/package.json +0 -10
  272. package/selection-panel/package.json +0 -10
  273. package/skeletons/package.json +0 -10
  274. package/stepper/package.json +0 -10
  275. package/tooltip/package.json +0 -10
@@ -1,845 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/animations'), require('@angular/common/http'), require('@angular/forms'), require('rxjs'), require('@angular/material/icon'), require('@angular/material/progress-bar'), require('@angular/material/button'), require('@angular/material/divider'), require('@bravura/ui/icon-font'), require('@angular/material/tooltip')) :
3
- typeof define === 'function' && define.amd ? define('@bravura/ui/file-upload', ['exports', '@angular/core', '@angular/common', '@angular/animations', '@angular/common/http', '@angular/forms', 'rxjs', '@angular/material/icon', '@angular/material/progress-bar', '@angular/material/button', '@angular/material/divider', '@bravura/ui/icon-font', '@angular/material/tooltip'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui["file-upload"] = {}), global.ng.core, global.ng.common, global.ng.animations, global.ng.common.http, global.ng.forms, global.rxjs, global.ng.material.icon, global.ng.material.progressBar, global.ng.material.button, global.ng.material.divider, global.bravura.ui["icon-font"], global.ng.material.tooltip));
5
- })(this, (function (exports, i0, i6, animations, http, forms, rxjs, i2, i3, i4, i5, i7, i8) { 'use strict';
6
-
7
- function _interopNamespace(e) {
8
- if (e && e.__esModule) return e;
9
- var n = Object.create(null);
10
- if (e) {
11
- Object.keys(e).forEach(function (k) {
12
- if (k !== 'default') {
13
- var d = Object.getOwnPropertyDescriptor(e, k);
14
- Object.defineProperty(n, k, d.get ? d : {
15
- enumerable: true,
16
- get: function () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i6__namespace = /*#__PURE__*/_interopNamespace(i6);
27
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
28
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
29
- var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
30
- var i5__namespace = /*#__PURE__*/_interopNamespace(i5);
31
- var i7__namespace = /*#__PURE__*/_interopNamespace(i7);
32
- var i8__namespace = /*#__PURE__*/_interopNamespace(i8);
33
-
34
- /******************************************************************************
35
- Copyright (c) Microsoft Corporation.
36
-
37
- Permission to use, copy, modify, and/or distribute this software for any
38
- purpose with or without fee is hereby granted.
39
-
40
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
41
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
42
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
43
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
44
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
45
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
46
- PERFORMANCE OF THIS SOFTWARE.
47
- ***************************************************************************** */
48
- /* global Reflect, Promise */
49
- var extendStatics = function (d, b) {
50
- extendStatics = Object.setPrototypeOf ||
51
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
52
- function (d, b) { for (var p in b)
53
- if (Object.prototype.hasOwnProperty.call(b, p))
54
- d[p] = b[p]; };
55
- return extendStatics(d, b);
56
- };
57
- function __extends(d, b) {
58
- if (typeof b !== "function" && b !== null)
59
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
60
- extendStatics(d, b);
61
- function __() { this.constructor = d; }
62
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
63
- }
64
- var __assign = function () {
65
- __assign = Object.assign || function __assign(t) {
66
- for (var s, i = 1, n = arguments.length; i < n; i++) {
67
- s = arguments[i];
68
- for (var p in s)
69
- if (Object.prototype.hasOwnProperty.call(s, p))
70
- t[p] = s[p];
71
- }
72
- return t;
73
- };
74
- return __assign.apply(this, arguments);
75
- };
76
- function __rest(s, e) {
77
- var t = {};
78
- for (var p in s)
79
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
80
- t[p] = s[p];
81
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
82
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
83
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
84
- t[p[i]] = s[p[i]];
85
- }
86
- return t;
87
- }
88
- function __decorate(decorators, target, key, desc) {
89
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
90
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
91
- r = Reflect.decorate(decorators, target, key, desc);
92
- else
93
- for (var i = decorators.length - 1; i >= 0; i--)
94
- if (d = decorators[i])
95
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
96
- return c > 3 && r && Object.defineProperty(target, key, r), r;
97
- }
98
- function __param(paramIndex, decorator) {
99
- return function (target, key) { decorator(target, key, paramIndex); };
100
- }
101
- function __metadata(metadataKey, metadataValue) {
102
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
103
- return Reflect.metadata(metadataKey, metadataValue);
104
- }
105
- function __awaiter(thisArg, _arguments, P, generator) {
106
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
107
- return new (P || (P = Promise))(function (resolve, reject) {
108
- function fulfilled(value) { try {
109
- step(generator.next(value));
110
- }
111
- catch (e) {
112
- reject(e);
113
- } }
114
- function rejected(value) { try {
115
- step(generator["throw"](value));
116
- }
117
- catch (e) {
118
- reject(e);
119
- } }
120
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
121
- step((generator = generator.apply(thisArg, _arguments || [])).next());
122
- });
123
- }
124
- function __generator(thisArg, body) {
125
- var _ = { label: 0, sent: function () { if (t[0] & 1)
126
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
127
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
128
- function verb(n) { return function (v) { return step([n, v]); }; }
129
- function step(op) {
130
- if (f)
131
- throw new TypeError("Generator is already executing.");
132
- while (_)
133
- try {
134
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
135
- return t;
136
- if (y = 0, t)
137
- op = [op[0] & 2, t.value];
138
- switch (op[0]) {
139
- case 0:
140
- case 1:
141
- t = op;
142
- break;
143
- case 4:
144
- _.label++;
145
- return { value: op[1], done: false };
146
- case 5:
147
- _.label++;
148
- y = op[1];
149
- op = [0];
150
- continue;
151
- case 7:
152
- op = _.ops.pop();
153
- _.trys.pop();
154
- continue;
155
- default:
156
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
157
- _ = 0;
158
- continue;
159
- }
160
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
161
- _.label = op[1];
162
- break;
163
- }
164
- if (op[0] === 6 && _.label < t[1]) {
165
- _.label = t[1];
166
- t = op;
167
- break;
168
- }
169
- if (t && _.label < t[2]) {
170
- _.label = t[2];
171
- _.ops.push(op);
172
- break;
173
- }
174
- if (t[2])
175
- _.ops.pop();
176
- _.trys.pop();
177
- continue;
178
- }
179
- op = body.call(thisArg, _);
180
- }
181
- catch (e) {
182
- op = [6, e];
183
- y = 0;
184
- }
185
- finally {
186
- f = t = 0;
187
- }
188
- if (op[0] & 5)
189
- throw op[1];
190
- return { value: op[0] ? op[1] : void 0, done: true };
191
- }
192
- }
193
- var __createBinding = Object.create ? (function (o, m, k, k2) {
194
- if (k2 === undefined)
195
- k2 = k;
196
- var desc = Object.getOwnPropertyDescriptor(m, k);
197
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
198
- desc = { enumerable: true, get: function () { return m[k]; } };
199
- }
200
- Object.defineProperty(o, k2, desc);
201
- }) : (function (o, m, k, k2) {
202
- if (k2 === undefined)
203
- k2 = k;
204
- o[k2] = m[k];
205
- });
206
- function __exportStar(m, o) {
207
- for (var p in m)
208
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
209
- __createBinding(o, m, p);
210
- }
211
- function __values(o) {
212
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
213
- if (m)
214
- return m.call(o);
215
- if (o && typeof o.length === "number")
216
- return {
217
- next: function () {
218
- if (o && i >= o.length)
219
- o = void 0;
220
- return { value: o && o[i++], done: !o };
221
- }
222
- };
223
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
224
- }
225
- function __read(o, n) {
226
- var m = typeof Symbol === "function" && o[Symbol.iterator];
227
- if (!m)
228
- return o;
229
- var i = m.call(o), r, ar = [], e;
230
- try {
231
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
232
- ar.push(r.value);
233
- }
234
- catch (error) {
235
- e = { error: error };
236
- }
237
- finally {
238
- try {
239
- if (r && !r.done && (m = i["return"]))
240
- m.call(i);
241
- }
242
- finally {
243
- if (e)
244
- throw e.error;
245
- }
246
- }
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spread() {
251
- for (var ar = [], i = 0; i < arguments.length; i++)
252
- ar = ar.concat(__read(arguments[i]));
253
- return ar;
254
- }
255
- /** @deprecated */
256
- function __spreadArrays() {
257
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
258
- s += arguments[i].length;
259
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
260
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
261
- r[k] = a[j];
262
- return r;
263
- }
264
- function __spreadArray(to, from, pack) {
265
- if (pack || arguments.length === 2)
266
- for (var i = 0, l = from.length, ar; i < l; i++) {
267
- if (ar || !(i in from)) {
268
- if (!ar)
269
- ar = Array.prototype.slice.call(from, 0, i);
270
- ar[i] = from[i];
271
- }
272
- }
273
- return to.concat(ar || Array.prototype.slice.call(from));
274
- }
275
- function __await(v) {
276
- return this instanceof __await ? (this.v = v, this) : new __await(v);
277
- }
278
- function __asyncGenerator(thisArg, _arguments, generator) {
279
- if (!Symbol.asyncIterator)
280
- throw new TypeError("Symbol.asyncIterator is not defined.");
281
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
282
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
283
- function verb(n) { if (g[n])
284
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
285
- function resume(n, v) { try {
286
- step(g[n](v));
287
- }
288
- catch (e) {
289
- settle(q[0][3], e);
290
- } }
291
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
292
- function fulfill(value) { resume("next", value); }
293
- function reject(value) { resume("throw", value); }
294
- function settle(f, v) { if (f(v), q.shift(), q.length)
295
- resume(q[0][0], q[0][1]); }
296
- }
297
- function __asyncDelegator(o) {
298
- var i, p;
299
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
300
- function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
301
- }
302
- function __asyncValues(o) {
303
- if (!Symbol.asyncIterator)
304
- throw new TypeError("Symbol.asyncIterator is not defined.");
305
- var m = o[Symbol.asyncIterator], i;
306
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
307
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
308
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
309
- }
310
- function __makeTemplateObject(cooked, raw) {
311
- if (Object.defineProperty) {
312
- Object.defineProperty(cooked, "raw", { value: raw });
313
- }
314
- else {
315
- cooked.raw = raw;
316
- }
317
- return cooked;
318
- }
319
- ;
320
- var __setModuleDefault = Object.create ? (function (o, v) {
321
- Object.defineProperty(o, "default", { enumerable: true, value: v });
322
- }) : function (o, v) {
323
- o["default"] = v;
324
- };
325
- function __importStar(mod) {
326
- if (mod && mod.__esModule)
327
- return mod;
328
- var result = {};
329
- if (mod != null)
330
- for (var k in mod)
331
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
332
- __createBinding(result, mod, k);
333
- __setModuleDefault(result, mod);
334
- return result;
335
- }
336
- function __importDefault(mod) {
337
- return (mod && mod.__esModule) ? mod : { default: mod };
338
- }
339
- function __classPrivateFieldGet(receiver, state, kind, f) {
340
- if (kind === "a" && !f)
341
- throw new TypeError("Private accessor was defined without a getter");
342
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
343
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
344
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
345
- }
346
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
347
- if (kind === "m")
348
- throw new TypeError("Private method is not writable");
349
- if (kind === "a" && !f)
350
- throw new TypeError("Private accessor was defined without a setter");
351
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
352
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
353
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
354
- }
355
- function __classPrivateFieldIn(state, receiver) {
356
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
357
- throw new TypeError("Cannot use 'in' operator on non-object");
358
- return typeof state === "function" ? receiver === state : state.has(receiver);
359
- }
360
-
361
- /**
362
- * This type represents a file or form item that has been sent as part of a multipart/form-data POST request.
363
- */
364
- var FileUploadItem = /** @class */ (function () {
365
- /** @internal */
366
- function FileUploadItem(_id, _name, _size, _type) {
367
- this.id = _id;
368
- this.name = _name;
369
- this.size = _size;
370
- this.type = _type;
371
- }
372
- return FileUploadItem;
373
- }());
374
- /**
375
- * This is an API for processing file upload requests.
376
- *
377
- * A sub class of this type handles multiple file requests, sent using multipart/form-data encoding type, as specified by RFC 1867.
378
- *
379
- * Please extend this type and provide it in an injector at the same level, or ancestral to that, of the `FileUploadComponent`.
380
- */
381
- var FileUploadService = /** @class */ (function () {
382
- function FileUploadService() {
383
- }
384
- return FileUploadService;
385
- }());
386
- FileUploadService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadService, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
387
- FileUploadService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadService });
388
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadService, decorators: [{
389
- type: i0.Injectable
390
- }] });
391
-
392
- /** @ignore */
393
- var UploadingItem = /** @class */ (function () {
394
- function UploadingItem(event$, fileOrOncancel, oncomplete, oncancel) {
395
- var _this = this;
396
- this.oncancel = oncancel;
397
- this.progress = 0;
398
- if (event$ instanceof rxjs.Observable) {
399
- this.file = fileOrOncancel;
400
- this.subscription = event$.subscribe({
401
- next: function (evt) {
402
- if (evt.type === http.HttpEventType.UploadProgress) {
403
- _this.progress = evt.loaded / _this.file.size;
404
- }
405
- else if (evt.type === http.HttpEventType.Response) {
406
- _this.uploadedItem = evt.body;
407
- _this.progress = 1;
408
- oncomplete();
409
- }
410
- }
411
- });
412
- }
413
- else {
414
- this.subscription = rxjs.of(event$).subscribe();
415
- this.uploadedItem = event$;
416
- this.oncancel = fileOrOncancel;
417
- }
418
- }
419
- UploadingItem.prototype.cancel = function () {
420
- this.subscription.unsubscribe();
421
- this.oncancel(this);
422
- };
423
- Object.defineProperty(UploadingItem.prototype, "done", {
424
- get: function () {
425
- return !!this.uploadedItem;
426
- },
427
- enumerable: false,
428
- configurable: true
429
- });
430
- Object.defineProperty(UploadingItem.prototype, "name", {
431
- get: function () {
432
- var _a, _b;
433
- return ((_a = this.uploadedItem) === null || _a === void 0 ? void 0 : _a.name) || ((_b = this.file) === null || _b === void 0 ? void 0 : _b.name);
434
- },
435
- enumerable: false,
436
- configurable: true
437
- });
438
- Object.defineProperty(UploadingItem.prototype, "downloading", {
439
- get: function () {
440
- return this.downloadingSubs && !this.downloadingSubs.closed;
441
- },
442
- enumerable: false,
443
- configurable: true
444
- });
445
- return UploadingItem;
446
- }());
447
- /**
448
- * A control value accessor component to provide the user interface for uploading files.
449
- *
450
- * The application that integrates this UI must provide an implementation of `FileUploadService`.
451
- *
452
- * The control's value is a list of alpha-numerical strings, which are the identifiers to the uploaded files.
453
- *
454
- * Example:
455
- *
456
- * ```html
457
- * <form>
458
- * <bui-file-upload [(ngModel)]="uploadedFileIds" name="myFiles"></bui-file-upload>
459
- * </form>
460
- * ```
461
- *
462
- * @see FileUploadService
463
- */
464
- var FileUploadComponent = /** @class */ (function () {
465
- function FileUploadComponent(_service) {
466
- this._service = _service;
467
- /** @ignore */
468
- this._value = null;
469
- /**
470
- * The caption of the button for opening file selection dialog.
471
- */
472
- this.uploadActionText = 'Drag files here to attach or browse';
473
- /**
474
- * The label for listing successful uploaded files.
475
- */
476
- this.fileUploadedLabel = 'List of files uploaded successfully';
477
- /**
478
- * The text to be displayed when the user starts to drag file items over the browser window.
479
- */
480
- this.dragHint = 'Please drag the files here.';
481
- /**
482
- * The text to be displayed when the user is dragging the file items over the drop zone.
483
- */
484
- this.dropHint = 'Please release the mouse button to start uploading.';
485
- /** Specifies the total number of files accepted. A falsy value removes the limit.*/
486
- this.limit = 0;
487
- /** @ignore */
488
- this._uploadingItems = [];
489
- /** @ignore */
490
- this._accept = '*/*';
491
- /** @ignore */
492
- this._itemAnimationStart = new rxjs.Subject();
493
- /** @ignore */
494
- this._itemAnimationDone = new rxjs.Subject();
495
- /** @ignore */
496
- this._itemAnimationInProgress = false;
497
- this._onChange = function (_) { };
498
- this._onTouch = function () { };
499
- this._overFrameCounter = 0;
500
- this._overCounter = 0;
501
- this._typeRegExps = [/.*\/.*/];
502
- this._types = ['*/*'];
503
- this._numberOfFilesDragged = 0;
504
- this._onChange([]);
505
- this._onTouch();
506
- this._frameDndEnter = this._onDndEnterFrame.bind(this);
507
- this._frameDndLeave = this._onDndLeaveFrame.bind(this);
508
- this._frameDndStop = this._onDndStopFrame.bind(this);
509
- this._frameDndOver = function (event) { return event.preventDefault(); };
510
- }
511
- Object.defineProperty(FileUploadComponent.prototype, "types", {
512
- /**
513
- * Accepted MIME types
514
- *
515
- * @example ['text/*', 'image/png']
516
- */
517
- get: function () {
518
- return this._types;
519
- },
520
- set: function (types) {
521
- var _this = this;
522
- if (Array.isArray(types) && (types === null || types === void 0 ? void 0 : types.length)) {
523
- this._typeRegExps = [];
524
- this._types = Array.from(types);
525
- this._accept = this._types.join(',');
526
- types.forEach(function (t) { return _this._typeRegExps.push(new RegExp(t.replace(/\*/g, '.*'))); });
527
- }
528
- },
529
- enumerable: false,
530
- configurable: true
531
- });
532
- /** @internal */
533
- FileUploadComponent.prototype.ngOnInit = function () {
534
- var _this = this;
535
- document.addEventListener('dragenter', this._frameDndEnter);
536
- document.addEventListener('dragleave', this._frameDndLeave);
537
- document.addEventListener('dragend', this._frameDndStop);
538
- document.addEventListener('drop', this._frameDndStop);
539
- document.addEventListener('dragover', this._frameDndOver);
540
- this._itemAnimationStart.subscribe(function () { return (_this._itemAnimationInProgress = true); });
541
- this._itemAnimationDone.subscribe(function () { return (_this._itemAnimationInProgress = false); });
542
- };
543
- FileUploadComponent.prototype.ngOnDestroy = function () {
544
- document.removeEventListener('dragenter', this._frameDndEnter);
545
- document.removeEventListener('dragleave', this._frameDndLeave);
546
- document.removeEventListener('dragend', this._frameDndStop);
547
- document.removeEventListener('drop', this._frameDndStop);
548
- document.removeEventListener('dragover', this._frameDndOver);
549
- this._itemAnimationStart.complete();
550
- this._itemAnimationDone.complete();
551
- };
552
- /** @internal */
553
- FileUploadComponent.prototype.writeValue = function (obj) {
554
- var _this = this;
555
- if (Array.isArray(obj)) {
556
- if (!this._value) {
557
- this._acceptChange(obj);
558
- return;
559
- }
560
- var common = obj.filter(function (v) { return _this._value.includes(v); });
561
- if (common.length === obj.length && common.length === this._value.length) {
562
- return; // no change
563
- }
564
- this._acceptChange(obj);
565
- }
566
- else {
567
- this._value = null;
568
- }
569
- };
570
- /** @internal */
571
- FileUploadComponent.prototype.registerOnChange = function (fn) {
572
- this._onChange = fn;
573
- };
574
- /** @internal */
575
- FileUploadComponent.prototype.registerOnTouched = function (fn) {
576
- this._onTouch = fn;
577
- };
578
- /** @internal */
579
- FileUploadComponent.prototype.onDragEnter = function (event) {
580
- event.preventDefault();
581
- event.stopPropagation();
582
- this._overCounter++;
583
- };
584
- /** @internal */
585
- FileUploadComponent.prototype.onDragOver = function (event) {
586
- event.preventDefault();
587
- };
588
- /** @internal */
589
- FileUploadComponent.prototype.onDragLeave = function (event) {
590
- event.preventDefault();
591
- event.stopPropagation();
592
- this._overCounter--;
593
- };
594
- /** @internal */
595
- FileUploadComponent.prototype.onDndDrop = function (event) {
596
- var _a;
597
- event.preventDefault();
598
- event.stopPropagation();
599
- this._onDndStopFrame();
600
- var files = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.files;
601
- if (files === null || files === void 0 ? void 0 : files.length) {
602
- this._uploadFiles(Array.from(files));
603
- }
604
- };
605
- /** Open the file selection dialog */
606
- FileUploadComponent.prototype.selectFiles = function () {
607
- this._fileInput.nativeElement.click();
608
- };
609
- /** @ignore */
610
- FileUploadComponent.prototype._openItem = function (item) {
611
- item.downloadingSubs = this._service.get(item.uploadedItem.id).subscribe(function (blob) {
612
- var url = URL.createObjectURL(blob);
613
- window.open(url, '_blank');
614
- });
615
- };
616
- Object.defineProperty(FileUploadComponent.prototype, "_overFrame", {
617
- /** @ignore */
618
- get: function () {
619
- return this._overFrameCounter > 0;
620
- },
621
- enumerable: false,
622
- configurable: true
623
- });
624
- Object.defineProperty(FileUploadComponent.prototype, "_overDropZone", {
625
- /** @ignore */
626
- get: function () {
627
- return this._overCounter > 0;
628
- },
629
- enumerable: false,
630
- configurable: true
631
- });
632
- Object.defineProperty(FileUploadComponent.prototype, "uploading", {
633
- /** Whether file uploading is in progress */
634
- get: function () {
635
- return this._uploadingItems.some(function (i) { return !i.done; });
636
- },
637
- enumerable: false,
638
- configurable: true
639
- });
640
- Object.defineProperty(FileUploadComponent.prototype, "remaining", {
641
- /** The remaining number of files allowed.*/
642
- get: function () {
643
- return this.limit ? this.limit - this._uploadingItems.length : Infinity;
644
- },
645
- enumerable: false,
646
- configurable: true
647
- });
648
- /** @ignore */
649
- FileUploadComponent.prototype._handleFileSelection = function () {
650
- var fileList = this._fileInput.nativeElement.files;
651
- if (fileList === null || fileList === void 0 ? void 0 : fileList.length) {
652
- this._uploadFiles(Array.from(fileList));
653
- this._fileInput.nativeElement.value = '';
654
- }
655
- };
656
- Object.defineProperty(FileUploadComponent.prototype, "_invalidFilesDragged", {
657
- /** @ignore */
658
- get: function () {
659
- return this._numberOfFilesDragged > this.remaining && (this._overFrame || this._overDropZone);
660
- },
661
- enumerable: false,
662
- configurable: true
663
- });
664
- Object.defineProperty(FileUploadComponent.prototype, "_initialising", {
665
- /** @ignore */
666
- get: function () {
667
- return !!this._initSubs && !this._initSubs.closed;
668
- },
669
- enumerable: false,
670
- configurable: true
671
- });
672
- FileUploadComponent.prototype._uploadFiles = function (files) {
673
- var _this = this;
674
- if (this._initialising || files.length > this.remaining) {
675
- return;
676
- }
677
- var filtered = files.filter(function (f) { return (!f.type || _this._typeRegExps.some(function (regexp) { return f.type.match(regexp); })) &&
678
- !_this._uploadingItems.some(function (i) { return i.name === f.name; }); });
679
- var observables = this._service.upload(filtered);
680
- var items = filtered.map(function (f, i) { return new UploadingItem(observables[i], f, _this._updateItems.bind(_this), _this._deleteItem.bind(_this)); });
681
- this._uploadingItems = __spreadArray(__spreadArray([], __read(this._uploadingItems)), __read(items));
682
- };
683
- FileUploadComponent.prototype._onDndEnterFrame = function (event) {
684
- var _a, _b;
685
- event.preventDefault();
686
- this._numberOfFilesDragged = ((_b = (_a = event.dataTransfer) === null || _a === void 0 ? void 0 : _a.items) === null || _b === void 0 ? void 0 : _b.length) || 0;
687
- this._overFrameCounter++;
688
- };
689
- FileUploadComponent.prototype._onDndLeaveFrame = function () {
690
- this._overFrameCounter--;
691
- };
692
- FileUploadComponent.prototype._onDndStopFrame = function () {
693
- this._overFrameCounter = 0;
694
- this._overCounter = 0;
695
- };
696
- FileUploadComponent.prototype._acceptChange = function (v) {
697
- var _this = this;
698
- this._initSubs = this._service.list().subscribe(function (list) {
699
- _this._uploadingItems = list
700
- .filter(function (i) { return v.includes(i.id); })
701
- .map(function (f) { return new UploadingItem(f, _this._deleteItem.bind(_this)); });
702
- });
703
- };
704
- FileUploadComponent.prototype._updateItems = function () {
705
- var completed = this._uploadingItems.filter(function (i) { return !!i.uploadedItem; });
706
- this._uploadingItems = __spreadArray(__spreadArray([], __read(completed)), __read(this._uploadingItems.filter(function (i) { return !i.uploadedItem; })));
707
- this._updateValue(completed);
708
- };
709
- FileUploadComponent.prototype._deleteItem = function (item) {
710
- var _this = this;
711
- var _a;
712
- var key = (_a = item.uploadedItem) === null || _a === void 0 ? void 0 : _a.id;
713
- if (key) {
714
- this._service.delete(key).subscribe(function () {
715
- _this._uploadingItems = _this._uploadingItems.filter(function (i) { return i !== item; });
716
- var completed = _this._uploadingItems.filter(function (i) { return !!i.uploadedItem; });
717
- _this._updateValue(completed);
718
- });
719
- }
720
- else {
721
- this._uploadingItems = this._uploadingItems.filter(function (i) { return i !== item; });
722
- var completed = this._uploadingItems.filter(function (i) { return !!i.uploadedItem; });
723
- this._updateValue(completed);
724
- }
725
- };
726
- FileUploadComponent.prototype._updateValue = function (completed) {
727
- var completedIds = completed.map(function (c) { return c.uploadedItem.id; });
728
- this._value = completedIds;
729
- if (!this._value.length) {
730
- this._value = null;
731
- }
732
- this._onChange(completedIds);
733
- };
734
- return FileUploadComponent;
735
- }());
736
- FileUploadComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadComponent, deps: [{ token: FileUploadService }], target: i0__namespace.ɵɵFactoryTarget.Component });
737
- FileUploadComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FileUploadComponent, selector: "bui-file-upload", inputs: { uploadActionText: "uploadActionText", fileUploadedLabel: "fileUploadedLabel", dragHint: "dragHint", dropHint: "dropHint", limit: "limit", 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: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return FileUploadComponent; }), multi: true }], viewQueries: [{ propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, read: i0.ElementRef, static: true }], ngImport: i0__namespace, 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</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-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:.5rem 0}:host:not([hidden]) .bui-file-upload-list .bui-file-upload-item-progress .mat-progress-bar{max-width:100%;height:.4rem;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"], components: [{ type: i2__namespace.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i3__namespace.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "mode", "value", "bufferValue"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }, { type: i4__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i5__namespace.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }], directives: [{ type: i6__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i7__namespace.IconDirective, selector: "[buiIcon]", inputs: ["buiIcon", "size", "variant"] }, { type: i6__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i8__namespace.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }], pipes: { "percent": i6__namespace.PercentPipe }, animations: [
738
- animations.trigger('slideOut', [
739
- animations.transition('* => *', [
740
- animations.query(':leave', animations.stagger(100, animations.animate('0.25s', animations.style({ height: 0, overflow: 'hidden' }))), { optional: true })
741
- ])
742
- ])
743
- ] });
744
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadComponent, decorators: [{
745
- type: i0.Component,
746
- args: [{
747
- host: {
748
- class: 'bui-host bui-file-upload',
749
- '[class.bui-dnd-active]': '_overFrame && remaining >= _numberOfFilesDragged',
750
- '[class.bui-dnd-over]': '_overDropZone && remaining >= _numberOfFilesDragged',
751
- '[class.bui-dnd-invalid]': '_invalidFilesDragged'
752
- },
753
- selector: 'bui-file-upload',
754
- templateUrl: './file-upload.component.html',
755
- styleUrls: ['./file-upload.component.scss'],
756
- providers: [{ provide: forms.NG_VALUE_ACCESSOR, useExisting: i0.forwardRef(function () { return FileUploadComponent; }), multi: true }],
757
- animations: [
758
- animations.trigger('slideOut', [
759
- animations.transition('* => *', [
760
- animations.query(':leave', animations.stagger(100, animations.animate('0.25s', animations.style({ height: 0, overflow: 'hidden' }))), { optional: true })
761
- ])
762
- ])
763
- ]
764
- }]
765
- }], ctorParameters: function () { return [{ type: FileUploadService }]; }, propDecorators: { uploadActionText: [{
766
- type: i0.Input
767
- }], fileUploadedLabel: [{
768
- type: i0.Input
769
- }], dragHint: [{
770
- type: i0.Input
771
- }], dropHint: [{
772
- type: i0.Input
773
- }], limit: [{
774
- type: i0.Input
775
- }], types: [{
776
- type: i0.Input
777
- }], _fileInput: [{
778
- type: i0.ViewChild,
779
- args: ['fileInput', { read: i0.ElementRef, static: true }]
780
- }], onDragEnter: [{
781
- type: i0.HostListener,
782
- args: ['dragenter', ['$event']]
783
- }], onDragOver: [{
784
- type: i0.HostListener,
785
- args: ['dragover', ['$event']]
786
- }], onDragLeave: [{
787
- type: i0.HostListener,
788
- args: ['dragleave', ['$event']]
789
- }], onDndDrop: [{
790
- type: i0.HostListener,
791
- args: ['drop', ['$event']]
792
- }] } });
793
-
794
- var FileUploadModule = /** @class */ (function () {
795
- function FileUploadModule() {
796
- }
797
- return FileUploadModule;
798
- }());
799
- FileUploadModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
800
- FileUploadModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadModule, declarations: [FileUploadComponent], imports: [i6.CommonModule,
801
- i2.MatIconModule,
802
- i7.IconFontModule,
803
- i3.MatProgressBarModule,
804
- i4.MatButtonModule,
805
- i5.MatDividerModule,
806
- i8.MatTooltipModule], exports: [FileUploadComponent] });
807
- FileUploadModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadModule, imports: [[
808
- i6.CommonModule,
809
- i2.MatIconModule,
810
- i7.IconFontModule,
811
- i3.MatProgressBarModule,
812
- i4.MatButtonModule,
813
- i5.MatDividerModule,
814
- i8.MatTooltipModule
815
- ]] });
816
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FileUploadModule, decorators: [{
817
- type: i0.NgModule,
818
- args: [{
819
- declarations: [FileUploadComponent],
820
- imports: [
821
- i6.CommonModule,
822
- i2.MatIconModule,
823
- i7.IconFontModule,
824
- i3.MatProgressBarModule,
825
- i4.MatButtonModule,
826
- i5.MatDividerModule,
827
- i8.MatTooltipModule
828
- ],
829
- exports: [FileUploadComponent]
830
- }]
831
- }] });
832
-
833
- /**
834
- * Generated bundle index. Do not edit.
835
- */
836
-
837
- exports.FileUploadComponent = FileUploadComponent;
838
- exports.FileUploadItem = FileUploadItem;
839
- exports.FileUploadModule = FileUploadModule;
840
- exports.FileUploadService = FileUploadService;
841
-
842
- Object.defineProperty(exports, '__esModule', { value: true });
843
-
844
- }));
845
- //# sourceMappingURL=bravura-ui-file-upload.umd.js.map