@bravura/ui 1.21.6 → 2.0.1

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 +19 -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/esm2020/decimal-input/decimal-input.directive.mjs +125 -0
  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 +148 -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} +10 -11
  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} +9 -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.directive.js +0 -124
  228. package/esm2015/decimal-input/decimal-input.module.js +0 -19
  229. package/esm2015/discrete-input/discrete-input.component.js +0 -334
  230. package/esm2015/discrete-input/discrete-input.module.js +0 -21
  231. package/esm2015/file-upload/file-upload.component.js +0 -367
  232. package/esm2015/form-field/form-field.component.js +0 -107
  233. package/esm2015/form-field/form-field.module.js +0 -20
  234. package/esm2015/icon-font/icon-font.module.js +0 -22
  235. package/esm2015/phone-number/phone-number.directive.js +0 -192
  236. package/esm2015/phone-number/phone-number.module.js +0 -24
  237. package/esm2015/radio-panel/radio-panel-item.component.js +0 -109
  238. package/esm2015/radio-panel/radio-panel.component.js +0 -98
  239. package/esm2015/radio-panel/radio-panel.module.js +0 -25
  240. package/esm2015/selection-panel/selection-panel-item.component.js +0 -174
  241. package/esm2015/selection-panel/selection-panel.directive.js +0 -120
  242. package/esm2015/selection-panel/selection-panel.module.js +0 -23
  243. package/esm2015/skeletons/skeleton-loader-presets.directive.js +0 -83
  244. package/esm2015/skeletons/skeletons.module.js +0 -35
  245. package/esm2015/stepper/stepper-animation.js +0 -23
  246. package/esm2015/stepper/stepper.component.js +0 -181
  247. package/esm2015/tooltip/tooltip.component.js +0 -59
  248. package/esm2015/tooltip/tooltip.module.js +0 -26
  249. package/fesm2015/bravura-ui-alert.js +0 -337
  250. package/fesm2015/bravura-ui-alert.js.map +0 -1
  251. package/fesm2015/bravura-ui-behavior.js.map +0 -1
  252. package/fesm2015/bravura-ui-common.js.map +0 -1
  253. package/fesm2015/bravura-ui-currency-input.js.map +0 -1
  254. package/fesm2015/bravura-ui-decimal-input.js.map +0 -1
  255. package/fesm2015/bravura-ui-discrete-input.js.map +0 -1
  256. package/fesm2015/bravura-ui-file-upload.js +0 -443
  257. package/fesm2015/bravura-ui-file-upload.js.map +0 -1
  258. package/fesm2015/bravura-ui-form-field.js.map +0 -1
  259. package/fesm2015/bravura-ui-icon-font.js.map +0 -1
  260. package/fesm2015/bravura-ui-phone-number.js.map +0 -1
  261. package/fesm2015/bravura-ui-radio-panel.js +0 -230
  262. package/fesm2015/bravura-ui-radio-panel.js.map +0 -1
  263. package/fesm2015/bravura-ui-selection-panel.js.map +0 -1
  264. package/fesm2015/bravura-ui-skeletons.js.map +0 -1
  265. package/fesm2015/bravura-ui-stepper.js.map +0 -1
  266. package/fesm2015/bravura-ui-tooltip.js.map +0 -1
  267. package/fesm2015/bravura-ui.js.map +0 -1
  268. package/file-upload/package.json +0 -10
  269. package/form-field/package.json +0 -10
  270. package/icon-font/package.json +0 -10
  271. package/phone-number/package.json +0 -10
  272. package/radio-panel/package.json +0 -10
  273. package/selection-panel/package.json +0 -10
  274. package/skeletons/package.json +0 -10
  275. package/stepper/package.json +0 -10
  276. package/tooltip/package.json +0 -10
