@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
@@ -0,0 +1,306 @@
1
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
2
+ import * as i0 from '@angular/core';
3
+ import { InjectionToken, Component, ChangeDetectionStrategy, Inject, Input, ViewChild, forwardRef, Directive, ContentChildren, NgModule } from '@angular/core';
4
+ import * as i4 from '@angular/material/core';
5
+ import { MatRipple, MatRippleModule } from '@angular/material/core';
6
+ import * as i1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import * as i2 from '@angular/material/checkbox';
9
+ import { MatCheckboxModule } from '@angular/material/checkbox';
10
+ import * as i3 from '@angular/forms';
11
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
12
+ import * as i5 from '@angular/cdk/observers';
13
+ import { ObserversModule } from '@angular/cdk/observers';
14
+
15
+ /**
16
+ * @ignore
17
+ */
18
+ const SELECTION_PANEL_GROUP = new InjectionToken('SelectionPanelItemGroup');
19
+ /**
20
+ * Use `bui-selection-panel-item` within a `bui-selection-panel` to display an option.
21
+ */
22
+ class SelectionPanelItemComponent {
23
+ constructor(_group, _cd) {
24
+ this._group = _group;
25
+ this._cd = _cd;
26
+ /**
27
+ * This will be displayed as the panel header
28
+ */
29
+ this.title = '';
30
+ /**
31
+ * Show the header in with a shaded background
32
+ */
33
+ this.shadedHeader = false;
34
+ /**
35
+ * when false will hide the checkbox
36
+ */
37
+ this.selectable = true;
38
+ this.empty = true;
39
+ this._disabled = false;
40
+ }
41
+ /** Whether the option is disabled. */
42
+ get disabled() {
43
+ return this._disabled || this._group._isDisabled;
44
+ }
45
+ set disabled(value) {
46
+ this._setDisabled(coerceBooleanProperty(value));
47
+ }
48
+ /** The value of this option. */
49
+ get value() {
50
+ return this._value;
51
+ }
52
+ set value(value) {
53
+ if (this._value !== value) {
54
+ this._value = value;
55
+ this._cd.markForCheck();
56
+ }
57
+ }
58
+ /** Whether this option is checked. */
59
+ get checked() {
60
+ return this._group._selection.includes(this.value);
61
+ }
62
+ set checked(value) {
63
+ if (!this._group._onTouched) {
64
+ setTimeout(() => this._setChecked(value), 0);
65
+ }
66
+ else {
67
+ this._setChecked(value);
68
+ }
69
+ }
70
+ /** Theme color of the radio button. */
71
+ get color() {
72
+ return this._color || this._group.color;
73
+ }
74
+ set color(newValue) {
75
+ this._color = newValue;
76
+ }
77
+ get _selectByHeader() {
78
+ return this._group.selectByHeader;
79
+ }
80
+ /** @ignore */
81
+ _markInteracted() {
82
+ if (this._group._onTouched) {
83
+ this._group._onTouched();
84
+ }
85
+ }
86
+ /** @ignore */
87
+ _notify() {
88
+ this._cd.markForCheck();
89
+ }
90
+ /** Toggle selection programmatically */
91
+ toggle() {
92
+ this.checked = !this.checked;
93
+ }
94
+ /** @ignore */
95
+ _contentClicked(event) {
96
+ if (!this._selectByHeader && this.selectable) {
97
+ this._ripple?.launch(event.clientX, event.clientY);
98
+ this.toggle();
99
+ }
100
+ }
101
+ /** @ignore */
102
+ contentChanged() {
103
+ const el = this._bodyContent?.nativeElement;
104
+ this.empty = (el?.childElementCount || 0) === 0 && (el?.textContent || '') === '';
105
+ }
106
+ /** @ignore */
107
+ ngAfterContentInit() {
108
+ this.contentChanged();
109
+ }
110
+ /** Sets the disabled state and marks for check if a change occurred. */
111
+ _setDisabled(value) {
112
+ if (this._disabled !== value) {
113
+ this._disabled = value;
114
+ this._cd.markForCheck();
115
+ }
116
+ }
117
+ _setChecked(value) {
118
+ const newCheckedState = coerceBooleanProperty(value);
119
+ const old = this._group._selection.includes(this.value);
120
+ if (old !== newCheckedState) {
121
+ const contained = this._group._selection.some(v => v === this._value);
122
+ if (newCheckedState && this._group && !contained) {
123
+ this._group._selection = [...this._group._selection, this._value];
124
+ }
125
+ else if (!newCheckedState && this._group && contained) {
126
+ // When unchecking the selected item, update the selection
127
+ // property on the group.
128
+ this._group._selection = this._group._selection.filter(v => v !== this._value);
129
+ }
130
+ this._cd.markForCheck();
131
+ }
132
+ }
133
+ }
134
+ SelectionPanelItemComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelItemComponent, deps: [{ token: SELECTION_PANEL_GROUP }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
135
+ SelectionPanelItemComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: SelectionPanelItemComponent, selector: "bui-selection-panel-item", inputs: { title: "title", shadedHeader: "shadedHeader", selectable: "selectable", disabled: "disabled", value: "value", checked: "checked", color: "color" }, host: { properties: { "class.bui-selection-checked": "checked", "class.bui-border-accent": "checked && color ==='accent'", "class.bui-border-primary": "checked && color ==='primary'", "class.bui-border-warn": "checked && color ==='warn'", "class.bui-disabled": "disabled", "class.bui-unselectable": "!selectable" }, classAttribute: "bui-selection-panel-item" }, viewQueries: [{ propertyName: "_bodyContent", first: true, predicate: ["contentBody"], descendants: true, static: true }, { propertyName: "_ripple", first: true, predicate: MatRipple, descendants: true }], ngImport: i0, template: "<div class=\"bui-selection-panel-item-wrapper\">\n\t<div\n\t\tmatRipple\n\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\tclass=\"bui-ripple\"\n\t\t*ngIf=\"!disabled\"\n\t\t[matRippleTrigger]=\"toggleTrigger\"\n\t\t#ripple=\"matRipple\"\n\t\t[matRippleDisabled]=\"!selectable\"\n\t></div>\n\t<div\n\t\tclass=\"bui-selection-panel-item-header\"\n\t\t[ngClass]=\"{ 'bui-shaded': shadedHeader, 'bui-empty': empty }\"\n\t\t#toggleTrigger\n\t>\n\t\t<div\n\t\t\t*ngIf=\"shadedHeader\"\n\t\t\tclass=\"bui-selection-panel-item-header-underlay\"\n\t\t\t[ngClass]=\"{ 'bui-not-empty': !empty }\"\n\t\t></div>\n\t\t<div class=\"bui-selection-panel-item-header-container\">\n\t\t\t<mat-checkbox\n\t\t\t\t*ngIf=\"selectable; else noselectable\"\n\t\t\t\t[(ngModel)]=\"checked\"\n\t\t\t\t[color]=\"color\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"_markInteracted()\"\n\t\t\t\tstyle=\"flex-grow: 1\"\n\t\t\t>\n\t\t\t\t<div class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</mat-checkbox>\n\t\t\t<ng-template #noselectable>\n\t\t\t\t<div style=\"flex-grow: 1\" class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</ng-template>\n\t\t\t<ng-content select=\"[buiSelectionItemHeadingEnd]\"></ng-content>\n\t\t</div>\n\t\t<ng-content select=\"[buiSelectionItemSubtitle]\"></ng-content>\n\t</div>\n\t<div\n\t\t#contentBody\n\t\tclass=\"bui-selection-panel-item-content\"\n\t\t[class.bui-selectable]=\"!_selectByHeader\"\n\t\t(click)=\"_contentClicked($event)\"\n\t\t(cdkObserveContent)=\"contentChanged()\"\n\t>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"bui-selection-panel-item-bottom\"></div>\n</div>\n", styles: [":host{position:relative;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px}:host .bui-selection-panel-item-wrapper{padding-left:1rem;padding-right:1rem}:host .bui-ripple{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}:host .bui-selection-panel-item-header{margin-top:calc(1rem - 4px);margin-bottom:calc(1rem - 4px);align-items:center;position:relative}:host .bui-selection-panel-item-header.bui-shaded:not(.bui-empty){margin-bottom:calc(2rem + 4px)}:host .bui-selection-panel-item-header-container{display:flex}:host .bui-selection-panel-item-header-container .mat-checkbox{z-index:1}:host .bui-selection-panel-item-title{font-size:larger;font-weight:700;white-space:normal;margin-top:2px}:host .bui-selection-panel-item-content{margin-top:calc(2px + 1rem);margin-bottom:1rem}:host .bui-selection-panel-item-header-underlay{position:absolute;top:calc(3px - 1rem);left:calc(-1px - 1rem);right:calc(-1px - 1rem);bottom:calc(-3px - 1rem);border-radius:5px;background-color:#80808026}:host .bui-selection-panel-item-header-underlay.bui-not-empty{border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not(:first-child)){margin-top:1rem}:host(:not([hidden])){display:block}:host(:not(.bui-disabled,.bui-unselectable)):hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled,.bui-unselectable)) .bui-selection-panel-item-content.bui-selectable{cursor:pointer}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.MatRipple, selector: "[mat-ripple], [matRipple]", inputs: ["matRippleColor", "matRippleUnbounded", "matRippleCentered", "matRippleRadius", "matRippleAnimation", "matRippleDisabled", "matRippleTrigger"], exportAs: ["matRipple"] }, { kind: "directive", type: i5.CdkObserveContent, selector: "[cdkObserveContent]", inputs: ["cdkObserveContentDisabled", "debounce"], outputs: ["cdkObserveContent"], exportAs: ["cdkObserveContent"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
136
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelItemComponent, decorators: [{
137
+ type: Component,
138
+ args: [{ selector: 'bui-selection-panel-item', changeDetection: ChangeDetectionStrategy.OnPush, host: {
139
+ class: 'bui-selection-panel-item',
140
+ '[class.bui-selection-checked]': 'checked',
141
+ '[class.bui-border-accent]': `checked && color ==='accent'`,
142
+ '[class.bui-border-primary]': `checked && color ==='primary'`,
143
+ '[class.bui-border-warn]': `checked && color ==='warn'`,
144
+ '[class.bui-disabled]': 'disabled',
145
+ '[class.bui-unselectable]': '!selectable'
146
+ }, template: "<div class=\"bui-selection-panel-item-wrapper\">\n\t<div\n\t\tmatRipple\n\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\tclass=\"bui-ripple\"\n\t\t*ngIf=\"!disabled\"\n\t\t[matRippleTrigger]=\"toggleTrigger\"\n\t\t#ripple=\"matRipple\"\n\t\t[matRippleDisabled]=\"!selectable\"\n\t></div>\n\t<div\n\t\tclass=\"bui-selection-panel-item-header\"\n\t\t[ngClass]=\"{ 'bui-shaded': shadedHeader, 'bui-empty': empty }\"\n\t\t#toggleTrigger\n\t>\n\t\t<div\n\t\t\t*ngIf=\"shadedHeader\"\n\t\t\tclass=\"bui-selection-panel-item-header-underlay\"\n\t\t\t[ngClass]=\"{ 'bui-not-empty': !empty }\"\n\t\t></div>\n\t\t<div class=\"bui-selection-panel-item-header-container\">\n\t\t\t<mat-checkbox\n\t\t\t\t*ngIf=\"selectable; else noselectable\"\n\t\t\t\t[(ngModel)]=\"checked\"\n\t\t\t\t[color]=\"color\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"_markInteracted()\"\n\t\t\t\tstyle=\"flex-grow: 1\"\n\t\t\t>\n\t\t\t\t<div class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</mat-checkbox>\n\t\t\t<ng-template #noselectable>\n\t\t\t\t<div style=\"flex-grow: 1\" class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</ng-template>\n\t\t\t<ng-content select=\"[buiSelectionItemHeadingEnd]\"></ng-content>\n\t\t</div>\n\t\t<ng-content select=\"[buiSelectionItemSubtitle]\"></ng-content>\n\t</div>\n\t<div\n\t\t#contentBody\n\t\tclass=\"bui-selection-panel-item-content\"\n\t\t[class.bui-selectable]=\"!_selectByHeader\"\n\t\t(click)=\"_contentClicked($event)\"\n\t\t(cdkObserveContent)=\"contentChanged()\"\n\t>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"bui-selection-panel-item-bottom\"></div>\n</div>\n", styles: [":host{position:relative;border-radius:5px;border:1px solid rgba(128,128,128,.2);padding:1px}:host .bui-selection-panel-item-wrapper{padding-left:1rem;padding-right:1rem}:host .bui-ripple{position:absolute;top:0;right:0;bottom:0;left:0;z-index:-1}:host .bui-selection-panel-item-header{margin-top:calc(1rem - 4px);margin-bottom:calc(1rem - 4px);align-items:center;position:relative}:host .bui-selection-panel-item-header.bui-shaded:not(.bui-empty){margin-bottom:calc(2rem + 4px)}:host .bui-selection-panel-item-header-container{display:flex}:host .bui-selection-panel-item-header-container .mat-checkbox{z-index:1}:host .bui-selection-panel-item-title{font-size:larger;font-weight:700;white-space:normal;margin-top:2px}:host .bui-selection-panel-item-content{margin-top:calc(2px + 1rem);margin-bottom:1rem}:host .bui-selection-panel-item-header-underlay{position:absolute;top:calc(3px - 1rem);left:calc(-1px - 1rem);right:calc(-1px - 1rem);bottom:calc(-3px - 1rem);border-radius:5px;background-color:#80808026}:host .bui-selection-panel-item-header-underlay.bui-not-empty{border-bottom-left-radius:0;border-bottom-right-radius:0}:host(:not(:first-child)){margin-top:1rem}:host(:not([hidden])){display:block}:host(:not(.bui-disabled,.bui-unselectable)):hover{border-width:2px;padding:0;border-color:#8080804d}:host(:not(.bui-disabled,.bui-unselectable)) .bui-selection-panel-item-content.bui-selectable{cursor:pointer}\n"] }]
147
+ }], ctorParameters: function () { return [{ type: undefined, decorators: [{
148
+ type: Inject,
149
+ args: [SELECTION_PANEL_GROUP]
150
+ }] }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { title: [{
151
+ type: Input
152
+ }], shadedHeader: [{
153
+ type: Input
154
+ }], selectable: [{
155
+ type: Input
156
+ }], disabled: [{
157
+ type: Input
158
+ }], value: [{
159
+ type: Input
160
+ }], checked: [{
161
+ type: Input
162
+ }], color: [{
163
+ type: Input
164
+ }], _bodyContent: [{
165
+ type: ViewChild,
166
+ args: ['contentBody', { static: true }]
167
+ }], _ripple: [{
168
+ type: ViewChild,
169
+ args: [MatRipple]
170
+ }] } });
171
+
172
+ /**
173
+ * Selection panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)
174
+ * that display a set of multi-selection items as bordered panels, in a similar fashion as Radio Panel `bui-radio-panel`.
175
+ *
176
+ * Accessibility features are not yet fully implemented.
177
+ *
178
+ * Example:
179
+ *
180
+ * ```html
181
+ * <bui-selection-panel>
182
+ * <bui-selection-panel-item *ngFor="let obj of objects" [value]="obj">{{obj.description}}</bui-selection-panel-item>
183
+ * </bui-selection-panel>
184
+ * ```
185
+ *
186
+ */
187
+ class SelectionPanelDirective {
188
+ constructor(_cd) {
189
+ this._cd = _cd;
190
+ /**
191
+ * When set to `false`, the selection is triggered by click everywhere within the panels that is
192
+ * not focus-trapping; otherwise, only clicking on the header will activate the selection.
193
+ *
194
+ * @default true
195
+ */
196
+ this.selectByHeader = true;
197
+ /** @ignore */
198
+ this._isDisabled = false;
199
+ this._selected = [];
200
+ }
201
+ /**
202
+ * @ignore
203
+ * The selected values. Used by the child elements to modify the group's value
204
+ */
205
+ get _selection() {
206
+ return this._selected;
207
+ }
208
+ set _selection(value) {
209
+ if (value !== this._selected) {
210
+ this._selected = value;
211
+ if (this._onChange) {
212
+ this._onChange(this._selected);
213
+ }
214
+ this._cd.markForCheck();
215
+ }
216
+ }
217
+ /**
218
+ * @ignore
219
+ */
220
+ writeValue(obj) {
221
+ this._selected = [];
222
+ if (Array.isArray(obj)) {
223
+ this._selected.push(...obj);
224
+ }
225
+ else if (obj !== null && obj !== undefined) {
226
+ this._selected.push(obj);
227
+ }
228
+ this._items?.forEach(it => it._notify());
229
+ }
230
+ /**
231
+ * @ignore
232
+ */
233
+ registerOnChange(fn) {
234
+ this._onChange = fn;
235
+ }
236
+ /**
237
+ * @ignore
238
+ */
239
+ registerOnTouched(fn) {
240
+ this._onTouched = fn;
241
+ }
242
+ /**
243
+ * Sets the disabled state and marks for check if a change occurred.
244
+ * @ignore
245
+ */
246
+ setDisabledState(isDisabled) {
247
+ if (this._isDisabled !== isDisabled) {
248
+ this._isDisabled = isDisabled;
249
+ this._cd.markForCheck();
250
+ this._items.forEach(it => it._notify());
251
+ }
252
+ }
253
+ /** @ignore */
254
+ ngOnChanges(changes) {
255
+ if (this._items) {
256
+ if (changes.color || changes.selectByHeader) {
257
+ this._items.forEach(item => item._notify());
258
+ }
259
+ }
260
+ }
261
+ }
262
+ SelectionPanelDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelDirective, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
263
+ SelectionPanelDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: SelectionPanelDirective, selector: "bui-selection-panel", inputs: { color: "color", selectByHeader: "selectByHeader" }, host: { classAttribute: "bui-selection-panel bui-host" }, providers: [
264
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectionPanelDirective), multi: true },
265
+ { provide: SELECTION_PANEL_GROUP, useExisting: forwardRef(() => SelectionPanelDirective) }
266
+ ], queries: [{ propertyName: "_items", predicate: SelectionPanelItemComponent, descendants: true }], exportAs: ["buiSelectionPanel"], usesOnChanges: true, ngImport: i0 });
267
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelDirective, decorators: [{
268
+ type: Directive,
269
+ args: [{
270
+ selector: 'bui-selection-panel',
271
+ providers: [
272
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectionPanelDirective), multi: true },
273
+ { provide: SELECTION_PANEL_GROUP, useExisting: forwardRef(() => SelectionPanelDirective) }
274
+ ],
275
+ exportAs: 'buiSelectionPanel',
276
+ host: { class: 'bui-selection-panel bui-host' }
277
+ }]
278
+ }], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { color: [{
279
+ type: Input
280
+ }], selectByHeader: [{
281
+ type: Input
282
+ }], _items: [{
283
+ type: ContentChildren,
284
+ args: [SelectionPanelItemComponent, { descendants: true }]
285
+ }] } });
286
+
287
+ class SelectionPanelModule {
288
+ }
289
+ SelectionPanelModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
290
+ SelectionPanelModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelModule, declarations: [SelectionPanelDirective, SelectionPanelItemComponent], imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule], exports: [SelectionPanelDirective, SelectionPanelItemComponent] });
291
+ SelectionPanelModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelModule, imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule] });
292
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SelectionPanelModule, decorators: [{
293
+ type: NgModule,
294
+ args: [{
295
+ declarations: [SelectionPanelDirective, SelectionPanelItemComponent],
296
+ imports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule],
297
+ exports: [SelectionPanelDirective, SelectionPanelItemComponent]
298
+ }]
299
+ }] });
300
+
301
+ /**
302
+ * Generated bundle index. Do not edit.
303
+ */
304
+
305
+ export { SelectionPanelDirective, SelectionPanelItemComponent, SelectionPanelModule };
306
+ //# sourceMappingURL=bravura-ui-selection-panel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bravura-ui-selection-panel.mjs","sources":["../../../projects/ui/selection-panel/selection-panel-item.component.ts","../../../projects/ui/selection-panel/selection-panel-item.component.html","../../../projects/ui/selection-panel/selection-panel.directive.ts","../../../projects/ui/selection-panel/selection-panel.module.ts","../../../projects/ui/selection-panel/bravura-ui-selection-panel.ts"],"sourcesContent":["import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n\tAfterContentInit,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tInject,\n\tInjectionToken,\n\tInput,\n\tViewChild\n} from '@angular/core';\nimport { MatRipple, ThemePalette } from '@angular/material/core';\n\n/**\n * @ignore\n */\nexport interface SelectionPanelItemGroup {\n\t_selection: any[];\n\tcolor: ThemePalette;\n\t_isDisabled: boolean;\n\t_onTouched?: () => void;\n\tselectByHeader: boolean;\n}\n\n/**\n * @ignore\n */\nexport const SELECTION_PANEL_GROUP = new InjectionToken<SelectionPanelItemGroup>('SelectionPanelItemGroup');\n\n/**\n * Use `bui-selection-panel-item` within a `bui-selection-panel` to display an option.\n */\n@Component({\n\tselector: 'bui-selection-panel-item',\n\ttemplateUrl: './selection-panel-item.component.html',\n\tstyleUrls: ['./selection-panel-item.component.scss'],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\tclass: 'bui-selection-panel-item',\n\t\t'[class.bui-selection-checked]': 'checked',\n\t\t'[class.bui-border-accent]': `checked && color ==='accent'`,\n\t\t'[class.bui-border-primary]': `checked && color ==='primary'`,\n\t\t'[class.bui-border-warn]': `checked && color ==='warn'`,\n\t\t'[class.bui-disabled]': 'disabled',\n\t\t'[class.bui-unselectable]': '!selectable'\n\t}\n})\nexport class SelectionPanelItemComponent implements AfterContentInit {\n\t/** @ignore */\n\tstatic ngAcceptInputType_disabled: boolean | string;\n\n\t/** @ignore */\n\tstatic ngAcceptInputType_checked: boolean | string;\n\n\t/**\n\t * This will be displayed as the panel header\n\t */\n\t@Input()\n\ttitle = '';\n\n\t/**\n\t * Show the header in with a shaded background\n\t */\n\t@Input()\n\tshadedHeader = false;\n\n\t/**\n\t * when false will hide the checkbox\n\t */\n\t@Input()\n\tselectable = true;\n\n\t/** Whether the option is disabled. */\n\t@Input()\n\tget disabled(): boolean {\n\t\treturn this._disabled || this._group._isDisabled;\n\t}\n\tset disabled(value: boolean) {\n\t\tthis._setDisabled(coerceBooleanProperty(value));\n\t}\n\n\t/** The value of this option. */\n\t@Input()\n\tget value(): any {\n\t\treturn this._value;\n\t}\n\tset value(value: any) {\n\t\tif (this._value !== value) {\n\t\t\tthis._value = value;\n\t\t\tthis._cd.markForCheck();\n\t\t}\n\t}\n\n\t/** Whether this option is checked. */\n\t@Input()\n\tget checked(): boolean {\n\t\treturn this._group._selection.includes(this.value);\n\t}\n\tset checked(value: boolean) {\n\t\tif (!this._group._onTouched) {\n\t\t\tsetTimeout(() => this._setChecked(value), 0);\n\t\t} else {\n\t\t\tthis._setChecked(value);\n\t\t}\n\t}\n\n\t/** Theme color of the radio button. */\n\t@Input()\n\tget color(): ThemePalette {\n\t\treturn this._color || this._group.color;\n\t}\n\tset color(newValue: ThemePalette) {\n\t\tthis._color = newValue;\n\t}\n\n\tget _selectByHeader(): boolean {\n\t\treturn this._group.selectByHeader;\n\t}\n\n\tempty: boolean = true;\n\n\tprivate _color: ThemePalette;\n\tprivate _disabled = false;\n\tprivate _value: any;\n\n\t@ViewChild('contentBody', { static: true })\n\tprivate _bodyContent?: ElementRef<any>;\n\n\t@ViewChild(MatRipple)\n\tprivate _ripple?: MatRipple;\n\n\tconstructor(@Inject(SELECTION_PANEL_GROUP) private _group: SelectionPanelItemGroup, private _cd: ChangeDetectorRef) {}\n\n\t/** @ignore */\n\t_markInteracted() {\n\t\tif (this._group._onTouched) {\n\t\t\tthis._group._onTouched();\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_notify() {\n\t\tthis._cd.markForCheck();\n\t}\n\n\t/** Toggle selection programmatically */\n\ttoggle() {\n\t\tthis.checked = !this.checked;\n\t}\n\n\t/** @ignore */\n\t_contentClicked(event: MouseEvent) {\n\t\tif (!this._selectByHeader && this.selectable) {\n\t\t\tthis._ripple?.launch(event.clientX, event.clientY);\n\t\t\tthis.toggle();\n\t\t}\n\t}\n\n\t/** @ignore */\n\tcontentChanged() {\n\t\tconst el: HTMLElement = this._bodyContent?.nativeElement;\n\t\tthis.empty = (el?.childElementCount || 0) === 0 && (el?.textContent || '') === '';\n\t}\n\n\t/** @ignore */\n\tngAfterContentInit() {\n\t\tthis.contentChanged();\n\t}\n\n\t/** Sets the disabled state and marks for check if a change occurred. */\n\tprivate _setDisabled(value: boolean) {\n\t\tif (this._disabled !== value) {\n\t\t\tthis._disabled = value;\n\t\t\tthis._cd.markForCheck();\n\t\t}\n\t}\n\n\tprivate _setChecked(value: boolean) {\n\t\tconst newCheckedState = coerceBooleanProperty(value);\n\t\tconst old = this._group._selection.includes(this.value);\n\t\tif (old !== newCheckedState) {\n\t\t\tconst contained = this._group._selection.some(v => v === this._value);\n\t\t\tif (newCheckedState && this._group && !contained) {\n\t\t\t\tthis._group._selection = [...this._group._selection, this._value];\n\t\t\t} else if (!newCheckedState && this._group && contained) {\n\t\t\t\t// When unchecking the selected item, update the selection\n\t\t\t\t// property on the group.\n\t\t\t\tthis._group._selection = this._group._selection.filter(v => v !== this._value);\n\t\t\t}\n\t\t\tthis._cd.markForCheck();\n\t\t}\n\t}\n}\n","<div class=\"bui-selection-panel-item-wrapper\">\n\t<div\n\t\tmatRipple\n\t\tmatRippleColor=\"rgba(128,128,128,.1)\"\n\t\tclass=\"bui-ripple\"\n\t\t*ngIf=\"!disabled\"\n\t\t[matRippleTrigger]=\"toggleTrigger\"\n\t\t#ripple=\"matRipple\"\n\t\t[matRippleDisabled]=\"!selectable\"\n\t></div>\n\t<div\n\t\tclass=\"bui-selection-panel-item-header\"\n\t\t[ngClass]=\"{ 'bui-shaded': shadedHeader, 'bui-empty': empty }\"\n\t\t#toggleTrigger\n\t>\n\t\t<div\n\t\t\t*ngIf=\"shadedHeader\"\n\t\t\tclass=\"bui-selection-panel-item-header-underlay\"\n\t\t\t[ngClass]=\"{ 'bui-not-empty': !empty }\"\n\t\t></div>\n\t\t<div class=\"bui-selection-panel-item-header-container\">\n\t\t\t<mat-checkbox\n\t\t\t\t*ngIf=\"selectable; else noselectable\"\n\t\t\t\t[(ngModel)]=\"checked\"\n\t\t\t\t[color]=\"color\"\n\t\t\t\t[disabled]=\"disabled\"\n\t\t\t\t(change)=\"_markInteracted()\"\n\t\t\t\tstyle=\"flex-grow: 1\"\n\t\t\t>\n\t\t\t\t<div class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</mat-checkbox>\n\t\t\t<ng-template #noselectable>\n\t\t\t\t<div style=\"flex-grow: 1\" class=\"bui-selection-panel-item-title\" [innerHTML]=\"title\"></div>\n\t\t\t</ng-template>\n\t\t\t<ng-content select=\"[buiSelectionItemHeadingEnd]\"></ng-content>\n\t\t</div>\n\t\t<ng-content select=\"[buiSelectionItemSubtitle]\"></ng-content>\n\t</div>\n\t<div\n\t\t#contentBody\n\t\tclass=\"bui-selection-panel-item-content\"\n\t\t[class.bui-selectable]=\"!_selectByHeader\"\n\t\t(click)=\"_contentClicked($event)\"\n\t\t(cdkObserveContent)=\"contentChanged()\"\n\t>\n\t\t<ng-content></ng-content>\n\t</div>\n\t<div class=\"bui-selection-panel-item-bottom\"></div>\n</div>\n","import {\n\tChangeDetectorRef,\n\tContentChildren,\n\tDirective,\n\tforwardRef,\n\tInput,\n\tOnChanges,\n\tQueryList,\n\tSimpleChanges\n} from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ThemePalette } from '@angular/material/core';\nimport {\n\tSelectionPanelItemComponent,\n\tSelectionPanelItemGroup,\n\tSELECTION_PANEL_GROUP\n} from './selection-panel-item.component';\n\n/**\n * Selection panel is a [control value accessor](https://angular.io/api/forms/ControlValueAccessor)\n * that display a set of multi-selection items as bordered panels, in a similar fashion as Radio Panel `bui-radio-panel`.\n *\n * Accessibility features are not yet fully implemented.\n *\n * Example:\n *\n * ```html\n * <bui-selection-panel>\n * <bui-selection-panel-item *ngFor=\"let obj of objects\" [value]=\"obj\">{{obj.description}}</bui-selection-panel-item>\n * </bui-selection-panel>\n * ```\n *\n */\n@Directive({\n\tselector: 'bui-selection-panel',\n\tproviders: [\n\t\t{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectionPanelDirective), multi: true },\n\t\t{ provide: SELECTION_PANEL_GROUP, useExisting: forwardRef(() => SelectionPanelDirective) }\n\t],\n\texportAs: 'buiSelectionPanel',\n\thost: { class: 'bui-selection-panel bui-host' }\n})\nexport class SelectionPanelDirective implements ControlValueAccessor, SelectionPanelItemGroup, OnChanges {\n\t/** Theme color for all of the selection checkboxes in the group. */\n\t@Input() color: ThemePalette;\n\n\t/**\n\t * When set to `false`, the selection is triggered by click everywhere within the panels that is\n\t * not focus-trapping; otherwise, only clicking on the header will activate the selection.\n\t *\n\t * @default true\n\t */\n\t@Input() selectByHeader = true;\n\n\t/**\n\t * @ignore\n\t * The selected values. Used by the child elements to modify the group's value\n\t */\n\tget _selection(): any[] {\n\t\treturn this._selected;\n\t}\n\tset _selection(value: any[]) {\n\t\tif (value !== this._selected) {\n\t\t\tthis._selected = value;\n\t\t\tif (this._onChange) {\n\t\t\t\tthis._onChange(this._selected);\n\t\t\t}\n\t\t\tthis._cd.markForCheck();\n\t\t}\n\t}\n\n\t/** @ignore */\n\t_onTouched?: () => void;\n\n\t/** @ignore */\n\t_isDisabled = false;\n\n\tprivate _onChange?: (_: any) => void;\n\n\tprivate _selected: any[] = [];\n\n\t@ContentChildren(SelectionPanelItemComponent, { descendants: true })\n\tprivate _items!: QueryList<SelectionPanelItemComponent>;\n\n\tconstructor(private _cd: ChangeDetectorRef) {}\n\n\t/**\n\t * @ignore\n\t */\n\twriteValue(obj: any): void {\n\t\tthis._selected = [];\n\t\tif (Array.isArray(obj)) {\n\t\t\tthis._selected.push(...obj);\n\t\t} else if (obj !== null && obj !== undefined) {\n\t\t\tthis._selected.push(obj);\n\t\t}\n\t\tthis._items?.forEach(it => it._notify());\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tregisterOnChange(fn: (_: any) => void): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * @ignore\n\t */\n\tregisterOnTouched(fn: () => void): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Sets the disabled state and marks for check if a change occurred.\n\t * @ignore\n\t */\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tif (this._isDisabled !== isDisabled) {\n\t\t\tthis._isDisabled = isDisabled;\n\t\t\tthis._cd.markForCheck();\n\t\t\tthis._items.forEach(it => it._notify());\n\t\t}\n\t}\n\n\t/** @ignore */\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (this._items) {\n\t\t\tif (changes.color || changes.selectByHeader) {\n\t\t\t\tthis._items.forEach(item => item._notify());\n\t\t\t}\n\t\t}\n\t}\n}\n","import { ObserversModule } from '@angular/cdk/observers';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FormsModule } from '@angular/forms';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatRippleModule } from '@angular/material/core';\nimport { SelectionPanelItemComponent } from './selection-panel-item.component';\nimport { SelectionPanelDirective } from './selection-panel.directive';\n\n@NgModule({\n\tdeclarations: [SelectionPanelDirective, SelectionPanelItemComponent],\n\timports: [CommonModule, MatCheckboxModule, FormsModule, MatRippleModule, ObserversModule],\n\texports: [SelectionPanelDirective, SelectionPanelItemComponent]\n})\nexport class SelectionPanelModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAyBA;;AAEG;AACI,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAA0B,yBAAyB,CAAC,CAAC;AAE5G;;AAEG;MAgBU,2BAA2B,CAAA;IAoFvC,WAAmD,CAAA,MAA+B,EAAU,GAAsB,EAAA;QAA/D,IAAM,CAAA,MAAA,GAAN,MAAM,CAAyB;QAAU,IAAG,CAAA,GAAA,GAAH,GAAG,CAAmB;AA7ElH;;AAEG;QAEH,IAAK,CAAA,KAAA,GAAG,EAAE,CAAC;AAEX;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;AAErB;;AAEG;QAEH,IAAU,CAAA,UAAA,GAAG,IAAI,CAAC;QAiDlB,IAAK,CAAA,KAAA,GAAY,IAAI,CAAC;QAGd,IAAS,CAAA,SAAA,GAAG,KAAK,CAAC;KAS4F;;AA1DtH,IAAA,IACI,QAAQ,GAAA;QACX,OAAO,IAAI,CAAC,SAAS,IAAI,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC;KACjD;IACD,IAAI,QAAQ,CAAC,KAAc,EAAA;QAC1B,IAAI,CAAC,YAAY,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC,CAAC;KAChD;;AAGD,IAAA,IACI,KAAK,GAAA;QACR,OAAO,IAAI,CAAC,MAAM,CAAC;KACnB;IACD,IAAI,KAAK,CAAC,KAAU,EAA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EAAA,CAAA;sBADb,eAAe;AAAC,gBAAA,IAAA,EAAA,CAAA,2BAA2B,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;;;MCnEvD,oBAAoB,CAAA;;iHAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,iBAJjB,uBAAuB,EAAE,2BAA2B,CAAA,EAAA,OAAA,EAAA,CACzD,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,CAC9E,EAAA,OAAA,EAAA,CAAA,uBAAuB,EAAE,2BAA2B,CAAA,EAAA,CAAA,CAAA;kHAElD,oBAAoB,EAAA,OAAA,EAAA,CAHtB,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,CAAA,EAAA,CAAA,CAAA;2FAG5E,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBALhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,YAAY,EAAE,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;oBACpE,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,EAAE,WAAW,EAAE,eAAe,EAAE,eAAe,CAAC;AACzF,oBAAA,OAAO,EAAE,CAAC,uBAAuB,EAAE,2BAA2B,CAAC;AAC/D,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
@@ -65,9 +65,9 @@ class SkeletonLoaderComponent extends ContentLoaderComponent {
65
65
  }
