bromcom-ui 2.7.37 → 2.7.38-rc.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 (241) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/p-00dc3d2e.entry.js +5 -0
  3. package/dist/bromcom-ui/p-04b6abc3.js +5 -0
  4. package/dist/bromcom-ui/p-04c8b756.js +1 -1
  5. package/dist/bromcom-ui/{p-1e2d1714.entry.js → p-0612fbb0.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-8430b547.entry.js → p-08662565.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-02f2445a.entry.js → p-0c343f1d.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-edec76e6.entry.js → p-14afb435.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-9d2fe304.entry.js → p-161d83e1.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-53a00d98.js → p-16c10cc7.js} +1 -1
  11. package/dist/bromcom-ui/{p-e48c96b5.entry.js → p-1a1ee7ac.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-38b69e07.entry.js → p-1bb7803c.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-55b88051.entry.js → p-1fa6181a.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-da458f63.entry.js → p-26d5b24d.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-894b0a04.entry.js → p-27085077.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-a29b08eb.entry.js → p-29f3c080.entry.js} +1 -1
  17. package/dist/bromcom-ui/p-2c9f6e6a.entry.js +5 -0
  18. package/dist/bromcom-ui/{p-168b8ca7.entry.js → p-35502aac.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-6720d135.entry.js → p-375429c3.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-8c018ae0.js → p-3c7a0345.js} +1 -1
  21. package/dist/bromcom-ui/p-3d2cdbcc.entry.js +5 -0
  22. package/dist/bromcom-ui/{p-52b34297.entry.js → p-3fcb3478.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-58761f87.js → p-4058bd89.js} +1 -1
  24. package/dist/bromcom-ui/{p-15e43f94.entry.js → p-432ebc3f.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-095d05df.entry.js → p-43c148a4.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-2c31ab48.entry.js → p-44dd9f7a.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-fe3e3210.js → p-45704915.js} +1 -1
  28. package/dist/bromcom-ui/{p-9729086c.entry.js → p-4f79155d.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-ba65d1dc.entry.js → p-52707827.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-5926788b.entry.js → p-529cece6.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-56a57960.entry.js +5 -0
  32. package/dist/bromcom-ui/{p-7e44e6b5.js → p-5ae0a59b.js} +1 -1
  33. package/dist/bromcom-ui/{p-4220635e.entry.js → p-5de35604.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-c573addc.entry.js → p-649f6d13.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-5b114d5a.entry.js → p-6a0c96dc.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-f5ae5381.entry.js → p-6bc8c9a5.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-c1c18de5.entry.js → p-783cb2bb.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-c5c9e76f.entry.js → p-79719bd4.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-08d242bf.entry.js → p-7f137af3.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-8065cf74.js +5 -0
  41. package/dist/bromcom-ui/p-85688ecf.entry.js +5 -0
  42. package/dist/bromcom-ui/{p-037531dd.entry.js → p-878e45a0.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-3e557630.entry.js → p-888b5c8c.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-78cf8966.entry.js → p-9086c5e5.entry.js} +1 -1
  45. package/dist/bromcom-ui/{p-a185570c.entry.js → p-9710630f.entry.js} +1 -1
  46. package/dist/bromcom-ui/p-9c6de630.js +1 -1
  47. package/dist/bromcom-ui/{p-da7603b0.entry.js → p-9e6e812b.entry.js} +1 -1
  48. package/dist/bromcom-ui/p-a0b83826.js +5 -0
  49. package/dist/bromcom-ui/p-a23d2359.entry.js +5 -0
  50. package/dist/bromcom-ui/p-a2d79502.entry.js +5 -0
  51. package/dist/bromcom-ui/p-a8abc160.entry.js +5 -0
  52. package/dist/bromcom-ui/{p-a3ffcb0d.js → p-a8d1397d.js} +1 -1
  53. package/dist/bromcom-ui/{p-fc1ef08f.entry.js → p-b1b449e5.entry.js} +1 -1
  54. package/dist/bromcom-ui/p-b95461ec.entry.js +5 -0
  55. package/dist/bromcom-ui/{p-ff742ab4.entry.js → p-c09b0566.entry.js} +1 -1
  56. package/dist/bromcom-ui/{p-ad4cf3f3.entry.js → p-c546cfdf.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-78963452.entry.js → p-c7e3e6b0.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-c9bd85e9.js +1 -1
  59. package/dist/bromcom-ui/{p-7b5e88c5.entry.js → p-cb975855.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-95c5d04b.entry.js → p-cbfa56e8.entry.js} +1 -1
  61. package/dist/bromcom-ui/p-d33c83e8.entry.js +5 -0
  62. package/dist/bromcom-ui/p-d4200c87.entry.js +5 -0
  63. package/dist/bromcom-ui/{p-33e2496d.entry.js → p-d5503ae8.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-331ee3a4.js → p-d98d05a3.js} +1 -1
  65. package/dist/bromcom-ui/{p-99bed73b.entry.js → p-d9acb076.entry.js} +1 -1
  66. package/dist/bromcom-ui/{p-0f69842c.entry.js → p-df615728.entry.js} +1 -1
  67. package/dist/bromcom-ui/{p-425e15b7.entry.js → p-e07222d9.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-a2b5a278.entry.js → p-e974df65.entry.js} +1 -1
  69. package/dist/bromcom-ui/{p-93e7539f.entry.js → p-e987ebfa.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-1978e4ae.entry.js → p-eaa34b84.entry.js} +1 -1
  71. package/dist/bromcom-ui/{p-e7b229fb.js → p-f20c8e07.js} +1 -1
  72. package/dist/bromcom-ui/{p-ac9f1774.entry.js → p-ff737d82.entry.js} +1 -1
  73. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  74. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  76. package/dist/cjs/bcm-avatar_2.cjs.entry.js +10 -10
  77. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  78. package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
  79. package/dist/cjs/{bcm-button_3.cjs.entry.js → bcm-button.cjs.entry.js} +34 -189
  80. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  81. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +8 -8
  82. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
  83. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +9 -9
  84. package/dist/cjs/bcm-chip.cjs.entry.js +1 -1
  85. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  86. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  87. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
  88. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  89. package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
  90. package/dist/cjs/bcm-dropdown.cjs.entry.js +19 -153
  91. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
  92. package/dist/cjs/{bcm-2c51bf0c.js → bcm-f00ec62c.js} +4 -4
  93. package/dist/cjs/bcm-form-2.cjs.entry.js +4 -4
  94. package/dist/cjs/bcm-form.cjs.entry.js +2 -2
  95. package/dist/cjs/bcm-icon.cjs.entry.js +41 -0
  96. package/dist/cjs/bcm-input.cjs.entry.js +10 -10
  97. package/dist/cjs/bcm-item.cjs.entry.js +3 -3
  98. package/dist/cjs/bcm-items.cjs.entry.js +3 -3
  99. package/dist/cjs/bcm-label_2.cjs.entry.js +12 -12
  100. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  101. package/dist/cjs/{bcm-text.cjs.entry.js → bcm-linked_2.cjs.entry.js} +183 -6
  102. package/dist/cjs/bcm-list.cjs.entry.js +26 -26
  103. package/dist/cjs/bcm-menu.cjs.entry.js +13 -122
  104. package/dist/cjs/bcm-modal.cjs.entry.js +142 -0
  105. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
  106. package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
  107. package/dist/cjs/bcm-popover.cjs.entry.js +8 -8
  108. package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
  109. package/dist/cjs/bcm-radio-group.cjs.entry.js +6 -6
  110. package/dist/cjs/bcm-radio.cjs.entry.js +5 -5
  111. package/dist/cjs/bcm-range.cjs.entry.js +5 -5
  112. package/dist/cjs/bcm-search.cjs.entry.js +5 -5
  113. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  114. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  115. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  116. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
  117. package/dist/cjs/bcm-switch.cjs.entry.js +8 -8
  118. package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
  119. package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
  120. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
  121. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  122. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  123. package/dist/cjs/{floating-ui-dae608ba.js → floating-ui-2a4a79ff.js} +4 -3
  124. package/dist/cjs/{generate-e91273b0.js → generate-e98dfd99.js} +1 -1
  125. package/dist/cjs/{input-template-8d591f62.js → input-template-00b50605.js} +6 -6
  126. package/dist/cjs/{json-parse-decarator-f014cca6.js → json-parse-decarator-98c9ac9a.js} +1 -1
  127. package/dist/cjs/{label-template-38d5c382.js → label-template-e56264b3.js} +3 -3
  128. package/dist/cjs/loader.cjs.js +1 -1
  129. package/dist/cjs/{number-helper-54c0c852.js → number-helper-b80392ed.js} +1 -1
  130. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
  131. package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
  132. package/dist/cjs/{popover-placement-87901bb3.js → popover-placement-ac98d407.js} +1 -1
  133. package/dist/cjs/{slot-template-84d37599.js → slot-template-a4505c70.js} +1 -1
  134. package/dist/cjs/{stepper-states-b5763eec.js → stepper-states-bd774fce.js} +1 -1
  135. package/dist/cjs/{string-helper-df40a475.js → string-helper-145cd64f.js} +2 -2
  136. package/dist/cjs/{tooltip-helper-932f081b.js → tooltip-helper-1418bb15.js} +5 -5
  137. package/dist/cjs/{validators-40884433.js → validators-5514189b.js} +1 -1
  138. package/dist/collection/components/molecules/dropdown/dropdown.js +27 -214
  139. package/dist/collection/components/molecules/linked/linked.js +39 -6
  140. package/dist/collection/components/molecules/menu/menu.js +7 -183
  141. package/dist/collection/utils/floating-ui.js +2 -1
  142. package/dist/components/bcm-dropdown.js +29 -164
  143. package/dist/components/bcm-linked.js +1 -194
  144. package/dist/components/floating-ui.js +2 -1
  145. package/dist/components/generate.js +1 -1
  146. package/dist/{esm/bcm-linked.entry.js → components/linked.js} +58 -22
  147. package/dist/components/menu.js +9 -122
  148. package/dist/esm/bcm-accordion.entry.js +1 -1
  149. package/dist/esm/bcm-alert.entry.js +1 -1
  150. package/dist/esm/bcm-attendance.entry.js +1 -1
  151. package/dist/esm/bcm-avatar_2.entry.js +7 -7
  152. package/dist/esm/bcm-b8d8a236.js +1 -1
  153. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  154. package/dist/esm/bcm-button-group.entry.js +2 -2
  155. package/dist/esm/{bcm-button_3.entry.js → bcm-button.entry.js} +24 -177
  156. package/dist/esm/bcm-card.entry.js +3 -3
  157. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  158. package/dist/esm/bcm-checkbox-lite_9.entry.js +3 -3
  159. package/dist/esm/bcm-checkbox_2.entry.js +4 -4
  160. package/dist/esm/bcm-chip.entry.js +3 -3
  161. package/dist/esm/bcm-collapse-group.entry.js +1 -1
  162. package/dist/esm/bcm-collapse.entry.js +1 -1
  163. package/dist/esm/bcm-colorpicker.entry.js +2 -2
  164. package/dist/esm/bcm-date-picker.entry.js +3 -3
  165. package/dist/esm/bcm-datetime-picker.entry.js +4 -4
  166. package/dist/esm/bcm-default.entry.js +1 -1
  167. package/dist/esm/bcm-drawer.entry.js +7 -7
  168. package/dist/esm/bcm-dropdown.entry.js +16 -150
  169. package/dist/esm/bcm-expansion-panel.entry.js +3 -3
  170. package/dist/esm/bcm-form-2.entry.js +2 -2
  171. package/dist/esm/bcm-form.entry.js +1 -1
  172. package/dist/esm/bcm-icon.entry.js +37 -0
  173. package/dist/esm/bcm-input.entry.js +6 -6
  174. package/dist/esm/bcm-item.entry.js +4 -4
  175. package/dist/esm/bcm-items.entry.js +1 -1
  176. package/dist/esm/bcm-label_2.entry.js +9 -9
  177. package/dist/esm/bcm-link.entry.js +1 -1
  178. package/dist/esm/{bcm-text.entry.js → bcm-linked_2.entry.js} +183 -7
  179. package/dist/esm/bcm-list.entry.js +10 -10
  180. package/dist/esm/bcm-menu.entry.js +14 -123
  181. package/dist/esm/bcm-modal.entry.js +138 -0
  182. package/dist/esm/bcm-old-input.entry.js +1 -1
  183. package/dist/esm/bcm-old-tag_2.entry.js +1 -1
  184. package/dist/esm/bcm-popconfirm-box.entry.js +3 -3
  185. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  186. package/dist/esm/bcm-popover.entry.js +8 -8
  187. package/dist/esm/bcm-progress.entry.js +4 -4
  188. package/dist/esm/bcm-radio-group.entry.js +3 -3
  189. package/dist/esm/bcm-radio.entry.js +4 -4
  190. package/dist/esm/bcm-range.entry.js +3 -3
  191. package/dist/esm/bcm-search.entry.js +4 -4
  192. package/dist/esm/bcm-select.entry.js +1 -1
  193. package/dist/esm/bcm-skeleton.entry.js +1 -1
  194. package/dist/esm/bcm-step.entry.js +2 -2
  195. package/dist/esm/bcm-stepper.entry.js +4 -4
  196. package/dist/esm/bcm-switch.entry.js +3 -3
  197. package/dist/esm/bcm-tab-group.entry.js +2 -2
  198. package/dist/esm/bcm-table.entry.js +1 -1
  199. package/dist/esm/bcm-tabs-content.entry.js +1 -1
  200. package/dist/esm/bcm-tabs.entry.js +1 -1
  201. package/dist/esm/bcm-tag.entry.js +4 -4
  202. package/dist/esm/bcm-textarea.entry.js +4 -4
  203. package/dist/esm/bcm-time-picker.entry.js +3 -3
  204. package/dist/esm/bromcom-ui.js +1 -1
  205. package/dist/esm/{color-helper-7e202fd8.js → color-helper-b5e9aa56.js} +1 -1
  206. package/dist/esm/{element-dragger-89bb52fd.js → element-dragger-7ea06c76.js} +1 -1
  207. package/dist/esm/{floating-ui-f03a96ce.js → floating-ui-700d0b98.js} +3 -2
  208. package/dist/esm/{generate-ba9e1f0b.js → generate-38707d04.js} +1 -1
  209. package/dist/esm/{input-template-569671e3.js → input-template-bd2265e4.js} +2 -2
  210. package/dist/esm/{json-parse-decarator-ae9a53d6.js → json-parse-decarator-0e105c28.js} +1 -1
  211. package/dist/esm/label-template-f352ef5b.js +1 -1
  212. package/dist/esm/loader.js +1 -1
  213. package/dist/esm/{number-helper-4313dc1c.js → number-helper-5268042c.js} +1 -1
  214. package/dist/esm/old-bcm-popover-box.entry.js +5 -5
  215. package/dist/esm/old-bcm-popover.entry.js +2 -2
  216. package/dist/esm/{stepper-states-13781383.js → stepper-states-925a81ea.js} +1 -1
  217. package/dist/esm/string-helper-74a1648f.js +1 -1
  218. package/dist/esm/{tooltip-helper-8c88ed15.js → tooltip-helper-2c89e1cc.js} +6 -6
  219. package/dist/esm/{utils-57652744.js → utils-b3338faf.js} +1 -1
  220. package/dist/esm/{validators-66dd02d3.js → validators-734a2c8e.js} +1 -1
  221. package/dist/types/components/molecules/dropdown/dropdown.d.ts +2 -15
  222. package/dist/types/components/molecules/linked/linked.d.ts +3 -1
  223. package/dist/types/components/molecules/menu/menu.d.ts +1 -13
  224. package/dist/types/components.d.ts +12 -13
  225. package/package.json +1 -1
  226. package/dist/bromcom-ui/assets +0 -0
  227. package/dist/bromcom-ui/p-1ae166db.entry.js +0 -5
  228. package/dist/bromcom-ui/p-3cebdafb.js +0 -5
  229. package/dist/bromcom-ui/p-44991f28.js +0 -5
  230. package/dist/bromcom-ui/p-5d8eb303.entry.js +0 -5
  231. package/dist/bromcom-ui/p-62ba8263.entry.js +0 -5
  232. package/dist/bromcom-ui/p-8fa9378f.entry.js +0 -5
  233. package/dist/bromcom-ui/p-9512271e.entry.js +0 -5
  234. package/dist/bromcom-ui/p-9c2800b0.entry.js +0 -5
  235. package/dist/bromcom-ui/p-b4c617f6.entry.js +0 -5
  236. package/dist/bromcom-ui/p-b639def6.js +0 -5
  237. package/dist/bromcom-ui/p-b924d9b8.entry.js +0 -5
  238. package/dist/bromcom-ui/p-d6a11d39.entry.js +0 -5
  239. package/dist/bromcom-ui/p-e83e3eae.entry.js +0 -5
  240. package/dist/cjs/bcm-linked.cjs.entry.js +0 -181
  241. package/dist/collection/assets +0 -0
@@ -35,14 +35,13 @@ export class BcmDropdown {
35
35
  this.noStyle = false;
36
36
  this.dropdownIcon = 'fas fa-angle-down';
37
37
  this.linkedComponent = undefined;
38
- this.multiLevel = false;
39
38
  this.loading = false;
40
39
  this.variant = undefined;
41
40
  this.dataDismiss = false;
42
41
  this.fullWidth = false;
43
42
  this.iconPosition = Bcm.IconPosition.prefix;
44
43
  this.placement = undefined;
45
- this.height = 'auto';
44
+ this.height = undefined;
46
45
  this.maxHeight = '500px';
47
46
  this.minHeight = '50px';
48
47
  this.stopDeepClean = false;
@@ -55,156 +54,25 @@ export class BcmDropdown {
55
54
  this.data = newValue;
56
55
  }
57
56
  }
58
- async isOpenChanged(newValue) {
59
- if (document.querySelector(`old-bcm-popover-box[id="dropdown-box-${this._id}"]`)) {
60
- const box = this.getPopoverBox();
61
- newValue ? box.show() : box.hide();
62
- }
63
- // const disableScrollClass = `bcm-dropdown--disable-scroll-${this._id}`;
64
- // if (this.isOpen) {
65
- // document.body.classList.add(disableScrollClass);
66
- // } else {
67
- // document.body.classList.remove(disableScrollClass);
68
- // }
69
- }
70
- handleIsClickDismiss({ detail }) {
71
- if (this.multiLevel) {
72
- this.isOpen = detail;
73
- }
74
- }
75
- handleOnClick(event) {
76
- if (this.linkedComponent)
77
- return this.linkedComponentClick(event);
78
- if (this.isOpen) {
79
- const targetElement = this.linkedComponent ? document.getElementById(this.linkedComponent) : this.el;
80
- const box = this.getPopoverBox();
81
- if (box) {
82
- const isClickBox = Generate.findEventPath(event, box);
83
- const isClickThis = Generate.findEventPath(event, targetElement);
84
- if (!isClickBox && !isClickThis) {
85
- this.isOpen = false;
86
- return;
87
- }
88
- const isClickDismiss = Generate.findEventPathHasAttribute(event, 'data-dismiss');
89
- if (isClickDismiss) {
90
- this.isOpen = false;
91
- return;
92
- }
93
- }
94
- }
95
- }
96
- handleWheel(event) {
97
- if (this.isOpen) {
98
- const box = this.getPopoverBox();
99
- if (box) {
100
- const isClickBox = Generate.findEventPath(event, box);
101
- const isClickThis = Generate.findEventPath(event, this.el);
102
- if (!isClickBox && !isClickThis) {
103
- this.isOpen = false;
104
- return;
105
- }
106
- }
107
- }
108
- }
109
- async setActive(id) {
110
- if (id) {
111
- const menu = document.getElementById(`${this.menuId}`);
112
- if (menu) {
113
- menu.setActive(id);
114
- }
115
- }
57
+ async setActive(id = null) {
58
+ var _a, _b;
59
+ (_b = (_a = document
60
+ .getElementById(`${this.menuId}`)) === null || _a === void 0 ? void 0 : _a.querySelectorAll('bcm-menu')) === null || _b === void 0 ? void 0 : _b.forEach(item => {
61
+ item.setActive(id);
62
+ });
116
63
  }
117
64
  handleSlotItems({ detail }) {
118
65
  this.data = detail;
119
66
  }
120
- // connectedCallback() {
121
- // const disableScrollClass = `bcm-dropdown--disable-scroll-${this._id}`;
122
- // const styleId = `bcm-dropdown-style-${this._id}`;
123
- // let style = document.getElementById(styleId);
124
- // if (!style) {
125
- // style = document.createElement('style');
126
- // style.id = styleId;
127
- // style.innerHTML = `.${disableScrollClass} { overflow: hidden; }`;
128
- // document.head.appendChild(style);
129
- // }
130
- // }
131
67
  componentDidLoad() {
132
- let box = document.querySelector(`old-bcm-popover-box[id="dropdown-box-${this._id}"]`);
133
- if (box) {
134
- box.remove();
135
- }
68
+ var _a;
136
69
  const bcmContent = this.el.querySelector('bcm-content');
137
70
  if (bcmContent) {
138
- bcmContent.style.display = 'none';
139
- this.createBox();
140
- this.isOpen = this.isOpen;
141
- }
142
- }
143
- disconnectedCallback() {
144
- this.isOpen = false;
145
- if (this.stopDeepClean)
146
- return;
147
- const box = this.getPopoverBox();
148
- if (box) {
149
- box.remove();
150
- }
151
- // const disableScrollClass = `bcm-dropdown--disable-scroll-${this._id}`;
152
- // document.body.classList.remove(disableScrollClass);
153
- }
154
- createBox() {
155
- const content = this.el.querySelector('bcm-content');
156
- if (content) {
157
- const targetElementId = this.linkedComponent ? this.linkedComponent : this._id;
158
- let box = document.getElementById(`dropdown-box-${this._id}`);
159
- if (!box) {
160
- box = document.createElement('old-bcm-popover-box');
161
- box.setAttribute('id', 'dropdown-box-' + this._id);
162
- box.setAttribute('target-id', targetElementId);
163
- box.setAttribute('placement', this.placement || 'bottom-start');
164
- box.setAttribute('linked-component', targetElementId);
165
- box.setAttribute('min-height', this.minHeight);
166
- box.setAttribute('max-height', this.maxHeight);
167
- box.setAttribute('height', this.height);
168
- content.style.display = 'block';
169
- content.removeAttribute('hidden');
170
- box.appendChild(content);
171
- document.body.appendChild(box);
172
- }
173
- }
174
- }
175
- linkedComponentClick(event) {
176
- const targetElement = document.getElementById(this.linkedComponent);
177
- const box = document.querySelector(`bcm-popover-box[id="dropdown-box-${this._id}"]`);
178
- const isClickBox = Generate.findEventPath(event, box);
179
- const isClickThis = Generate.findEventPath(event, targetElement);
180
- if (!isClickBox && !isClickThis) {
181
- this.isOpen = false;
182
- return;
183
- }
184
- if (isClickBox || isClickThis) {
185
- this.createBox();
186
- this.isOpen = true;
187
- this.dropdownLinkedComponent.emit(true);
188
- }
189
- const isClickDismiss = Generate.findEventPathHasAttribute(event, 'data-dismiss');
190
- if (isClickDismiss) {
191
- this.isOpen = false;
192
- this.dropdownLinkedComponent.emit(false);
193
- return;
71
+ (_a = document.getElementById(this.menuId)) === null || _a === void 0 ? void 0 : _a.appendChild(bcmContent);
194
72
  }
195
73
  }
196
- checkClick() {
197
- if (this.getPopoverBox()) {
198
- this.isOpen = !this.isOpen;
199
- this.isOpen ? this.getPopoverBox().show() : this.getPopoverBox().hide();
200
- }
201
- }
202
- getPopoverBox() {
203
- this.createBox();
204
- return document.querySelector(`old-bcm-popover-box[id="dropdown-box-${this._id}"]`);
205
- }
206
74
  render() {
207
- const { size, kind, disabled, icon, color, href, target, loading, type, variant, fullWidth } = this;
75
+ const { size, kind, disabled, icon, color, href, target, loading, type, variant, fullWidth, isOpen } = this;
208
76
  const hostClasses = cs('bcm-dropdown', 'bcm-dropdown__type-' + type, {
209
77
  'full-width': fullWidth,
210
78
  'no-style': this.noStyle,
@@ -212,10 +80,10 @@ export class BcmDropdown {
212
80
  });
213
81
  const attributes = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, (disabled && { disabled })), (loading && { loading })), (kind && { kind })), (size && { size })), (variant && { variant })), (color && { color })), (this.menuId && { 'menu-id': this.menuId }));