@@ -1,788 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/cdk/coercion'), require('@angular/common'), require('@angular/core'), require('rxjs/operators'), require('@angular/material/progress-spinner'), require('@angular/material/button')) :
3
- typeof define === 'function' && define.amd ? define('@bravura/ui/behavior', ['exports', '@angular/cdk/coercion', '@angular/common', '@angular/core', 'rxjs/operators', '@angular/material/progress-spinner', '@angular/material/button'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.bravura = global.bravura || {}, global.bravura.ui = global.bravura.ui || {}, global.bravura.ui.behavior = {}), global.ng.cdk.coercion, global.ng.common, global.ng.core, global.rxjs.operators, global.ng.material.progressSpinner, global.ng.material.button));
5
- })(this, (function (exports, coercion, common, i0, operators, progressSpinner, i1) { '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 i1__namespace = /*#__PURE__*/_interopNamespace(i1);
27
-
28
- /******************************************************************************
29
- Copyright (c) Microsoft Corporation.
30
-
31
- Permission to use, copy, modify, and/or distribute this software for any
32
- purpose with or without fee is hereby granted.
33
-
34
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
35
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
37
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
38
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
39
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
40
- PERFORMANCE OF THIS SOFTWARE.
41
- ***************************************************************************** */
42
- /* global Reflect, Promise */
43
- var extendStatics = function (d, b) {
44
- extendStatics = Object.setPrototypeOf ||
45
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
46
- function (d, b) { for (var p in b)
47
- if (Object.prototype.hasOwnProperty.call(b, p))
48
- d[p] = b[p]; };
49
- return extendStatics(d, b);
50
- };
51
- function __extends(d, b) {
52
- if (typeof b !== "function" && b !== null)
53
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
54
- extendStatics(d, b);
55
- function __() { this.constructor = d; }
56
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57
- }
58
- var __assign = function () {
59
- __assign = Object.assign || function __assign(t) {
60
- for (var s, i = 1, n = arguments.length; i < n; i++) {
61
- s = arguments[i];
62
- for (var p in s)
63
- if (Object.prototype.hasOwnProperty.call(s, p))
64
- t[p] = s[p];
65
- }
66
- return t;
67
- };
68
- return __assign.apply(this, arguments);
69
- };
70
- function __rest(s, e) {
71
- var t = {};
72
- for (var p in s)
73
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
74
- t[p] = s[p];
75
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
76
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
77
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
78
- t[p[i]] = s[p[i]];
79
- }
80
- return t;
81
- }
82
- function __decorate(decorators, target, key, desc) {
83
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
84
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
85
- r = Reflect.decorate(decorators, target, key, desc);
86
- else
87
- for (var i = decorators.length - 1; i >= 0; i--)
88
- if (d = decorators[i])
89
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
90
- return c > 3 && r && Object.defineProperty(target, key, r), r;
91
- }
92
- function __param(paramIndex, decorator) {
93
- return function (target, key) { decorator(target, key, paramIndex); };
94
- }
95
- function __metadata(metadataKey, metadataValue) {
96
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
97
- return Reflect.metadata(metadataKey, metadataValue);
98
- }
99
- function __awaiter(thisArg, _arguments, P, generator) {
100
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
101
- return new (P || (P = Promise))(function (resolve, reject) {
102
- function fulfilled(value) { try {
103
- step(generator.next(value));
104
- }
105
- catch (e) {
106
- reject(e);
107
- } }
108
- function rejected(value) { try {
109
- step(generator["throw"](value));
110
- }
111
- catch (e) {
112
- reject(e);
113
- } }
114
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
115
- step((generator = generator.apply(thisArg, _arguments || [])).next());
116
- });
117
- }
118
- function __generator(thisArg, body) {
119
- var _ = { label: 0, sent: function () { if (t[0] & 1)
120
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
121
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
122
- function verb(n) { return function (v) { return step([n, v]); }; }
123
- function step(op) {
124
- if (f)
125
- throw new TypeError("Generator is already executing.");
126
- while (_)
127
- try {
128
- 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)
129
- return t;
130
- if (y = 0, t)
131
- op = [op[0] & 2, t.value];
132
- switch (op[0]) {
133
- case 0:
134
- case 1:
135
- t = op;
136
- break;
137
- case 4:
138
- _.label++;
139
- return { value: op[1], done: false };
140
- case 5:
141
- _.label++;
142
- y = op[1];
143
- op = [0];
144
- continue;
145
- case 7:
146
- op = _.ops.pop();
147
- _.trys.pop();
148
- continue;
149
- default:
150
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
151
- _ = 0;
152
- continue;
153
- }
154
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
155
- _.label = op[1];
156
- break;
157
- }
158
- if (op[0] === 6 && _.label < t[1]) {
159
- _.label = t[1];
160
- t = op;
161
- break;
162
- }
163
- if (t && _.label < t[2]) {
164
- _.label = t[2];
165
- _.ops.push(op);
166
- break;
167
- }
168
- if (t[2])
169
- _.ops.pop();
170
- _.trys.pop();
171
- continue;
172
- }
173
- op = body.call(thisArg, _);
174
- }
175
- catch (e) {
176
- op = [6, e];
177
- y = 0;
178
- }
179
- finally {
180
- f = t = 0;
181
- }
182
- if (op[0] & 5)
183
- throw op[1];
184
- return { value: op[0] ? op[1] : void 0, done: true };
185
- }
186
- }
187
- var __createBinding = Object.create ? (function (o, m, k, k2) {
188
- if (k2 === undefined)
189
- k2 = k;
190
- var desc = Object.getOwnPropertyDescriptor(m, k);
191
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
192
- desc = { enumerable: true, get: function () { return m[k]; } };
193
- }
194
- Object.defineProperty(o, k2, desc);
195
- }) : (function (o, m, k, k2) {
196
- if (k2 === undefined)
197
- k2 = k;
198
- o[k2] = m[k];
199
- });
200
- function __exportStar(m, o) {
201
- for (var p in m)
202
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
203
- __createBinding(o, m, p);
204
- }
205
- function __values(o) {
206
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
207
- if (m)
208
- return m.call(o);
209
- if (o && typeof o.length === "number")
210
- return {
211
- next: function () {
212
- if (o && i >= o.length)
213
- o = void 0;
214
- return { value: o && o[i++], done: !o };
215
- }
216
- };
217
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
218
- }
219
- function __read(o, n) {
220
- var m = typeof Symbol === "function" && o[Symbol.iterator];
221
- if (!m)
222
- return o;
223
- var i = m.call(o), r, ar = [], e;
224
- try {
225
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
226
- ar.push(r.value);
227
- }
228
- catch (error) {
229
- e = { error: error };
230
- }
231
- finally {
232
- try {
233
- if (r && !r.done && (m = i["return"]))
234
- m.call(i);
235
- }
236
- finally {
237
- if (e)
238
- throw e.error;
239
- }
240
- }
241
- return ar;
242
- }
243
- /** @deprecated */
244
- function __spread() {
245
- for (var ar = [], i = 0; i < arguments.length; i++)
246
- ar = ar.concat(__read(arguments[i]));
247
- return ar;
248
- }
249
- /** @deprecated */
250
- function __spreadArrays() {
251
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
252
- s += arguments[i].length;
253
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
254
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
255
- r[k] = a[j];
256
- return r;
257
- }
258
- function __spreadArray(to, from, pack) {
259
- if (pack || arguments.length === 2)
260
- for (var i = 0, l = from.length, ar; i < l; i++) {
261
- if (ar || !(i in from)) {
262
- if (!ar)
263
- ar = Array.prototype.slice.call(from, 0, i);
264
- ar[i] = from[i];
265
- }
266
- }
267
- return to.concat(ar || Array.prototype.slice.call(from));
268
- }
269
- function __await(v) {
270
- return this instanceof __await ? (this.v = v, this) : new __await(v);
271
- }
272
- function __asyncGenerator(thisArg, _arguments, generator) {
273
- if (!Symbol.asyncIterator)
274
- throw new TypeError("Symbol.asyncIterator is not defined.");
275
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
276
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
277
- function verb(n) { if (g[n])
278
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
279
- function resume(n, v) { try {
280
- step(g[n](v));
281
- }
282
- catch (e) {
283
- settle(q[0][3], e);
284
- } }
285
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
286
- function fulfill(value) { resume("next", value); }
287
- function reject(value) { resume("throw", value); }
288
- function settle(f, v) { if (f(v), q.shift(), q.length)
289
- resume(q[0][0], q[0][1]); }
290
- }
291
- function __asyncDelegator(o) {
292
- var i, p;
293
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
294
- 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; }
295
- }
296
- function __asyncValues(o) {
297
- if (!Symbol.asyncIterator)
298
- throw new TypeError("Symbol.asyncIterator is not defined.");
299
- var m = o[Symbol.asyncIterator], i;
300
- 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);
301
- 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); }); }; }
302
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
303
- }
304
- function __makeTemplateObject(cooked, raw) {
305
- if (Object.defineProperty) {
306
- Object.defineProperty(cooked, "raw", { value: raw });
307
- }
308
- else {
309
- cooked.raw = raw;
310
- }
311
- return cooked;
312
- }
313
- ;
314
- var __setModuleDefault = Object.create ? (function (o, v) {
315
- Object.defineProperty(o, "default", { enumerable: true, value: v });
316
- }) : function (o, v) {
317
- o["default"] = v;
318
- };
319
- function __importStar(mod) {
320
- if (mod && mod.__esModule)
321
- return mod;
322
- var result = {};
323
- if (mod != null)
324
- for (var k in mod)
325
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
326
- __createBinding(result, mod, k);
327
- __setModuleDefault(result, mod);
328
- return result;
329
- }
330
- function __importDefault(mod) {
331
- return (mod && mod.__esModule) ? mod : { default: mod };
332
- }
333
- function __classPrivateFieldGet(receiver, state, kind, f) {
334
- if (kind === "a" && !f)
335
- throw new TypeError("Private accessor was defined without a getter");
336
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
337
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
338
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
339
- }
340
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
341
- if (kind === "m")
342
- throw new TypeError("Private method is not writable");
343
- if (kind === "a" && !f)
344
- throw new TypeError("Private accessor was defined without a setter");
345
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
346
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
347
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
348
- }
349
- function __classPrivateFieldIn(state, receiver) {
350
- if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
351
- throw new TypeError("Cannot use 'in' operator on non-object");
352
- return typeof state === "function" ? receiver === state : state.has(receiver);
353
- }
354
-
355
- /**
356
- * Use this directive to designate a target HTML element, based on which the child elements'
357
- * `[buiSizing]` directives will calculate the sizes.
358
- *
359
- * ```html
360
- * <div [buiSizingMonitor]>
361
- * <div [buiSizing]="...">
362
- * </div>
363
- * <div>
364
- * <div [buiSizing]="...">
365
- * </div>
366
- * </div>
367
- * <div>
368
- * ```
369
- */
370
- var SizingMonitorDirective = /** @class */ (function () {
371
- function SizingMonitorDirective(element) {
372
- this.element = element;
373
- }
374
- return SizingMonitorDirective;
375
- }());
376
- SizingMonitorDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SizingMonitorDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
377
- SizingMonitorDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SizingMonitorDirective, selector: "[buiSizingMonitor]", ngImport: i0__namespace });
378
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SizingMonitorDirective, decorators: [{
379
- type: i0.Directive,
380
- args: [{
381
- selector: '[buiSizingMonitor]'
382
- }]
383
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; } });
384
-
385
- /**
386
- * This directive monitors the changes in the width of the `sizingBy` target, and apply specified style
387
- * classes and/or inline styles to the current element dynamically.
388
- *
389
- * In order for the layout engine to efficiently calculate and stabilize the dimensions, the effective style property
390
- * `box-sizing` of the `sizingBy` target element must be set to `border-box`.
391
- *
392
- * The directive uses [ResizeObserver API](https://developer.mozilla.org/en-US/docs/Web/API/Resize_Observer_API)
393
- * to capture the events of element resizing. Please use a polyfill if you want to support older browsers
394
- * that do not implement ResizeObserver API.
395
- *
396
- * Examples:
397
- *
398
- * ```html
399
- * <div #parentElement>
400
- * <div [buiSizing]="{'400': 'small', '800': 'medium', '~': 'large'}" [buiSizingBy]="parentElement"></div>
401
- * <div [buiSizing]="['small', 'medium', 'large']" [buiSizingBy]="'root'"></div>
402
- * <div [buiSizing]="{'650': 'border-color: #28569', '~': 'bg-muted; border-style: dotted'}" [buiSizingBy]="parentElement"></div>
403
- * </div>
404
- * ```
405
- */
406
- var SizingDirective = /** @class */ (function () {
407
- function SizingDirective(_doc, _defaultTarget, elemRef, _zone) {
408
- this._doc = _doc;
409
- this._defaultTarget = _defaultTarget;
410
- this._zone = _zone;
411
- /**
412
- * Specifies the breakpoint widths and the style classes.
413
- *
414
- * The sizing spec `{"400": "small", "800": "medium", "~": "large"}` tells the directive to apply
415
- * a style class `small` when the width of the monitored target is smaller than 400 pixels,
416
- * `medium` when the width is between 400 and 800 pixels, and `large` when above.
417
- *
418
- * @example {'400': 'small', '800': 'medium', '~': 'large'}
419
- */
420
- this.buiSizing = {};
421
- /**
422
- * The alias of `buiSizingBy`.
423
- * @default 'root'
424
- * @deprecated
425
- * @ignore
426
- */
427
- this.sizingBy = 'root';
428
- /**
429
- * Emits `{width, height}` when the monitor target element resizes.
430
- *
431
- * Note that the dimensions emitted are of the [sizingBy] target, but not the current element.
432
- */
433
- this.buiResized = new i0.EventEmitter();
434
- /**
435
- * Recalculate the height of this element according to the height of the monitored target.
436
- */
437
- this.buiFixedHeight = false;
438
- this._sizingSpec = {};
439
- this._width = 0;
440
- this._height = 0;
441
- this._reflowFrameCount = 0;
442
- this._element = elemRef.nativeElement;
443
- this._monitorTarget = this._element;
444
- }
445
- Object.defineProperty(SizingDirective.prototype, "buiSizingBy", {
446
- /**
447
- * Designate an element to be monitored for recalculating the style classes of the current element.
448
- *
449
- * - `root` specifies the document root or the enclosing shadow host. This is the default value.
450
- * - `parent` specifies the parent element.
451
- *
452
- * @default 'root'
453
- * @alias sizingBy
454
- */
455
- get: function () {
456
- return this.sizingBy;
457
- },
458
- set: function (target) {
459
- this.sizingBy = target;
460
- },
461
- enumerable: false,
462
- configurable: true
463
- });
464
- SizingDirective.prototype.ngOnChanges = function (_) {
465
- var _this = this;
466
- var disconnected = this._element.getRootNode() instanceof HTMLElement;
467
- if (disconnected) {
468
- // defer shadow detection till dom connection event
469
- this._zone.onStable.pipe(operators.debounceTime(10), operators.take(1)).subscribe(function () { return _this._initOrReset(); });
470
- }
471
- else {
472
- this._initOrReset();
473
- }
474
- };
475
- SizingDirective.prototype.ngOnDestroy = function () {
476
- this._tearDownNodeMonitor();
477
- };
478
- SizingDirective.prototype._initOrReset = function () {
479
- var _this = this;
480
- var originalTarget = this._monitorTarget;
481
- if (this.buiSizingBy instanceof HTMLElement) {
482
- this._monitorTarget = this.buiSizingBy;
483
- }
484
- else if (this._defaultTarget) {
485
- this._monitorTarget = this._defaultTarget.element.nativeElement;
486
- }
487
- else if (this.buiSizingBy === 'root') {
488
- var root = this._element.getRootNode();
489
- if (root instanceof ShadowRoot) {
490
- this._monitorTarget = root.host;
491
- }
492
- else {
493
- this._monitorTarget = this._doc.documentElement;
494
- }
495
- }
496
- else {
497
- this._monitorTarget = this._element.parentElement;
498
- }
499
- if (this._monitorTarget != originalTarget) {
500
- this._setUpNodeMonitor();
501
- }
502
- this._sizingSpec = {};
503
- var spec = this.buiSizing;
504
- if (typeof spec === 'string') {
505
- spec = spec.split(',').map(function (k) { return k.trim(); });
506
- }
507
- if (Array.isArray(spec)) {
508
- spec.forEach(function (c, i) {
509
- _this._sizingSpec[SizingDirective.defaultSizingBreakpoints[i] || '~'] = c;
510
- });
511
- }
512
- else if (spec) {
513
- this._sizingSpec = spec;
514
- }
515
- this.buiFixedHeight = coercion.coerceBooleanProperty(this.buiFixedHeight);
516
- this._calculateSize();
517
- };
518
- SizingDirective.prototype._setUpNodeMonitor = function () {
519
- var _this = this;
520
- this._tearDownNodeMonitor();
521
- if (this._monitorTarget) {
522
- this._observer = new ResizeObserver(function () { return _this._calculateSize(); });
523
- this._observer.observe(this._monitorTarget, { box: 'border-box' });
524
- }
525
- };
526
- SizingDirective.prototype._tearDownNodeMonitor = function () {
527
- if (this._observer) {
528
- this._observer.disconnect();
529
- this._observer = undefined;
530
- }
531
- };
532
- SizingDirective.prototype._calculateSize = function () {
533
- var e_1, _a;
534
- var _this = this;
535
- var widthChanged = this._width !== this._monitorTarget.clientWidth;
536
- var heightChanged = this._height !== this._monitorTarget.clientHeight;
537
- if (widthChanged) {
538
- this._width = this._monitorTarget.clientWidth;
539
- var bks = Object.keys(this._sizingSpec).sort(function (a, b) { return _this._toNumber(a) - _this._toNumber(b); });
540
- var found = false;
541
- try {
542
- for (var bks_1 = __values(bks), bks_1_1 = bks_1.next(); !bks_1_1.done; bks_1_1 = bks_1.next()) {
543
- var key = bks_1_1.value;
544
- var classesOrStyles = this._sizingSpec[key].split(/;+/).filter(function (c) { return c; });
545
- this._removeClassesOrStyles(classesOrStyles);
546
- var expectedWidth = this._toNumber(key);
547
- if (this._width <= expectedWidth && !found) {
548
- this._applyClassesOrStyles(classesOrStyles);
549
- found = true;
550
- }
551
- }
552
- }
553
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
554
- finally {
555
- try {
556
- if (bks_1_1 && !bks_1_1.done && (_a = bks_1.return)) _a.call(bks_1);
557
- }
558
- finally { if (e_1) throw e_1.error; }
559
- }
560
- }
561
- if (widthChanged || heightChanged) {
562
- this._height = this._monitorTarget.clientHeight;
563
- if (this.buiFixedHeight) {
564
- this._reflowFrameCount = 0;
565
- this._reflowHeight();
566
- }
567
- setTimeout(function () { return _this._zone.run(function () { return _this.buiResized.emit({ width: _this._width, height: _this._height }); }); });
568
- }
569
- };
570
- SizingDirective.prototype._applyClassesOrStyles = function (clsOrStyles) {
571
- var _this = this;
572
- clsOrStyles.forEach(function (s) {
573
- var _a;
574
- if (s.includes(':')) {
575
- var _b = __read(s.split(':'), 2), prop = _b[0], val = _b[1];
576
- _this._element.style.setProperty(prop.trim(), val.trim());
577
- }
578
- else {
579
- var classes = s.split(/\s+/).filter(function (c) { return c; });
580
- if (classes.length) {
581
- (_a = _this._element.classList).add.apply(_a, __spreadArray([], __read(classes)));
582
- }
583
- }
584
- });
585
- };
586
- SizingDirective.prototype._removeClassesOrStyles = function (clsOrStyles) {
587
- var _this = this;
588
- clsOrStyles.forEach(function (s) {
589
- var _a;
590
- if (s.includes(':')) {
591
- var _b = __read(s.split(':'), 1), prop = _b[0];
592
- _this._element.style.removeProperty(prop);
593
- }
594
- else {
595
- var classes = s.split(/\s+/).filter(function (c) { return c; });
596
- if (classes.length) {
597
- (_a = _this._element.classList).remove.apply(_a, __spreadArray([], __read(classes)));
598
- }
599
- }
600
- });
601
- };
602
- SizingDirective.prototype._reflowHeight = function () {
603
- var cnt = this._reflowFrameCount;
604
- if (cnt < 15) {
605
- requestAnimationFrame(this._reflowHeight.bind(this));
606
- if (cnt === 0) {
607
- this._element.style.height = '0';
608
- }
609
- else if (cnt === 14) {
610
- var gt = parseInt(getComputedStyle(this._monitorTarget).getPropertyValue('padding-top').replace(/px$/, '') || '0', 10);
611
- var gb = parseInt(getComputedStyle(this._monitorTarget).getPropertyValue('padding-bottom').replace(/px$/, '') || '0', 10);
612
- this._element.style.height = this._height - gt - gb - 5 + "px";
613
- }
614
- }
615
- this._reflowFrameCount++;
616
- };
617
- SizingDirective.prototype._toNumber = function (s) {
618
- return (s === '~' ? Infinity : Number(s)) || -Infinity;
619
- };
620
- return SizingDirective;
621
- }());
622
- /**
623
- * @ignore
624
- */
625
- SizingDirective.defaultSizingBreakpoints = ['400', '800', '~'];
626
- SizingDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SizingDirective, deps: [{ token: common.DOCUMENT }, { token: SizingMonitorDirective, optional: true }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Directive });
627
- SizingDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SizingDirective, selector: "[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]", inputs: { buiSizing: "buiSizing", sizingBy: "sizingBy", buiSizingBy: "buiSizingBy", buiFixedHeight: "buiFixedHeight" }, outputs: { buiResized: "buiResized" }, usesOnChanges: true, ngImport: i0__namespace });
628
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SizingDirective, decorators: [{
629
- type: i0.Directive,
630
- args: [{
631
- selector: '[buiSizing],[buiResized],[buiSizingBy],[buiFixedHeight]'
632
- }]
633
- }], ctorParameters: function () {
634
- return [{ type: Document, decorators: [{
635
- type: i0.Inject,
636
- args: [common.DOCUMENT]
637
- }] }, { type: SizingMonitorDirective, decorators: [{
638
- type: i0.Optional
639
- }] }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }];
640
- }, propDecorators: { buiSizing: [{
641
- type: i0.Input
642
- }], sizingBy: [{
643
- type: i0.Input
644
- }], buiSizingBy: [{
645
- type: i0.Input
646
- }], buiResized: [{
647
- type: i0.Output
648
- }], buiFixedHeight: [{
649
- type: i0.Input
650
- }] } });
651
-
652
- /**
653
- * Use this directive on a `MatButton` element to provide an alternative view when an sync operation is in progress.
654
- *
655
- * For example:
656
- *
657
- * ```
658
- * <button (click)="submit();" [buiAwait]="submitSubscription" buiAwaitAriaLabel="submitting">Submit</button>
659
- * ```
660
- *
661
- * Please refer to [Material Design](https://material.io/components/progress-indicators#circular-progress-indicators)
662
- * for more details of integrating circular spinner component with action buttons.
663
- *
664
- * The operation is considered 'in progress' when the bound property `buiAwait` evaluates to
665
- *
666
- * - `true`; or
667
- * - an instance of `rxjs/Subscription` and `buiAwait.closed` is falsy
668
- *
669
- * When in progress
670
- *
671
- * - the button's caption will be hidden;
672
- * - a `<mat-progress-spinner>` will be displayed in place of the caption;
673
- * - the button will be disabled by setting the property `disabled` of the `MatButton` instance.
674
- */
675
- var AwaitDirective = /** @class */ (function () {
676
- function AwaitDirective(_eRef, button, doc, factoryResolver, _viewCont) {
677
- this._eRef = _eRef;
678
- this.button = button;
679
- this.doc = doc;
680
- this._viewCont = _viewCont;
681
- /** The ARIA label to be put on the spinner. The default value is `"In progress"`. */
682
- this.buiAwaitAriaLabel = 'In progress';
683
- /** The diameter of the in-progress spinner. The default value is `20`. */
684
- this.buiAwaitDiameter = 20;
685
- this._processing = false;
686
- if (!button) {
687
- console.error('[buiAwait] can only be used on a MatButton');
688
- return;
689
- }
690
- this._factory = factoryResolver.resolveComponentFactory(progressSpinner.MatProgressSpinner);
691
- }
692
- /** @ignore */
693
- AwaitDirective.prototype.ngAfterViewInit = function () {
694
- if (this.button) {
695
- this._overlayEl = this.doc.createElement('div');
696
- this._eRef.nativeElement.appendChild(this._overlayEl);
697
- this._overlayEl.classList.add('bui-await-overlay');
698
- this._overlayEl.style.cssText =
699
- 'display:flex; position:absolute; top:0; right:0; bottom:0; left:0; align-items: center; justify-content: center';
700
- this._captionWrapper = this._eRef.nativeElement.querySelector('.mat-button-wrapper');
701
- }
702
- };
703
- /** @ignore */
704
- AwaitDirective.prototype.ngDoCheck = function () {
705
- var inProgress = this.buiAwait === true || (typeof this.buiAwait === 'object' && !this.buiAwait.closed);
706
- if (inProgress !== this._processing) {
707
- this._processing = inProgress;
708
- this._statusChanged();
709
- }
710
- };
711
- AwaitDirective.prototype._statusChanged = function () {
712
- if (this.button) {
713
- this.button.disabled = this._processing;
714
- if (this._processing) {
715
- this._spinnerRef = this._viewCont.createComponent(this._factory);
716
- var c = this._spinnerRef.instance;
717
- c.diameter = this.buiAwaitDiameter;
718
- c.mode = 'indeterminate';
719
- c.color = this.button.color;
720
- var e = this._spinnerRef.location.nativeElement;
721
- e.setAttribute('aria-label', this.buiAwaitAriaLabel);
722
- this._overlayEl.appendChild(e);
723
- this._captionWrapper.style.visibility = 'hidden';
724
- }
725
- else {
726
- this._captionWrapper.style.visibility = '';
727
- this._spinnerRef.destroy();
728
- this._overlayEl.innerHTML = '';
729
- }
730
- }
731
- };
732
- return AwaitDirective;
733
- }());
734
- AwaitDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AwaitDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace.MatButton, optional: true }, { token: common.DOCUMENT }, { token: i0__namespace.ComponentFactoryResolver }, { token: i0__namespace.ViewContainerRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
735
- AwaitDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: AwaitDirective, selector: "[buiAwait]", inputs: { buiAwait: "buiAwait", buiAwaitAriaLabel: "buiAwaitAriaLabel", buiAwaitDiameter: "buiAwaitDiameter" }, ngImport: i0__namespace });
736
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: AwaitDirective, decorators: [{
737
- type: i0.Directive,
738
- args: [{
739
- selector: '[buiAwait]'
740
- }]
741
- }], ctorParameters: function () {
742
- return [{ type: i0__namespace.ElementRef }, { type: i1__namespace.MatButton, decorators: [{
743
- type: i0.Optional
744
- }] }, { type: Document, decorators: [{
745
- type: i0.Inject,
746
- args: [common.DOCUMENT]
747
- }] }, { type: i0__namespace.ComponentFactoryResolver }, { type: i0__namespace.ViewContainerRef }];
748
- }, propDecorators: { buiAwait: [{
749
- type: i0.Input
750
- }], buiAwaitAriaLabel: [{
751
- type: i0.Input
752
- }], buiAwaitDiameter: [{
753
- type: i0.Input
754
- }] } });
755
-
756
- /**
757
- * For functionality that cannot be easily achieved via CSS.
758
- */
759
- var BehaviorModule = /** @class */ (function () {
760
- function BehaviorModule() {
761
- }
762
- return BehaviorModule;
763
- }());
764
- BehaviorModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BehaviorModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
765
- BehaviorModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BehaviorModule, declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective], imports: [common.CommonModule, i1.MatButtonModule, progressSpinner.MatProgressSpinnerModule], exports: [SizingDirective, SizingMonitorDirective, AwaitDirective, progressSpinner.MatProgressSpinnerModule] });
766
- BehaviorModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BehaviorModule, imports: [[common.CommonModule, i1.MatButtonModule, progressSpinner.MatProgressSpinnerModule], progressSpinner.MatProgressSpinnerModule] });
767
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: BehaviorModule, decorators: [{
768
- type: i0.NgModule,
769
- args: [{
770
- declarations: [SizingDirective, SizingMonitorDirective, AwaitDirective],
771
- imports: [common.CommonModule, i1.MatButtonModule, progressSpinner.MatProgressSpinnerModule],
772
- exports: [SizingDirective, SizingMonitorDirective, AwaitDirective, progressSpinner.MatProgressSpinnerModule]
773
- }]
774
- }] });
775
-
776
- /**
777
- * Generated bundle index. Do not edit.
778
- */
779
-
780
- exports.AwaitDirective = AwaitDirective;
781
- exports.BehaviorModule = BehaviorModule;
782
- exports.SizingDirective = SizingDirective;
783
- exports.SizingMonitorDirective = SizingMonitorDirective;
784
-
785
- Object.defineProperty(exports, '__esModule', { value: true });
786
-
787
- }));
788
- //# sourceMappingURL=bravura-ui-behavior.umd.js.map