bromcom-ui 2.10.1-rc.1 → 2.10.1-rc.11

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 (278) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/p-000670b6.js +5 -0
  4. package/dist/bromcom-ui/p-01c19c5a.entry.js +5 -0
  5. package/dist/bromcom-ui/{p-09699c4d.entry.js → p-0985e7ba.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-3756f541.entry.js → p-10e70228.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-16848643.entry.js → p-13c47eea.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-140b6ce0.js +5 -0
  9. package/dist/bromcom-ui/{p-1708a5ec.entry.js → p-18020ef7.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-7f09901d.entry.js → p-1b9bffba.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-3f39982f.entry.js → p-30bfe3bd.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-571dca86.entry.js → p-372ffe04.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-551058cd.entry.js → p-3c87fd88.entry.js} +1 -1
  14. package/dist/bromcom-ui/p-4597ee14.entry.js +5 -0
  15. package/dist/bromcom-ui/p-47682d2b.entry.js +21 -0
  16. package/dist/bromcom-ui/p-4bace961.entry.js +5 -0
  17. package/dist/bromcom-ui/{p-0973538a.entry.js → p-5f419e20.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-6132700e.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-9a41b688.js → p-62840867.js} +1 -1
  20. package/dist/bromcom-ui/p-629bcf93.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-77eb2287.entry.js → p-6a02ed0b.entry.js} +1 -1
  22. package/dist/bromcom-ui/p-6bfed79a.entry.js +5 -0
  23. package/dist/bromcom-ui/{p-55291cc5.entry.js → p-6d83c8f6.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-6de1c6ea.entry.js +5 -0
  25. package/dist/bromcom-ui/p-71cbd6f6.entry.js +5 -0
  26. package/dist/bromcom-ui/{p-56f7477e.entry.js → p-73d4bd1c.entry.js} +1 -1
  27. package/dist/bromcom-ui/p-7ada3462.entry.js +5 -0
  28. package/dist/bromcom-ui/p-7c0a3a3d.js +5 -0
  29. package/dist/bromcom-ui/{p-dac3117a.entry.js → p-7d1dd1b9.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-673f7ee8.entry.js → p-82331114.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-8301a465.entry.js +5 -0
  32. package/dist/bromcom-ui/p-85565afb.js +5 -0
  33. package/dist/bromcom-ui/{p-5ca4aa84.entry.js → p-88c38780.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-8dc361a8.js +5 -0
  35. package/dist/bromcom-ui/{p-015d19dd.entry.js → p-90510968.entry.js} +1 -1
  36. package/dist/bromcom-ui/{p-e131b27f.js → p-92d1a4c9.js} +1 -1
  37. package/dist/bromcom-ui/{p-cf171578.js → p-9398df85.js} +1 -1
  38. package/dist/bromcom-ui/{p-a04aab3c.entry.js → p-9ec71162.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-0325e8a4.entry.js → p-9f954c08.entry.js} +1 -1
  40. package/dist/bromcom-ui/p-9fbc30a6.entry.js +5 -0
  41. package/dist/bromcom-ui/{p-f3431dc8.js → p-a40d4f27.js} +1 -1
  42. package/dist/bromcom-ui/p-a8d23b66.entry.js +5 -0
  43. package/dist/bromcom-ui/p-a953375b.entry.js +5 -0
  44. package/dist/bromcom-ui/p-a95b18f2.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-24710a65.entry.js → p-a9c8b43c.entry.js} +1 -1
  46. package/dist/bromcom-ui/p-abc44b58.entry.js +5 -0
  47. package/dist/bromcom-ui/p-baf565be.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-e38c4c3a.entry.js → p-bffc5f8c.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-39a40a6e.entry.js → p-c80014e3.entry.js} +1 -1
  50. package/dist/bromcom-ui/p-c852c8fe.entry.js +5 -0
  51. package/dist/bromcom-ui/{p-cf0c0700.entry.js → p-ca788dc4.entry.js} +1 -1
  52. package/dist/bromcom-ui/p-ca8a4fc8.entry.js +5 -0
  53. package/dist/bromcom-ui/p-cc6c6f9e.entry.js +5 -0
  54. package/dist/bromcom-ui/p-d283e83e.entry.js +5 -0
  55. package/dist/bromcom-ui/p-dbad3126.entry.js +5 -0
  56. package/dist/bromcom-ui/{p-c1b167a3.js → p-de2272c5.js} +1 -1
  57. package/dist/bromcom-ui/{p-3b41df22.entry.js → p-df444847.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-ee4845ac.entry.js +5 -0
  59. package/dist/bromcom-ui/{p-e11ab4ed.entry.js → p-ef829d33.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-646cf63c.entry.js → p-f24b096b.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-d7538ba4.entry.js → p-f372306f.entry.js} +1 -1
  62. package/dist/bromcom-ui/p-f818d2a9.entry.js +5 -0
  63. package/dist/bromcom-ui/{p-14c32a34.entry.js → p-f93bf6db.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-f1dbd96d.entry.js → p-fc18af27.entry.js} +1 -1
  65. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  66. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  67. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  68. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -5
  69. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  70. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  71. package/dist/cjs/{bcm-button_10.cjs.entry.js → bcm-button_18.cjs.entry.js} +8309 -1414
  72. package/dist/cjs/bcm-caption.cjs.entry.js +5 -6
  73. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  74. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  76. package/dist/cjs/bcm-chip-group.cjs.entry.js +5 -6
  77. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  79. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -5
  80. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -5
  82. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  83. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  84. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  86. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -7
  87. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  88. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  89. package/dist/cjs/bcm-menu.cjs.entry.js +5 -6
  90. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -5
  91. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -5
  92. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -5
  93. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  94. package/dist/cjs/bcm-number-input.cjs.entry.js +108 -0
  95. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  96. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
  97. package/dist/cjs/bcm-popover.cjs.entry.js +4 -5
  98. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  99. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -5
  100. package/dist/cjs/bcm-radio.cjs.entry.js +4 -5
  101. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  102. package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -5
  103. package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -5
  104. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  105. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -6
  106. package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -5
  107. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -5
  108. package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -5
  109. package/dist/cjs/bcm-table.cjs.entry.js +4 -5
  110. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  111. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  112. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  113. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  114. package/dist/cjs/bcm-typography.cjs.entry.js +21 -0
  115. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  116. package/dist/cjs/{generate-e79347af.js → generate-8f2a5b22.js} +15 -1
  117. package/dist/cjs/{global-9bb1902a.js → global-6e3108be.js} +1 -1
  118. package/dist/cjs/{input-template-3d21aacb.js → input-template-866a71d3.js} +1 -1
  119. package/dist/cjs/{json-parse-decarator-4d7afa63.js → json-parse-decarator-f30bb239.js} +1 -1
  120. package/dist/cjs/{label-template-8dc10d0a.js → label-template-a6f51ef2.js} +6 -3
  121. package/dist/cjs/loader.cjs.js +3 -3
  122. package/dist/cjs/{number-helper-2f971fd8.js → number-helper-57ea679e.js} +1 -1
  123. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  124. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  125. package/dist/cjs/{package-47b7b998.js → package-9f43976f.js} +1 -1
  126. package/dist/cjs/{stepper-states-a5699b31.js → stepper-states-1199c518.js} +1 -1
  127. package/dist/cjs/{tooltip-helper-7d5d1cb5.js → tooltip-helper-f55fc832.js} +3 -4
  128. package/dist/cjs/{validators-507307b9.js → validators-463a67ba.js} +6 -1
  129. package/dist/collection/collection-manifest.json +1 -0
  130. package/dist/collection/components/atoms/label/label.js +1 -1
  131. package/dist/collection/components/molecules/input-dropdown/input-dropdown.js +1 -1
  132. package/dist/collection/components/molecules/input-dropdown/input-dropdown.style.js +1 -1
  133. package/dist/collection/components/molecules/number-input/number-input.css +137 -0
  134. package/dist/collection/components/molecules/number-input/number-input.js +425 -0
  135. package/dist/collection/components/molecules/number-input/number-input.style.js +45 -0
  136. package/dist/collection/components/molecules/switch/switch.css +1 -0
  137. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +47 -0
  138. package/dist/collection/components/organism/list/list.css +2 -0
  139. package/dist/collection/components/organism/list/list.js +38 -9
  140. package/dist/collection/components/other_deprecated/old-input/old-input.css +47 -0
  141. package/dist/collection/helper/generate.js +14 -0
  142. package/dist/collection/templates/label-template.js +6 -6
  143. package/dist/collection/templates/list-item-template.js +3 -2
  144. package/dist/components/bcm-caption.js +2 -2
  145. package/dist/components/bcm-input-dropdown.js +2 -2
  146. package/dist/components/bcm-number-input.d.ts +11 -0
  147. package/dist/components/bcm-number-input.js +157 -0
  148. package/dist/components/bcm-switch.js +1 -1
  149. package/dist/components/datetime-picker.js +1 -1
  150. package/dist/components/generate.js +15 -1
  151. package/dist/components/index.d.ts +1 -0
  152. package/dist/components/index.js +1 -0
  153. package/dist/components/label.js +7 -4
  154. package/dist/components/list.js +19 -10
  155. package/dist/components/old-input.js +1 -1
  156. package/dist/esm/bcm-accordion.entry.js +2 -2
  157. package/dist/esm/bcm-alert.entry.js +2 -2
  158. package/dist/esm/bcm-attendance.entry.js +2 -2
  159. package/dist/esm/bcm-avatar_2.entry.js +4 -5
  160. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  161. package/dist/esm/bcm-button-group.entry.js +2 -2
  162. package/dist/esm/{bcm-button_10.entry.js → bcm-button_18.entry.js} +7872 -985
  163. package/dist/esm/bcm-caption.entry.js +5 -6
  164. package/dist/esm/bcm-card.entry.js +2 -2
  165. package/dist/esm/bcm-checkbox-group.entry.js +3 -3
  166. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  167. package/dist/esm/bcm-chip-group.entry.js +5 -6
  168. package/dist/esm/bcm-chip.entry.js +2 -2
  169. package/dist/esm/bcm-collapse.entry.js +2 -2
  170. package/dist/esm/bcm-color-input.entry.js +4 -5
  171. package/dist/esm/bcm-default.entry.js +2 -2
  172. package/dist/esm/bcm-drawer.entry.js +4 -5
  173. package/dist/esm/bcm-dropdown.entry.js +3 -3
  174. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  175. package/dist/esm/bcm-form-2.entry.js +2 -2
  176. package/dist/esm/bcm-input-custom.entry.js +2 -2
  177. package/dist/esm/bcm-input-dropdown.entry.js +6 -7
  178. package/dist/esm/bcm-item.entry.js +2 -2
  179. package/dist/esm/bcm-items.entry.js +2 -2
  180. package/dist/esm/bcm-menu.entry.js +5 -6
  181. package/dist/esm/bcm-modal-2-footer.entry.js +4 -5
  182. package/dist/esm/bcm-modal-2-header.entry.js +4 -5
  183. package/dist/esm/bcm-modal-2.entry.js +4 -5
  184. package/dist/esm/bcm-modal.entry.js +2 -2
  185. package/dist/esm/bcm-number-input.entry.js +104 -0
  186. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  187. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  188. package/dist/esm/bcm-popover.entry.js +4 -5
  189. package/dist/esm/bcm-progress.entry.js +2 -2
  190. package/dist/esm/bcm-radio-group.entry.js +4 -5
  191. package/dist/esm/bcm-radio.entry.js +4 -5
  192. package/dist/esm/bcm-range.entry.js +2 -2
  193. package/dist/esm/bcm-shortcut.entry.js +4 -5
  194. package/dist/esm/bcm-skeleton.entry.js +4 -5
  195. package/dist/esm/bcm-step.entry.js +3 -3
  196. package/dist/esm/bcm-stepper.entry.js +5 -6
  197. package/dist/esm/bcm-tab-group.entry.js +4 -5
  198. package/dist/esm/bcm-tab-item-header.entry.js +4 -5
  199. package/dist/esm/bcm-tab-item.entry.js +4 -5
  200. package/dist/esm/bcm-table.entry.js +4 -5
  201. package/dist/esm/bcm-tag.entry.js +3 -3
  202. package/dist/esm/bcm-textarea.entry.js +3 -3
  203. package/dist/esm/bcm-time-picker.entry.js +2 -2
  204. package/dist/esm/bcm-toast.entry.js +2 -2
  205. package/dist/esm/bcm-typography.entry.js +17 -0
  206. package/dist/esm/bromcom-ui.js +3 -3
  207. package/dist/esm/{generate-b9c6f412.js → generate-c1065765.js} +15 -1
  208. package/dist/esm/{global-114427da.js → global-6365ce83.js} +1 -1
  209. package/dist/esm/{input-template-dc94e47f.js → input-template-74229cd2.js} +1 -1
  210. package/dist/esm/{json-parse-decarator-fca2dc09.js → json-parse-decarator-a301c8b7.js} +1 -1
  211. package/dist/esm/{label-template-989d1700.js → label-template-ad2e8119.js} +6 -3
  212. package/dist/esm/loader.js +3 -3
  213. package/dist/esm/{number-helper-70be3621.js → number-helper-d42f27d5.js} +1 -1
  214. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  215. package/dist/esm/old-bcm-popover.entry.js +2 -2
  216. package/dist/esm/{package-6f4c9f8c.js → package-5c7049c1.js} +1 -1
  217. package/dist/esm/{stepper-states-291a682f.js → stepper-states-39645921.js} +1 -1
  218. package/dist/esm/{tooltip-helper-089735b1.js → tooltip-helper-61f3e8cb.js} +3 -4
  219. package/dist/esm/{validators-c1fe8b4b.js → validators-3881959b.js} +6 -2
  220. package/dist/types/components/molecules/number-input/number-input.d.ts +29 -0
  221. package/dist/types/components/molecules/number-input/number-input.style.d.ts +200 -0
  222. package/dist/types/components/organism/list/list.d.ts +3 -1
  223. package/dist/types/components.d.ts +55 -1
  224. package/dist/types/helper/generate.d.ts +3 -0
  225. package/dist/types/models/bcm.d.ts +3 -0
  226. package/dist/types/templates/label-template.d.ts +2 -1
  227. package/package.json +1 -1
  228. package/dist/bromcom-ui/p-0b316c6f.entry.js +0 -5
  229. package/dist/bromcom-ui/p-0b820f78.entry.js +0 -5
  230. package/dist/bromcom-ui/p-0fe106fc.entry.js +0 -5
  231. package/dist/bromcom-ui/p-140f3478.js +0 -5
  232. package/dist/bromcom-ui/p-29614b49.entry.js +0 -5
  233. package/dist/bromcom-ui/p-2da72d6a.entry.js +0 -5
  234. package/dist/bromcom-ui/p-3432a82d.js +0 -19
  235. package/dist/bromcom-ui/p-3d142f76.entry.js +0 -5
  236. package/dist/bromcom-ui/p-40b85b9b.entry.js +0 -5
  237. package/dist/bromcom-ui/p-483b4ba8.entry.js +0 -5
  238. package/dist/bromcom-ui/p-5ff3c68f.entry.js +0 -5
  239. package/dist/bromcom-ui/p-626a65e9.js +0 -5
  240. package/dist/bromcom-ui/p-62d178e3.entry.js +0 -5
  241. package/dist/bromcom-ui/p-71b9ea64.entry.js +0 -7
  242. package/dist/bromcom-ui/p-795d2f76.entry.js +0 -5
  243. package/dist/bromcom-ui/p-813ec92d.js +0 -5
  244. package/dist/bromcom-ui/p-8b202d9e.js +0 -5
  245. package/dist/bromcom-ui/p-8d43aa14.entry.js +0 -5
  246. package/dist/bromcom-ui/p-93b8a3ff.entry.js +0 -5
  247. package/dist/bromcom-ui/p-9889a4ed.entry.js +0 -5
  248. package/dist/bromcom-ui/p-a00170b7.entry.js +0 -5
  249. package/dist/bromcom-ui/p-a1f9e7d4.entry.js +0 -5
  250. package/dist/bromcom-ui/p-a42cc789.entry.js +0 -5
  251. package/dist/bromcom-ui/p-a839a0e5.entry.js +0 -5
  252. package/dist/bromcom-ui/p-b013cff9.entry.js +0 -5
  253. package/dist/bromcom-ui/p-b3b59bc3.entry.js +0 -5
  254. package/dist/bromcom-ui/p-be434461.entry.js +0 -5
  255. package/dist/bromcom-ui/p-bec8a936.entry.js +0 -5
  256. package/dist/bromcom-ui/p-c566b3a0.entry.js +0 -5
  257. package/dist/bromcom-ui/p-cd04678a.entry.js +0 -5
  258. package/dist/bromcom-ui/p-d06f5291.js +0 -5
  259. package/dist/bromcom-ui/p-d89b7e22.entry.js +0 -5
  260. package/dist/bromcom-ui/p-ea2ce157.js +0 -5
  261. package/dist/bromcom-ui/p-f7549b1f.entry.js +0 -5
  262. package/dist/bromcom-ui/p-fb597d84.entry.js +0 -5
  263. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +0 -194
  264. package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -182
  265. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1450
  266. package/dist/cjs/bcm-list_3.cjs.entry.js +0 -2536
  267. package/dist/cjs/bcm-old-input.cjs.entry.js +0 -397
  268. package/dist/cjs/bcm-switch.cjs.entry.js +0 -151
  269. package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
  270. package/dist/cjs/index-7eed931f.js +0 -2146
  271. package/dist/esm/bcm-checkbox_2.entry.js +0 -189
  272. package/dist/esm/bcm-date-picker.entry.js +0 -178
  273. package/dist/esm/bcm-datetime-picker.entry.js +0 -1446
  274. package/dist/esm/bcm-list_3.entry.js +0 -2530
  275. package/dist/esm/bcm-old-input.entry.js +0 -393
  276. package/dist/esm/bcm-switch.entry.js +0 -147
  277. package/dist/esm/datetime-helper-df25808a.js +0 -9
  278. package/dist/esm/index-e4b6a4ce.js +0 -2127
@@ -1,2530 +0,0 @@
1
- /*!
2
- * Built with Stencil
3
- * Copyright (c) Bromcom.
4
- */
5
- import { h, r as registerInstance, c as createEvent, H as Host, g as getElement } from './index-0615c2b8.js';
6
- import { I as IsLoad } from './is-load-decorator-8277e3b8.js';
7
- import { J as JsonParse } from './json-parse-decarator-fca2dc09.js';
8
- import './color-helper-845ba523.js';
9
- import './datetime-helper-df25808a.js';
10
- import { s as snq, G as Generate } from './generate-b9c6f412.js';
11
- import { N as NumberHelper } from './number-helper-70be3621.js';
12
- import { S as StringHelper } from './string-helper-8f5da9ec.js';
13
- import { V as Validators } from './validators-c1fe8b4b.js';
14
- import './element-dragger-89bb52fd.js';
15
- import { g as getPlacement, s as setPosition } from './popover-placement-279ce860.js';
16
- import { p as pluralize, d as delay } from './utils-57652744.js';
17
- import { B as Bcm, a as Bcm$1 } from './bcm-0f9cc27c.js';
18
- import { C as CaptionTemplate } from './caption-template-0c32ce16.js';
19
- import { c as classnames } from './index-00c8a8f7.js';
20
- import './types-6f06fa1a.js';
21
- import './types-9493a7ed.js';
22
- import { c as createStore } from './index-7e71bbc8.js';
23
- import { r as react, k as RefResizeObserver, d as wrapperRaf, u as useEvent, a as reactDom, e as useLayoutEffect } from './index-e4b6a4ce.js';
24
- import { I as InputTemplate } from './input-template-dc94e47f.js';
25
- import './colors-1d7854ea.js';
26
- import './colors-ebea297f.js';
27
- import './_commonjsHelpers-7002e5de.js';
28
- import './package-6f4c9f8c.js';
29
-
30
- const CheckboxTemplate = ({ disabled, checked, readonly, required, indeterminate, hidden, captionType, _id }) => {
31
- // if ( indeterminate ) {
32
- // checked = indeterminate == 'determinate' ? true : false
33
- // }
34
- const hostClasses = classnames('bcm-checkbox', 'bcm-checkbox__type-default', `bcm-checkbox-size-medium`, {
35
- // 'size-2': size === Bcm.Size.small || size === Bcm.Size.medium,
36
- // 'size-3': optionType === 'button' && size === Bcm.Size.large,
37
- 'error': captionType == Bcm.Status.error,
38
- hidden,
39
- checked,
40
- disabled,
41
- required,
42
- readonly,
43
- });
44
- const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
45
- 'bcm-checkbox__label-icon-checked': checked,
46
- });
47
- const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
48
- return (h("div", { class: hostClasses },
49
- h("input", { tabindex: "-1", id: _id, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly }),
50
- h("label", { class: bcmCheckboxLabelClass, htmlFor: _id },
51
- h("span", { class: bcmCheckboxIconClass },
52
- h("bcm-icon", { icon: "far fa-check" })))));
53
- };
54
-
55
- const InfoFooterTemplate = ({ selected, total, found, multiple, variableText }) => {
56
- total = total || 0;
57
- variableText = variableText ? pluralize(variableText, total) : 'items';
58
- return (h("footer", { class: "bcm-info-footer" },
59
- h("bcm-text", { scale: "size-1", color: "grey-8" },
60
- (multiple && selected > 0) && ` ( ${selected} selected ) `,
61
- ` Total ${total} `,
62
- found != null && ` / ${found} `,
63
- ` ${variableText} found. `)));
64
- };
65
-
66
- const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds }) => {
67
- const isHaveChildren = item.items && item.items.length > 0;
68
- var text = StringHelper.htmlEntities(item.text);
69
- let intersection = [];
70
- if (highlight && StringHelper.slugify(text).includes(StringHelper.slugify(highlight))) {
71
- if (!searchIsOnlyChilds || (searchIsOnlyChilds && (!isHaveChildren || (!treeview && item.type != "group")))) {
72
- text = StringHelper.highlight(text, highlight);
73
- }
74
- }
75
- if (item.type != 'group' && item.template) {
76
- const match = item.template
77
- .replace(/\s/g, '')
78
- .match(/\{{[^}}]+\}/g)
79
- .map(x => x.replace(/[{}]/g, ''));
80
- const keys = Object.keys(item.itemObject);
81
- intersection = match.filter(x => keys.includes(x));
82
- }
83
- text = item.isHtmlContent ? item.isHtmlContent : item.template && intersection.length > 0 ? StringHelper.templateParser(item.template, Object.assign(Object.assign({}, item.itemObject), { text })) : text;
84
- const unClickable = !treeview && item.type == "group" && !item.clickable;
85
- const disabled = item.disabled;
86
- const readonly = item.readonly;
87
- const itemClick = (event) => {
88
- let path = event.path || event.composedPath();
89
- if (path.filter(x => x.attributes && x.attributes.getNamedItem("unlinked"))[0]) {
90
- return;
91
- }
92
- if (readonly) {
93
- collapseClick();
94
- }
95
- !unClickable && !disabled && !readonly && (checkboxes ? checkedItem(item.id) : selectedItem(item.id));
96
- };
97
- const collapseClick = () => {
98
- item.open = item.isSearching;
99
- openGroup(item.id);
100
- };
101
- return (h("div", { id: item.id, hidden: item.hidden, "on-focus": e => !unClickable && !disabled && focusItem(e), class: classnames('bcm-list__item',
102
- // size === 'large' ? 'size-3' : 'size-2',
103
- 'bcm-list__item-' + size, {
104
- 'bcm-list__item--group': !treeview && item.type == 'group',
105
- 'bcm-list__item--readonly': readonly,
106
- }) },
107
- h("div", { class: classnames('bcm-list__item-content', !checkboxes && item.selected && 'selected', { disabled: disabled }) },
108
- treeview && (h("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => collapseClick() }, isHaveChildren && h("bcm-icon", { icon: classnames('fas fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) }))),
109
- h("div", { class: classnames('bcm-list__item-content-text', { treeview }), onClick: (e) => itemClick(e) },
110
- checkboxes && (treeview || (!treeview && item.type != 'group')) && (h("div", { class: "bcm-list__item-content-text-checkbox" },
111
- h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled: item.disabled }))),
112
- h("span", Object.assign({ class: "bcm-list__item-content-text-inner" }, (item.title && { "title": item.title }), { innerHTML: text })))),
113
- (treeview || !treeview && item.type == "group") && isHaveChildren && (h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open || (!treeview && item.type == "group")) &&
114
- item.items.map((item) => (h(ListItemTemplate, { highlight: highlight, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, size: size, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) })))))));
115
- };
116
-
117
- const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, tempId, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, handleTransitionEnd, }) => {
118
- const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
119
- const setScrollHeight = () => {
120
- const itemHeight = size === 'small' ? 28 : size === 'medium' ? 36 : 48;
121
- const itemCount = searchFound == null ? (treeview ? items.length : totalData) : searchFound;
122
- const scrollHeight = itemCount * itemHeight || 0;
123
- return {
124
- 'min-height': `${scrollHeight}px`,
125
- 'overscroll-behavior': 'none',
126
- 'height': '100%',
127
- 'display': 'flex',
128
- 'flex-direction': 'column',
129
- };
130
- };
131
- return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, "temp-id": `bcm-list-${tempId}`, style: { '--height': height, '--width': width }, onTransitionEnd: e => handleTransitionEnd(e) },
132
- data && searchable && (h("section", { class: "bcm-list__container-search" },
133
- h("bcm-search", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder, "min-search-length": minSearchLength, searchIsOnlyChilds: searchIsOnlyChilds }))),
134
- h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: { 'overscroll-behavior': 'none' } },
135
- h("div", { style: setScrollHeight() },
136
- checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h("section", { class: "bcm-list__container-select-all" },
137
- h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
138
- items.map((item) => (h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
139
- (!items || items.length === 0) && searchFound != 0 && (h("section", { class: "bcm-list__container-no-data" },
140
- h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
141
- h("span", { innerHTML: emptyText || 'No data' })))),
142
- searchFound == 0 && (h("section", { class: "bcm-list__container-no-data" },
143
- h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
144
- h("span", { innerHTML: emptyText || 'No Data Found' })))))),
145
- infoFooter && data && data.length > 0 && (h(InfoFooterTemplate, { selected: value === null || value === void 0 ? void 0 : value.length, total: totalData, found: searchFound, multiple: checkboxes, variableText: variableText }))));
146
- };
147
-
148
- const { state: state$1 } = createStore({
149
- value: new Map(),
150
- });
151
- const setValue$1 = val => {
152
- const { id, dataSource, options } = val;
153
- const { type, treeview, checkboxes, searchable, value, name, label, size, disabled, readonly, highlight, required, hidden, fullWidth, height, maxHeight, minHeight, width, infoFooter, variableText, template, allOpen, keyControl, checkAll, linkedComponent, placeholder, searchPlaceholder, searchIsOnlyChilds, clearable, caption, noCaption, captionType, captionError, placement, } = options;
154
- const itemOptions = { size, checkboxes, template, allOpen, highlight, treeview };
155
- const data = {
156
- id: snq(() => id, Generate.UID),
157
- dataSource: dataSource && dataSource.length > 0 && recursive$1(dataSource, itemOptions),
158
- options: {
159
- type,
160
- treeview,
161
- checkboxes,
162
- searchable,
163
- value,
164
- name,
165
- label,
166
- size,
167
- disabled,
168
- readonly,
169
- highlight,
170
- required,
171
- hidden,
172
- fullWidth,
173
- height,
174
- maxHeight,
175
- minHeight,
176
- width,
177
- infoFooter,
178
- variableText,
179
- template,
180
- allOpen,
181
- keyControl,
182
- checkAll,
183
- linkedComponent,
184
- placeholder,
185
- searchPlaceholder,
186
- searchIsOnlyChilds,
187
- clearable,
188
- caption,
189
- noCaption,
190
- captionType,
191
- captionError,
192
- placement,
193
- },
194
- totalItems: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 && calculateTotalItems(dataSource, options.treeview),
195
- totalRoots: dataSource === null || dataSource === void 0 ? void 0 : dataSource.length,
196
- };
197
- state$1.value.set(data.id, data);
198
- };
199
- const recursive$1 = (data, options, parentId, parentIndex = "0.") => {
200
- let recData = [];
201
- if (data && data.length > 0) {
202
- recData = data.map((item, index) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ itemObject: item }, item), options), { parentId: snq(() => parentId, null), open: options.allOpen || item.open || false }), ((options.treeview || (!options.treeview && item.type == 'group')) && item.items && item.items.length > 0
203
- ? { items: snq(() => recursive$1(item.items, options, item.id, `${parentIndex}${index}`), []) }
204
- : { items: [] })), { ct: `${parentIndex}${index}` })));
205
- }
206
- return recData;
207
- };
208
- const removeValue$1 = _id => {
209
- state$1.value.delete(_id);
210
- };
211
- const getValue$1 = id => snq(() => state$1.value.get(id), {});
212
- const calculateTotalItems = (dataSource, treeview) => {
213
- let total = 0;
214
- dataSource.forEach(item => {
215
- if (treeview || (!treeview && item.type != "group")) {
216
- total += 1;
217
- }
218
- if ((treeview || (!treeview && item.type == "group")) && item.items) {
219
- total += calculateTotalItems(item.items, treeview);
220
- }
221
- });
222
- return total;
223
- };
224
- const getData = id => {
225
- let data = [];
226
- const value = getValue$1(id);
227
- if (value) {
228
- const { dataSource } = value;
229
- data = dataSource;
230
- }
231
- return data;
232
- };
233
- const getDataPagination$1 = (id, limit = 3, ids) => {
234
- let data = [];
235
- const value = getValue$1(id);
236
- if (value) {
237
- const { dataSource } = value;
238
- data = !ids ? dataSource.slice(0, limit) : dataSource.filter(item => ids.indexOf(item.id) > -1).slice(0, limit);
239
- }
240
- return data;
241
- };
242
- const openGroup = (id, groupId, items, status) => {
243
- let dataSource;
244
- if (items) {
245
- dataSource = items;
246
- }
247
- else {
248
- const value = getValue$1(id);
249
- dataSource = value.dataSource;
250
- }
251
- if (dataSource) {
252
- dataSource.forEach(item => {
253
- if (status != undefined) {
254
- item.open = status;
255
- }
256
- else if (item.id == groupId) {
257
- item.open = !item.open;
258
- item.isSearching = item.open;
259
- if (!item.open && item.items) {
260
- openGroup(id, groupId, item.items, false);
261
- }
262
- }
263
- else if (item.items) {
264
- openGroup(id, groupId, item.items);
265
- }
266
- });
267
- }
268
- };
269
- const removeOtherTags = (id, ids, items) => {
270
- ids = Array.isArray(ids) ? ids : [ids];
271
- let dataSource;
272
- if (items) {
273
- dataSource = items;
274
- }
275
- else {
276
- const value = getValue$1(id);
277
- dataSource = value.dataSource;
278
- }
279
- if (dataSource) {
280
- ids.forEach(otherTagIds => {
281
- dataSource.forEach(child => {
282
- if (child.id == otherTagIds) {
283
- child.checked = false;
284
- child.itemObject.checked = false;
285
- }
286
- else if (child.items) {
287
- onRemoveItems(id, otherTagIds, child.items);
288
- }
289
- });
290
- });
291
- }
292
- };
293
- const onRemoveItems = (id, itemId, items) => {
294
- if (items) {
295
- items.forEach(item => {
296
- if (item.id == itemId) {
297
- item.checked = false;
298
- item.itemObject.checked = false;
299
- indeterminateStatus(id, item.parentId);
300
- }
301
- else if (item.items) {
302
- onRemoveItems(id, itemId, item.items);
303
- }
304
- });
305
- }
306
- };
307
- const addChecked = (id, ids) => {
308
- const value = getValue$1(id);
309
- if (value) {
310
- ids.forEach(item => {
311
- checkedItem(id, item);
312
- });
313
- }
314
- };
315
- const checkedItem = (id, itemId) => {
316
- findItem(id, itemId);
317
- };
318
- const findItem = (id, itemId, items) => {
319
- itemId = Array.isArray(itemId) ? itemId : [itemId];
320
- let dataSource;
321
- if (items) {
322
- dataSource = items;
323
- }
324
- else {
325
- const value = getValue$1(id);
326
- dataSource = value.dataSource;
327
- }
328
- if (dataSource) {
329
- dataSource.forEach(item => {
330
- if (itemId.includes(item.id)) {
331
- checkedProcess(id, item);
332
- if (item.parentId) {
333
- indeterminateStatus(id, item.parentId);
334
- }
335
- }
336
- else if (item.items) {
337
- findItem(id, itemId, item.items);
338
- }
339
- });
340
- }
341
- };
342
- const checkedProcess = (id, item, status) => {
343
- const value = getValue$1(id);
344
- if (value) {
345
- const treeview = value.options.treeview;
346
- if (item) {
347
- // && !item.hidden => select all bastığımızda hidden olanları seçmemesi içindi
348
- if (treeview || (!treeview && item.type != "group")) {
349
- if (!item.disabled) {
350
- if (status != undefined) {
351
- item.checked = status;
352
- }
353
- else {
354
- item.checked = !item.checked;
355
- }
356
- item.itemObject.checked = item.checked;
357
- item.indeterminate = item.checked ? "determinate" : "uncheck";
358
- }
359
- }
360
- if (item.items) {
361
- item.items.forEach(child => {
362
- checkedProcess(id, child, status == undefined ? item.checked : status);
363
- });
364
- }
365
- }
366
- }
367
- };
368
- const indeterminateStatus = (id, itemId, items) => {
369
- let dataSource;
370
- if (items) {
371
- dataSource = items;
372
- }
373
- else {
374
- const value = getValue$1(id);
375
- dataSource = value.dataSource;
376
- }
377
- if (dataSource) {
378
- dataSource.forEach(item => {
379
- if (item.id == itemId) {
380
- let allChecked = true;
381
- let allUnchecked = true;
382
- if (item.items) {
383
- item.items.map(child => {
384
- (child.checked || child.indeterminate === "indeterminate") && (allUnchecked = false);
385
- !child.checked && (allChecked = false);
386
- });
387
- }
388
- const indeterminateState = !allChecked && !allUnchecked ? "indeterminate" : allChecked ? "determinate" : "uncheck";
389
- item.indeterminate = indeterminateState;
390
- item.checked = indeterminateState == "determinate" ? true : false;
391
- item.itemObject.checked = item.checked;
392
- if (item.parentId) {
393
- indeterminateStatus(id, item.parentId);
394
- }
395
- }
396
- else if (item.items) {
397
- indeterminateStatus(id, itemId, item.items);
398
- }
399
- });
400
- }
401
- };
402
- const filterData = (id, ids, items, searchOtherTag) => {
403
- let checkeds = [];
404
- let visibled = [];
405
- getValue$1(id).isSearchOtherTag = searchOtherTag;
406
- let dataSource;
407
- if (items) {
408
- dataSource = items;
409
- }
410
- else {
411
- const value = getValue$1(id);
412
- dataSource = value.dataSource;
413
- }
414
- if (dataSource) {
415
- dataSource.forEach(item => {
416
- if (ids) {
417
- item.hidden = true;
418
- // const filter = ids.find((find) => find.id === item.id)
419
- var filter;
420
- for (let index = 0; index < ids.length; index++) {
421
- if (ids[index].id === item.id) {
422
- filter = ids[index];
423
- break;
424
- }
425
- }
426
- if (filter) {
427
- item.hidden = false;
428
- if (!getValue$1(id).isSearchOtherTag) {
429
- item.isSearching = true;
430
- }
431
- visibled.push(item);
432
- if (item.checked) {
433
- checkeds.push(item);
434
- }
435
- if (filter.items) {
436
- const { checkedItems, visibledItems } = filterData(id, filter.items, item.items, searchOtherTag);
437
- if (checkedItems) {
438
- checkeds = [...new Set([...checkeds, ...checkedItems])];
439
- }
440
- if (visibledItems) {
441
- visibled = [...new Set([...visibled, ...visibledItems])];
442
- }
443
- }
444
- }
445
- }
446
- else {
447
- item.hidden = false;
448
- if (item.items) {
449
- filterData(id, null, item.items);
450
- }
451
- visibled.push(item);
452
- item.isSearching = false;
453
- }
454
- });
455
- }
456
- return { checkedItems: checkeds !== null && checkeds !== void 0 ? checkeds : [], visibledItems: visibled !== null && visibled !== void 0 ? visibled : [] };
457
- };
458
- const getSelected = (id, items) => {
459
- let dataSource;
460
- let selected = null;
461
- if (items) {
462
- dataSource = items;
463
- }
464
- else {
465
- const value = getValue$1(id);
466
- dataSource = value.dataSource;
467
- }
468
- if (dataSource) {
469
- dataSource.forEach(item => {
470
- if (item.selected) {
471
- selected = item.itemObject;
472
- }
473
- else if (item.items) {
474
- const found = getSelected(id, item.items);
475
- if (found) {
476
- selected = found;
477
- }
478
- }
479
- });
480
- }
481
- return selected;
482
- };
483
- const getCheckedList = (id, items) => {
484
- let dataSource;
485
- let checkedList = [];
486
- let nestedResult = [];
487
- if (items) {
488
- dataSource = items;
489
- }
490
- else {
491
- const value = getValue$1(id);
492
- dataSource = value.dataSource;
493
- }
494
- if (dataSource) {
495
- dataSource.forEach(item => {
496
- var _a;
497
- const newItem = Object.assign(Object.assign({}, item.itemObject), { ct: item.ct });
498
- let foundChild = [];
499
- let foundItem = [];
500
- if (item.checked) {
501
- checkedList.push(newItem);
502
- foundItem.push(Object.assign(Object.assign({}, newItem), { items: [] }));
503
- }
504
- if (item.items) {
505
- const found = getCheckedList(id, item.items);
506
- if (((_a = found === null || found === void 0 ? void 0 : found.checkedList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
507
- checkedList = [...checkedList, ...found.checkedList];
508
- }
509
- if (found.nestedResult.length > 0) {
510
- foundChild = found.nestedResult;
511
- }
512
- }
513
- if (foundChild.length > 0) {
514
- if (foundItem.length == 0) {
515
- foundItem.push(Object.assign(Object.assign({}, newItem), { items: [] }));
516
- }
517
- foundItem[0].items = foundChild;
518
- nestedResult.push(foundItem[0]);
519
- }
520
- else {
521
- if (foundItem.length > 0) {
522
- foundItem[0].items = foundChild;
523
- nestedResult.push(foundItem[0]);
524
- }
525
- }
526
- });
527
- }
528
- return { checkedList: (checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 ? checkedList : null, nestedResult: nestedResult };
529
- };
530
- const selectedItem = (id, itemId, items) => {
531
- let dataSource;
532
- let selected = [];
533
- if (items) {
534
- dataSource = items;
535
- }
536
- else {
537
- const value = getValue$1(id);
538
- dataSource = value.dataSource;
539
- }
540
- if (dataSource) {
541
- dataSource.forEach(item => {
542
- if (itemId) {
543
- if (item.id == itemId) {
544
- // if (!item.selected){
545
- item.selected = true;
546
- item.itemObject.selected = item.selected;
547
- // }
548
- }
549
- else {
550
- if (item.selected) {
551
- item.selected = false;
552
- item.itemObject.selected = item.selected;
553
- }
554
- }
555
- }
556
- if (item.items) {
557
- const found = selectedItem(id, itemId, item.items);
558
- if ((found === null || found === void 0 ? void 0 : found.length) > 0) {
559
- selected = [...selected, ...found];
560
- }
561
- }
562
- if (item.selected) {
563
- selected.push(item.itemObject);
564
- }
565
- });
566
- }
567
- return selected && selected.length > 0 ? selected : null;
568
- };
569
- const setClear = (id, items) => {
570
- let dataSource;
571
- if (items) {
572
- dataSource = items;
573
- }
574
- else {
575
- const value = getValue$1(id);
576
- dataSource = value.dataSource;
577
- }
578
- if (dataSource) {
579
- dataSource.forEach(item => {
580
- var _a, _b, _c;
581
- item.checked && (item.checked = false);
582
- item.selected && (item.selected = false);
583
- item.indeterminate && (item.indeterminate = "uncheck");
584
- ((_a = item.itemObject) === null || _a === void 0 ? void 0 : _a.checked) && (item.itemObject.checked = false);
585
- ((_b = item.itemObject) === null || _b === void 0 ? void 0 : _b.selected) && (item.itemObject.selected = false);
586
- ((_c = item.itemObject) === null || _c === void 0 ? void 0 : _c.indeterminate) && (item.itemObject.indeterminate = "uncheck");
587
- if (item.items) {
588
- setClear(id, item.items);
589
- }
590
- });
591
- }
592
- };
593
- const selectAll = (id, status) => {
594
- const dataSource = getValue$1(id).dataSource;
595
- if (dataSource) {
596
- dataSource.forEach(item => {
597
- checkedProcess(id, item, status);
598
- });
599
- }
600
- };
601
- const updateOptions = (id, options) => {
602
- Object.keys(getValue$1(id).options).forEach(key => {
603
- getValue$1(id).options[key] = options[key];
604
- });
605
- };
606
- const removeState = id => {
607
- return Promise.resolve(state$1.value.delete(id));
608
- };
609
- const listState = {
610
- setValue: setValue$1,
611
- removeValue: removeValue$1,
612
- getValue: getValue$1,
613
- getData,
614
- getDataPagination: getDataPagination$1,
615
- openGroup,
616
- checkedItem,
617
- filterData,
618
- getSelected,
619
- getCheckedList,
620
- selectedItem,
621
- addChecked,
622
- setClear,
623
- selectAll,
624
- removeOtherTags,
625
- onRemoveItems,
626
- updateOptions,
627
- removeState,
628
- };
629
-
630
- class KeyControl {
631
- constructor(keyCode, element, elementName, childElementName) {
632
- this.elementName = '';
633
- this.childElementName = '';
634
- this.keyCode = keyCode;
635
- this.element = element;
636
- this.elementName = elementName;
637
- this.childElementName = childElementName;
638
- }
639
- getKeyCode() {
640
- return this.keyCode;
641
- }
642
- getElementName() {
643
- return this.elementName;
644
- }
645
- getChildElementName() {
646
- return this.childElementName;
647
- }
648
- getFocusedElementName() {
649
- return this.getElementName() + '.focused';
650
- }
651
- getFocusedElement() {
652
- return this.element.querySelectorAll(this.getFocusedElementName())[0] || null;
653
- }
654
- getFirstElement() {
655
- return this.element.querySelectorAll(this.getElementName())[0] || null;
656
- }
657
- getNextElement() {
658
- var _a;
659
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.nextElementSibling) || this.getFirstElement();
660
- }
661
- getPreviousElement() {
662
- var _a;
663
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.previousElementSibling) || this.getFirstElement();
664
- }
665
- getChildElement() {
666
- var _a;
667
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.getChildElementName())[0]) || null;
668
- }
669
- getParentElement(element) {
670
- if (element && element) {
671
- const isRootElement = element && element.attributes['data-isroot'];
672
- if (isRootElement) {
673
- return element;
674
- }
675
- return this.getParentElement(element.parentNode);
676
- }
677
- }
678
- focusElementIsOpen() {
679
- var _a;
680
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.classList.contains('bcm-list__item--open')) || false;
681
- }
682
- isRootElement() {
683
- var _a;
684
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.getChildElementName()).length) > 0;
685
- }
686
- isRootElementIsOpen() {
687
- return this.getFocusedElement().classList.contains('bcm-list__item--open');
688
- }
689
- getFocusedChildElement() {
690
- var _a;
691
- return ((_a = this.getChildElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.focused')[0]) || null;
692
- }
693
- isLastElement() {
694
- var _a;
695
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.nextElementSibling) === null;
696
- }
697
- focusParentElementFirstChild() {
698
- var _a, _b;
699
- return this.setFocus((_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.firstChild);
700
- }
701
- isFirstElement() {
702
- var _a;
703
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.previousElementSibling) === null;
704
- }
705
- focusRootElement() {
706
- var _a, _b, _c;
707
- return this.setFocus((_c = (_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.firstChild);
708
- }
709
- nextRootElement() {
710
- var _a, _b, _c;
711
- return this.setFocus((_c = (_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.nextElementSibling);
712
- }
713
- findFocusElementParent() {
714
- return this.getFocusedElement().parentNode.querySelectorAll('.bcm-list__item--open');
715
- }
716
- getLastElement() {
717
- return this.element.querySelectorAll(this.getElementName())[this.element.querySelectorAll(this.getElementName()).length - 1] || null;
718
- }
719
- setFocus(element) {
720
- element.focus();
721
- }
722
- }
723
-
724
- class ListKeyControl extends KeyControl {
725
- constructor(keyCode, element, treeview, checkBoxes) {
726
- super(keyCode, element, '.bcm-list__item', '.bcm-list__item-childs');
727
- this.isTreeview = false;
728
- this.isCheckBoxes = false;
729
- this.isTreeview = treeview;
730
- this.isCheckBoxes = checkBoxes;
731
- }
732
- keyUpControl() {
733
- if (this.isTreeview) {
734
- this.keyUpTreeview();
735
- }
736
- else {
737
- if (this.isFirstElement()) {
738
- this.setFocus(this.getLastElement());
739
- }
740
- else {
741
- this.setFocus(this.getPreviousElement());
742
- }
743
- }
744
- }
745
- keyDownTreeView() {
746
- var _a;
747
- if (this.isTreeview) {
748
- if (this.isRootElement() && this.isRootElementIsOpen()) {
749
- const childs = this.getChildElement();
750
- if (childs) {
751
- this.setFocus(childs.firstChild);
752
- }
753
- }
754
- else {
755
- if (this.isLastElement() && this.getParentElement(this.getFocusedElement())) {
756
- this.setFocus((_a = this.getParentElement(this.getFocusedElement())) === null || _a === void 0 ? void 0 : _a.nextElementSibling);
757
- }
758
- else {
759
- this.setFocus(this.getNextElement());
760
- }
761
- }
762
- }
763
- }
764
- keyUpTreeview() {
765
- if (this.isFirstElement()) {
766
- const parent = this.getParentElement(this.getFocusedElement());
767
- this.setFocus(parent);
768
- }
769
- else {
770
- const previousElement = this.getPreviousElement();
771
- if (previousElement) {
772
- if (previousElement.classList.contains('bcm-list__item--open')) {
773
- const getChildElement = previousElement.querySelectorAll(this.getChildElementName())[0];
774
- console.log({ getChildElement });
775
- this.setFocus(getChildElement.lastChild);
776
- }
777
- else {
778
- this.setFocus(previousElement);
779
- }
780
- }
781
- }
782
- }
783
- keyDownControl() {
784
- if (this.isTreeview) {
785
- this.keyDownTreeView();
786
- }
787
- else {
788
- if (this.isLastElement()) {
789
- this.setFocus(this.getFirstElement());
790
- }
791
- else {
792
- this.setFocus(this.getNextElement());
793
- }
794
- }
795
- }
796
- keyRightControl() {
797
- if (this.isTreeview) {
798
- if (!this.isRootElementIsOpen() && this.isRootElement()) {
799
- const { id } = this.getFocusedElement();
800
- this.openGroup(id);
801
- }
802
- }
803
- }
804
- keyLeftControl() {
805
- if (this.isTreeview) {
806
- if (this.isRootElementIsOpen() && this.isRootElement()) {
807
- const { id } = this.getFocusedElement();
808
- this.openGroup(id);
809
- }
810
- }
811
- }
812
- keyEnterControl() { }
813
- keySpaceControl() {
814
- if (this.isCheckBoxes) {
815
- const { id } = this.getFocusedElement();
816
- this.checkedItem(id);
817
- }
818
- }
819
- keyDown() {
820
- switch (this.getKeyCode()) {
821
- case Bcm.KeyCode.up:
822
- this.keyUpControl();
823
- break;
824
- case Bcm.KeyCode.down:
825
- this.keyDownControl();
826
- break;
827
- case Bcm.KeyCode.left:
828
- this.keyLeftControl();
829
- break;
830
- case Bcm.KeyCode.right:
831
- this.keyRightControl();
832
- break;
833
- case Bcm.KeyCode.enter:
834
- this.keyEnterControl();
835
- break;
836
- case Bcm.KeyCode.space:
837
- this.keySpaceControl();
838
- break;
839
- }
840
- }
841
- keyUp() { }
842
- }
843
-
844
- const listCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{scroll-behavior:smooth;padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800;transition:visibility 0s linear 400ms, opacity 100ms, transform 200ms}.bcm-list__container.bcm-list__type-linked-component.bcm-list--top,.bcm-list__container.bcm-list__type-select.bcm-list--top,.bcm-list__container.bcm-list__type-autocomplete.bcm-list--top{transform:translateY(-10%)}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{opacity:1;transform:translateY(0);visibility:visible;transition:visibility 0s linear 0s, opacity 100ms, transform 100ms}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-50);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);user-select:none;cursor:not-allowed}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--readonly:focus>.bcm-list__item-content:not(.disabled),.bcm-list__item--readonly.focused>.bcm-list__item-content:not(.disabled){color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content{color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content:hover,.bcm-list__item--readonly>.bcm-list__item-content:focus{color:var(--bcm-color-grey-7)}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
845
-
846
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
847
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
848
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
849
- r = Reflect.decorate(decorators, target, key, desc);
850
- else
851
- for (var i = decorators.length - 1; i >= 0; i--)
852
- if (d = decorators[i])
853
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
854
- return c > 3 && r && Object.defineProperty(target, key, r), r;
855
- };
856
- const BcmList = class {
857
- constructor(hostRef) {
858
- registerInstance(this, hostRef);
859
- this.bcmChecklist = createEvent(this, "bcm-checklist", 7);
860
- this.bcmSelected = createEvent(this, "bcm-selected", 7);
861
- this.change = createEvent(this, "bcm-change", 7);
862
- this.open = createEvent(this, "bcm-open", 3);
863
- this.close = createEvent(this, "bcm-close", 3);
864
- this.listClose = createEvent(this, "bcm-list-close", 7);
865
- this.listOpen = createEvent(this, "bcm-list-open", 7);
866
- this.debounce = null;
867
- this.debounceHandler = Generate.debounceInput(() => this.listenResize(), 300, false);
868
- this._id = Generate.UID();
869
- this.tempId = Generate.UID();
870
- this.type = Bcm$1.ListType.listbox;
871
- this.treeview = false;
872
- this.checkboxes = false;
873
- this.searchable = false;
874
- this.value = null;
875
- this.inputText = undefined;
876
- this.name = undefined;
877
- this.label = undefined;
878
- this.size = Bcm$1.Size.medium;
879
- this.disabled = false;
880
- this.readonly = false;
881
- this.highlight = false;
882
- this.highlightText = undefined;
883
- this.required = false;
884
- this.hidden = false;
885
- this.fullWidth = false;
886
- this.height = "256px";
887
- this.maxHeight = "500px";
888
- this.minHeight = "150px";
889
- this.width = "256px";
890
- this.tooltip = undefined;
891
- this.infoFooter = false;
892
- this.variableText = "item";
893
- this.template = undefined;
894
- this.allOpen = false;
895
- this.keyControl = false;
896
- this.checkAll = true;
897
- this.stopDeepClean = false;
898
- this.openIntersecting = false;
899
- this.linkedComponent = undefined;
900
- this.isOpen = false;
901
- this.calculatedViewport = false;
902
- this.isSelectedOther = false;
903
- this.isHaveOtherTag = false;
904
- this.placeholder = "Choose an option";
905
- this.searchPlaceholder = "Search";
906
- this.searchIsOnlyChilds = false;
907
- this.minSearchLength = 2;
908
- this.clearable = false;
909
- this.caption = undefined;
910
- this.noCaption = false;
911
- this.captionType = Bcm$1.Status.default;
912
- this.captionError = undefined;
913
- this.emptyText = undefined;
914
- this.emptyIcon = "fad fa-folder-open";
915
- this.captionCache = undefined;
916
- this.captionTypeCache = undefined;
917
- this.tick = {};
918
- this.totalData = 0;
919
- this.totalRootData = 0;
920
- this.limit = 20;
921
- this.searchGetParents = undefined;
922
- this.searchResultLimit = 20;
923
- this.searchFound = null;
924
- this.returnFilterData = {};
925
- this.returnOtherData = {};
926
- this.options = {
927
- rootMargin: "30px",
928
- };
929
- this.tagContainerWidth = 0;
930
- this.selectAllItem = {
931
- id: "select-all",
932
- text: "Select All",
933
- value: "select-all",
934
- checked: false,
935
- disabled: false,
936
- icon: "",
937
- status: Bcm$1.Status.default,
938
- indeterminate: "uncheck",
939
- };
940
- this.placement = Bcm$1.Placement["bottom-start"];
941
- this.disableChangeEvent = false;
942
- this.data = [];
943
- window.addEventListener("scroll", this.handleWheel.bind(this), true);
944
- window.addEventListener("wheel", this.handleWheel.bind(this), true);
945
- window.addEventListener("resize", this.handleResize.bind(this), true);
946
- }
947
- connectedCallback() {
948
- if (this.height != "256px") {
949
- if (this.height.indexOf("px") > -1) {
950
- this.limit = Math.floor(+this.height.replace("px", "") / 10);
951
- }
952
- else {
953
- this.limit = Math.floor(+(window.innerHeight / 10));
954
- }
955
- this.searchResultLimit = this.limit;
956
- this.markForCheck();
957
- }
958
- const checkElementWithDom = document.querySelectorAll(`#bcm-list-${this._id}`);
959
- (checkElementWithDom === null || checkElementWithDom === void 0 ? void 0 : checkElementWithDom.length) > 1 && checkElementWithDom.forEach((item, index) => index > 0 && item.remove());
960
- }
961
- componentWillRender() {
962
- this.calculateLocation();
963
- }
964
- componentShouldUpdate(newVal, oldVal, propName) {
965
- if (Object.keys(this.getOptions()).indexOf(propName) > -1 && newVal !== oldVal) {
966
- this.updateOptions();
967
- }
968
- }
969
- get containerWidth() {
970
- var _a, _b;
971
- return (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width;
972
- }
973
- get tagCount() {
974
- return this.containerWidth > 0 ? Math.floor(+(this.containerWidth - 100) / 85) : 0;
975
- }
976
- get tagData() {
977
- return snq(() => {
978
- var _a;
979
- return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map(item => ({
980
- value: item.id,
981
- label: StringHelper.textLimitter(item.text, 7),
982
- text: item.tooltipMessage || item.tagTitle || item.text,
983
- }));
984
- }, []);
985
- }
986
- async componentDidLoad() {
987
- await this.initState();
988
- // if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
989
- // const list = this.el.querySelector(`#bcm-list-${this._id}`);
990
- // if (list) {
991
- // document.body.appendChild(list);
992
- // }
993
- // }
994
- }
995
- disconnectedCallback() {
996
- this.isOpen = false;
997
- if (this.stopDeepClean)
998
- return;
999
- listState.removeState(this._id);
1000
- this.el.innerHTML = "";
1001
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1002
- const list = document.querySelectorAll(`#bcm-list-${this._id}`);
1003
- if (list === null || list === void 0 ? void 0 : list.length) {
1004
- list.forEach(item => item.remove());
1005
- this.el.remove();
1006
- }
1007
- }
1008
- }
1009
- watchId(_, oldVal) {
1010
- // console.info('Changed component id:', oldVal + ' -> ' + newVal);
1011
- listState.removeState(oldVal);
1012
- this.initState();
1013
- }
1014
- handleValueChange(newVal, oldVal) {
1015
- var _a;
1016
- if (Generate.objectIsEmpty(this.returnFilterData)) {
1017
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1018
- }
1019
- if (this.checkboxes) {
1020
- if (!Validators.compareTwoArrayIsSame(newVal, oldVal)) {
1021
- this.bcmChecklist.emit(this.value);
1022
- !this.disableChangeEvent && this.change.emit(this.value);
1023
- }
1024
- }
1025
- else {
1026
- if ((newVal === null || newVal === void 0 ? void 0 : newVal.id) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.id)) {
1027
- !this.disableChangeEvent && this.change.emit(this.value);
1028
- }
1029
- }
1030
- }
1031
- watchReturnFilterData(newVal) {
1032
- var _a;
1033
- const { checkedItems, visibledItems } = newVal;
1034
- if (checkedItems && visibledItems) {
1035
- this.handleIndeterminate(checkedItems.length, visibledItems.length);
1036
- }
1037
- else {
1038
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1039
- }
1040
- }
1041
- async handleOpen() {
1042
- if (this.isOpen) {
1043
- this.detectClone();
1044
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1045
- const list = this.el.querySelector(`#bcm-list-${this._id}`);
1046
- if (list) {
1047
- const bcmOverlayContainer = document.querySelector("#bcm-overlay-container");
1048
- bcmOverlayContainer.appendChild(list);
1049
- }
1050
- }
1051
- this.open.emit();
1052
- this.calculateLocation();
1053
- this.onSelectSearch();
1054
- }
1055
- else {
1056
- this.listScrollToTop();
1057
- this.close.emit();
1058
- this.listClose.emit();
1059
- await delay(100);
1060
- this.unSelectOther();
1061
- }
1062
- }
1063
- listScrollToTop() {
1064
- const list = document.querySelector(`#bcm-list-${this._id}`);
1065
- if (list) {
1066
- list.querySelector(".scrolling").scrollTop = 0;
1067
- }
1068
- }
1069
- async dataChanged(newValue, oldValue) {
1070
- if (!Validators.compareTwoArrayIsSame(newValue, oldValue)) {
1071
- await this.initState();
1072
- }
1073
- }
1074
- isIntersecting(e) {
1075
- const target = e === null || e === void 0 ? void 0 : e.target;
1076
- if (target && target.id === this._id) {
1077
- this.listenResize();
1078
- }
1079
- }
1080
- handleSlotItems(e) {
1081
- var _a;
1082
- if (((_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1083
- this.data = e.detail;
1084
- }
1085
- }
1086
- handleChange(e) {
1087
- if (e.target.id == `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1088
- e.stopImmediatePropagation();
1089
- }
1090
- }
1091
- handleResize() {
1092
- this.calculateLocation();
1093
- this.debounceHandler();
1094
- }
1095
- handleWheel(event) {
1096
- if (this.isOpen) {
1097
- const list = document.querySelector(`#bcm-list-${this._id}`);
1098
- const isClickInside = list && Generate.findEventPath(event, list);
1099
- if (isClickInside) {
1100
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1101
- this.calculateLocation();
1102
- }
1103
- }
1104
- else {
1105
- this.hide();
1106
- }
1107
- }
1108
- }
1109
- clearAutocomplete() {
1110
- if (this.type == "autocomplete") {
1111
- const autocompleteInput = this.getAutoCompleteInput();
1112
- if (autocompleteInput) {
1113
- autocompleteInput.handleClear(false);
1114
- }
1115
- }
1116
- }
1117
- async handleSelectOtherTag(e) {
1118
- if (this.disabled)
1119
- return;
1120
- const { id, checked } = e.detail;
1121
- this.isSelectedOther = checked;
1122
- if (id) {
1123
- checked ? this.filterOtherList(id) : this.unSelectOther();
1124
- this.isOpen = true;
1125
- }
1126
- }
1127
- async handleDeleteTag(e) {
1128
- var _a;
1129
- if (this.disabled)
1130
- return;
1131
- const { id } = e.detail;
1132
- this.isSelectedOther && this.unSelectOther();
1133
- Array.isArray(id) ? listState.removeOtherTags(this._id, id) : listState.checkedItem(this._id, id);
1134
- this.value = (await this.getCheckedList()).checkedList;
1135
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1136
- }
1137
- async handleSelectTag(_) {
1138
- if (this.disabled)
1139
- return;
1140
- this.clearAutocomplete();
1141
- this.onSelectSearch();
1142
- this.unSelectOther();
1143
- }
1144
- handleClick(event) {
1145
- var _a;
1146
- if (this.disabled)
1147
- return;
1148
- const list = document.querySelector(`#bcm-list-${this._id}`);
1149
- const isClickInside = Generate.findEventPath(event, this.el) || (list && Generate.findEventPath(event, list));
1150
- if (isClickInside) {
1151
- if (this.debounce !== null) {
1152
- event.preventDefault();
1153
- event.stopPropagation();
1154
- clearTimeout(this.debounce);
1155
- this.debounce = null;
1156
- }
1157
- this.debounce = setTimeout(() => {
1158
- this.debounce = null;
1159
- }, 300);
1160
- }
1161
- if (!isClickInside) {
1162
- if (this.type == "autocomplete") {
1163
- const autocompleteInput = this.getAutoCompleteInput();
1164
- if (autocompleteInput) {
1165
- if (this.checkboxes) {
1166
- autocompleteInput.setValue("");
1167
- }
1168
- else {
1169
- autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
1170
- }
1171
- }
1172
- }
1173
- }
1174
- const clickToTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag"]);
1175
- const clickToOtherTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag bcm-tag--other"]);
1176
- const clickToSelect = Generate.findEventPathWithKey(event, "id", [`bcm-list-input-${this._id}`, `bcm-list-label-${this._id}`]);
1177
- const clickToTagDismiss = Generate.findEventPathWithKey(event, "className", ["right close-button"]);
1178
- if (clickToSelect && !clickToTagDismiss && this.type != "autocomplete") {
1179
- this.isOpen = clickToTag || clickToOtherTag ? true : !this.isOpen;
1180
- }
1181
- if (list) {
1182
- if (this.isOpen) {
1183
- if (!list.contains(event.target) && !this.el.contains(event.target)) {
1184
- this.isOpen = false;
1185
- // this.unSelectOther()
1186
- }
1187
- }
1188
- }
1189
- }
1190
- bcmOnSearchClear(event) {
1191
- var _a, _b;
1192
- if (this.type == "autocomplete") {
1193
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1194
- if (event.detail) {
1195
- this.setClear();
1196
- }
1197
- }
1198
- }
1199
- }
1200
- bcmOnSearch(event) {
1201
- var _a, _b, _c, _d, _e, _f;
1202
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1203
- this.searchGetParents = snq(() => { var _a; return (_a = event.detail) === null || _a === void 0 ? void 0 : _a.parentIndex; }, null);
1204
- this.searchResultLimit = 10;
1205
- this.searchFound = ((_c = event.detail) === null || _c === void 0 ? void 0 : _c.matching) != null ? (_d = event.detail) === null || _d === void 0 ? void 0 : _d.matching.length : null;
1206
- this.returnFilterData = listState.filterData(this._id, (_e = event.detail) === null || _e === void 0 ? void 0 : _e.nestedResult);
1207
- if (this.searchFound > 0 && this.highlight) {
1208
- this.highlightText = (_f = event.detail) === null || _f === void 0 ? void 0 : _f.value;
1209
- }
1210
- if (this.type == "autocomplete") {
1211
- this.isOpen = true;
1212
- }
1213
- if (!event.detail.result) {
1214
- if (this.type == "autocomplete") {
1215
- this.isOpen = false;
1216
- }
1217
- else {
1218
- this.returnFilterData = {};
1219
- listState.filterData(this._id, null);
1220
- }
1221
- // this.isSelectedOther = false
1222
- this.searchResultLimit = null;
1223
- this.highlightText = null;
1224
- }
1225
- this.markForCheck();
1226
- }
1227
- }
1228
- //keyboard navigation
1229
- handleKeyDown(ev) {
1230
- const keycode = ev.keyCode || ev.which;
1231
- if (keycode === Bcm$1.KeyCode.escape) {
1232
- if (this.isOpen) {
1233
- this.isOpen = false;
1234
- ev.preventDefault();
1235
- ev.stopPropagation();
1236
- ev.stopImmediatePropagation();
1237
- }
1238
- }
1239
- if (this.keyControl) {
1240
- const keyboard = new ListKeyControl(keycode, this.el, this.treeview, this.checkboxes);
1241
- keyboard.openGroup = openGroupId => {
1242
- this.openGroup(openGroupId);
1243
- };
1244
- keyboard.checkedItem = checkedItemId => {
1245
- this.checkedItem(checkedItemId);
1246
- };
1247
- keyboard.keyDown();
1248
- }
1249
- }
1250
- handleKeyUp(ev) {
1251
- if (this.keyControl) {
1252
- const focusedList = Generate.findEventPath(ev, this.el);
1253
- if (focusedList) {
1254
- const list = document.getElementById(`bcm-list-${this._id}`);
1255
- if (list) {
1256
- const items = list.querySelectorAll(".bcm-list__item.focused");
1257
- if (items.length > 0) {
1258
- const main = list.querySelector("main");
1259
- const itemHeight = items[0].offsetHeight;
1260
- const listHeight = main.offsetHeight;
1261
- const itemTop = items[0].offsetTop;
1262
- if (itemTop > listHeight) {
1263
- main.scrollTop = itemTop - listHeight / 2 + itemHeight / 2;
1264
- }
1265
- if (itemTop < listHeight) {
1266
- main.scrollTop = itemTop - listHeight / 2 - itemHeight / 2;
1267
- }
1268
- }
1269
- }
1270
- }
1271
- }
1272
- }
1273
- async set(data) {
1274
- if (data) {
1275
- if (Array.isArray(data)) {
1276
- this.addChecked(data);
1277
- }
1278
- if (typeof data === "string" || typeof data === "number") {
1279
- this.selectedItem(data);
1280
- }
1281
- }
1282
- else {
1283
- this.setClear();
1284
- }
1285
- }
1286
- async get() {
1287
- var _a, _b;
1288
- return this.value ? (this.checkboxes ? (_b = (_a = ((await this.getCheckedList()))) === null || _a === void 0 ? void 0 : _a.checkedList) === null || _b === void 0 ? void 0 : _b.map(item => item.id) : this.value.id) : null;
1289
- }
1290
- async getCheckedList() {
1291
- return Promise.resolve(listState.getCheckedList(this._id));
1292
- }
1293
- async getSelected() {
1294
- return Promise.resolve(listState.getSelected(this._id));
1295
- }
1296
- async getValue() {
1297
- return Promise.resolve(this.value);
1298
- }
1299
- async addChecked(ids = [], save = false, emit = true) {
1300
- if (ids && ids.length > 0) {
1301
- if (!save) {
1302
- listState.setClear(this._id);
1303
- await delay(10);
1304
- }
1305
- await listState.addChecked(this._id, ids);
1306
- await delay(10);
1307
- emit && (this.value = (await this.getCheckedList()).checkedList);
1308
- this.markForCheck();
1309
- }
1310
- return Promise.resolve(this.value);
1311
- }
1312
- async selected(id) {
1313
- if (id) {
1314
- return Promise.resolve(await this.selectedItem(id));
1315
- }
1316
- return false;
1317
- }
1318
- async setClear(e) {
1319
- listState.setClear(this._id);
1320
- this.value = null;
1321
- this.inputText = "";
1322
- this.isOpen = false;
1323
- this.selectAllItem.indeterminate = "uncheck";
1324
- this.markForCheck();
1325
- if (e) {
1326
- e.stopPropagation();
1327
- e.preventDefault();
1328
- }
1329
- await delay(10);
1330
- return Promise.resolve();
1331
- }
1332
- async resetCaption() {
1333
- await delay(10);
1334
- this.caption = this.captionCache;
1335
- this.captionType = this.captionTypeCache;
1336
- this.captionError = null;
1337
- await delay(10);
1338
- return Promise.resolve();
1339
- }
1340
- detectClone() {
1341
- const list = document.querySelectorAll(`#bcm-list-${this._id}`);
1342
- if (list.length > 0) {
1343
- list.forEach((item) => {
1344
- const tempid = item.getAttribute("temp-id");
1345
- if (tempid !== `bcm-list-${this.tempId}`) {
1346
- console.warn(`[bcm-list] - Detected duplicate temp-id="${tempid}"`);
1347
- item.remove();
1348
- }
1349
- });
1350
- }
1351
- }
1352
- async show() {
1353
- this.isOpen = true;
1354
- return Promise.resolve();
1355
- }
1356
- async hide() {
1357
- this.isOpen = false;
1358
- return Promise.resolve();
1359
- }
1360
- updateOptions() {
1361
- listState.updateOptions(this._id, this);
1362
- }
1363
- handleIndeterminate(checkeds, total) {
1364
- this.selectAllItem = Object.assign(Object.assign({}, this.selectAllItem), { indeterminate: this.checkboxes && checkeds > 0 ? (checkeds === total ? "check" : "indeterminate") : "uncheck", checked: this.checkboxes && checkeds > 0 ? (checkeds === total ? true : false) : false });
1365
- }
1366
- listenResize() {
1367
- this.calculateLocation();
1368
- this.markForCheck();
1369
- }
1370
- async unSelectOther() {
1371
- await this.onClearSearch();
1372
- this.isSelectedOther = false;
1373
- this.searchFound = null;
1374
- this.returnFilterData = {};
1375
- listState.filterData(this._id, null);
1376
- await delay(10);
1377
- return Promise.resolve();
1378
- }
1379
- async onClearSearch() {
1380
- const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
1381
- if (searchInput) {
1382
- await searchInput.handleClear();
1383
- }
1384
- return Promise.resolve();
1385
- }
1386
- async onSelectSearch() {
1387
- const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
1388
- if (searchInput) {
1389
- await delay(100);
1390
- searchInput.onBcmFocus();
1391
- searchInput.onBcmSelect();
1392
- }
1393
- }
1394
- async filterOtherList(ids) {
1395
- const checklist = (await this.getCheckedList()).nestedResult;
1396
- const filter = Generate.convertIdsToNestedData(ids, checklist);
1397
- this.returnFilterData = await listState.filterData(this._id, filter, null, true);
1398
- this.searchFound = (ids === null || ids === void 0 ? void 0 : ids.length) || 0;
1399
- this.limit = 500;
1400
- this.searchGetParents = null;
1401
- await delay(1000);
1402
- this.markForCheck();
1403
- }
1404
- async initState() {
1405
- var _a, _b, _c;
1406
- this.onClearSearch();
1407
- await listState.setValue({
1408
- id: this._id,
1409
- dataSource: this.data && snq(() => (typeof this.data == "string" ? JSON.parse(this.data) : this.data), []),
1410
- options: this,
1411
- });
1412
- const { totalRoots, totalItems } = listState.getValue(this._id);
1413
- this.totalData = totalItems;
1414
- this.totalRootData = totalRoots;
1415
- this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
1416
- if (!this.checkboxes) {
1417
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
1418
- }
1419
- // checkli olan subparentların indeterminate kontrolü için
1420
- if (this.checkboxes && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1421
- const checkedIDs = [];
1422
- this.value.forEach(item => {
1423
- if (!item.items || item.items.length === 0) {
1424
- checkedIDs.push(item.id);
1425
- }
1426
- });
1427
- await this.addChecked(checkedIDs, false, false);
1428
- }
1429
- await this.handleIndeterminate((_c = this.value) === null || _c === void 0 ? void 0 : _c.length, this.totalData);
1430
- await this.markForCheck();
1431
- }
1432
- async markForCheck() {
1433
- await delay(10);
1434
- this.tick = Generate.UID();
1435
- }
1436
- getOptions() {
1437
- return snq(() => listState.getValue(this._id).options, {});
1438
- }
1439
- getItems() {
1440
- if (this.isSelectedOther) {
1441
- return this.returnFilterData["checkedItems"];
1442
- }
1443
- return snq(() => listState.getData(this._id), []);
1444
- }
1445
- getLimitedItems(ids) {
1446
- return snq(() => listState.getDataPagination(this._id, this.searchResultLimit || this.limit, ids), []);
1447
- }
1448
- openGroup(parentId) {
1449
- listState.openGroup(this._id, parentId);
1450
- this.markForCheck();
1451
- }
1452
- focusItem(e) {
1453
- if (e.target.classList.contains("bcm-list__item")) {
1454
- const item = e.target;
1455
- const list = document.getElementById(`bcm-list-${this._id}`);
1456
- if (list) {
1457
- const items = list.querySelectorAll(".bcm-list__item");
1458
- if (items.length > 0) {
1459
- const selectedItem = list.querySelector(".bcm-list__item.focused");
1460
- if (selectedItem) {
1461
- selectedItem.classList.remove("focused");
1462
- }
1463
- item.classList.add("focused");
1464
- }
1465
- }
1466
- }
1467
- }
1468
- async selectedItem(itemId) {
1469
- var _a;
1470
- if (!this.checkboxes) {
1471
- this.value = listState.selectedItem(this._id, itemId) ? listState.selectedItem(this._id, itemId)[0] : null;
1472
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
1473
- this.isOpen = false;
1474
- this.markForCheck();
1475
- if (this.type == "autocomplete" && this.value) {
1476
- // await delay(100)
1477
- // this.resetCaption()
1478
- const autocompleteInput = this.getAutoCompleteInput();
1479
- if (autocompleteInput) {
1480
- setTimeout(() => {
1481
- var _a;
1482
- autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
1483
- this.isOpen = false;
1484
- }, 100);
1485
- }
1486
- }
1487
- }
1488
- return Promise.resolve(this.value);
1489
- }
1490
- async checkedItem(itemId) {
1491
- const isCheckSelectAll = itemId === "select-all";
1492
- if (!isCheckSelectAll) {
1493
- listState.checkedItem(this._id, itemId);
1494
- }
1495
- else {
1496
- listState.selectAll(this._id, !this.selectAllItem.checked);
1497
- }
1498
- this.value = (await this.getCheckedList()).checkedList;
1499
- this.changeVisibleCheckeds();
1500
- this.markForCheck();
1501
- }
1502
- changeVisibleCheckeds() {
1503
- const { visibledItems } = this.returnFilterData;
1504
- this.returnFilterData = {
1505
- visibledItems,
1506
- checkedItems: (visibledItems && visibledItems.filter(item => item.checked)) || [],
1507
- };
1508
- }
1509
- getAutoCompleteInput() {
1510
- return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`);
1511
- }
1512
- dataScrollEvent(event) {
1513
- let count = 0;
1514
- let io = new IntersectionObserver((data) => {
1515
- if (count === 0) {
1516
- count++;
1517
- if (data[0].isIntersecting) {
1518
- this.limit += 15;
1519
- this.searchResultLimit += 15;
1520
- io.disconnect();
1521
- io = null;
1522
- }
1523
- }
1524
- }, this.options);
1525
- io.observe(event.target.lastElementChild);
1526
- }
1527
- async calculateLocation() {
1528
- var _a, _b;
1529
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1530
- const list = document.getElementById(`bcm-list-${this._id}`);
1531
- // list && (list.style.height = '256px') //sebebi neydi ki!
1532
- var placement = this.placement;
1533
- const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
1534
- const targetElement = document.getElementById(targetElementId);
1535
- if (list && targetElement) {
1536
- getPlacement(list, targetElement, placement, (place) => (placement = place));
1537
- await delay(10);
1538
- let pos = setPosition(placement, targetElement);
1539
- let captionAreaHeight = 0;
1540
- let labelAreaHeight = 0;
1541
- if (this.linkedComponent) {
1542
- const linked = document.getElementById(this.linkedComponent);
1543
- if (linked) {
1544
- if (!linked["noCaption"]) {
1545
- const captionArea = ((_a = linked.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".bcm-caption-area")) || linked.querySelector(".bcm-caption-area");
1546
- if (captionArea) {
1547
- captionAreaHeight = captionArea.offsetHeight || captionArea.clientHeight;
1548
- }
1549
- }
1550
- const labelArea = ((_b = linked.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".bcm-label")) || linked.querySelector(".bcm-label");
1551
- if (labelArea) {
1552
- labelAreaHeight = labelArea.offsetHeight || labelArea.clientHeight;
1553
- }
1554
- }
1555
- }
1556
- if (this.fullWidth) {
1557
- list.style.width = targetElement.offsetWidth + "px";
1558
- }
1559
- else {
1560
- list.style.width = this.width || "auto";
1561
- }
1562
- if (this.height.indexOf("%") > -1) {
1563
- list.style.height = NumberHelper.toNumber(this.height) * 0.01 * window.innerHeight - pos[0] - 50 + "px";
1564
- }
1565
- else {
1566
- list.style.height = this.height;
1567
- }
1568
- list.style.minHeight = this.minHeight;
1569
- // const calculatedMaxHeight = window.innerHeight - pos[0] - 50;
1570
- const calculatedMaxHeight = placement.split("-")[0] == "top" ? window.innerHeight - (window.innerHeight - pos[0]) - 50 : window.innerHeight - pos[0] - 50;
1571
- if (this.maxHeight.indexOf("%") > -1) {
1572
- list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) * 0.01 * calculatedMaxHeight + "px";
1573
- }
1574
- else {
1575
- list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) < calculatedMaxHeight ? this.maxHeight : calculatedMaxHeight + "px";
1576
- }
1577
- getPlacement(list, targetElement, placement, (place) => (placement = place));
1578
- await delay(10);
1579
- pos = setPosition(placement, targetElement);
1580
- list.style.top = (placement.split("-")[0] == "top" ? pos[0] - list.offsetHeight + labelAreaHeight : pos[0] - captionAreaHeight) + "px";
1581
- // list.style.left = pos[1] + 'px';
1582
- list.style.left = placement.split("-")[1] == "end" ? pos[1] - list.offsetWidth + "px" : pos[1] + "px";
1583
- list.classList.toggle("bcm-list--top", placement.split("-")[0] == "top");
1584
- this.calculatedViewport = true;
1585
- }
1586
- }
1587
- }
1588
- handleTransitionEnd(e) {
1589
- const { isOpen, type } = this;
1590
- const propertName = e === null || e === void 0 ? void 0 : e.propertyName;
1591
- if (isOpen && type == "select" && propertName == "transform") {
1592
- this.listOpen.emit();
1593
- }
1594
- }
1595
- render() {
1596
- const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
1597
- const hostClasses = classnames("bcm-list", `bcm-list__size-${size}`, `bcm-list__${this.type}`, size === "large" ? "size-3" : "size-2", {
1598
- "error": this.captionType == Bcm$1.Status.error,
1599
- "full-width": fullWidth,
1600
- "bcm-list__linked": this.linkedComponent,
1601
- hidden,
1602
- readonly,
1603
- disabled,
1604
- });
1605
- const bcmListContainer = classnames("bcm-list__container", this.linkedComponent ? "bcm-list__type-linked-component" : `bcm-list__type-${this.type}`, {
1606
- "is-open": this.isOpen && this.calculatedViewport,
1607
- "error": this.captionType == Bcm$1.Status.error,
1608
- "full-width": fullWidth,
1609
- hidden,
1610
- readonly,
1611
- disabled,
1612
- });
1613
- const bcmListInput = classnames("bcm-list__input");
1614
- const openedType = this.type == "select" || this.type == "autocomplete" || this.linkedComponent;
1615
- return (h(Host, { class: hostClasses, tabindex: "0", style: {
1616
- "--width": fullWidth ? "100%" : this.width,
1617
- "--height": openedType ? "100%" : this.height,
1618
- "--max-height": openedType ? "inherit" : this.maxHeight,
1619
- "--min-height": openedType ? "inherit" : this.minHeight,
1620
- } }, h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h("div", null, h("bcm-label", { tooltip: this.tooltip, size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, h("span", { class: classnames("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (h("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), h("span", { class: classnames("bcm-list__input-buttons", {
1621
- disabled: disabled,
1622
- }) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (h("div", { id: `bcm-list-input-${this._id}`, class: classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), h(ListTemplate, { highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, tempId: this.tempId, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon, handleTransitionEnd: e => this.handleTransitionEnd(e) }), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
1623
- }
1624
- get el() { return getElement(this); }
1625
- static get watchers() { return {
1626
- "_id": ["watchId"],
1627
- "value": ["handleValueChange"],
1628
- "returnFilterData": ["watchReturnFilterData"],
1629
- "isOpen": ["handleOpen"],
1630
- "data": ["dataChanged"]
1631
- }; }
1632
- };
1633
- __decorate([
1634
- IsLoad()
1635
- ], BcmList.prototype, "el", void 0);
1636
- __decorate([
1637
- JsonParse("data", true)
1638
- ], BcmList.prototype, "dataChanged", null);
1639
- BcmList.style = listCss;
1640
-
1641
- function _extends() {
1642
- _extends = Object.assign ? Object.assign.bind() : function (target) {
1643
- for (var i = 1; i < arguments.length; i++) {
1644
- var source = arguments[i];
1645
- for (var key in source) {
1646
- if (Object.prototype.hasOwnProperty.call(source, key)) {
1647
- target[key] = source[key];
1648
- }
1649
- }
1650
- }
1651
- return target;
1652
- };
1653
- return _extends.apply(this, arguments);
1654
- }
1655
-
1656
- function _typeof(obj) {
1657
- "@babel/helpers - typeof";
1658
-
1659
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
1660
- return typeof obj;
1661
- } : function (obj) {
1662
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
1663
- }, _typeof(obj);
1664
- }
1665
-
1666
- function _toPrimitive(input, hint) {
1667
- if (_typeof(input) !== "object" || input === null) return input;
1668
- var prim = input[Symbol.toPrimitive];
1669
- if (prim !== undefined) {
1670
- var res = prim.call(input, hint || "default");
1671
- if (_typeof(res) !== "object") return res;
1672
- throw new TypeError("@@toPrimitive must return a primitive value.");
1673
- }
1674
- return (hint === "string" ? String : Number)(input);
1675
- }
1676
-
1677
- function _toPropertyKey(arg) {
1678
- var key = _toPrimitive(arg, "string");
1679
- return _typeof(key) === "symbol" ? key : String(key);
1680
- }
1681
-
1682
- function _defineProperty(obj, key, value) {
1683
- key = _toPropertyKey(key);
1684
- if (key in obj) {
1685
- Object.defineProperty(obj, key, {
1686
- value: value,
1687
- enumerable: true,
1688
- configurable: true,
1689
- writable: true
1690
- });
1691
- } else {
1692
- obj[key] = value;
1693
- }
1694
- return obj;
1695
- }
1696
-
1697
- function ownKeys(object, enumerableOnly) {
1698
- var keys = Object.keys(object);
1699
- if (Object.getOwnPropertySymbols) {
1700
- var symbols = Object.getOwnPropertySymbols(object);
1701
- enumerableOnly && (symbols = symbols.filter(function (sym) {
1702
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1703
- })), keys.push.apply(keys, symbols);
1704
- }
1705
- return keys;
1706
- }
1707
- function _objectSpread2(target) {
1708
- for (var i = 1; i < arguments.length; i++) {
1709
- var source = null != arguments[i] ? arguments[i] : {};
1710
- i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
1711
- _defineProperty(target, key, source[key]);
1712
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) {
1713
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1714
- });
1715
- }
1716
- return target;
1717
- }
1718
-
1719
- function _arrayWithHoles(arr) {
1720
- if (Array.isArray(arr)) return arr;
1721
- }
1722
-
1723
- function _iterableToArrayLimit(arr, i) {
1724
- var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
1725
- if (null != _i) {
1726
- var _s,
1727
- _e,
1728
- _x,
1729
- _r,
1730
- _arr = [],
1731
- _n = !0,
1732
- _d = !1;
1733
- try {
1734
- if (_x = (_i = _i.call(arr)).next, 0 === i) {
1735
- if (Object(_i) !== _i) return;
1736
- _n = !1;
1737
- } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
1738
- } catch (err) {
1739
- _d = !0, _e = err;
1740
- } finally {
1741
- try {
1742
- if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
1743
- } finally {
1744
- if (_d) throw _e;
1745
- }
1746
- }
1747
- return _arr;
1748
- }
1749
- }
1750
-
1751
- function _arrayLikeToArray(arr, len) {
1752
- if (len == null || len > arr.length) len = arr.length;
1753
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
1754
- return arr2;
1755
- }
1756
-
1757
- function _unsupportedIterableToArray(o, minLen) {
1758
- if (!o) return;
1759
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1760
- var n = Object.prototype.toString.call(o).slice(8, -1);
1761
- if (n === "Object" && o.constructor) n = o.constructor.name;
1762
- if (n === "Map" || n === "Set") return Array.from(o);
1763
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1764
- }
1765
-
1766
- function _nonIterableRest() {
1767
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1768
- }
1769
-
1770
- function _slicedToArray(arr, i) {
1771
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1772
- }
1773
-
1774
- function _objectWithoutPropertiesLoose(source, excluded) {
1775
- if (source == null) return {};
1776
- var target = {};
1777
- var sourceKeys = Object.keys(source);
1778
- var key, i;
1779
- for (i = 0; i < sourceKeys.length; i++) {
1780
- key = sourceKeys[i];
1781
- if (excluded.indexOf(key) >= 0) continue;
1782
- target[key] = source[key];
1783
- }
1784
- return target;
1785
- }
1786
-
1787
- function _objectWithoutProperties(source, excluded) {
1788
- if (source == null) return {};
1789
- var target = _objectWithoutPropertiesLoose(source, excluded);
1790
- var key, i;
1791
- if (Object.getOwnPropertySymbols) {
1792
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
1793
- for (i = 0; i < sourceSymbolKeys.length; i++) {
1794
- key = sourceSymbolKeys[i];
1795
- if (excluded.indexOf(key) >= 0) continue;
1796
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
1797
- target[key] = source[key];
1798
- }
1799
- }
1800
- return target;
1801
- }
1802
-
1803
- var _excluded$2 = ["prefixCls", "invalidate", "item", "renderItem", "responsive", "responsiveDisabled", "registerSize", "itemKey", "className", "style", "children", "display", "order", "component"];
1804
- // Use shared variable to save bundle size
1805
- var UNDEFINED = undefined;
1806
- function InternalItem(props, ref) {
1807
- var prefixCls = props.prefixCls,
1808
- invalidate = props.invalidate,
1809
- item = props.item,
1810
- renderItem = props.renderItem,
1811
- responsive = props.responsive,
1812
- responsiveDisabled = props.responsiveDisabled,
1813
- registerSize = props.registerSize,
1814
- itemKey = props.itemKey,
1815
- className = props.className,
1816
- style = props.style,
1817
- children = props.children,
1818
- display = props.display,
1819
- order = props.order,
1820
- _props$component = props.component,
1821
- Component = _props$component === void 0 ? 'div' : _props$component,
1822
- restProps = _objectWithoutProperties(props, _excluded$2);
1823
- var mergedHidden = responsive && !display;
1824
- // ================================ Effect ================================
1825
- function internalRegisterSize(width) {
1826
- registerSize(itemKey, width);
1827
- }
1828
- react.useEffect(function () {
1829
- return function () {
1830
- internalRegisterSize(null);
1831
- };
1832
- }, []);
1833
- // ================================ Render ================================
1834
- var childNode = renderItem && item !== UNDEFINED ? renderItem(item) : children;
1835
- var overflowStyle;
1836
- if (!invalidate) {
1837
- overflowStyle = {
1838
- opacity: mergedHidden ? 0 : 1,
1839
- height: mergedHidden ? 0 : UNDEFINED,
1840
- overflowY: mergedHidden ? 'hidden' : UNDEFINED,
1841
- order: responsive ? order : UNDEFINED,
1842
- pointerEvents: mergedHidden ? 'none' : UNDEFINED,
1843
- position: mergedHidden ? 'absolute' : UNDEFINED
1844
- };
1845
- }
1846
- var overflowProps = {};
1847
- if (mergedHidden) {
1848
- overflowProps['aria-hidden'] = true;
1849
- }
1850
- var itemNode = /*#__PURE__*/react.createElement(Component, _extends({
1851
- className: classnames(!invalidate && prefixCls, className),
1852
- style: _objectSpread2(_objectSpread2({}, overflowStyle), style)
1853
- }, overflowProps, restProps, {
1854
- ref: ref
1855
- }), childNode);
1856
- if (responsive) {
1857
- itemNode = /*#__PURE__*/react.createElement(RefResizeObserver, {
1858
- onResize: function onResize(_ref) {
1859
- var offsetWidth = _ref.offsetWidth;
1860
- internalRegisterSize(offsetWidth);
1861
- },
1862
- disabled: responsiveDisabled
1863
- }, itemNode);
1864
- }
1865
- return itemNode;
1866
- }
1867
- var Item = /*#__PURE__*/react.forwardRef(InternalItem);
1868
- Item.displayName = 'Item';
1869
-
1870
- function channelUpdate(callback) {
1871
- if (typeof MessageChannel === 'undefined') {
1872
- wrapperRaf(callback);
1873
- } else {
1874
- var channel = new MessageChannel();
1875
- channel.port1.onmessage = function () {
1876
- return callback();
1877
- };
1878
- channel.port2.postMessage(undefined);
1879
- }
1880
- }
1881
-
1882
- /**
1883
- * Batcher for record any `useEffectState` need update.
1884
- */
1885
- function useBatcher() {
1886
- // Updater Trigger
1887
- var updateFuncRef = react.useRef(null);
1888
- // Notify update
1889
- var notifyEffectUpdate = function notifyEffectUpdate(callback) {
1890
- if (!updateFuncRef.current) {
1891
- updateFuncRef.current = [];
1892
- channelUpdate(function () {
1893
- reactDom.unstable_batchedUpdates(function () {
1894
- updateFuncRef.current.forEach(function (fn) {
1895
- fn();
1896
- });
1897
- updateFuncRef.current = null;
1898
- });
1899
- });
1900
- }
1901
- updateFuncRef.current.push(callback);
1902
- };
1903
- return notifyEffectUpdate;
1904
- }
1905
- /**
1906
- * Trigger state update by `useLayoutEffect` to save perf.
1907
- */
1908
- function useEffectState(notifyEffectUpdate, defaultValue) {
1909
- // Value
1910
- var _React$useState = react.useState(defaultValue),
1911
- _React$useState2 = _slicedToArray(_React$useState, 2),
1912
- stateValue = _React$useState2[0],
1913
- setStateValue = _React$useState2[1];
1914
- // Set State
1915
- var setEffectVal = useEvent(function (nextValue) {
1916
- notifyEffectUpdate(function () {
1917
- setStateValue(nextValue);
1918
- });
1919
- });
1920
- return [stateValue, setEffectVal];
1921
- }
1922
-
1923
- var OverflowContext = /*#__PURE__*/react.createContext(null);
1924
-
1925
- var _excluded$1 = ["component"],
1926
- _excluded2 = ["className"],
1927
- _excluded3 = ["className"];
1928
- var InternalRawItem = function InternalRawItem(props, ref) {
1929
- var context = react.useContext(OverflowContext);
1930
- // Render directly when context not provided
1931
- if (!context) {
1932
- var _props$component = props.component,
1933
- Component = _props$component === void 0 ? 'div' : _props$component,
1934
- _restProps = _objectWithoutProperties(props, _excluded$1);
1935
- return /*#__PURE__*/react.createElement(Component, _extends({}, _restProps, {
1936
- ref: ref
1937
- }));
1938
- }
1939
- var contextClassName = context.className,
1940
- restContext = _objectWithoutProperties(context, _excluded2);
1941
- var className = props.className,
1942
- restProps = _objectWithoutProperties(props, _excluded3);
1943
- // Do not pass context to sub item to avoid multiple measure
1944
- return /*#__PURE__*/react.createElement(OverflowContext.Provider, {
1945
- value: null
1946
- }, /*#__PURE__*/react.createElement(Item, _extends({
1947
- ref: ref,
1948
- className: classnames(contextClassName, className)
1949
- }, restContext, restProps)));
1950
- };
1951
- var RawItem = /*#__PURE__*/react.forwardRef(InternalRawItem);
1952
- RawItem.displayName = 'RawItem';
1953
-
1954
- var _excluded = ["prefixCls", "data", "renderItem", "renderRawItem", "itemKey", "itemWidth", "ssr", "style", "className", "maxCount", "renderRest", "renderRawRest", "suffix", "component", "itemComponent", "onVisibleChange"];
1955
- var RESPONSIVE = 'responsive';
1956
- var INVALIDATE = 'invalidate';
1957
- function defaultRenderRest(omittedItems) {
1958
- return "+ ".concat(omittedItems.length, " ...");
1959
- }
1960
- function Overflow(props, ref) {
1961
- var _props$prefixCls = props.prefixCls,
1962
- prefixCls = _props$prefixCls === void 0 ? 'rc-overflow' : _props$prefixCls,
1963
- _props$data = props.data,
1964
- data = _props$data === void 0 ? [] : _props$data,
1965
- renderItem = props.renderItem,
1966
- renderRawItem = props.renderRawItem,
1967
- itemKey = props.itemKey,
1968
- _props$itemWidth = props.itemWidth,
1969
- itemWidth = _props$itemWidth === void 0 ? 10 : _props$itemWidth,
1970
- ssr = props.ssr,
1971
- style = props.style,
1972
- className = props.className,
1973
- maxCount = props.maxCount,
1974
- renderRest = props.renderRest,
1975
- renderRawRest = props.renderRawRest,
1976
- suffix = props.suffix,
1977
- _props$component = props.component,
1978
- Component = _props$component === void 0 ? 'div' : _props$component,
1979
- itemComponent = props.itemComponent,
1980
- onVisibleChange = props.onVisibleChange,
1981
- restProps = _objectWithoutProperties(props, _excluded);
1982
- var fullySSR = ssr === 'full';
1983
- var notifyEffectUpdate = useBatcher();
1984
- var _useEffectState = useEffectState(notifyEffectUpdate, null),
1985
- _useEffectState2 = _slicedToArray(_useEffectState, 2),
1986
- containerWidth = _useEffectState2[0],
1987
- setContainerWidth = _useEffectState2[1];
1988
- var mergedContainerWidth = containerWidth || 0;
1989
- var _useEffectState3 = useEffectState(notifyEffectUpdate, new Map()),
1990
- _useEffectState4 = _slicedToArray(_useEffectState3, 2),
1991
- itemWidths = _useEffectState4[0],
1992
- setItemWidths = _useEffectState4[1];
1993
- var _useEffectState5 = useEffectState(notifyEffectUpdate, 0),
1994
- _useEffectState6 = _slicedToArray(_useEffectState5, 2),
1995
- prevRestWidth = _useEffectState6[0],
1996
- setPrevRestWidth = _useEffectState6[1];
1997
- var _useEffectState7 = useEffectState(notifyEffectUpdate, 0),
1998
- _useEffectState8 = _slicedToArray(_useEffectState7, 2),
1999
- restWidth = _useEffectState8[0],
2000
- setRestWidth = _useEffectState8[1];
2001
- var _useEffectState9 = useEffectState(notifyEffectUpdate, 0),
2002
- _useEffectState10 = _slicedToArray(_useEffectState9, 2),
2003
- suffixWidth = _useEffectState10[0],
2004
- setSuffixWidth = _useEffectState10[1];
2005
- var _useState = react.useState(null),
2006
- _useState2 = _slicedToArray(_useState, 2),
2007
- suffixFixedStart = _useState2[0],
2008
- setSuffixFixedStart = _useState2[1];
2009
- var _useState3 = react.useState(null),
2010
- _useState4 = _slicedToArray(_useState3, 2),
2011
- displayCount = _useState4[0],
2012
- setDisplayCount = _useState4[1];
2013
- var mergedDisplayCount = react.useMemo(function () {
2014
- if (displayCount === null && fullySSR) {
2015
- return Number.MAX_SAFE_INTEGER;
2016
- }
2017
- return displayCount || 0;
2018
- }, [displayCount, containerWidth]);
2019
- var _useState5 = react.useState(false),
2020
- _useState6 = _slicedToArray(_useState5, 2),
2021
- restReady = _useState6[0],
2022
- setRestReady = _useState6[1];
2023
- var itemPrefixCls = "".concat(prefixCls, "-item");
2024
- // Always use the max width to avoid blink
2025
- var mergedRestWidth = Math.max(prevRestWidth, restWidth);
2026
- // ================================= Data =================================
2027
- var isResponsive = maxCount === RESPONSIVE;
2028
- var shouldResponsive = data.length && isResponsive;
2029
- var invalidate = maxCount === INVALIDATE;
2030
- /**
2031
- * When is `responsive`, we will always render rest node to get the real width of it for calculation
2032
- */
2033
- var showRest = shouldResponsive || typeof maxCount === 'number' && data.length > maxCount;
2034
- var mergedData = react.useMemo(function () {
2035
- var items = data;
2036
- if (shouldResponsive) {
2037
- if (containerWidth === null && fullySSR) {
2038
- items = data;
2039
- } else {
2040
- items = data.slice(0, Math.min(data.length, mergedContainerWidth / itemWidth));
2041
- }
2042
- } else if (typeof maxCount === 'number') {
2043
- items = data.slice(0, maxCount);
2044
- }
2045
- return items;
2046
- }, [data, itemWidth, containerWidth, maxCount, shouldResponsive]);
2047
- var omittedItems = react.useMemo(function () {
2048
- if (shouldResponsive) {
2049
- return data.slice(mergedDisplayCount + 1);
2050
- }
2051
- return data.slice(mergedData.length);
2052
- }, [data, mergedData, shouldResponsive, mergedDisplayCount]);
2053
- // ================================= Item =================================
2054
- var getKey = react.useCallback(function (item, index) {
2055
- var _ref;
2056
- if (typeof itemKey === 'function') {
2057
- return itemKey(item);
2058
- }
2059
- return (_ref = itemKey && (item === null || item === void 0 ? void 0 : item[itemKey])) !== null && _ref !== void 0 ? _ref : index;
2060
- }, [itemKey]);
2061
- var mergedRenderItem = react.useCallback(renderItem || function (item) {
2062
- return item;
2063
- }, [renderItem]);
2064
- function updateDisplayCount(count, suffixFixedStartVal, notReady) {
2065
- // React 18 will sync render even when the value is same in some case.
2066
- // We take `mergedData` as deps which may cause dead loop if it's dynamic generate.
2067
- // ref: https://github.com/ant-design/ant-design/issues/36559
2068
- if (displayCount === count && (suffixFixedStartVal === undefined || suffixFixedStartVal === suffixFixedStart)) {
2069
- return;
2070
- }
2071
- setDisplayCount(count);
2072
- if (!notReady) {
2073
- setRestReady(count < data.length - 1);
2074
- onVisibleChange === null || onVisibleChange === void 0 ? void 0 : onVisibleChange(count);
2075
- }
2076
- if (suffixFixedStartVal !== undefined) {
2077
- setSuffixFixedStart(suffixFixedStartVal);
2078
- }
2079
- }
2080
- // ================================= Size =================================
2081
- function onOverflowResize(_, element) {
2082
- setContainerWidth(element.clientWidth);
2083
- }
2084
- function registerSize(key, width) {
2085
- setItemWidths(function (origin) {
2086
- var clone = new Map(origin);
2087
- if (width === null) {
2088
- clone.delete(key);
2089
- } else {
2090
- clone.set(key, width);
2091
- }
2092
- return clone;
2093
- });
2094
- }
2095
- function registerOverflowSize(_, width) {
2096
- setRestWidth(width);
2097
- setPrevRestWidth(restWidth);
2098
- }
2099
- function registerSuffixSize(_, width) {
2100
- setSuffixWidth(width);
2101
- }
2102
- // ================================ Effect ================================
2103
- function getItemWidth(index) {
2104
- return itemWidths.get(getKey(mergedData[index], index));
2105
- }
2106
- useLayoutEffect(function () {
2107
- if (mergedContainerWidth && typeof mergedRestWidth === 'number' && mergedData) {
2108
- var totalWidth = suffixWidth;
2109
- var len = mergedData.length;
2110
- var lastIndex = len - 1;
2111
- // When data count change to 0, reset this since not loop will reach
2112
- if (!len) {
2113
- updateDisplayCount(0, null);
2114
- return;
2115
- }
2116
- for (var i = 0; i < len; i += 1) {
2117
- var currentItemWidth = getItemWidth(i);
2118
- // Fully will always render
2119
- if (fullySSR) {
2120
- currentItemWidth = currentItemWidth || 0;
2121
- }
2122
- // Break since data not ready
2123
- if (currentItemWidth === undefined) {
2124
- updateDisplayCount(i - 1, undefined, true);
2125
- break;
2126
- }
2127
- // Find best match
2128
- totalWidth += currentItemWidth;
2129
- if (
2130
- // Only one means `totalWidth` is the final width
2131
- lastIndex === 0 && totalWidth <= mergedContainerWidth ||
2132
- // Last two width will be the final width
2133
- i === lastIndex - 1 && totalWidth + getItemWidth(lastIndex) <= mergedContainerWidth) {
2134
- // Additional check if match the end
2135
- updateDisplayCount(lastIndex, null);
2136
- break;
2137
- } else if (totalWidth + mergedRestWidth > mergedContainerWidth) {
2138
- // Can not hold all the content to show rest
2139
- updateDisplayCount(i - 1, totalWidth - currentItemWidth - suffixWidth + restWidth);
2140
- break;
2141
- }
2142
- }
2143
- if (suffix && getItemWidth(0) + suffixWidth > mergedContainerWidth) {
2144
- setSuffixFixedStart(null);
2145
- }
2146
- }
2147
- }, [mergedContainerWidth, itemWidths, restWidth, suffixWidth, getKey, mergedData]);
2148
- // ================================ Render ================================
2149
- var displayRest = restReady && !!omittedItems.length;
2150
- var suffixStyle = {};
2151
- if (suffixFixedStart !== null && shouldResponsive) {
2152
- suffixStyle = {
2153
- position: 'absolute',
2154
- left: suffixFixedStart,
2155
- top: 0
2156
- };
2157
- }
2158
- var itemSharedProps = {
2159
- prefixCls: itemPrefixCls,
2160
- responsive: shouldResponsive,
2161
- component: itemComponent,
2162
- invalidate: invalidate
2163
- };
2164
- // >>>>> Choice render fun by `renderRawItem`
2165
- var internalRenderItemNode = renderRawItem ? function (item, index) {
2166
- var key = getKey(item, index);
2167
- return /*#__PURE__*/react.createElement(OverflowContext.Provider, {
2168
- key: key,
2169
- value: _objectSpread2(_objectSpread2({}, itemSharedProps), {}, {
2170
- order: index,
2171
- item: item,
2172
- itemKey: key,
2173
- registerSize: registerSize,
2174
- display: index <= mergedDisplayCount
2175
- })
2176
- }, renderRawItem(item, index));
2177
- } : function (item, index) {
2178
- var key = getKey(item, index);
2179
- return /*#__PURE__*/react.createElement(Item, _extends({}, itemSharedProps, {
2180
- order: index,
2181
- key: key,
2182
- item: item,
2183
- renderItem: mergedRenderItem,
2184
- itemKey: key,
2185
- registerSize: registerSize,
2186
- display: index <= mergedDisplayCount
2187
- }));
2188
- };
2189
- // >>>>> Rest node
2190
- var restNode;
2191
- var restContextProps = {
2192
- order: displayRest ? mergedDisplayCount : Number.MAX_SAFE_INTEGER,
2193
- className: "".concat(itemPrefixCls, "-rest"),
2194
- registerSize: registerOverflowSize,
2195
- display: displayRest
2196
- };
2197
- if (!renderRawRest) {
2198
- var mergedRenderRest = renderRest || defaultRenderRest;
2199
- restNode = /*#__PURE__*/react.createElement(Item, _extends({}, itemSharedProps, restContextProps), typeof mergedRenderRest === 'function' ? mergedRenderRest(omittedItems) : mergedRenderRest);
2200
- } else if (renderRawRest) {
2201
- restNode = /*#__PURE__*/react.createElement(OverflowContext.Provider, {
2202
- value: _objectSpread2(_objectSpread2({}, itemSharedProps), restContextProps)
2203
- }, renderRawRest(omittedItems));
2204
- }
2205
- var overflowNode = /*#__PURE__*/react.createElement(Component, _extends({
2206
- className: classnames(!invalidate && prefixCls, className),
2207
- style: style,
2208
- ref: ref
2209
- }, restProps), mergedData.map(internalRenderItemNode), showRest ? restNode : null, suffix && /*#__PURE__*/react.createElement(Item, _extends({}, itemSharedProps, {
2210
- responsive: isResponsive,
2211
- responsiveDisabled: !shouldResponsive,
2212
- order: mergedDisplayCount,
2213
- className: "".concat(itemPrefixCls, "-suffix"),
2214
- registerSize: registerSuffixSize,
2215
- display: true,
2216
- style: suffixStyle
2217
- }), suffix));
2218
- if (isResponsive) {
2219
- overflowNode = /*#__PURE__*/react.createElement(RefResizeObserver, {
2220
- onResize: onOverflowResize,
2221
- disabled: !shouldResponsive
2222
- }, overflowNode);
2223
- }
2224
- return overflowNode;
2225
- }
2226
- var ForwardOverflow = /*#__PURE__*/react.forwardRef(Overflow);
2227
- ForwardOverflow.displayName = 'Overflow';
2228
- ForwardOverflow.Item = RawItem;
2229
- ForwardOverflow.RESPONSIVE = RESPONSIVE;
2230
- ForwardOverflow.INVALIDATE = INVALIDATE;
2231
-
2232
- const rcOverflowCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.rc-overflow{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%}.rc-overflow-item{transition:all 0.3s ease;padding:0 2px;display:flex;align-items:center;justify-content:center}";
2233
-
2234
- const BcmRcOverflow = class {
2235
- constructor(hostRef) {
2236
- registerInstance(this, hostRef);
2237
- this.selectOtherTag = createEvent(this, "bcm-select-other-tag", 7);
2238
- this.selectTag = createEvent(this, "bcm-select-tag", 7);
2239
- this.deleteTag = createEvent(this, "bcm-delete-tag", 7);
2240
- this.renderItem = item => {
2241
- return react.createElement("bcm-tooltip", {
2242
- placement: "bottom",
2243
- message: item.text,
2244
- trigger: "hover",
2245
- }, react.createElement("div", {
2246
- id: item.value + "-tag",
2247
- className: "bcm-tag",
2248
- onClick: ({ target }) => this.onClickControl(target, item, false),
2249
- }, react.createElement("span", { className: "bcm-tag__content dismissable" },
2250
- // .bcm-tag__content span {
2251
- // display: block;
2252
- // max-width: 38px;
2253
- // white-space: nowrap;
2254
- // overflow: hidden;
2255
- // text-overflow: ellipsis;
2256
- react.createElement("div", { className: "value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap" }, item.text), react.createElement("span", {
2257
- className: "right close-button",
2258
- }, react.createElement("bcm-icon", {
2259
- icon: "fa fa-times",
2260
- })))));
2261
- };
2262
- this.renderRest = items => {
2263
- const titles = (items === null || items === void 0 ? void 0 : items.sort((a, b) => +a.ct - +b.ct).slice(0, 15).map(item => StringHelper.textLimitter(item.text, 40, true)).toString().split(",").join("\r\n")) + (items.length > 15 ? "\r\n..." : "");
2264
- return react.createElement("bcm-tooltip", {
2265
- placement: "bottom",
2266
- message: titles,
2267
- trigger: "hover",
2268
- }, react.createElement("div", {
2269
- className: "bcm-tag bcm-tag--other",
2270
- onClick: ({ target }) => this.onClickControl(target, items, true),
2271
- }, react.createElement("span", { className: `bcm-tag__content dismissable ${this.checked ? "checkable checked" : ""}` }, react.createElement("span", { className: "value" }, `+${items === null || items === void 0 ? void 0 : items.length}`), react.createElement("span", { className: "right close-button" }, react.createElement("bcm-icon", {
2272
- icon: "fa fa-times",
2273
- })))));
2274
- };
2275
- this._id = Generate.UID();
2276
- this.maxCount = 1;
2277
- this.data = [];
2278
- this.checked = false;
2279
- }
2280
- isClickDismiss(e) {
2281
- return e["s-hn"] === "BCM-ICON";
2282
- }
2283
- onClickControl(e, item, isOtherTag = false) {
2284
- const isClickClose = this.isClickDismiss(e);
2285
- isClickClose && this.deleteTag.emit({ id: Array.isArray(item) ? item.map(i => i.value) : item.value }) && this.checked && (this.checked = false);
2286
- !isOtherTag && this.selectTag.emit({ id: item.value }) && this.checked && (this.checked = false);
2287
- if (isOtherTag && !isClickClose) {
2288
- this.checked = !this.checked;
2289
- this.selectOtherTag.emit({ id: item === null || item === void 0 ? void 0 : item.map(i => i.value), checked: this.checked });
2290
- }
2291
- }
2292
- componentWillRender() {
2293
- const { data, renderItem, renderRest, maxCount } = this;
2294
- this.overflowInstance = react.createElement(ForwardOverflow, {
2295
- data,
2296
- renderItem,
2297
- renderRest,
2298
- maxCount,
2299
- });
2300
- reactDom.render(this.overflowInstance, this.el);
2301
- }
2302
- get el() { return getElement(this); }
2303
- };
2304
- BcmRcOverflow.style = rcOverflowCss;
2305
-
2306
- const { state } = createStore({
2307
- value: new Map(),
2308
- });
2309
- const setValue = val => {
2310
- const { id, dataSource } = val;
2311
- const data = {
2312
- id: snq(() => id, Generate.UID),
2313
- dataSource: dataSource && dataSource.length > 0 && recursive(dataSource),
2314
- searchIsOnlyChilds: val.searchIsOnlyChilds,
2315
- };
2316
- state.value.set(data.id, data);
2317
- };
2318
- const recursive = (data, parentId) => {
2319
- let recData = [];
2320
- if (data) {
2321
- recData = data.map(item => (Object.assign(Object.assign(Object.assign({}, item), { parentId: snq(() => parentId, null) }), (item.items && item.items.length > 0 && { items: snq(() => recursive(item.items, item.id), []) }))));
2322
- }
2323
- return recData;
2324
- };
2325
- const removeValue = _id => {
2326
- state.value.delete(_id);
2327
- };
2328
- const getValue = id => snq(() => state.value.get(id), {});
2329
- const getDataPagination = (id, limit = 3) => {
2330
- let data = [];
2331
- const value = getValue(id);
2332
- if (value) {
2333
- const { dataSource } = value;
2334
- data = dataSource.slice(0, limit);
2335
- }
2336
- return data;
2337
- };
2338
- // //search treeview data by text
2339
- // const searchData = (id, search, items?) => {
2340
- // let dataSource
2341
- // if (items && items.length > 0) {
2342
- // dataSource = items
2343
- // } else {
2344
- // const value = getValue(id);
2345
- // dataSource = value.dataSource;
2346
- // }
2347
- // let result = []
2348
- // if (dataSource) {
2349
- // dataSource.forEach(child => {
2350
- // if (child.text.toLowerCase().includes(search.toLowerCase())) {
2351
- // result.push(child)
2352
- // }
2353
- // result = result.concat(searchData(id, search, child.items))
2354
- // })
2355
- // };
2356
- // return result
2357
- // };
2358
- //nested search
2359
- const searchData = (id, searchText, items) => {
2360
- let dataSource;
2361
- if (items && items.length > 0) {
2362
- dataSource = items;
2363
- }
2364
- else {
2365
- const value = getValue(id);
2366
- dataSource = value.dataSource;
2367
- }
2368
- let results = [];
2369
- if (dataSource) {
2370
- results.push(nestedSearch(id, dataSource, searchText));
2371
- //return with their parents
2372
- // dataSource.forEach(child => {
2373
- // if (child.text.toLowerCase().includes(searchText.toLowerCase())) {
2374
- // results.push(child)
2375
- // } else if (child.items && child.items.length > 0) {
2376
- // child.items = nestedSearch(child.items, searchText)
2377
- // if (child.items.length > 0) {
2378
- // results.push(child)
2379
- // }
2380
- // }
2381
- // })
2382
- }
2383
- return {
2384
- result: snq(() => Generate.flatArray(results[0].result), []),
2385
- matching: snq(() => results[0].matching, []),
2386
- parentIndex: snq(() => results[0].parentIndex, []),
2387
- nestedResult: snq(() => results[0].nestedResult, []),
2388
- };
2389
- };
2390
- const nestedSearch = (id, items, searchText) => {
2391
- let matching = [];
2392
- let parentIndex = [];
2393
- let result = [];
2394
- let nestedResult = [];
2395
- const { searchIsOnlyChilds } = getValue(id);
2396
- if (items && items.length > 0) {
2397
- items.forEach(child => {
2398
- let isChild = searchIsOnlyChilds && child.parentId !== null;
2399
- let isMatching = (child.text && StringHelper.slugify(child.text).includes(StringHelper.slugify(searchText))) ||
2400
- (child.keywords && StringHelper.slugify(child.keywords).includes(StringHelper.slugify(searchText)));
2401
- if (isMatching && (!searchIsOnlyChilds || (searchIsOnlyChilds && isChild))) {
2402
- result.push(child.id);
2403
- matching.push(child.id);
2404
- parentIndex.push(child.id);
2405
- nestedResult.push({ id: child.id, text: child.text, parentId: child.parentId });
2406
- if (child.items && child.items.length > 0) {
2407
- const found = nestedSearch(id, child.items, searchText);
2408
- if (found.matching.length > 0) {
2409
- found.matching.forEach(chi => {
2410
- matching.push(chi);
2411
- });
2412
- }
2413
- }
2414
- }
2415
- else if (child.items && child.items.length > 0) {
2416
- const found = nestedSearch(id, child.items, searchText);
2417
- if (found.result.length > 0) {
2418
- found.result.forEach(chi => {
2419
- result.push(chi);
2420
- });
2421
- result.push(child.id);
2422
- parentIndex.push(child.id);
2423
- nestedResult.push({ id: child.id, text: child.text, parentId: child.parentId, items: found.nestedResult });
2424
- }
2425
- if (found.matching.length > 0) {
2426
- matching.push(...found.matching);
2427
- }
2428
- }
2429
- });
2430
- }
2431
- return { result, matching, parentIndex, nestedResult };
2432
- };
2433
- const searchState = {
2434
- setValue,
2435
- removeValue,
2436
- getValue,
2437
- getDataPagination,
2438
- searchData,
2439
- };
2440
-
2441
- const searchCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:\"Inter\", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:\"Inter\", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}";
2442
-
2443
- const BcmSearch = class {
2444
- constructor(hostRef) {
2445
- registerInstance(this, hostRef);
2446
- this.bcmOnSearch = createEvent(this, "bcm-on-search", 7);
2447
- this.bcmOnSearchClear = createEvent(this, "bcm-on-search-clear", 7);
2448
- this.debounceHandler = Generate.debounceInput((event) => this.onSearchValue(event, this), 300, false, () => {
2449
- var _a, _b;
2450
- this.isActiveClearable = ((_b = (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.value) === null || _b === void 0 ? void 0 : _b.length) > 0 && this.clearable;
2451
- });
2452
- this._id = Generate.UID();
2453
- this.placeholder = "Search";
2454
- this.disabled = false;
2455
- this.readonly = false;
2456
- this.clearable = true;
2457
- this.size = Bcm.Size.medium;
2458
- this.limit = 10;
2459
- this.searchIsOnlyChilds = false;
2460
- this.minSearchLength = 2;
2461
- this.data = [];
2462
- this.tick = {};
2463
- this.isActiveClearable = false;
2464
- }
2465
- async componentDidLoad() {
2466
- await this.initState();
2467
- }
2468
- async dataChanged(newValue, oldValue) {
2469
- // console.log('data changed', newValue, oldValue)
2470
- if (newValue !== oldValue) {
2471
- await this.initState();
2472
- }
2473
- }
2474
- async initState() {
2475
- await searchState.setValue({
2476
- id: this._id + "-input",
2477
- dataSource: this.data,
2478
- searchIsOnlyChilds: this.searchIsOnlyChilds,
2479
- });
2480
- await this.markForCheck();
2481
- }
2482
- markForCheck() {
2483
- this.tick = Generate.UID();
2484
- }
2485
- handleInput() {
2486
- // console.log("aheyya")
2487
- }
2488
- async onBcmFocus() {
2489
- this.inputElement.focus();
2490
- }
2491
- async onBcmBlur() {
2492
- this.inputElement.blur();
2493
- }
2494
- async onBcmSelect() {
2495
- this.inputElement.select();
2496
- }
2497
- async setValue(newValue) {
2498
- this.inputElement.value = newValue;
2499
- }
2500
- handleFocus() { }
2501
- handleBlur() { }
2502
- handleChange() { }
2503
- async handleClear(eventEmit = true) {
2504
- this.inputElement.value = '';
2505
- const { value, id } = this.inputElement;
2506
- searchState.searchData(id, value);
2507
- this.isActiveClearable = false;
2508
- this.bcmOnSearch.emit({ result: null, value: null, matching: null, parentIndex: null });
2509
- this.bcmOnSearchClear.emit(eventEmit);
2510
- await delay(10);
2511
- return Promise.resolve();
2512
- }
2513
- onSearchValue(event, instance) {
2514
- const { value, id } = event.target;
2515
- const searchResult = (value === null || value === void 0 ? void 0 : value.length) >= this.minSearchLength ? searchState.searchData(id, value, null) : null;
2516
- const { bcmOnSearch, inputElement } = instance;
2517
- bcmOnSearch.emit({ result: searchResult === null || searchResult === void 0 ? void 0 : searchResult.result, value: inputElement === null || inputElement === void 0 ? void 0 : inputElement.value, matching: searchResult === null || searchResult === void 0 ? void 0 : searchResult.matching, parentIndex: searchResult === null || searchResult === void 0 ? void 0 : searchResult.parentIndex, nestedResult: searchResult === null || searchResult === void 0 ? void 0 : searchResult.nestedResult });
2518
- }
2519
- render() {
2520
- const { _id, placeholder, disabled, readonly } = this;
2521
- return h(Host, { onClick: () => { this.onBcmFocus(); this.onBcmSelect(); } }, h(InputTemplate, { size: this.size, id: _id, type: "search", placeholder: placeholder, disabled: disabled, "full-width": true, readonly: readonly, clearable: this.isActiveClearable, handleFocus: () => this.handleFocus(), handleBlur: () => this.handleBlur(), handleChange: () => this.handleChange(), handleClear: () => this.handleClear(), handleInput: this.debounceHandler, ref: (el) => this.inputElement = el }));
2522
- }
2523
- get el() { return getElement(this); }
2524
- static get watchers() { return {
2525
- "data": ["dataChanged"]
2526
- }; }
2527
- };
2528
- BcmSearch.style = searchCss;
2529
-
2530
- export { BcmList as bcm_list, BcmRcOverflow as bcm_rc_overflow, BcmSearch as bcm_search };