214
82
  const iconClasses = cs('bcm-dropdown__icon', {
215
- 'bcm-dropdown__icon--open': this.isOpen,
83
+ 'bcm-dropdown__icon--open': isOpen,
216
84
  });
217
85
  const dropdownIcon = (h("span", { class: iconClasses }, h("bcm-icon", { icon: this.dropdownIcon })));
218
- return (h(Host, { class: hostClasses, onClick: () => this.checkClick() }, h("span", { hidden: true }, h("slot", null)), this.noStyle && h("slot", null), !this.noStyle && (h("bcm-button", Object.assign({ class: "main-button", id: `${this._id}-button` }, attributes, (icon && { icon }), (href && type === 'split' && { href }), (target && type === 'split' && { target }), (fullWidth && { fullWidth })), h("slot", null), type === 'dropdown' && dropdownIcon)), !this.noStyle && type === 'split' && (h("bcm-button", Object.assign({ id: `${this._id}-button-split`, class: "split-button" }, attributes), dropdownIcon)), this.data && this.data.length > 0 && (h("bcm-menu", { id: `${this.menuId}`, "linked-component": `${this._id}-button${type === 'split' ? '-split' : ''}`, data: this.data, "on-bcm-open": e => (this.isOpen = e.detail), "on-bcm-click": e => this.bcmClick.emit(e.detail), placement: this.placement || (type === 'dropdown' ? 'bottom-start' : 'bottom-end'), "max-height": this.maxHeight, "min-height": this.minHeight, height: this.height, selectable: this.selectable }))));
86
+ return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null)), this.noStyle && h("slot", null), !this.noStyle && (h("bcm-button", Object.assign({ class: "main-button", id: `${this._id}-button` }, attributes, (icon && { icon }), (href && type === 'split' && { href }), (target && type === 'split' && { target }), (fullWidth && { fullWidth })), h("slot", null), type === 'dropdown' && dropdownIcon)), !this.noStyle && type === 'split' && (h("bcm-button", Object.assign({ id: `${this._id}-button-split`, class: "split-button" }, attributes), dropdownIcon)), h("bcm-linked", { id: `${this.menuId}`, "target-id": `${this._id}-button${type === 'split' ? '-split' : ''}`, placement: this.placement || (type === 'dropdown' ? 'bottom-start' : 'bottom-end'), "max-height": this.maxHeight, "min-height": this.minHeight, height: this.height, "on-bcm-open": e => { var _a; return ((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.id) == this.menuId && (this.isOpen = e.detail); } }, this.data && this.data.length > 0 && h("bcm-menu", { data: this.data, selectable: this.selectable, "on-bcm-click": e => this.bcmClick.emit(e.detail) }))));
219
87
  }