66
66
  }
67
67
  }
68
- SkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonLoaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Directionality }], target: i0.ɵɵFactoryTarget.Component });
69
- SkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkeletonLoaderComponent, selector: "bui-skeleton", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
70
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonLoaderComponent, decorators: [{
68
+ SkeletonLoaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonLoaderComponent, deps: [{ token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1.Directionality }], target: i0.ɵɵFactoryTarget.Component });
69
+ SkeletonLoaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: SkeletonLoaderComponent, selector: "bui-skeleton", usesInheritance: true, usesOnChanges: true, ngImport: i0, template: '', isInline: true });
70
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonLoaderComponent, decorators: [{
71
71
  type: Component,
72
72
  args: [{ selector: 'bui-skeleton', template: '' }]
73
73
  }], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1.Directionality }]; } });
@@ -130,7 +130,7 @@ class SkeletonLoaderPresetsDirective {
130
130
  constructor(_skeletonComponent, _elementRef, _presetList) {
131
131
  this._skeletonComponent = _skeletonComponent;
132
132
  this._elementRef = _elementRef;
133
- this._allPresets = _presetList.reduce((p, c) => (Object.assign(Object.assign({}, p), c)), {});
133
+ this._allPresets = _presetList.reduce((p, c) => ({ ...p, ...c }), {});
134
134
  }
135
135
  ngAfterViewChecked() {
136
136
  const preset = this._allPresets[(this.preset || '')];
@@ -141,9 +141,9 @@ class SkeletonLoaderPresetsDirective {
141
141
  }
142
142
  }
143
143
  }
