@actabldesign/bellhop-core 0.3.0 → 0.3.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 (748) hide show
  1. package/components/bh-accordion-item.js +1 -1
  2. package/components/bh-activity-feed.js +1 -1
  3. package/components/bh-alert.js +1 -1
  4. package/components/bh-appbar.js +1 -1
  5. package/components/bh-avatar-add.js +1 -1
  6. package/components/bh-avatar-stacked.js +1 -1
  7. package/components/bh-avatar.js +1 -1
  8. package/components/bh-badge-dot.js +1 -1
  9. package/components/bh-badge.js +1 -1
  10. package/components/bh-banner.js +1 -1
  11. package/components/bh-bar-chart.js +1 -1
  12. package/components/bh-breadcrumbs.js +1 -1
  13. package/components/bh-button-icon.js +1 -1
  14. package/components/bh-button.js +1 -1
  15. package/components/bh-card-content.js +1 -1
  16. package/components/bh-card-footer.js +1 -1
  17. package/components/bh-card-header.js +1 -1
  18. package/components/bh-card.js +1 -1
  19. package/components/bh-chart-tooltip.js +1 -1
  20. package/components/bh-chat-message.js +1 -1
  21. package/components/bh-chat-reaction.js +1 -1
  22. package/components/bh-checkbox.js +1 -1
  23. package/components/bh-checklist-task-group.js +1 -1
  24. package/components/bh-close-button.js +1 -1
  25. package/components/bh-command-bar.d.ts +11 -0
  26. package/components/bh-command-bar.js +1 -0
  27. package/components/bh-container-footer.js +1 -1
  28. package/components/bh-container.js +1 -1
  29. package/components/bh-credit-card.js +1 -1
  30. package/components/bh-data-grid-body.js +1 -1
  31. package/components/bh-data-grid-change-preview.js +1 -1
  32. package/components/bh-data-grid-filter-builder.js +1 -1
  33. package/components/bh-data-grid-footer.js +1 -1
  34. package/components/bh-data-grid-header.js +1 -1
  35. package/components/bh-data-grid-toolbar.js +1 -1
  36. package/components/bh-data-grid.js +2 -2
  37. package/components/bh-date-picker-content.js +1 -1
  38. package/components/bh-date-picker.js +1 -1
  39. package/components/bh-date-range-picker-content.js +1 -1
  40. package/components/bh-date-range-picker.js +1 -1
  41. package/components/bh-divider.js +1 -1
  42. package/components/bh-dropdown-menu.js +1 -1
  43. package/components/bh-dropdown.js +1 -1
  44. package/components/bh-emoji-picker.js +1 -1
  45. package/components/bh-empty-state.js +1 -1
  46. package/components/bh-fab.js +1 -1
  47. package/components/bh-featured-icon.js +1 -1
  48. package/components/bh-feed-item.js +1 -1
  49. package/components/bh-gauge-chart.js +1 -1
  50. package/components/bh-guided-checklist.js +1 -1
  51. package/components/bh-html-editor-bubble-menu.js +1 -1
  52. package/components/bh-html-editor-toolbar.js +1 -1
  53. package/components/bh-html-editor.js +1 -1
  54. package/components/bh-illustrations.js +1 -1
  55. package/components/bh-inline-cta.js +1 -1
  56. package/components/bh-input-autocomplete.js +1 -1
  57. package/components/bh-input-number.js +1 -1
  58. package/components/bh-input-password.js +1 -1
  59. package/components/bh-input-text.js +1 -1
  60. package/components/bh-input-verification.js +1 -1
  61. package/components/bh-kbd.d.ts +11 -0
  62. package/components/bh-kbd.js +1 -0
  63. package/components/bh-label.js +1 -1
  64. package/components/bh-line-chart.js +1 -1
  65. package/components/bh-logo-box.js +1 -1
  66. package/components/bh-menu-item.js +1 -1
  67. package/components/bh-menu.js +1 -1
  68. package/components/bh-modal-actions.js +1 -1
  69. package/components/bh-modal-header.js +1 -1
  70. package/components/bh-month-picker-content.js +1 -1
  71. package/components/bh-month-picker.js +1 -1
  72. package/components/bh-multi-select.js +1 -1
  73. package/components/bh-nav-item.js +1 -1
  74. package/components/bh-notification-center.d.ts +11 -0
  75. package/components/bh-notification-center.js +1 -0
  76. package/components/bh-page-header.js +1 -1
  77. package/components/bh-page-navigation-child.js +1 -1
  78. package/components/bh-page-navigation-multi-level.js +1 -1
  79. package/components/bh-page-navigation-single-level.js +1 -1
  80. package/components/bh-page-navigation.js +1 -1
  81. package/components/bh-pagination.js +1 -1
  82. package/components/bh-picker-menu.js +1 -1
  83. package/components/bh-pie-chart.js +1 -1
  84. package/components/bh-pivot-grid-field-chooser.js +1 -1
  85. package/components/bh-pivot-grid.js +1 -1
  86. package/components/bh-progress-bar.js +1 -1
  87. package/components/bh-progress-ring.js +1 -1
  88. package/components/bh-property-switcher.js +1 -1
  89. package/components/bh-radar-chart.js +1 -1
  90. package/components/bh-radio-button.js +1 -1
  91. package/components/bh-radio-group.js +1 -1
  92. package/components/bh-range-slider.js +1 -1
  93. package/components/bh-section-footer.js +1 -1
  94. package/components/bh-section-header.js +1 -1
  95. package/components/bh-select.js +1 -1
  96. package/components/bh-selection-group-item.js +1 -1
  97. package/components/bh-selection-group.js +1 -1
  98. package/components/bh-side-panel-footer.js +1 -1
  99. package/components/bh-side-panel-header.js +1 -1
  100. package/components/bh-sidebar.js +1 -1
  101. package/components/bh-skeleton-loader.js +1 -1
  102. package/components/bh-stepper.js +1 -1
  103. package/components/bh-tab-item.js +1 -1
  104. package/components/bh-table-header.js +1 -1
  105. package/components/bh-tabs.js +1 -1
  106. package/components/bh-tag-group.js +1 -1
  107. package/components/bh-tag-input.js +1 -1
  108. package/components/bh-tag.js +1 -1
  109. package/components/bh-textarea.js +1 -1
  110. package/components/bh-toast-container.js +1 -1
  111. package/components/bh-toast.js +1 -1
  112. package/components/bh-toggle.js +1 -1
  113. package/components/bh-tooltip.js +1 -1
  114. package/components/bh-trend-chart.js +1 -1
  115. package/components/index.d.ts +6 -0
  116. package/components/index.js +1 -1
  117. package/components/{p-BVwh7Zds.js → p-2SnKTVal.js} +1 -1
  118. package/components/{p-DpyQ9_VL.js → p-6tew_a-x.js} +1 -1
  119. package/components/{p-BUoq_1rz.js → p-B7La6Iwp.js} +1 -1
  120. package/components/p-B8HxD-vO.js +1 -0
  121. package/components/{p-CdwBDbHF.js → p-B9--bog4.js} +1 -1
  122. package/components/{p-D_0aDuRr.js → p-BF5hfv7s.js} +1 -1
  123. package/components/{p-oaisznHL.js → p-BI2Y2Le4.js} +1 -1
  124. package/components/p-Be6mIKzo.js +1 -0
  125. package/components/p-Bh0oD_Yf.js +1 -0
  126. package/components/{p-nMu0IHKp.js → p-BniMhcxp.js} +1 -1
  127. package/components/{p-CZRjavNE.js → p-Br9M2BbM.js} +1 -1
  128. package/components/{p-QCa_P3zY.js → p-BwxcuFPS.js} +1 -1
  129. package/components/{p-Dq8Cpk56.js → p-BzHDM9Tg.js} +1 -1
  130. package/components/{p-D-D80sUk.js → p-C4rAmars.js} +1 -1
  131. package/components/{p-B2KPN863.js → p-C7fkgBQS.js} +1 -1
  132. package/components/{p-cD3vmu49.js → p-CClVva-u.js} +1 -1
  133. package/components/p-CJUnjRCe.js +1 -0
  134. package/components/{p--a7Uv1ky.js → p-CK_Py1Yi.js} +1 -1
  135. package/components/{p-DjJP-dIm.js → p-CWdw6bHR.js} +1 -1
  136. package/components/{p-XYHjFWDD.js → p-CZ_H3nat.js} +1 -1
  137. package/components/{p-CtaODgcw.js → p-C_nrq7_Y.js} +1 -1
  138. package/components/{p-BFL2Pm_E.js → p-CssmbrSc.js} +1 -1
  139. package/components/p-CvsupUaF.js +1 -0
  140. package/components/{p-DBAPExTG.js → p-CvwyG_Kj.js} +1 -1
  141. package/components/{p-Bf_iTZDv.js → p-D6aw0IK6.js} +1 -1
  142. package/components/{p-CzvaS9up.js → p-DBl9mNfN.js} +1 -1
  143. package/components/{p-DWoyQVnq.js → p-DG90uKhz.js} +1 -1
  144. package/components/{p-CWY9YV_9.js → p-DGWzDn9Y.js} +1 -1
  145. package/components/p-DJlRFgcj.js +1 -0
  146. package/components/p-DKWhUGrV.js +1 -0
  147. package/components/{p-CC_DXFwx.js → p-DSDbfC31.js} +1 -1
  148. package/components/{p-1SkDR91n.js → p-DUm7JrA0.js} +1 -1
  149. package/components/{p-C6UC_xxP.js → p-DblmzWu8.js} +1 -1
  150. package/components/{p-BHeNnP2q.js → p-DfCONXO0.js} +1 -1
  151. package/components/p-DhgfM7Wy.js +1 -0
  152. package/components/{p-Xa6gUVGr.js → p-DjUfsCJJ.js} +1 -1
  153. package/components/{p-CVSRqFZ0.js → p-DjpXtbw8.js} +1 -1
  154. package/components/{p-GjWzFf-V.js → p-Dzlsnb7d.js} +1 -1
  155. package/components/{p-Be20AcNb.js → p-S-miu3h6.js} +1 -1
  156. package/components/{p-DIMoIy0w.js → p-W2SGLZN7.js} +1 -1
  157. package/components/{p-arW9uaFJ.js → p-hhv9O2Qq.js} +1 -1
  158. package/components/{p-BwwSI2Fv.js → p-jNp3nckG.js} +1 -1
  159. package/dist/bellhop-core/bellhop-core.esm.js +1 -1
  160. package/dist/bellhop-core/p-009efb12.entry.js +1 -0
  161. package/dist/bellhop-core/p-01b505e3.entry.js +1 -0
  162. package/dist/bellhop-core/p-02945f90.entry.js +1 -0
  163. package/dist/bellhop-core/p-04d2ec72.entry.js +1 -0
  164. package/dist/bellhop-core/p-05867224.entry.js +1 -0
  165. package/dist/bellhop-core/p-05a53d3b.entry.js +1 -0
  166. package/dist/bellhop-core/p-0692ab72.entry.js +1 -0
  167. package/dist/bellhop-core/p-06f9b713.entry.js +1 -0
  168. package/dist/bellhop-core/p-08b8ba36.entry.js +1 -0
  169. package/dist/bellhop-core/p-0953e008.entry.js +1 -0
  170. package/dist/bellhop-core/p-0976eb7a.entry.js +1 -0
  171. package/dist/bellhop-core/p-097d70d9.entry.js +1 -0
  172. package/dist/bellhop-core/p-0a316bb6.entry.js +1 -0
  173. package/dist/bellhop-core/p-108ca612.entry.js +1 -0
  174. package/dist/bellhop-core/p-12d3c4e9.entry.js +1 -0
  175. package/dist/bellhop-core/p-13f15f41.entry.js +1 -0
  176. package/dist/bellhop-core/p-15bb1050.entry.js +1 -0
  177. package/dist/bellhop-core/p-16e01b81.entry.js +1 -0
  178. package/dist/bellhop-core/p-188980bd.entry.js +1 -0
  179. package/dist/bellhop-core/p-1fba0985.entry.js +1 -0
  180. package/dist/bellhop-core/p-24e5c52b.entry.js +1 -0
  181. package/dist/bellhop-core/p-29729109.entry.js +1 -0
  182. package/dist/bellhop-core/p-2b93b512.entry.js +1 -0
  183. package/dist/bellhop-core/{p-213a104c.entry.js → p-2bcd94d0.entry.js} +1 -1
  184. package/dist/bellhop-core/p-2bdb9784.entry.js +1 -0
  185. package/dist/bellhop-core/p-2ee44b97.entry.js +1 -0
  186. package/dist/bellhop-core/p-3348400a.entry.js +1 -0
  187. package/dist/bellhop-core/p-38873b75.entry.js +1 -0
  188. package/dist/bellhop-core/p-399be504.entry.js +1 -0
  189. package/dist/bellhop-core/p-3d67e55f.entry.js +1 -0
  190. package/dist/bellhop-core/p-3dcf8812.entry.js +1 -0
  191. package/dist/bellhop-core/p-42f26142.entry.js +1 -0
  192. package/dist/bellhop-core/p-43d94b51.entry.js +1 -0
  193. package/dist/bellhop-core/p-4c65d80a.entry.js +1 -0
  194. package/dist/bellhop-core/p-4e4b59cc.entry.js +1 -0
  195. package/dist/bellhop-core/p-50c00ac6.entry.js +1 -0
  196. package/dist/bellhop-core/p-52d0c0ac.entry.js +1 -0
  197. package/dist/bellhop-core/p-53ddab62.entry.js +1 -0
  198. package/dist/bellhop-core/p-558c1c9f.entry.js +1 -0
  199. package/dist/bellhop-core/{p-fb8e0e6c.entry.js → p-59feba80.entry.js} +1 -1
  200. package/dist/bellhop-core/{p-165b45f3.entry.js → p-5a49ebee.entry.js} +1 -1
  201. package/dist/bellhop-core/p-5f5648e6.entry.js +1 -0
  202. package/dist/bellhop-core/p-614f84ff.entry.js +1 -0
  203. package/dist/bellhop-core/p-6517c63b.entry.js +1 -0
  204. package/dist/bellhop-core/{p-c86b7e41.entry.js → p-654de2b6.entry.js} +1 -1
  205. package/dist/bellhop-core/p-65e10ead.entry.js +1 -0
  206. package/dist/bellhop-core/p-68c5a0bd.entry.js +1 -0
  207. package/dist/bellhop-core/p-68cf8430.entry.js +1 -0
  208. package/dist/bellhop-core/p-6ad1ed53.entry.js +1 -0
  209. package/dist/bellhop-core/p-6df539be.entry.js +1 -0
  210. package/dist/bellhop-core/p-6e1c1c27.entry.js +1 -0
  211. package/dist/bellhop-core/p-710e4da7.entry.js +1 -0
  212. package/dist/bellhop-core/p-7841fbc2.entry.js +1 -0
  213. package/dist/bellhop-core/p-7bceb793.entry.js +1 -0
  214. package/dist/bellhop-core/p-7bd58fae.entry.js +1 -0
  215. package/dist/bellhop-core/p-7c0d23d4.entry.js +1 -0
  216. package/dist/bellhop-core/p-7e226f98.entry.js +1 -0
  217. package/dist/bellhop-core/{p-4a96c207.entry.js → p-815fb83e.entry.js} +1 -1
  218. package/dist/bellhop-core/p-832bf58d.entry.js +1 -0
  219. package/dist/bellhop-core/p-8370a956.entry.js +1 -0
  220. package/dist/bellhop-core/{p-b992fd96.entry.js → p-858017eb.entry.js} +1 -1
  221. package/dist/bellhop-core/p-87c827d7.entry.js +1 -0
  222. package/dist/bellhop-core/p-8a38724f.entry.js +1 -0
  223. package/dist/bellhop-core/p-8aa87a99.entry.js +1 -0
  224. package/dist/bellhop-core/p-8ad4d720.entry.js +1 -0
  225. package/dist/bellhop-core/p-8d319614.entry.js +1 -0
  226. package/dist/bellhop-core/p-963e6ad9.entry.js +1 -0
  227. package/dist/bellhop-core/p-97bed0b0.entry.js +1 -0
  228. package/dist/bellhop-core/{p-df4c2032.entry.js → p-9b2d67db.entry.js} +2 -2
  229. package/dist/bellhop-core/p-9b935b1a.entry.js +1 -0
  230. package/dist/bellhop-core/p-9cf187af.entry.js +1 -0
  231. package/dist/bellhop-core/p-9e0b9dec.entry.js +1 -0
  232. package/dist/bellhop-core/p-CBTS9Vhx.js +1 -0
  233. package/dist/bellhop-core/{p-Dn-MvAk9.js → p-CKTtXT2O.js} +1 -1
  234. package/dist/bellhop-core/p-CMKOFHIa.js +1 -0
  235. package/dist/bellhop-core/p-Xi3uD33F.js +1 -0
  236. package/dist/bellhop-core/p-a57034cf.entry.js +1 -0
  237. package/dist/bellhop-core/p-a925a3d8.entry.js +1 -0
  238. package/dist/bellhop-core/p-abf0f15d.entry.js +1 -0
  239. package/dist/bellhop-core/p-b212b4c1.entry.js +1 -0
  240. package/dist/bellhop-core/p-b2380f56.entry.js +1 -0
  241. package/dist/bellhop-core/p-b333c85f.entry.js +1 -0
  242. package/dist/bellhop-core/p-b9d363b0.entry.js +1 -0
  243. package/dist/bellhop-core/p-b9d86b80.entry.js +1 -0
  244. package/dist/bellhop-core/p-baa76b6d.entry.js +1 -0
  245. package/dist/bellhop-core/p-bb11a7df.entry.js +1 -0
  246. package/dist/bellhop-core/p-bcc53e7e.entry.js +1 -0
  247. package/dist/bellhop-core/p-c0513194.entry.js +1 -0
  248. package/dist/bellhop-core/p-c1eed46c.entry.js +1 -0
  249. package/dist/bellhop-core/p-c2440a5a.entry.js +1 -0
  250. package/dist/bellhop-core/p-c338d5ed.entry.js +1 -0
  251. package/dist/bellhop-core/p-c4cd8445.entry.js +1 -0
  252. package/dist/bellhop-core/p-cd404c53.entry.js +1 -0
  253. package/dist/bellhop-core/p-d2fdf27a.entry.js +1 -0
  254. package/dist/bellhop-core/p-d89a2316.entry.js +1 -0
  255. package/dist/bellhop-core/p-d9903fd1.entry.js +1 -0
  256. package/dist/bellhop-core/p-df86ac00.entry.js +1 -0
  257. package/dist/bellhop-core/p-dfc61397.entry.js +1 -0
  258. package/dist/bellhop-core/p-e02bdcfb.entry.js +1 -0
  259. package/dist/bellhop-core/p-e6ad9a10.entry.js +1 -0
  260. package/dist/bellhop-core/p-e86b4fbf.entry.js +1 -0
  261. package/dist/bellhop-core/p-eed85b08.entry.js +1 -0
  262. package/dist/bellhop-core/p-f0a47a26.entry.js +1 -0
  263. package/dist/bellhop-core/p-f46e818f.entry.js +1 -0
  264. package/dist/bellhop-core/p-f6c8568f.entry.js +1 -0
  265. package/dist/bellhop-core/p-f784164a.entry.js +1 -0
  266. package/dist/bellhop-core/p-f8d47699.entry.js +1 -0
  267. package/dist/bellhop-core/{p-1323f446.entry.js → p-f8dce3b6.entry.js} +1 -1
  268. package/dist/bellhop-core/p-f9962334.entry.js +1 -0
  269. package/dist/bellhop-core/p-fb897d66.entry.js +1 -0
  270. package/dist/cjs/bellhop-core.cjs.js +1 -1
  271. package/dist/cjs/bh-accordion-item.cjs.entry.js +4 -3
  272. package/dist/cjs/bh-accordion.cjs.entry.js +3 -2
  273. package/dist/cjs/bh-activity-feed_2.cjs.entry.js +174 -0
  274. package/dist/cjs/bh-alert.cjs.entry.js +4 -3
  275. package/dist/cjs/bh-appbar.cjs.entry.js +57 -11
  276. package/dist/cjs/bh-autocomplete-menu.cjs.entry.js +3 -2
  277. package/dist/cjs/bh-avatar-add.cjs.entry.js +4 -3
  278. package/dist/cjs/bh-avatar-stacked.cjs.entry.js +4 -3
  279. package/dist/cjs/bh-avatar.cjs.entry.js +6 -5
  280. package/dist/cjs/bh-badge-dot_2.cjs.entry.js +8 -7
  281. package/dist/cjs/bh-badge.cjs.entry.js +6 -5
  282. package/dist/cjs/bh-banner.cjs.entry.js +5 -4
  283. package/dist/cjs/bh-bar-chart.cjs.entry.js +5 -4
  284. package/dist/cjs/bh-breadcrumbs.cjs.entry.js +16 -5
  285. package/dist/cjs/bh-button-icon_2.cjs.entry.js +5 -4
  286. package/dist/cjs/bh-button.cjs.entry.js +5 -4
  287. package/dist/cjs/bh-card-content.cjs.entry.js +4 -3
  288. package/dist/cjs/bh-card-footer.cjs.entry.js +4 -3
  289. package/dist/cjs/bh-card-header.cjs.entry.js +4 -3
  290. package/dist/cjs/bh-card.cjs.entry.js +4 -3
  291. package/dist/cjs/bh-chart-tooltip.cjs.entry.js +5 -4
  292. package/dist/cjs/bh-chat-message.cjs.entry.js +5 -4
  293. package/dist/cjs/bh-chat-reaction.cjs.entry.js +5 -4
  294. package/dist/cjs/bh-checkbox.cjs.entry.js +3 -2
  295. package/dist/cjs/bh-checklist-task-group_3.cjs.entry.js +6 -5
  296. package/dist/cjs/bh-close-button.cjs.entry.js +1 -1
  297. package/dist/cjs/bh-command-bar.cjs.entry.js +309 -0
  298. package/dist/cjs/bh-container-footer.cjs.entry.js +4 -3
  299. package/dist/cjs/bh-container.cjs.entry.js +4 -3
  300. package/dist/cjs/bh-credit-card.cjs.entry.js +4 -3
  301. package/dist/cjs/bh-data-grid-body.cjs.entry.js +3 -2
  302. package/dist/cjs/bh-data-grid-change-preview.cjs.entry.js +3 -2
  303. package/dist/cjs/bh-data-grid-filter-builder.cjs.entry.js +3 -2
  304. package/dist/cjs/bh-data-grid-footer.cjs.entry.js +4 -3
  305. package/dist/cjs/bh-data-grid-header.cjs.entry.js +3 -2
  306. package/dist/cjs/bh-data-grid-toolbar.cjs.entry.js +4 -3
  307. package/dist/cjs/bh-data-grid.cjs.entry.js +4 -3
  308. package/dist/cjs/bh-date-picker-content.cjs.entry.js +6 -5
  309. package/dist/cjs/bh-date-picker.cjs.entry.js +6 -5
  310. package/dist/cjs/bh-date-range-picker-content.cjs.entry.js +5 -4
  311. package/dist/cjs/bh-date-range-picker.cjs.entry.js +7 -6
  312. package/dist/cjs/bh-divider.cjs.entry.js +4 -3
  313. package/dist/cjs/bh-dropdown-menu.cjs.entry.js +1 -1
  314. package/dist/cjs/bh-dropdown.cjs.entry.js +13 -4
  315. package/dist/cjs/bh-emoji-picker.cjs.entry.js +1 -1
  316. package/dist/cjs/bh-empty-state_2.cjs.entry.js +6 -5
  317. package/dist/cjs/bh-featured-icon.cjs.entry.js +4 -3
  318. package/dist/cjs/bh-gauge-chart.cjs.entry.js +5 -4
  319. package/dist/cjs/bh-guided-checklist.cjs.entry.js +5 -4
  320. package/dist/cjs/bh-html-editor-bubble-menu_2.cjs.entry.js +8 -7
  321. package/dist/cjs/bh-html-editor.cjs.entry.js +5 -4
  322. package/dist/cjs/bh-illustrations.cjs.entry.js +4 -3
  323. package/dist/cjs/bh-inline-cta.cjs.entry.js +5 -4
  324. package/dist/cjs/bh-input-autocomplete.cjs.entry.js +7 -6
  325. package/dist/cjs/bh-input-number.cjs.entry.js +5 -4
  326. package/dist/cjs/bh-input-password.cjs.entry.js +6 -5
  327. package/dist/cjs/bh-input-text.cjs.entry.js +5 -4
  328. package/dist/cjs/bh-input-verification.cjs.entry.js +4 -3
  329. package/dist/cjs/bh-kbd.cjs.entry.js +34 -0
  330. package/dist/cjs/bh-label_2.cjs.entry.js +5 -4
  331. package/dist/cjs/bh-line-chart.cjs.entry.js +5 -4
  332. package/dist/cjs/bh-logo-box_2.cjs.entry.js +8 -7
  333. package/dist/cjs/bh-menu_2.cjs.entry.js +4 -3
  334. package/dist/cjs/bh-modal-actions.cjs.entry.js +4 -3
  335. package/dist/cjs/bh-modal-header.cjs.entry.js +7 -6
  336. package/dist/cjs/bh-modal.cjs.entry.js +4 -3
  337. package/dist/cjs/bh-month-picker-content.cjs.entry.js +4 -3
  338. package/dist/cjs/bh-month-picker.cjs.entry.js +6 -5
  339. package/dist/cjs/bh-multi-select.cjs.entry.js +8 -7
  340. package/dist/cjs/bh-notification-center.cjs.entry.js +210 -0
  341. package/dist/cjs/bh-page-header.cjs.entry.js +4 -3
  342. package/dist/cjs/bh-page-navigation-child.cjs.entry.js +4 -3
  343. package/dist/cjs/bh-page-navigation-multi-level_2.cjs.entry.js +7 -6
  344. package/dist/cjs/bh-page-navigation.cjs.entry.js +4 -3
  345. package/dist/cjs/bh-pagination_2.cjs.entry.js +10 -9
  346. package/dist/cjs/bh-picker-menu.cjs.entry.js +3 -2
  347. package/dist/cjs/bh-pie-chart.cjs.entry.js +6 -5
  348. package/dist/cjs/bh-pivot-grid-field-chooser.cjs.entry.js +5 -4
  349. package/dist/cjs/bh-pivot-grid.cjs.entry.js +20 -19
  350. package/dist/cjs/bh-popover.cjs.entry.js +3 -2
  351. package/dist/cjs/bh-product-switcher.cjs.entry.js +3 -2
  352. package/dist/cjs/bh-progress-bar.cjs.entry.js +7 -6
  353. package/dist/cjs/bh-progress-ring.cjs.entry.js +1 -1
  354. package/dist/cjs/bh-property-switcher.cjs.entry.js +22 -5
  355. package/dist/cjs/bh-radar-chart.cjs.entry.js +5 -4
  356. package/dist/cjs/bh-radio-button.cjs.entry.js +3 -2
  357. package/dist/cjs/bh-radio-group.cjs.entry.js +4 -3
  358. package/dist/cjs/bh-range-slider.cjs.entry.js +4 -3
  359. package/dist/cjs/bh-section-footer.cjs.entry.js +4 -3
  360. package/dist/cjs/bh-section-header.cjs.entry.js +4 -3
  361. package/dist/cjs/bh-selection-group-item.cjs.entry.js +3 -2
  362. package/dist/cjs/bh-selection-group.cjs.entry.js +4 -3
  363. package/dist/cjs/bh-side-panel-footer.cjs.entry.js +1 -1
  364. package/dist/cjs/bh-side-panel-header.cjs.entry.js +1 -1
  365. package/dist/cjs/bh-sidebar.cjs.entry.js +19 -5
  366. package/dist/cjs/bh-stepper.cjs.entry.js +3 -2
  367. package/dist/cjs/bh-tab-item.cjs.entry.js +5 -4
  368. package/dist/cjs/bh-table-header.cjs.entry.js +4 -3
  369. package/dist/cjs/bh-tabs.cjs.entry.js +4 -3
  370. package/dist/cjs/bh-tag-group.cjs.entry.js +4 -3
  371. package/dist/cjs/bh-tag-input.cjs.entry.js +5 -4
  372. package/dist/cjs/bh-textarea.cjs.entry.js +5 -4
  373. package/dist/cjs/bh-toast-container.cjs.entry.js +1 -1
  374. package/dist/cjs/bh-toast.cjs.entry.js +5 -4
  375. package/dist/cjs/bh-toggle.cjs.entry.js +4 -3
  376. package/dist/cjs/bh-trend-chart.cjs.entry.js +5 -4
  377. package/dist/cjs/{component-error-handler-C4vfF_Qu.js → component-error-handler-BxXlGq4E.js} +1 -1
  378. package/dist/cjs/error-boundary-fNUNT0lE.js +75 -0
  379. package/dist/cjs/hotkeys-BzAUI8Zg.js +113 -0
  380. package/dist/cjs/index-B6sArKsK.js +20 -12
  381. package/dist/cjs/loader.cjs.js +1 -1
  382. package/dist/cjs/{error-boundary-Bf7TcT4U.js → logger-DZionBgs.js} +0 -71
  383. package/dist/collection/collection-manifest.json +3 -0
  384. package/dist/collection/components/bh-accordion/bh-accordion-item/bh-accordion-item.js +1 -1
  385. package/dist/collection/components/bh-activity-feed/bh-activity-feed.css +8 -0
  386. package/dist/collection/components/bh-activity-feed/bh-activity-feed.js +29 -2
  387. package/dist/collection/components/bh-appbar/bh-appbar.css +28 -1
  388. package/dist/collection/components/bh-appbar/bh-appbar.js +220 -9
  389. package/dist/collection/components/bh-appbar/bh-notification-center/bh-notification-center.css +118 -0
  390. package/dist/collection/components/bh-appbar/bh-notification-center/bh-notification-center.js +513 -0
  391. package/dist/collection/components/bh-avatar/bh-avatar-add/bh-avatar-add.js +1 -1
  392. package/dist/collection/components/bh-avatar/bh-avatar-stacked/bh-avatar-stacked.js +1 -1
  393. package/dist/collection/components/bh-avatar/bh-avatar.css +8 -2
  394. package/dist/collection/components/bh-avatar/bh-avatar.js +2 -2
  395. package/dist/collection/components/bh-badge/bh-badge-dot/bh-badge-dot.js +1 -1
  396. package/dist/collection/components/bh-badge/bh-badge.js +2 -2
  397. package/dist/collection/components/bh-banner/bh-banner.js +2 -2
  398. package/dist/collection/components/bh-breadcrumbs/bh-breadcrumbs.css +3 -1
  399. package/dist/collection/components/bh-breadcrumbs/bh-breadcrumbs.js +14 -3
  400. package/dist/collection/components/bh-button/bh-button-icon/bh-button-icon.js +1 -1
  401. package/dist/collection/components/bh-button/bh-button.js +1 -1
  402. package/dist/collection/components/bh-card/bh-card-content/bh-card-content.js +1 -1
  403. package/dist/collection/components/bh-card/bh-card-footer/bh-card-footer.js +1 -1
  404. package/dist/collection/components/bh-card/bh-card-header/bh-card-header.js +1 -1
  405. package/dist/collection/components/bh-card/bh-card.js +1 -1
  406. package/dist/collection/components/bh-chart/bh-bar-chart/bh-bar-chart.js +2 -2
  407. package/dist/collection/components/bh-chart/bh-chart-tooltip/bh-chart-tooltip.js +2 -2
  408. package/dist/collection/components/bh-chart/bh-gauge-chart/bh-gauge-chart.js +2 -2
  409. package/dist/collection/components/bh-chart/bh-line-chart/bh-line-chart.js +2 -2
  410. package/dist/collection/components/bh-chart/bh-pie-chart/bh-pie-chart.js +3 -3
  411. package/dist/collection/components/bh-chart/bh-progress-bar/bh-progress-bar.js +4 -4
  412. package/dist/collection/components/bh-chart/bh-radar-chart/bh-radar-chart.js +2 -2
  413. package/dist/collection/components/bh-chart/bh-trend-chart/bh-trend-chart.js +2 -2
  414. package/dist/collection/components/bh-chat/bh-chat-message/bh-chat-message.js +2 -2
  415. package/dist/collection/components/bh-chat/bh-chat-reaction/bh-chat-reaction.js +2 -2
  416. package/dist/collection/components/bh-close-button/bh-close-button.js +1 -1
  417. package/dist/collection/components/bh-command-bar/bh-command-bar.css +181 -0
  418. package/dist/collection/components/bh-command-bar/bh-command-bar.figma.js +9 -0
  419. package/dist/collection/components/bh-command-bar/bh-command-bar.js +663 -0
  420. package/dist/collection/components/bh-container/bh-container-footer/bh-container-footer.js +1 -1
  421. package/dist/collection/components/bh-container/bh-container.js +1 -1
  422. package/dist/collection/components/bh-credit-card/bh-credit-card.js +1 -1
  423. package/dist/collection/components/bh-data-grid/bh-data-grid-footer.js +1 -1
  424. package/dist/collection/components/bh-data-grid/bh-data-grid-toolbar.js +1 -1
  425. package/dist/collection/components/bh-divider/bh-divider.js +1 -1
  426. package/dist/collection/components/bh-dropdown/bh-dropdown-menu/bh-dropdown-menu.js +1 -1
  427. package/dist/collection/components/bh-dropdown/bh-dropdown.js +29 -1
  428. package/dist/collection/components/bh-emoji-picker/bh-emoji-picker.js +1 -1
  429. package/dist/collection/components/bh-empty-state/bh-empty-state.js +1 -1
  430. package/dist/collection/components/bh-fab/bh-fab.js +2 -2
  431. package/dist/collection/components/bh-featured-icon/bh-featured-icon.js +1 -1
  432. package/dist/collection/components/bh-feed-item/bh-feed-item.css +9 -2
  433. package/dist/collection/components/bh-feed-item/bh-feed-item.js +81 -4
  434. package/dist/collection/components/bh-guided-checklist/bh-guided-checklist.js +1 -1
  435. package/dist/collection/components/bh-html-editor/bh-html-editor-bubble-menu/bh-html-editor-bubble-menu.js +3 -3
  436. package/dist/collection/components/bh-html-editor/bh-html-editor-toolbar/bh-html-editor-toolbar.js +1 -1
  437. package/dist/collection/components/bh-html-editor/bh-html-editor.js +2 -2
  438. package/dist/collection/components/bh-illustrations/bh-illustrations.js +1 -1
  439. package/dist/collection/components/bh-inline-cta/bh-inline-cta.js +2 -2
  440. package/dist/collection/components/bh-input/bh-input-autocomplete/bh-input-autocomplete.js +3 -3
  441. package/dist/collection/components/bh-input/bh-input-number/bh-input-number.js +2 -2
  442. package/dist/collection/components/bh-input/bh-input-password/bh-input-password.js +3 -3
  443. package/dist/collection/components/bh-input/bh-input-text/bh-input-text.js +2 -2
  444. package/dist/collection/components/bh-input/bh-input-verification/bh-input-verification.js +1 -1
  445. package/dist/collection/components/bh-input/bh-tag-input/bh-tag-input.js +2 -2
  446. package/dist/collection/components/bh-input/bh-textarea/bh-textarea.js +2 -2
  447. package/dist/collection/components/bh-kbd/bh-kbd.css +33 -0
  448. package/dist/collection/components/bh-kbd/bh-kbd.figma.js +11 -0
  449. package/dist/collection/components/bh-kbd/bh-kbd.js +78 -0
  450. package/dist/collection/components/bh-logo-box/bh-logo-box.js +2 -2
  451. package/dist/collection/components/bh-modal/bh-modal-actions/bh-modal-actions.js +1 -1
  452. package/dist/collection/components/bh-modal/bh-modal-header/bh-modal-header.js +4 -4
  453. package/dist/collection/components/bh-multi-select/bh-multi-select.js +3 -3
  454. package/dist/collection/components/bh-page-header/bh-page-header.js +2 -2
  455. package/dist/collection/components/bh-page-navigation/bh-page-navigation-child/bh-page-navigation-child.js +1 -1
  456. package/dist/collection/components/bh-page-navigation/bh-page-navigation-multi-level/bh-page-navigation-multi-level.js +2 -2
  457. package/dist/collection/components/bh-page-navigation/bh-page-navigation-single-level/bh-page-navigation-single-level.js +1 -1
  458. package/dist/collection/components/bh-page-navigation/bh-page-navigation.js +1 -1
  459. package/dist/collection/components/bh-pagination/bh-pagination.js +2 -2
  460. package/dist/collection/components/bh-picker/bh-date-picker/bh-date-picker-content/bh-date-picker-content.js +3 -3
  461. package/dist/collection/components/bh-picker/bh-date-picker/bh-date-picker.js +3 -3
  462. package/dist/collection/components/bh-picker/bh-date-range-picker/bh-date-range-picker-content/bh-date-range-picker-content.js +2 -2
  463. package/dist/collection/components/bh-picker/bh-date-range-picker/bh-date-range-picker.js +4 -4
  464. package/dist/collection/components/bh-picker/bh-month-picker/bh-month-picker-content/bh-month-picker-content.js +1 -1
  465. package/dist/collection/components/bh-picker/bh-month-picker/bh-month-picker.js +3 -3
  466. package/dist/collection/components/bh-pivot-grid/bh-pivot-grid-field-chooser/bh-pivot-grid-field-chooser.js +2 -2
  467. package/dist/collection/components/bh-pivot-grid/bh-pivot-grid.js +16 -16
  468. package/dist/collection/components/bh-progress-ring/bh-progress-ring.js +1 -1
  469. package/dist/collection/components/bh-property-switcher/bh-property-switcher.js +20 -4
  470. package/dist/collection/components/bh-radio-group/bh-radio-group.js +1 -1
  471. package/dist/collection/components/bh-range-slider/bh-range-slider.js +1 -1
  472. package/dist/collection/components/bh-section-footer/bh-section-footer.js +1 -1
  473. package/dist/collection/components/bh-section-header/bh-section-header.js +1 -1
  474. package/dist/collection/components/bh-select/bh-select.js +4 -4
  475. package/dist/collection/components/bh-selection-group/bh-selection-group.js +1 -1
  476. package/dist/collection/components/bh-side-panel/bh-side-panel-footer/bh-side-panel-footer.js +1 -1
  477. package/dist/collection/components/bh-side-panel/bh-side-panel-header/bh-side-panel-header.js +1 -1
  478. package/dist/collection/components/bh-sidebar/bh-nav-item/bh-nav-item.js +2 -2
  479. package/dist/collection/components/bh-sidebar/bh-sidebar.js +79 -3
  480. package/dist/collection/components/bh-skeleton-loader/bh-skeleton-loader.js +1 -1
  481. package/dist/collection/components/bh-table-header/bh-table-header.js +1 -1
  482. package/dist/collection/components/bh-tabs/bh-tab-item/bh-tab-item.js +2 -2
  483. package/dist/collection/components/bh-tabs/bh-tabs.js +1 -1
  484. package/dist/collection/components/bh-tag/bh-tag-group/bh-tag-group.js +1 -1
  485. package/dist/collection/components/bh-tag/bh-tag.js +2 -2
  486. package/dist/collection/components/bh-toast/bh-toast.js +2 -2
  487. package/dist/collection/components/bh-toast-container/bh-toast-container.js +1 -1
  488. package/dist/collection/components/bh-toggle/bh-toggle.js +1 -1
  489. package/dist/collection/components/bh-tooltip/bh-tooltip.js +1 -1
  490. package/dist/collection/components/index.js +5 -0
  491. package/dist/collection/utils/hotkeys.js +107 -0
  492. package/dist/collection/utils/index.js +4 -0
  493. package/dist/esm/bellhop-core.js +1 -1
  494. package/dist/esm/bh-accordion-item.entry.js +3 -2
  495. package/dist/esm/bh-accordion.entry.js +2 -1
  496. package/dist/esm/bh-activity-feed_2.entry.js +171 -0
  497. package/dist/esm/bh-alert.entry.js +3 -2
  498. package/dist/esm/bh-appbar.entry.js +56 -10
  499. package/dist/esm/bh-autocomplete-menu.entry.js +2 -1
  500. package/dist/esm/bh-avatar-add.entry.js +3 -2
  501. package/dist/esm/bh-avatar-stacked.entry.js +3 -2
  502. package/dist/esm/bh-avatar.entry.js +5 -4
  503. package/dist/esm/bh-badge-dot_2.entry.js +6 -5
  504. package/dist/esm/bh-badge.entry.js +5 -4
  505. package/dist/esm/bh-banner.entry.js +4 -3
  506. package/dist/esm/bh-bar-chart.entry.js +4 -3
  507. package/dist/esm/bh-breadcrumbs.entry.js +15 -4
  508. package/dist/esm/bh-button-icon_2.entry.js +3 -2
  509. package/dist/esm/bh-button.entry.js +4 -3
  510. package/dist/esm/bh-card-content.entry.js +3 -2
  511. package/dist/esm/bh-card-footer.entry.js +3 -2
  512. package/dist/esm/bh-card-header.entry.js +3 -2
  513. package/dist/esm/bh-card.entry.js +3 -2
  514. package/dist/esm/bh-chart-tooltip.entry.js +4 -3
  515. package/dist/esm/bh-chat-message.entry.js +4 -3
  516. package/dist/esm/bh-chat-reaction.entry.js +4 -3
  517. package/dist/esm/bh-checkbox.entry.js +2 -1
  518. package/dist/esm/bh-checklist-task-group_3.entry.js +5 -4
  519. package/dist/esm/bh-close-button.entry.js +1 -1
  520. package/dist/esm/bh-command-bar.entry.js +307 -0
  521. package/dist/esm/bh-container-footer.entry.js +3 -2
  522. package/dist/esm/bh-container.entry.js +3 -2
  523. package/dist/esm/bh-credit-card.entry.js +3 -2
  524. package/dist/esm/bh-data-grid-body.entry.js +2 -1
  525. package/dist/esm/bh-data-grid-change-preview.entry.js +2 -1
  526. package/dist/esm/bh-data-grid-filter-builder.entry.js +2 -1
  527. package/dist/esm/bh-data-grid-footer.entry.js +3 -2
  528. package/dist/esm/bh-data-grid-header.entry.js +2 -1
  529. package/dist/esm/bh-data-grid-toolbar.entry.js +3 -2
  530. package/dist/esm/bh-data-grid.entry.js +3 -2
  531. package/dist/esm/bh-date-picker-content.entry.js +5 -4
  532. package/dist/esm/bh-date-picker.entry.js +5 -4
  533. package/dist/esm/bh-date-range-picker-content.entry.js +4 -3
  534. package/dist/esm/bh-date-range-picker.entry.js +6 -5
  535. package/dist/esm/bh-divider.entry.js +3 -2
  536. package/dist/esm/bh-dropdown-menu.entry.js +1 -1
  537. package/dist/esm/bh-dropdown.entry.js +12 -3
  538. package/dist/esm/bh-emoji-picker.entry.js +1 -1
  539. package/dist/esm/bh-empty-state_2.entry.js +4 -3
  540. package/dist/esm/bh-featured-icon.entry.js +3 -2
  541. package/dist/esm/bh-gauge-chart.entry.js +4 -3
  542. package/dist/esm/bh-guided-checklist.entry.js +4 -3
  543. package/dist/esm/bh-html-editor-bubble-menu_2.entry.js +6 -5
  544. package/dist/esm/bh-html-editor.entry.js +4 -3
  545. package/dist/esm/bh-illustrations.entry.js +3 -2
  546. package/dist/esm/bh-inline-cta.entry.js +4 -3
  547. package/dist/esm/bh-input-autocomplete.entry.js +6 -5
  548. package/dist/esm/bh-input-number.entry.js +4 -3
  549. package/dist/esm/bh-input-password.entry.js +5 -4
  550. package/dist/esm/bh-input-text.entry.js +4 -3
  551. package/dist/esm/bh-input-verification.entry.js +3 -2
  552. package/dist/esm/bh-kbd.entry.js +32 -0
  553. package/dist/esm/bh-label_2.entry.js +3 -2
  554. package/dist/esm/bh-line-chart.entry.js +4 -3
  555. package/dist/esm/bh-logo-box_2.entry.js +6 -5
  556. package/dist/esm/bh-menu_2.entry.js +2 -1
  557. package/dist/esm/bh-modal-actions.entry.js +3 -2
  558. package/dist/esm/bh-modal-header.entry.js +6 -5
  559. package/dist/esm/bh-modal.entry.js +3 -2
  560. package/dist/esm/bh-month-picker-content.entry.js +3 -2
  561. package/dist/esm/bh-month-picker.entry.js +5 -4
  562. package/dist/esm/bh-multi-select.entry.js +7 -6
  563. package/dist/esm/bh-notification-center.entry.js +208 -0
  564. package/dist/esm/bh-page-header.entry.js +3 -2
  565. package/dist/esm/bh-page-navigation-child.entry.js +3 -2
  566. package/dist/esm/bh-page-navigation-multi-level_2.entry.js +5 -4
  567. package/dist/esm/bh-page-navigation.entry.js +3 -2
  568. package/dist/esm/bh-pagination_2.entry.js +8 -7
  569. package/dist/esm/bh-picker-menu.entry.js +2 -1
  570. package/dist/esm/bh-pie-chart.entry.js +5 -4
  571. package/dist/esm/bh-pivot-grid-field-chooser.entry.js +4 -3
  572. package/dist/esm/bh-pivot-grid.entry.js +19 -18
  573. package/dist/esm/bh-popover.entry.js +2 -1
  574. package/dist/esm/bh-product-switcher.entry.js +2 -1
  575. package/dist/esm/bh-progress-bar.entry.js +6 -5
  576. package/dist/esm/bh-progress-ring.entry.js +1 -1
  577. package/dist/esm/bh-property-switcher.entry.js +21 -4
  578. package/dist/esm/bh-radar-chart.entry.js +4 -3
  579. package/dist/esm/bh-radio-button.entry.js +2 -1
  580. package/dist/esm/bh-radio-group.entry.js +3 -2
  581. package/dist/esm/bh-range-slider.entry.js +3 -2
  582. package/dist/esm/bh-section-footer.entry.js +3 -2
  583. package/dist/esm/bh-section-header.entry.js +3 -2
  584. package/dist/esm/bh-selection-group-item.entry.js +2 -1
  585. package/dist/esm/bh-selection-group.entry.js +3 -2
  586. package/dist/esm/bh-side-panel-footer.entry.js +1 -1
  587. package/dist/esm/bh-side-panel-header.entry.js +1 -1
  588. package/dist/esm/bh-sidebar.entry.js +18 -4
  589. package/dist/esm/bh-stepper.entry.js +2 -1
  590. package/dist/esm/bh-tab-item.entry.js +4 -3
  591. package/dist/esm/bh-table-header.entry.js +3 -2
  592. package/dist/esm/bh-tabs.entry.js +3 -2
  593. package/dist/esm/bh-tag-group.entry.js +3 -2
  594. package/dist/esm/bh-tag-input.entry.js +4 -3
  595. package/dist/esm/bh-textarea.entry.js +4 -3
  596. package/dist/esm/bh-toast-container.entry.js +1 -1
  597. package/dist/esm/bh-toast.entry.js +4 -3
  598. package/dist/esm/bh-toggle.entry.js +3 -2
  599. package/dist/esm/bh-trend-chart.entry.js +4 -3
  600. package/dist/esm/{component-error-handler-BVWQSuxn.js → component-error-handler-bgLpf9Pn.js} +1 -1
  601. package/dist/esm/error-boundary-afpK3NgJ.js +70 -0
  602. package/dist/esm/hotkeys-CBTS9Vhx.js +109 -0
  603. package/dist/esm/index-CTHvNfIu.js +20 -12
  604. package/dist/esm/loader.js +1 -1
  605. package/dist/esm/{error-boundary-YLeLKAYJ.js → logger-CMKOFHIa.js} +1 -68
  606. package/dist/locales/bh-appbar/de.json +4 -1
  607. package/dist/locales/bh-appbar/en.json +4 -1
  608. package/dist/locales/bh-appbar/es.json +4 -1
  609. package/dist/locales/bh-appbar/fr.json +4 -1
  610. package/dist/locales/bh-appbar/ja.json +4 -1
  611. package/dist/locales/bh-appbar/pt.json +4 -1
  612. package/dist/locales/bh-appbar/ru.json +4 -1
  613. package/dist/locales/bh-appbar/zh.json +4 -1
  614. package/dist/locales/bh-command-bar/de.json +13 -0
  615. package/dist/locales/bh-command-bar/en.json +13 -0
  616. package/dist/locales/bh-command-bar/es.json +13 -0
  617. package/dist/locales/bh-command-bar/fr.json +13 -0
  618. package/dist/locales/bh-command-bar/ja.json +13 -0
  619. package/dist/locales/bh-command-bar/pt.json +13 -0
  620. package/dist/locales/bh-command-bar/ru.json +13 -0
  621. package/dist/locales/bh-command-bar/zh.json +13 -0
  622. package/dist/types/components/bh-activity-feed/bh-activity-feed.d.ts +6 -0
  623. package/dist/types/components/bh-appbar/bh-appbar.d.ts +38 -0
  624. package/dist/types/components/bh-appbar/bh-notification-center/bh-notification-center.d.ts +108 -0
  625. package/dist/types/components/bh-breadcrumbs/bh-breadcrumbs.d.ts +8 -0
  626. package/dist/types/components/bh-command-bar/bh-command-bar.d.ts +131 -0
  627. package/dist/types/components/bh-command-bar/bh-command-bar.figma.d.ts +1 -0
  628. package/dist/types/components/bh-dropdown/bh-dropdown.d.ts +4 -0
  629. package/dist/types/components/bh-feed-item/bh-feed-item.d.ts +15 -0
  630. package/dist/types/components/bh-kbd/bh-kbd.d.ts +13 -0
  631. package/dist/types/components/bh-kbd/bh-kbd.figma.d.ts +1 -0
  632. package/dist/types/components/bh-property-switcher/bh-property-switcher.d.ts +2 -0
  633. package/dist/types/components/bh-sidebar/bh-sidebar.d.ts +14 -1
  634. package/dist/types/components/index.d.ts +3 -0
  635. package/dist/types/components.d.ts +541 -4
  636. package/dist/types/index.d.ts +2 -0
  637. package/dist/types/utils/hotkeys.d.ts +23 -0
  638. package/dist/types/utils/index.d.ts +1 -0
  639. package/hydrate/index.js +1021 -189
  640. package/hydrate/index.mjs +1021 -189
  641. package/llms.txt +4251 -286
  642. package/package.json +1 -1
  643. package/vscode-data.json +215 -0
  644. package/components/p-B7i48CAz.js +0 -1
  645. package/components/p-Bk-ipvH3.js +0 -1
  646. package/components/p-Cy98fCjm.js +0 -1
  647. package/components/p-i7ZvTRXV.js +0 -1
  648. package/dist/bellhop-core/p-008932dc.entry.js +0 -1
  649. package/dist/bellhop-core/p-03e002af.entry.js +0 -1
  650. package/dist/bellhop-core/p-062955a0.entry.js +0 -1
  651. package/dist/bellhop-core/p-0705eb78.entry.js +0 -1
  652. package/dist/bellhop-core/p-0a1548b0.entry.js +0 -1
  653. package/dist/bellhop-core/p-0a758a65.entry.js +0 -1
  654. package/dist/bellhop-core/p-0b3a286d.entry.js +0 -1
  655. package/dist/bellhop-core/p-0e60f7f5.entry.js +0 -1
  656. package/dist/bellhop-core/p-105d9352.entry.js +0 -1
  657. package/dist/bellhop-core/p-11eec77c.entry.js +0 -1
  658. package/dist/bellhop-core/p-1334408b.entry.js +0 -1
  659. package/dist/bellhop-core/p-141d68b7.entry.js +0 -1
  660. package/dist/bellhop-core/p-164db491.entry.js +0 -1
  661. package/dist/bellhop-core/p-170c4a62.entry.js +0 -1
  662. package/dist/bellhop-core/p-19739563.entry.js +0 -1
  663. package/dist/bellhop-core/p-1cfa274f.entry.js +0 -1
  664. package/dist/bellhop-core/p-1ddb2ef9.entry.js +0 -1
  665. package/dist/bellhop-core/p-22243198.entry.js +0 -1
  666. package/dist/bellhop-core/p-23acfc6a.entry.js +0 -1
  667. package/dist/bellhop-core/p-277693e6.entry.js +0 -1
  668. package/dist/bellhop-core/p-283eb6ee.entry.js +0 -1
  669. package/dist/bellhop-core/p-298d6782.entry.js +0 -1
  670. package/dist/bellhop-core/p-30f1e109.entry.js +0 -1
  671. package/dist/bellhop-core/p-31e952ed.entry.js +0 -1
  672. package/dist/bellhop-core/p-3254b058.entry.js +0 -1
  673. package/dist/bellhop-core/p-332a6b0d.entry.js +0 -1
  674. package/dist/bellhop-core/p-43c97303.entry.js +0 -1
  675. package/dist/bellhop-core/p-4b8fe1fa.entry.js +0 -1
  676. package/dist/bellhop-core/p-4d8b9186.entry.js +0 -1
  677. package/dist/bellhop-core/p-50b95dc8.entry.js +0 -1
  678. package/dist/bellhop-core/p-53006e0e.entry.js +0 -1
  679. package/dist/bellhop-core/p-53683664.entry.js +0 -1
  680. package/dist/bellhop-core/p-53dc8f16.entry.js +0 -1
  681. package/dist/bellhop-core/p-54d147b9.entry.js +0 -1
  682. package/dist/bellhop-core/p-56b090e1.entry.js +0 -1
  683. package/dist/bellhop-core/p-58eae3e6.entry.js +0 -1
  684. package/dist/bellhop-core/p-5d43f80b.entry.js +0 -1
  685. package/dist/bellhop-core/p-61aeccd7.entry.js +0 -1
  686. package/dist/bellhop-core/p-63303380.entry.js +0 -1
  687. package/dist/bellhop-core/p-63af6f45.entry.js +0 -1
  688. package/dist/bellhop-core/p-640aaf14.entry.js +0 -1
  689. package/dist/bellhop-core/p-6632ba13.entry.js +0 -1
  690. package/dist/bellhop-core/p-6807b97e.entry.js +0 -1
  691. package/dist/bellhop-core/p-6a725cbe.entry.js +0 -1
  692. package/dist/bellhop-core/p-6bfb6425.entry.js +0 -1
  693. package/dist/bellhop-core/p-6c4eb165.entry.js +0 -1
  694. package/dist/bellhop-core/p-72cd0a98.entry.js +0 -1
  695. package/dist/bellhop-core/p-74972e2e.entry.js +0 -1
  696. package/dist/bellhop-core/p-77a7967d.entry.js +0 -1
  697. package/dist/bellhop-core/p-79bc0c14.entry.js +0 -1
  698. package/dist/bellhop-core/p-7f2736ab.entry.js +0 -1
  699. package/dist/bellhop-core/p-83024333.entry.js +0 -1
  700. package/dist/bellhop-core/p-8c01d55f.entry.js +0 -1
  701. package/dist/bellhop-core/p-8d4654ea.entry.js +0 -1
  702. package/dist/bellhop-core/p-9429002f.entry.js +0 -1
  703. package/dist/bellhop-core/p-956ca990.entry.js +0 -1
  704. package/dist/bellhop-core/p-9b0d2d1d.entry.js +0 -1
  705. package/dist/bellhop-core/p-YLeLKAYJ.js +0 -1
  706. package/dist/bellhop-core/p-a0005573.entry.js +0 -1
  707. package/dist/bellhop-core/p-a26f1ec0.entry.js +0 -1
  708. package/dist/bellhop-core/p-a42cca95.entry.js +0 -1
  709. package/dist/bellhop-core/p-a7153865.entry.js +0 -1
  710. package/dist/bellhop-core/p-a7608d57.entry.js +0 -1
  711. package/dist/bellhop-core/p-a94d36ae.entry.js +0 -1
  712. package/dist/bellhop-core/p-a9644488.entry.js +0 -1
  713. package/dist/bellhop-core/p-aac0f3c1.entry.js +0 -1
  714. package/dist/bellhop-core/p-aae7e90e.entry.js +0 -1
  715. package/dist/bellhop-core/p-ac2d706c.entry.js +0 -1
  716. package/dist/bellhop-core/p-b21105d4.entry.js +0 -1
  717. package/dist/bellhop-core/p-b7995c47.entry.js +0 -1
  718. package/dist/bellhop-core/p-bacf8b19.entry.js +0 -1
  719. package/dist/bellhop-core/p-bf2f5dbd.entry.js +0 -1
  720. package/dist/bellhop-core/p-c10aff52.entry.js +0 -1
  721. package/dist/bellhop-core/p-c30fcfcb.entry.js +0 -1
  722. package/dist/bellhop-core/p-c581c876.entry.js +0 -1
  723. package/dist/bellhop-core/p-c97c166b.entry.js +0 -1
  724. package/dist/bellhop-core/p-cb19b35b.entry.js +0 -1
  725. package/dist/bellhop-core/p-cb1dde19.entry.js +0 -1
  726. package/dist/bellhop-core/p-cf8c9d85.entry.js +0 -1
  727. package/dist/bellhop-core/p-d3816b20.entry.js +0 -1
  728. package/dist/bellhop-core/p-d4107350.entry.js +0 -1
  729. package/dist/bellhop-core/p-d59fdc08.entry.js +0 -1
  730. package/dist/bellhop-core/p-d77016ec.entry.js +0 -1
  731. package/dist/bellhop-core/p-dd1e6138.entry.js +0 -1
  732. package/dist/bellhop-core/p-dd6f2996.entry.js +0 -1
  733. package/dist/bellhop-core/p-e082bce2.entry.js +0 -1
  734. package/dist/bellhop-core/p-e0e28b1f.entry.js +0 -1
  735. package/dist/bellhop-core/p-e4a47861.entry.js +0 -1
  736. package/dist/bellhop-core/p-e74a03e3.entry.js +0 -1
  737. package/dist/bellhop-core/p-e9168244.entry.js +0 -1
  738. package/dist/bellhop-core/p-ea1fe131.entry.js +0 -1
  739. package/dist/bellhop-core/p-ecf1b0c4.entry.js +0 -1
  740. package/dist/bellhop-core/p-f16e07ca.entry.js +0 -1
  741. package/dist/bellhop-core/p-f2d2abb2.entry.js +0 -1
  742. package/dist/bellhop-core/p-f8f6e900.entry.js +0 -1
  743. package/dist/bellhop-core/p-fbdeab71.entry.js +0 -1
  744. package/dist/bellhop-core/p-fcb058cf.entry.js +0 -1
  745. package/dist/cjs/bh-activity-feed.cjs.entry.js +0 -71
  746. package/dist/cjs/bh-feed-item.cjs.entry.js +0 -82
  747. package/dist/esm/bh-activity-feed.entry.js +0 -69
  748. package/dist/esm/bh-feed-item.entry.js +0 -80