220
88
  static get is() { return "bcm-dropdown"; }
221
89
  static get originalStyleUrls() {
@@ -504,27 +372,9 @@ export class BcmDropdown {
504
372
  "attribute": "linked-component",
505
373
  "reflect": false
506
374
  },
507
- "multiLevel": {
508
- "type": "boolean",
509
- "mutable": true,
510
- "complexType": {
511
- "original": "boolean",
512
- "resolved": "boolean",
513
- "references": {}
514
- },
515
- "required": false,
516
- "optional": false,
517
- "docs": {
518
- "tags": [],
519
- "text": ""
520
- },
521
- "attribute": "multi-level",
522
- "reflect": false,
523
- "defaultValue": "false"
524
- },
525
375
  "loading": {
526
376
  "type": "boolean",
527
- "mutable": true,
377
+ "mutable": false,
528
378
  "complexType": {
529
379
  "original": "boolean",
530
380
  "resolved": "boolean",
@@ -542,7 +392,7 @@ export class BcmDropdown {
542
392
  },
543
393
  "variant": {
544
394
  "type": "string",
545
- "mutable": true,
395
+ "mutable": false,
546
396
  "complexType": {
547
397
  "original": "VariantProp",
548
398
  "resolved": "\"filter\" | \"remove\" | \"close\" | \"reset\" | \"submit\" | \"apply\" | \"download\" | \"save\" | \"ok\" | \"new\" | \"add\" | \"create\" | \"prev\" | \"next\" | \"send\" | \"delete\" | \"cancel\" | \"decline\" | \"archive\" | \"edit\" | \"export\" | \"import\" | \"update\"",
@@ -564,7 +414,7 @@ export class BcmDropdown {
564
414
  },
565
415
  "dataDismiss": {
566
416
  "type": "boolean",
567
- "mutable": true,
417
+ "mutable": false,
568
418
  "complexType": {
569
419
  "original": "boolean",
570
420
  "resolved": "boolean",
@@ -582,7 +432,7 @@ export class BcmDropdown {
582
432
  },
583
433
  "fullWidth": {
584
434
  "type": "boolean",
585
- "mutable": true,
435
+ "mutable": false,
586
436
  "complexType": {
587
437
  "original": "boolean",
588
438
  "resolved": "boolean",
@@ -600,7 +450,7 @@ export class BcmDropdown {
600
450
  },
601
451
  "iconPosition": {
602
452
  "type": "string",
603
- "mutable": true,
453
+ "mutable": false,
604
454
  "complexType": {
605
455
  "original": "IconPositionTypes",
606
456
  "resolved": "\"prefix\" | \"suffix\"",
@@ -623,7 +473,7 @@ export class BcmDropdown {
623
473
  },
624
474
  "placement": {
625
475
  "type": "string",
626
- "mutable": true,
476
+ "mutable": false,
627
477
  "complexType": {
628
478
  "original": "PlacementTypes",
629
479
  "resolved": "\"bottom\" | \"bottom-end\" | \"bottom-start\" | \"left\" | \"left-end\" | \"left-start\" | \"right\" | \"right-end\" | \"right-start\" | \"top\" | \"top-end\" | \"top-start\"",
@@ -644,11 +494,11 @@ export class BcmDropdown {
644
494
  "reflect": false
645
495
  },
646
496
  "height": {
647
- "type": "string",
648
- "mutable": true,
497
+ "type": "any",
498
+ "mutable": false,
649
499
  "complexType": {
650
- "original": "string",
651
- "resolved": "string",
500
+ "original": "any",
501
+ "resolved": "any",
652
502
  "references": {}
653
503
  },
654
504
  "required": false,
@@ -658,12 +508,11 @@ export class BcmDropdown {
658
508
  "text": ""
659
509
  },
660
510
  "attribute": "height",
661
- "reflect": false,
662
- "defaultValue": "'auto'"
511
+ "reflect": false
663
512
  },
664
513
  "maxHeight": {
665
514
  "type": "string",
666
- "mutable": true,
515
+ "mutable": false,
667
516
  "complexType": {
668
517
  "original": "string",
669
518
  "resolved": "string",
@@ -681,7 +530,7 @@ export class BcmDropdown {
681
530
  },
682
531
  "minHeight": {
683
532
  "type": "string",
684
- "mutable": true,
533
+ "mutable": false,
685
534
  "complexType": {
686
535
  "original": "string",
687
536
  "resolved": "string",
@@ -735,7 +584,7 @@ export class BcmDropdown {
735
584
  },
736
585
  "color": {
737
586
  "type": "any",
738
- "mutable": true,
587
+ "mutable": false,
739
588
  "complexType": {
740
589
  "original": "any",
741
590
  "resolved": "any",
@@ -786,28 +635,13 @@ export class BcmDropdown {
786
635
  "resolved": "any",
787
636
  "references": {}
788
637
  }
789
- }, {
790
- "method": "dropdownLinkedComponent",
791
- "name": "dropdown-linked-component",
792
- "bubbles": true,
793
- "cancelable": true,
794
- "composed": true,
795
- "docs": {
796
- "tags": [],
797
- "text": ""
798
- },
799
- "complexType": {
800
- "original": "any",
801
- "resolved": "any",
802
- "references": {}
803
- }
804
638
  }];
805
639
  }
806
640
  static get methods() {
807
641
  return {
808
642
  "setActive": {
809
643
  "complexType": {
810
- "signature": "(id: any) => Promise<void>",
644
+ "signature": "(id?: any) => Promise<void>",
811
645
  "parameters": [{
812
646
  "tags": [],
813
647
  "text": ""
@@ -831,31 +665,10 @@ export class BcmDropdown {
831
665
  return [{
832
666
  "propName": "data",
833
667
  "methodName": "dataChanged"
834
- }, {
835
- "propName": "isOpen",
836
- "methodName": "isOpenChanged"
837
668
  }];
838
669
  }
839
670
  static get listeners() {
840
671
  return [{
841
- "name": "dropdown-linked-component",
842
- "method": "handleIsClickDismiss",
843
- "target": "window",
844
- "capture": false,
845
- "passive": false
846
- }, {
847
- "name": "click",
848
- "method": "handleOnClick",
849
- "target": "window",
850
- "capture": false,
851
- "passive": false
852
- }, {
853
- "name": "wheel",
854
- "method": "handleWheel",
855
- "target": "document",
856
- "capture": false,
857
- "passive": false
858
- }, {
859
672
  "name": "bcm-items",
860
673
  "method": "handleSlotItems",
861
674
  "target": undefined,
@@ -93,6 +93,7 @@ export class BcmLinked {
93
93
  document.body.appendChild(this.el);
94
94
  }
95
95
  onLinkedDataDismis() {
96
+ // console.log('onLinkedDataDismis');
96
97
  this.hide(false);
97
98
  }
98
99
  onBcmFloatingIsHide(e) {
@@ -131,10 +132,15 @@ export class BcmLinked {
131
132
  if (!this.target())
132
133
  return;
133
134
  const isTarget = Generate.findEventPath(e, this.target());
135
+ const isSelf = Generate.findEventPath(e, this.el);
136
+ const isLinked = Generate.findEventPathWithNodeName(e, 'BCM-LINKED');
137
+ if (!isTarget && !isSelf && !isLinked) {
138
+ this.hide();
139
+ this.bcmOpen.emit(this.isOpen);
140
+ return;
141
+ }
134
142
  if (this.isOpen) {
135
143
  isTarget && this.hide(false);
136
- const isSelf = Generate.findEventPath(e, this.el);
137
- const isLinked = Generate.findEventPathWithNodeName(e, 'BCM-LINKED');
138
144
  isSelf && this.checkDataDismiss(e);
139
145
  if (this.el.getAttribute('main-linked') === 'true' && !isTarget && !isSelf && !isLinked) {
140
146
  this.dismissEvent();
@@ -153,6 +159,9 @@ export class BcmLinked {
153
159
  wheelListener() {
154
160
  this.calculatePosition();
155
161
  }
162
+ watchIsOpen() {
163
+ this.bcmOpen.emit(this.isOpen);
164
+ }
156
165
  render() {
157
166
  const openStyle = this.isOpen ? { visibility: 'visible', opacity: '1' } : { visibility: 'hidden', opacity: '0' };
158
167
  return (h(Host, { class: "tw-block tw-opacity-0 tw-invisible tw-top-0 tw-left-0 tw-rounded tw-bg-white tw-z-tooltip tw-transition-opacity tw-duration-100 tw-shadow tw-overscroll-contain tw-scroll-smooth tw-absolute", style: Object.assign(Object.assign({}, openStyle), { overflow: 'auto' }) }, h("slot", null)));
@@ -250,7 +259,7 @@ export class BcmLinked {
250
259
  "resolved": "string",
251
260
  "references": {}
252
261
  },
253
- "required": true,
262
+ "required": false,
254
263
  "optional": false,
255
264
  "docs": {
256
265
  "tags": [],
@@ -267,7 +276,7 @@ export class BcmLinked {
267
276
  "resolved": "string",
268
277
  "references": {}
269
278
  },
270
- "required": true,
279
+ "required": false,
271
280
  "optional": false,
272
281
  "docs": {
273
282
  "tags": [],
@@ -314,6 +323,24 @@ export class BcmLinked {
314
323
  }
315
324
  };
316
325
  }
326
+ static get events() {
327
+ return [{
328
+ "method": "bcmOpen",
329
+ "name": "bcm-open",
330
+ "bubbles": true,
331
+ "cancelable": true,
332
+ "composed": true,
333
+ "docs": {
334
+ "tags": [],
335
+ "text": ""
336
+ },
337
+ "complexType": {
338
+ "original": "any",
339
+ "resolved": "any",
340
+ "references": {}
341
+ }
342
+ }];
343
+ }
317
344
  static get methods() {
318
345
  return {
319
346
  "show": {
@@ -376,6 +403,12 @@ export class BcmLinked {
376
403
  };
377
404
  }
378
405
  static get elementRef() { return "el"; }
406
+ static get watchers() {
407
+ return [{
408
+ "propName": "isOpen",
409
+ "methodName": "watchIsOpen"
410
+ }];
411
+ }
379
412
  static get listeners() {
380
413
  return [{
381
414
  "name": "linked-data-dismiss",
@@ -392,8 +425,8 @@ export class BcmLinked {
392
425
  }, {
393
426
  "name": "click",
394
427
  "method": "clickListener",
395
- "target": "window",
396
- "capture": false,
428
+ "target": "document",
429
+ "capture": true,
397
430
  "passive": false
398
431
  }, {
399
432
  "name": "resize",