144
- SkeletonLoaderPresetsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonLoaderPresetsDirective, deps: [{ token: SkeletonLoaderComponent, host: true }, { token: i0.ElementRef }, { token: SKELETON_PRESETS }], target: i0.ɵɵFactoryTarget.Directive });
145
- SkeletonLoaderPresetsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkeletonLoaderPresetsDirective, selector: "bui-skeleton[preset]", inputs: { preset: "preset" }, ngImport: i0 });
146
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonLoaderPresetsDirective, decorators: [{
144
+ SkeletonLoaderPresetsDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonLoaderPresetsDirective, deps: [{ token: SkeletonLoaderComponent, host: true }, { token: i0.ElementRef }, { token: SKELETON_PRESETS }], target: i0.ɵɵFactoryTarget.Directive });
145
+ SkeletonLoaderPresetsDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.1.3", type: SkeletonLoaderPresetsDirective, selector: "bui-skeleton[preset]", inputs: { preset: "preset" }, ngImport: i0 });
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonLoaderPresetsDirective, decorators: [{
147
147
  type: Directive,
148
148
  args: [{
149
149
  selector: 'bui-skeleton[preset]'
@@ -168,14 +168,14 @@ class SkeletonsModule {
168
168
  static forConfig(config) {
169
169
  return {
170
170
  ngModule: SkeletonsModule,
171
- providers: [provideSkeletonPresets((config === null || config === void 0 ? void 0 : config.presets) || {}), provideSkeletonPresets(DEFAULT_PRESETS)]
171
+ providers: [provideSkeletonPresets(config?.presets || {}), provideSkeletonPresets(DEFAULT_PRESETS)]
172
172
  };
173
173
  }
174
174
  }
175
- SkeletonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
176
- SkeletonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonsModule, declarations: [SkeletonLoaderComponent, SkeletonLoaderPresetsDirective], imports: [CommonModule, ContentLoaderModule, BuiCommonModule], exports: [ContentLoaderModule, BuiCommonModule, SkeletonLoaderComponent, SkeletonLoaderPresetsDirective] });
177
- SkeletonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonsModule, providers: [provideSkeletonPresets(DEFAULT_PRESETS)], imports: [[CommonModule, ContentLoaderModule, BuiCommonModule], ContentLoaderModule, BuiCommonModule] });
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: SkeletonsModule, decorators: [{
175
+ SkeletonsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
176
+ SkeletonsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: SkeletonsModule, declarations: [SkeletonLoaderComponent, SkeletonLoaderPresetsDirective], imports: [CommonModule, ContentLoaderModule, BuiCommonModule], exports: [ContentLoaderModule, BuiCommonModule, SkeletonLoaderComponent, SkeletonLoaderPresetsDirective] });
177
+ SkeletonsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonsModule, providers: [provideSkeletonPresets(DEFAULT_PRESETS)], imports: [CommonModule, ContentLoaderModule, BuiCommonModule, ContentLoaderModule, BuiCommonModule] });
178
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: SkeletonsModule, decorators: [{
179
179
  type: NgModule,
180
180
  args: [{
181
181
  declarations: [SkeletonLoaderComponent, SkeletonLoaderPresetsDirective],
@@ -190,4 +190,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImpo
190
190
  */
191
191
 
192
192
  export { DEFAULT_PRESETS, SKELETON_PRESETS, SkeletonLoaderComponent, SkeletonLoaderPresetsDirective, SkeletonsModule };
193
- //# sourceMappingURL=bravura-ui-skeletons.js.map
193
+ //# sourceMappingURL=bravura-ui-skeletons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bravura-ui-skeletons.mjs","sources":["../../../projects/ui/skeletons/skeleton-loader.component.ts","../../../projects/ui/skeletons/skeleton-loader-presets.directive.ts","../../../projects/ui/skeletons/skeletons.module.ts","../../../projects/ui/skeletons/bravura-ui-skeletons.ts"],"sourcesContent":["import { Directionality } from '@angular/cdk/bidi';\nimport { ChangeDetectorRef, Component, ElementRef, OnChanges, OnDestroy, SimpleChanges } from '@angular/core';\nimport { ContentLoaderComponent } from '@ngneat/content-loader';\nimport { Subject } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\n/**\n * Use the [Create React Content Loader](https://skeletonreact.com/) to create your custom skeleton loaders;\n *\n * Add the resulting `svg` elements as the content children of a `<bui-skeleton>` component.\n *\n * The component `bui-skeleton` extends `content-loader` from [ngneat/content-loader](https://github.com/ngneat/content-loader).\n *\n * You can also choose from one of the presets registered by the `SKELETON_PRESETS` injection token.\n *\n * The following code snippets demonstrate how to register a preset:\n *\n * ```typescript\n * @import {SkeletonsModule} from '@bravura/ui/skeletons';\n * @import htmlWithSvgElements from './custom-loader1.html';\n *\n * @NgModule({\n * imports: [SkeletonsModule.forConfig({ presets: {\n * custom1: { viewBox: '0 0 400 100', content: htmlWithSvgElements }\n * }})]\n * })\n * export class MyModule {}\n * ```\n *\n * custom-loader1.html:\n *\n * ```html\n * <rect x=\"50\" y=\"6\" rx=\"4\" ry=\"4\" width=\"343\" height=\"38\" />\n * <rect x=\"8\" y=\"6\" rx=\"4\" ry=\"4\" width=\"35\" height=\"38\" />\n * ```\n */\n@Component({ selector: 'bui-skeleton', template: '' })\nexport class SkeletonLoaderComponent extends ContentLoaderComponent implements OnChanges, OnDestroy {\n\tprivate _destroyed$ = new Subject<void>();\n\n\tconstructor(elemRef: ElementRef<HTMLElement>, private _cdRef: ChangeDetectorRef, private _dir: Directionality) {\n\t\tsuper();\n\n\t\telemRef.nativeElement.classList.add('bui-host');\n\t\tthis.backgroundColor = 'rgba(128,128,128,0.2)';\n\t\tthis.foregroundColor = 'rgba(128,128,128,0.1)';\n\t\tthis.rtl = this._dir.value === 'rtl';\n\t\tthis._dir.change.pipe(takeUntil(this._destroyed$)).subscribe(v => {\n\t\t\tthis.style = {};\n\t\t\tthis.rtl = v === 'rtl';\n\t\t\tthis.ngOnInit();\n\t\t\tthis._cdRef.markForCheck();\n\t\t});\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._destroyed$.next();\n\t\tthis._destroyed$.complete();\n\t}\n\n\tngOnChanges(changes: SimpleChanges): void {\n\t\tif (Object.keys(changes).some(k => changes[k] && !changes[k].isFirstChange())) {\n\t\t\tsuper.ngOnInit();\n\t\t\tthis._cdRef.markForCheck();\n\t\t}\n\t}\n}\n\nconst componentType: any = SkeletonLoaderComponent;\nconst superType: any = ContentLoaderComponent;\n\nObject.keys(superType.ɵcmp)\n\t.filter(k => !['selectors', 'type'].includes(k))\n\t.forEach(k => (componentType.ɵcmp[k] = superType.ɵcmp[k]));\n","import { AfterViewChecked, Directive, ElementRef, Host, Inject, InjectionToken, Input } from '@angular/core';\nimport { SkeletonLoaderComponent } from './skeleton-loader.component';\n\nexport type SkeletonPreset = {\n\tviewBox: string;\n\tcontent: string;\n};\n\nexport type SkeletonPresets = { [key: string]: SkeletonPreset };\n\nexport const SKELETON_PRESETS = new InjectionToken<SkeletonPresets>('bui-skeleton-presets');\n\nexport const DEFAULT_PRESETS: SkeletonPresets = {\n\tfacebook: {\n\t\tviewBox: '0 0 425 124',\n\t\tcontent: `\n\t\t<rect x=\"48\" y=\"8\" rx=\"3\" ry=\"3\" width=\"88\" height=\"6\" /> \n\t\t<rect x=\"48\" y=\"26\" rx=\"3\" ry=\"3\" width=\"52\" height=\"6\" /> \n\t\t<rect x=\"0\" y=\"56\" rx=\"3\" ry=\"3\" width=\"410\" height=\"6\" /> \n\t\t<rect x=\"0\" y=\"72\" rx=\"3\" ry=\"3\" width=\"380\" height=\"6\" /> \n\t\t<rect x=\"0\" y=\"88\" rx=\"3\" ry=\"3\" width=\"178\" height=\"6\" /> \n\t\t<circle cx=\"20\" cy=\"20\" r=\"20\" />\n\t\t`\n\t},\n\tcode: {\n\t\tviewBox: '0 0 340 84',\n\t\tcontent: `\n\t\t<rect x=\"0\" y=\"0\" rx=\"3\" ry=\"3\" width=\"67\" height=\"11\" /> \n\t\t<rect x=\"76\" y=\"0\" rx=\"3\" ry=\"3\" width=\"140\" height=\"11\" /> \n\t\t<rect x=\"127\" y=\"48\" rx=\"3\" ry=\"3\" width=\"53\" height=\"11\" /> \n\t\t<rect x=\"187\" y=\"48\" rx=\"3\" ry=\"3\" width=\"72\" height=\"11\" /> \n\t\t<rect x=\"18\" y=\"48\" rx=\"3\" ry=\"3\" width=\"100\" height=\"11\" /> \n\t\t<rect x=\"0\" y=\"71\" rx=\"3\" ry=\"3\" width=\"37\" height=\"11\" /> \n\t\t<rect x=\"18\" y=\"23\" rx=\"3\" ry=\"3\" width=\"140\" height=\"11\" /> \n\t\t<rect x=\"166\" y=\"23\" rx=\"3\" ry=\"3\" width=\"173\" height=\"11\" />\n\t\t`\n\t},\n\tinstagram: {\n\t\tviewBox: '0 0 400 460',\n\t\tcontent: `\n\t\t<circle cx=\"31\" cy=\"31\" r=\"15\" /> \n\t\t<rect x=\"58\" y=\"18\" rx=\"2\" ry=\"2\" width=\"140\" height=\"10\" /> \n\t\t<rect x=\"58\" y=\"34\" rx=\"2\" ry=\"2\" width=\"140\" height=\"10\" /> \n\t\t<rect x=\"0\" y=\"60\" rx=\"2\" ry=\"2\" width=\"400\" height=\"400\" />\n\t\t`\n\t},\n\tbulletList: {\n\t\tviewBox: '0 0 250 150',\n\t\tcontent: `\n\t\t<circle cx=\"10\" cy=\"20\" r=\"8\" /> \n\t\t<rect x=\"25\" y=\"15\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" /> \n\t\t<circle cx=\"10\" cy=\"50\" r=\"8\" /> \n\t\t<rect x=\"25\" y=\"45\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" /> \n\t\t<circle cx=\"10\" cy=\"80\" r=\"8\" /> \n\t\t<rect x=\"25\" y=\"75\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" /> \n\t\t<circle cx=\"10\" cy=\"110\" r=\"8\" /> \n\t\t<rect x=\"25\" y=\"105\" rx=\"5\" ry=\"5\" width=\"220\" height=\"10\" />\n\t\t`\n\t}\n};\n\n@Directive({\n\tselector: 'bui-skeleton[preset]'\n})\nexport class SkeletonLoaderPresetsDirective implements AfterViewChecked {\n\t/** Select the SVG elements from one of the presets. */\n\t@Input()\n\tpreset?: string;\n\n\tprivate _allPresets: SkeletonPresets;\n\n\tconstructor(\n\t\t@Host() private _skeletonComponent: SkeletonLoaderComponent,\n\t\tprivate _elementRef: ElementRef<HTMLElement>,\n\t\t@Inject(SKELETON_PRESETS) _presetList: SkeletonPresets[]\n\t) {\n\t\tthis._allPresets = _presetList.reduce((p, c) => ({ ...p, ...c }), {});\n\t}\n\n\tngAfterViewChecked(): void {\n\t\tconst preset = this._allPresets[(this.preset || '') as any];\n\t\tif (preset) {\n\t\t\tconst clipPathElem = this._elementRef.nativeElement.querySelector(`[id='${this._skeletonComponent.idClip}']`)!;\n\t\t\tthis._skeletonComponent.viewBox = preset.viewBox;\n\t\t\tclipPathElem.innerHTML = preset.content;\n\t\t}\n\t}\n}\n","import { CommonModule } from '@angular/common';\nimport { ModuleWithProviders, NgModule, ValueProvider } from '@angular/core';\nimport { BuiCommonModule } from '@bravura/ui/common';\nimport { ContentLoaderModule } from '@ngneat/content-loader';\nimport {\n\tDEFAULT_PRESETS,\n\tSkeletonLoaderPresetsDirective,\n\tSkeletonPresets,\n\tSKELETON_PRESETS\n} from './skeleton-loader-presets.directive';\nimport { SkeletonLoaderComponent } from './skeleton-loader.component';\n\nfunction provideSkeletonPresets(presets: SkeletonPresets): ValueProvider {\n\treturn {\n\t\tprovide: SKELETON_PRESETS,\n\t\tuseValue: presets,\n\t\tmulti: true\n\t};\n}\n\n@NgModule({\n\tdeclarations: [SkeletonLoaderComponent, SkeletonLoaderPresetsDirective],\n\timports: [CommonModule, ContentLoaderModule, BuiCommonModule],\n\texports: [ContentLoaderModule, BuiCommonModule, SkeletonLoaderComponent, SkeletonLoaderPresetsDirective],\n\tproviders: [provideSkeletonPresets(DEFAULT_PRESETS)]\n})\nexport class SkeletonsModule {\n\tstatic forConfig(config?: { presets?: SkeletonPresets }): ModuleWithProviders<SkeletonsModule> {\n\t\treturn {\n\t\t\tngModule: SkeletonsModule,\n\t\t\tproviders: [provideSkeletonPresets(config?.presets || {}), provideSkeletonPresets(DEFAULT_PRESETS)]\n\t\t};\n\t}\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6BG;AAEG,MAAO,uBAAwB,SAAQ,sBAAsB,CAAA;AAGlE,IAAA,WAAA,CAAY,OAAgC,EAAU,MAAyB,EAAU,IAAoB,EAAA;AAC5G,QAAA,KAAK,EAAE,CAAC;QAD6C,IAAM,CAAA,MAAA,GAAN,MAAM,CAAmB;QAAU,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAgB;AAFrG,QAAA,IAAA,CAAA,WAAW,GAAG,IAAI,OAAO,EAAQ,CAAC;QAKzC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,G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