@@ -1 +1 @@
1
- import{p as t,H as e,c as i,h as r,d as o,t as a}from"./p-YZi6LqIt.js";import{h as s,c as l,g as d,a as n,b as h}from"./p-D1dU_VEW.js";import{v as c}from"./p-DlPm3fIV.js";import{d as p}from"./p-BbPrWlsw.js";import{c as g,d as v}from"./p-BR00DQQ7.js";import{d as f}from"./p-QCa_P3zY.js";import{c as b,m as u,M as m,r as x}from"./p-BJXjqxlX.js";import{c as w}from"./p-Dmpif9C-.js";import{c as y,t as k,a as F}from"./p-CqAYzGVs.js";import{B as C,r as S}from"./p-BNVOtH-1.js";import{K as D}from"./p-zdFuIabL.js";const T=["=","+","-","@","\t","\r"],E="\0";function M(t,e){if(!e.length)return t;const i=new Map(e.filter((t=>t.selectedValues.length>0)).map((t=>[t.dataField,new Set(t.selectedValues)])));return 0===i.size?t:t.filter((t=>{for(const[e,r]of i)if(!r.has(t[e]))return!1;return!0}))}function A(t,e,i){const r=i&&i.length>0?M(t,i.filter((t=>t.dataField!==e))):t,o=new Set,a=[];for(const t of r){const i=t[e];o.has(i)||(o.add(i),a.push(i))}return a.toSorted(((t,e)=>(t+"").localeCompare(e+"")))}class z{sum=0;count=0;min=1/0;max=-1/0;values=[];add(t){if(null==t)return;this.count++;const e=Number(t);Number.isFinite(e)&&(this.sum+=e,e<this.min&&(this.min=e),e>this.max&&(this.max=e)),this.values.push(t)}getValue(t,e){if(0===this.count)return null;switch(t){case"sum":default:return this.sum;case"count":return this.count;case"avg":return this.sum/this.count;case"min":return this.min===1/0?null:this.min;case"max":return this.max===-1/0?null:this.max;case"custom":return e?e(this.values):null}}}function P(t,e,i,r,o,a){const s="number"==typeof t&&Number.isFinite(t)?1:Array.isArray(t)?t.length:0,l=function(t,e,i){if(null==t)return"";const r=e.format;if(r?.formatter)return r.formatter(t)+"";if("currency"===r?.type){const e={style:"currency",currency:r.currency??"USD",minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("percent"===r?.type){const e={style:"percent",minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("decimal"===r?.type){const e={minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("date"===r?.type||"datetime"===r?.type){const e=t instanceof Date?t:new Date(t+"");return Number.isNaN(e.getTime())?t+"":new Intl.DateTimeFormat(void 0,r.dateFormat??("datetime"===r.type?{dateStyle:"short",timeStyle:"short"}:{dateStyle:"short"})).format(e)}if("count"===i||"sum"===i||"avg"===i||"min"===i||"max"===i){const e=Number(t);if(Number.isFinite(e))return e.toFixed(r?.precision??2)}return t+""}(t,r,o);return{value:t,formattedValue:l,rowPath:[...e],columnPath:[...i],isSummary:a,dataField:r.dataField,summaryType:o??"sum",count:s}}function I(t){return t.join(E)}function R(t,e){return e.map((e=>(t[e.dataField]??"")+""))}function H(t,e){return e.map((e=>(t[e.dataField]??"")+""))}const N=",";function B(t,e={}){const{fileName:i="pivot-export",includeTotals:r=!0,delimiter:o=N,includeBOM:a=!0}=e,s=function(t,e={}){const{includeTotals:i=!0}=e,r=[],o=[""];for(const e of t.columnHeaders)o.push(e.caption||"");i&&t.rowGrandTotals.length>0&&o.push("Grand Total"),r.push(o);for(const[e,o]of t.cells.entries()){const a=[t.rowHeaders[e]?.caption??""];for(const t of o)a.push(t?.formattedValue??"");i&&t.rowGrandTotals[e]&&a.push(t.rowGrandTotals[e].formattedValue??""),r.push(a)}if(i&&t.columnGrandTotals.length>0){const e=["Grand Total"];for(const i of t.columnGrandTotals)e.push(i.formattedValue??"");t.grandTotal&&e.push(t.grandTotal.formattedValue??""),r.push(e)}return r}(t,{includeTotals:r}),l=s.map((t=>t.map((t=>function(t,e){const i=function(t){if(null==t)return"";const e=t+"";return T.some((t=>e.startsWith(t)))?"'"+e:e}(t);return i.includes(e)||i.includes('"')||i.includes("\n")||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}(t+"",o))).join(o))).join("\n");!function(t,e){const i=URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=e,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)}(new Blob([(a?"\ufeff":"")+l],{type:"text/csv;charset=utf-8;"}),i.replace(/\.csv$/i,"")+".csv")}function L(t){return"bh-pivot-grid-state-"+t}function G(t){if(null==t||"object"!=typeof t)return!1;const e=t;return"number"==typeof e.version&&Array.isArray(e.fields)&&Array.isArray(e.rowExpandedPaths)&&Array.isArray(e.columnExpandedPaths)&&Array.isArray(e.filters)&&Array.isArray(e.sorting)}function O(t){if(!t.enable||!t.stateStorageKey)return;const e=t.storage??("undefined"==typeof localStorage?void 0:localStorage);if(e)try{const i=L(t.stateStorageKey),r={...t.state,version:1};e.setItem(i,JSON.stringify(r)),t.onSave?.(t.state)}catch(t){}}const V={grandTotal:"Grand Total",total:"Total",noData:"No Data",dataNotAvailable:"Data not available",showFieldChooser:"Show Field Chooser",exportToExcel:"Export to CSV",expandAll:"Expand All",collapseAll:"Collapse All",allFields:"All Fields",rowFields:"Row Fields",columnFields:"Column Fields",dataFields:"Data Fields",filterFields:"Filter Fields",columnFieldArea:"Drop Column Fields Here",dataFieldArea:"Drop Data Fields Here",filterFieldArea:"Drop Filter Fields Here",rowFieldArea:"Drop Row Fields Here",removeAllSorting:"Remove All Sorting",sortColumnBySummary:"Sort {0} by This Column",sortRowBySummary:"Sort {0} by This Row",cancel:"Cancel",ok:"OK",emptyValue:"(Blanks)"},j=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bhCellClick=i(this,"bhCellClick"),this.bhCellPrepared=i(this,"bhCellPrepared"),this.bhFieldChange=i(this,"bhFieldChange"),this.bhFieldDragStart=i(this,"bhFieldDragStart"),this.bhFieldDragEnd=i(this,"bhFieldDragEnd"),this.bhExpandChange=i(this,"bhExpandChange"),this.bhStateLoad=i(this,"bhStateLoad"),this.bhStateSave=i(this,"bhStateSave"),this.bhExport=i(this,"bhExport"),this.bhExporting=i(this,"bhExporting"),this.bhContextMenuPreparing=i(this,"bhContextMenuPreparing"),this.bhReady=i(this,"bhReady"),this.bhDisposing=i(this,"bhDisposing"),this.bhError=i(this,"bhError")}get el(){return this}logger=b("bh-pivot-grid");handleError=w({componentName:"bh-pivot-grid",emitError:t=>this.bhError.emit({error:t}),logger:this.logger});destroy$=y();listeners=g();i18nUnsubscribe;_i18nVersion=0;data=[];dataSource;fields=[];showRowGrandTotals=!0;showColumnGrandTotals=!0;showRowTotals=!0;showColumnTotals=!0;totalPosition="after";showTotalsPrior="none";rowHeaderLayout="standard";wordWrapEnabled=!1;hideEmptySummaryCells=!1;dataFieldArea="column";showBorders=!0;disabled=!1;encodeHtml=!0;showFieldPanel=!0;showRowFields=!0;showColumnFields=!0;showDataFields=!0;showFilterFields=!0;allowFieldDragging=!0;showFieldChooserButton=!0;fieldChooserEnabled=!0;fieldChooserApplyMode="instantly";fieldChooserTitle="Field Chooser";fieldChooserWidth=400;fieldChooserHeight=500;allowFiltering=!0;showHeaderFilter=!0;headerFilterHeight=300;headerFilterWidth=250;headerFilterAllowSelectAll=!0;headerFilterShowRelevantValues=!1;headerFilterSearchEnabled=!0;headerFilterSearchMode="contains";headerFilterSearchTimeout=500;allowSorting=!0;allowSortingBySummary=!0;allowExpandAll=!0;rowExpandedPaths=[];columnExpandedPaths=[];enableExport=!0;showExportButton=!0;exportFileName="pivot-export";exportIncludeTotals=!0;enableStatePersistence=!1;stateStorageKey;stateStorageType="localStorage";stateSavingTimeout=2e3;loading=!1;loadingType="spinner";emptyTitle="No data";emptyDescription="Configure fields to see data.";ariaLabel="Pivot grid";focusTabIndex=0;texts={};fieldChooserOpen=!1;effectiveData=[];matrix=null;dragData=null;dropTargetArea=null;filters=[];sorting=[];focusedCellRow=0;focusedCellCol=0;liveAnnouncement="";contextMenuVisible=!1;contextMenuX=0;contextMenuY=0;contextMenuItems=[];headerFilterOpenField=null;headerFilterPendingValues=[];headerFilterSearchQuery="";headerFilterAnchorX=0;headerFilterAnchorY=0;activeCellEl=null;focusMovedByKeyboard=!1;contextMenuClickOutsideHandler=null;headerFilterClickOutsideHandler=null;bhCellClick;bhCellPrepared;bhFieldChange;bhFieldDragStart;bhFieldDragEnd;bhExpandChange;bhStateLoad;bhStateSave;bhExport;bhExporting;bhContextMenuPreparing;bhReady;bhDisposing;bhError;onDataChange(){this.syncEffectiveData()}onMatrixInputsChange(){this.rebuildMatrix(),this.scheduleStateSave()}syncEffectiveData(){if(this.dataSource?.store){const t=this.dataSource.store;this.effectiveData=Array.isArray(t)?t:t.data??[]}else this.effectiveData=Array.isArray(this.data)?this.data:[];this.rebuildMatrix()}scheduleStateSave(){this.enableStatePersistence&&this.stateStorageKey&&this.destroy$&&k(this.stateSavingTimeout,this.destroy$)?.subscribe((async()=>{const t=await this.getState();O({enable:!0,stateStorageKey:this.stateStorageKey,state:t,onSave:t=>this.bhStateSave.emit({state:t})})}))}rebuildMatrix(){if(this.effectiveData.length>0&&this.fields.length>0)try{this.matrix=function(t){const{data:e,fields:i,rowExpandedPaths:r=[],columnExpandedPaths:o=[],filters:a=[],sorting:s=[],showRowGrandTotals:l=!0,showColumnGrandTotals:d=!0}=t,n=a.length>0?M(e,a):e,h=i.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))),c=i.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))),p=i.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)));if(0===h.length&&0===c.length)return null;if(0===p.length)return null;if(0===n.length)return function(t,e,i){const r=i[0];return{rowHeaders:[],columnHeaders:[],cells:[],rowGrandTotals:[],columnGrandTotals:[],grandTotal:P(null,[],[],r,r?.summaryType??"sum",!0),rowCount:0,columnCount:0}}(0,0,p);const g=new Map,v=new Set(r.map((t=>I(t)))),f=new Set(o.map((t=>I(t))));for(const t of n){const e=R(t,h),i=H(t,c),r=I(e),o=I(i);let a=g.get(r);a||(a=new Map,g.set(r,a));let s=a.get(o);s||(s=new Map,a.set(o,s));for(const e of p){let i=s.get(e.dataField);i||(i=new z,s.set(e.dataField,i)),i.add(t[e.dataField])}}let b=Array.from(g.keys()).map((t=>t.split(E))).toSorted(((t,e)=>I(t).localeCompare(I(e))));const u=new Set;for(const t of g.values())for(const e of t.keys())u.add(e);let m=Array.from(u).map((t=>t.split(E))).toSorted(((t,e)=>I(t).localeCompare(I(e))));const x=h[0]?s.find((t=>t.dataField===h[0].dataField)):void 0,w=c[0]?s.find((t=>t.dataField===c[0].dataField)):void 0,y=(t,e,i)=>{const r=I(t).localeCompare(I(e));return"desc"===i?-r:r};x&&(b=b.toSorted(((t,e)=>y(t,e,x.sortOrder)))),w&&(m=m.toSorted(((t,e)=>y(t,e,w.sortOrder))));const k=[],F=[],C=[],S=new Map,D=new Map,T=new Map;for(const t of p){let e=T.get(t.dataField);e||(e=new z,T.set(t.dataField,e));for(const i of n)e.add(i[t.dataField])}for(const t of b){const e=I(t),i=g.get(e),r=[];let o=S.get(e);o||(o=new Map,S.set(e,o));for(const e of m){const a=I(e),s=i.get(a),l=p[0],d=l.summaryType??"sum";if(!s||!s.has(l.dataField)){r.push(P(null,t,e,l,d,!1));continue}const n=s.get(l.dataField).getValue(d,l.calculateCustomSummary);r.push(P(n,t,e,l,d,!1));for(const t of p){const e=s.get(t.dataField);if(e){let i=o.get(t.dataField);i||(i=new z,o.set(t.dataField,i)),i.sum+=e.sum,i.count+=e.count,i.values.push(...e.values),Number.isFinite(e.min)&&(i.min=Math.min(i.min,e.min)),Number.isFinite(e.max)&&(i.max=Math.max(i.max,e.max))}}let h=D.get(a);h||(h=new Map,D.set(a,h));for(const t of p){const e=s.get(t.dataField);if(e){let i=h.get(t.dataField);i||(i=new z,h.set(t.dataField,i)),i.sum+=e.sum,i.count+=e.count,i.values.push(...e.values),Number.isFinite(e.min)&&(i.min=Math.min(i.min,e.min)),Number.isFinite(e.max)&&(i.max=Math.max(i.max,e.max))}}}if(k.push(r),l&&p.length>0){const e=p[0],i=o.get(e.dataField),r=i?i.getValue(e.summaryType??"sum",e.calculateCustomSummary):null;F.push(P(r,t,[],e,e.summaryType??"sum",!0))}}if(d&&p.length>0){const t=p[0];for(const e of m){const i=I(e),r=D.get(i),o=r?.get(t.dataField),a=o?o.getValue(t.summaryType??"sum",t.calculateCustomSummary):null;C.push(P(a,[],e,t,t.summaryType??"sum",!0))}}const A=p.length>0?(()=>{const t=p[0],e=T.get(t.dataField);return P(e?e.getValue(t.summaryType??"sum",t.calculateCustomSummary):null,[],[],t,t.summaryType??"sum",!0)})():P(null,[],[],p[0],"sum",!0),N=function(t,e,i){if(0===e.length)return[];const r=e[0],o=new Set,a=[];let s=0;for(const e of t){const l=e.slice(0,1),d=I(l);if(o.has(d))continue;o.add(d);const n=e[0]||"",h=t.some((t=>t.length>1&&I(t.slice(0,1))===d)),c=h&&i.has(d);a.push({key:d,path:[...l],caption:n,level:0,span:1,expanded:c,expandable:h,children:[],field:r,index:s++})}return a}(b,h,v),B=function(t,e,i){if(0===e.length)return[];const r=e[0],o=new Set,a=[];let s=0;for(const e of t){const l=e.slice(0,1),d=I(l);if(o.has(d))continue;o.add(d);const n=e[0]||"",h=t.some((t=>t.length>1&&I(t.slice(0,1))===d)),c=h&&i.has(d);a.push({key:d,path:[...l],caption:n,level:0,span:1,expanded:c,expandable:h,children:[],field:r,index:s++})}return a}(m,c,f);return{rowHeaders:N,columnHeaders:B,cells:k,rowGrandTotals:F,columnGrandTotals:C,grandTotal:A,rowCount:b.length,columnCount:m.length}}({data:this.effectiveData,fields:this.fields,rowExpandedPaths:this.rowExpandedPaths,columnExpandedPaths:this.columnExpandedPaths,filters:this.filters,sorting:this.sorting,showRowGrandTotals:this.showRowGrandTotals,showColumnGrandTotals:this.showColumnGrandTotals})}catch(t){this.handleError(t),this.matrix=null}else this.matrix=null}componentWillLoad(){this.enableStatePersistence&&this.stateStorageKey&&function(t){if(!t.stateStorageKey)return null;const e=t.storage??("undefined"==typeof localStorage?void 0:localStorage);if(!e)return null;try{const i=L(t.stateStorageKey),r=e.getItem(i);if(!r)return t.onLoad(null),null;const o=c(r,G);if(!o.valid||null==o.value)return t.onLoad(null),null;const a=function(t){return(t.version??0)>=1?t:{version:1,fields:t.fields??[],rowExpandedPaths:t.rowExpandedPaths??[],columnExpandedPaths:t.columnExpandedPaths??[],filters:t.filters??[],sorting:t.sorting??[]}}(o.value);return t.onLoad(a),a}catch(e){return t.onLoad(null),null}}({enable:!0,stateStorageKey:this.stateStorageKey,storage:"sessionStorage"===this.stateStorageType&&"undefined"!=typeof sessionStorage?sessionStorage:void 0,onLoad:t=>{t&&(this.bhStateLoad.emit({state:t}),this.rowExpandedPaths=t.rowExpandedPaths??[],this.columnExpandedPaths=t.columnExpandedPaths??[],this.filters=t.filters??[],this.sorting=t.sorting??[],t.fields?.length&&this.fields.length>0&&(this.fields=this.fields.map((e=>{const i=t.fields.find((t=>t.dataField===e.dataField));return i?{...e,area:i.area,areaIndex:i.areaIndex,visible:i.visible,sortOrder:i.sortOrder}:e}))))}}),this.syncEffectiveData(),u.increment(m.EVENT_EMIT,{component:"bh-pivot-grid",event:"load"}),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++})),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++})),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++}))}componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:Error(t+"")),u.increment(m.COMPONENT_ERROR,{component:"bh-pivot-grid",error_type:t instanceof Error?t.name:"unknown"}),x("bh-pivot-grid",t),this.bhError.emit({error:t})}componentDidLoad(){this.bhReady.emit()}disconnectedCallback(){this.bhDisposing.emit(),F(this.destroy$),this.listeners.removeAll(),this.i18nUnsubscribe?.()}async expandAll(){if(!this.matrix)return;const t=this.collectExpandablePaths(this.matrix.rowHeaders),e=this.collectExpandablePaths(this.matrix.columnHeaders);this.rowExpandedPaths=t,this.columnExpandedPaths=e,this.bhExpandChange.emit({path:[],expanded:!0,type:"row"}),this.bhExpandChange.emit({path:[],expanded:!0,type:"column"})}async collapseAll(){this.rowExpandedPaths=[],this.columnExpandedPaths=[],this.bhExpandChange.emit({path:[],expanded:!1,type:"row"}),this.bhExpandChange.emit({path:[],expanded:!1,type:"column"})}async expandRow(t){const e=t.join(E);this.rowExpandedPaths.some((t=>t.join(E)===e))||(this.rowExpandedPaths=[...this.rowExpandedPaths,t]),this.bhExpandChange.emit({path:t,expanded:!0,type:"row"})}async collapseRow(t){const e=t.join(E);this.rowExpandedPaths=this.rowExpandedPaths.filter((t=>t.join(E)!==e)),this.bhExpandChange.emit({path:t,expanded:!1,type:"row"})}async expandColumn(t){const e=t.join(E);this.columnExpandedPaths.some((t=>t.join(E)===e))||(this.columnExpandedPaths=[...this.columnExpandedPaths,t]),this.bhExpandChange.emit({path:t,expanded:!0,type:"column"})}async collapseColumn(t){const e=t.join(E);this.columnExpandedPaths=this.columnExpandedPaths.filter((t=>t.join(E)!==e)),this.bhExpandChange.emit({path:t,expanded:!1,type:"column"})}collectExpandablePaths(t){const e=[];for(const i of t)i.expandable&&e.push(i.path),i.children.length>0&&e.push(...this.collectExpandablePaths(i.children));return e}async getState(){return{version:1,fields:this.fields.map((t=>({dataField:t.dataField,area:t.area,areaIndex:t.areaIndex,visible:t.visible,sortOrder:t.sortOrder}))),rowExpandedPaths:[...this.rowExpandedPaths],columnExpandedPaths:[...this.columnExpandedPaths],filters:this.filters.map((t=>({dataField:t.dataField,selectedValues:[...t.selectedValues]}))),sorting:this.sorting.map((t=>({...t})))}}async setState(t){this.rowExpandedPaths=t.rowExpandedPaths??[],this.columnExpandedPaths=t.columnExpandedPaths??[],this.filters=t.filters??[],this.sorting=t.sorting??[],t.fields?.length&&(this.fields=t.fields.map((t=>({...this.fields.find((e=>e.dataField===t.dataField)),dataField:t.dataField,area:t.area,areaIndex:t.areaIndex,visible:t.visible,sortOrder:t.sortOrder})))),this.rebuildMatrix()}async resetState(){this.rowExpandedPaths=[],this.columnExpandedPaths=[],this.filters=[],this.sorting=[],this.rebuildMatrix()}async saveState(){const t=await this.getState();this.bhStateSave.emit({state:t})}async saveStateImmediate(){if(!this.enableStatePersistence||!this.stateStorageKey)return;const t=await this.getState();O({enable:!0,stateStorageKey:this.stateStorageKey,state:t,storage:"sessionStorage"===this.stateStorageType&&"undefined"!=typeof sessionStorage?sessionStorage:void 0,onSave:t=>this.bhStateSave.emit({state:t})})}async loadState(){this.bhStateLoad.emit({state:null})}async getFields(){return[...this.fields]}async getFieldsByArea(t){return this.fields.filter((e=>e.area===t))}async moveField(t,e,i){const r=this.fields.findIndex((e=>e.dataField===t));if(-1===r)return;const o=this.fields.map((t=>({...t}))),a=o[r];a.area=e;const s=o.toSpliced(r,1),l=s.filter((t=>t.area===e));a.areaIndex=void 0===i?l.length:Math.min(i,l.length);const d=["row","column","data","filter"],n=[...s,a].toSorted(((t,e)=>d.indexOf(t.area??"row")-d.indexOf(e.area??"row")||(t.areaIndex??0)-(e.areaIndex??0)));for(const t of d){const e=n.filter((e=>(e.area??"row")===t));for(const[t,i]of e.entries())i.areaIndex=t}this.fields=n,this.bhFieldChange.emit({fields:s,changeType:"move"}),this.scheduleStateSave()}async updateField(t,e){const i=this.fields.findIndex((e=>e.dataField===t));if(-1===i)return;const r=this.fields.map((t=>({...t})));r[i]={...r[i],...e},this.fields=r,this.bhFieldChange.emit({fields:r,changeType:"update"}),this.scheduleStateSave()}async refresh(){this.syncEffectiveData()}async getMatrix(){return this.matrix}async exportTo(t,e){const i=e?.fileName??this.exportFileName,r=e?.includeTotals??this.exportIncludeTotals;this.bhExporting.emit({format:"csv",fileName:i,includeTotals:r}),this.matrix&&B(this.matrix,{fileName:i,includeTotals:r,includeBOM:!0}),this.bhExport.emit({format:"csv",rowCount:this.matrix?.rowCount??0,columnCount:this.matrix?.columnCount??0,fileName:i,includeTotals:r})}async showFieldChooser(){this.fieldChooserOpen=!0}async hideFieldChooser(){this.fieldChooserOpen=!1}onFieldDragStart=(t,e)=>{if(!s(t,e,this.allowFieldDragging))return;const i=e.area??"row";this.dragData={dataField:e.dataField,sourceArea:i},this.bhFieldDragStart.emit({field:e,sourceArea:i,event:t})};onFieldDragEnd=t=>{const e=this.fields.find((t=>t.dataField===this.dragData?.dataField)),i=this.dragData?.sourceArea??"row";l(),this.dragData=null,this.dropTargetArea=null,e&&this.bhFieldDragEnd.emit({field:e,sourceArea:i,event:t})};onFieldDragOver=(t,e)=>{const i=this.dragData??d(t);n(t,e,i)&&(this.dropTargetArea=e)};onFieldDragLeave=()=>{this.dropTargetArea=null};onFieldDrop=(t,e)=>{const i=d(t),r=h(t,e,i,this.fields);this.dropTargetArea=null,this.dragData=null,l(),r&&(this.fields=r.fields,this.bhFieldChange.emit({fields:r.fields,changeType:r.changeType}),this.scheduleStateSave())};setFilterSelectedValues=(t,e)=>{const i=this.filters.filter((e=>e.dataField!==t));e.length>0&&i.push({dataField:t,selectedValues:e}),this.filters=i,this.rebuildMatrix(),this.scheduleStateSave()};toggleSort=t=>{const e=this.sorting.find((e=>e.dataField===t)),i=e?"asc"===e.sortOrder?"desc":void 0:"asc",r=i?this.sorting.filter((e=>e.dataField!==t)).concat([{dataField:t,sortOrder:i}]):this.sorting.filter((e=>e.dataField!==t));this.sorting=r,this.rebuildMatrix(),this.scheduleStateSave()};getSortOrder(t){const e=this.sorting.find((e=>e.dataField===t));return e?.sortOrder??null}closeContextMenu=()=>{this.contextMenuVisible=!1,this.contextMenuClickOutsideHandler&&(this.listeners.remove(document,"click",this.contextMenuClickOutsideHandler),this.contextMenuClickOutsideHandler=null)};openHeaderFilter=(t,e,i)=>{this.headerFilterOpenField=t,this.headerFilterPendingValues=[...e],this.headerFilterSearchQuery="",this.headerFilterAnchorX=i.left,this.headerFilterAnchorY=i.bottom,this.headerFilterClickOutsideHandler=t=>{const e=t.target;this.el?.shadowRoot?.querySelector(".pivot-grid-header-filter-popup")?.contains(e)||this.closeHeaderFilter()},this.destroy$&&k(0,this.destroy$)?.subscribe((()=>{this.headerFilterClickOutsideHandler&&this.listeners.add(document,"click",this.headerFilterClickOutsideHandler)}))};closeHeaderFilter=()=>{const t=this.headerFilterClickOutsideHandler;this.headerFilterOpenField=null,this.headerFilterPendingValues=[],this.headerFilterSearchQuery="",this.headerFilterClickOutsideHandler=null,t&&this.listeners.remove(document,"click",t)};applyHeaderFilter=()=>{this.headerFilterOpenField&&this.setFilterSelectedValues(this.headerFilterOpenField,this.headerFilterPendingValues),this.closeHeaderFilter()};toggleHeaderFilterValue=t=>{const e=new Set(this.headerFilterPendingValues);e.has(t)?e.delete(t):e.add(t),this.headerFilterPendingValues=Array.from(e)};setHeaderFilterSelectAll=(t,e)=>{this.headerFilterPendingValues=t?[...e]:[]};onTableContextMenu=t=>{if(this.disabled)return;t.preventDefault();const e=this.resolvedTexts,i=[];this.allowExpandAll&&(i.push({id:"expand-all",text:e.expandAll,onClick:()=>this.expandAll()}),i.push({id:"collapse-all",text:e.collapseAll,onClick:()=>this.collapseAll()})),this.allowSorting&&this.sorting.length>0&&i.push({id:"remove-sort",text:e.removeAllSorting,onClick:()=>{this.sorting=[],this.rebuildMatrix(),this.scheduleStateSave()}});const r={target:"cell",items:i,event:t,cancel:!1};this.bhContextMenuPreparing.emit(r),r.cancel||(this.contextMenuItems=r.items,this.contextMenuX=t.clientX,this.contextMenuY=t.clientY,this.contextMenuVisible=!0,this.contextMenuClickOutsideHandler=()=>this.closeContextMenu(),this.destroy$&&k(0,this.destroy$)?.subscribe((()=>{this.contextMenuClickOutsideHandler&&this.listeners.add(document,"click",this.contextMenuClickOutsideHandler)})))};handleGridKeyDown=t=>{if(this.contextMenuVisible&&t.key===D.ESCAPE)return t.preventDefault(),void this.closeContextMenu();if(this.headerFilterOpenField&&t.key===D.ESCAPE)return t.preventDefault(),void this.closeHeaderFilter();if(this.disabled||!this.matrix)return;const e=this.matrix.cells.length,i=(this.matrix.cells[0]?.length??0)+(this.showRowGrandTotals?1:0);if(0===e||0===i)return;this.focusedCellRow=Math.max(0,Math.min(this.focusedCellRow,e-1)),this.focusedCellCol=Math.max(0,Math.min(this.focusedCellCol,i-1));let r=this.focusedCellRow,o=this.focusedCellCol,a=!1;switch(t.key){case D.ARROW_UP:t.preventDefault(),r=Math.max(0,this.focusedCellRow-1),a=!0;break;case D.ARROW_DOWN:t.preventDefault(),r=Math.min(e-1,this.focusedCellRow+1),a=!0;break;case D.ARROW_LEFT:t.preventDefault(),o=Math.max(0,this.focusedCellCol-1),a=!0;break;case D.ARROW_RIGHT:t.preventDefault(),o=Math.min(i-1,this.focusedCellCol+1),a=!0;break;case D.HOME:t.preventDefault(),(t.ctrlKey||t.metaKey)&&(r=0),o=0,a=!0;break;case D.END:t.preventDefault(),(t.ctrlKey||t.metaKey)&&(r=e-1),o=i-1,a=!0;break;case D.ENTER:case D.SPACE:{t.preventDefault();const e=this.matrix.cells[this.focusedCellRow],i=e&&this.focusedCellCol<e.length?e[this.focusedCellCol]:null;return void(i&&this.bhCellClick.emit({cell:i,rowPath:i.rowPath,columnPath:i.columnPath,event:t}))}}if(a&&(r!==this.focusedCellRow||o!==this.focusedCellCol)){this.focusedCellRow=r,this.focusedCellCol=o,this.focusMovedByKeyboard=!0;const t=this.matrix.cells[r],e=t&&o<t.length+(this.showRowGrandTotals?1:0)?t[o]:null,i=e?.formattedValue??"";this.liveAnnouncement=`${this.ariaLabel}, row ${r+1}, column ${o+1}${i?", "+i:""}`}};get resolvedTexts(){return{...V,...this.texts}}get rowTotalsPrior(){return"rows"===this.showTotalsPrior||"both"===this.showTotalsPrior}get colTotalsPrior(){return"columns"===this.showTotalsPrior||"both"===this.showTotalsPrior}render(){const t=this.resolvedTexts,e=!(this.effectiveData.length>0&&this.fields.length>0),i=this.matrix,a=null==i?void 0:i.rowCount+(this.showRowGrandTotals?1:0)+(this.showColumnGrandTotals?1:0)+"",s=null==i?void 0:i.columnCount+(this.showRowGrandTotals?1:0)+(this.showColumnGrandTotals?1:0)+"";return r(o,{key:"4fc93ab072c0e03fbfd9d9a8bc21520f09d7d6bf","aria-disabled":this.disabled?"true":void 0,"aria-label":S("bh-pivot-grid","ariaLabel",this.ariaLabel,"Pivot grid"),class:"pivot-grid-root",onFocus:t=>{this.matrix&&t.target===this.el&&this.activeCellEl&&this.activeCellEl.focus()},onKeyDown:this.handleGridKeyDown,role:"grid",tabindex:this.disabled?-1:this.focusTabIndex},r("div",{key:"4a254af3c571045791756e3a23e42741184f6322","aria-atomic":"true","aria-live":"polite",class:"pivot-grid-live-region",role:"status"},this.liveAnnouncement),r("div",{key:"0d050f0024f35365dd91e2feef1573e942595f6f",class:"pivot-grid-root"},this.showFieldPanel&&r("div",{key:"1a3cd6c572c4acd747af775faef1ba59b062133b",class:"pivot-grid-toolbar",part:"toolbar"},r("slot",{key:"04f504dba0a53e82eb6aabf699da2a0f580dd353",name:"toolbar-start"}),this.showFieldChooserButton&&this.fieldChooserEnabled&&r("button",{key:"b961d63c05039eb4b0ae03f4fc235e401f5a0999","aria-label":t.showFieldChooser,class:"pivot-grid-toolbar-btn",disabled:this.disabled,onClick:()=>this.showFieldChooser(),type:"button"},t.showFieldChooser),this.enableExport&&this.showExportButton&&r("button",{key:"5e28936efd931998fc105e9c89c8c01906a9cfd3","aria-label":t.exportToExcel,class:"pivot-grid-toolbar-btn",disabled:this.disabled,onClick:()=>this.exportTo("csv"),type:"button"},t.exportToExcel),r("slot",{key:"98c24a2584b304ff9643ed03f50b39ab13722747",name:"toolbar-end"})),this.showFieldPanel&&r("div",{key:"eb57a40e286d1e5a28d97cafd2ba91c8b7681b48",class:"pivot-grid-field-panel",part:"field-panel"},this.showRowFields&&r("div",{key:"582a2235e1935dd87a937cbfe6184cd1addb56c4",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"row"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"row"),onDrop:t=>this.onFieldDrop(t,"row"),part:"field-area-row"},r("span",{key:"03b10fd67a23237eef9f7e962819e8d25237150d",class:"pivot-grid-field-area-label"},t.rowFields),r("div",{key:"92c89eefbd1ccbdd3162b4eff0bc03015d56613a",class:"pivot-grid-field-chips"},this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField))))),this.showColumnFields&&r("div",{key:"8a7804638effbe22d6d75e9709f23d4f536bd568",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"column"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"column"),onDrop:t=>this.onFieldDrop(t,"column"),part:"field-area-column"},r("span",{key:"dd42b40f8b553ee3dffb8516cfe628c701307edb",class:"pivot-grid-field-area-label"},t.columnFields),r("div",{key:"5b93a9bfb3bebf7d822103fe688e34ef0c935229",class:"pivot-grid-field-chips"},this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField))))),this.showDataFields&&r("div",{key:"3c2057c100aeaad7c9290bd01ce2e5f3ea0e89d6",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"data"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"data"),onDrop:t=>this.onFieldDrop(t,"data"),part:"field-area-data"},r("span",{key:"6ae641ddde3dd41eb0e4730e40fcf47bcd9db279",class:"pivot-grid-field-area-label"},t.dataFields),r("div",{key:"782e54f735fcbc3bc51cf5320f12e58d73a12c68",class:"pivot-grid-field-chips"},this.fields.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField,t.summaryType?` (${t.summaryType})`:""))))),this.showFilterFields&&r("div",{key:"2e3b1ab475f40bc9c9befa8c3170a2fec4b4dde3",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"filter"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"filter"),onDrop:t=>this.onFieldDrop(t,"filter"),part:"field-area-filter"},r("span",{key:"15f001dcfb71562e1fe3f160f60e99075a9844d2",class:"pivot-grid-field-area-label"},t.filterFields),r("div",{key:"79b72cfc696a3af62d65cb0b3594419a5283f719",class:"pivot-grid-field-chips"},this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField)))),this.allowFiltering&&this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((e=>{const i=A(this.effectiveData,e.dataField,this.headerFilterShowRelevantValues?this.filters:void 0),o=this.filters.find((t=>t.dataField===e.dataField))?.selectedValues??[],a=new Set(o);return r("div",{class:"pivot-grid-filter-dropdown-wrap",key:"filter-"+e.dataField},r("label",{class:"pivot-grid-filter-label"},e.caption??e.dataField,":"),this.showHeaderFilter?r("button",{"aria-expanded":this.headerFilterOpenField===e.dataField?"true":"false","aria-haspopup":"dialog","aria-label":"Filter by "+(e.caption??e.dataField),class:"pivot-grid-filter-select pivot-grid-filter-trigger",disabled:this.disabled,onClick:t=>{const i=t.target.getBoundingClientRect();this.openHeaderFilter(e.dataField,o,i)},part:"filter-trigger",type:"button"},0===o.length?t.emptyValue??"(All)":o.length+" selected"):r("select",{"aria-label":"Filter by "+(e.caption??e.dataField),class:"pivot-grid-filter-select",disabled:this.disabled,multiple:!0,onChange:t=>{const r=Array.from(t.target.selectedOptions).map((t=>Number(t.value)));this.setFilterSelectedValues(e.dataField,r.map((t=>i[t])))},part:"filter-select"},i.map(((t,e)=>r("option",{selected:a.has(t),value:e+""},(t??"")+"")))))})))),r("div",{key:"ab6357a21ac11d4522771904d70007bc4f76e5a2","aria-busy":this.loading?"true":void 0,class:"pivot-grid-content",role:"region"},this.loading?r("div",{class:"pivot-grid-loading",part:"loading"},r("slot",{name:"loading"},"skeleton"===this.loadingType?r("div",{class:"pivot-grid-skeleton"},r("bh-skeleton-loader",{height:"var(--bh-pivot-grid-header-height)",width:"100%"}),[1,2,3,4,5].map((t=>r("bh-skeleton-loader",{height:"var(--bh-pivot-grid-cell-height)",key:t,width:"100%"})))):r("bh-loader-spinner",{ariaLabel:t.dataNotAvailable,overlay:!0,overlayMessage:t.dataNotAvailable,size:"lg"}))):e?r("div",{class:"pivot-grid-empty",part:"empty",role:"status"},r("slot",{name:"empty-state"},r("div",null,r("strong",null,S("bh-pivot-grid","emptyTitle",this.emptyTitle,"No data")),r("p",null,S("bh-pivot-grid","emptyDescription",this.emptyDescription,"Configure fields to build your pivot table."))))):this.matrix?r("div",{class:"pivot-grid-table-wrapper",onContextMenu:this.onTableContextMenu,part:"table-wrapper"},r("table",{"aria-colcount":s,"aria-label":S("bh-pivot-grid","ariaLabel",this.ariaLabel,"Pivot grid"),"aria-rowcount":a,class:"pivot-grid-table",part:"table"},r("thead",{class:"pivot-grid-thead",part:"thead"},r("tr",{class:"pivot-grid-header-row",role:"row"},r("th",{"aria-sort":this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0?"asc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?"ascending":"desc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?"descending":"none":void 0,class:{"pivot-grid-corner":!0,"pivot-grid-header-cell":!0,"pivot-grid-sortable":this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0},onClick:()=>{const t=this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)))[0];this.allowSorting&&t&&!1!==t.allowSorting&&this.toggleSort(t.dataField)},part:"corner",role:"columnheader",scope:"col"},this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0?r("span",{class:"pivot-grid-sort-indicator"},"asc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?" ↑":"desc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?" ↓":" ⇅"):""),this.colTotalsPrior&&this.showRowGrandTotals&&r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-header",role:"columnheader",scope:"col"},this.resolvedTexts.grandTotal),this.matrix.columnHeaders.map(((t,e)=>{const i=this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)))[0],o=i&&this.getSortOrder(i.dataField);return r("th",{"aria-sort":this.allowSorting&&0===e&&i&&!1!==i.allowSorting?"asc"===o?"ascending":"desc"===o?"descending":"none":void 0,class:{"pivot-grid-header-cell":!0,"pivot-grid-sortable":this.allowSorting&&0===e&&i&&!1!==i.allowSorting},"data-column-index":e+"",key:t.key,onClick:()=>{this.allowSorting&&0===e&&i&&!1!==i.allowSorting&&this.toggleSort(i.dataField)},part:"column-header",role:"columnheader",scope:"col"},t.caption,this.allowSorting&&0===e&&i&&r("span",{class:"pivot-grid-sort-indicator"},"asc"===o?" ↑":"desc"===o?" ↓":" ⇅"))})),!this.colTotalsPrior&&this.showRowGrandTotals&&r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-header",role:"columnheader",scope:"col"},this.resolvedTexts.grandTotal))),r("tbody",{class:"pivot-grid-tbody",part:"tbody"},this.rowTotalsPrior&&this.showColumnGrandTotals&&r("tr",{class:"pivot-grid-grand-total-row",role:"row"},r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-label",role:"rowheader",scope:"row"},this.resolvedTexts.grandTotal),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),this.matrix.columnGrandTotals.map(((e,i)=>r("td",{class:"pivot-grid-cell pivot-grid-cell-total",key:i,part:"column-grand-total"},(()=>{const i=e.formattedValue;return null==i||""===(i+"").trim()?t.emptyValue:i??""})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})())),this.matrix.cells.map(((e,i)=>r("tr",{class:"pivot-grid-data-row",key:e[0]?.rowPath?.join(E)??"row-"+i,role:"row"},r("th",{class:"pivot-grid-row-header pivot-grid-header-cell","data-row-index":i+"",part:"row-header",role:"rowheader",scope:"row"},this.matrix.rowHeaders[i]?.caption??""),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"row-grand-total"},(()=>{const e=this.matrix.rowGrandTotals[i]?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),e.map(((e,o)=>r("td",{class:{"pivot-grid-cell":!0,"pivot-grid-cell-focused":i===this.focusedCellRow&&o===this.focusedCellCol,"pivot-grid-cell-total":e.isSummary},"data-value":e.formattedValue,key:o,onClick:t=>{this.focusedCellRow=i,this.focusedCellCol=o,this.bhCellClick.emit({cell:e,rowPath:e.rowPath,columnPath:e.columnPath,event:t})},part:"cell",ref:t=>{t&&(this.bhCellPrepared.emit({cell:e,rowPath:e.rowPath,columnPath:e.columnPath,cellElement:t}),i===this.focusedCellRow&&o===this.focusedCellCol&&(this.activeCellEl=t,this.focusMovedByKeyboard&&(t.focus(),this.focusMovedByKeyboard=!1)))},tabindex:i===this.focusedCellRow&&o===this.focusedCellCol?0:-1},(()=>{const i=null==e.formattedValue||""===(e.formattedValue+"").trim();return this.hideEmptySummaryCells&&e.isSummary&&i?"":i?t.emptyValue:e.formattedValue})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"row-grand-total"},(()=>{const e=this.matrix.rowGrandTotals[i]?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})())))),!this.rowTotalsPrior&&this.showColumnGrandTotals&&r("tr",{class:"pivot-grid-grand-total-row",role:"row"},r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-label",role:"rowheader",scope:"row"},this.resolvedTexts.grandTotal),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),this.matrix.columnGrandTotals.map(((e,i)=>r("td",{class:"pivot-grid-cell pivot-grid-cell-total",key:i,part:"column-grand-total"},(()=>{const i=e.formattedValue;return null==i||""===(i+"").trim()?t.emptyValue:i??""})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()))))):r("div",{class:"pivot-grid-table-wrapper",part:"table-wrapper"},r("p",{"aria-live":"polite"},this.effectiveData.length," rows, ",this.fields.length," fields configured.")))),r("bh-modal",{key:"92a636ce0bb2b3cbbd0a833852aefe56b41a781c",ariaLabel:S("bh-pivot-grid","fieldChooserTitle",this.fieldChooserTitle,"Field Chooser"),class:"pivot-grid-field-chooser-modal",onBhClose:()=>this.hideFieldChooser(),visible:this.fieldChooserOpen,width:"md"},r("div",{key:"45c3ddf29f4904075ca703958e36f8d77771040b",class:"pivot-grid-field-chooser-header",slot:"header"},r("h2",{key:"f2f1e12bef3c7b4d292060007663258d7bf3f98c",class:"pivot-grid-field-chooser-title"},S("bh-pivot-grid","fieldChooserTitle",this.fieldChooserTitle,"Field Chooser"))),r("div",{key:"034a80ec2b99b3c3c89f1487b05f915dedc6a07f",class:"pivot-grid-field-chooser-body"},r("p",{key:"f5a92ceee4dd9ac6afe0bf395102ae9a69a14268",class:"pivot-grid-field-chooser-hint"},t.rowFieldArea," • ",t.columnFieldArea," • ",t.dataFieldArea," •"," ",t.filterFieldArea),r("div",{key:"0881ce2d493747a54bcfd8836e3c307319f20d36",class:"pivot-grid-field-chooser-areas"},r("div",{key:"74943cab8043855c70f33477b861c3c256e1e8a4",class:"pivot-grid-field-chooser-area"},r("span",{key:"228993e08eb3f5aa97694c22159b5dd4cc8bce22",class:"pivot-grid-field-area-label"},t.rowFields),r("div",{key:"7101c292d3c20c021161edbcb145ef882ed4ba23",class:"pivot-grid-field-chips"},this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))),r("div",{key:"768a4576ce13f84beee167e0e095bca80f2b21a4",class:"pivot-grid-field-chooser-area"},r("span",{key:"b4f2fc287263a7f1031ca88b545942fe8648f9c7",class:"pivot-grid-field-area-label"},t.columnFields),r("div",{key:"a6456cbf0cec9c1fa6f0b8ab679b26f97951977a",class:"pivot-grid-field-chips"},this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))),r("div",{key:"a9bf8ff6577a24f84a69c81774cd13de43129a21",class:"pivot-grid-field-chooser-area"},r("span",{key:"87a0b94748b140a10447af5acf9583f46cbffd2c",class:"pivot-grid-field-area-label"},t.dataFields),r("div",{key:"16a667e7058cc36cc2b36909060c3ae13d5fa96a",class:"pivot-grid-field-chips"},this.fields.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField,t.summaryType?` (${t.summaryType})`:""))))),r("div",{key:"4e8c4d6ac28df1320cba8b8c7df82b79fbc72e45",class:"pivot-grid-field-chooser-area"},r("span",{key:"1b57b0ecce8dccdf86b2d27cda43b409df00bdc9",class:"pivot-grid-field-area-label"},t.filterFields),r("div",{key:"735c6a71e6ee1104fd089ca9547f96679e6f5180",class:"pivot-grid-field-chips"},this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))))),r("div",{key:"09b3b9e4970d623cfe723bc6d14a891200be015b",class:"pivot-grid-field-chooser-footer",slot:"actions"},r("button",{key:"24ad1e092df089172919fdccaa13a8dd7a124dbe",class:"pivot-grid-toolbar-btn",onClick:()=>this.hideFieldChooser(),type:"button"},t.ok))),this.headerFilterOpenField&&r("div",{key:"3aca2440211ba5a0427ca8bd274585c4b40e2dee","aria-label":"Filter by "+(this.fields.find((t=>t.dataField===this.headerFilterOpenField))?.caption??this.headerFilterOpenField),class:"pivot-grid-header-filter-popup",part:"header-filter-popup",role:"dialog",style:{left:this.headerFilterAnchorX+"px",top:this.headerFilterAnchorY+"px",width:this.headerFilterWidth+"px",maxHeight:this.headerFilterHeight+"px"}},(()=>{const t=function(t,e,i){const r=e.trim().toLowerCase();return""===r?t:t.filter((t=>{const e=((t??"")+"").toLowerCase();switch(i){case"contains":default:return e.includes(r);case"startswith":return e.startsWith(r);case"equals":return e===r}}))}(A(this.effectiveData,this.headerFilterOpenField,this.headerFilterShowRelevantValues?this.filters:void 0),this.headerFilterSearchQuery,this.headerFilterSearchMode),e=new Set(this.headerFilterPendingValues),i=this.resolvedTexts,o=t.length>0&&t.every((t=>e.has(t)));return r("div",{class:"pivot-grid-header-filter-popup-inner"},this.headerFilterAllowSelectAll&&t.length>0&&r("label",{class:"pivot-grid-header-filter-select-all"},r("input",{checked:o,onChange:()=>this.setHeaderFilterSelectAll(!o,t),type:"checkbox"}),"Select All"),this.headerFilterSearchEnabled&&r("input",{class:"pivot-grid-header-filter-search",onInput:t=>{this.headerFilterSearchQuery=t.target.value},part:"header-filter-search",placeholder:S("bh-pivot-grid","searchPlaceholder",void 0,"Search..."),type:"search",value:this.headerFilterSearchQuery}),r("div",{class:"pivot-grid-header-filter-list",part:"header-filter-list"},t.map((t=>r("label",{class:"pivot-grid-header-filter-item",key:(t??"")+""},r("input",{checked:e.has(t),onChange:()=>this.toggleHeaderFilterValue(t),type:"checkbox"}),(t??i.emptyValue??"(Blanks)")+"")))),r("div",{class:"pivot-grid-header-filter-actions"},r("button",{class:"pivot-grid-toolbar-btn",onClick:()=>this.closeHeaderFilter(),type:"button"},i.cancel),r("button",{class:"pivot-grid-toolbar-btn pivot-grid-toolbar-btn-primary",onClick:()=>this.applyHeaderFilter(),type:"button"},i.ok)))})()),this.contextMenuVisible&&this.contextMenuItems.length>0&&r("div",{key:"edf1b675707df9146b83b0d96ecece8055567358",class:"pivot-grid-context-menu",part:"context-menu",role:"menu",style:{left:this.contextMenuX+"px",top:this.contextMenuY+"px"}},this.contextMenuItems.map((t=>t.beginGroup?r("div",{class:"pivot-grid-context-menu-separator",key:t.id,part:"context-menu-separator",role:"separator"}):r("button",{class:"pivot-grid-context-menu-item",disabled:t.disabled,key:t.id,onClick:()=>{t.onClick?.(),this.closeContextMenu()},part:"context-menu-item",role:"menuitem",type:"button"},t.text)))))}static get watchers(){return{data:[{onDataChange:0}],dataSource:[{onDataChange:0}],fields:[{onMatrixInputsChange:0}],rowExpandedPaths:[{onMatrixInputsChange:0}],columnExpandedPaths:[{onMatrixInputsChange:0}],filters:[{onMatrixInputsChange:0}],sorting:[{onMatrixInputsChange:0}],showRowGrandTotals:[{onMatrixInputsChange:0}],showColumnGrandTotals:[{onMatrixInputsChange:0}]}}static get style(){return'@charset "UTF-8";@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-states; @layer bh-tokens{:host{display:block;--bh-pivot-grid-cell-height:40px;--bh-pivot-grid-cell-padding-x:var(--spacing-xl);--bh-pivot-grid-header-height:40px;--bh-pivot-grid-min-height:200px;--bh-pivot-grid-max-height:none;--bh-pivot-grid-header-bg:var(--color-white);--bh-pivot-grid-header-text:var(--color-neutral-600);--bh-pivot-grid-border-color:var(--color-neutral-200);--bh-pivot-grid-cell-bg:var(--color-white);--bh-pivot-grid-cell-text:var(--color-neutral-700);--bh-pivot-grid-hover-bg:var(--color-neutral-50);--bh-pivot-grid-total-bg:var(--color-neutral-50);--bh-pivot-grid-field-panel-bg:var(--color-neutral-50);--bh-pivot-grid-field-chip-bg:var(--color-white);--bh-pivot-grid-field-chip-radius:var(--radius-xs);--bh-pivot-grid-drop-zone-bg:var(--color-brand-100);--bh-pivot-grid-sort-icon-size:var(--icon-size-sm);--bh-pivot-grid-field-label-min-width:var( --pivot-grid-field-label-min-width );--bh-pivot-grid-filter-trigger-min-width:var( --pivot-grid-filter-trigger-min-width );--bh-pivot-grid-filter-select-max-height:var( --pivot-grid-filter-select-max-height );--bh-pivot-grid-context-menu-min-width:var( --pivot-grid-context-menu-min-width );--bh-pivot-grid-filter-list-max-height:var( --pivot-grid-filter-list-max-height )}}@layer bh-base{:host{min-height:var(--bh-pivot-grid-min-height);max-height:var(--bh-pivot-grid-max-height);box-sizing:border-box}.pivot-grid-root{display:flex;flex-direction:column;width:100%;min-height:var(--bh-pivot-grid-min-height);font-family:var(--font-inter);color:var(--bh-pivot-grid-cell-text)}.pivot-grid-toolbar{display:flex;align-items:center;gap:var(--spacing-md);padding:var(--spacing-md) var(--bh-pivot-grid-cell-padding-x);background:var(--bh-pivot-grid-field-panel-bg);border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--spacing-sm) var(--spacing-lg);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);font-weight:var(--weight-medium);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-xs);background:var(--bh-pivot-grid-cell-bg);color:var(--bh-pivot-grid-cell-text);cursor:pointer;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-toolbar-btn:hover:not(:disabled){background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-toolbar-btn:disabled{opacity:0.6;cursor:not-allowed}.pivot-grid-field-panel{display:flex;flex-wrap:wrap;gap:var(--spacing-lg) var(--spacing-xl);padding:var(--spacing-md) var(--bh-pivot-grid-cell-padding-x);background:var(--bh-pivot-grid-field-panel-bg);border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-field-area{display:flex;align-items:center;gap:var(--spacing-md);min-height:var(--bh-button-height-sm)}.pivot-grid-field-area-label{font-size:var(--text-xs-size);font-weight:var(--weight-semibold);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);min-width:var(--bh-pivot-grid-field-label-min-width)}.pivot-grid-field-chips{display:flex;flex-wrap:wrap;gap:var(--spacing-xs)}.pivot-grid-field-chip{display:inline-flex;align-items:center;padding:var(--spacing-xxs) var(--spacing-md);font-size:var(--text-xs-size);line-height:var(--text-xs-line);border-radius:var(--bh-pivot-grid-field-chip-radius);background:var(--bh-pivot-grid-field-chip-bg);border:1px solid var(--bh-pivot-grid-border-color);color:var(--bh-pivot-grid-cell-text);transition:background-color var(--animation-duration-fast) ease}.pivot-grid-drop-zone-active{background:var(--bh-pivot-grid-drop-zone-bg);border-radius:var(--bh-pivot-grid-field-chip-radius);min-height:var(--bh-button-height-md)}.pivot-grid-field-chip[draggable=true]{cursor:grab}.pivot-grid-field-chooser-header{display:flex;align-items:center;justify-content:space-between}.pivot-grid-field-chooser-title{font-size:var(--text-lg-size);font-weight:var(--weight-semibold);color:var(--color-text-primary);margin:0}.pivot-grid-field-chooser-body{display:flex;flex-direction:column;gap:var(--spacing-xl)}.pivot-grid-field-chooser-hint{font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);margin:0}.pivot-grid-field-chooser-areas{display:flex;flex-direction:column;gap:var(--spacing-lg)}.pivot-grid-field-chooser-area{display:flex;align-items:center;gap:var(--spacing-md);min-height:var(--bh-button-height-sm)}.pivot-grid-field-chooser-footer{display:flex;justify-content:flex-end;gap:var(--spacing-md)}.pivot-grid-filter-dropdown-wrap{display:inline-flex;align-items:center;gap:var(--spacing-xs);margin-left:var(--spacing-md)}.pivot-grid-filter-label{font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text)}.pivot-grid-filter-select{font-family:var(--font-inter);font-size:var(--text-xs-size);line-height:var(--text-xs-line);padding:var(--spacing-xxs) var(--spacing-xs);border-radius:var(--bh-pivot-grid-field-chip-radius);border:1px solid var(--bh-pivot-grid-border-color);min-width:var(--bh-pivot-grid-filter-trigger-min-width);max-height:var(--bh-pivot-grid-filter-select-max-height)}.pivot-grid-sortable{cursor:pointer;user-select:none}.pivot-grid-sort-indicator{font-size:var(--text-xs-size);opacity:0.7;margin-left:var(--spacing-xxs)}.pivot-grid-content{flex:1;overflow:auto;display:flex;flex-direction:column}.pivot-grid-table-wrapper{overflow:auto;flex:1}.pivot-grid-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:var(--text-sm-size);line-height:var(--text-sm-line)}.pivot-grid-thead{position:sticky;top:0;z-index:1;background:var(--bh-pivot-grid-header-bg)}.pivot-grid-header-row,.pivot-grid-data-row,.pivot-grid-grand-total-row{border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-header-cell{height:var(--bh-pivot-grid-header-height);padding:0 var(--bh-pivot-grid-cell-padding-x);text-align:left;vertical-align:middle;font-size:var(--text-xs-size);font-weight:var(--weight-semibold);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);background:var(--bh-pivot-grid-header-bg);border-right:1px solid var(--bh-pivot-grid-border-color);border-bottom:1px solid var(--bh-pivot-grid-border-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pivot-grid-corner{min-width:var(--bh-pivot-grid-cell-min-width)}.pivot-grid-row-header{min-width:var(--bh-pivot-grid-cell-min-width);white-space:nowrap}.pivot-grid-cell{height:var(--bh-pivot-grid-cell-height);padding:0 var(--bh-pivot-grid-cell-padding-x);vertical-align:middle;font-size:var(--text-sm-size);font-weight:var(--weight-regular);line-height:var(--text-sm-line);color:var(--bh-pivot-grid-cell-text);background:var(--bh-pivot-grid-cell-bg);border-right:1px solid var(--bh-pivot-grid-border-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-cell-total,.pivot-grid-total-header{background:var(--bh-pivot-grid-total-bg);font-weight:var(--weight-semibold)}.pivot-grid-live-region{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.pivot-grid-empty,.pivot-grid-loading{display:flex;align-items:center;justify-content:center;min-height:var(--bh-pivot-grid-min-height);padding:var(--spacing-3xl);font-size:var(--text-sm-size);line-height:var(--text-sm-line);color:var(--color-text-disabled);background:var(--bh-pivot-grid-cell-bg)}.pivot-grid-skeleton{display:flex;flex-direction:column;gap:var(--spacing-md);width:100%;padding:var(--spacing-xl)}}@layer bh-states{:host([disabled]){pointer-events:none;opacity:0.6}.pivot-grid-cell:not(.pivot-grid-cell-total):hover{background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-cell:focus-visible,.pivot-grid-header-cell:focus-visible,.pivot-grid-toolbar-btn:focus-visible{outline:2px solid var(--color-border-interactive);outline-offset:-2px}.pivot-grid-cell-focused.pivot-grid-cell:focus-visible{outline:2px solid var(--color-border-interactive);outline-offset:-2px}.pivot-grid-context-menu{position:fixed;z-index:var(--bh-z-index-dropdown);min-width:var(--bh-pivot-grid-context-menu-min-width);padding:var(--spacing-xs) 0;background:var(--bh-pivot-grid-cell-bg);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-lg)}.pivot-grid-context-menu-item{display:block;width:100%;padding:var(--spacing-sm) var(--bh-pivot-grid-cell-padding-x);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);text-align:left;background:transparent;border:none;color:var(--bh-pivot-grid-cell-text);cursor:pointer;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-context-menu-item:hover:not(:disabled){background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-context-menu-item:disabled{opacity:0.6;cursor:not-allowed}.pivot-grid-context-menu-separator{height:1px;margin:var(--spacing-xs) 0;background:var(--bh-pivot-grid-border-color)}.pivot-grid-header-filter-popup{position:fixed;z-index:var(--bh-z-index-dropdown);display:flex;flex-direction:column;gap:var(--spacing-md);padding:var(--spacing-lg);background:var(--bh-pivot-grid-cell-bg);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-popup);overflow:hidden}.pivot-grid-header-filter-select-all{display:flex;align-items:center;gap:var(--spacing-md);font-size:var(--text-sm-size);font-weight:var(--weight-semibold);line-height:var(--text-sm-line);cursor:pointer}.pivot-grid-header-filter-search{padding:var(--spacing-sm) var(--spacing-md);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-sm)}.pivot-grid-header-filter-search::placeholder{color:var(--color-text-disabled)}.pivot-grid-header-filter-search:focus{outline:none;border-color:var(--color-border-interactive)}.pivot-grid-header-filter-list{display:flex;flex-direction:column;gap:var(--spacing-xs);overflow-y:auto;max-height:var(--bh-pivot-grid-filter-list-max-height)}.pivot-grid-header-filter-item{display:flex;align-items:center;gap:var(--spacing-md);font-size:var(--text-xs-size);line-height:var(--text-xs-line);cursor:pointer;padding:var(--spacing-xxs) 0}.pivot-grid-header-filter-item:hover{color:var(--color-text-primary)}.pivot-grid-header-filter-actions{display:flex;justify-content:flex-end;gap:var(--spacing-md);padding-top:var(--spacing-md);border-top:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-filter-trigger{min-width:var(--bh-pivot-grid-filter-trigger-min-width);text-align:left}.pivot-grid-toolbar-btn-primary{background:var(--color-bg-interactive);border-color:var(--color-bg-interactive);color:var(--color-text-inverse)}.pivot-grid-toolbar-btn-primary:hover:not(:disabled){background:var(--color-bg-interactive-hover);border-color:var(--color-bg-interactive-hover)}}'}},[769,"bh-pivot-grid",{data:[16],dataSource:[16],fields:[1040],showRowGrandTotals:[4,"show-row-grand-totals"],showColumnGrandTotals:[4,"show-column-grand-totals"],showRowTotals:[4,"show-row-totals"],showColumnTotals:[4,"show-column-totals"],totalPosition:[1,"total-position"],showTotalsPrior:[1,"show-totals-prior"],rowHeaderLayout:[1,"row-header-layout"],wordWrapEnabled:[4,"word-wrap-enabled"],hideEmptySummaryCells:[4,"hide-empty-summary-cells"],dataFieldArea:[1,"data-field-area"],showBorders:[4,"show-borders"],disabled:[4],encodeHtml:[4,"encode-html"],showFieldPanel:[4,"show-field-panel"],showRowFields:[4,"show-row-fields"],showColumnFields:[4,"show-column-fields"],showDataFields:[4,"show-data-fields"],showFilterFields:[4,"show-filter-fields"],allowFieldDragging:[4,"allow-field-dragging"],showFieldChooserButton:[4,"show-field-chooser-button"],fieldChooserEnabled:[4,"field-chooser-enabled"],fieldChooserApplyMode:[1,"field-chooser-apply-mode"],fieldChooserTitle:[1,"field-chooser-title"],fieldChooserWidth:[2,"field-chooser-width"],fieldChooserHeight:[2,"field-chooser-height"],allowFiltering:[4,"allow-filtering"],showHeaderFilter:[4,"show-header-filter"],headerFilterHeight:[2,"header-filter-height"],headerFilterWidth:[2,"header-filter-width"],headerFilterAllowSelectAll:[4,"header-filter-allow-select-all"],headerFilterShowRelevantValues:[4,"header-filter-show-relevant-values"],headerFilterSearchEnabled:[4,"header-filter-search-enabled"],headerFilterSearchMode:[1,"header-filter-search-mode"],headerFilterSearchTimeout:[2,"header-filter-search-timeout"],allowSorting:[4,"allow-sorting"],allowSortingBySummary:[4,"allow-sorting-by-summary"],allowExpandAll:[4,"allow-expand-all"],rowExpandedPaths:[1040],columnExpandedPaths:[1040],enableExport:[4,"enable-export"],showExportButton:[4,"show-export-button"],exportFileName:[1,"export-file-name"],exportIncludeTotals:[4,"export-include-totals"],enableStatePersistence:[4,"enable-state-persistence"],stateStorageKey:[1,"state-storage-key"],stateStorageType:[1,"state-storage-type"],stateSavingTimeout:[2,"state-saving-timeout"],loading:[4],loadingType:[1,"loading-type"],emptyTitle:[1,"empty-title"],emptyDescription:[1,"empty-description"],ariaLabel:[1,"aria-label"],focusTabIndex:[2,"focus-tab-index"],texts:[16],_i18nVersion:[32],fieldChooserOpen:[32],effectiveData:[32],matrix:[32],dragData:[32],dropTargetArea:[32],filters:[32],sorting:[32],focusedCellRow:[32],focusedCellCol:[32],liveAnnouncement:[32],contextMenuVisible:[32],contextMenuX:[32],contextMenuY:[32],contextMenuItems:[32],headerFilterOpenField:[32],headerFilterPendingValues:[32],headerFilterSearchQuery:[32],headerFilterAnchorX:[32],headerFilterAnchorY:[32],expandAll:[64],collapseAll:[64],expandRow:[64],collapseRow:[64],expandColumn:[64],collapseColumn:[64],getState:[64],setState:[64],resetState:[64],saveState:[64],saveStateImmediate:[64],loadState:[64],getFields:[64],getFieldsByArea:[64],moveField:[64],updateField:[64],refresh:[64],getMatrix:[64],exportTo:[64],showFieldChooser:[64],hideFieldChooser:[64]},void 0,{data:[{onDataChange:0}],dataSource:[{onDataChange:0}],fields:[{onMatrixInputsChange:0}],rowExpandedPaths:[{onMatrixInputsChange:0}],columnExpandedPaths:[{onMatrixInputsChange:0}],filters:[{onMatrixInputsChange:0}],sorting:[{onMatrixInputsChange:0}],showRowGrandTotals:[{onMatrixInputsChange:0}],showColumnGrandTotals:[{onMatrixInputsChange:0}]}]),K=j,W=function(){"undefined"!=typeof customElements&&["bh-pivot-grid","bh-loader-spinner","bh-modal","bh-skeleton-loader"].forEach((t=>{switch(t){case"bh-pivot-grid":customElements.get(a(t))||customElements.define(a(t),j);break;case"bh-loader-spinner":customElements.get(a(t))||p();break;case"bh-modal":customElements.get(a(t))||v();break;case"bh-skeleton-loader":customElements.get(a(t))||f()}}))};export{K as BhPivotGrid,W as defineCustomElement}
1
+ import{p as t,H as e,c as i,h as r,d as o,t as a}from"./p-YZi6LqIt.js";import{h as s,c as l,g as d,a as n,b as h}from"./p-D1dU_VEW.js";import{v as c}from"./p-DlPm3fIV.js";import{d as p}from"./p-BbPrWlsw.js";import{c as g,d as v}from"./p-BR00DQQ7.js";import{d as f}from"./p-BwxcuFPS.js";import{c as b,m as u,M as m,r as x}from"./p-BJXjqxlX.js";import{c as w}from"./p-Dmpif9C-.js";import{c as y,t as k,a as F}from"./p-CqAYzGVs.js";import{B as C,r as S}from"./p-BNVOtH-1.js";import{K as D}from"./p-zdFuIabL.js";const T=["=","+","-","@","\t","\r"],E="\0";function M(t,e){if(!e.length)return t;const i=new Map(e.filter((t=>t.selectedValues.length>0)).map((t=>[t.dataField,new Set(t.selectedValues)])));return 0===i.size?t:t.filter((t=>{for(const[e,r]of i)if(!r.has(t[e]))return!1;return!0}))}function A(t,e,i){const r=i&&i.length>0?M(t,i.filter((t=>t.dataField!==e))):t,o=new Set,a=[];for(const t of r){const i=t[e];o.has(i)||(o.add(i),a.push(i))}return a.toSorted(((t,e)=>(t+"").localeCompare(e+"")))}class z{sum=0;count=0;min=1/0;max=-1/0;values=[];add(t){if(null==t)return;this.count++;const e=Number(t);Number.isFinite(e)&&(this.sum+=e,e<this.min&&(this.min=e),e>this.max&&(this.max=e)),this.values.push(t)}getValue(t,e){if(0===this.count)return null;switch(t){case"sum":default:return this.sum;case"count":return this.count;case"avg":return this.sum/this.count;case"min":return this.min===1/0?null:this.min;case"max":return this.max===-1/0?null:this.max;case"custom":return e?e(this.values):null}}}function P(t,e,i,r,o,a){const s="number"==typeof t&&Number.isFinite(t)?1:Array.isArray(t)?t.length:0,l=function(t,e,i){if(null==t)return"";const r=e.format;if(r?.formatter)return r.formatter(t)+"";if("currency"===r?.type){const e={style:"currency",currency:r.currency??"USD",minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("percent"===r?.type){const e={style:"percent",minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("decimal"===r?.type){const e={minimumFractionDigits:r.precision??0,maximumFractionDigits:r.precision??2,...r.numberFormat};return new Intl.NumberFormat(void 0,e).format(Number(t))}if("date"===r?.type||"datetime"===r?.type){const e=t instanceof Date?t:new Date(t+"");return Number.isNaN(e.getTime())?t+"":new Intl.DateTimeFormat(void 0,r.dateFormat??("datetime"===r.type?{dateStyle:"short",timeStyle:"short"}:{dateStyle:"short"})).format(e)}if("count"===i||"sum"===i||"avg"===i||"min"===i||"max"===i){const e=Number(t);if(Number.isFinite(e))return e.toFixed(r?.precision??2)}return t+""}(t,r,o);return{value:t,formattedValue:l,rowPath:[...e],columnPath:[...i],isSummary:a,dataField:r.dataField,summaryType:o??"sum",count:s}}function I(t){return t.join(E)}function R(t,e){return e.map((e=>(t[e.dataField]??"")+""))}function H(t,e){return e.map((e=>(t[e.dataField]??"")+""))}const N=",";function B(t,e={}){const{fileName:i="pivot-export",includeTotals:r=!0,delimiter:o=N,includeBOM:a=!0}=e,s=function(t,e={}){const{includeTotals:i=!0}=e,r=[],o=[""];for(const e of t.columnHeaders)o.push(e.caption||"");i&&t.rowGrandTotals.length>0&&o.push("Grand Total"),r.push(o);for(const[e,o]of t.cells.entries()){const a=[t.rowHeaders[e]?.caption??""];for(const t of o)a.push(t?.formattedValue??"");i&&t.rowGrandTotals[e]&&a.push(t.rowGrandTotals[e].formattedValue??""),r.push(a)}if(i&&t.columnGrandTotals.length>0){const e=["Grand Total"];for(const i of t.columnGrandTotals)e.push(i.formattedValue??"");t.grandTotal&&e.push(t.grandTotal.formattedValue??""),r.push(e)}return r}(t,{includeTotals:r}),l=s.map((t=>t.map((t=>function(t,e){const i=function(t){if(null==t)return"";const e=t+"";return T.some((t=>e.startsWith(t)))?"'"+e:e}(t);return i.includes(e)||i.includes('"')||i.includes("\n")||i.includes("\r")?`"${i.replace(/"/g,'""')}"`:i}(t+"",o))).join(o))).join("\n");!function(t,e){const i=URL.createObjectURL(t),r=document.createElement("a");r.href=i,r.download=e,r.style.display="none",document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)}(new Blob([(a?"\ufeff":"")+l],{type:"text/csv;charset=utf-8;"}),i.replace(/\.csv$/i,"")+".csv")}function L(t){return"bh-pivot-grid-state-"+t}function G(t){if(null==t||"object"!=typeof t)return!1;const e=t;return"number"==typeof e.version&&Array.isArray(e.fields)&&Array.isArray(e.rowExpandedPaths)&&Array.isArray(e.columnExpandedPaths)&&Array.isArray(e.filters)&&Array.isArray(e.sorting)}function O(t){if(!t.enable||!t.stateStorageKey)return;const e=t.storage??("undefined"==typeof localStorage?void 0:localStorage);if(e)try{const i=L(t.stateStorageKey),r={...t.state,version:1};e.setItem(i,JSON.stringify(r)),t.onSave?.(t.state)}catch(t){}}const V={grandTotal:"Grand Total",total:"Total",noData:"No Data",dataNotAvailable:"Data not available",showFieldChooser:"Show Field Chooser",exportToExcel:"Export to CSV",expandAll:"Expand All",collapseAll:"Collapse All",allFields:"All Fields",rowFields:"Row Fields",columnFields:"Column Fields",dataFields:"Data Fields",filterFields:"Filter Fields",columnFieldArea:"Drop Column Fields Here",dataFieldArea:"Drop Data Fields Here",filterFieldArea:"Drop Filter Fields Here",rowFieldArea:"Drop Row Fields Here",removeAllSorting:"Remove All Sorting",sortColumnBySummary:"Sort {0} by This Column",sortRowBySummary:"Sort {0} by This Row",cancel:"Cancel",ok:"OK",emptyValue:"(Blanks)"},j=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow(),this.bhCellClick=i(this,"bhCellClick"),this.bhCellPrepared=i(this,"bhCellPrepared"),this.bhFieldChange=i(this,"bhFieldChange"),this.bhFieldDragStart=i(this,"bhFieldDragStart"),this.bhFieldDragEnd=i(this,"bhFieldDragEnd"),this.bhExpandChange=i(this,"bhExpandChange"),this.bhStateLoad=i(this,"bhStateLoad"),this.bhStateSave=i(this,"bhStateSave"),this.bhExport=i(this,"bhExport"),this.bhExporting=i(this,"bhExporting"),this.bhContextMenuPreparing=i(this,"bhContextMenuPreparing"),this.bhReady=i(this,"bhReady"),this.bhDisposing=i(this,"bhDisposing"),this.bhError=i(this,"bhError")}get el(){return this}logger=b("bh-pivot-grid");handleError=w({componentName:"bh-pivot-grid",emitError:t=>this.bhError.emit({error:t}),logger:this.logger});destroy$=y();listeners=g();i18nUnsubscribe;_i18nVersion=0;data=[];dataSource;fields=[];showRowGrandTotals=!0;showColumnGrandTotals=!0;showRowTotals=!0;showColumnTotals=!0;totalPosition="after";showTotalsPrior="none";rowHeaderLayout="standard";wordWrapEnabled=!1;hideEmptySummaryCells=!1;dataFieldArea="column";showBorders=!0;disabled=!1;encodeHtml=!0;showFieldPanel=!0;showRowFields=!0;showColumnFields=!0;showDataFields=!0;showFilterFields=!0;allowFieldDragging=!0;showFieldChooserButton=!0;fieldChooserEnabled=!0;fieldChooserApplyMode="instantly";fieldChooserTitle="Field Chooser";fieldChooserWidth=400;fieldChooserHeight=500;allowFiltering=!0;showHeaderFilter=!0;headerFilterHeight=300;headerFilterWidth=250;headerFilterAllowSelectAll=!0;headerFilterShowRelevantValues=!1;headerFilterSearchEnabled=!0;headerFilterSearchMode="contains";headerFilterSearchTimeout=500;allowSorting=!0;allowSortingBySummary=!0;allowExpandAll=!0;rowExpandedPaths=[];columnExpandedPaths=[];enableExport=!0;showExportButton=!0;exportFileName="pivot-export";exportIncludeTotals=!0;enableStatePersistence=!1;stateStorageKey;stateStorageType="localStorage";stateSavingTimeout=2e3;loading=!1;loadingType="spinner";emptyTitle="No data";emptyDescription="Configure fields to see data.";ariaLabel="Pivot grid";focusTabIndex=0;texts={};fieldChooserOpen=!1;effectiveData=[];matrix=null;dragData=null;dropTargetArea=null;filters=[];sorting=[];focusedCellRow=0;focusedCellCol=0;liveAnnouncement="";contextMenuVisible=!1;contextMenuX=0;contextMenuY=0;contextMenuItems=[];headerFilterOpenField=null;headerFilterPendingValues=[];headerFilterSearchQuery="";headerFilterAnchorX=0;headerFilterAnchorY=0;activeCellEl=null;focusMovedByKeyboard=!1;contextMenuClickOutsideHandler=null;headerFilterClickOutsideHandler=null;bhCellClick;bhCellPrepared;bhFieldChange;bhFieldDragStart;bhFieldDragEnd;bhExpandChange;bhStateLoad;bhStateSave;bhExport;bhExporting;bhContextMenuPreparing;bhReady;bhDisposing;bhError;onDataChange(){this.syncEffectiveData()}onMatrixInputsChange(){this.rebuildMatrix(),this.scheduleStateSave()}syncEffectiveData(){if(this.dataSource?.store){const t=this.dataSource.store;this.effectiveData=Array.isArray(t)?t:t.data??[]}else this.effectiveData=Array.isArray(this.data)?this.data:[];this.rebuildMatrix()}scheduleStateSave(){this.enableStatePersistence&&this.stateStorageKey&&this.destroy$&&k(this.stateSavingTimeout,this.destroy$)?.subscribe((async()=>{const t=await this.getState();O({enable:!0,stateStorageKey:this.stateStorageKey,state:t,onSave:t=>this.bhStateSave.emit({state:t})})}))}rebuildMatrix(){if(this.effectiveData.length>0&&this.fields.length>0)try{this.matrix=function(t){const{data:e,fields:i,rowExpandedPaths:r=[],columnExpandedPaths:o=[],filters:a=[],sorting:s=[],showRowGrandTotals:l=!0,showColumnGrandTotals:d=!0}=t,n=a.length>0?M(e,a):e,h=i.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))),c=i.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))),p=i.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)));if(0===h.length&&0===c.length)return null;if(0===p.length)return null;if(0===n.length)return function(t,e,i){const r=i[0];return{rowHeaders:[],columnHeaders:[],cells:[],rowGrandTotals:[],columnGrandTotals:[],grandTotal:P(null,[],[],r,r?.summaryType??"sum",!0),rowCount:0,columnCount:0}}(0,0,p);const g=new Map,v=new Set(r.map((t=>I(t)))),f=new Set(o.map((t=>I(t))));for(const t of n){const e=R(t,h),i=H(t,c),r=I(e),o=I(i);let a=g.get(r);a||(a=new Map,g.set(r,a));let s=a.get(o);s||(s=new Map,a.set(o,s));for(const e of p){let i=s.get(e.dataField);i||(i=new z,s.set(e.dataField,i)),i.add(t[e.dataField])}}let b=Array.from(g.keys()).map((t=>t.split(E))).toSorted(((t,e)=>I(t).localeCompare(I(e))));const u=new Set;for(const t of g.values())for(const e of t.keys())u.add(e);let m=Array.from(u).map((t=>t.split(E))).toSorted(((t,e)=>I(t).localeCompare(I(e))));const x=h[0]?s.find((t=>t.dataField===h[0].dataField)):void 0,w=c[0]?s.find((t=>t.dataField===c[0].dataField)):void 0,y=(t,e,i)=>{const r=I(t).localeCompare(I(e));return"desc"===i?-r:r};x&&(b=b.toSorted(((t,e)=>y(t,e,x.sortOrder)))),w&&(m=m.toSorted(((t,e)=>y(t,e,w.sortOrder))));const k=[],F=[],C=[],S=new Map,D=new Map,T=new Map;for(const t of p){let e=T.get(t.dataField);e||(e=new z,T.set(t.dataField,e));for(const i of n)e.add(i[t.dataField])}for(const t of b){const e=I(t),i=g.get(e),r=[];let o=S.get(e);o||(o=new Map,S.set(e,o));for(const e of m){const a=I(e),s=i.get(a),l=p[0],d=l.summaryType??"sum";if(!s||!s.has(l.dataField)){r.push(P(null,t,e,l,d,!1));continue}const n=s.get(l.dataField).getValue(d,l.calculateCustomSummary);r.push(P(n,t,e,l,d,!1));for(const t of p){const e=s.get(t.dataField);if(e){let i=o.get(t.dataField);i||(i=new z,o.set(t.dataField,i)),i.sum+=e.sum,i.count+=e.count,i.values.push(...e.values),Number.isFinite(e.min)&&(i.min=Math.min(i.min,e.min)),Number.isFinite(e.max)&&(i.max=Math.max(i.max,e.max))}}let h=D.get(a);h||(h=new Map,D.set(a,h));for(const t of p){const e=s.get(t.dataField);if(e){let i=h.get(t.dataField);i||(i=new z,h.set(t.dataField,i)),i.sum+=e.sum,i.count+=e.count,i.values.push(...e.values),Number.isFinite(e.min)&&(i.min=Math.min(i.min,e.min)),Number.isFinite(e.max)&&(i.max=Math.max(i.max,e.max))}}}if(k.push(r),l&&p.length>0){const e=p[0],i=o.get(e.dataField),r=i?i.getValue(e.summaryType??"sum",e.calculateCustomSummary):null;F.push(P(r,t,[],e,e.summaryType??"sum",!0))}}if(d&&p.length>0){const t=p[0];for(const e of m){const i=I(e),r=D.get(i),o=r?.get(t.dataField),a=o?o.getValue(t.summaryType??"sum",t.calculateCustomSummary):null;C.push(P(a,[],e,t,t.summaryType??"sum",!0))}}const A=p.length>0?(()=>{const t=p[0],e=T.get(t.dataField);return P(e?e.getValue(t.summaryType??"sum",t.calculateCustomSummary):null,[],[],t,t.summaryType??"sum",!0)})():P(null,[],[],p[0],"sum",!0),N=function(t,e,i){if(0===e.length)return[];const r=e[0],o=new Set,a=[];let s=0;for(const e of t){const l=e.slice(0,1),d=I(l);if(o.has(d))continue;o.add(d);const n=e[0]||"",h=t.some((t=>t.length>1&&I(t.slice(0,1))===d)),c=h&&i.has(d);a.push({key:d,path:[...l],caption:n,level:0,span:1,expanded:c,expandable:h,children:[],field:r,index:s++})}return a}(b,h,v),B=function(t,e,i){if(0===e.length)return[];const r=e[0],o=new Set,a=[];let s=0;for(const e of t){const l=e.slice(0,1),d=I(l);if(o.has(d))continue;o.add(d);const n=e[0]||"",h=t.some((t=>t.length>1&&I(t.slice(0,1))===d)),c=h&&i.has(d);a.push({key:d,path:[...l],caption:n,level:0,span:1,expanded:c,expandable:h,children:[],field:r,index:s++})}return a}(m,c,f);return{rowHeaders:N,columnHeaders:B,cells:k,rowGrandTotals:F,columnGrandTotals:C,grandTotal:A,rowCount:b.length,columnCount:m.length}}({data:this.effectiveData,fields:this.fields,rowExpandedPaths:this.rowExpandedPaths,columnExpandedPaths:this.columnExpandedPaths,filters:this.filters,sorting:this.sorting,showRowGrandTotals:this.showRowGrandTotals,showColumnGrandTotals:this.showColumnGrandTotals})}catch(t){this.handleError(t),this.matrix=null}else this.matrix=null}componentWillLoad(){this.enableStatePersistence&&this.stateStorageKey&&function(t){if(!t.stateStorageKey)return null;const e=t.storage??("undefined"==typeof localStorage?void 0:localStorage);if(!e)return null;try{const i=L(t.stateStorageKey),r=e.getItem(i);if(!r)return t.onLoad(null),null;const o=c(r,G);if(!o.valid||null==o.value)return t.onLoad(null),null;const a=function(t){return(t.version??0)>=1?t:{version:1,fields:t.fields??[],rowExpandedPaths:t.rowExpandedPaths??[],columnExpandedPaths:t.columnExpandedPaths??[],filters:t.filters??[],sorting:t.sorting??[]}}(o.value);return t.onLoad(a),a}catch(e){return t.onLoad(null),null}}({enable:!0,stateStorageKey:this.stateStorageKey,storage:"sessionStorage"===this.stateStorageType&&"undefined"!=typeof sessionStorage?sessionStorage:void 0,onLoad:t=>{t&&(this.bhStateLoad.emit({state:t}),this.rowExpandedPaths=t.rowExpandedPaths??[],this.columnExpandedPaths=t.columnExpandedPaths??[],this.filters=t.filters??[],this.sorting=t.sorting??[],t.fields?.length&&this.fields.length>0&&(this.fields=this.fields.map((e=>{const i=t.fields.find((t=>t.dataField===e.dataField));return i?{...e,area:i.area,areaIndex:i.areaIndex,visible:i.visible,sortOrder:i.sortOrder}:e}))))}}),this.syncEffectiveData(),u.increment(m.EVENT_EMIT,{component:"bh-pivot-grid",event:"load"}),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++})),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++})),this.i18nUnsubscribe=C.onLocaleChange((()=>{this._i18nVersion++}))}componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:Error(t+"")),u.increment(m.COMPONENT_ERROR,{component:"bh-pivot-grid",error_type:t instanceof Error?t.name:"unknown"}),x("bh-pivot-grid",t),this.bhError.emit({error:t})}componentDidLoad(){this.bhReady.emit()}disconnectedCallback(){this.bhDisposing.emit(),F(this.destroy$),this.listeners.removeAll(),this.i18nUnsubscribe?.()}async expandAll(){if(!this.matrix)return;const t=this.collectExpandablePaths(this.matrix.rowHeaders),e=this.collectExpandablePaths(this.matrix.columnHeaders);this.rowExpandedPaths=t,this.columnExpandedPaths=e,this.bhExpandChange.emit({path:[],expanded:!0,type:"row"}),this.bhExpandChange.emit({path:[],expanded:!0,type:"column"})}async collapseAll(){this.rowExpandedPaths=[],this.columnExpandedPaths=[],this.bhExpandChange.emit({path:[],expanded:!1,type:"row"}),this.bhExpandChange.emit({path:[],expanded:!1,type:"column"})}async expandRow(t){const e=t.join(E);this.rowExpandedPaths.some((t=>t.join(E)===e))||(this.rowExpandedPaths=[...this.rowExpandedPaths,t]),this.bhExpandChange.emit({path:t,expanded:!0,type:"row"})}async collapseRow(t){const e=t.join(E);this.rowExpandedPaths=this.rowExpandedPaths.filter((t=>t.join(E)!==e)),this.bhExpandChange.emit({path:t,expanded:!1,type:"row"})}async expandColumn(t){const e=t.join(E);this.columnExpandedPaths.some((t=>t.join(E)===e))||(this.columnExpandedPaths=[...this.columnExpandedPaths,t]),this.bhExpandChange.emit({path:t,expanded:!0,type:"column"})}async collapseColumn(t){const e=t.join(E);this.columnExpandedPaths=this.columnExpandedPaths.filter((t=>t.join(E)!==e)),this.bhExpandChange.emit({path:t,expanded:!1,type:"column"})}collectExpandablePaths(t){const e=[];for(const i of t)i.expandable&&e.push(i.path),i.children.length>0&&e.push(...this.collectExpandablePaths(i.children));return e}async getState(){return{version:1,fields:this.fields.map((t=>({dataField:t.dataField,area:t.area,areaIndex:t.areaIndex,visible:t.visible,sortOrder:t.sortOrder}))),rowExpandedPaths:[...this.rowExpandedPaths],columnExpandedPaths:[...this.columnExpandedPaths],filters:this.filters.map((t=>({dataField:t.dataField,selectedValues:[...t.selectedValues]}))),sorting:this.sorting.map((t=>({...t})))}}async setState(t){this.rowExpandedPaths=t.rowExpandedPaths??[],this.columnExpandedPaths=t.columnExpandedPaths??[],this.filters=t.filters??[],this.sorting=t.sorting??[],t.fields?.length&&(this.fields=t.fields.map((t=>({...this.fields.find((e=>e.dataField===t.dataField)),dataField:t.dataField,area:t.area,areaIndex:t.areaIndex,visible:t.visible,sortOrder:t.sortOrder})))),this.rebuildMatrix()}async resetState(){this.rowExpandedPaths=[],this.columnExpandedPaths=[],this.filters=[],this.sorting=[],this.rebuildMatrix()}async saveState(){const t=await this.getState();this.bhStateSave.emit({state:t})}async saveStateImmediate(){if(!this.enableStatePersistence||!this.stateStorageKey)return;const t=await this.getState();O({enable:!0,stateStorageKey:this.stateStorageKey,state:t,storage:"sessionStorage"===this.stateStorageType&&"undefined"!=typeof sessionStorage?sessionStorage:void 0,onSave:t=>this.bhStateSave.emit({state:t})})}async loadState(){this.bhStateLoad.emit({state:null})}async getFields(){return[...this.fields]}async getFieldsByArea(t){return this.fields.filter((e=>e.area===t))}async moveField(t,e,i){const r=this.fields.findIndex((e=>e.dataField===t));if(-1===r)return;const o=this.fields.map((t=>({...t}))),a=o[r];a.area=e;const s=o.toSpliced(r,1),l=s.filter((t=>t.area===e));a.areaIndex=void 0===i?l.length:Math.min(i,l.length);const d=["row","column","data","filter"],n=[...s,a].toSorted(((t,e)=>d.indexOf(t.area??"row")-d.indexOf(e.area??"row")||(t.areaIndex??0)-(e.areaIndex??0)));for(const t of d){const e=n.filter((e=>(e.area??"row")===t));for(const[t,i]of e.entries())i.areaIndex=t}this.fields=n,this.bhFieldChange.emit({fields:s,changeType:"move"}),this.scheduleStateSave()}async updateField(t,e){const i=this.fields.findIndex((e=>e.dataField===t));if(-1===i)return;const r=this.fields.map((t=>({...t})));r[i]={...r[i],...e},this.fields=r,this.bhFieldChange.emit({fields:r,changeType:"update"}),this.scheduleStateSave()}async refresh(){this.syncEffectiveData()}async getMatrix(){return this.matrix}async exportTo(t,e){const i=e?.fileName??this.exportFileName,r=e?.includeTotals??this.exportIncludeTotals;this.bhExporting.emit({format:"csv",fileName:i,includeTotals:r}),this.matrix&&B(this.matrix,{fileName:i,includeTotals:r,includeBOM:!0}),this.bhExport.emit({format:"csv",rowCount:this.matrix?.rowCount??0,columnCount:this.matrix?.columnCount??0,fileName:i,includeTotals:r})}async showFieldChooser(){this.fieldChooserOpen=!0}async hideFieldChooser(){this.fieldChooserOpen=!1}onFieldDragStart=(t,e)=>{if(!s(t,e,this.allowFieldDragging))return;const i=e.area??"row";this.dragData={dataField:e.dataField,sourceArea:i},this.bhFieldDragStart.emit({field:e,sourceArea:i,event:t})};onFieldDragEnd=t=>{const e=this.fields.find((t=>t.dataField===this.dragData?.dataField)),i=this.dragData?.sourceArea??"row";l(),this.dragData=null,this.dropTargetArea=null,e&&this.bhFieldDragEnd.emit({field:e,sourceArea:i,event:t})};onFieldDragOver=(t,e)=>{const i=this.dragData??d(t);n(t,e,i)&&(this.dropTargetArea=e)};onFieldDragLeave=()=>{this.dropTargetArea=null};onFieldDrop=(t,e)=>{const i=d(t),r=h(t,e,i,this.fields);this.dropTargetArea=null,this.dragData=null,l(),r&&(this.fields=r.fields,this.bhFieldChange.emit({fields:r.fields,changeType:r.changeType}),this.scheduleStateSave())};setFilterSelectedValues=(t,e)=>{const i=this.filters.filter((e=>e.dataField!==t));e.length>0&&i.push({dataField:t,selectedValues:e}),this.filters=i,this.rebuildMatrix(),this.scheduleStateSave()};toggleSort=t=>{const e=this.sorting.find((e=>e.dataField===t)),i=e?"asc"===e.sortOrder?"desc":void 0:"asc",r=i?this.sorting.filter((e=>e.dataField!==t)).concat([{dataField:t,sortOrder:i}]):this.sorting.filter((e=>e.dataField!==t));this.sorting=r,this.rebuildMatrix(),this.scheduleStateSave()};getSortOrder(t){const e=this.sorting.find((e=>e.dataField===t));return e?.sortOrder??null}closeContextMenu=()=>{this.contextMenuVisible=!1,this.contextMenuClickOutsideHandler&&(this.listeners.remove(document,"click",this.contextMenuClickOutsideHandler),this.contextMenuClickOutsideHandler=null)};openHeaderFilter=(t,e,i)=>{this.headerFilterOpenField=t,this.headerFilterPendingValues=[...e],this.headerFilterSearchQuery="",this.headerFilterAnchorX=i.left,this.headerFilterAnchorY=i.bottom,this.headerFilterClickOutsideHandler=t=>{const e=t.target;this.el?.shadowRoot?.querySelector(".pivot-grid-header-filter-popup")?.contains(e)||this.closeHeaderFilter()},this.destroy$&&k(0,this.destroy$)?.subscribe((()=>{this.headerFilterClickOutsideHandler&&this.listeners.add(document,"click",this.headerFilterClickOutsideHandler)}))};closeHeaderFilter=()=>{const t=this.headerFilterClickOutsideHandler;this.headerFilterOpenField=null,this.headerFilterPendingValues=[],this.headerFilterSearchQuery="",this.headerFilterClickOutsideHandler=null,t&&this.listeners.remove(document,"click",t)};applyHeaderFilter=()=>{this.headerFilterOpenField&&this.setFilterSelectedValues(this.headerFilterOpenField,this.headerFilterPendingValues),this.closeHeaderFilter()};toggleHeaderFilterValue=t=>{const e=new Set(this.headerFilterPendingValues);e.has(t)?e.delete(t):e.add(t),this.headerFilterPendingValues=Array.from(e)};setHeaderFilterSelectAll=(t,e)=>{this.headerFilterPendingValues=t?[...e]:[]};onTableContextMenu=t=>{if(this.disabled)return;t.preventDefault();const e=this.resolvedTexts,i=[];this.allowExpandAll&&(i.push({id:"expand-all",text:e.expandAll,onClick:()=>this.expandAll()}),i.push({id:"collapse-all",text:e.collapseAll,onClick:()=>this.collapseAll()})),this.allowSorting&&this.sorting.length>0&&i.push({id:"remove-sort",text:e.removeAllSorting,onClick:()=>{this.sorting=[],this.rebuildMatrix(),this.scheduleStateSave()}});const r={target:"cell",items:i,event:t,cancel:!1};this.bhContextMenuPreparing.emit(r),r.cancel||(this.contextMenuItems=r.items,this.contextMenuX=t.clientX,this.contextMenuY=t.clientY,this.contextMenuVisible=!0,this.contextMenuClickOutsideHandler=()=>this.closeContextMenu(),this.destroy$&&k(0,this.destroy$)?.subscribe((()=>{this.contextMenuClickOutsideHandler&&this.listeners.add(document,"click",this.contextMenuClickOutsideHandler)})))};handleGridKeyDown=t=>{if(this.contextMenuVisible&&t.key===D.ESCAPE)return t.preventDefault(),void this.closeContextMenu();if(this.headerFilterOpenField&&t.key===D.ESCAPE)return t.preventDefault(),void this.closeHeaderFilter();if(this.disabled||!this.matrix)return;const e=this.matrix.cells.length,i=(this.matrix.cells[0]?.length??0)+(this.showRowGrandTotals?1:0);if(0===e||0===i)return;this.focusedCellRow=Math.max(0,Math.min(this.focusedCellRow,e-1)),this.focusedCellCol=Math.max(0,Math.min(this.focusedCellCol,i-1));let r=this.focusedCellRow,o=this.focusedCellCol,a=!1;switch(t.key){case D.ARROW_UP:t.preventDefault(),r=Math.max(0,this.focusedCellRow-1),a=!0;break;case D.ARROW_DOWN:t.preventDefault(),r=Math.min(e-1,this.focusedCellRow+1),a=!0;break;case D.ARROW_LEFT:t.preventDefault(),o=Math.max(0,this.focusedCellCol-1),a=!0;break;case D.ARROW_RIGHT:t.preventDefault(),o=Math.min(i-1,this.focusedCellCol+1),a=!0;break;case D.HOME:t.preventDefault(),(t.ctrlKey||t.metaKey)&&(r=0),o=0,a=!0;break;case D.END:t.preventDefault(),(t.ctrlKey||t.metaKey)&&(r=e-1),o=i-1,a=!0;break;case D.ENTER:case D.SPACE:{t.preventDefault();const e=this.matrix.cells[this.focusedCellRow],i=e&&this.focusedCellCol<e.length?e[this.focusedCellCol]:null;return void(i&&this.bhCellClick.emit({cell:i,rowPath:i.rowPath,columnPath:i.columnPath,event:t}))}}if(a&&(r!==this.focusedCellRow||o!==this.focusedCellCol)){this.focusedCellRow=r,this.focusedCellCol=o,this.focusMovedByKeyboard=!0;const t=this.matrix.cells[r],e=t&&o<t.length+(this.showRowGrandTotals?1:0)?t[o]:null,i=e?.formattedValue??"";this.liveAnnouncement=`${this.ariaLabel}, row ${r+1}, column ${o+1}${i?", "+i:""}`}};get resolvedTexts(){return{...V,...this.texts}}get rowTotalsPrior(){return"rows"===this.showTotalsPrior||"both"===this.showTotalsPrior}get colTotalsPrior(){return"columns"===this.showTotalsPrior||"both"===this.showTotalsPrior}render(){const t=this.resolvedTexts,e=!(this.effectiveData.length>0&&this.fields.length>0),i=this.matrix,a=null==i?void 0:i.rowCount+(this.showRowGrandTotals?1:0)+(this.showColumnGrandTotals?1:0)+"",s=null==i?void 0:i.columnCount+(this.showRowGrandTotals?1:0)+(this.showColumnGrandTotals?1:0)+"";return r(o,{key:"6fbbb10a181ff987c473f6a3b1f19835c30a7e80","aria-disabled":this.disabled?"true":void 0,"aria-label":S("bh-pivot-grid","ariaLabel",this.ariaLabel,"Pivot grid"),class:"pivot-grid-root",onFocus:t=>{this.matrix&&t.target===this.el&&this.activeCellEl&&this.activeCellEl.focus()},onKeyDown:this.handleGridKeyDown,role:"grid",tabindex:this.disabled?-1:this.focusTabIndex},r("div",{key:"200a2c1a121ef93378488d74c227579339f6cc89","aria-atomic":"true","aria-live":"polite",class:"pivot-grid-live-region",role:"status"},this.liveAnnouncement),r("div",{key:"1aa66a126f3b4bca60066071a3cd3e8b346f9b3b",class:"pivot-grid-root"},this.showFieldPanel&&r("div",{key:"5b235927a3f38e3307fe0f3de4944187e0c927b7",class:"pivot-grid-toolbar",part:"toolbar"},r("slot",{key:"1634439bba85fbff3c38dc9dd99496c1e0154df3",name:"toolbar-start"}),this.showFieldChooserButton&&this.fieldChooserEnabled&&r("button",{key:"a5393995c9651164f85289ade65c27238bf95acf","aria-label":t.showFieldChooser,class:"pivot-grid-toolbar-btn",disabled:this.disabled,onClick:()=>this.showFieldChooser(),type:"button"},t.showFieldChooser),this.enableExport&&this.showExportButton&&r("button",{key:"6c2ab09403c84c1073f75221a8f374df89c09fd2","aria-label":t.exportToExcel,class:"pivot-grid-toolbar-btn",disabled:this.disabled,onClick:()=>this.exportTo("csv"),type:"button"},t.exportToExcel),r("slot",{key:"4b06f58afe90ca5cff3d296b31df85f157a29313",name:"toolbar-end"})),this.showFieldPanel&&r("div",{key:"292857f8cdfb7b01aabf500b972a4dd3e0a97379",class:"pivot-grid-field-panel",part:"field-panel"},this.showRowFields&&r("div",{key:"2d3f2b8e375e2bb814a4f1a5d494ded7ebdef7d5",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"row"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"row"),onDrop:t=>this.onFieldDrop(t,"row"),part:"field-area-row"},r("span",{key:"05ed6c936d9dc66e673a4249642a1e631c210929",class:"pivot-grid-field-area-label"},t.rowFields),r("div",{key:"a31d04115b5c55de9b172d85ad1b4652d0695a66",class:"pivot-grid-field-chips"},this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField))))),this.showColumnFields&&r("div",{key:"af55068f00c27df2a51a795580d00e74e7c4b451",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"column"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"column"),onDrop:t=>this.onFieldDrop(t,"column"),part:"field-area-column"},r("span",{key:"f1ec4e0585bc21025ca2842cfd7638a51af26799",class:"pivot-grid-field-area-label"},t.columnFields),r("div",{key:"5ad15f3abc2b00ba3cbcd995209701ce5dcf4ea5",class:"pivot-grid-field-chips"},this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField))))),this.showDataFields&&r("div",{key:"da383c15d581d08b8808f30a04c849049482c67f",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"data"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"data"),onDrop:t=>this.onFieldDrop(t,"data"),part:"field-area-data"},r("span",{key:"957e082390e7cc25fb278cb18dbb55d81e9602bb",class:"pivot-grid-field-area-label"},t.dataFields),r("div",{key:"0a9957fb1bf333494824a63a84d5a064251f3221",class:"pivot-grid-field-chips"},this.fields.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField,t.summaryType?` (${t.summaryType})`:""))))),this.showFilterFields&&r("div",{key:"ccfd40613869ca7909e9bdeba8a52a9431114b66",class:{"pivot-grid-field-area":!0,"pivot-grid-drop-zone-active":"filter"===this.dropTargetArea},onDragLeave:()=>this.onFieldDragLeave(),onDragOver:t=>this.onFieldDragOver(t,"filter"),onDrop:t=>this.onFieldDrop(t,"filter"),part:"field-area-filter"},r("span",{key:"e7cd46d488f7f8a5515bb32871eddad0a3badcb5",class:"pivot-grid-field-area-label"},t.filterFields),r("div",{key:"92d1eac26f70d7470852bcb1957e444b7c39ab7c",class:"pivot-grid-field-chips"},this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",draggable:this.allowFieldDragging&&!1!==t.allowDragging,key:t.dataField,onDragEnd:t=>this.onFieldDragEnd(t),onDragStart:e=>this.onFieldDragStart(e,t),part:"field-chip"},t.caption??t.dataField)))),this.allowFiltering&&this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((e=>{const i=A(this.effectiveData,e.dataField,this.headerFilterShowRelevantValues?this.filters:void 0),o=this.filters.find((t=>t.dataField===e.dataField))?.selectedValues??[],a=new Set(o);return r("div",{class:"pivot-grid-filter-dropdown-wrap",key:"filter-"+e.dataField},r("label",{class:"pivot-grid-filter-label"},e.caption??e.dataField,":"),this.showHeaderFilter?r("button",{"aria-expanded":this.headerFilterOpenField===e.dataField?"true":"false","aria-haspopup":"dialog","aria-label":"Filter by "+(e.caption??e.dataField),class:"pivot-grid-filter-select pivot-grid-filter-trigger",disabled:this.disabled,onClick:t=>{const i=t.target.getBoundingClientRect();this.openHeaderFilter(e.dataField,o,i)},part:"filter-trigger",type:"button"},0===o.length?t.emptyValue??"(All)":o.length+" selected"):r("select",{"aria-label":"Filter by "+(e.caption??e.dataField),class:"pivot-grid-filter-select",disabled:this.disabled,multiple:!0,onChange:t=>{const r=Array.from(t.target.selectedOptions).map((t=>Number(t.value)));this.setFilterSelectedValues(e.dataField,r.map((t=>i[t])))},part:"filter-select"},i.map(((t,e)=>r("option",{selected:a.has(t),value:e+""},(t??"")+"")))))})))),r("div",{key:"95b64cf01157b79ddd6b5351236659fa979c9f54","aria-busy":this.loading?"true":void 0,class:"pivot-grid-content",role:"region"},this.loading?r("div",{class:"pivot-grid-loading",part:"loading"},r("slot",{name:"loading"},"skeleton"===this.loadingType?r("div",{class:"pivot-grid-skeleton"},r("bh-skeleton-loader",{height:"var(--bh-pivot-grid-header-height)",width:"100%"}),[1,2,3,4,5].map((t=>r("bh-skeleton-loader",{height:"var(--bh-pivot-grid-cell-height)",key:t,width:"100%"})))):r("bh-loader-spinner",{ariaLabel:t.dataNotAvailable,overlay:!0,overlayMessage:t.dataNotAvailable,size:"lg"}))):e?r("div",{class:"pivot-grid-empty",part:"empty",role:"status"},r("slot",{name:"empty-state"},r("div",null,r("strong",null,S("bh-pivot-grid","emptyTitle",this.emptyTitle,"No data")),r("p",null,S("bh-pivot-grid","emptyDescription",this.emptyDescription,"Configure fields to build your pivot table."))))):this.matrix?r("div",{class:"pivot-grid-table-wrapper",onContextMenu:this.onTableContextMenu,part:"table-wrapper"},r("table",{"aria-colcount":s,"aria-label":S("bh-pivot-grid","ariaLabel",this.ariaLabel,"Pivot grid"),"aria-rowcount":a,class:"pivot-grid-table",part:"table"},r("thead",{class:"pivot-grid-thead",part:"thead"},r("tr",{class:"pivot-grid-header-row",role:"row"},r("th",{"aria-sort":this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0?"asc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?"ascending":"desc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?"descending":"none":void 0,class:{"pivot-grid-corner":!0,"pivot-grid-header-cell":!0,"pivot-grid-sortable":this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0},onClick:()=>{const t=this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)))[0];this.allowSorting&&t&&!1!==t.allowSorting&&this.toggleSort(t.dataField)},part:"corner",role:"columnheader",scope:"col"},this.allowSorting&&this.fields.filter((t=>"row"===t.area)).length>0?r("span",{class:"pivot-grid-sort-indicator"},"asc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?" ↑":"desc"===this.getSortOrder(this.fields.filter((t=>"row"===t.area))[0]?.dataField??"")?" ↓":" ⇅"):""),this.colTotalsPrior&&this.showRowGrandTotals&&r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-header",role:"columnheader",scope:"col"},this.resolvedTexts.grandTotal),this.matrix.columnHeaders.map(((t,e)=>{const i=this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0)))[0],o=i&&this.getSortOrder(i.dataField);return r("th",{"aria-sort":this.allowSorting&&0===e&&i&&!1!==i.allowSorting?"asc"===o?"ascending":"desc"===o?"descending":"none":void 0,class:{"pivot-grid-header-cell":!0,"pivot-grid-sortable":this.allowSorting&&0===e&&i&&!1!==i.allowSorting},"data-column-index":e+"",key:t.key,onClick:()=>{this.allowSorting&&0===e&&i&&!1!==i.allowSorting&&this.toggleSort(i.dataField)},part:"column-header",role:"columnheader",scope:"col"},t.caption,this.allowSorting&&0===e&&i&&r("span",{class:"pivot-grid-sort-indicator"},"asc"===o?" ↑":"desc"===o?" ↓":" ⇅"))})),!this.colTotalsPrior&&this.showRowGrandTotals&&r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-header",role:"columnheader",scope:"col"},this.resolvedTexts.grandTotal))),r("tbody",{class:"pivot-grid-tbody",part:"tbody"},this.rowTotalsPrior&&this.showColumnGrandTotals&&r("tr",{class:"pivot-grid-grand-total-row",role:"row"},r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-label",role:"rowheader",scope:"row"},this.resolvedTexts.grandTotal),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),this.matrix.columnGrandTotals.map(((e,i)=>r("td",{class:"pivot-grid-cell pivot-grid-cell-total",key:i,part:"column-grand-total"},(()=>{const i=e.formattedValue;return null==i||""===(i+"").trim()?t.emptyValue:i??""})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})())),this.matrix.cells.map(((e,i)=>r("tr",{class:"pivot-grid-data-row",key:e[0]?.rowPath?.join(E)??"row-"+i,role:"row"},r("th",{class:"pivot-grid-row-header pivot-grid-header-cell","data-row-index":i+"",part:"row-header",role:"rowheader",scope:"row"},this.matrix.rowHeaders[i]?.caption??""),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"row-grand-total"},(()=>{const e=this.matrix.rowGrandTotals[i]?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),e.map(((e,o)=>r("td",{class:{"pivot-grid-cell":!0,"pivot-grid-cell-focused":i===this.focusedCellRow&&o===this.focusedCellCol,"pivot-grid-cell-total":e.isSummary},"data-value":e.formattedValue,key:o,onClick:t=>{this.focusedCellRow=i,this.focusedCellCol=o,this.bhCellClick.emit({cell:e,rowPath:e.rowPath,columnPath:e.columnPath,event:t})},part:"cell",ref:t=>{t&&(this.bhCellPrepared.emit({cell:e,rowPath:e.rowPath,columnPath:e.columnPath,cellElement:t}),i===this.focusedCellRow&&o===this.focusedCellCol&&(this.activeCellEl=t,this.focusMovedByKeyboard&&(t.focus(),this.focusMovedByKeyboard=!1)))},tabindex:i===this.focusedCellRow&&o===this.focusedCellCol?0:-1},(()=>{const i=null==e.formattedValue||""===(e.formattedValue+"").trim();return this.hideEmptySummaryCells&&e.isSummary&&i?"":i?t.emptyValue:e.formattedValue})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"row-grand-total"},(()=>{const e=this.matrix.rowGrandTotals[i]?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})())))),!this.rowTotalsPrior&&this.showColumnGrandTotals&&r("tr",{class:"pivot-grid-grand-total-row",role:"row"},r("th",{class:"pivot-grid-header-cell pivot-grid-total-header",part:"grand-total-label",role:"rowheader",scope:"row"},this.resolvedTexts.grandTotal),this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()),this.matrix.columnGrandTotals.map(((e,i)=>r("td",{class:"pivot-grid-cell pivot-grid-cell-total",key:i,part:"column-grand-total"},(()=>{const i=e.formattedValue;return null==i||""===(i+"").trim()?t.emptyValue:i??""})()))),!this.colTotalsPrior&&this.showRowGrandTotals&&r("td",{class:"pivot-grid-cell pivot-grid-cell-total",part:"grand-total-cell"},(()=>{const e=this.matrix.grandTotal?.formattedValue;return null==e||""===(e+"").trim()?t.emptyValue:e??""})()))))):r("div",{class:"pivot-grid-table-wrapper",part:"table-wrapper"},r("p",{"aria-live":"polite"},this.effectiveData.length," rows, ",this.fields.length," fields configured.")))),r("bh-modal",{key:"f0491f3cfcee78a7873e781026b4b7429f6b7194",ariaLabel:S("bh-pivot-grid","fieldChooserTitle",this.fieldChooserTitle,"Field Chooser"),class:"pivot-grid-field-chooser-modal",onBhClose:()=>this.hideFieldChooser(),visible:this.fieldChooserOpen,width:"md"},r("div",{key:"53b8378cb7ac2dc7a3e08bb8648f648441b888a5",class:"pivot-grid-field-chooser-header",slot:"header"},r("h2",{key:"3342eebdb94a527beb213b2efae4e8d1a9006761",class:"pivot-grid-field-chooser-title"},S("bh-pivot-grid","fieldChooserTitle",this.fieldChooserTitle,"Field Chooser"))),r("div",{key:"85dcbcc5f47b13e39d15956261fc93eb619d59ac",class:"pivot-grid-field-chooser-body"},r("p",{key:"54accab5562a756ece48e67ad0290411f19b2a9f",class:"pivot-grid-field-chooser-hint"},t.rowFieldArea," • ",t.columnFieldArea," • ",t.dataFieldArea," •"," ",t.filterFieldArea),r("div",{key:"deee3da1059575b656c64759ba3d07cf5f40ea1f",class:"pivot-grid-field-chooser-areas"},r("div",{key:"ed9262c407b53341b63b8550003354a5def4f9d1",class:"pivot-grid-field-chooser-area"},r("span",{key:"b20378adbc9a4fcef07d305b2bf2ef374716a4da",class:"pivot-grid-field-area-label"},t.rowFields),r("div",{key:"b3da7c4636ce911ddbbdb444f7ebaa0bd2a6aa1a",class:"pivot-grid-field-chips"},this.fields.filter((t=>"row"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))),r("div",{key:"a6210c4eae492ca8143788e225f1753700602bb7",class:"pivot-grid-field-chooser-area"},r("span",{key:"9251ad88d8afd0b1e43d0981398f45aa56e86657",class:"pivot-grid-field-area-label"},t.columnFields),r("div",{key:"a6bb41eac725feefb97823dfd7240aed8271f9ca",class:"pivot-grid-field-chips"},this.fields.filter((t=>"column"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))),r("div",{key:"e4450160900e137cd487f04d67865ff9602950f7",class:"pivot-grid-field-chooser-area"},r("span",{key:"d4b111a47f3cc58423f795ebd1fbfa8b0f305d7f",class:"pivot-grid-field-area-label"},t.dataFields),r("div",{key:"7431129b07367bcfc3e1e6e272a277ab280697c6",class:"pivot-grid-field-chips"},this.fields.filter((t=>"data"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField,t.summaryType?` (${t.summaryType})`:""))))),r("div",{key:"a7e1cdfd4fee2ff7934c3c7bd3fd07da83348446",class:"pivot-grid-field-chooser-area"},r("span",{key:"164f581553722cad871dd65f6e479e11aea9e7e4",class:"pivot-grid-field-area-label"},t.filterFields),r("div",{key:"5929e949659c43c1fe4f88772866de6aef9a7efc",class:"pivot-grid-field-chips"},this.fields.filter((t=>"filter"===t.area)).toSorted(((t,e)=>(t.areaIndex??0)-(e.areaIndex??0))).map((t=>r("span",{class:"pivot-grid-field-chip",key:t.dataField,part:"field-chip"},t.caption??t.dataField))))))),r("div",{key:"e9b994e2d11a2637ebbb498cabaed327b6a58ab3",class:"pivot-grid-field-chooser-footer",slot:"actions"},r("button",{key:"fdda6a9cf693a6ce62de7c31faff616102ed48ae",class:"pivot-grid-toolbar-btn",onClick:()=>this.hideFieldChooser(),type:"button"},t.ok))),this.headerFilterOpenField&&r("div",{key:"564280762b3c50318b85877120de56bbe150c9bc","aria-label":"Filter by "+(this.fields.find((t=>t.dataField===this.headerFilterOpenField))?.caption??this.headerFilterOpenField),class:"pivot-grid-header-filter-popup",part:"header-filter-popup",role:"dialog",style:{left:this.headerFilterAnchorX+"px",top:this.headerFilterAnchorY+"px",width:this.headerFilterWidth+"px",maxHeight:this.headerFilterHeight+"px"}},(()=>{const t=function(t,e,i){const r=e.trim().toLowerCase();return""===r?t:t.filter((t=>{const e=((t??"")+"").toLowerCase();switch(i){case"contains":default:return e.includes(r);case"startswith":return e.startsWith(r);case"equals":return e===r}}))}(A(this.effectiveData,this.headerFilterOpenField,this.headerFilterShowRelevantValues?this.filters:void 0),this.headerFilterSearchQuery,this.headerFilterSearchMode),e=new Set(this.headerFilterPendingValues),i=this.resolvedTexts,o=t.length>0&&t.every((t=>e.has(t)));return r("div",{class:"pivot-grid-header-filter-popup-inner"},this.headerFilterAllowSelectAll&&t.length>0&&r("label",{class:"pivot-grid-header-filter-select-all"},r("input",{checked:o,onChange:()=>this.setHeaderFilterSelectAll(!o,t),type:"checkbox"}),"Select All"),this.headerFilterSearchEnabled&&r("input",{class:"pivot-grid-header-filter-search",onInput:t=>{this.headerFilterSearchQuery=t.target.value},part:"header-filter-search",placeholder:S("bh-pivot-grid","searchPlaceholder",void 0,"Search..."),type:"search",value:this.headerFilterSearchQuery}),r("div",{class:"pivot-grid-header-filter-list",part:"header-filter-list"},t.map((t=>r("label",{class:"pivot-grid-header-filter-item",key:(t??"")+""},r("input",{checked:e.has(t),onChange:()=>this.toggleHeaderFilterValue(t),type:"checkbox"}),(t??i.emptyValue??"(Blanks)")+"")))),r("div",{class:"pivot-grid-header-filter-actions"},r("button",{class:"pivot-grid-toolbar-btn",onClick:()=>this.closeHeaderFilter(),type:"button"},i.cancel),r("button",{class:"pivot-grid-toolbar-btn pivot-grid-toolbar-btn-primary",onClick:()=>this.applyHeaderFilter(),type:"button"},i.ok)))})()),this.contextMenuVisible&&this.contextMenuItems.length>0&&r("div",{key:"7d6e54dfd3da1a430762d8e525285c8e609d346a",class:"pivot-grid-context-menu",part:"context-menu",role:"menu",style:{left:this.contextMenuX+"px",top:this.contextMenuY+"px"}},this.contextMenuItems.map((t=>t.beginGroup?r("div",{class:"pivot-grid-context-menu-separator",key:t.id,part:"context-menu-separator",role:"separator"}):r("button",{class:"pivot-grid-context-menu-item",disabled:t.disabled,key:t.id,onClick:()=>{t.onClick?.(),this.closeContextMenu()},part:"context-menu-item",role:"menuitem",type:"button"},t.text)))))}static get watchers(){return{data:[{onDataChange:0}],dataSource:[{onDataChange:0}],fields:[{onMatrixInputsChange:0}],rowExpandedPaths:[{onMatrixInputsChange:0}],columnExpandedPaths:[{onMatrixInputsChange:0}],filters:[{onMatrixInputsChange:0}],sorting:[{onMatrixInputsChange:0}],showRowGrandTotals:[{onMatrixInputsChange:0}],showColumnGrandTotals:[{onMatrixInputsChange:0}]}}static get style(){return'@charset "UTF-8";@keyframes spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}@keyframes pulse{0%,100%{opacity:1}50%{opacity:0.5}}@layer bh-tokens,bh-base,bh-states; @layer bh-tokens{:host{display:block;--bh-pivot-grid-cell-height:40px;--bh-pivot-grid-cell-padding-x:var(--spacing-xl);--bh-pivot-grid-header-height:40px;--bh-pivot-grid-min-height:200px;--bh-pivot-grid-max-height:none;--bh-pivot-grid-header-bg:var(--color-white);--bh-pivot-grid-header-text:var(--color-neutral-600);--bh-pivot-grid-border-color:var(--color-neutral-200);--bh-pivot-grid-cell-bg:var(--color-white);--bh-pivot-grid-cell-text:var(--color-neutral-700);--bh-pivot-grid-hover-bg:var(--color-neutral-50);--bh-pivot-grid-total-bg:var(--color-neutral-50);--bh-pivot-grid-field-panel-bg:var(--color-neutral-50);--bh-pivot-grid-field-chip-bg:var(--color-white);--bh-pivot-grid-field-chip-radius:var(--radius-xs);--bh-pivot-grid-drop-zone-bg:var(--color-brand-100);--bh-pivot-grid-sort-icon-size:var(--icon-size-sm);--bh-pivot-grid-field-label-min-width:var( --pivot-grid-field-label-min-width );--bh-pivot-grid-filter-trigger-min-width:var( --pivot-grid-filter-trigger-min-width );--bh-pivot-grid-filter-select-max-height:var( --pivot-grid-filter-select-max-height );--bh-pivot-grid-context-menu-min-width:var( --pivot-grid-context-menu-min-width );--bh-pivot-grid-filter-list-max-height:var( --pivot-grid-filter-list-max-height )}}@layer bh-base{:host{min-height:var(--bh-pivot-grid-min-height);max-height:var(--bh-pivot-grid-max-height);box-sizing:border-box}.pivot-grid-root{display:flex;flex-direction:column;width:100%;min-height:var(--bh-pivot-grid-min-height);font-family:var(--font-inter);color:var(--bh-pivot-grid-cell-text)}.pivot-grid-toolbar{display:flex;align-items:center;gap:var(--spacing-md);padding:var(--spacing-md) var(--bh-pivot-grid-cell-padding-x);background:var(--bh-pivot-grid-field-panel-bg);border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;padding:var(--spacing-sm) var(--spacing-lg);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);font-weight:var(--weight-medium);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-xs);background:var(--bh-pivot-grid-cell-bg);color:var(--bh-pivot-grid-cell-text);cursor:pointer;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-toolbar-btn:hover:not(:disabled){background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-toolbar-btn:disabled{opacity:0.6;cursor:not-allowed}.pivot-grid-field-panel{display:flex;flex-wrap:wrap;gap:var(--spacing-lg) var(--spacing-xl);padding:var(--spacing-md) var(--bh-pivot-grid-cell-padding-x);background:var(--bh-pivot-grid-field-panel-bg);border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-field-area{display:flex;align-items:center;gap:var(--spacing-md);min-height:var(--bh-button-height-sm)}.pivot-grid-field-area-label{font-size:var(--text-xs-size);font-weight:var(--weight-semibold);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);min-width:var(--bh-pivot-grid-field-label-min-width)}.pivot-grid-field-chips{display:flex;flex-wrap:wrap;gap:var(--spacing-xs)}.pivot-grid-field-chip{display:inline-flex;align-items:center;padding:var(--spacing-xxs) var(--spacing-md);font-size:var(--text-xs-size);line-height:var(--text-xs-line);border-radius:var(--bh-pivot-grid-field-chip-radius);background:var(--bh-pivot-grid-field-chip-bg);border:1px solid var(--bh-pivot-grid-border-color);color:var(--bh-pivot-grid-cell-text);transition:background-color var(--animation-duration-fast) ease}.pivot-grid-drop-zone-active{background:var(--bh-pivot-grid-drop-zone-bg);border-radius:var(--bh-pivot-grid-field-chip-radius);min-height:var(--bh-button-height-md)}.pivot-grid-field-chip[draggable=true]{cursor:grab}.pivot-grid-field-chooser-header{display:flex;align-items:center;justify-content:space-between}.pivot-grid-field-chooser-title{font-size:var(--text-lg-size);font-weight:var(--weight-semibold);color:var(--color-text-primary);margin:0}.pivot-grid-field-chooser-body{display:flex;flex-direction:column;gap:var(--spacing-xl)}.pivot-grid-field-chooser-hint{font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);margin:0}.pivot-grid-field-chooser-areas{display:flex;flex-direction:column;gap:var(--spacing-lg)}.pivot-grid-field-chooser-area{display:flex;align-items:center;gap:var(--spacing-md);min-height:var(--bh-button-height-sm)}.pivot-grid-field-chooser-footer{display:flex;justify-content:flex-end;gap:var(--spacing-md)}.pivot-grid-filter-dropdown-wrap{display:inline-flex;align-items:center;gap:var(--spacing-xs);margin-left:var(--spacing-md)}.pivot-grid-filter-label{font-size:var(--text-xs-size);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text)}.pivot-grid-filter-select{font-family:var(--font-inter);font-size:var(--text-xs-size);line-height:var(--text-xs-line);padding:var(--spacing-xxs) var(--spacing-xs);border-radius:var(--bh-pivot-grid-field-chip-radius);border:1px solid var(--bh-pivot-grid-border-color);min-width:var(--bh-pivot-grid-filter-trigger-min-width);max-height:var(--bh-pivot-grid-filter-select-max-height)}.pivot-grid-sortable{cursor:pointer;user-select:none}.pivot-grid-sort-indicator{font-size:var(--text-xs-size);opacity:0.7;margin-left:var(--spacing-xxs)}.pivot-grid-content{flex:1;overflow:auto;display:flex;flex-direction:column}.pivot-grid-table-wrapper{overflow:auto;flex:1}.pivot-grid-table{width:100%;border-collapse:collapse;border-spacing:0;font-size:var(--text-sm-size);line-height:var(--text-sm-line)}.pivot-grid-thead{position:sticky;top:0;z-index:1;background:var(--bh-pivot-grid-header-bg)}.pivot-grid-header-row,.pivot-grid-data-row,.pivot-grid-grand-total-row{border-bottom:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-header-cell{height:var(--bh-pivot-grid-header-height);padding:0 var(--bh-pivot-grid-cell-padding-x);text-align:left;vertical-align:middle;font-size:var(--text-xs-size);font-weight:var(--weight-semibold);line-height:var(--text-xs-line);color:var(--bh-pivot-grid-header-text);background:var(--bh-pivot-grid-header-bg);border-right:1px solid var(--bh-pivot-grid-border-color);border-bottom:1px solid var(--bh-pivot-grid-border-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pivot-grid-corner{min-width:var(--bh-pivot-grid-cell-min-width)}.pivot-grid-row-header{min-width:var(--bh-pivot-grid-cell-min-width);white-space:nowrap}.pivot-grid-cell{height:var(--bh-pivot-grid-cell-height);padding:0 var(--bh-pivot-grid-cell-padding-x);vertical-align:middle;font-size:var(--text-sm-size);font-weight:var(--weight-regular);line-height:var(--text-sm-line);color:var(--bh-pivot-grid-cell-text);background:var(--bh-pivot-grid-cell-bg);border-right:1px solid var(--bh-pivot-grid-border-color);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-variant-numeric:tabular-nums;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-cell-total,.pivot-grid-total-header{background:var(--bh-pivot-grid-total-bg);font-weight:var(--weight-semibold)}.pivot-grid-live-region{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.pivot-grid-empty,.pivot-grid-loading{display:flex;align-items:center;justify-content:center;min-height:var(--bh-pivot-grid-min-height);padding:var(--spacing-3xl);font-size:var(--text-sm-size);line-height:var(--text-sm-line);color:var(--color-text-disabled);background:var(--bh-pivot-grid-cell-bg)}.pivot-grid-skeleton{display:flex;flex-direction:column;gap:var(--spacing-md);width:100%;padding:var(--spacing-xl)}}@layer bh-states{:host([disabled]){pointer-events:none;opacity:0.6}.pivot-grid-cell:not(.pivot-grid-cell-total):hover{background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-cell:focus-visible,.pivot-grid-header-cell:focus-visible,.pivot-grid-toolbar-btn:focus-visible{outline:2px solid var(--color-border-interactive);outline-offset:-2px}.pivot-grid-cell-focused.pivot-grid-cell:focus-visible{outline:2px solid var(--color-border-interactive);outline-offset:-2px}.pivot-grid-context-menu{position:fixed;z-index:var(--bh-z-index-dropdown);min-width:var(--bh-pivot-grid-context-menu-min-width);padding:var(--spacing-xs) 0;background:var(--bh-pivot-grid-cell-bg);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-lg)}.pivot-grid-context-menu-item{display:block;width:100%;padding:var(--spacing-sm) var(--bh-pivot-grid-cell-padding-x);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);text-align:left;background:transparent;border:none;color:var(--bh-pivot-grid-cell-text);cursor:pointer;transition:background-color var(--animation-duration-fast) ease}.pivot-grid-context-menu-item:hover:not(:disabled){background:var(--bh-pivot-grid-hover-bg)}.pivot-grid-context-menu-item:disabled{opacity:0.6;cursor:not-allowed}.pivot-grid-context-menu-separator{height:1px;margin:var(--spacing-xs) 0;background:var(--bh-pivot-grid-border-color)}.pivot-grid-header-filter-popup{position:fixed;z-index:var(--bh-z-index-dropdown);display:flex;flex-direction:column;gap:var(--spacing-md);padding:var(--spacing-lg);background:var(--bh-pivot-grid-cell-bg);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-md);box-shadow:var(--shadow-popup);overflow:hidden}.pivot-grid-header-filter-select-all{display:flex;align-items:center;gap:var(--spacing-md);font-size:var(--text-sm-size);font-weight:var(--weight-semibold);line-height:var(--text-sm-line);cursor:pointer}.pivot-grid-header-filter-search{padding:var(--spacing-sm) var(--spacing-md);font-family:var(--font-inter);font-size:var(--text-sm-size);line-height:var(--text-sm-line);border:1px solid var(--bh-pivot-grid-border-color);border-radius:var(--radius-sm)}.pivot-grid-header-filter-search::placeholder{color:var(--color-text-disabled)}.pivot-grid-header-filter-search:focus{outline:none;border-color:var(--color-border-interactive)}.pivot-grid-header-filter-list{display:flex;flex-direction:column;gap:var(--spacing-xs);overflow-y:auto;max-height:var(--bh-pivot-grid-filter-list-max-height)}.pivot-grid-header-filter-item{display:flex;align-items:center;gap:var(--spacing-md);font-size:var(--text-xs-size);line-height:var(--text-xs-line);cursor:pointer;padding:var(--spacing-xxs) 0}.pivot-grid-header-filter-item:hover{color:var(--color-text-primary)}.pivot-grid-header-filter-actions{display:flex;justify-content:flex-end;gap:var(--spacing-md);padding-top:var(--spacing-md);border-top:1px solid var(--bh-pivot-grid-border-color)}.pivot-grid-filter-trigger{min-width:var(--bh-pivot-grid-filter-trigger-min-width);text-align:left}.pivot-grid-toolbar-btn-primary{background:var(--color-bg-interactive);border-color:var(--color-bg-interactive);color:var(--color-text-inverse)}.pivot-grid-toolbar-btn-primary:hover:not(:disabled){background:var(--color-bg-interactive-hover);border-color:var(--color-bg-interactive-hover)}}'}},[769,"bh-pivot-grid",{data:[16],dataSource:[16],fields:[1040],showRowGrandTotals:[4,"show-row-grand-totals"],showColumnGrandTotals:[4,"show-column-grand-totals"],showRowTotals:[4,"show-row-totals"],showColumnTotals:[4,"show-column-totals"],totalPosition:[1,"total-position"],showTotalsPrior:[1,"show-totals-prior"],rowHeaderLayout:[1,"row-header-layout"],wordWrapEnabled:[4,"word-wrap-enabled"],hideEmptySummaryCells:[4,"hide-empty-summary-cells"],dataFieldArea:[1,"data-field-area"],showBorders:[4,"show-borders"],disabled:[4],encodeHtml:[4,"encode-html"],showFieldPanel:[4,"show-field-panel"],showRowFields:[4,"show-row-fields"],showColumnFields:[4,"show-column-fields"],showDataFields:[4,"show-data-fields"],showFilterFields:[4,"show-filter-fields"],allowFieldDragging:[4,"allow-field-dragging"],showFieldChooserButton:[4,"show-field-chooser-button"],fieldChooserEnabled:[4,"field-chooser-enabled"],fieldChooserApplyMode:[1,"field-chooser-apply-mode"],fieldChooserTitle:[1,"field-chooser-title"],fieldChooserWidth:[2,"field-chooser-width"],fieldChooserHeight:[2,"field-chooser-height"],allowFiltering:[4,"allow-filtering"],showHeaderFilter:[4,"show-header-filter"],headerFilterHeight:[2,"header-filter-height"],headerFilterWidth:[2,"header-filter-width"],headerFilterAllowSelectAll:[4,"header-filter-allow-select-all"],headerFilterShowRelevantValues:[4,"header-filter-show-relevant-values"],headerFilterSearchEnabled:[4,"header-filter-search-enabled"],headerFilterSearchMode:[1,"header-filter-search-mode"],headerFilterSearchTimeout:[2,"header-filter-search-timeout"],allowSorting:[4,"allow-sorting"],allowSortingBySummary:[4,"allow-sorting-by-summary"],allowExpandAll:[4,"allow-expand-all"],rowExpandedPaths:[1040],columnExpandedPaths:[1040],enableExport:[4,"enable-export"],showExportButton:[4,"show-export-button"],exportFileName:[1,"export-file-name"],exportIncludeTotals:[4,"export-include-totals"],enableStatePersistence:[4,"enable-state-persistence"],stateStorageKey:[1,"state-storage-key"],stateStorageType:[1,"state-storage-type"],stateSavingTimeout:[2,"state-saving-timeout"],loading:[4],loadingType:[1,"loading-type"],emptyTitle:[1,"empty-title"],emptyDescription:[1,"empty-description"],ariaLabel:[1,"aria-label"],focusTabIndex:[2,"focus-tab-index"],texts:[16],_i18nVersion:[32],fieldChooserOpen:[32],effectiveData:[32],matrix:[32],dragData:[32],dropTargetArea:[32],filters:[32],sorting:[32],focusedCellRow:[32],focusedCellCol:[32],liveAnnouncement:[32],contextMenuVisible:[32],contextMenuX:[32],contextMenuY:[32],contextMenuItems:[32],headerFilterOpenField:[32],headerFilterPendingValues:[32],headerFilterSearchQuery:[32],headerFilterAnchorX:[32],headerFilterAnchorY:[32],expandAll:[64],collapseAll:[64],expandRow:[64],collapseRow:[64],expandColumn:[64],collapseColumn:[64],getState:[64],setState:[64],resetState:[64],saveState:[64],saveStateImmediate:[64],loadState:[64],getFields:[64],getFieldsByArea:[64],moveField:[64],updateField:[64],refresh:[64],getMatrix:[64],exportTo:[64],showFieldChooser:[64],hideFieldChooser:[64]},void 0,{data:[{onDataChange:0}],dataSource:[{onDataChange:0}],fields:[{onMatrixInputsChange:0}],rowExpandedPaths:[{onMatrixInputsChange:0}],columnExpandedPaths:[{onMatrixInputsChange:0}],filters:[{onMatrixInputsChange:0}],sorting:[{onMatrixInputsChange:0}],showRowGrandTotals:[{onMatrixInputsChange:0}],showColumnGrandTotals:[{onMatrixInputsChange:0}]}]),K=j,W=function(){"undefined"!=typeof customElements&&["bh-pivot-grid","bh-loader-spinner","bh-modal","bh-skeleton-loader"].forEach((t=>{switch(t){case"bh-pivot-grid":customElements.get(a(t))||customElements.define(a(t),j);break;case"bh-loader-spinner":customElements.get(a(t))||p();break;case"bh-modal":customElements.get(a(t))||v();break;case"bh-skeleton-loader":customElements.get(a(t))||f()}}))};export{K as BhPivotGrid,W as defineCustomElement}
@@ -1 +1 @@
1
- import{p as r,H as e,c as o,h as s,d as a,t as l}from"./p-YZi6LqIt.js";import{c as t,m as c,M as i,r as n}from"./p-BJXjqxlX.js";const b=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.bhProgressClick=o(this,"bhProgressClick")}logger=t("bh-progress-bar");data={value:80,max:100};showPercentage=!0;showValue=!0;showLabel=!0;showSublabel=!0;color="var(--bh-progress-bar-fill-color)";trackColor="var(--bh-progress-bar-track-color)";height=8;animated=!0;ariaLabel="";bhProgressClick;componentDidCatch(r){this.logger.error("Component error caught",r instanceof Error?r:Error(r+"")),c.increment(i.COMPONENT_ERROR,{component:"bh-progress-bar"}),n("bh-progress-bar",r)}getPercentage(){const{value:r,max:e}=this.data;return!Number.isFinite(r)||!Number.isFinite(e)||e<=0||r<0?(this.logger.warn("Invalid progress data",{value:r,max:e}),0):Math.min(Math.round(r/e*100),100)}getAriaLabel(){if(this.ariaLabel)return this.ariaLabel;const{label:r,formattedValue:e,value:o}=this.data,s=this.getPercentage(),a=e||o+"";return r?`${r}: ${a}, ${s}% complete`:`${a}, ${s}% complete`}handleClick=r=>{this.bhProgressClick.emit({value:this.data.value,percentage:this.getPercentage(),event:r})};render(){const r=this.getPercentage(),{label:e,formattedValue:o,value:l,sublabel:t}=this.data,c=o||l+"";return s(a,{key:"9a7299faa2a64f46b786a25fb409674648483bac"},s("div",{key:"4c05fe6effcc097f014d007db744ddd4542312a7","aria-label":this.getAriaLabel(),"aria-valuemax":this.data.max,"aria-valuemin":0,"aria-valuenow":this.data.value,class:{"progress-bar-container":!0,"progress-bar-animated":this.animated},onClick:this.handleClick,part:"container",role:"meter"},this.showLabel&&e&&s("div",{key:"b011d9fb700057c3210de759cd88e92f1d16c97f",class:"progress-label",part:"label"},e),this.showValue&&s("div",{key:"12e3d82a7b0db913b09092856334bd2b3849fc5f",class:"progress-value",part:"value"},c),s("div",{key:"e5f0663411ceef624cacc3b15245f01d00996d22",class:"progress-track-row"},s("div",{key:"fb4afbd4ebf62d9d51428a5166f516c7f997a5eb",class:"progress-track",part:"track",style:{height:this.height+"px",backgroundColor:this.trackColor}},s("div",{key:"743ee8f143f09fcc52819a41eb1c0a9ea5340db7",class:"progress-fill",part:"fill",style:{width:r+"%",backgroundColor:this.color}})),this.showPercentage&&s("span",{key:"76671bf3760eea5675780eeac930459b31834e1e",class:"progress-percentage",part:"percentage"},r,"%")),this.showSublabel&&t&&s("div",{key:"9093c370961d79dea8bc49584ed84e402b45d7b9",class:"progress-sublabel",part:"sublabel"},t)))}static get style(){return' @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"); @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-reset, bh-tokens, bh-base, bh-utilities; @layer bh-tokens { :root { --color-white: hsl(0, 0%, 100%); --color-black: hsl(0, 0%, 0%); --color-transparent: hsla(0, 0%, 100%, 0); --color-neutral-25: hsl(210, 20%, 99%); --color-neutral-50: hsl(225, 40%, 98%); --color-neutral-100: hsl(225, 40%, 96%); --color-neutral-200: hsl(223, 32%, 91%); --color-neutral-300: hsl(223, 29%, 84%); --color-neutral-400: hsl(224, 23%, 65%); --color-neutral-500: hsl(226, 16%, 47%); --color-neutral-600: hsl(225, 22%, 37%); --color-neutral-700: hsl(224, 25%, 27%); --color-neutral-800: hsl(226, 25%, 20%); --color-neutral-900: hsl(227, 31%, 11%); --color-neutral-950: hsl(228, 38%, 5%); --color-brand-25: hsl(220, 82%, 98%); --color-brand-50: hsl(226, 100%, 97%); --color-brand-100: hsl(223, 88%, 94%); --color-brand-200: hsl(226, 71%, 86%); --color-brand-300: hsl(227, 75%, 78%); --color-brand-400: hsl(228, 73%, 67%); --color-brand-500: hsl(230, 69%, 59%); --color-brand-600: hsl(230, 69%, 48%); --color-brand-700: hsl(230, 69%, 41%); --color-brand-800: hsl(230, 69%, 31%); --color-brand-900: hsl(230, 68%, 21%); --color-brand-950: hsl(229, 70%, 8%); --color-error-25: hsl(6, 100%, 99%); --color-error-50: hsl(6, 100%, 98%); --color-error-100: hsl(10, 100%, 93%); --color-error-200: hsl(8, 100%, 88%); --color-error-300: hsl(8, 100%, 79%); --color-error-400: hsl(10, 94%, 65%); --color-error-500: hsl(16, 100%, 48%); --color-error-600: hsl(12, 100%, 44%); --color-error-700: hsl(11, 100%, 37%); --color-error-800: hsl(10, 100%, 30%); --color-error-900: hsl(14, 100%, 25%); --color-error-950: hsl(7, 100%, 14%); --color-warning-25: hsl(47, 92%, 98%); --color-warning-50: hsl(47, 100%, 96%); --color-warning-100: hsl(48, 93%, 89%); --color-warning-200: hsl(48, 95%, 78%); --color-warning-300: hsl(46, 96%, 65%); --color-warning-400: hsl(40, 95%, 60%); --color-warning-500: hsl(33, 92%, 58%); --color-warning-600: hsl(26, 71%, 51%); --color-warning-700: hsl(21, 72%, 41%); --color-warning-800: hsl(21, 75%, 33%); --color-warning-900: hsl(21, 71%, 27%); --color-warning-950: hsl(21, 84%, 14%); --color-success-25: hsl(144, 78%, 98%); --color-success-50: hsl(138, 76%, 97%); --color-success-100: hsl(141, 78%, 93%); --color-success-200: hsl(140, 76%, 85%); --color-success-300: hsl(142, 75%, 73%); --color-success-400: hsl(143, 68%, 55%); --color-success-500: hsl(136, 57%, 49%); --color-success-600: hsl(134, 58%, 41%); --color-success-700: hsl(139, 61%, 31%); --color-success-800: hsl(143, 63%, 24%); --color-success-900: hsl(142, 54%, 19%); --color-success-950: hsl(143, 67%, 11%); --font-inter: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; --text-xl-size: 1.25rem; --text-lg-size: 1.125rem; --text-md-size: 1rem; --text-sm-size: 0.875rem; --text-xs-size: 0.75rem; --text-xl-line: 1.875rem; --text-lg-line: 1.75rem; --text-md-line: 1.5rem; --text-sm-line: 1.25rem; --text-xs-line: 1.125rem; --spacing-none: 0rem; --spacing-xxs: 0.125rem; --spacing-xs: 0.25rem; --spacing-sm: 0.375rem; --spacing-md: 0.5rem; --spacing-lg: 0.75rem; --spacing-xl: 1rem; --spacing-2xl: 1.25rem; --spacing-3xl: 1.5rem; --spacing-4xl: 2rem; --spacing-5xl: 2.5rem; --spacing-6xl: 3rem; --radius-none: 0rem; --radius-xxs: 0.125rem; --radius-xs: 0.25rem; --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.625rem; --radius-xl: 0.75rem; --radius-2xl: 1rem; --radius-3xl: 1.25rem; --radius-4xl: 1.5rem; --radius-full: 9999px; --shadow-xs: 0px 1px 2px rgba(16, 24, 40, 0.05); --shadow-sm: 0px 1px 3px rgba(16, 24, 40, 0.1), 0px 1px 2px rgba(16, 24, 40, 0.06); --shadow-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06); --shadow-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03); --shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03); --icon-compensation-xs-btn: calc(var(--spacing-lg) - var(--spacing-xs)); --icon-compensation-sm-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --icon-compensation-md-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --icon-compensation-lg-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --color-bg-primary: var(--color-white); --color-bg-secondary: var(--color-neutral-50); --color-bg-tertiary: var(--color-neutral-100); --color-bg-quaternary: var(--color-neutral-200); --color-bg-inverse: var(--color-neutral-900); --color-bg-interactive: var(--color-brand-600); --color-bg-interactive-hover: var(--color-brand-700); --color-bg-interactive-active: var(--color-brand-800); --color-bg-destructive: var(--color-error-600); --color-bg-destructive-hover: var(--color-error-700); --color-bg-destructive-active: var(--color-error-800); --color-bg-success: var(--color-success-700); --color-bg-success-hover: var(--color-success-800); --color-bg-warning: var(--color-warning-500); --color-bg-disabled: var(--color-neutral-200); --color-text-primary: var(--color-neutral-900); --color-text-secondary: var(--color-neutral-600); --color-text-tertiary: var(--color-neutral-500); --color-text-inverse: var(--color-white); --color-text-interactive: var(--color-brand-600); --color-text-interactive-hover: var(--color-brand-700); --color-text-error: var(--color-error-600); --color-text-success: var(--color-success-700); --color-text-warning: var(--color-warning-700); --color-text-disabled: var(--color-neutral-400); --color-border-primary: var(--color-neutral-300); --color-border-secondary: var(--color-neutral-200); --color-border-interactive: var(--color-brand-500); --color-border-error: var(--color-error-500); --color-border-success: var(--color-success-500); --color-border-disabled: var(--color-neutral-200); --color-surface-overlay: rgba(0, 0, 0, 0.5); --color-surface-elevated: var(--color-white); } } @layer bh-reset { *, *::before, *::after { box-sizing: border-box; } } @layer bh-base { .material-symbols-outlined { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: block; --bh-progress-bar-track-color: var( --color-neutral-100, hsl(224deg 25% 89%) ); --bh-progress-bar-fill-color: var( --bh-chart-color-1, var(--color-brand-600, hsl(230deg 69% 48%)) ); --bh-progress-bar-label-color: var( --color-text-secondary, hsl(226deg 24% 48%) ); --bh-progress-bar-value-color: var( --color-text-primary, hsl(233deg 33% 10%) ); --bh-progress-bar-sublabel-color: var( --color-text-tertiary, hsl(226deg 24% 58%) ); --bh-progress-bar-percentage-color: var( --color-text-secondary, hsl(226deg 24% 48%) ); --bh-progress-bar-value-size: var(--text-2xl-size, 1.5rem); --bh-progress-bar-label-size: var(--text-sm-size, 0.875rem); --bh-progress-bar-sublabel-size: var(--text-xs-size, 0.75rem); --bh-progress-bar-percentage-size: var(--text-xs-size, 0.75rem); --bh-progress-bar-radius: var(--radius-full, 9999px); --bh-progress-bar-gap: var(--spacing-xs, 4px); } } @layer bh-base { .progress-bar-container { display: flex; flex-direction: column; gap: var(--bh-progress-bar-gap); cursor: pointer; font-family: var(--font-inter, system-ui, sans-serif); } .progress-label { font-size: var(--bh-progress-bar-label-size); color: var(--bh-progress-bar-label-color); line-height: var(--line-height-normal, 1.5); } .progress-value { font-size: var(--bh-progress-bar-value-size); font-weight: var(--weight-semibold, 600); color: var(--bh-progress-bar-value-color); line-height: var(--line-height-tight, 1.25); } .progress-track-row { display: flex; align-items: center; gap: var(--spacing-sm, 6px); } .progress-track { flex: 1; border-radius: var(--bh-progress-bar-radius); overflow: hidden; position: relative; } .progress-fill { height: 100%; border-radius: var(--bh-progress-bar-radius); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .progress-percentage { font-size: var(--bh-progress-bar-percentage-size); color: var(--bh-progress-bar-percentage-color); white-space: nowrap; min-width: 2.5em; text-align: right; } .progress-sublabel { font-size: var(--bh-progress-bar-sublabel-size); color: var(--bh-progress-bar-sublabel-color); text-align: right; } } @layer bh-variants { .progress-bar-animated .progress-fill { animation: progressFill 0.8s cubic-bezier(0.4, 0, 0.2, 1) both; } } @layer bh-states { .progress-bar-container:hover .progress-fill { filter: brightness(1.05); } } @layer bh-utilities { @keyframes progressFill { from { width: 0%; } } @media (prefers-reduced-motion: reduce) { .progress-bar-animated .progress-fill { animation: none; } .progress-fill { transition: none; } } }'}},[513,"bh-progress-bar",{data:[16],showPercentage:[4,"show-percentage"],showValue:[4,"show-value"],showLabel:[4,"show-label"],showSublabel:[4,"show-sublabel"],color:[1],trackColor:[1,"track-color"],height:[2],animated:[4],ariaLabel:[1,"aria-label"]}]),h=b,g=function(){"undefined"!=typeof customElements&&["bh-progress-bar"].forEach((r=>{"bh-progress-bar"===r&&(customElements.get(l(r))||customElements.define(l(r),b))}))};export{h as BhProgressBar,g as defineCustomElement}
1
+ import{p as r,H as e,c as o,h as s,d as a,t as l}from"./p-YZi6LqIt.js";import{c as t,m as c,M as i,r as n}from"./p-BJXjqxlX.js";const b=r(class extends e{constructor(r){super(),!1!==r&&this.__registerHost(),this.__attachShadow(),this.bhProgressClick=o(this,"bhProgressClick")}logger=t("bh-progress-bar");data={value:80,max:100};showPercentage=!0;showValue=!0;showLabel=!0;showSublabel=!0;color="var(--bh-progress-bar-fill-color)";trackColor="var(--bh-progress-bar-track-color)";height=8;animated=!0;ariaLabel="";bhProgressClick;componentDidCatch(r){this.logger.error("Component error caught",r instanceof Error?r:Error(r+"")),c.increment(i.COMPONENT_ERROR,{component:"bh-progress-bar"}),n("bh-progress-bar",r)}getPercentage(){const{value:r,max:e}=this.data;return!Number.isFinite(r)||!Number.isFinite(e)||e<=0||r<0?(this.logger.warn("Invalid progress data",{value:r,max:e}),0):Math.min(Math.round(r/e*100),100)}getAriaLabel(){if(this.ariaLabel)return this.ariaLabel;const{label:r,formattedValue:e,value:o}=this.data,s=this.getPercentage(),a=e||o+"";return r?`${r}: ${a}, ${s}% complete`:`${a}, ${s}% complete`}handleClick=r=>{this.bhProgressClick.emit({value:this.data.value,percentage:this.getPercentage(),event:r})};render(){const r=this.getPercentage(),{label:e,formattedValue:o,value:l,sublabel:t}=this.data,c=o||l+"";return s(a,{key:"48d7e391cdc1b39313ad50b8fed3b6700dd97f5e"},s("div",{key:"3a0a5e832c961546425faf75c5072b52346825b9","aria-label":this.getAriaLabel(),"aria-valuemax":this.data.max,"aria-valuemin":0,"aria-valuenow":this.data.value,class:{"progress-bar-container":!0,"progress-bar-animated":this.animated},onClick:this.handleClick,part:"container",role:"meter"},this.showLabel&&e&&s("div",{key:"7d7af6542e816dfab62460ec549e1baa16c1674e",class:"progress-label",part:"label"},e),this.showValue&&s("div",{key:"4d6d062b185a81d3014047234c446adafb499add",class:"progress-value",part:"value"},c),s("div",{key:"492f2236640812d7acb5a908c33ee16ec496dd05",class:"progress-track-row"},s("div",{key:"2496c9a4bd3a6dc6f49bdd5c94864e71c2e2ae6c",class:"progress-track",part:"track",style:{height:this.height+"px",backgroundColor:this.trackColor}},s("div",{key:"200a05ac521da65eb4d633102b6ea52317c746c8",class:"progress-fill",part:"fill",style:{width:r+"%",backgroundColor:this.color}})),this.showPercentage&&s("span",{key:"3a59357896ea81e2f077d2f96b37477e24380297",class:"progress-percentage",part:"percentage"},r,"%")),this.showSublabel&&t&&s("div",{key:"3db6988ad6a79534987b2ff4f82408ecc20674fb",class:"progress-sublabel",part:"sublabel"},t)))}static get style(){return' @import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"); @import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200&display=swap"); @keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-reset, bh-tokens, bh-base, bh-utilities; @layer bh-tokens { :root { --color-white: hsl(0, 0%, 100%); --color-black: hsl(0, 0%, 0%); --color-transparent: hsla(0, 0%, 100%, 0); --color-neutral-25: hsl(210, 20%, 99%); --color-neutral-50: hsl(225, 40%, 98%); --color-neutral-100: hsl(225, 40%, 96%); --color-neutral-200: hsl(223, 32%, 91%); --color-neutral-300: hsl(223, 29%, 84%); --color-neutral-400: hsl(224, 23%, 65%); --color-neutral-500: hsl(226, 16%, 47%); --color-neutral-600: hsl(225, 22%, 37%); --color-neutral-700: hsl(224, 25%, 27%); --color-neutral-800: hsl(226, 25%, 20%); --color-neutral-900: hsl(227, 31%, 11%); --color-neutral-950: hsl(228, 38%, 5%); --color-brand-25: hsl(220, 82%, 98%); --color-brand-50: hsl(226, 100%, 97%); --color-brand-100: hsl(223, 88%, 94%); --color-brand-200: hsl(226, 71%, 86%); --color-brand-300: hsl(227, 75%, 78%); --color-brand-400: hsl(228, 73%, 67%); --color-brand-500: hsl(230, 69%, 59%); --color-brand-600: hsl(230, 69%, 48%); --color-brand-700: hsl(230, 69%, 41%); --color-brand-800: hsl(230, 69%, 31%); --color-brand-900: hsl(230, 68%, 21%); --color-brand-950: hsl(229, 70%, 8%); --color-error-25: hsl(6, 100%, 99%); --color-error-50: hsl(6, 100%, 98%); --color-error-100: hsl(10, 100%, 93%); --color-error-200: hsl(8, 100%, 88%); --color-error-300: hsl(8, 100%, 79%); --color-error-400: hsl(10, 94%, 65%); --color-error-500: hsl(16, 100%, 48%); --color-error-600: hsl(12, 100%, 44%); --color-error-700: hsl(11, 100%, 37%); --color-error-800: hsl(10, 100%, 30%); --color-error-900: hsl(14, 100%, 25%); --color-error-950: hsl(7, 100%, 14%); --color-warning-25: hsl(47, 92%, 98%); --color-warning-50: hsl(47, 100%, 96%); --color-warning-100: hsl(48, 93%, 89%); --color-warning-200: hsl(48, 95%, 78%); --color-warning-300: hsl(46, 96%, 65%); --color-warning-400: hsl(40, 95%, 60%); --color-warning-500: hsl(33, 92%, 58%); --color-warning-600: hsl(26, 71%, 51%); --color-warning-700: hsl(21, 72%, 41%); --color-warning-800: hsl(21, 75%, 33%); --color-warning-900: hsl(21, 71%, 27%); --color-warning-950: hsl(21, 84%, 14%); --color-success-25: hsl(144, 78%, 98%); --color-success-50: hsl(138, 76%, 97%); --color-success-100: hsl(141, 78%, 93%); --color-success-200: hsl(140, 76%, 85%); --color-success-300: hsl(142, 75%, 73%); --color-success-400: hsl(143, 68%, 55%); --color-success-500: hsl(136, 57%, 49%); --color-success-600: hsl(134, 58%, 41%); --color-success-700: hsl(139, 61%, 31%); --color-success-800: hsl(143, 63%, 24%); --color-success-900: hsl(142, 54%, 19%); --color-success-950: hsl(143, 67%, 11%); --font-inter: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; --weight-regular: 400; --weight-medium: 500; --weight-semibold: 600; --weight-bold: 700; --text-xl-size: 1.25rem; --text-lg-size: 1.125rem; --text-md-size: 1rem; --text-sm-size: 0.875rem; --text-xs-size: 0.75rem; --text-xl-line: 1.875rem; --text-lg-line: 1.75rem; --text-md-line: 1.5rem; --text-sm-line: 1.25rem; --text-xs-line: 1.125rem; --spacing-none: 0rem; --spacing-xxs: 0.125rem; --spacing-xs: 0.25rem; --spacing-sm: 0.375rem; --spacing-md: 0.5rem; --spacing-lg: 0.75rem; --spacing-xl: 1rem; --spacing-2xl: 1.25rem; --spacing-3xl: 1.5rem; --spacing-4xl: 2rem; --spacing-5xl: 2.5rem; --spacing-6xl: 3rem; --radius-none: 0rem; --radius-xxs: 0.125rem; --radius-xs: 0.25rem; --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.625rem; --radius-xl: 0.75rem; --radius-2xl: 1rem; --radius-3xl: 1.25rem; --radius-4xl: 1.5rem; --radius-full: 9999px; --shadow-xs: 0px 1px 2px rgba(16, 24, 40, 0.05); --shadow-sm: 0px 1px 3px rgba(16, 24, 40, 0.1), 0px 1px 2px rgba(16, 24, 40, 0.06); --shadow-md: 0px 4px 8px -2px rgba(16, 24, 40, 0.1), 0px 2px 4px -2px rgba(16, 24, 40, 0.06); --shadow-lg: 0px 12px 16px -4px rgba(16, 24, 40, 0.08), 0px 4px 6px -2px rgba(16, 24, 40, 0.03); --shadow-xl: 0px 20px 24px -4px rgba(16, 24, 40, 0.08), 0px 8px 8px -4px rgba(16, 24, 40, 0.03); --icon-compensation-xs-btn: calc(var(--spacing-lg) - var(--spacing-xs)); --icon-compensation-sm-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --icon-compensation-md-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --icon-compensation-lg-btn: calc(var(--spacing-xl) - var(--spacing-xs)); --color-bg-primary: var(--color-white); --color-bg-secondary: var(--color-neutral-50); --color-bg-tertiary: var(--color-neutral-100); --color-bg-quaternary: var(--color-neutral-200); --color-bg-inverse: var(--color-neutral-900); --color-bg-interactive: var(--color-brand-600); --color-bg-interactive-hover: var(--color-brand-700); --color-bg-interactive-active: var(--color-brand-800); --color-bg-destructive: var(--color-error-600); --color-bg-destructive-hover: var(--color-error-700); --color-bg-destructive-active: var(--color-error-800); --color-bg-success: var(--color-success-700); --color-bg-success-hover: var(--color-success-800); --color-bg-warning: var(--color-warning-500); --color-bg-disabled: var(--color-neutral-200); --color-text-primary: var(--color-neutral-900); --color-text-secondary: var(--color-neutral-600); --color-text-tertiary: var(--color-neutral-500); --color-text-inverse: var(--color-white); --color-text-interactive: var(--color-brand-600); --color-text-interactive-hover: var(--color-brand-700); --color-text-error: var(--color-error-600); --color-text-success: var(--color-success-700); --color-text-warning: var(--color-warning-700); --color-text-disabled: var(--color-neutral-400); --color-border-primary: var(--color-neutral-300); --color-border-secondary: var(--color-neutral-200); --color-border-interactive: var(--color-brand-500); --color-border-error: var(--color-error-500); --color-border-success: var(--color-success-500); --color-border-disabled: var(--color-neutral-200); --color-surface-overlay: rgba(0, 0, 0, 0.5); --color-surface-elevated: var(--color-white); } } @layer bh-reset { *, *::before, *::after { box-sizing: border-box; } } @layer bh-base { .material-symbols-outlined { font-family: "Material Symbols Outlined"; font-weight: normal; font-style: normal; font-size: 24px; line-height: 1; letter-spacing: normal; text-transform: none; display: inline-block; white-space: nowrap; word-wrap: normal; direction: ltr; font-feature-settings: "liga"; -webkit-font-feature-settings: "liga"; -webkit-font-smoothing: antialiased; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: block; --bh-progress-bar-track-color: var( --color-neutral-100, hsl(224deg 25% 89%) ); --bh-progress-bar-fill-color: var( --bh-chart-color-1, var(--color-brand-600, hsl(230deg 69% 48%)) ); --bh-progress-bar-label-color: var( --color-text-secondary, hsl(226deg 24% 48%) ); --bh-progress-bar-value-color: var( --color-text-primary, hsl(233deg 33% 10%) ); --bh-progress-bar-sublabel-color: var( --color-text-tertiary, hsl(226deg 24% 58%) ); --bh-progress-bar-percentage-color: var( --color-text-secondary, hsl(226deg 24% 48%) ); --bh-progress-bar-value-size: var(--text-2xl-size, 1.5rem); --bh-progress-bar-label-size: var(--text-sm-size, 0.875rem); --bh-progress-bar-sublabel-size: var(--text-xs-size, 0.75rem); --bh-progress-bar-percentage-size: var(--text-xs-size, 0.75rem); --bh-progress-bar-radius: var(--radius-full, 9999px); --bh-progress-bar-gap: var(--spacing-xs, 4px); } } @layer bh-base { .progress-bar-container { display: flex; flex-direction: column; gap: var(--bh-progress-bar-gap); cursor: pointer; font-family: var(--font-inter, system-ui, sans-serif); } .progress-label { font-size: var(--bh-progress-bar-label-size); color: var(--bh-progress-bar-label-color); line-height: var(--line-height-normal, 1.5); } .progress-value { font-size: var(--bh-progress-bar-value-size); font-weight: var(--weight-semibold, 600); color: var(--bh-progress-bar-value-color); line-height: var(--line-height-tight, 1.25); } .progress-track-row { display: flex; align-items: center; gap: var(--spacing-sm, 6px); } .progress-track { flex: 1; border-radius: var(--bh-progress-bar-radius); overflow: hidden; position: relative; } .progress-fill { height: 100%; border-radius: var(--bh-progress-bar-radius); transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); } .progress-percentage { font-size: var(--bh-progress-bar-percentage-size); color: var(--bh-progress-bar-percentage-color); white-space: nowrap; min-width: 2.5em; text-align: right; } .progress-sublabel { font-size: var(--bh-progress-bar-sublabel-size); color: var(--bh-progress-bar-sublabel-color); text-align: right; } } @layer bh-variants { .progress-bar-animated .progress-fill { animation: progressFill 0.8s cubic-bezier(0.4, 0, 0.2, 1) both; } } @layer bh-states { .progress-bar-container:hover .progress-fill { filter: brightness(1.05); } } @layer bh-utilities { @keyframes progressFill { from { width: 0%; } } @media (prefers-reduced-motion: reduce) { .progress-bar-animated .progress-fill { animation: none; } .progress-fill { transition: none; } } }'}},[513,"bh-progress-bar",{data:[16],showPercentage:[4,"show-percentage"],showValue:[4,"show-value"],showLabel:[4,"show-label"],showSublabel:[4,"show-sublabel"],color:[1],trackColor:[1,"track-color"],height:[2],animated:[4],ariaLabel:[1,"aria-label"]}]),h=b,g=function(){"undefined"!=typeof customElements&&["bh-progress-bar"].forEach((r=>{"bh-progress-bar"===r&&(customElements.get(l(r))||customElements.define(l(r),b))}))};export{h as BhProgressBar,g as defineCustomElement}
@@ -1 +1 @@
1
- import{B as o,d as s}from"./p-CdwBDbHF.js";const p=o,r=s;export{p as BhProgressRing,r as defineCustomElement}
1
+ import{B as o,d as s}from"./p-B9--bog4.js";const p=o,r=s;export{p as BhProgressRing,r as defineCustomElement}
@@ -1 +1 @@
1
- import{p as e,H as r,c as t,h as o,d as a,t as i}from"./p-YZi6LqIt.js";import{d as s}from"./p-cD3vmu49.js";import{d as n}from"./p-BbPrWlsw.js";import{c,m as p,M as l,r as d}from"./p-BJXjqxlX.js";import{c as h,t as m,a as u}from"./p-CqAYzGVs.js";import{c as g}from"./p-YdVz1TeW.js";import{B as f,r as b}from"./p-BNVOtH-1.js";import{c as y}from"./p-CFlb5gKI.js";import{i as v}from"./p-BqJRACkO.js";const x={portfolio:"business",region:"public",property:"location_on"},w=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhChange=t(this,"bhChange"),this.bhFocus=t(this,"bhFocus"),this.bhBlur=t(this,"bhBlur"),this.bhOpen=t(this,"bhOpen"),this.bhClose=t(this,"bhClose")}logger=c("bh-property-switcher");destroy$=h();i18nUnsubscribe;_i18nVersion=0;selectedProperty="Select a property";properties=[];grouped=!1;searchPlaceholder="Search properties...";clearSearchAriaLabel="Clear search";bhChange;bhFocus;bhBlur;bhOpen;bhClose;isExpanded=!1;focusState=g();focusVersion=0;componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:Error(e+"")),p.increment(l.COMPONENT_ERROR,{component:"bh-property-switcher",error_type:e instanceof Error?e.name:"unknown"}),d("bh-property-switcher",e)}searchQuery="";expandedGroups=new Set;internalSelectedProperty="";switcherRef;searchInputRef;getParsedProperties(){if(Array.isArray(this.properties))return this.properties;if("string"==typeof this.properties)try{const e=JSON.parse(this.properties);return Array.isArray(e)?e:[]}catch{return this.logger.warn("Failed to parse properties JSON string"),[]}return[]}componentWillLoad(){this.internalSelectedProperty=this.selectedProperty,this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=f.onLocaleChange((()=>{this._i18nVersion++}))}dismissalManager;handleExpandedChange(e){e?this.dismissalManager?.enable():this.dismissalManager?.disable()}componentDidLoad(){this.switcherRef&&(this.dismissalManager=y(this.switcherRef,{onDismiss:()=>{this.isExpanded=!1},escapeKey:!1,clickOutside:!0,focusLoss:!1}),this.isExpanded&&this.dismissalManager.enable())}handleKeyDown(e){this.isExpanded&&v(e)&&(this.isExpanded=!1)}handleToggle=()=>{const e=this.isExpanded;if(this.isExpanded=!this.isExpanded,this.isExpanded){if(this.bhOpen.emit(),this.searchQuery="",this.grouped){const e=this.getPropertyGroups();this.expandedGroups=new Set(e.map((e=>e.id)))}this.destroy$&&m(50,this.destroy$)?.subscribe((()=>{this.searchInputRef?.focus()}))}else e&&this.bhClose.emit()};handleFocus=e=>{this.focusState.handleFocus(e,(e=>this.bhFocus.emit(e)))};handleBlur=e=>{this.focusState.handleBlur(e,(e=>this.bhBlur.emit(e)))};disconnectedCallback(){this.dismissalManager?.destroy(),u(this.destroy$),this.i18nUnsubscribe?.()}handleSearchInput=e=>{this.searchQuery=e.target.value};handleGroupToggle=e=>{const r=new Set(this.expandedGroups);r.has(e)?r.delete(e):r.add(e),this.expandedGroups=r};handlePropertySelect=e=>{this.internalSelectedProperty=e.name,this.bhChange.emit(e),this.isExpanded=!1,this.searchQuery=""};getPropertyGroups=()=>{const e=new Map,r=[],t=this.getParsedProperties();for(const o of t)if(o.group){const r=e.get(o.group)||[];r.push(o),e.set(o.group,r)}else r.push(o);const o=[];for(const[r,t]of e)o.push({id:r.toLowerCase().replace(/\s+/g,"-"),name:r,properties:t});return r.length>0&&o.push({id:"ungrouped",name:"Other",properties:r}),o};filterProperties=e=>{if(!this.searchQuery.trim())return e;const r=this.searchQuery.toLowerCase();return e.filter((e=>e.name.toLowerCase().includes(r)))};filterGroups=e=>{if(!this.searchQuery.trim())return e;const r=this.searchQuery.toLowerCase();return e.map((e=>{const t=e.name.toLowerCase().includes(r),o=e.properties.filter((e=>e.name.toLowerCase().includes(r)));return t?{...e}:o.length>0?{...e,properties:o}:null})).filter((e=>null!==e))};getPropertyIcon=e=>x[e]??x.property;renderSearchInput(){return o("div",{class:"search-container"},o("span",{class:"material-symbols-outlined search-icon"},"search"),o("input",{class:"search-input",onClick:e=>e.stopPropagation(),onInput:this.handleSearchInput,placeholder:this.searchPlaceholder,ref:e=>this.searchInputRef=e,type:"text",value:this.searchQuery}),this.searchQuery&&o("bh-button-icon",{ariaLabel:b("bh-property-switcher","clearSearchAriaLabel",this.clearSearchAriaLabel,"Clear search"),class:"clear-search",hierarchy:"tertiary",iconName:"close",onClick:e=>{e.stopPropagation(),this.searchQuery="",this.searchInputRef?.focus()},size:"xs"}))}renderPropertyItem(e){const r=e.name===this.internalSelectedProperty;return o("button",{class:{"property-item":!0,selected:r},onClick:()=>this.handlePropertySelect(e)},o("span",{class:"material-symbols-outlined property-icon"},this.getPropertyIcon(e.type)),o("span",{class:"property-item-name",title:e.name},e.name),r&&o("span",{class:"material-symbols-outlined check-icon"},"check"))}renderGroupedView(){const e=this.getPropertyGroups(),r=this.filterGroups(e);return 0===r.length?this.renderEmptyState():o("div",{class:"groups-container"},r.map((e=>{const r=this.expandedGroups.has(e.id);return o("div",{class:"property-group",key:e.id},o("button",{"aria-expanded":r?"true":"false",class:{"group-header":!0,expanded:r},onClick:()=>this.handleGroupToggle(e.id)},o("span",{class:"material-symbols-outlined group-expand-icon"},r?"expand_more":"chevron_right"),o("span",{class:"group-name"},e.name),o("span",{class:"group-count"},e.properties.length)),r&&o("div",{class:"group-properties"},e.properties.map((e=>o("div",{key:e.id},this.renderPropertyItem(e))))))})))}renderFlatView(){const e=this.filterProperties(this.getParsedProperties());if(0===e.length)return this.renderEmptyState();const r=[];for(const t of e)"portfolio"===t.type?(r.push(t),r.push({divider:!0})):"property"===t.type&&r.push(t);return o("div",{class:"flat-list-container"},r.map(((e,r)=>"divider"in e?o("div",{class:"menu-divider",key:"divider-"+r}):o("div",{key:e.id},this.renderPropertyItem(e)))))}renderEmptyState(){return o("div",{class:"empty-state"},o("span",{class:"material-symbols-outlined empty-icon"},"search_off"),o("span",{class:"empty-text"},"No properties found"))}getSelectedProperty(){return this.getParsedProperties().find((e=>e.name===this.internalSelectedProperty))}render(){const e={"property-switcher":!0,expanded:this.isExpanded},r=this.getSelectedProperty(),t=this.internalSelectedProperty||this.selectedProperty;return o(a,{key:"429ba01d80adaee53bb584055ece19d1bb9896cc"},o("div",{key:"1ad15b7a1e4139fe60b4bf9fffce5ae777e818fc",class:e,"data-focused":this.focusState.isFocused+"",onFocusin:this.handleFocus,onFocusout:this.handleBlur,part:"container",ref:e=>this.switcherRef=e},o("button",{key:"013ac97ca0ee382de90a141ca5db380d44b6de83","aria-expanded":this.isExpanded?"true":"false","aria-label":"Property selector: "+t,class:"property-selector",onClick:()=>this.handleToggle(),part:"selector"},r&&o("span",{key:"a244fd3353c102d25ac68035fd84328816594886",class:"material-symbols-outlined selector-icon"},this.getPropertyIcon(r.type)),o("span",{key:"eb3aca3724177b0efd674b72cb5bb911fbe4a209",class:"property-name"},t),o("span",{key:"b3c3d8da7a30c8bde04ada9c096bc6edf8281535","aria-label":this.isExpanded?"Collapse Options":"Expand Options",class:"material-symbols-outlined expand-icon"},this.isExpanded?"unfold_less":"unfold_more")),this.isExpanded&&o("div",{key:"d128c5b478dd680e96f702afedd1def258dc0b70",class:"dropdown-panel",part:"dropdown"},this.renderSearchInput(),o("div",{key:"23da5ec77685171758a61f227e6f355ab44c72b5",class:"dropdown-content",part:"content"},this.grouped?this.renderGroupedView():this.renderFlatView()))))}static get watchers(){return{isExpanded:[{handleExpandedChange:0}]}}static get style(){return"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { --bh-property-switcher-group-letter-spacing: 0.5px; --bh-property-switcher-indent-offset: 26px; } } @layer bh-base { .property-switcher { position: relative; display: inline-block; width: var(--bh-property-switcher-width); } .property-selector { display: flex; align-items: center; justify-content: flex-start; gap: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); border: none; background: transparent; cursor: pointer; border-radius: var(--radius-sm); transition: background-color var(--animation-duration-normal) ease; width: 100%; height: var(--bh-property-switcher-trigger-height); min-width: 0; } .selector-icon { font-size: var(--icon-size-base); color: var(--color-text-tertiary); flex-shrink: 0; } .property-name { font-family: var(--font-inter); font-weight: var(--weight-medium); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; flex-grow: 1; min-width: 0; text-align: left; } .expand-icon { font-size: var(--icon-size-base); flex-shrink: 0; color: var(--color-text-disabled); transition: color var(--animation-duration-normal) ease; } .dropdown-panel { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); background-color: var(--color-bg-primary); border: 1px solid var(--color-border-secondary); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); min-width: var(--bh-property-switcher-dropdown-min-width); max-width: var(--bh-property-switcher-dropdown-max-width); animation: dropdownSlideIn var(--animation-duration-fast) ease-out; overflow: hidden; } .search-container { display: flex; align-items: center; gap: var(--spacing-xs); padding: var(--spacing-sm); background-color: var(--color-bg-primary); border-bottom: 1px solid var(--color-border-secondary); } .search-icon { font-size: var(--icon-size-md); color: var(--color-text-tertiary); flex-shrink: 0; } .search-input { flex: 1; border: none; outline: none; font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); background: transparent; min-width: 0; } .search-input::placeholder { color: var(--color-text-disabled); } .clear-search { flex-shrink: 0; } .dropdown-content { max-height: var(--bh-property-switcher-dropdown-max-height); overflow-y: auto; } .flat-list-container { padding: var(--spacing-xs) 0; } .flat-list-container .property-item { padding-left: var(--spacing-md); } .groups-container { padding: var(--spacing-xs) 0; } .property-group { border-bottom: 1px solid var(--color-border-secondary); } .property-group:last-child { border-bottom: none; } .group-header { display: flex; align-items: center; gap: var(--spacing-xs); width: 100%; padding: var(--spacing-sm) var(--spacing-md); border: none; background: var(--color-bg-secondary); cursor: pointer; font-family: var(--font-inter); font-size: var(--text-xs-size); font-weight: var(--weight-semibold); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: var(--bh-property-switcher-group-letter-spacing); transition: background-color var(--animation-duration-fast) ease; } .group-expand-icon { font-size: var(--icon-size-base); color: var(--color-text-tertiary); transition: transform var(--animation-duration-fast) ease; } .group-name { flex: 1; text-align: left; } .group-count { font-size: var(--text-xs-size); font-weight: var(--weight-semibold); color: var(--color-text-tertiary); background-color: var(--color-bg-tertiary); padding: var(--spacing-xxs) var(--spacing-md); border-radius: var(--radius-full); min-width: var(--spacing-2xl); text-align: center; } .group-properties { padding: var(--spacing-xs) 0; } .property-item { display: flex; align-items: center; gap: var(--spacing-sm); width: 100%; padding: var(--spacing-sm) var(--spacing-md); padding-left: calc(var(--spacing-md) + var(--bh-property-switcher-indent-offset)); border: none; background: transparent; cursor: pointer; font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); text-align: left; transition: background-color var(--animation-duration-fast) ease; } .property-icon { font-size: var(--icon-size-md); color: var(--color-text-disabled); flex-shrink: 0; } .property-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--weight-regular); } .check-icon { font-size: var(--icon-size-base); color: var(--color-text-interactive); flex-shrink: 0; } .menu-divider { height: 1px; background-color: var(--color-bg-secondary); margin: var(--spacing-xs) var(--spacing-md); } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--spacing-2xl) var(--spacing-xl); gap: var(--spacing-sm); } .empty-icon { font-size: var(--icon-size-4xl); color: var(--color-text-disabled); } .empty-text { font-family: var(--font-inter); font-size: var(--text-sm-size); color: var(--color-text-tertiary); } .dropdown-menu-container { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); max-height: var(--bh-property-switcher-list-max-height); } .popover-container { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); animation: popoverSlideIn var(--animation-duration-slow) ease-out; transform-origin: top center; } } @layer bh-states { .property-selector:hover { background-color: var(--color-bg-secondary); } .group-header:hover { background-color: var(--color-bg-tertiary); } .property-item:hover { background-color: var(--color-bg-secondary); } .property-item.selected { background-color: var(--color-bg-secondary); color: var(--color-text-interactive); } .property-item.selected .property-icon { color: var(--color-text-interactive); } .property-item.selected .property-item-name { font-weight: var(--weight-medium); } .popover-container.closing { animation: popoverSlideOut var(--animation-duration-normal) ease-in forwards; } } @layer bh-utilities { @keyframes dropdownSlideIn { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes popoverSlideIn { 0% { opacity: 0; transform: translateY(calc(-1 * var(--spacing-xl))); } 100% { opacity: 1; transform: translateY(0); } } @keyframes popoverSlideOut { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(calc(-1 * var(--spacing-xl))); } } }"}},[513,"bh-property-switcher",{selectedProperty:[1,"selected-property"],properties:[16],grouped:[4],searchPlaceholder:[1,"search-placeholder"],clearSearchAriaLabel:[1,"clear-search-aria-label"],_i18nVersion:[32],isExpanded:[32],focusVersion:[32],searchQuery:[32],expandedGroups:[32],internalSelectedProperty:[32]},[[4,"keydown","handleKeyDown"]],{isExpanded:[{handleExpandedChange:0}]}]),k=w,z=function(){"undefined"!=typeof customElements&&["bh-property-switcher","bh-button-icon","bh-loader-spinner"].forEach((e=>{switch(e){case"bh-property-switcher":customElements.get(i(e))||customElements.define(i(e),w);break;case"bh-button-icon":customElements.get(i(e))||s();break;case"bh-loader-spinner":customElements.get(i(e))||n()}}))};export{k as BhPropertySwitcher,z as defineCustomElement}
1
+ import{p as e,H as r,c as t,h as o,d as a,t as i}from"./p-YZi6LqIt.js";import{d as s}from"./p-CClVva-u.js";import{d as n}from"./p-BbPrWlsw.js";import{c,m as p,M as l,r as d}from"./p-BJXjqxlX.js";import{c as h,t as m,a as g}from"./p-CqAYzGVs.js";import{c as u}from"./p-YdVz1TeW.js";import{B as f,r as y}from"./p-BNVOtH-1.js";import{c as b}from"./p-CFlb5gKI.js";import{i as v}from"./p-BqJRACkO.js";const x={portfolio:"business",region:"public",property:"location_on"},w=e(class extends r{constructor(e){super(),!1!==e&&this.__registerHost(),this.__attachShadow(),this.bhChange=t(this,"bhChange"),this.bhFocus=t(this,"bhFocus"),this.bhBlur=t(this,"bhBlur"),this.bhOpen=t(this,"bhOpen"),this.bhClose=t(this,"bhClose")}logger=c("bh-property-switcher");destroy$=h();i18nUnsubscribe;_i18nVersion=0;selectedProperty="";properties=[];grouped=!1;searchPlaceholder="Search properties...";clearSearchAriaLabel="Clear search";bhChange;bhFocus;bhBlur;bhOpen;bhClose;isExpanded=!1;focusState=u();focusVersion=0;componentDidCatch(e){this.logger.error("Component error caught",e instanceof Error?e:Error(e+"")),p.increment(l.COMPONENT_ERROR,{component:"bh-property-switcher",error_type:e instanceof Error?e.name:"unknown"}),d("bh-property-switcher",e)}searchQuery="";expandedGroups=new Set;internalSelectedProperty="";switcherRef;searchInputRef;getParsedProperties(){if(Array.isArray(this.properties))return this.properties;if("string"==typeof this.properties)try{const e=JSON.parse(this.properties);return Array.isArray(e)?e:[]}catch{return this.logger.warn("Failed to parse properties JSON string"),[]}return[]}componentWillLoad(){this.internalSelectedProperty=this.selectedProperty||this.getParsedProperties()[0]?.name||"",this.focusState.onChange((()=>{this.focusVersion++})),this.i18nUnsubscribe=f.onLocaleChange((()=>{this._i18nVersion++}))}dismissalManager;handlePropertiesChange(){this.internalSelectedProperty||(this.internalSelectedProperty=this.getParsedProperties()[0]?.name??"")}handleSelectedPropertyChange(e){this.internalSelectedProperty=e||this.getParsedProperties()[0]?.name||""}handleExpandedChange(e){e?this.dismissalManager?.enable():this.dismissalManager?.disable()}componentDidLoad(){this.switcherRef&&(this.dismissalManager=b(this.switcherRef,{onDismiss:()=>{this.isExpanded=!1},escapeKey:!1,clickOutside:!0,focusLoss:!1}),this.isExpanded&&this.dismissalManager.enable())}handleKeyDown(e){this.isExpanded&&v(e)&&(this.isExpanded=!1)}handleToggle=()=>{const e=this.isExpanded;if(this.isExpanded=!this.isExpanded,this.isExpanded){if(this.bhOpen.emit(),this.searchQuery="",this.grouped){const e=this.getPropertyGroups();this.expandedGroups=new Set(e.map((e=>e.id)))}this.destroy$&&m(50,this.destroy$)?.subscribe((()=>{this.searchInputRef?.focus()}))}else e&&this.bhClose.emit()};handleFocus=e=>{this.focusState.handleFocus(e,(e=>this.bhFocus.emit(e)))};handleBlur=e=>{this.focusState.handleBlur(e,(e=>this.bhBlur.emit(e)))};disconnectedCallback(){this.dismissalManager?.destroy(),g(this.destroy$),this.i18nUnsubscribe?.()}handleSearchInput=e=>{this.searchQuery=e.target.value};handleGroupToggle=e=>{const r=new Set(this.expandedGroups);r.has(e)?r.delete(e):r.add(e),this.expandedGroups=r};handlePropertySelect=e=>{this.internalSelectedProperty=e.name,this.bhChange.emit(e),this.isExpanded=!1,this.searchQuery=""};getPropertyGroups=()=>{const e=new Map,r=[],t=this.getParsedProperties();for(const o of t)if(o.group){const r=e.get(o.group)||[];r.push(o),e.set(o.group,r)}else r.push(o);const o=[];for(const[r,t]of e)o.push({id:r.toLowerCase().replace(/\s+/g,"-"),name:r,properties:t});return r.length>0&&o.push({id:"ungrouped",name:"Other",properties:r}),o};filterProperties=e=>{if(!this.searchQuery.trim())return e;const r=this.searchQuery.toLowerCase();return e.filter((e=>e.name.toLowerCase().includes(r)))};filterGroups=e=>{if(!this.searchQuery.trim())return e;const r=this.searchQuery.toLowerCase();return e.map((e=>{const t=e.name.toLowerCase().includes(r),o=e.properties.filter((e=>e.name.toLowerCase().includes(r)));return t?{...e}:o.length>0?{...e,properties:o}:null})).filter((e=>null!==e))};getPropertyIcon=e=>x[e]??x.property;renderSearchInput(){return o("div",{class:"search-container"},o("span",{class:"material-symbols-outlined search-icon"},"search"),o("input",{class:"search-input",onClick:e=>e.stopPropagation(),onInput:this.handleSearchInput,placeholder:this.searchPlaceholder,ref:e=>this.searchInputRef=e,type:"text",value:this.searchQuery}),this.searchQuery&&o("bh-button-icon",{ariaLabel:y("bh-property-switcher","clearSearchAriaLabel",this.clearSearchAriaLabel,"Clear search"),class:"clear-search",hierarchy:"tertiary",iconName:"close",onClick:e=>{e.stopPropagation(),this.searchQuery="",this.searchInputRef?.focus()},size:"xs"}))}renderPropertyItem(e){const r=e.name===this.internalSelectedProperty;return o("button",{class:{"property-item":!0,selected:r},onClick:()=>this.handlePropertySelect(e)},o("span",{class:"material-symbols-outlined property-icon"},this.getPropertyIcon(e.type)),o("span",{class:"property-item-name",title:e.name},e.name),r&&o("span",{class:"material-symbols-outlined check-icon"},"check"))}renderGroupedView(){const e=this.getPropertyGroups(),r=this.filterGroups(e);return 0===r.length?this.renderEmptyState():o("div",{class:"groups-container"},r.map((e=>{const r=this.expandedGroups.has(e.id);return o("div",{class:"property-group",key:e.id},o("button",{"aria-expanded":r?"true":"false",class:{"group-header":!0,expanded:r},onClick:()=>this.handleGroupToggle(e.id)},o("span",{class:"material-symbols-outlined group-expand-icon"},r?"expand_more":"chevron_right"),o("span",{class:"group-name"},e.name),o("span",{class:"group-count"},e.properties.length)),r&&o("div",{class:"group-properties"},e.properties.map((e=>o("div",{key:e.id},this.renderPropertyItem(e))))))})))}renderFlatView(){const e=this.filterProperties(this.getParsedProperties());if(0===e.length)return this.renderEmptyState();const r=[];for(const t of e)"portfolio"===t.type?(r.push(t),r.push({divider:!0})):"property"===t.type&&r.push(t);return o("div",{class:"flat-list-container"},r.map(((e,r)=>"divider"in e?o("div",{class:"menu-divider",key:"divider-"+r}):o("div",{key:e.id},this.renderPropertyItem(e)))))}renderEmptyState(){return o("div",{class:"empty-state"},o("span",{class:"material-symbols-outlined empty-icon"},"search_off"),o("span",{class:"empty-text"},"No properties found"))}getSelectedProperty(){return this.getParsedProperties().find((e=>e.name===this.internalSelectedProperty))}render(){const e={"property-switcher":!0,expanded:this.isExpanded},r=this.getSelectedProperty(),t=this.internalSelectedProperty||this.selectedProperty;return o(a,{key:"0314c59164bd68049834d6926937a5410511b2f4"},o("div",{key:"9bd6697b5086fb3b91ba3d07e0df7a107f763c61",class:e,"data-focused":this.focusState.isFocused+"",onFocusin:this.handleFocus,onFocusout:this.handleBlur,part:"container",ref:e=>this.switcherRef=e},o("button",{key:"064c51318774731963786d9600f9d9c0aa325e61","aria-expanded":this.isExpanded?"true":"false","aria-label":"Property selector: "+t,class:"property-selector",onClick:()=>this.handleToggle(),part:"selector"},r&&o("span",{key:"dde9f0c0da94b80c7833ced86a232641b9c34ea2",class:"material-symbols-outlined selector-icon"},this.getPropertyIcon(r.type)),o("span",{key:"786cf85012ba2ca9fab0016668e3946bc137c39a",class:"property-name"},t),o("span",{key:"d0e53949cbad02f7fba5cf5e05bbb32513311710","aria-label":this.isExpanded?"Collapse Options":"Expand Options",class:"material-symbols-outlined expand-icon"},this.isExpanded?"unfold_less":"unfold_more")),this.isExpanded&&o("div",{key:"32ae0957298d8c182fbee896f11d075bd9172636",class:"dropdown-panel",part:"dropdown"},this.renderSearchInput(),o("div",{key:"ce586cbd183d9fa6c362e4c844fc8d78866f8dc8",class:"dropdown-content",part:"content"},this.grouped?this.renderGroupedView():this.renderFlatView()))))}static get watchers(){return{properties:[{handlePropertiesChange:0}],selectedProperty:[{handleSelectedPropertyChange:0}],isExpanded:[{handleExpandedChange:0}]}}static get style(){return"@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } @keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } } @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { --bh-property-switcher-group-letter-spacing: 0.5px; --bh-property-switcher-indent-offset: 26px; } } @layer bh-base { .property-switcher { position: relative; display: inline-block; width: var(--bh-property-switcher-width); } .property-selector { display: flex; align-items: center; justify-content: flex-start; gap: var(--spacing-xs); padding: var(--spacing-xs) var(--spacing-sm); border: none; background: transparent; cursor: pointer; border-radius: var(--radius-sm); transition: background-color var(--animation-duration-normal) ease; width: 100%; height: var(--bh-property-switcher-trigger-height); min-width: 0; } .selector-icon { font-size: var(--icon-size-base); color: var(--color-text-tertiary); flex-shrink: 0; } .property-name { font-family: var(--font-inter); font-weight: var(--weight-medium); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); text-overflow: ellipsis; overflow: hidden; white-space: nowrap; flex-grow: 1; min-width: 0; text-align: left; } .expand-icon { font-size: var(--icon-size-base); flex-shrink: 0; color: var(--color-text-disabled); transition: color var(--animation-duration-normal) ease; } .dropdown-panel { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); background-color: var(--color-bg-primary); border: 1px solid var(--color-border-secondary); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); min-width: var(--bh-property-switcher-dropdown-min-width); max-width: var(--bh-property-switcher-dropdown-max-width); animation: dropdownSlideIn var(--animation-duration-fast) ease-out; overflow: hidden; } .search-container { display: flex; align-items: center; gap: var(--spacing-xs); padding: var(--spacing-sm); background-color: var(--color-bg-primary); border-bottom: 1px solid var(--color-border-secondary); } .search-icon { font-size: var(--icon-size-md); color: var(--color-text-tertiary); flex-shrink: 0; } .search-input { flex: 1; border: none; outline: none; font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-primary); background: transparent; min-width: 0; } .search-input::placeholder { color: var(--color-text-disabled); } .clear-search { flex-shrink: 0; } .dropdown-content { max-height: var(--bh-property-switcher-dropdown-max-height); overflow-y: auto; } .flat-list-container { padding: var(--spacing-xs) 0; } .flat-list-container .property-item { padding-left: var(--spacing-md); } .groups-container { padding: var(--spacing-xs) 0; } .property-group { border-bottom: 1px solid var(--color-border-secondary); } .property-group:last-child { border-bottom: none; } .group-header { display: flex; align-items: center; gap: var(--spacing-xs); width: 100%; padding: var(--spacing-sm) var(--spacing-md); border: none; background: var(--color-bg-secondary); cursor: pointer; font-family: var(--font-inter); font-size: var(--text-xs-size); font-weight: var(--weight-semibold); color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: var(--bh-property-switcher-group-letter-spacing); transition: background-color var(--animation-duration-fast) ease; } .group-expand-icon { font-size: var(--icon-size-base); color: var(--color-text-tertiary); transition: transform var(--animation-duration-fast) ease; } .group-name { flex: 1; text-align: left; } .group-count { font-size: var(--text-xs-size); font-weight: var(--weight-semibold); color: var(--color-text-tertiary); background-color: var(--color-bg-tertiary); padding: var(--spacing-xxs) var(--spacing-md); border-radius: var(--radius-full); min-width: var(--spacing-2xl); text-align: center; } .group-properties { padding: var(--spacing-xs) 0; } .property-item { display: flex; align-items: center; gap: var(--spacing-sm); width: 100%; padding: var(--spacing-sm) var(--spacing-md); padding-left: calc(var(--spacing-md) + var(--bh-property-switcher-indent-offset)); border: none; background: transparent; cursor: pointer; font-family: var(--font-inter); font-size: var(--text-sm-size); line-height: var(--line-height-normal); color: var(--color-text-secondary); text-align: left; transition: background-color var(--animation-duration-fast) ease; } .property-icon { font-size: var(--icon-size-md); color: var(--color-text-disabled); flex-shrink: 0; } .property-item-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: var(--weight-regular); } .check-icon { font-size: var(--icon-size-base); color: var(--color-text-interactive); flex-shrink: 0; } .menu-divider { height: 1px; background-color: var(--color-bg-secondary); margin: var(--spacing-xs) var(--spacing-md); } .empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: var(--spacing-2xl) var(--spacing-xl); gap: var(--spacing-sm); } .empty-icon { font-size: var(--icon-size-4xl); color: var(--color-text-disabled); } .empty-text { font-family: var(--font-inter); font-size: var(--text-sm-size); color: var(--color-text-tertiary); } .dropdown-menu-container { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); max-height: var(--bh-property-switcher-list-max-height); } .popover-container { position: absolute; top: 100%; left: 0; z-index: var(--bh-z-index-dropdown); margin-top: var(--spacing-xs); animation: popoverSlideIn var(--animation-duration-slow) ease-out; transform-origin: top center; } } @layer bh-states { .property-selector:hover { background-color: var(--color-bg-secondary); } .group-header:hover { background-color: var(--color-bg-tertiary); } .property-item:hover { background-color: var(--color-bg-secondary); } .property-item.selected { background-color: var(--color-bg-secondary); color: var(--color-text-interactive); } .property-item.selected .property-icon { color: var(--color-text-interactive); } .property-item.selected .property-item-name { font-weight: var(--weight-medium); } .popover-container.closing { animation: popoverSlideOut var(--animation-duration-normal) ease-in forwards; } } @layer bh-utilities { @keyframes dropdownSlideIn { 0% { opacity: 0; transform: translateY(-8px); } 100% { opacity: 1; transform: translateY(0); } } @keyframes popoverSlideIn { 0% { opacity: 0; transform: translateY(calc(-1 * var(--spacing-xl))); } 100% { opacity: 1; transform: translateY(0); } } @keyframes popoverSlideOut { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(calc(-1 * var(--spacing-xl))); } } }"}},[513,"bh-property-switcher",{selectedProperty:[1,"selected-property"],properties:[16],grouped:[4],searchPlaceholder:[1,"search-placeholder"],clearSearchAriaLabel:[1,"clear-search-aria-label"],_i18nVersion:[32],isExpanded:[32],focusVersion:[32],searchQuery:[32],expandedGroups:[32],internalSelectedProperty:[32]},[[4,"keydown","handleKeyDown"]],{properties:[{handlePropertiesChange:0}],selectedProperty:[{handleSelectedPropertyChange:0}],isExpanded:[{handleExpandedChange:0}]}]),k=w,z=function(){"undefined"!=typeof customElements&&["bh-property-switcher","bh-button-icon","bh-loader-spinner"].forEach((e=>{switch(e){case"bh-property-switcher":customElements.get(i(e))||customElements.define(i(e),w);break;case"bh-button-icon":customElements.get(i(e))||s();break;case"bh-loader-spinner":customElements.get(i(e))||n()}}))};export{k as BhPropertySwitcher,z as defineCustomElement}
@@ -1 +1 @@
1
- import{p as a,H as r,c as t,h as e,d as s,t as i}from"./p-YZi6LqIt.js";import{d as o}from"./p-C6UC_xxP.js";import{a as n}from"./p-DBw2LsqR.js";import{c as h,m as l,M as d,r as c}from"./p-BJXjqxlX.js";import{B as b,r as u}from"./p-BNVOtH-1.js";const m=a(class extends r{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bhItemClick=t(this,"bhItemClick"),this.bhSeriesHover=t(this,"bhSeriesHover"),this.bhSeriesLeave=t(this,"bhSeriesLeave"),this.bhTooltipOpen=t(this,"bhTooltipOpen"),this.bhTooltipClose=t(this,"bhTooltipClose"),this.bhError=t(this,"bhError")}get el(){return this}data={axes:[{key:"mon",label:"Mon"},{key:"tue",label:"Tue"},{key:"wed",label:"Wed"},{key:"thu",label:"Thu"},{key:"fri",label:"Fri"},{key:"sat",label:"Sat"},{key:"sun",label:"Sun"}],series:[{name:"Series 1",values:{mon:800,tue:900,wed:700,thu:600,fri:750,sat:400,sun:500}},{name:"Series 2",values:{mon:600,tue:500,wed:800,thu:700,fri:650,sat:300,sun:400}},{name:"Series 3",values:{mon:400,tue:300,wed:500,thu:400,fri:350,sat:200,sun:250}}]};size=300;variant="both";levels=5;animated=!0;showLabels=!0;showDots=!0;fillOpacity=.25;maxValue=1e3;ariaLabel="Radar chart";bhItemClick;bhSeriesHover;bhSeriesLeave;bhTooltipOpen;bhTooltipClose;bhError;tooltipVisible=!1;tooltipX=0;tooltipY=0;tooltipItems=[];tooltipHeader="";hoveredSeries=null;logger=h("bh-radar-chart");i18nUnsubscribe;_i18nVersion=0;componentDidCatch(a){this.logger.error("Component error caught",a instanceof Error?a:Error(a+"")),l.increment(d.COMPONENT_ERROR,{component:"bh-radar-chart"}),c("bh-radar-chart",a),this.bhError.emit({error:a})}componentWillLoad(){this.i18nUnsubscribe=b.onLocaleChange((()=>{this._i18nVersion++}))}disconnectedCallback(){this.i18nUnsubscribe?.()}validateData(a){a.axes?.length||this.logger.warn("Radar chart data has no axes"),a.series?.length||this.logger.warn("Radar chart data has no series")}getAxisMaxValue(a){return a.maxValue??this.maxValue}getSeriesColor(a,r){return a.color||n(r,this.el)}handleSeriesHover=(a,r,t)=>{this.hoveredSeries=r.name,this.tooltipVisible=!0,this.tooltipX=a.clientX,this.tooltipY=a.clientY,this.tooltipHeader=r.name;const e=this.getSeriesColor(r,t),s=this.data.axes.map((a=>({label:a.label,value:(r.values[a.key]??0)+"",color:e})));this.tooltipItems=s,this.bhSeriesHover.emit({series:r,event:a}),this.bhTooltipOpen.emit({header:r.name,items:s,x:this.tooltipX,y:this.tooltipY})};handleSeriesLeave=(a,r)=>{this.hoveredSeries=null,this.tooltipVisible=!1,this.bhSeriesLeave.emit({series:r,event:a}),this.bhTooltipClose.emit()};handleAxisClick=(a,r)=>{this.bhItemClick.emit({axis:r,event:a})};renderGrid(){const{axes:a}=this.data;if(!a.length)return null;const r=this.size/2,t=r-40;return e("g",{class:"radar-grid"},Array.from({length:this.levels},((s,i)=>{const o=function(a,r,t,e){if(0===a)return"";const s=2*Math.PI/a;return Array.from({length:a},((a,i)=>{const o=s*i-Math.PI/2;return`${r+e*Math.cos(o)},${t+e*Math.sin(o)}`})).join(" ")}(a.length,r,r,t/this.levels*(i+1));return e("polygon",{class:"radar-grid-level",fill:"none",key:"grid-"+i,points:o})})))}renderAxes(){const{axes:a}=this.data;if(!a.length)return null;const r=this.size/2,t=r-40,s=t+20,i=2*Math.PI/a.length;return e("g",{class:"radar-axes"},a.map(((a,o)=>{const n=i*o-Math.PI/2,h=r+t*Math.cos(n),l=r+t*Math.sin(n),d=r+s*Math.cos(n),c=r+s*Math.sin(n);return e("g",{class:"radar-axis",key:a.key},e("line",{class:"radar-axis-line",x1:r,x2:h,y1:r,y2:l}),this.showLabels&&e("text",{class:"radar-axis-label","dominant-baseline":"middle",onClick:r=>this.handleAxisClick(r,a),"text-anchor":"middle",x:d,y:c},a.label))})))}renderSeries(){const{axes:a,series:r}=this.data;if(!a.length||!r.length)return null;const t=this.size/2,s=t-40;return e("g",{class:"radar-series-group"},r.map(((r,i)=>{const o=this.getSeriesColor(r,i),n=function(a,r,t,e,s){const i=a.length;if(0===i)return"";const o=2*Math.PI/i;return a.map(((a,i)=>{const n=r[i]??100,h=s*Math.max(0,Math.min(1,n>0?a/n:0)),l=o*i-Math.PI/2;return`${t+h*Math.cos(l)},${e+h*Math.sin(l)}`})).join(" ")}(a.map((a=>r.values[a.key]??0)),a.map((a=>this.getAxisMaxValue(a))),t,t,s);return e("g",{class:{"radar-series":!0,"radar-series-hovered":this.hoveredSeries===r.name},"data-series":r.name,key:r.name},("filled"===this.variant||"both"===this.variant)&&e("polygon",{class:"radar-area",fill:o,"fill-opacity":this.fillOpacity,onMouseEnter:a=>this.handleSeriesHover(a,r,i),onMouseLeave:a=>this.handleSeriesLeave(a,r),points:n,stroke:"none",style:{animationDelay:this.animated?.1*i+"s":"0s"}}),("outlined"===this.variant||"both"===this.variant)&&e("polygon",{class:"radar-line",fill:"none",onMouseEnter:a=>this.handleSeriesHover(a,r,i),onMouseLeave:a=>this.handleSeriesLeave(a,r),points:n,stroke:o,"stroke-width":"2",style:{animationDelay:this.animated?.1*i+"s":"0s"}}),this.showDots&&a.map(((i,n)=>{const h=function(a,r,t,e,s,i,o){if(e<=0)return{x:s,y:i};const n=o*Math.max(0,Math.min(1,r>0?a/r:0)),h=2*Math.PI/e*t-Math.PI/2;return{x:s+n*Math.cos(h),y:i+n*Math.sin(h)}}(r.values[i.key]??0,this.getAxisMaxValue(i),n,a.length,t,t,s);return e("circle",{class:"radar-dot",cx:h.x,cy:h.y,fill:o,key:`${r.name}-${i.key}`,r:4,stroke:"var(--color-bg-primary, white)","stroke-width":2})})))})))}render(){return e(s,{key:"dfbf8e4d04f19fc35634fcf2d1b40af500fbd68a"},e("div",{key:"d38a4cba5756448585cf9c9efa61784099b7797a",class:{"radar-chart":!0,"radar-chart-animated":this.animated},part:"container"},e("svg",{key:"8e39acb0c48dd35971ba5445843417719a2290d9","aria-label":u("bh-radar-chart","ariaLabel",this.ariaLabel,"Radar chart"),class:"radar-chart-svg",height:this.size,role:"img",viewBox:`0 0 ${this.size} ${this.size}`,width:this.size},this.renderGrid(),this.renderAxes(),this.renderSeries())),e("bh-chart-tooltip",{key:"fb75b85aacf0894a8d5d5c561a5fb80b6fc97c53","aria-hidden":this.tooltipVisible?void 0:"true",header:this.tooltipHeader,items:this.tooltipItems,visible:this.tooltipVisible,x:this.tooltipX,y:this.tooltipY}))}static get watchers(){return{data:[{validateData:0}]}}static get style(){return" @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: inline-block; --bh-radar-chart-grid-color: var( --bh-chart-grid-color, var(--color-neutral-200, hsl(227, 25%, 89%)) ); --bh-radar-chart-axis-color: var( --bh-chart-axis-color, var(--color-neutral-300, hsl(224, 24%, 78%)) ); --bh-radar-chart-label-color: var( --bh-chart-label-color, var(--color-neutral-600, hsl(226, 24%, 38%)) ); --bh-radar-chart-label-size: var(--text-xs-size, 0.75rem); } } @layer bh-base { .radar-chart { position: relative; display: inline-block; } .radar-chart-svg { overflow: visible; } .radar-grid-level { stroke: var(--bh-radar-chart-grid-color); stroke-width: 1; opacity: 0.5; } .radar-axis-line { stroke: var(--bh-radar-chart-axis-color); stroke-width: 1; opacity: 0.7; } .radar-axis-label { fill: var(--bh-radar-chart-label-color); font-size: var(--bh-radar-chart-label-size); font-family: var(--font-inter, system-ui, sans-serif); cursor: pointer; user-select: none; } .radar-area, .radar-line { cursor: pointer; transition: opacity var(--animation-duration-normal) ease, transform var(--animation-duration-normal) ease; transform-origin: center; } .radar-dot { pointer-events: none; transition: transform var(--animation-duration-normal) ease; } } @layer bh-variants { .radar-chart-animated .radar-area, .radar-chart-animated .radar-line { animation: radarFadeIn 0.6s ease-out forwards; opacity: 0; } .radar-chart-animated .radar-dot { animation: radarDotPop var(--animation-duration-slow) ease-out forwards; animation-delay: 0.5s; opacity: 0; transform: scale(0); } } @layer bh-states { .radar-series-hovered .radar-area { fill-opacity: 0.4; } .radar-series-hovered .radar-line { stroke-width: 3; } .radar-series-hovered .radar-dot { transform: scale(1.25); } .radar-axis-label:hover { fill: var(--color-text-interactive, var(--color-brand-600)); text-decoration: underline; } } @layer bh-utilities { @keyframes radarFadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } @keyframes radarDotPop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } } @media (prefers-reduced-motion: reduce) { .radar-chart-animated .radar-area, .radar-chart-animated .radar-line, .radar-chart-animated .radar-dot { animation: none; opacity: 1; transform: none; } .radar-area, .radar-line, .radar-dot { transition: none; } } }"}},[513,"bh-radar-chart",{data:[16],size:[2],variant:[1],levels:[2],animated:[4],showLabels:[4,"show-labels"],showDots:[4,"show-dots"],fillOpacity:[2,"fill-opacity"],maxValue:[2,"max-value"],ariaLabel:[1,"aria-label"],tooltipVisible:[32],tooltipX:[32],tooltipY:[32],tooltipItems:[32],tooltipHeader:[32],hoveredSeries:[32],_i18nVersion:[32]},void 0,{data:[{validateData:0}]}]),f=m,p=function(){"undefined"!=typeof customElements&&["bh-radar-chart","bh-chart-tooltip"].forEach((a=>{switch(a){case"bh-radar-chart":customElements.get(i(a))||customElements.define(i(a),m);break;case"bh-chart-tooltip":customElements.get(i(a))||o()}}))};export{f as BhRadarChart,p as defineCustomElement}
1
+ import{p as a,H as r,c as t,h as e,d as s,t as i}from"./p-YZi6LqIt.js";import{d as o}from"./p-DblmzWu8.js";import{a as n}from"./p-DBw2LsqR.js";import{c as h,m as l,M as d,r as c}from"./p-BJXjqxlX.js";import{B as b,r as u}from"./p-BNVOtH-1.js";const m=a(class extends r{constructor(a){super(),!1!==a&&this.__registerHost(),this.__attachShadow(),this.bhItemClick=t(this,"bhItemClick"),this.bhSeriesHover=t(this,"bhSeriesHover"),this.bhSeriesLeave=t(this,"bhSeriesLeave"),this.bhTooltipOpen=t(this,"bhTooltipOpen"),this.bhTooltipClose=t(this,"bhTooltipClose"),this.bhError=t(this,"bhError")}get el(){return this}data={axes:[{key:"mon",label:"Mon"},{key:"tue",label:"Tue"},{key:"wed",label:"Wed"},{key:"thu",label:"Thu"},{key:"fri",label:"Fri"},{key:"sat",label:"Sat"},{key:"sun",label:"Sun"}],series:[{name:"Series 1",values:{mon:800,tue:900,wed:700,thu:600,fri:750,sat:400,sun:500}},{name:"Series 2",values:{mon:600,tue:500,wed:800,thu:700,fri:650,sat:300,sun:400}},{name:"Series 3",values:{mon:400,tue:300,wed:500,thu:400,fri:350,sat:200,sun:250}}]};size=300;variant="both";levels=5;animated=!0;showLabels=!0;showDots=!0;fillOpacity=.25;maxValue=1e3;ariaLabel="Radar chart";bhItemClick;bhSeriesHover;bhSeriesLeave;bhTooltipOpen;bhTooltipClose;bhError;tooltipVisible=!1;tooltipX=0;tooltipY=0;tooltipItems=[];tooltipHeader="";hoveredSeries=null;logger=h("bh-radar-chart");i18nUnsubscribe;_i18nVersion=0;componentDidCatch(a){this.logger.error("Component error caught",a instanceof Error?a:Error(a+"")),l.increment(d.COMPONENT_ERROR,{component:"bh-radar-chart"}),c("bh-radar-chart",a),this.bhError.emit({error:a})}componentWillLoad(){this.i18nUnsubscribe=b.onLocaleChange((()=>{this._i18nVersion++}))}disconnectedCallback(){this.i18nUnsubscribe?.()}validateData(a){a.axes?.length||this.logger.warn("Radar chart data has no axes"),a.series?.length||this.logger.warn("Radar chart data has no series")}getAxisMaxValue(a){return a.maxValue??this.maxValue}getSeriesColor(a,r){return a.color||n(r,this.el)}handleSeriesHover=(a,r,t)=>{this.hoveredSeries=r.name,this.tooltipVisible=!0,this.tooltipX=a.clientX,this.tooltipY=a.clientY,this.tooltipHeader=r.name;const e=this.getSeriesColor(r,t),s=this.data.axes.map((a=>({label:a.label,value:(r.values[a.key]??0)+"",color:e})));this.tooltipItems=s,this.bhSeriesHover.emit({series:r,event:a}),this.bhTooltipOpen.emit({header:r.name,items:s,x:this.tooltipX,y:this.tooltipY})};handleSeriesLeave=(a,r)=>{this.hoveredSeries=null,this.tooltipVisible=!1,this.bhSeriesLeave.emit({series:r,event:a}),this.bhTooltipClose.emit()};handleAxisClick=(a,r)=>{this.bhItemClick.emit({axis:r,event:a})};renderGrid(){const{axes:a}=this.data;if(!a.length)return null;const r=this.size/2,t=r-40;return e("g",{class:"radar-grid"},Array.from({length:this.levels},((s,i)=>{const o=function(a,r,t,e){if(0===a)return"";const s=2*Math.PI/a;return Array.from({length:a},((a,i)=>{const o=s*i-Math.PI/2;return`${r+e*Math.cos(o)},${t+e*Math.sin(o)}`})).join(" ")}(a.length,r,r,t/this.levels*(i+1));return e("polygon",{class:"radar-grid-level",fill:"none",key:"grid-"+i,points:o})})))}renderAxes(){const{axes:a}=this.data;if(!a.length)return null;const r=this.size/2,t=r-40,s=t+20,i=2*Math.PI/a.length;return e("g",{class:"radar-axes"},a.map(((a,o)=>{const n=i*o-Math.PI/2,h=r+t*Math.cos(n),l=r+t*Math.sin(n),d=r+s*Math.cos(n),c=r+s*Math.sin(n);return e("g",{class:"radar-axis",key:a.key},e("line",{class:"radar-axis-line",x1:r,x2:h,y1:r,y2:l}),this.showLabels&&e("text",{class:"radar-axis-label","dominant-baseline":"middle",onClick:r=>this.handleAxisClick(r,a),"text-anchor":"middle",x:d,y:c},a.label))})))}renderSeries(){const{axes:a,series:r}=this.data;if(!a.length||!r.length)return null;const t=this.size/2,s=t-40;return e("g",{class:"radar-series-group"},r.map(((r,i)=>{const o=this.getSeriesColor(r,i),n=function(a,r,t,e,s){const i=a.length;if(0===i)return"";const o=2*Math.PI/i;return a.map(((a,i)=>{const n=r[i]??100,h=s*Math.max(0,Math.min(1,n>0?a/n:0)),l=o*i-Math.PI/2;return`${t+h*Math.cos(l)},${e+h*Math.sin(l)}`})).join(" ")}(a.map((a=>r.values[a.key]??0)),a.map((a=>this.getAxisMaxValue(a))),t,t,s);return e("g",{class:{"radar-series":!0,"radar-series-hovered":this.hoveredSeries===r.name},"data-series":r.name,key:r.name},("filled"===this.variant||"both"===this.variant)&&e("polygon",{class:"radar-area",fill:o,"fill-opacity":this.fillOpacity,onMouseEnter:a=>this.handleSeriesHover(a,r,i),onMouseLeave:a=>this.handleSeriesLeave(a,r),points:n,stroke:"none",style:{animationDelay:this.animated?.1*i+"s":"0s"}}),("outlined"===this.variant||"both"===this.variant)&&e("polygon",{class:"radar-line",fill:"none",onMouseEnter:a=>this.handleSeriesHover(a,r,i),onMouseLeave:a=>this.handleSeriesLeave(a,r),points:n,stroke:o,"stroke-width":"2",style:{animationDelay:this.animated?.1*i+"s":"0s"}}),this.showDots&&a.map(((i,n)=>{const h=function(a,r,t,e,s,i,o){if(e<=0)return{x:s,y:i};const n=o*Math.max(0,Math.min(1,r>0?a/r:0)),h=2*Math.PI/e*t-Math.PI/2;return{x:s+n*Math.cos(h),y:i+n*Math.sin(h)}}(r.values[i.key]??0,this.getAxisMaxValue(i),n,a.length,t,t,s);return e("circle",{class:"radar-dot",cx:h.x,cy:h.y,fill:o,key:`${r.name}-${i.key}`,r:4,stroke:"var(--color-bg-primary, white)","stroke-width":2})})))})))}render(){return e(s,{key:"d107776c86a650f7a6684f5a284fcf4ead2d18d7"},e("div",{key:"d93136a5ec66d04f8fd0944562b284ab06ccf348",class:{"radar-chart":!0,"radar-chart-animated":this.animated},part:"container"},e("svg",{key:"5a374b7232e4368a85b34da38f134d547ffb3454","aria-label":u("bh-radar-chart","ariaLabel",this.ariaLabel,"Radar chart"),class:"radar-chart-svg",height:this.size,role:"img",viewBox:`0 0 ${this.size} ${this.size}`,width:this.size},this.renderGrid(),this.renderAxes(),this.renderSeries())),e("bh-chart-tooltip",{key:"aa6ff63acbf09782254c0f512a7a4340c7f795a3","aria-hidden":this.tooltipVisible?void 0:"true",header:this.tooltipHeader,items:this.tooltipItems,visible:this.tooltipVisible,x:this.tooltipX,y:this.tooltipY}))}static get watchers(){return{data:[{validateData:0}]}}static get style(){return" @layer bh-tokens, bh-base, bh-variants, bh-states, bh-utilities; @layer bh-tokens { :host { display: inline-block; --bh-radar-chart-grid-color: var( --bh-chart-grid-color, var(--color-neutral-200, hsl(227, 25%, 89%)) ); --bh-radar-chart-axis-color: var( --bh-chart-axis-color, var(--color-neutral-300, hsl(224, 24%, 78%)) ); --bh-radar-chart-label-color: var( --bh-chart-label-color, var(--color-neutral-600, hsl(226, 24%, 38%)) ); --bh-radar-chart-label-size: var(--text-xs-size, 0.75rem); } } @layer bh-base { .radar-chart { position: relative; display: inline-block; } .radar-chart-svg { overflow: visible; } .radar-grid-level { stroke: var(--bh-radar-chart-grid-color); stroke-width: 1; opacity: 0.5; } .radar-axis-line { stroke: var(--bh-radar-chart-axis-color); stroke-width: 1; opacity: 0.7; } .radar-axis-label { fill: var(--bh-radar-chart-label-color); font-size: var(--bh-radar-chart-label-size); font-family: var(--font-inter, system-ui, sans-serif); cursor: pointer; user-select: none; } .radar-area, .radar-line { cursor: pointer; transition: opacity var(--animation-duration-normal) ease, transform var(--animation-duration-normal) ease; transform-origin: center; } .radar-dot { pointer-events: none; transition: transform var(--animation-duration-normal) ease; } } @layer bh-variants { .radar-chart-animated .radar-area, .radar-chart-animated .radar-line { animation: radarFadeIn 0.6s ease-out forwards; opacity: 0; } .radar-chart-animated .radar-dot { animation: radarDotPop var(--animation-duration-slow) ease-out forwards; animation-delay: 0.5s; opacity: 0; transform: scale(0); } } @layer bh-states { .radar-series-hovered .radar-area { fill-opacity: 0.4; } .radar-series-hovered .radar-line { stroke-width: 3; } .radar-series-hovered .radar-dot { transform: scale(1.25); } .radar-axis-label:hover { fill: var(--color-text-interactive, var(--color-brand-600)); text-decoration: underline; } } @layer bh-utilities { @keyframes radarFadeIn { from { opacity: 0; transform: scale(0.8); } to { opacity: 1; transform: scale(1); } } @keyframes radarDotPop { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } } @media (prefers-reduced-motion: reduce) { .radar-chart-animated .radar-area, .radar-chart-animated .radar-line, .radar-chart-animated .radar-dot { animation: none; opacity: 1; transform: none; } .radar-area, .radar-line, .radar-dot { transition: none; } } }"}},[513,"bh-radar-chart",{data:[16],size:[2],variant:[1],levels:[2],animated:[4],showLabels:[4,"show-labels"],showDots:[4,"show-dots"],fillOpacity:[2,"fill-opacity"],maxValue:[2,"max-value"],ariaLabel:[1,"aria-label"],tooltipVisible:[32],tooltipX:[32],tooltipY:[32],tooltipItems:[32],tooltipHeader:[32],hoveredSeries:[32],_i18nVersion:[32]},void 0,{data:[{validateData:0}]}]),f=m,p=function(){"undefined"!=typeof customElements&&["bh-radar-chart","bh-chart-tooltip"].forEach((a=>{switch(a){case"bh-radar-chart":customElements.get(i(a))||customElements.define(i(a),m);break;case"bh-chart-tooltip":customElements.get(i(a))||o()}}))};export{f as BhRadarChart,p as defineCustomElement}
@@ -1 +1 @@
1
- import{B as o,d as s}from"./p-XYHjFWDD.js";const p=o,r=s;export{p as BhRadioButton,r as defineCustomElement}
1
+ import{B as o,d as s}from"./p-CZ_H3nat.js";const t=o,a=s;export{t as BhRadioButton,a as defineCustomElement}
@@ -1 +1 @@
1
- import{p as t,H as e,c as a,h as o,d as r,t as s}from"./p-YZi6LqIt.js";import{c as i,m as n,M as h,r as d}from"./p-BJXjqxlX.js";import{K as l}from"./p-zdFuIabL.js";const c=t(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.bhChange=a(this,"bhChange")}logger=i("bh-radio-group");get el(){return this}value="";name="";disabled=!1;ariaLabel=null;ariaLabelledBy;bhChange;componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:Error(t+"")),n.increment(h.COMPONENT_ERROR,{component:"bh-radio-group",error_type:t instanceof Error?t.name:"unknown"}),d("bh-radio-group",t)}componentDidLoad(){this.syncChildren()}componentDidUpdate(){this.syncChildren()}handleRadioChange(t){if(t.target===this.el)return;t.stopPropagation();const e=t.detail;e!==this.value&&(this.value=e,this.syncChildren(),this.bhChange.emit(this.value))}getRadios(){return Array.from(this.el.querySelectorAll("bh-radio-button")).filter((t=>!t.disabled))}syncChildren(){const t=Array.from(this.el.querySelectorAll("bh-radio-button"));let e;for(const a of t){this.name&&(a.name=this.name),this.disabled&&(a.disabled=!0);const t=a.value===this.value;a.selected=t,t&&!a.disabled&&(e=a)}e||(e=t.find((t=>!t.disabled)));for(const a of t)a.tabIndex=a===e?0:-1}handleKeyDown=t=>{const e=this.getRadios();if(0===e.length)return;const a=t.key===l.ARROW_DOWN||t.key===l.ARROW_RIGHT;if(!a&&t.key!==l.ARROW_UP&&t.key!==l.ARROW_LEFT)return;t.preventDefault();const o=e.findIndex((t=>t.value===this.value)),r=e[a?(o+1)%e.length:(o-1+e.length)%e.length];this.value=r.value,this.syncChildren(),this.bhChange.emit(this.value),r.shadowRoot?.querySelector("[role='radio']")?.focus()};render(){return o(r,{key:"c1d7e737ecf216ccd075954752faab59eef3ce88","aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,onKeyDown:this.handleKeyDown,role:"radiogroup"},o("slot",{key:"4a79fefac6fbd636670d0ce76cdfa1529985834a"}))}},[772,"bh-radio-group",{value:[1025],name:[1],disabled:[4],ariaLabel:[1,"aria-label"],ariaLabelledBy:[1,"aria-labelled-by"]},[[0,"bhChange","handleRadioChange"]]]),b=c,u=function(){"undefined"!=typeof customElements&&["bh-radio-group"].forEach((t=>{"bh-radio-group"===t&&(customElements.get(s(t))||customElements.define(s(t),c))}))};export{b as BhRadioGroup,u as defineCustomElement}
1
+ import{p as t,H as a,c as o,h as r,d as e,t as s}from"./p-YZi6LqIt.js";import{c as i,m as n,M as h,r as d}from"./p-BJXjqxlX.js";import{K as c}from"./p-zdFuIabL.js";const l=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.bhChange=o(this,"bhChange")}logger=i("bh-radio-group");get el(){return this}value="";name="";disabled=!1;ariaLabel=null;ariaLabelledBy;bhChange;componentDidCatch(t){this.logger.error("Component error caught",t instanceof Error?t:Error(t+"")),n.increment(h.COMPONENT_ERROR,{component:"bh-radio-group",error_type:t instanceof Error?t.name:"unknown"}),d("bh-radio-group",t)}componentDidLoad(){this.syncChildren()}componentDidUpdate(){this.syncChildren()}handleRadioChange(t){if(t.target===this.el)return;t.stopPropagation();const a=t.detail;a!==this.value&&(this.value=a,this.syncChildren(),this.bhChange.emit(this.value))}getRadios(){return Array.from(this.el.querySelectorAll("bh-radio-button")).filter((t=>!t.disabled))}syncChildren(){const t=Array.from(this.el.querySelectorAll("bh-radio-button"));let a;for(const o of t){this.name&&(o.name=this.name),this.disabled&&(o.disabled=!0);const t=o.value===this.value;o.selected=t,t&&!o.disabled&&(a=o)}a||(a=t.find((t=>!t.disabled)));for(const o of t)o.tabIndex=o===a?0:-1}handleKeyDown=t=>{const a=this.getRadios();if(0===a.length)return;const o=t.key===c.ARROW_DOWN||t.key===c.ARROW_RIGHT;if(!o&&t.key!==c.ARROW_UP&&t.key!==c.ARROW_LEFT)return;t.preventDefault();const r=a.findIndex((t=>t.value===this.value)),e=a[o?(r+1)%a.length:(r-1+a.length)%a.length];this.value=e.value,this.syncChildren(),this.bhChange.emit(this.value),e.shadowRoot?.querySelector("[role='radio']")?.focus()};render(){return r(e,{key:"2610acb82571f455c8cfcde9d91cbbd6beaa2d7c","aria-label":this.ariaLabel,"aria-labelledby":this.ariaLabelledBy,onKeyDown:this.handleKeyDown,role:"radiogroup"},r("slot",{key:"4f78ae52b78e20bacb0775342cc61463b8cf1288"}))}},[772,"bh-radio-group",{value:[1025],name:[1],disabled:[4],ariaLabel:[1,"aria-label"],ariaLabelledBy:[1,"aria-labelled-by"]},[[0,"bhChange","handleRadioChange"]]]),b=l,u=function(){"undefined"!=typeof customElements&&["bh-radio-group"].forEach((t=>{"bh-radio-group"===t&&(customElements.get(s(t))||customElements.define(s(t),l))}))};export{b as BhRadioGroup,u as defineCustomElement}