bromcom-ui 2.7.37-rc.0 → 2.7.37-rc.2

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 (704) 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-0e480b7b.entry.js → p-02892da0.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-802362ce.entry.js → p-043f3a0d.entry.js} +1 -1
  5. package/dist/bromcom-ui/p-053962ad.entry.js +5 -0
  6. package/dist/bromcom-ui/{p-28e5998b.entry.js → p-0aec8d73.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-1a12fbd0.entry.js → p-0cd7e628.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-0ba73c30.js → p-10caf4ce.js} +1 -1
  9. package/dist/bromcom-ui/{p-384aea58.entry.js → p-13ed55a9.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-b79132b8.entry.js → p-1507f99a.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-83317635.entry.js → p-151d7bec.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-b83dab76.entry.js → p-1a7873c8.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-1dab0ebb.entry.js +5 -0
  14. package/dist/bromcom-ui/{p-4a6777c5.entry.js → p-27d06f30.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-d61b862f.entry.js → p-2806e672.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-6fe3bfd9.entry.js → p-2b332236.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-e4c6d517.entry.js → p-2b346de3.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-2b479251.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-a0a34ab8.entry.js → p-2b7cb17c.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-8631b9b1.entry.js → p-2b91dab0.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-2cca68b4.js +5 -0
  22. package/dist/bromcom-ui/p-2cfa8d1a.js +5 -0
  23. package/dist/bromcom-ui/{p-f164100f.entry.js → p-3455ec3e.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-20fc8571.entry.js → p-34b815f5.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-ad780428.entry.js → p-355e259c.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-154c6135.entry.js → p-35bd1307.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-867ae7b5.entry.js → p-405441b2.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-40aeceda.entry.js +5 -0
  29. package/dist/bromcom-ui/{p-1fed2eec.entry.js → p-41f2ef93.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-444235f5.js +5 -0
  31. package/dist/bromcom-ui/{p-128a5956.js → p-4be4c5bf.js} +1 -1
  32. package/dist/bromcom-ui/p-4c75beb3.entry.js +5 -0
  33. package/dist/bromcom-ui/p-4e0c990d.js +5 -0
  34. package/dist/bromcom-ui/{p-e204cc98.js → p-4f99361a.js} +1 -1
  35. package/dist/bromcom-ui/{p-567d720b.entry.js → p-50c7a3cd.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-522c96a2.js +5 -0
  37. package/dist/bromcom-ui/{p-77206708.entry.js → p-573647ab.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-7fad995d.entry.js → p-591b3100.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-7d45b5b1.entry.js → p-60cee147.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-c7b9b694.entry.js → p-640244fa.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-6ad01d01.entry.js +5 -0
  42. package/dist/bromcom-ui/{p-173ebc98.entry.js → p-6c7eb43f.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-5d5c3b9d.entry.js → p-6caa9460.entry.js} +1 -1
  44. package/dist/bromcom-ui/p-705d248e.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-9ecacdbb.entry.js → p-751c94dd.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-5c86edbe.entry.js → p-75a92b4c.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-75f864ae.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-e6877526.entry.js → p-78d48636.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-1c525c05.entry.js → p-7f065a45.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-2a3a7d9c.entry.js → p-8255f60a.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-44b40c51.entry.js → p-8595742c.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-53a811a5.js → p-8b72bce1.js} +1 -1
  53. package/dist/bromcom-ui/{p-8ede9b12.js → p-93010f03.js} +1 -1
  54. package/dist/bromcom-ui/{p-a876e0ac.entry.js → p-9a78235b.entry.js} +1 -1
  55. package/dist/bromcom-ui/p-9efe118a.entry.js +5 -0
  56. package/dist/bromcom-ui/p-a1c849e7.js +5 -0
  57. package/dist/bromcom-ui/p-a63ba9a2.entry.js +5 -0
  58. package/dist/bromcom-ui/{p-60a735c3.entry.js → p-a8073fed.entry.js} +1 -1
  59. package/dist/bromcom-ui/{p-21263f24.entry.js → p-a98aecdf.entry.js} +1 -1
  60. package/dist/bromcom-ui/p-af93c8e6.entry.js +5 -0
  61. package/dist/bromcom-ui/p-b265dd24.entry.js +5 -0
  62. package/dist/bromcom-ui/{p-45903f79.entry.js → p-b2bae44d.entry.js} +1 -1
  63. package/dist/bromcom-ui/{p-0843de18.entry.js → p-b2ea4774.entry.js} +1 -1
  64. package/dist/bromcom-ui/{p-04b3a72c.entry.js → p-b3a57653.entry.js} +1 -1
  65. package/dist/bromcom-ui/p-b47e5352.entry.js +5 -0
  66. package/dist/bromcom-ui/{p-dbc48ab6.entry.js → p-b4cbf3bd.entry.js} +1 -1
  67. package/dist/bromcom-ui/{p-e3306b8d.entry.js → p-b9983e4b.entry.js} +1 -1
  68. package/dist/bromcom-ui/{p-6c040eb8.js → p-bc868e9e.js} +1 -1
  69. package/dist/bromcom-ui/{p-12c97616.entry.js → p-bf30bf7f.entry.js} +1 -1
  70. package/dist/bromcom-ui/{p-b1f8a594.entry.js → p-c9a20860.entry.js} +1 -1
  71. package/dist/bromcom-ui/{p-20e22beb.js → p-cd0490e2.js} +1 -1
  72. package/dist/bromcom-ui/{p-fa3d2e70.entry.js → p-d87118f3.entry.js} +1 -1
  73. package/dist/bromcom-ui/p-d8f95e30.entry.js +5 -0
  74. package/dist/bromcom-ui/{p-ebadb877.entry.js → p-d9fb53c9.entry.js} +1 -1
  75. package/dist/bromcom-ui/{p-c627dc35.entry.js → p-db11376b.entry.js} +1 -1
  76. package/dist/bromcom-ui/p-dbb106a4.entry.js +5 -0
  77. package/dist/bromcom-ui/{p-ac7386a1.entry.js → p-e467d49f.entry.js} +1 -1
  78. package/dist/bromcom-ui/{p-a032169e.entry.js → p-ea4f2618.entry.js} +1 -1
  79. package/dist/bromcom-ui/{p-c0dd4386.entry.js → p-ef923122.entry.js} +1 -1
  80. package/dist/bromcom-ui/{p-5aee47f0.entry.js → p-f1b1bb76.entry.js} +1 -1
  81. package/dist/bromcom-ui/p-f2caf9d3.entry.js +5 -0
  82. package/dist/bromcom-ui/{p-d700ef1c.entry.js → p-f374395b.entry.js} +1 -1
  83. package/dist/bromcom-ui/{p-be904c55.js → p-f9cb7ae4.js} +1 -1
  84. package/dist/bromcom-ui/{p-1b5695a9.entry.js → p-fa42b2de.entry.js} +1 -1
  85. package/dist/bromcom-ui/p-fcaba9dd.entry.js +5 -0
  86. package/dist/bromcom-ui/p-fe3e3210.js +5 -0
  87. package/dist/cjs/_commonjsHelpers-bd20f4c0.js +29 -0
  88. package/dist/cjs/bcm-2c51bf0c.js +448 -0
  89. package/dist/cjs/bcm-accordion.cjs.entry.js +85 -0
  90. package/dist/cjs/bcm-alert.cjs.entry.js +112 -0
  91. package/dist/cjs/bcm-attendance.cjs.entry.js +50 -0
  92. package/dist/cjs/bcm-autocomplete.cjs.entry.js +155 -0
  93. package/dist/cjs/bcm-avatar_2.cjs.entry.js +156 -0
  94. package/dist/cjs/bcm-box.cjs.entry.js +35 -0
  95. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +67 -0
  96. package/dist/cjs/bcm-button-group.cjs.entry.js +102 -0
  97. package/dist/cjs/bcm-button_4.cjs.entry.js +995 -0
  98. package/dist/cjs/bcm-card.cjs.entry.js +76 -0
  99. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +409 -0
  100. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2570 -0
  101. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +203 -0
  102. package/dist/cjs/bcm-chip.cjs.entry.js +70 -0
  103. package/dist/cjs/bcm-collapse-group.cjs.entry.js +57 -0
  104. package/dist/cjs/bcm-collapse.cjs.entry.js +58 -0
  105. package/dist/cjs/bcm-colorpicker.cjs.entry.js +433 -0
  106. package/dist/cjs/bcm-date-picker.cjs.entry.js +171 -0
  107. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +1432 -0
  108. package/dist/cjs/bcm-default.cjs.entry.js +40 -0
  109. package/dist/cjs/bcm-drawer.cjs.entry.js +111 -0
  110. package/dist/cjs/bcm-dropdown.cjs.entry.js +239 -0
  111. package/dist/cjs/bcm-error-layout.cjs.entry.js +78 -0
  112. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +127 -0
  113. package/dist/cjs/bcm-form-2.cjs.entry.js +206 -0
  114. package/dist/cjs/bcm-form-group.cjs.entry.js +45 -0
  115. package/dist/cjs/bcm-input.cjs.entry.js +325 -0
  116. package/dist/cjs/bcm-item.cjs.entry.js +83 -0
  117. package/dist/cjs/bcm-items.cjs.entry.js +61 -0
  118. package/dist/cjs/bcm-label_2.cjs.entry.js +119 -0
  119. package/dist/cjs/bcm-link.cjs.entry.js +62 -0
  120. package/dist/cjs/bcm-linked.cjs.entry.js +179 -0
  121. package/dist/cjs/bcm-list.cjs.entry.js +1768 -0
  122. package/dist/cjs/bcm-menu.cjs.entry.js +248 -0
  123. package/dist/cjs/bcm-message.cjs.entry.js +99 -0
  124. package/dist/cjs/bcm-notification.cjs.entry.js +103 -0
  125. package/dist/cjs/bcm-old-input.cjs.entry.js +398 -0
  126. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +157 -0
  127. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +122 -0
  128. package/dist/cjs/bcm-popconfirm.cjs.entry.js +112 -0
  129. package/dist/cjs/bcm-popover.cjs.entry.js +182 -0
  130. package/dist/cjs/bcm-progress.cjs.entry.js +174 -0
  131. package/dist/cjs/bcm-radio-group.cjs.entry.js +267 -0
  132. package/dist/cjs/bcm-radio.cjs.entry.js +104 -0
  133. package/dist/cjs/bcm-range.cjs.entry.js +189 -0
  134. package/dist/cjs/bcm-result.cjs.entry.js +79 -0
  135. package/dist/cjs/bcm-search.cjs.entry.js +256 -0
  136. package/dist/cjs/bcm-select-group.cjs.entry.js +31 -0
  137. package/dist/cjs/bcm-select-option.cjs.entry.js +37 -0
  138. package/dist/cjs/bcm-select.cjs.entry.js +1198 -0
  139. package/dist/cjs/bcm-skeleton.cjs.entry.js +56 -0
  140. package/dist/cjs/bcm-step.cjs.entry.js +93 -0
  141. package/dist/cjs/bcm-stepper.cjs.entry.js +211 -0
  142. package/dist/cjs/bcm-switch.cjs.entry.js +139 -0
  143. package/dist/cjs/bcm-tab-group.cjs.entry.js +172 -0
  144. package/dist/cjs/bcm-tab-pane.cjs.entry.js +70 -0
  145. package/dist/cjs/bcm-tab.cjs.entry.js +89 -0
  146. package/dist/cjs/bcm-table.cjs.entry.js +78 -0
  147. package/dist/cjs/bcm-tabs-content.cjs.entry.js +62 -0
  148. package/dist/cjs/bcm-tabs.cjs.entry.js +390 -0
  149. package/dist/cjs/bcm-tag.cjs.entry.js +101 -0
  150. package/dist/cjs/bcm-text.cjs.entry.js +60 -0
  151. package/dist/cjs/bcm-textarea.cjs.entry.js +150 -0
  152. package/dist/cjs/bcm-time-picker.cjs.entry.js +139 -0
  153. package/dist/cjs/bcm-timeline-item.cjs.entry.js +55 -0
  154. package/dist/cjs/bcm-timeline.cjs.entry.js +73 -0
  155. package/dist/cjs/bcm-treeview-group.cjs.entry.js +23 -0
  156. package/dist/cjs/bromcom-ui.cjs.js +24 -0
  157. package/dist/cjs/caption-template-954d34bc.js +34 -0
  158. package/dist/cjs/color-helper-c9882bd8.js +490 -0
  159. package/dist/cjs/colors-56282b00.js +224 -0
  160. package/dist/cjs/datetime-helper-eaf4fadb.js +11 -0
  161. package/dist/cjs/element-dragger-a8562f82.js +279 -0
  162. package/dist/cjs/floating-ui-dae608ba.js +1455 -0
  163. package/dist/cjs/generate-716a328d.js +203 -0
  164. package/dist/cjs/global-b0d21446.js +15 -0
  165. package/dist/cjs/index-9d98aa56.js +1864 -0
  166. package/dist/cjs/index-a2b50e51.js +64 -0
  167. package/dist/cjs/index-f8547ecd.js +193 -0
  168. package/dist/cjs/index.cjs.js +6 -0
  169. package/dist/cjs/input-template-4747050f.js +86 -0
  170. package/dist/cjs/is-load-decorator-65755a67.js +56 -0
  171. package/dist/cjs/json-parse-decarator-b8a37140.js +40 -0
  172. package/dist/cjs/label-template-1ed6a569.js +23 -0
  173. package/dist/cjs/loader.cjs.js +26 -0
  174. package/dist/cjs/number-helper-e62c32d5.js +20 -0
  175. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +161 -0
  176. package/dist/cjs/old-bcm-popover.cjs.entry.js +104 -0
  177. package/dist/cjs/popover-placement-87901bb3.js +98 -0
  178. package/dist/cjs/property-decorators-cb2155ed.js +33 -0
  179. package/dist/cjs/slot-template-2ff0d22a.js +15 -0
  180. package/dist/cjs/stepper-states-1be09180.js +83 -0
  181. package/dist/cjs/string-helper-df40a475.js +134 -0
  182. package/dist/cjs/tooltip-helper-a192b748.js +104 -0
  183. package/dist/cjs/types-3871235f.js +32 -0
  184. package/dist/cjs/types-6eb7e028.js +32 -0
  185. package/dist/cjs/types-cc4adee7.js +19 -0
  186. package/dist/cjs/utils-fc077139.js +131 -0
  187. package/dist/cjs/validators-8f5537d4.js +33 -0
  188. package/dist/collection/collection-manifest.json +95 -0
  189. package/dist/collection/components/atoms/avatar/avatar.css +448 -0
  190. package/dist/collection/components/atoms/avatar/avatar.js +259 -0
  191. package/dist/collection/components/atoms/badge/badge.css +481 -0
  192. package/dist/collection/components/atoms/badge/badge.js +224 -0
  193. package/dist/collection/components/atoms/box/box.js +23 -0
  194. package/dist/collection/components/atoms/button/button.css +637 -0
  195. package/dist/collection/components/atoms/button/button.js +525 -0
  196. package/dist/collection/components/atoms/button/types.js +170 -0
  197. package/dist/collection/components/atoms/chip/chip.css +453 -0
  198. package/dist/collection/components/atoms/chip/chip.js +187 -0
  199. package/dist/collection/components/atoms/divider/divider.css +142 -0
  200. package/dist/collection/components/atoms/divider/divider.js +83 -0
  201. package/dist/collection/components/atoms/icon/icon.css +127 -0
  202. package/dist/collection/components/atoms/icon/icon.js +70 -0
  203. package/dist/collection/components/atoms/label/label.css +408 -0
  204. package/dist/collection/components/atoms/label/label.js +216 -0
  205. package/dist/collection/components/atoms/link/link.css +419 -0
  206. package/dist/collection/components/atoms/link/link.js +176 -0
  207. package/dist/collection/components/atoms/states/button.states.js +31 -0
  208. package/dist/collection/components/atoms/tag/tag.js +334 -0
  209. package/dist/collection/components/atoms/tag/types.js +30 -0
  210. package/dist/collection/components/atoms/typography/typography.js +23 -0
  211. package/dist/collection/components/molecules/accordion/accordion.css +127 -0
  212. package/dist/collection/components/molecules/accordion/accordion.js +129 -0
  213. package/dist/collection/components/molecules/alert/alert.css +191 -0
  214. package/dist/collection/components/molecules/alert/alert.js +298 -0
  215. package/dist/collection/components/molecules/alert/types.js +23 -0
  216. package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +201 -0
  217. package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +155 -0
  218. package/dist/collection/components/molecules/breadcrumb/types.js +5 -0
  219. package/dist/collection/components/molecules/button-group/button-group.css +423 -0
  220. package/dist/collection/components/molecules/button-group/button-group.js +235 -0
  221. package/dist/collection/components/molecules/card/card.css +408 -0
  222. package/dist/collection/components/molecules/card/card.js +128 -0
  223. package/dist/collection/components/molecules/checkbox/checkbox-lite.js +237 -0
  224. package/dist/collection/components/molecules/checkbox/checkbox.css +1280 -0
  225. package/dist/collection/components/molecules/checkbox/checkbox.js +688 -0
  226. package/dist/collection/components/molecules/checkbox/group.css +156 -0
  227. package/dist/collection/components/molecules/checkbox/group.js +779 -0
  228. package/dist/collection/components/molecules/drawer/drawer.css +502 -0
  229. package/dist/collection/components/molecules/drawer/drawer.js +272 -0
  230. package/dist/collection/components/molecules/dropdown/dropdown.css +419 -0
  231. package/dist/collection/components/molecules/dropdown/dropdown.js +857 -0
  232. package/dist/collection/components/molecules/empty/empty.js +44 -0
  233. package/dist/collection/components/molecules/error-layout/error-layout.css +396 -0
  234. package/dist/collection/components/molecules/error-layout/error-layout.js +177 -0
  235. package/dist/collection/components/molecules/error-layout/types.js +5 -0
  236. package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +488 -0
  237. package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +322 -0
  238. package/dist/collection/components/molecules/input/input.css +1208 -0
  239. package/dist/collection/components/molecules/input/input.js +1171 -0
  240. package/dist/collection/components/molecules/input/types.js +17 -0
  241. package/dist/collection/components/molecules/item/item.css +446 -0
  242. package/dist/collection/components/molecules/item/item.js +151 -0
  243. package/dist/collection/components/molecules/items/items.js +84 -0
  244. package/dist/collection/components/molecules/linked/linked.js +410 -0
  245. package/dist/collection/components/molecules/menu/menu.css +718 -0
  246. package/dist/collection/components/molecules/menu/menu.js +623 -0
  247. package/dist/collection/components/molecules/message/message.css +165 -0
  248. package/dist/collection/components/molecules/message/message.js +222 -0
  249. package/dist/collection/components/molecules/message/types.js +14 -0
  250. package/dist/collection/components/molecules/modal/modal.css +526 -0
  251. package/dist/collection/components/molecules/modal/modal.js +379 -0
  252. package/dist/collection/components/molecules/notification/notification.css +183 -0
  253. package/dist/collection/components/molecules/notification/notification.js +244 -0
  254. package/dist/collection/components/molecules/notification/types.js +15 -0
  255. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +563 -0
  256. package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +396 -0
  257. package/dist/collection/components/molecules/popconfirm/popconfirm.css +127 -0
  258. package/dist/collection/components/molecules/popconfirm/popconfirm.js +382 -0
  259. package/dist/collection/components/molecules/popover/popover.js +254 -0
  260. package/dist/collection/components/molecules/progress/progress.css +486 -0
  261. package/dist/collection/components/molecules/progress/progress.js +404 -0
  262. package/dist/collection/components/molecules/progress/types.js +28 -0
  263. package/dist/collection/components/molecules/radio/group.css +798 -0
  264. package/dist/collection/components/molecules/radio/group.js +652 -0
  265. package/dist/collection/components/molecules/radio/radio.css +1280 -0
  266. package/dist/collection/components/molecules/radio/radio.js +291 -0
  267. package/dist/collection/components/molecules/radio/types.js +30 -0
  268. package/dist/collection/components/molecules/range/range.css +570 -0
  269. package/dist/collection/components/molecules/range/range.js +472 -0
  270. package/dist/collection/components/molecules/result/result.css +164 -0
  271. package/dist/collection/components/molecules/result/result.js +143 -0
  272. package/dist/collection/components/molecules/result/types.js +22 -0
  273. package/dist/collection/components/molecules/search/search.css +1208 -0
  274. package/dist/collection/components/molecules/search/search.js +406 -0
  275. package/dist/collection/components/molecules/skeleton/skeleton.js +94 -0
  276. package/dist/collection/components/molecules/states/alert.states.js +25 -0
  277. package/dist/collection/components/molecules/states/checkbox-group.states.js +199 -0
  278. package/dist/collection/components/molecules/states/radio-group.states.js +107 -0
  279. package/dist/collection/components/molecules/states/search.states.js +137 -0
  280. package/dist/collection/components/molecules/states/stepper-states.js +79 -0
  281. package/dist/collection/components/molecules/stepper/step.js +346 -0
  282. package/dist/collection/components/molecules/stepper/stepper.css +617 -0
  283. package/dist/collection/components/molecules/stepper/stepper.js +484 -0
  284. package/dist/collection/components/molecules/switch/switch.css +1272 -0
  285. package/dist/collection/components/molecules/switch/switch.js +716 -0
  286. package/dist/collection/components/molecules/tab-group/tab-group.js +280 -0
  287. package/dist/collection/components/molecules/textarea/textarea.css +1208 -0
  288. package/dist/collection/components/molecules/textarea/textarea.js +731 -0
  289. package/dist/collection/components/molecules/textarea/types.js +13 -0
  290. package/dist/collection/components/molecules/timeline/timeline-item.css +254 -0
  291. package/dist/collection/components/molecules/timeline/timeline-item.js +159 -0
  292. package/dist/collection/components/molecules/timeline/timeline.css +205 -0
  293. package/dist/collection/components/molecules/timeline/timeline.js +125 -0
  294. package/dist/collection/components/molecules/tooltip/tooltip.js +232 -0
  295. package/dist/collection/components/organism/autocomplete/autocomplete.css +168 -0
  296. package/dist/collection/components/organism/autocomplete/autocomplete.js +399 -0
  297. package/dist/collection/components/organism/colorpicker/colorpicker.css +313 -0
  298. package/dist/collection/components/organism/colorpicker/colorpicker.js +774 -0
  299. package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
  300. package/dist/collection/components/organism/colorpicker/static/color.svg +14 -0
  301. package/dist/collection/components/organism/colorpicker/static/colors.svg +16 -0
  302. package/dist/collection/components/organism/date-picker/date-picker.css +141 -0
  303. package/dist/collection/components/organism/date-picker/date-picker.js +780 -0
  304. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +1429 -0
  305. package/dist/collection/components/organism/datetime-picker/datetime-picker.js +2166 -0
  306. package/dist/collection/components/organism/datetime-picker/types.js +39 -0
  307. package/dist/collection/components/organism/form/form-group.css +131 -0
  308. package/dist/collection/components/organism/form/form-group.js +131 -0
  309. package/dist/collection/components/organism/form/form.css +132 -0
  310. package/dist/collection/components/organism/form/form.js +680 -0
  311. package/dist/collection/components/organism/form-2/bcm-form-components.js +26 -0
  312. package/dist/collection/components/organism/form-2/form-2.css +127 -0
  313. package/dist/collection/components/organism/form-2/form-2.js +329 -0
  314. package/dist/collection/components/organism/list/list-key-control.js +125 -0
  315. package/dist/collection/components/organism/list/list-tag-control.js +172 -0
  316. package/dist/collection/components/organism/list/list.css +2047 -0
  317. package/dist/collection/components/organism/list/list.js +1894 -0
  318. package/dist/collection/components/organism/states/bcm-list2.states.js +532 -0
  319. package/dist/collection/components/organism/time-picker/time-picker.css +141 -0
  320. package/dist/collection/components/organism/time-picker/time-picker.js +627 -0
  321. package/dist/collection/components/other/attendance/attendance.css +433 -0
  322. package/dist/collection/components/other/attendance/attendance.js +87 -0
  323. package/dist/collection/components/other/data-table/table.css +130 -0
  324. package/dist/collection/components/other/data-table/table.js +92 -0
  325. package/dist/collection/components/other/default/default.css +127 -0
  326. package/dist/collection/components/other/default/default.js +54 -0
  327. package/dist/collection/components/other_deprecated/collapse/collapse.css +177 -0
  328. package/dist/collection/components/other_deprecated/collapse/collapse.js +163 -0
  329. package/dist/collection/components/other_deprecated/collapse/group.js +128 -0
  330. package/dist/collection/components/other_deprecated/listbox/listbox-group.css +139 -0
  331. package/dist/collection/components/other_deprecated/listbox/listbox-group.js +93 -0
  332. package/dist/collection/components/other_deprecated/listbox/listbox-item.css +269 -0
  333. package/dist/collection/components/other_deprecated/listbox/listbox-item.js +641 -0
  334. package/dist/collection/components/other_deprecated/listbox/listbox.css +365 -0
  335. package/dist/collection/components/other_deprecated/listbox/listbox.js +1999 -0
  336. package/dist/collection/components/other_deprecated/listbox/types.js +11 -0
  337. package/dist/collection/components/other_deprecated/old-input/old-input.css +1360 -0
  338. package/dist/collection/components/other_deprecated/old-input/old-input.js +1154 -0
  339. package/dist/collection/components/other_deprecated/old-input/types.js +17 -0
  340. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.css +582 -0
  341. package/dist/collection/components/other_deprecated/old-popover/old-popover-box.js +422 -0
  342. package/dist/collection/components/other_deprecated/old-popover/old-popover.css +127 -0
  343. package/dist/collection/components/other_deprecated/old-popover/old-popover.js +296 -0
  344. package/dist/collection/components/other_deprecated/old-search/old-search.css +131 -0
  345. package/dist/collection/components/other_deprecated/old-search/old-search.js +496 -0
  346. package/dist/collection/components/other_deprecated/old-tag/old-tag.css +305 -0
  347. package/dist/collection/components/other_deprecated/old-tag/old-tag.js +326 -0
  348. package/dist/collection/components/other_deprecated/old-tag/types.js +30 -0
  349. package/dist/collection/components/other_deprecated/select/group.css +144 -0
  350. package/dist/collection/components/other_deprecated/select/group.js +88 -0
  351. package/dist/collection/components/other_deprecated/select/option.css +164 -0
  352. package/dist/collection/components/other_deprecated/select/option.js +142 -0
  353. package/dist/collection/components/other_deprecated/select/select-box.css +143 -0
  354. package/dist/collection/components/other_deprecated/select/select-box.js +104 -0
  355. package/dist/collection/components/other_deprecated/select/select.css +364 -0
  356. package/dist/collection/components/other_deprecated/select/select.js +2281 -0
  357. package/dist/collection/components/other_deprecated/tabs/tab-pane.css +142 -0
  358. package/dist/collection/components/other_deprecated/tabs/tab-pane.js +168 -0
  359. package/dist/collection/components/other_deprecated/tabs/tab.css +587 -0
  360. package/dist/collection/components/other_deprecated/tabs/tab.js +303 -0
  361. package/dist/collection/components/other_deprecated/tabs/tabs-content.css +136 -0
  362. package/dist/collection/components/other_deprecated/tabs/tabs-content.js +147 -0
  363. package/dist/collection/components/other_deprecated/tabs/tabs.css +212 -0
  364. package/dist/collection/components/other_deprecated/tabs/tabs.js +806 -0
  365. package/dist/collection/components/other_deprecated/tabs/types.js +30 -0
  366. package/dist/collection/components/other_deprecated/text/text.css +429 -0
  367. package/dist/collection/components/other_deprecated/text/text.js +159 -0
  368. package/dist/collection/components/other_deprecated/treeview/treeview-group.css +0 -0
  369. package/dist/collection/components/other_deprecated/treeview/treeview-group.js +18 -0
  370. package/dist/collection/components/other_deprecated/treeview/treeview-item.css +318 -0
  371. package/dist/collection/components/other_deprecated/treeview/treeview-item.js +977 -0
  372. package/dist/collection/components/other_deprecated/treeview/treeview.css +190 -0
  373. package/dist/collection/components/other_deprecated/treeview/treeview.js +1699 -0
  374. package/dist/collection/components/other_deprecated/treeview/types.js +11 -0
  375. package/dist/collection/decorators/id-decorator.js +18 -0
  376. package/dist/collection/decorators/index.js +8 -0
  377. package/dist/collection/decorators/is-load-decorator.js +51 -0
  378. package/dist/collection/decorators/json-parse-decarator.js +35 -0
  379. package/dist/collection/decorators/property-decorators.js +28 -0
  380. package/dist/collection/global/components/_checkbox.css +627 -0
  381. package/dist/collection/global/config.js +45 -0
  382. package/dist/collection/global/global.js +43 -0
  383. package/dist/collection/global/variables/colors.js +220 -0
  384. package/dist/collection/helper/color-helper.js +81 -0
  385. package/dist/collection/helper/datetime-helper.js +7 -0
  386. package/dist/collection/helper/generate.js +168 -0
  387. package/dist/collection/helper/index.js +12 -0
  388. package/dist/collection/helper/number-helper.js +15 -0
  389. package/dist/collection/helper/popover-helper.js +106 -0
  390. package/dist/collection/helper/string-helper.js +65 -0
  391. package/dist/collection/helper/tooltip-helper.js +95 -0
  392. package/dist/collection/helper/validators.js +28 -0
  393. package/dist/collection/index.js +5 -0
  394. package/dist/collection/models/abstract-classes/abstract-key-control.js +97 -0
  395. package/dist/collection/models/bcm-types.js +5 -0
  396. package/dist/collection/models/bcm.js +466 -0
  397. package/dist/collection/models/index.js +6 -0
  398. package/dist/collection/models/states/atoms/bcm-atoms-state.js +5 -0
  399. package/dist/collection/models/states/molecules/bcm-molecules-state.js +5 -0
  400. package/dist/collection/models/states/organisms/bcm-organisms-state.js +5 -0
  401. package/dist/collection/templates/button-template.js +22 -0
  402. package/dist/collection/templates/caption-template.js +29 -0
  403. package/dist/collection/templates/checkbox-group-template.js +10 -0
  404. package/dist/collection/templates/checkbox-template.js +31 -0
  405. package/dist/collection/templates/icon-template.js +24 -0
  406. package/dist/collection/templates/index.js +17 -0
  407. package/dist/collection/templates/info-footer-template.js +16 -0
  408. package/dist/collection/templates/input-template.js +81 -0
  409. package/dist/collection/templates/label-template.js +18 -0
  410. package/dist/collection/templates/list-item-template.js +58 -0
  411. package/dist/collection/templates/list-template.js +24 -0
  412. package/dist/collection/templates/slot-template.js +10 -0
  413. package/dist/collection/templates/step-template.js +26 -0
  414. package/dist/collection/templates/tag-template.js +45 -0
  415. package/dist/collection/types/index.js +5 -0
  416. package/dist/collection/utils/element-dragger.js +274 -0
  417. package/dist/collection/utils/floating-ui.js +95 -0
  418. package/dist/collection/utils/index.js +9 -0
  419. package/dist/collection/utils/popover-placement.js +96 -0
  420. package/dist/collection/utils/utils.js +223 -0
  421. package/dist/collection/utils/validation.js +47 -0
  422. package/dist/esm/_commonjsHelpers-3016b722.js +25 -0
  423. package/dist/esm/bcm-accordion.entry.js +81 -0
  424. package/dist/esm/bcm-alert.entry.js +108 -0
  425. package/dist/esm/bcm-attendance.entry.js +46 -0
  426. package/dist/esm/bcm-autocomplete.entry.js +151 -0
  427. package/dist/esm/bcm-avatar_2.entry.js +151 -0
  428. package/dist/esm/bcm-b8d8a236.js +446 -0
  429. package/dist/esm/bcm-box.entry.js +31 -0
  430. package/dist/esm/bcm-breadcrumb.entry.js +63 -0
  431. package/dist/esm/bcm-button-group.entry.js +98 -0
  432. package/dist/esm/bcm-button_4.entry.js +988 -0
  433. package/dist/esm/bcm-card.entry.js +72 -0
  434. package/dist/esm/bcm-checkbox-group.entry.js +405 -0
  435. package/dist/esm/bcm-checkbox-lite_9.entry.js +2558 -0
  436. package/dist/esm/bcm-checkbox_2.entry.js +198 -0
  437. package/dist/esm/bcm-chip.entry.js +66 -0
  438. package/dist/esm/bcm-collapse-group.entry.js +53 -0
  439. package/dist/esm/bcm-collapse.entry.js +54 -0
  440. package/dist/esm/bcm-colorpicker.entry.js +429 -0
  441. package/dist/esm/bcm-date-picker.entry.js +167 -0
  442. package/dist/esm/bcm-datetime-picker.entry.js +1428 -0
  443. package/dist/esm/bcm-default.entry.js +36 -0
  444. package/dist/esm/bcm-drawer.entry.js +107 -0
  445. package/dist/esm/bcm-dropdown.entry.js +235 -0
  446. package/dist/esm/bcm-error-layout.entry.js +74 -0
  447. package/dist/esm/bcm-expansion-panel.entry.js +123 -0
  448. package/dist/esm/bcm-form-2.entry.js +202 -0
  449. package/dist/esm/bcm-form-group.entry.js +41 -0
  450. package/dist/esm/bcm-input.entry.js +321 -0
  451. package/dist/esm/bcm-item.entry.js +79 -0
  452. package/dist/esm/bcm-items.entry.js +57 -0
  453. package/dist/esm/bcm-label_2.entry.js +114 -0
  454. package/dist/esm/bcm-link.entry.js +58 -0
  455. package/dist/esm/bcm-linked.entry.js +175 -0
  456. package/dist/esm/bcm-list.entry.js +1764 -0
  457. package/dist/esm/bcm-menu.entry.js +244 -0
  458. package/dist/esm/bcm-message.entry.js +95 -0
  459. package/dist/esm/bcm-notification.entry.js +99 -0
  460. package/dist/esm/bcm-old-input.entry.js +394 -0
  461. package/dist/esm/bcm-old-tag_2.entry.js +152 -0
  462. package/dist/esm/bcm-popconfirm-box.entry.js +118 -0
  463. package/dist/esm/bcm-popconfirm.entry.js +108 -0
  464. package/dist/esm/bcm-popover.entry.js +178 -0
  465. package/dist/esm/bcm-progress.entry.js +170 -0
  466. package/dist/esm/bcm-radio-group.entry.js +263 -0
  467. package/dist/esm/bcm-radio.entry.js +100 -0
  468. package/dist/esm/bcm-range.entry.js +185 -0
  469. package/dist/esm/bcm-result.entry.js +75 -0
  470. package/dist/esm/bcm-search.entry.js +252 -0
  471. package/dist/esm/bcm-select-group.entry.js +27 -0
  472. package/dist/esm/bcm-select-option.entry.js +33 -0
  473. package/dist/esm/bcm-select.entry.js +1194 -0
  474. package/dist/esm/bcm-skeleton.entry.js +52 -0
  475. package/dist/esm/bcm-step.entry.js +89 -0
  476. package/dist/esm/bcm-stepper.entry.js +207 -0
  477. package/dist/esm/bcm-switch.entry.js +135 -0
  478. package/dist/esm/bcm-tab-group.entry.js +168 -0
  479. package/dist/esm/bcm-tab-pane.entry.js +66 -0
  480. package/dist/esm/bcm-tab.entry.js +85 -0
  481. package/dist/esm/bcm-table.entry.js +74 -0
  482. package/dist/esm/bcm-tabs-content.entry.js +58 -0
  483. package/dist/esm/bcm-tabs.entry.js +386 -0
  484. package/dist/esm/bcm-tag.entry.js +97 -0
  485. package/dist/esm/bcm-text.entry.js +56 -0
  486. package/dist/esm/bcm-textarea.entry.js +146 -0
  487. package/dist/esm/bcm-time-picker.entry.js +135 -0
  488. package/dist/esm/bcm-timeline-item.entry.js +51 -0
  489. package/dist/esm/bcm-timeline.entry.js +69 -0
  490. package/dist/esm/bcm-treeview-group.entry.js +19 -0
  491. package/dist/esm/bromcom-ui.js +22 -0
  492. package/dist/esm/caption-template-d54ee0c3.js +32 -0
  493. package/dist/esm/color-helper-7e202fd8.js +488 -0
  494. package/dist/esm/colors-1d7854ea.js +222 -0
  495. package/dist/esm/datetime-helper-df25808a.js +9 -0
  496. package/dist/esm/element-dragger-89bb52fd.js +277 -0
  497. package/dist/esm/floating-ui-f03a96ce.js +1453 -0
  498. package/dist/esm/generate-4e9309bd.js +200 -0
  499. package/dist/esm/global-4fad925b.js +13 -0
  500. package/dist/esm/index-2a3eeccc.js +1833 -0
  501. package/dist/esm/index-6e950253.js +191 -0
  502. package/dist/esm/index-ba2edd32.js +62 -0
  503. package/dist/esm/index.js +4 -0
  504. package/dist/esm/input-template-6a8e4cc6.js +84 -0
  505. package/dist/esm/is-load-decorator-b990575a.js +54 -0
  506. package/dist/esm/json-parse-decarator-87ac1cd9.js +38 -0
  507. package/dist/esm/label-template-e3eebfbc.js +21 -0
  508. package/dist/esm/loader.js +22 -0
  509. package/dist/esm/number-helper-f34393b1.js +18 -0
  510. package/dist/esm/old-bcm-popover-box.entry.js +157 -0
  511. package/dist/esm/old-bcm-popover.entry.js +100 -0
  512. package/dist/esm/polyfills/core-js.js +11 -0
  513. package/dist/esm/polyfills/css-shim.js +1 -0
  514. package/dist/esm/polyfills/dom.js +79 -0
  515. package/dist/esm/polyfills/es5-html-element.js +1 -0
  516. package/dist/esm/polyfills/index.js +34 -0
  517. package/dist/esm/polyfills/system.js +6 -0
  518. package/dist/esm/popover-placement-9864294b.js +95 -0
  519. package/dist/esm/property-decorators-f3f1e7de.js +31 -0
  520. package/dist/esm/slot-template-877c4e01.js +13 -0
  521. package/dist/esm/stepper-states-12a190b4.js +81 -0
  522. package/dist/esm/string-helper-74a1648f.js +132 -0
  523. package/dist/esm/tooltip-helper-ae137bee.js +102 -0
  524. package/dist/esm/types-6f06fa1a.js +19 -0
  525. package/dist/esm/types-b211a5eb.js +32 -0
  526. package/dist/esm/types-bfc3bba1.js +32 -0
  527. package/dist/esm/utils-57652744.js +123 -0
  528. package/dist/esm/validators-0e0c76db.js +31 -0
  529. package/dist/index.cjs.js +1 -0
  530. package/dist/index.js +1 -0
  531. package/dist/types/components/atoms/avatar/avatar.d.ts +23 -0
  532. package/dist/types/components/atoms/badge/badge.d.ts +17 -0
  533. package/dist/types/components/atoms/box/box.d.ts +5 -0
  534. package/dist/types/components/atoms/button/button.d.ts +33 -0
  535. package/dist/types/components/atoms/button/types.d.ts +166 -0
  536. package/dist/types/components/atoms/chip/chip.d.ts +24 -0
  537. package/dist/types/components/atoms/divider/divider.d.ts +7 -0
  538. package/dist/types/components/atoms/icon/icon.d.ts +6 -0
  539. package/dist/types/components/atoms/label/label.d.ts +16 -0
  540. package/dist/types/components/atoms/link/link.d.ts +13 -0
  541. package/dist/types/components/atoms/states/button.states.d.ts +7 -0
  542. package/dist/types/components/atoms/tag/tag.d.ts +24 -0
  543. package/dist/types/components/atoms/tag/types.d.ts +29 -0
  544. package/dist/types/components/atoms/typography/typography.d.ts +5 -0
  545. package/dist/types/components/molecules/accordion/accordion.d.ts +11 -0
  546. package/dist/types/components/molecules/alert/alert.d.ts +21 -0
  547. package/dist/types/components/molecules/alert/types.d.ts +25 -0
  548. package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +14 -0
  549. package/dist/types/components/molecules/breadcrumb/types.d.ts +10 -0
  550. package/dist/types/components/molecules/button-group/button-group.d.ts +21 -0
  551. package/dist/types/components/molecules/card/card.d.ts +11 -0
  552. package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +14 -0
  553. package/dist/types/components/molecules/checkbox/checkbox.d.ts +56 -0
  554. package/dist/types/components/molecules/checkbox/group.d.ts +56 -0
  555. package/dist/types/components/molecules/drawer/drawer.d.ts +21 -0
  556. package/dist/types/components/molecules/dropdown/dropdown.d.ts +55 -0
  557. package/dist/types/components/molecules/empty/empty.d.ts +5 -0
  558. package/dist/types/components/molecules/error-layout/error-layout.d.ts +25 -0
  559. package/dist/types/components/molecules/error-layout/types.d.ts +4 -0
  560. package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +31 -0
  561. package/dist/types/components/molecules/input/input.d.ts +82 -0
  562. package/dist/types/components/molecules/input/types.d.ts +13 -0
  563. package/dist/types/components/molecules/item/item.d.ts +13 -0
  564. package/dist/types/components/molecules/items/items.d.ts +10 -0
  565. package/dist/types/components/molecules/linked/linked.d.ts +30 -0
  566. package/dist/types/components/molecules/menu/menu.d.ts +41 -0
  567. package/dist/types/components/molecules/message/message.d.ts +32 -0
  568. package/dist/types/components/molecules/message/types.d.ts +13 -0
  569. package/dist/types/components/molecules/modal/modal.d.ts +26 -0
  570. package/dist/types/components/molecules/notification/notification.d.ts +42 -0
  571. package/dist/types/components/molecules/notification/types.d.ts +14 -0
  572. package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +29 -0
  573. package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +28 -0
  574. package/dist/types/components/molecules/popover/popover.d.ts +20 -0
  575. package/dist/types/components/molecules/progress/progress.d.ts +25 -0
  576. package/dist/types/components/molecules/progress/types.d.ts +14 -0
  577. package/dist/types/components/molecules/radio/group.d.ts +54 -0
  578. package/dist/types/components/molecules/radio/radio.d.ts +21 -0
  579. package/dist/types/components/molecules/radio/types.d.ts +29 -0
  580. package/dist/types/components/molecules/range/range.d.ts +36 -0
  581. package/dist/types/components/molecules/result/result.d.ts +13 -0
  582. package/dist/types/components/molecules/result/types.d.ts +19 -0
  583. package/dist/types/components/molecules/search/search.d.ts +35 -0
  584. package/dist/types/components/molecules/skeleton/skeleton.d.ts +8 -0
  585. package/dist/types/components/molecules/states/alert.states.d.ts +7 -0
  586. package/dist/types/components/molecules/states/checkbox-group.states.d.ts +53 -0
  587. package/dist/types/components/molecules/states/radio-group.states.d.ts +48 -0
  588. package/dist/types/components/molecules/states/search.states.d.ts +14 -0
  589. package/dist/types/components/molecules/states/stepper-states.d.ts +13 -0
  590. package/dist/types/components/molecules/stepper/step.d.ts +25 -0
  591. package/dist/types/components/molecules/stepper/stepper.d.ts +34 -0
  592. package/dist/types/components/molecules/switch/switch.d.ts +46 -0
  593. package/dist/types/components/molecules/tab-group/tab-group.d.ts +18 -0
  594. package/dist/types/components/molecules/textarea/textarea.d.ts +53 -0
  595. package/dist/types/components/molecules/textarea/types.d.ts +9 -0
  596. package/dist/types/components/molecules/timeline/timeline-item.d.ts +16 -0
  597. package/dist/types/components/molecules/timeline/timeline.d.ts +25 -0
  598. package/dist/types/components/molecules/tooltip/tooltip.d.ts +19 -0
  599. package/dist/types/components/organism/autocomplete/autocomplete.d.ts +31 -0
  600. package/dist/types/components/organism/colorpicker/colorpicker.d.ts +176 -0
  601. package/dist/types/components/organism/date-picker/date-picker.d.ts +77 -0
  602. package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +438 -0
  603. package/dist/types/components/organism/datetime-picker/types.d.ts +54 -0
  604. package/dist/types/components/organism/form/form-group.d.ts +10 -0
  605. package/dist/types/components/organism/form/form.d.ts +34 -0
  606. package/dist/types/components/organism/form-2/bcm-form-components.d.ts +2 -0
  607. package/dist/types/components/organism/form-2/form-2.d.ts +25 -0
  608. package/dist/types/components/organism/list/list-key-control.d.ts +18 -0
  609. package/dist/types/components/organism/list/list-tag-control.d.ts +18 -0
  610. package/dist/types/components/organism/list/list.d.ts +140 -0
  611. package/dist/types/components/organism/states/bcm-list2.states.d.ts +28 -0
  612. package/dist/types/components/organism/time-picker/time-picker.d.ts +69 -0
  613. package/dist/types/components/other/attendance/attendance.d.ts +7 -0
  614. package/dist/types/components/other/data-table/table.d.ts +8 -0
  615. package/dist/types/components/other/default/default.d.ts +6 -0
  616. package/dist/types/components/other_deprecated/collapse/collapse.d.ts +12 -0
  617. package/dist/types/components/other_deprecated/collapse/group.d.ts +15 -0
  618. package/dist/types/components/other_deprecated/listbox/listbox-group.d.ts +7 -0
  619. package/dist/types/components/other_deprecated/listbox/listbox-item.d.ts +58 -0
  620. package/dist/types/components/other_deprecated/listbox/listbox.d.ts +152 -0
  621. package/dist/types/components/other_deprecated/listbox/types.d.ts +11 -0
  622. package/dist/types/components/other_deprecated/old-input/old-input.d.ts +80 -0
  623. package/dist/types/components/other_deprecated/old-input/types.d.ts +13 -0
  624. package/dist/types/components/other_deprecated/old-popover/old-popover-box.d.ts +26 -0
  625. package/dist/types/components/other_deprecated/old-popover/old-popover.d.ts +22 -0
  626. package/dist/types/components/other_deprecated/old-search/old-search.d.ts +32 -0
  627. package/dist/types/components/other_deprecated/old-tag/old-tag.d.ts +27 -0
  628. package/dist/types/components/other_deprecated/old-tag/types.d.ts +29 -0
  629. package/dist/types/components/other_deprecated/select/group.d.ts +6 -0
  630. package/dist/types/components/other_deprecated/select/option.d.ts +10 -0
  631. package/dist/types/components/other_deprecated/select/select-box.d.ts +15 -0
  632. package/dist/types/components/other_deprecated/select/select.d.ts +133 -0
  633. package/dist/types/components/other_deprecated/tabs/tab-pane.d.ts +19 -0
  634. package/dist/types/components/other_deprecated/tabs/tab.d.ts +36 -0
  635. package/dist/types/components/other_deprecated/tabs/tabs-content.d.ts +18 -0
  636. package/dist/types/components/other_deprecated/tabs/tabs.d.ts +112 -0
  637. package/dist/types/components/other_deprecated/tabs/types.d.ts +39 -0
  638. package/dist/types/components/other_deprecated/text/text.d.ts +11 -0
  639. package/dist/types/components/other_deprecated/treeview/treeview-group.d.ts +3 -0
  640. package/dist/types/components/other_deprecated/treeview/treeview-item.d.ts +119 -0
  641. package/dist/types/components/other_deprecated/treeview/treeview.d.ts +181 -0
  642. package/dist/types/components/other_deprecated/treeview/types.d.ts +11 -0
  643. package/dist/types/components.d.ts +3532 -0
  644. package/dist/types/decorators/id-decorator.d.ts +4 -0
  645. package/dist/types/decorators/index.d.ts +4 -0
  646. package/dist/types/decorators/is-load-decorator.d.ts +7 -0
  647. package/dist/types/decorators/json-parse-decarator.d.ts +4 -0
  648. package/dist/types/decorators/property-decorators.d.ts +4 -0
  649. package/dist/types/global/variables/colors.d.ts +217 -0
  650. package/dist/types/helper/color-helper.d.ts +16 -0
  651. package/dist/types/helper/datetime-helper.d.ts +3 -0
  652. package/dist/types/helper/generate.d.ts +22 -0
  653. package/dist/types/helper/index.d.ts +8 -0
  654. package/dist/types/helper/number-helper.d.ts +10 -0
  655. package/dist/types/helper/popover-helper.d.ts +31 -0
  656. package/dist/types/helper/string-helper.d.ts +27 -0
  657. package/dist/types/helper/tooltip-helper.d.ts +25 -0
  658. package/dist/types/helper/validators.d.ts +10 -0
  659. package/dist/types/index.d.ts +1 -0
  660. package/dist/types/models/abstract-classes/abstract-key-control.d.ts +31 -0
  661. package/dist/types/models/bcm-types.d.ts +21 -0
  662. package/dist/types/models/bcm.d.ts +456 -0
  663. package/dist/types/models/index.d.ts +2 -0
  664. package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +34 -0
  665. package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +90 -0
  666. package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +78 -0
  667. package/dist/types/stencil-public-runtime.d.ts +1565 -0
  668. package/dist/types/templates/button-template.d.ts +18 -0
  669. package/dist/types/templates/caption-template.d.ts +14 -0
  670. package/dist/types/templates/checkbox-group-template.d.ts +10 -0
  671. package/dist/types/templates/checkbox-template.d.ts +13 -0
  672. package/dist/types/templates/icon-template.d.ts +7 -0
  673. package/dist/types/templates/index.d.ts +13 -0
  674. package/dist/types/templates/info-footer-template.d.ts +10 -0
  675. package/dist/types/templates/input-template.d.ts +34 -0
  676. package/dist/types/templates/label-template.d.ts +12 -0
  677. package/dist/types/templates/list-item-template.d.ts +13 -0
  678. package/dist/types/templates/list-template.d.ts +29 -0
  679. package/dist/types/templates/slot-template.d.ts +8 -0
  680. package/dist/types/templates/step-template.d.ts +17 -0
  681. package/dist/types/templates/tag-template.d.ts +21 -0
  682. package/dist/types/types/index.d.ts +12 -0
  683. package/dist/types/utils/element-dragger.d.ts +146 -0
  684. package/dist/types/utils/floating-ui.d.ts +1 -0
  685. package/dist/types/utils/index.d.ts +5 -0
  686. package/dist/types/utils/popover-placement.d.ts +3 -0
  687. package/dist/types/utils/utils.d.ts +55 -0
  688. package/dist/types/utils/validation.d.ts +19 -0
  689. package/package.json +3 -3
  690. package/dist/bromcom-ui/p-0846712b.js +0 -5
  691. package/dist/bromcom-ui/p-15a38991.entry.js +0 -5
  692. package/dist/bromcom-ui/p-6e391ba6.entry.js +0 -5
  693. package/dist/bromcom-ui/p-75c01665.entry.js +0 -5
  694. package/dist/bromcom-ui/p-7671bea7.entry.js +0 -5
  695. package/dist/bromcom-ui/p-8f394771.js +0 -5
  696. package/dist/bromcom-ui/p-9acadcaa.js +0 -5
  697. package/dist/bromcom-ui/p-9ad3f646.entry.js +0 -5
  698. package/dist/bromcom-ui/p-a3f82827.entry.js +0 -5
  699. package/dist/bromcom-ui/p-a74295dc.js +0 -5
  700. package/dist/bromcom-ui/p-a9ce17d4.js +0 -5
  701. package/dist/bromcom-ui/p-b970549a.entry.js +0 -5
  702. package/dist/bromcom-ui/p-bb698305.js +0 -5
  703. package/dist/bromcom-ui/p-cccebf39.entry.js +0 -5
  704. package/dist/bromcom-ui/p-e372f7a8.entry.js +0 -5
@@ -0,0 +1,2558 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import { r as registerInstance, h, H as Host, g as getElement, c as createEvent } from './index-2a3eeccc.js';
6
+ import { c as classnames } from './index-ba2edd32.js';
7
+ import { G as Generate } from './generate-4e9309bd.js';
8
+ import { B as Bcm } from './bcm-b8d8a236.js';
9
+ import { I as IsLoad } from './is-load-decorator-b990575a.js';
10
+ import { c as getChilds, d as delay } from './utils-57652744.js';
11
+ import './_commonjsHelpers-3016b722.js';
12
+
13
+ const checkboxCss = "@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}:root{--bcm-new-ds-color-inherit:inherit;--bcm-new-ds-color-current:currentColor;--bcm-new-ds-color-transparent:transparent;--bcm-new-ds-color-black:#000;--bcm-new-ds-color-white:#fff;--bcm-new-ds-color-slate:#64748b;--bcm-new-ds-color-slate-50:#f8fafc;--bcm-new-ds-color-slate-100:#f1f5f9;--bcm-new-ds-color-slate-200:#e2e8f0;--bcm-new-ds-color-slate-300:#cbd5e1;--bcm-new-ds-color-slate-400:#94a3b8;--bcm-new-ds-color-slate-500:#64748b;--bcm-new-ds-color-slate-600:#475569;--bcm-new-ds-color-slate-700:#334155;--bcm-new-ds-color-slate-800:#1e293b;--bcm-new-ds-color-slate-900:#0f172a;--bcm-new-ds-color-gray:#6b7280;--bcm-new-ds-color-gray-50:#f9fafb;--bcm-new-ds-color-gray-100:#f3f4f6;--bcm-new-ds-color-gray-200:#e5e7eb;--bcm-new-ds-color-gray-300:#d1d5db;--bcm-new-ds-color-gray-400:#9ca3af;--bcm-new-ds-color-gray-500:#6b7280;--bcm-new-ds-color-gray-600:#4b5563;--bcm-new-ds-color-gray-700:#374151;--bcm-new-ds-color-gray-800:#1f2937;--bcm-new-ds-color-gray-900:#111827;--bcm-new-ds-color-zinc:#71717a;--bcm-new-ds-color-zinc-50:#fafafa;--bcm-new-ds-color-zinc-100:#f4f4f5;--bcm-new-ds-color-zinc-200:#e4e4e7;--bcm-new-ds-color-zinc-300:#d4d4d8;--bcm-new-ds-color-zinc-400:#a1a1aa;--bcm-new-ds-color-zinc-500:#71717a;--bcm-new-ds-color-zinc-600:#52525b;--bcm-new-ds-color-zinc-700:#3f3f46;--bcm-new-ds-color-zinc-800:#27272a;--bcm-new-ds-color-zinc-900:#18181b;--bcm-new-ds-color-neutral:#737373;--bcm-new-ds-color-neutral-50:#fafafa;--bcm-new-ds-color-neutral-100:#f5f5f5;--bcm-new-ds-color-neutral-200:#e5e5e5;--bcm-new-ds-color-neutral-300:#d4d4d4;--bcm-new-ds-color-neutral-400:#a3a3a3;--bcm-new-ds-color-neutral-500:#737373;--bcm-new-ds-color-neutral-600:#525252;--bcm-new-ds-color-neutral-700:#404040;--bcm-new-ds-color-neutral-800:#262626;--bcm-new-ds-color-neutral-900:#171717;--bcm-new-ds-color-stone:#78716c;--bcm-new-ds-color-stone-50:#fafaf9;--bcm-new-ds-color-stone-100:#f5f5f4;--bcm-new-ds-color-stone-200:#e7e5e4;--bcm-new-ds-color-stone-300:#d6d3d1;--bcm-new-ds-color-stone-400:#a8a29e;--bcm-new-ds-color-stone-500:#78716c;--bcm-new-ds-color-stone-600:#57534e;--bcm-new-ds-color-stone-700:#44403c;--bcm-new-ds-color-stone-800:#292524;--bcm-new-ds-color-stone-900:#1c1917;--bcm-new-ds-color-red:#ef4444;--bcm-new-ds-color-red-50:#fef2f2;--bcm-new-ds-color-red-100:#fee2e2;--bcm-new-ds-color-red-200:#fecaca;--bcm-new-ds-color-red-300:#fca5a5;--bcm-new-ds-color-red-400:#f87171;--bcm-new-ds-color-red-500:#ef4444;--bcm-new-ds-color-red-600:#dc2626;--bcm-new-ds-color-red-700:#b91c1c;--bcm-new-ds-color-red-800:#991b1b;--bcm-new-ds-color-red-900:#7f1d1d;--bcm-new-ds-color-orange:#f97316;--bcm-new-ds-color-orange-50:#fff7ed;--bcm-new-ds-color-orange-100:#ffedd5;--bcm-new-ds-color-orange-200:#fed7aa;--bcm-new-ds-color-orange-300:#fdba74;--bcm-new-ds-color-orange-400:#fb923c;--bcm-new-ds-color-orange-500:#f97316;--bcm-new-ds-color-orange-600:#ea580c;--bcm-new-ds-color-orange-700:#c2410c;--bcm-new-ds-color-orange-800:#9a3412;--bcm-new-ds-color-orange-900:#7c2d12;--bcm-new-ds-color-amber:#f59e0b;--bcm-new-ds-color-amber-50:#fffbeb;--bcm-new-ds-color-amber-100:#fef3c7;--bcm-new-ds-color-amber-200:#fde68a;--bcm-new-ds-color-amber-300:#fcd34d;--bcm-new-ds-color-amber-400:#fbbf24;--bcm-new-ds-color-amber-500:#f59e0b;--bcm-new-ds-color-amber-600:#d97706;--bcm-new-ds-color-amber-700:#b45309;--bcm-new-ds-color-amber-800:#92400e;--bcm-new-ds-color-amber-900:#78350f;--bcm-new-ds-color-yellow:#eab308;--bcm-new-ds-color-yellow-50:#fefce8;--bcm-new-ds-color-yellow-100:#fef9c3;--bcm-new-ds-color-yellow-200:#fef08a;--bcm-new-ds-color-yellow-300:#fde047;--bcm-new-ds-color-yellow-400:#facc15;--bcm-new-ds-color-yellow-500:#eab308;--bcm-new-ds-color-yellow-600:#ca8a04;--bcm-new-ds-color-yellow-700:#a16207;--bcm-new-ds-color-yellow-800:#854d0e;--bcm-new-ds-color-yellow-900:#713f12;--bcm-new-ds-color-lime:#84cc16;--bcm-new-ds-color-lime-50:#f7fee7;--bcm-new-ds-color-lime-100:#ecfccb;--bcm-new-ds-color-lime-200:#d9f99d;--bcm-new-ds-color-lime-300:#bef264;--bcm-new-ds-color-lime-400:#a3e635;--bcm-new-ds-color-lime-500:#84cc16;--bcm-new-ds-color-lime-600:#65a30d;--bcm-new-ds-color-lime-700:#4d7c0f;--bcm-new-ds-color-lime-800:#3f6212;--bcm-new-ds-color-lime-900:#365314;--bcm-new-ds-color-green:#22c55e;--bcm-new-ds-color-green-50:#f0fdf4;--bcm-new-ds-color-green-100:#dcfce7;--bcm-new-ds-color-green-200:#bbf7d0;--bcm-new-ds-color-green-300:#86efac;--bcm-new-ds-color-green-400:#4ade80;--bcm-new-ds-color-green-500:#22c55e;--bcm-new-ds-color-green-600:#16a34a;--bcm-new-ds-color-green-700:#15803d;--bcm-new-ds-color-green-800:#166534;--bcm-new-ds-color-green-900:#14532d;--bcm-new-ds-color-emerald:#10b981;--bcm-new-ds-color-emerald-50:#ecfdf5;--bcm-new-ds-color-emerald-100:#d1fae5;--bcm-new-ds-color-emerald-200:#a7f3d0;--bcm-new-ds-color-emerald-300:#6ee7b7;--bcm-new-ds-color-emerald-400:#34d399;--bcm-new-ds-color-emerald-500:#10b981;--bcm-new-ds-color-emerald-600:#059669;--bcm-new-ds-color-emerald-700:#047857;--bcm-new-ds-color-emerald-800:#065f46;--bcm-new-ds-color-emerald-900:#064e3b;--bcm-new-ds-color-teal:#14b8a6;--bcm-new-ds-color-teal-50:#f0fdfa;--bcm-new-ds-color-teal-100:#ccfbf1;--bcm-new-ds-color-teal-200:#99f6e4;--bcm-new-ds-color-teal-300:#5eead4;--bcm-new-ds-color-teal-400:#2dd4bf;--bcm-new-ds-color-teal-500:#14b8a6;--bcm-new-ds-color-teal-600:#0d9488;--bcm-new-ds-color-teal-700:#0f766e;--bcm-new-ds-color-teal-800:#115e59;--bcm-new-ds-color-teal-900:#134e4a;--bcm-new-ds-color-cyan:#06b6d4;--bcm-new-ds-color-cyan-50:#ecfeff;--bcm-new-ds-color-cyan-100:#cffafe;--bcm-new-ds-color-cyan-200:#a5f3fc;--bcm-new-ds-color-cyan-300:#67e8f9;--bcm-new-ds-color-cyan-400:#22d3ee;--bcm-new-ds-color-cyan-500:#06b6d4;--bcm-new-ds-color-cyan-600:#0891b2;--bcm-new-ds-color-cyan-700:#0e7490;--bcm-new-ds-color-cyan-800:#155e75;--bcm-new-ds-color-cyan-900:#164e63;--bcm-new-ds-color-sky:#0ea5e9;--bcm-new-ds-color-sky-50:#f0f9ff;--bcm-new-ds-color-sky-100:#e0f2fe;--bcm-new-ds-color-sky-200:#bae6fd;--bcm-new-ds-color-sky-300:#7dd3fc;--bcm-new-ds-color-sky-400:#38bdf8;--bcm-new-ds-color-sky-500:#0ea5e9;--bcm-new-ds-color-sky-600:#0284c7;--bcm-new-ds-color-sky-700:#0369a1;--bcm-new-ds-color-sky-800:#075985;--bcm-new-ds-color-sky-900:#0c4a6e;--bcm-new-ds-color-blue:#3b82f6;--bcm-new-ds-color-blue-50:#eff6ff;--bcm-new-ds-color-blue-100:#dbeafe;--bcm-new-ds-color-blue-200:#bfdbfe;--bcm-new-ds-color-blue-300:#93c5fd;--bcm-new-ds-color-blue-400:#60a5fa;--bcm-new-ds-color-blue-500:#3b82f6;--bcm-new-ds-color-blue-600:#2563eb;--bcm-new-ds-color-blue-700:#1d4ed8;--bcm-new-ds-color-blue-800:#1e40af;--bcm-new-ds-color-blue-900:#1e3a8a;--bcm-new-ds-color-indigo:#6366f1;--bcm-new-ds-color-indigo-50:#eef2ff;--bcm-new-ds-color-indigo-100:#e0e7ff;--bcm-new-ds-color-indigo-200:#c7d2fe;--bcm-new-ds-color-indigo-300:#a5b4fc;--bcm-new-ds-color-indigo-400:#818cf8;--bcm-new-ds-color-indigo-500:#6366f1;--bcm-new-ds-color-indigo-600:#4f46e5;--bcm-new-ds-color-indigo-700:#4338ca;--bcm-new-ds-color-indigo-800:#3730a3;--bcm-new-ds-color-indigo-900:#312e81;--bcm-new-ds-color-violet:#8b5cf6;--bcm-new-ds-color-violet-50:#f5f3ff;--bcm-new-ds-color-violet-100:#ede9fe;--bcm-new-ds-color-violet-200:#ddd6fe;--bcm-new-ds-color-violet-300:#c4b5fd;--bcm-new-ds-color-violet-400:#a78bfa;--bcm-new-ds-color-violet-500:#8b5cf6;--bcm-new-ds-color-violet-600:#7c3aed;--bcm-new-ds-color-violet-700:#6d28d9;--bcm-new-ds-color-violet-800:#5b21b6;--bcm-new-ds-color-violet-900:#4c1d95;--bcm-new-ds-color-purple:#a855f7;--bcm-new-ds-color-purple-50:#faf5ff;--bcm-new-ds-color-purple-100:#f3e8ff;--bcm-new-ds-color-purple-200:#e9d5ff;--bcm-new-ds-color-purple-300:#d8b4fe;--bcm-new-ds-color-purple-400:#c084fc;--bcm-new-ds-color-purple-500:#a855f7;--bcm-new-ds-color-purple-600:#9333ea;--bcm-new-ds-color-purple-700:#7e22ce;--bcm-new-ds-color-purple-800:#6b21a8;--bcm-new-ds-color-purple-900:#581c87;--bcm-new-ds-color-fuchsia:#d946ef;--bcm-new-ds-color-fuchsia-50:#fdf4ff;--bcm-new-ds-color-fuchsia-100:#fae8ff;--bcm-new-ds-color-fuchsia-200:#f5d0fe;--bcm-new-ds-color-fuchsia-300:#f0abfc;--bcm-new-ds-color-fuchsia-400:#e879f9;--bcm-new-ds-color-fuchsia-500:#d946ef;--bcm-new-ds-color-fuchsia-600:#c026d3;--bcm-new-ds-color-fuchsia-700:#a21caf;--bcm-new-ds-color-fuchsia-800:#86198f;--bcm-new-ds-color-fuchsia-900:#701a75;--bcm-new-ds-color-pink:#ec4899;--bcm-new-ds-color-pink-50:#fdf2f8;--bcm-new-ds-color-pink-100:#fce7f3;--bcm-new-ds-color-pink-200:#fbcfe8;--bcm-new-ds-color-pink-300:#f9a8d4;--bcm-new-ds-color-pink-400:#f472b6;--bcm-new-ds-color-pink-500:#ec4899;--bcm-new-ds-color-pink-600:#db2777;--bcm-new-ds-color-pink-700:#be185d;--bcm-new-ds-color-pink-800:#9d174d;--bcm-new-ds-color-pink-900:#831843;--bcm-new-ds-color-rose:#f43f5e;--bcm-new-ds-color-rose-50:#fff1f2;--bcm-new-ds-color-rose-100:#ffe4e6;--bcm-new-ds-color-rose-200:#fecdd3;--bcm-new-ds-color-rose-300:#fda4af;--bcm-new-ds-color-rose-400:#fb7185;--bcm-new-ds-color-rose-500:#f43f5e;--bcm-new-ds-color-rose-600:#e11d48;--bcm-new-ds-color-rose-700:#be123c;--bcm-new-ds-color-rose-800:#9f1239;--bcm-new-ds-color-rose-900:#881337}*{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}.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}";
14
+
15
+ const BcmCheckboxLite = class {
16
+ constructor(hostRef) {
17
+ registerInstance(this, hostRef);
18
+ this._id = Generate.UID();
19
+ this.checked = true;
20
+ this.indeterminate = null;
21
+ this.disabled = false;
22
+ this.hidden = false;
23
+ this.required = false;
24
+ this.readOnly = false;
25
+ this.captionType = Bcm.Status.default;
26
+ }
27
+ render() {
28
+ const { disabled, checked, readOnly, required, indeterminate, hidden, captionType, _id } = this;
29
+ // const hostClasses = cs(
30
+ // 'bcm-checkbox',
31
+ // 'bcm-checkbox__type-default',
32
+ // {
33
+ // 'error': captionType == Bcm.Status.error,
34
+ // hidden,
35
+ // checked,
36
+ // disabled,
37
+ // required,
38
+ // readOnly,
39
+ // }
40
+ // )
41
+ // const bcmCheckboxIconClass = cs(
42
+ // 'bcm-checkbox__icon',
43
+ // 'bcm-checkbox__icon-lite',
44
+ // 'bcm-checkbox__icon-' + indeterminate,
45
+ // {
46
+ // checked
47
+ // }
48
+ // )
49
+ // const bcmCheckboxLabelClass = cs(
50
+ // 'bcm-checkbox__label'
51
+ // )
52
+ const bcmCheckboxClass = classnames('bcm-checkbox', `bcm-checkbox-size-medium`, {
53
+ 'error': captionType == Bcm.Status.error,
54
+ hidden,
55
+ checked,
56
+ disabled,
57
+ required
58
+ });
59
+ const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
60
+ 'bcm-checkbox__label-icon-checked': checked,
61
+ });
62
+ const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
63
+ const bcmCheckboxInputClass = classnames('bcm-checkbox__input');
64
+ return (h(Host, { class: bcmCheckboxClass, style: { 'margin': '0' } }, h("div", { class: bcmCheckboxInputClass, style: {
65
+ 'padding-top': '5px'
66
+ } }, h("input", { id: _id, type: "checkbox", checked: checked, disabled: disabled, required: required, readOnly: readOnly }), h("label", { class: bcmCheckboxLabelClass, htmlFor: _id }, h("span", { class: bcmCheckboxIconClass }, h("div", { style: {
67
+ 'height': '12px',
68
+ 'min-height': '12px',
69
+ 'width': '12px',
70
+ 'min-width': '12px'
71
+ } }, h("svg", { class: "bcm-icon-lite", width: "100%", height: "100%", viewBox: "0 0 11 9", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { d: "M1.91308 4.03516H1.91326C1.99256 4.03525 2.07081 4.05331 2.14213 4.08798C2.21341 4.12262 2.27591 4.17295 2.32497 4.2352L1.91308 4.03516ZM1.91308 4.03516H1.09394C0.890308 4.03516 0.776602 4.26975 0.902321 4.4292L0.902371 4.42927L4.11214 8.49567L4.11218 8.49573C4.32247 8.76188 4.72568 8.76114 4.93667 8.49617L4.93708 8.49566L10.6597 1.24398C10.6598 1.24378 10.66 1.24358 10.6602 1.24338C10.7884 1.08295 10.6699 0.85 10.4689 0.85H9.6498C9.48941 0.85 9.33668 0.9235 9.2376 1.05044C9.23751 1.05055 9.23742 1.05066 9.23734 1.05077L4.52403 7.02157M1.91308 4.03516L4.52403 7.02157M4.52403 7.02157L2.32506 4.23531L4.52403 7.02157Z", fill: "#ffffff" }))))))));
72
+ }
73
+ get el() { return getElement(this); }
74
+ };
75
+ BcmCheckboxLite.style = checkboxCss;
76
+
77
+ const dividerCss = "@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}.bcm-divider{display:block}.bcm-divider.hidden{display:none}.bcm-divider__direction-horizontal{width:100%;height:1px;margin:4px auto;border-top:1px solid var(--bcm-color-grey-5)}.bcm-divider__direction-vertical{height:auto;width:1px;margin:0 4px;border-left:1px solid var(--bcm-color-grey-5)}";
78
+
79
+ var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
80
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
81
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
82
+ r = Reflect.decorate(decorators, target, key, desc);
83
+ else
84
+ for (var i = decorators.length - 1; i >= 0; i--)
85
+ if (d = decorators[i])
86
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
87
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
88
+ };
89
+ const BcmDivider = class {
90
+ constructor(hostRef) {
91
+ registerInstance(this, hostRef);
92
+ this.hidden = false;
93
+ this.direction = Bcm.Direction.horizontal;
94
+ }
95
+ render() {
96
+ const { hidden, direction } = this;
97
+ const hostClasses = classnames('bcm-divider', 'bcm-divider__direction-' + direction, {
98
+ 'hidden': hidden
99
+ });
100
+ return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null))));
101
+ }
102
+ get el() { return getElement(this); }
103
+ };
104
+ __decorate$4([
105
+ IsLoad()
106
+ ], BcmDivider.prototype, "el", void 0);
107
+ BcmDivider.style = dividerCss;
108
+
109
+ var __decorate$3 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
110
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
111
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
112
+ r = Reflect.decorate(decorators, target, key, desc);
113
+ else
114
+ for (var i = decorators.length - 1; i >= 0; i--)
115
+ if (d = decorators[i])
116
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
117
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
118
+ };
119
+ const BcmEmpty = class {
120
+ constructor(hostRef) {
121
+ registerInstance(this, hostRef);
122
+ }
123
+ render() {
124
+ return (h(Host, { class: "tw-h-full tw-flex tw-flex-col tw-items-center tw-justify-center tw-w-full tw-flex-1 tw-bg-slate-50 tw-text-center tw-rounded tw-gap-3" }, this.icon && h("i", { class: `tw-text-8 tw-text-amber-400 ${this.icon}` }), h("bcm-typography", { class: "tw-text-slate-400 tw-text-2" }, h("slot", null))));
125
+ }
126
+ get el() { return getElement(this); }
127
+ };
128
+ __decorate$3([
129
+ IsLoad()
130
+ ], BcmEmpty.prototype, "el", void 0);
131
+
132
+ const listboxCss = "@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}:host{display:block;width:fit-content;height:fit-content;background-color:#ffffff}:host(.hidden){display:none}:host(.flex){width:100%;height:100%}:host(.flex) .bcm-listbox{max-height:100%;max-width:100%;height:100%;min-width:100%}:host(.full-width){width:100%}:host(.full-width) .bcm-listbox{max-width:100%;min-width:100%}.bcm-listbox{flex:1;background-color:var(--bcm-color-grey-1);width:fit-content;display:flex;flex-direction:column;height:100%;width:100%;min-width:256px;max-width:256px;min-height:auto;max-height:300px;box-sizing:border-box;border:1px solid var(--bcm-color-grey-5)}.bcm-listbox-list{flex:1;display:flex;flex-direction:column;overflow-x:hidden;overflow-y:auto;border-bottom:none}.bcm-listbox-list.loading{min-height:150px;position:relative;margin:0 8px 8px 8px}.bcm-listbox-list .loading{display:none;align-items:center;justify-content:center;height:100%;width:100%;position:absolute;background-color:rgba(255, 255, 255, 0.03)}.bcm-listbox-list .loading.show{display:flex}.bcm-listbox-list .list-container.hidden{display:none}.bcm-listbox .search{padding:8px;padding-bottom:0}.bcm-listbox .search.hidden{display:none !important}.bcm-listbox .empty{display:none;align-items:center;justify-content:center;flex:1;height:100%}.bcm-listbox .empty.show{display:flex}.bcm-listbox-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3)}.label{display:block;color:var(--bcm-color-grey-9);margin-bottom:4px}.listbox-item{display:flex;align-items:stretch;justify-content:flex-start;flex-direction:column;color:var(--bcm-color-grey-8);user-select:none;background-color:var(--bcm-color-grey-1)}.listbox-item.hidden{display:none}.listbox-item .divider{padding:0 8px}.listbox-item-container{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;padding-left:8px;width:100%}.listbox-item-container .check-content{display:flex;align-items:center;justify-content:flex-start;width:16px;min-width:16px;margin-right:4px}.listbox-item-container .check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.listbox-item-container .check-content .indeterminate:after{content:\"\";position:absolute;top:50%;left:9px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}.listbox-item-container .check-content .indeterminate:before{content:\"\";position:absolute;top:-1px;left:0px;width:16px;height:100%;border-radius:2px;background-color:transparent;border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:2}.listbox-item-container .check-content .indeterminate:hover:before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.listbox-item-container-text-content{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;cursor:pointer;width:100%;padding:4px 8px 4px 4px}.listbox-item-container.disabled{color:var(--bcm-color-grey-6)}.listbox-item-container.selected{color:var(--bcm-color-prime-blue-6)}.listbox-item-container.selected:hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.listbox-item-container:hover:not(.disabled),.listbox-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.caption-area{margin-bottom:8px;min-height:20px}.input-caption{display:block}.error.label{color:var(--bcm-color-red-6) !important}.error.bcm-listbox{border:1px solid var(--bcm-color-red-6) !important}.caption-default{color:#8C8C8C}.caption-primary{color:#4293CF}.caption-success{color:#52C41A}.caption-warning{color:#FA8C16}.caption-error{color:#F5222D}.input-large{height:38px}.input-medium{height:30px}.input-small{height:20px}";
133
+
134
+ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
135
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
136
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
137
+ r = Reflect.decorate(decorators, target, key, desc);
138
+ else
139
+ for (var i = decorators.length - 1; i >= 0; i--)
140
+ if (d = decorators[i])
141
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
142
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
143
+ };
144
+ /**
145
+ * @desc
146
+ * @param str
147
+ */
148
+ const lowercase$2 = (str) => str.toLowerCase();
149
+ const BcmListbox = class {
150
+ constructor(hostRef) {
151
+ registerInstance(this, hostRef);
152
+ this.listboxItemSelected = createEvent(this, "bcm-listbox-item-selected", 7);
153
+ this.listboxClearSelected = createEvent(this, "bcm-listbox-clear-selecteds", 7);
154
+ this.listboxSendCheck = createEvent(this, "bcm-listbox-send-check", 7);
155
+ this.listboxSendUncheck = createEvent(this, "bcm-listbox-send-uncheck", 7);
156
+ this.listboxChecklist = createEvent(this, "bcm-listbox-checklist", 7);
157
+ this.listboxChange = createEvent(this, "bcm-listbox-change", 7);
158
+ this.listboxChecked = createEvent(this, "bcm-listbox-checked", 7);
159
+ this.change = createEvent(this, "bcm-change", 7);
160
+ this.objectMapping = {
161
+ 'id': "id",
162
+ 'text': "text",
163
+ 'icon': "icon",
164
+ 'avatar': "avatar",
165
+ 'avatarName': "avatarName",
166
+ 'avatarImage': "avatarImage",
167
+ 'secondaryText': "secondaryText",
168
+ 'tooltipText': "tooltipText",
169
+ 'selected': "selected",
170
+ 'checked': "checked",
171
+ 'disabled': "disabled",
172
+ };
173
+ this.checkedObjectList = [];
174
+ this.cacheCheckedObjectList = [];
175
+ this.allChilds = [];
176
+ this.onlyChilds = [];
177
+ this.firstRun = true;
178
+ this.firstCheck = false;
179
+ this.onFocus = false;
180
+ this.isSetData = false;
181
+ this.isGroupArray = [];
182
+ this.intersection = [];
183
+ /**
184
+ * Component Properties
185
+ */
186
+ this.innerComponent = false;
187
+ this.checkboxes = false;
188
+ this.required = false;
189
+ this.value = null;
190
+ this.search = false;
191
+ this.infoFooter = false;
192
+ this.showIcon = false;
193
+ this.size = 'medium';
194
+ this.checkedList = [];
195
+ this.updateCheckedList = [];
196
+ this._items = [];
197
+ this.fullWidth = false;
198
+ this.searchFields = ['text', 'secondaryText', 'tooltipText'];
199
+ this.hidden = false;
200
+ this.returnField = "id";
201
+ this.searchSub = "items";
202
+ this.searchText = "";
203
+ this.treeview = false;
204
+ this.searchPlaceholder = "Search";
205
+ this.numberOfColumns = 1;
206
+ this.height = null;
207
+ this.maxHeight = null;
208
+ this.template = null;
209
+ this.highlight = false;
210
+ this.loading = true;
211
+ this.noCaption = false;
212
+ this.captionType = 'default';
213
+ this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
214
+ /**
215
+ * Component States
216
+ */
217
+ this.searchResults = [];
218
+ this.totalSearch = 0;
219
+ this.showSearch = true;
220
+ this.empty = false;
221
+ this.runClearAndSelect = false;
222
+ this.total = 0;
223
+ this.items = [];
224
+ this.checklist = [];
225
+ this.sortedChecklist = [];
226
+ this.indeterminateState = 'uncheck';
227
+ this.checked = false;
228
+ this.checklistSorted = [];
229
+ }
230
+ async setClear() {
231
+ this.listboxChecklist.emit([]);
232
+ this.value = null;
233
+ this.selectedId = null;
234
+ this.listboxClearSelected.emit([]);
235
+ // this.checkedObjectList.forEach(item => {
236
+ // this.listboxUncheckedMethod(String(item[this.objectMapping['id']]), this._internal_id)
237
+ // });
238
+ let isItem = getChilds(this.el, 'bcm-listbox-item');
239
+ let elementStatuses = [];
240
+ if (isItem) {
241
+ isItem.map(element => {
242
+ elementStatuses.push(element.checked = false);
243
+ });
244
+ }
245
+ // console.log("uncheck")
246
+ await Promise.all(elementStatuses);
247
+ // if ( allStatuses ){
248
+ // console.log("bitti")
249
+ // }
250
+ this.checklist = [];
251
+ this.sortedChecklist = [];
252
+ this.checklistSorted = [];
253
+ this.checkedObjectList = [];
254
+ await delay(10);
255
+ return Promise.resolve();
256
+ }
257
+ async resetCaption() {
258
+ await delay(10);
259
+ this.caption = this.captionCache;
260
+ this.captionType = this.captionTypeCache;
261
+ this.captionError = null;
262
+ await delay(10);
263
+ return Promise.resolve();
264
+ }
265
+ connectedCallback() {
266
+ this.captionCache = this.caption;
267
+ this.captionTypeCache = this.captionType;
268
+ }
269
+ async getValue() {
270
+ if (this.checkboxes) {
271
+ return this.checkedObjectList;
272
+ }
273
+ else {
274
+ return this.value;
275
+ }
276
+ }
277
+ async getChecklist() {
278
+ return this.checkedObjectList;
279
+ }
280
+ async showSearchMethod(val = true) {
281
+ if (this.treeview == false && this.search == true) {
282
+ this.showSearch = val;
283
+ var search = null;
284
+ if (search = this.el.shadowRoot.getElementById("search")) {
285
+ if (val) {
286
+ search.classList.remove('hidden');
287
+ }
288
+ else {
289
+ search.classList.add('hidden');
290
+ }
291
+ }
292
+ }
293
+ }
294
+ async selected(id) {
295
+ this.selectedId = String(id);
296
+ if (this.treeview === true) {
297
+ setTimeout(async () => {
298
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
299
+ if (bcmTreeview) {
300
+ await bcmTreeview.selected(this.selectedId);
301
+ }
302
+ }, 100);
303
+ }
304
+ }
305
+ async clearAndSelectSearch(select = true) {
306
+ this.runClearAndSelect = true;
307
+ if (this.search == true) {
308
+ setTimeout(() => {
309
+ var searchInput = null;
310
+ searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
311
+ if (searchInput) {
312
+ searchInput.setClear();
313
+ if (select == true) {
314
+ searchInput.select();
315
+ }
316
+ }
317
+ }, 100);
318
+ }
319
+ }
320
+ async addChecked(items) {
321
+ await this.setClear();
322
+ if (items) {
323
+ if (typeof items != 'string') {
324
+ await delay(50);
325
+ if (sessionStorage.getItem(this._internal_id + "-config")) {
326
+ this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
327
+ }
328
+ this.checkedList = items;
329
+ this.checkedList.forEach((item) => {
330
+ this.handleListboxChecked({ detail: String(item) }, this._internal_id);
331
+ });
332
+ this.updateCheckedList = [];
333
+ if (this.treeview === true) {
334
+ setTimeout(async () => {
335
+ await customElements.whenDefined("bcm-treeview");
336
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
337
+ if (bcmTreeview) {
338
+ await bcmTreeview.addChecked(items);
339
+ }
340
+ }, 50);
341
+ }
342
+ }
343
+ }
344
+ }
345
+ async updateChecked(items) {
346
+ this.setClear();
347
+ this.checkedList = [];
348
+ this.updateCheckedList = items;
349
+ this.updateCheckedList.forEach((item) => {
350
+ this.handleListboxChecked({ detail: item });
351
+ });
352
+ setTimeout(async () => {
353
+ if (this.treeview === true) {
354
+ await customElements.whenDefined("bcm-treeview");
355
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
356
+ if (bcmTreeview) {
357
+ await bcmTreeview.updateChecked(items);
358
+ }
359
+ }
360
+ }, 100);
361
+ }
362
+ async config(_config) {
363
+ if (_config['treeview'] && _config['treeview'] === true) {
364
+ typeof _config['treeview'] == 'boolean'
365
+ ? this.treeview = _config['treeview']
366
+ : this.treeview = false;
367
+ }
368
+ setTimeout(async () => {
369
+ if (this.treeview === true) {
370
+ await customElements.whenDefined("bcm-treeview");
371
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
372
+ if (bcmTreeview) {
373
+ await bcmTreeview.config(_config);
374
+ if (this.selectedId) {
375
+ await bcmTreeview.selected(this.selectedId);
376
+ }
377
+ }
378
+ }
379
+ }, 300);
380
+ if (_config['searchFields']) {
381
+ if (Array.isArray(_config['searchFields'])) {
382
+ this.searchFields = _config['searchFields'];
383
+ }
384
+ }
385
+ if (_config['searchPlaceholder']) {
386
+ typeof _config['searchPlaceholder'] == 'string'
387
+ ? this.searchPlaceholder = _config['searchPlaceholder']
388
+ : this.searchPlaceholder = null;
389
+ }
390
+ if (_config['maxHeight']) {
391
+ typeof _config['maxHeight'] == 'string'
392
+ ? this.maxHeight = _config['maxHeight']
393
+ : this.maxHeight = "100%";
394
+ }
395
+ if (_config['height']) {
396
+ typeof _config['height'] == 'string'
397
+ ? this.height = _config['height']
398
+ : this.height = "100%";
399
+ }
400
+ if (_config['template']) {
401
+ typeof _config['template'] == 'string'
402
+ ? this.template = _config['template']
403
+ : this.template = null;
404
+ }
405
+ if (_config['searchable']) {
406
+ typeof _config['searchable'] == 'boolean'
407
+ ? this.search = _config['searchable']
408
+ : this.search = false;
409
+ }
410
+ if (_config['highlight']) {
411
+ typeof _config['highlight'] == 'boolean'
412
+ ? this.highlight = _config['highlight']
413
+ : this.highlight = false;
414
+ }
415
+ if (_config['fullWidth']) {
416
+ typeof _config['fullWidth'] == 'boolean'
417
+ ? this.fullWidth = _config['fullWidth']
418
+ : this.fullWidth = false;
419
+ }
420
+ if (_config['numberOfColumns']) {
421
+ typeof _config['numberOfColumns'] == 'number'
422
+ ? this.numberOfColumns = _config['numberOfColumns']
423
+ : this.numberOfColumns = 1;
424
+ }
425
+ if (_config['infoFooter']) {
426
+ typeof _config['infoFooter'] == 'boolean'
427
+ ? this.infoFooter = _config['infoFooter']
428
+ : this.infoFooter = false;
429
+ }
430
+ if (_config['checkable']) {
431
+ typeof _config['checkable'] == 'boolean'
432
+ ? this.checkboxes = _config['checkable']
433
+ : this.checkboxes = false;
434
+ }
435
+ if (_config['showIcon']) {
436
+ typeof _config['showIcon'] == 'boolean'
437
+ ? this.showIcon = _config['showIcon']
438
+ : this.showIcon = false;
439
+ }
440
+ if (_config['size']) {
441
+ (["small", "medium", "large"].indexOf(_config['size']) >= 0)
442
+ ? this.size = _config['size']
443
+ : this.size = 'medium';
444
+ }
445
+ this.searchSub = this.objectMapping['items'];
446
+ if (_config['mapping']) {
447
+ if (_config['mapping']['id']) {
448
+ this.objectMapping['id'] = String(_config['mapping']['id']);
449
+ this.returnField = this.objectMapping['id'];
450
+ }
451
+ if (_config['mapping']['text']) {
452
+ this.objectMapping['text'] = _config['mapping']['text'];
453
+ }
454
+ if (_config['mapping']['icon']) {
455
+ this.objectMapping['icon'] = _config['mapping']['icon'];
456
+ }
457
+ if (_config['mapping']['avatar']) {
458
+ this.objectMapping['avatar'] = _config['mapping']['avatar'];
459
+ }
460
+ if (_config['mapping']['avatarName']) {
461
+ this.objectMapping['avatarName'] = _config['mapping']['avatarName'];
462
+ }
463
+ if (_config['mapping']['avatarImage']) {
464
+ this.objectMapping['avatarImage'] = _config['mapping']['avatarImage'];
465
+ }
466
+ if (_config['mapping']['secondaryText']) {
467
+ this.objectMapping['secondaryText'] = _config['mapping']['secondaryText'];
468
+ }
469
+ if (_config['mapping']['tooltipText']) {
470
+ this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
471
+ }
472
+ if (_config['mapping']['disabled']) {
473
+ this.objectMapping['disabled'] = _config['mapping']['disabled'];
474
+ }
475
+ if (_config['mapping']['checked']) {
476
+ this.objectMapping['checked'] = _config['mapping']['checked'];
477
+ }
478
+ if (_config['mapping']['selected']) {
479
+ this.objectMapping['selected'] = _config['mapping']['selected'];
480
+ }
481
+ if (_config['mapping']['items']) {
482
+ this.objectMapping['items'] = _config['mapping']['items'];
483
+ this.searchSub = this.objectMapping['items'];
484
+ }
485
+ // if ( this.treeview ) {
486
+ // }else{
487
+ // this.searchSub = this.objectMapping['items']
488
+ // }
489
+ }
490
+ sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
491
+ // forceUpdate(this.el)
492
+ return Promise.resolve(true);
493
+ }
494
+ async setData(_data = []) {
495
+ this.clearAndSelectSearch(false);
496
+ this.isLoading(true);
497
+ this._items = _data;
498
+ this.searchData = JSON.parse(_data);
499
+ this.isSetData = true;
500
+ // this.isEmpty(false)
501
+ setTimeout(async () => {
502
+ if (this.treeview === true) {
503
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
504
+ if (bcmTreeview) {
505
+ await bcmTreeview.setData(_data);
506
+ if (this.searchData.length > 0) {
507
+ this.isEmpty(false);
508
+ this.isLoading(false);
509
+ }
510
+ }
511
+ }
512
+ }, 100);
513
+ }
514
+ // componentDidLoad(){
515
+ // console.log("kilitle")
516
+ // setTimeout(() => {
517
+ // if(this.isSetData) {
518
+ // this.isLoading(true)
519
+ // this.isEmpty(false)
520
+ // }else{
521
+ // this.isLoading(false)
522
+ // this.isEmpty(true)
523
+ // }
524
+ // }, 100);
525
+ // }
526
+ componentWillRender() {
527
+ if (this.isSetData) {
528
+ this.onlyChilds = this.getAllGroup(this.el, true);
529
+ this.allChilds = this.getAllGroup();
530
+ if (this.onlyChilds.length != this.total) {
531
+ this.total = this.onlyChilds.length;
532
+ }
533
+ if (this.checkboxes === true) {
534
+ this.setIndeterminateState();
535
+ if (this.checklistSorted.length > 0) {
536
+ this.checkedObjectList = [];
537
+ this.getAllGroup(this.el).forEach(element => {
538
+ element.checked == true && (this.firstCheck = true,
539
+ this.checkedObjectList.indexOf(element.itemObject) == -1 && (this.checkedObjectList.push(element.itemObject)));
540
+ });
541
+ if (JSON.stringify(this.cacheCheckedObjectList) !== JSON.stringify(this.checkedObjectList)) {
542
+ this.listboxChecklist.emit(this.checkedObjectList);
543
+ this.cacheCheckedObjectList = this.checkedObjectList;
544
+ this.value = this.checkedObjectList;
545
+ }
546
+ }
547
+ else {
548
+ if (this.firstCheck) {
549
+ this.listboxChecklist.emit([]);
550
+ this.cacheCheckedObjectList = [];
551
+ if (this.value != null) {
552
+ this.value = null;
553
+ }
554
+ }
555
+ }
556
+ }
557
+ }
558
+ }
559
+ componentDidRender() {
560
+ // this.isEmpty(true)
561
+ // this.isLoading(true)
562
+ // if(this.total > 0) {
563
+ // this.isLoading(false)
564
+ // this.isEmpty(false)
565
+ // }
566
+ // this.isEmpty(true)
567
+ if (this.isSetData) {
568
+ if (this.total > 0) {
569
+ this.isEmpty(false);
570
+ this.isLoading(false);
571
+ }
572
+ else {
573
+ this.isEmpty(true);
574
+ }
575
+ }
576
+ }
577
+ /**
578
+ * @desc
579
+ * @returns {void}
580
+ */
581
+ setIndeterminateState() {
582
+ let state = 'uncheck';
583
+ let allChecked = true;
584
+ let allUnchecked = true;
585
+ this.getAllGroup(this.el, true).map((item) => {
586
+ item.checked && (allUnchecked = false);
587
+ !item.checked && (allChecked = false);
588
+ });
589
+ !allChecked && !allUnchecked
590
+ ? state = 'indeterminate'
591
+ : allChecked
592
+ ? state = 'determinate'
593
+ : state = 'uncheck';
594
+ this.indeterminateState = state;
595
+ this.checked = state == 'determinate' ? true : false;
596
+ // this.listboxChecklist.emit(this.sortedChecklist)
597
+ }
598
+ getAllGroup(element = this.el, onlyItem = false) {
599
+ let returnAllItems = [];
600
+ let isGroup = getChilds(element, 'bcm-listbox-group');
601
+ let isItem = getChilds(element, 'bcm-listbox-item');
602
+ if (isGroup.length > 0) {
603
+ isGroup.forEach(group => {
604
+ if (this.isGroupArray.indexOf(Number(group.id)) === -1) {
605
+ this.isGroupArray.push(Number(group.id));
606
+ }
607
+ if (onlyItem == false) {
608
+ returnAllItems = [...returnAllItems,
609
+ group
610
+ ];
611
+ }
612
+ getChilds(group, 'bcm-listbox-item').forEach(items => {
613
+ if (!(returnAllItems.indexOf(items) >= 0)) {
614
+ returnAllItems = [...returnAllItems,
615
+ items
616
+ ];
617
+ }
618
+ });
619
+ });
620
+ }
621
+ if (isItem.length > 0) {
622
+ isItem.forEach(items => {
623
+ if (!(returnAllItems.indexOf(items) >= 0)) {
624
+ returnAllItems = [...returnAllItems,
625
+ items
626
+ ];
627
+ }
628
+ });
629
+ }
630
+ return returnAllItems;
631
+ }
632
+ getAllChilds(element = this.el, type = null) {
633
+ let returnAllItems = [];
634
+ let oldItems = [];
635
+ if (!this._items || type === "slot") {
636
+ getChilds(element, 'bcm-listbox-item').forEach(items => {
637
+ returnAllItems = [...returnAllItems,
638
+ items
639
+ ];
640
+ });
641
+ }
642
+ else if (this._items && this._items.length > 0) {
643
+ oldItems = JSON.parse(this._items);
644
+ oldItems.map((item) => (((item.type === 'group') ? (item.items.map((item) => ((returnAllItems = [...returnAllItems, item])))) :
645
+ (returnAllItems = [...returnAllItems, item]))));
646
+ }
647
+ return returnAllItems;
648
+ }
649
+ /**
650
+ * @desc
651
+ */
652
+ handleCheckList(process = 'add', checkId) {
653
+ checkId = String(checkId);
654
+ if (this.checkboxes) {
655
+ if (this.items && this.items.find(e => e[this.objectMapping['id']] == checkId)) {
656
+ // checkId = Number(checkId)
657
+ switch (process) {
658
+ case 'add':
659
+ if (this.checklist.length > 0) {
660
+ if (!this.checklist.includes(checkId)) {
661
+ this.checklist = [...this.checklist, checkId];
662
+ }
663
+ }
664
+ else {
665
+ this.checklist = [checkId];
666
+ }
667
+ break;
668
+ case 'remove':
669
+ this.checklist = this.checklist.filter(item => item !== checkId);
670
+ break;
671
+ }
672
+ let sorted = this.checklist.sort(function (a, b) { return a - b; });
673
+ this.sortedChecklist = this.checklist;
674
+ this.checklistSorted = sorted;
675
+ // forceUpdate(this.el)
676
+ }
677
+ }
678
+ }
679
+ handleIndeterminateClick() {
680
+ let state = 'uncheck';
681
+ let allChecked = true;
682
+ let allUnchecked = true;
683
+ let visibleItem = [];
684
+ this.getAllGroup(this.el, true).map((item) => {
685
+ if (item.hidden === false) {
686
+ visibleItem.push(item);
687
+ item.checked && (allUnchecked = false);
688
+ !item.checked && (allChecked = false);
689
+ }
690
+ });
691
+ !allChecked && !allUnchecked
692
+ ? state = 'indeterminate'
693
+ : allChecked
694
+ ? state = 'determinate'
695
+ : state = 'uncheck';
696
+ visibleItem.map((item) => {
697
+ if (state !== 'uncheck') {
698
+ item.checked = false;
699
+ this.handleCheckList('remove', String(item.id));
700
+ }
701
+ else {
702
+ item.checked = true;
703
+ this.handleCheckList('add', String(item.id));
704
+ }
705
+ });
706
+ this.setIndeterminateState();
707
+ }
708
+ handleCheckboxClick(e) {
709
+ e.preventDefault();
710
+ }
711
+ /**
712
+ * @desc
713
+ * @param item
714
+ */
715
+ itemRenderer(item) {
716
+ if (item[this.objectMapping['id']] && String(this.selectedId) == String(item[this.objectMapping['id']])) {
717
+ this.listboxItemSelected.emit(item);
718
+ }
719
+ // if(item[this.objectMapping['selected']] && item[this.objectMapping['selected']] === true){
720
+ // this.listboxItemSelected.emit(item)
721
+ // }
722
+ // var checkedListCache = this.checkedList;
723
+ // if(checkedListCache && checkedListCache.find(e => e == item[this.objectMapping['id']])){
724
+ // this.handleListboxChecked({detail: item[this.objectMapping['id']]})
725
+ // }
726
+ // const index = checkedListCache.indexOf(item[this.objectMapping['id']]);
727
+ // if (index > -1) {
728
+ // checkedListCache.splice(index, 1);
729
+ // }
730
+ // if(this.updateCheckedList.length > 0 ){
731
+ // if( this.updateCheckedList.find(e => e == item[this.objectMapping['id']]) ){
732
+ // const index = this.updateCheckedList.indexOf(item[this.objectMapping['id']]);
733
+ // if (index > -1) {
734
+ // this.updateCheckedList.splice(index, 1);
735
+ // }
736
+ // this.listboxChecked.emit(item[this.objectMapping['id']])
737
+ // }
738
+ // }
739
+ return (h("bcm-listbox-item", Object.assign({ _internal_id: this._internal_id, id: String(item[this.objectMapping['id']]), text: item[this.objectMapping['text']] }, (item[this.objectMapping['icon']] && { icon: item[this.objectMapping['icon']] }), (item[this.objectMapping['avatar']] && { avatar: item[this.objectMapping['avatar']] }), (item[this.objectMapping['avatarName']] && { avatarName: item[this.objectMapping['avatarName']] }), (item[this.objectMapping['avatarImage']] && { avatarImage: item[this.objectMapping['avatarImage']] }), (item[this.objectMapping['secondaryText']] && { secondaryText: item[this.objectMapping['secondaryText']] }), (item[this.objectMapping['tooltipText']] && { tooltipText: item[this.objectMapping['tooltipText']] }), (Boolean(item[this.objectMapping['checked']]) === Boolean(true) && { checked: Boolean(item[this.objectMapping['checked']]) }), (item[this.objectMapping['disabled']] === true && { disabled: true }), (Boolean(item[this.objectMapping['selected']]) === Boolean(true) && this.checkboxes == false && { selected: Boolean(item[this.objectMapping['selected']]) }), (this.template && { template: this.template }), (this.checkboxes && { checkboxes: true }), (this.size && { size: this.size }), { itemObject: item, objectMapping: this.objectMapping })));
740
+ }
741
+ /**
742
+ * @desc
743
+ * @param group
744
+ */
745
+ recursiveGroupRenderer(group) {
746
+ return (h("bcm-listbox-group", { id: group[this.objectMapping['id']], text: group[this.objectMapping['text']] }, group.items.map((item) => ((item.type === 'group' ? this.recursiveGroupRenderer(item) : this.itemRenderer(item))))));
747
+ }
748
+ async searchResultMethod(items = []) {
749
+ if (this.treeview == true) {
750
+ const bcmtreeview = this.el.shadowRoot.querySelector("bcm-treeview");
751
+ // await bcmListbox.config(this._config)
752
+ if (bcmtreeview) {
753
+ bcmtreeview.searchResultMethod({ detail: (items.length > 0 ? items : true) });
754
+ }
755
+ }
756
+ else {
757
+ this.listenSearchResult({ detail: (items.length > 0 ? items : true), isEvent: true });
758
+ }
759
+ // return true
760
+ }
761
+ handleListboxSelected(event) {
762
+ this.listboxItemSelected.emit(event.detail);
763
+ }
764
+ /**
765
+ * @desc
766
+ */
767
+ // @Listen('bcm-treeview-checklist')
768
+ // handleListboxCheckedList(e) {
769
+ // this.listboxChecklist.emit(e.detail)
770
+ // }
771
+ isLoading(val) {
772
+ var listContainer = this.el.shadowRoot.getElementById("bcm-listbox-list");
773
+ var loading = this.el.shadowRoot.getElementById("loading");
774
+ var searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
775
+ // var listcontainer = this.el.shadowRoot.getElementById("list-container")
776
+ if (val) {
777
+ if (searchInput) {
778
+ searchInput.disabled = true;
779
+ }
780
+ listContainer && listContainer.classList.add('loading');
781
+ loading && loading.classList.add('show');
782
+ // listcontainer && listcontainer.classList.add('hidden')
783
+ }
784
+ else {
785
+ if (searchInput) {
786
+ searchInput.disabled = false;
787
+ }
788
+ listContainer && listContainer.classList.remove('loading');
789
+ loading && loading.classList.remove('show');
790
+ // listcontainer && listcontainer.classList.remove('hidden')
791
+ }
792
+ }
793
+ isEmpty(val) {
794
+ var empty = this.el.shadowRoot.getElementById("empty");
795
+ var listcontainer = this.el.shadowRoot.getElementById("list-container");
796
+ var checkall = this.el.shadowRoot.getElementById("checkall");
797
+ if (val) {
798
+ empty && empty.classList.add('show');
799
+ listcontainer && listcontainer.classList.add('hidden');
800
+ checkall && checkall.classList.add('hidden');
801
+ }
802
+ else {
803
+ empty && empty.classList.remove('show');
804
+ listcontainer && listcontainer.classList.remove('hidden');
805
+ checkall && checkall.classList.remove('hidden');
806
+ }
807
+ }
808
+ isSearchCount(val = false) {
809
+ if (this.infoFooter) {
810
+ var inSearch = this.el.shadowRoot.getElementById("in-search");
811
+ var inTotal = this.el.shadowRoot.getElementById("in-total");
812
+ if (val !== false && val >= 0 && val != null && inSearch && inTotal) {
813
+ inSearch.innerHTML = val;
814
+ inTotal.style.display = "none";
815
+ }
816
+ else {
817
+ inTotal.style.display = "inline";
818
+ inSearch.innerHTML = "";
819
+ }
820
+ }
821
+ }
822
+ listenSearchResult(event) {
823
+ var path = event.path || (event.composedPath && event.composedPath());
824
+ if (event.isEvent == undefined) {
825
+ if (path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
826
+ var searchValue = '';
827
+ if (this.treeview == false) {
828
+ // var checkall = null
829
+ // this.checkboxes && (checkall = this.el.shadowRoot.getElementById("checkall"))
830
+ var totalSearch = event.detail.length;
831
+ // this.empty = false
832
+ this.isEmpty(false);
833
+ this.intersection = [];
834
+ if (event.detail.length > 0) {
835
+ if (event.detail[0] == -1) {
836
+ totalSearch = 0;
837
+ this.empty = true;
838
+ this.isEmpty(true);
839
+ }
840
+ if (this.allChilds.length > 0) {
841
+ // this.checkboxes && ( checkall && checkall.classList.add('hidden') )
842
+ this.allChilds.map((item) => {
843
+ if (this.highlight) {
844
+ event.target.addEventListener('bcm-on-search-value', async (e) => {
845
+ var inputText = item.shadowRoot.getElementById("text");
846
+ if (inputText) {
847
+ searchValue = await e.detail;
848
+ inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
849
+ if (searchValue) {
850
+ var cacheInputText = lowercase$2(inputText);
851
+ var cacheSearchValue = lowercase$2(searchValue);
852
+ var index = cacheInputText.indexOf(cacheSearchValue);
853
+ if (index >= 0) {
854
+ inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
855
+ }
856
+ }
857
+ item.shadowRoot.getElementById("text").innerHTML = inputText;
858
+ }
859
+ });
860
+ }
861
+ item.hidden = true;
862
+ var _ids = String(item.id);
863
+ if (event.detail.indexOf(_ids) >= 0) {
864
+ item.hidden = false;
865
+ }
866
+ else {
867
+ item.hidden = true;
868
+ }
869
+ });
870
+ }
871
+ this.intersection = event.detail[0] == -1 ? [0] : event.detail.filter(x => this.isGroupArray.includes(x));
872
+ }
873
+ else {
874
+ if (this.allChilds.length > 0) {
875
+ this.allChilds.map((item) => {
876
+ item.hidden = false;
877
+ });
878
+ // this.checkboxes && ( checkall && checkall.classList.remove('hidden') )
879
+ }
880
+ // this.isEmpty(true)
881
+ }
882
+ if (this.search || this.checkboxes) {
883
+ setTimeout(() => {
884
+ if (totalSearch >= 0) {
885
+ var totals = totalSearch;
886
+ this.isSearchCount(totals);
887
+ }
888
+ else {
889
+ this.isSearchCount(0);
890
+ }
891
+ if (event.detail[0] === -1) {
892
+ this.isSearchCount(0);
893
+ }
894
+ if (event.detail === true) {
895
+ this.isSearchCount();
896
+ }
897
+ }, 100);
898
+ }
899
+ if (event.detail === true) {
900
+ this.isEmpty(false);
901
+ }
902
+ if (this.runClearAndSelect) {
903
+ this.runClearAndSelect = false;
904
+ this.isSearchCount(true);
905
+ }
906
+ }
907
+ }
908
+ }
909
+ }
910
+ /**
911
+ * @desc
912
+ * @param newValue
913
+ * @returns {void}
914
+ */
915
+ parseItems(newValue) {
916
+ if (newValue) {
917
+ typeof newValue == 'string'
918
+ ? this.items = JSON.parse(newValue)
919
+ : this.items = newValue;
920
+ }
921
+ this.handleChildProcess();
922
+ }
923
+ handleChange(newValue) {
924
+ this.change.emit(newValue);
925
+ this.listboxChange.emit(newValue);
926
+ }
927
+ handleChildProcess() {
928
+ setTimeout(() => {
929
+ this.onlyChilds = this.getAllGroup(this.el, true);
930
+ this.total = this.onlyChilds.length;
931
+ // console.log(this.total)
932
+ // this.allChilds = this.getAllChilds()
933
+ // this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length
934
+ if (this.total > 0) {
935
+ // setTimeout(() => {
936
+ this.isLoading(false);
937
+ // }, 100);
938
+ this.isEmpty(false);
939
+ }
940
+ else {
941
+ // setTimeout(() => {
942
+ this.isLoading(false);
943
+ this.isEmpty(true);
944
+ // }, 100);
945
+ }
946
+ }, 100);
947
+ }
948
+ /**
949
+ * @desc
950
+ */
951
+ handleListboxClearSelected(event) {
952
+ var path = event.path || (event.composedPath && event.composedPath());
953
+ if (this.checkboxes == false && path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
954
+ this.value = event.detail;
955
+ this.selectedId = String(event.detail[this.objectMapping['id']]);
956
+ this.listboxClearSelected.emit(event.detail);
957
+ }
958
+ }
959
+ /**
960
+ * @desc
961
+ */
962
+ handleListboxChecked(event, _internal_id = this._internal_id) {
963
+ var path = event.path || (event.composedPath && event.composedPath());
964
+ if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
965
+ this.listboxSendCheck.emit(event.detail);
966
+ this.handleCheckList('add', event.detail);
967
+ this.setIndeterminateState();
968
+ }
969
+ }
970
+ /**
971
+ * @desc
972
+ */
973
+ handleListboxUnchecked(event, _internal_id = this._internal_id) {
974
+ var path = event.path || (event.composedPath && event.composedPath());
975
+ if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
976
+ this.listboxSendUncheck.emit(event.detail);
977
+ this.handleCheckList('remove', event.detail);
978
+ this.setIndeterminateState();
979
+ }
980
+ }
981
+ async listboxUncheckedMethod(item, internal_id = this._internal_id) {
982
+ if (this.treeview) {
983
+ await customElements.whenDefined("bcm-treeview");
984
+ const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
985
+ if (bcmTreeview) {
986
+ await bcmTreeview.treeviewUncheckedMethod(item);
987
+ }
988
+ }
989
+ else {
990
+ this.handleListboxUnchecked({ "detail": item }, internal_id);
991
+ }
992
+ }
993
+ handleFocus(focusEvent = false) {
994
+ this.onFocus = focusEvent;
995
+ }
996
+ render() {
997
+ const { innerComponent, label, required, treeview, searchText, checkboxes, search, size, fullWidth, total, indeterminateState, checked, checklist, searchData, searchFields, _flex, returnField, searchSub, infoFooter, showSearch, noCaption, caption, captionError, captionType } = this;
998
+ const bcmListbox = classnames('bcm-listbox', {
999
+ 'error': captionType == 'error' ? true : false,
1000
+ 'full-width': fullWidth,
1001
+ 'flex': _flex
1002
+ });
1003
+ const classes = classnames('listbox-item', {
1004
+ 'hidden': this.totalSearch > 0
1005
+ });
1006
+ const classesContainer = classnames('listbox-item-container');
1007
+ const textContent = classnames('listbox-item-container-text-content', size, {
1008
+ 'size-2': size === 'small' || size === 'medium',
1009
+ 'size-3': size === 'large',
1010
+ });
1011
+ const listContainer = classnames('list-container', {
1012
+ 'column-1': this.numberOfColumns <= 1,
1013
+ 'column-2': this.numberOfColumns == 2,
1014
+ 'column-3': this.numberOfColumns >= 3,
1015
+ });
1016
+ const listContainerStyle = {
1017
+ 'grid-template-columns': this.numberOfColumns <= 1 ? '1fr' : 'repeat(' + this.numberOfColumns + ', ' + (210 - (this.numberOfColumns * 10)) + 'px)'
1018
+ };
1019
+ const hostClasses = classnames(this.hidden ? 'hidden' : null,
1020
+ // this.totalSearch > 0 ? 'hidden' : null,
1021
+ {
1022
+ 'flex': _flex,
1023
+ 'full-width': fullWidth
1024
+ });
1025
+ var customStyles = {
1026
+ 'max-height': this.maxHeight
1027
+ };
1028
+ const customStylesList = {
1029
+ 'min-height': this.height ? "inherit" : this.maxHeight ? "auto" : "200px"
1030
+ };
1031
+ if (this.height) {
1032
+ customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
1033
+ }
1034
+ const captionClasses = classnames('size-1', 'input-caption', 'caption-' + captionType);
1035
+ return (h(Host, { class: hostClasses, style: customStyles, "bcm-internal-id": this._internal_id }, !innerComponent && label && h("div", null, h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required })), treeview === true && (h("bcm-treeview", { _internal_id: this._internal_id })), treeview == false && (h("div", { class: bcmListbox, style: customStyles }, search && (h("div", { class: "search", id: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, h("bcm-old-search", { _internal_id: this._internal_id, searchPlaceholder: this.searchPlaceholder, searchValue: searchText, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), h("bcm-divider", null))), h("div", { id: "bcm-listbox-list", class: "bcm-listbox-list loading", style: customStylesList }, checkboxes && (h("div", { class: classes, id: "checkall" }, h("div", { class: classesContainer, onClick: () => this.handleIndeterminateClick() }, h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (h("span", { class: "indeterminate" })) || (h("bcm-checkbox-lite", { onClick: (e) => this.handleCheckboxClick(e), checked: checked, "no-caption": true }))), h("div", { class: textContent }, "Select All")), h("div", { class: "divider" }, h("bcm-divider", null)))),
1036
+ // this.empty == false && (
1037
+ h("div", { id: "list-container", class: listContainer, style: listContainerStyle }, this.items.length !== 0 && this.items.map((item) => ((item.type === 'group' ? this.recursiveGroupRenderer(item) : this.itemRenderer(item)))))
1038
+ // )
1039
+ ,
1040
+ // this.loading && (
1041
+ h("div", { id: "loading", class: "loading show" }, h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
1042
+ // )
1043
+ ,
1044
+ // ( this.empty || total == 0 ) && (
1045
+ h("div", { id: "empty", class: "empty" }, h("bcm-empty", null, "No Data"))
1046
+ // )
1047
+ ), infoFooter == true && (h("div", { class: "bcm-listbox-footer" }, h("bcm-text", { scale: "size-1", color: "grey-8" }, checklist.length > 0 && (' ( ' + checklist.length + ' selected ) '), "Total ", h("span", { id: "in-search" }), " ", h("span", { id: "in-total" }, total), " items found."))))), !noCaption && (h("div", { class: "caption-area" }, captionType == "error"
1048
+ ? h("span", { class: captionClasses }, " ", captionError, " ")
1049
+ : caption && h("span", { class: captionClasses }, " ", caption, " ")))));
1050
+ }
1051
+ get el() { return getElement(this); }
1052
+ static get watchers() { return {
1053
+ "_items": ["parseItems"],
1054
+ "value": ["handleChange"]
1055
+ }; }
1056
+ };
1057
+ __decorate$2([
1058
+ IsLoad()
1059
+ ], BcmListbox.prototype, "el", void 0);
1060
+ BcmListbox.style = listboxCss;
1061
+
1062
+ const listboxGroupCss = "@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}:host{display:block}:host(.hidden){display:none}.listbox-group-title{padding:4px 16px;background-color:var(--bcm-color-grey-7);position:sticky;top:0;z-index:1}";
1063
+
1064
+ const uppercase = (str) => str.toUpperCase();
1065
+ const BcmListboxGroup = class {
1066
+ constructor(hostRef) {
1067
+ registerInstance(this, hostRef);
1068
+ this._id = (Math.random() * 4).toString(16).replace('.', '');
1069
+ this.hidden = false;
1070
+ }
1071
+ componentWillLoad() {
1072
+ this.text = uppercase(this.text);
1073
+ }
1074
+ render() {
1075
+ const { text } = this;
1076
+ const classes = classnames('listbox-group');
1077
+ const classesTitle = classnames('listbox-group-title');
1078
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
1079
+ return (h(Host, { class: hostClasses }, h("div", { class: classes }, h("div", { class: classesTitle }, h("bcm-text", { "font-size": "3", color: "slate-100" }, " ", text, " ")), h("slot", null))));
1080
+ }
1081
+ };
1082
+ BcmListboxGroup.style = listboxGroupCss;
1083
+
1084
+ const listboxItemCss = "@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}:host{display:flex;flex:1}:host(.hidden){display:none}.listbox-item{display:flex;flex:1;align-items:stretch;justify-content:flex-start;color:var(--bcm-color-grey-8);user-select:none;background-color:var(--bcm-color-grey-1);display:none}.listbox-item.display{display:flex}.listbox-item-container{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;padding-left:8px;flex:1}.listbox-item-container .avatar{margin-right:4px}.listbox-item-container .check-content{display:flex;align-items:center;justify-content:flex-start;width:16px;min-width:16px;margin-right:4px}.listbox-item-container .check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.listbox-item-container .check-content .indeterminate:after{content:\"\";position:absolute;top:50%;left:9px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}.listbox-item-container .check-content .indeterminate:before{content:\"\";position:absolute;top:-1px;left:0px;width:16px;height:100%;border-radius:2px;background-color:transparent;border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:2}.listbox-item-container .check-content .indeterminate:hover:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.listbox-item-container-html-content{display:flex;align-items:center;justify-content:flex-start;flex-direction:row;cursor:pointer;flex:1}.listbox-item-container-html-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.listbox-item-container-html-content.small{padding:0 8px 0 4px;padding:4px 8px 4px 4px}.listbox-item-container-html-content.medium{padding:8px 8px 8px 4px}.listbox-item-container-html-content.large{padding:8px 8px 8px 4px}.listbox-item-container-text-content{display:flex;align-items:center;justify-content:space-between;flex-direction:row;cursor:pointer;width:100%}.listbox-item-container-text-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.listbox-item-container-text-content.small{padding:0 8px 0 4px;padding:4px 8px 4px 4px}.listbox-item-container-text-content.medium{padding:8px 8px 8px 4px}.listbox-item-container-text-content.large{padding:8px 8px 8px 4px}.listbox-item-container-text-content .icon{text-align:center;margin-right:8px}.listbox-item-container-text-content>div{display:flex;align-items:center;flex-direction:row;word-wrap:break-word}.listbox-item-container.disabled{color:var(--bcm-color-grey-6)}.listbox-item-container.selected{color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.listbox-item-container.selected:hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.listbox-item-container:hover:not(.disabled),.listbox-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}";
1085
+
1086
+ const BcmListboxItem = class {
1087
+ constructor(hostRef) {
1088
+ registerInstance(this, hostRef);
1089
+ this.listboxItemSelected = createEvent(this, "bcm-listbox-item-selected", 7);
1090
+ this.listboxUnchecked = createEvent(this, "bcm-listbox-unchecked", 7);
1091
+ this.listboxChecked = createEvent(this, "bcm-listbox-checked", 7);
1092
+ this.objectMapping = {
1093
+ 'id': "id",
1094
+ 'text': "text",
1095
+ 'icon': "icon",
1096
+ 'avatar': "avatar",
1097
+ 'avatarName': "avatarName",
1098
+ 'avatarImage': "avatarImage",
1099
+ 'secondaryText': "secondaryText",
1100
+ 'tooltipText': "tooltipText",
1101
+ 'selected': "selected",
1102
+ 'checked': "checked",
1103
+ 'disabled': "disabled",
1104
+ };
1105
+ this.display = true;
1106
+ this.avatar = false;
1107
+ this._id = (Math.random() * 4).toString(16).replace('.', '');
1108
+ this.size = 'medium';
1109
+ this.icon = 'bug';
1110
+ this.open = false;
1111
+ this.selected = false;
1112
+ this.checkboxes = false;
1113
+ this.showIcon = false;
1114
+ this.checked = false;
1115
+ this.focused = false;
1116
+ this.hidden = false;
1117
+ this.disabled = false;
1118
+ this._internal_id = "";
1119
+ this.template = null;
1120
+ }
1121
+ componentDidLoad() {
1122
+ if (!this.disabled) {
1123
+ if (this.selected === true) {
1124
+ this.listboxItemSelected.emit(this.itemObject);
1125
+ }
1126
+ this.checkboxes === true && (this.checked === true && (this.listboxChecked.emit(this._id)));
1127
+ }
1128
+ }
1129
+ /**
1130
+ * @desc
1131
+ */
1132
+ handleClick() {
1133
+ if (!this.disabled) {
1134
+ this.checkboxes === true && (this.checked === true && (this.listboxUnchecked.emit(this._id)) || (this.listboxChecked.emit(this._id)));
1135
+ this.checkboxes === false && (this.selected = true,
1136
+ this.listboxItemSelected.emit(this.itemObject));
1137
+ }
1138
+ }
1139
+ handleCheckboxClick(e) {
1140
+ e.preventDefault();
1141
+ }
1142
+ isInternal(event) {
1143
+ var path = event.path || (event.composedPath && event.composedPath());
1144
+ const detect = path
1145
+ && path[0]
1146
+ && path[0].attributes
1147
+ && path[0].attributes['bcm-internal-id']
1148
+ && path[0].attributes['bcm-internal-id'].value;
1149
+ return detect == this._internal_id;
1150
+ }
1151
+ /**
1152
+ * @descc
1153
+ * @param event
1154
+ */
1155
+ ListenListboxCheck(event) {
1156
+ if (this.isInternal(event)) {
1157
+ if (!this.disabled) {
1158
+ if (event.detail && event.detail === this._id) {
1159
+ this.checked = true;
1160
+ }
1161
+ }
1162
+ }
1163
+ }
1164
+ /**
1165
+ * @descc
1166
+ * @param event
1167
+ */
1168
+ ListenListboxUncheck(event) {
1169
+ if (this.isInternal(event)) {
1170
+ if (!this.disabled) {
1171
+ if (event.detail && event.detail === this._id) {
1172
+ this.checked = false;
1173
+ }
1174
+ }
1175
+ }
1176
+ }
1177
+ /**
1178
+ * @descc
1179
+ * @param event
1180
+ */
1181
+ handleListboxClearSelecteds(event) {
1182
+ if (this.checkboxes == false && this.isInternal(event)) {
1183
+ if (!this.disabled) {
1184
+ if (event.detail) {
1185
+ if (event.detail !== this.itemObject) {
1186
+ this.selected = false;
1187
+ }
1188
+ else {
1189
+ this.selected = true;
1190
+ }
1191
+ }
1192
+ }
1193
+ }
1194
+ }
1195
+ templateParser(template) {
1196
+ var rxp = /{{([^}]+)}}/g, str = template, curMatch;
1197
+ while (curMatch = rxp.exec(str)) {
1198
+ template = template.replace("{{" + curMatch[1] + "}}", this.itemObject[curMatch[1]]);
1199
+ }
1200
+ return template;
1201
+ }
1202
+ render() {
1203
+ const { display, focused, selected, size, showIcon, icon, checkboxes, _id, checked, text, avatarName, avatarImage, avatar, secondaryText, tooltipText } = this;
1204
+ const classes = classnames('listbox-item', {
1205
+ 'disabled': this.disabled,
1206
+ 'display': display
1207
+ });
1208
+ const classesContainer = classnames('listbox-item-container', {
1209
+ 'disabled': this.disabled,
1210
+ 'focus': focused,
1211
+ 'selected': selected
1212
+ });
1213
+ const textContent = classnames('listbox-item-container-text-content', size, {
1214
+ 'disabled': this.disabled,
1215
+ 'size-2': size === 'small' || size === 'medium',
1216
+ 'size-3': size === 'large',
1217
+ });
1218
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
1219
+ const htmlContent = classnames('listbox-item-container-html-content', size, {
1220
+ 'disabled': this.disabled,
1221
+ 'size-2': size === 'small' || size === 'medium',
1222
+ 'size-3': size === 'large',
1223
+ });
1224
+ return (h(Host, { class: hostClasses }, h("div", { class: classes }, h("div", { class: classesContainer, onClick: () => this.handleClick() }, checkboxes && (h("div", { class: "check-content" }, h("bcm-checkbox-lite", { id: 'check-' + _id, onClick: (e) => this.handleCheckboxClick(e), checked: checked, disabled: this.disabled }))), this.template && (h("div", { class: htmlContent, title: tooltipText, innerHTML: this.templateParser(this.template) })), this.template == null && (h("div", { class: textContent, title: tooltipText }, h("div", null, (avatar || avatarName || avatarImage) && (h("div", { class: "avatar" }, h("bcm-avatar", Object.assign({ size: "small", name: text }, avatarName && { name: avatarName }, avatarImage && { image: avatarImage })))), showIcon && icon && (h("bcm-icon", { class: "icon", icon: icon })), text && (h("span", { id: "text" }, text)) || (h("slot", null))), h("div", null, (secondaryText) && (h("div", { class: "secondaryText size-1" }, secondaryText)))))))));
1225
+ }
1226
+ get el() { return getElement(this); }
1227
+ };
1228
+ BcmListboxItem.style = listboxItemCss;
1229
+
1230
+ const oldSearchCss = "@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}:host{display:block}:host(.hidden){display:none}";
1231
+
1232
+ var __decorate$1 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1233
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1234
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1235
+ r = Reflect.decorate(decorators, target, key, desc);
1236
+ else
1237
+ for (var i = decorators.length - 1; i >= 0; i--)
1238
+ if (d = decorators[i])
1239
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1240
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1241
+ };
1242
+ const lowercase$1 = (str) => str.toLowerCase();
1243
+ const BcmOldSearch = class {
1244
+ constructor(hostRef) {
1245
+ registerInstance(this, hostRef);
1246
+ this.bcmOnSearch = createEvent(this, "bcm-on-search", 7);
1247
+ this.bcmOnSearchValue = createEvent(this, "bcm-on-search-value", 7);
1248
+ this.data = [];
1249
+ this.searchFields = ['text', 'value' /*, ...*/];
1250
+ this.returnField = 'idx';
1251
+ this.searchSub = null;
1252
+ this.hidden = false;
1253
+ this.onlyChild = false;
1254
+ this.clearable = false;
1255
+ this.searchValue = '';
1256
+ this.searchPlaceholder = 'Search';
1257
+ this.disabled = false;
1258
+ this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
1259
+ this.results = [];
1260
+ }
1261
+ getInput() {
1262
+ return this.el.shadowRoot.querySelector('bcm-old-input');
1263
+ }
1264
+ componentDidLoad() {
1265
+ this.getInput().clearable = this.clearable;
1266
+ }
1267
+ listenBcmChange(e) {
1268
+ e.stopPropagation();
1269
+ }
1270
+ async setValue(value) {
1271
+ await this.getInput().setValue(value);
1272
+ return value;
1273
+ }
1274
+ async select() {
1275
+ await this.getInput().select();
1276
+ this.bcmOnSearch.emit(true);
1277
+ return true;
1278
+ }
1279
+ async setClear() {
1280
+ await this.getInput().setClear();
1281
+ this.bcmOnSearch.emit(true);
1282
+ return true;
1283
+ }
1284
+ async searchArray(value, idFields = null) {
1285
+ // console.log(this.data)
1286
+ let cacheSearchFields = this.searchFields;
1287
+ let arrayResult = [];
1288
+ if (idFields) {
1289
+ this.searchFields = [idFields];
1290
+ }
1291
+ value.forEach(item => {
1292
+ // item = {[idFields]:item}
1293
+ this.results = [];
1294
+ // console.log(this.data)
1295
+ this.nestedSearch(this.data, item, true);
1296
+ arrayResult.push(...this.results);
1297
+ });
1298
+ this.searchFields = cacheSearchFields;
1299
+ return arrayResult;
1300
+ // await this.getInput().setValue( value )
1301
+ // return value
1302
+ }
1303
+ nestedSearch(items, value, equal = false) {
1304
+ var result;
1305
+ items && (items.map((item) => {
1306
+ this.searchFields.map(searchField => {
1307
+ if (searchField in item) {
1308
+ // debugger;
1309
+ item[searchField] = lowercase$1(String(item[searchField]));
1310
+ if (this.onlyChild) {
1311
+ if (item[this.searchSub]) {
1312
+ var temp = this.nestedSearch(item[this.searchSub], value, equal);
1313
+ if (temp) {
1314
+ this.results.push((result = String(item[this.returnField])));
1315
+ this.results.push(temp);
1316
+ }
1317
+ }
1318
+ else {
1319
+ if (equal) {
1320
+ // console.log(value)
1321
+ if (item[searchField] == lowercase$1(String(value))) {
1322
+ // if (item == lowercase(value)) {
1323
+ this.results.push((result = String(item[this.returnField])));
1324
+ // this.results.push (result = String(item))
1325
+ }
1326
+ }
1327
+ else {
1328
+ if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
1329
+ this.results.push((result = String(item[this.returnField])));
1330
+ }
1331
+ }
1332
+ }
1333
+ }
1334
+ else {
1335
+ if (item[this.searchSub]) {
1336
+ var temp = this.nestedSearch(item[this.searchSub], value, equal);
1337
+ if (temp) {
1338
+ this.results.push((result = String(item[this.returnField])));
1339
+ this.results.push(temp);
1340
+ }
1341
+ }
1342
+ if (equal) {
1343
+ // console.log(value)
1344
+ if (item[searchField] == lowercase$1(String(value))) {
1345
+ // if (item == lowercase(value)) {
1346
+ this.results.push((result = String(item[this.returnField])));
1347
+ // this.results.push (result = String(item))
1348
+ }
1349
+ }
1350
+ else {
1351
+ if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
1352
+ this.results.push((result = String(item[this.returnField])));
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ });
1358
+ }));
1359
+ return result;
1360
+ }
1361
+ /**
1362
+ * @desc
1363
+ * @param value
1364
+ */
1365
+ inputChange(value) {
1366
+ this.results = [];
1367
+ // data prop'unda arama yapılacak (searchFields prop'u içerisindeki alanlar ile)
1368
+ // arama sonucunda eşleyen itemların 'idx', index
1369
+ // değerleri, array şeklinde root component'e
1370
+ // event ile gönderilecek
1371
+ // Örneğin value == 'to' olduğunda aşağıdaki
1372
+ // sonuçlar filtrelenmeli
1373
+ // -->
1374
+ //{ text: 'Mateusz Eaton', idx: 2 },
1375
+ //{ text: 'Tony Vickers', idx: 3 },
1376
+ // result array'i eşleşen itemların
1377
+ // index numaralarını tutacak
1378
+ // results = [2, 3]
1379
+ // Örnek arama
1380
+ // #
1381
+ this.nestedSearch(this.data, value);
1382
+ this.results = Array.from(new Set(this.results));
1383
+ (value && ((this.results.length > 0 && this.bcmOnSearch.emit(this.results)) || this.bcmOnSearch.emit([-1]))) || this.bcmOnSearch.emit(true);
1384
+ this.bcmOnSearchValue.emit(value);
1385
+ }
1386
+ render() {
1387
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
1388
+ return (h(Host, { class: hostClasses }, h("bcm-old-input", { placeholder: this.searchPlaceholder, "no-caption": true, "no-margin": true, "full-width": true, disabled: this.disabled, type: "search", "on-bcm-change": e => this.inputChange(e.detail), value: this.searchValue })));
1389
+ }
1390
+ get el() { return getElement(this); }
1391
+ static get watchers() { return {
1392
+ "searchValue": ["inputChange"]
1393
+ }; }
1394
+ };
1395
+ __decorate$1([
1396
+ IsLoad()
1397
+ ], BcmOldSearch.prototype, "el", void 0);
1398
+ BcmOldSearch.style = oldSearchCss;
1399
+
1400
+ const treeviewCss = "@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}:host{display:flex;flex-direction:column;height:100%;max-height:100%;border:1px solid var(--bcm-color-grey-5);box-sizing:border-box;background-color:#ffffff}:host(.empty) .treeview{display:flex;align-items:center;justify-content:center}.search{padding:8px;padding-bottom:0;margin-bottom:4px}.treeview{height:100%;max-height:100%;overflow:auto;background-color:var(--bcm-color-grey-1);padding:0 8px 8px 0}.treeview.loading{min-height:150px;position:relative;margin:0 8px 8px 8px}.treeview .loading{display:none;align-items:center;justify-content:center;height:100%;width:100%;position:absolute;background-color:rgba(255, 255, 255, 0.03)}.treeview .loading.show{display:flex}.treeview .empty{display:none;align-items:center;justify-content:center;height:100%}.treeview .empty bcm-empty{width:fit-content;margin:auto}.treeview .empty.show{display:flex}footer{text-align:right;padding:4px 8px;background-color:var(--bcm-color-grey-3);user-select:none}";
1401
+
1402
+ var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
1403
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
1404
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
1405
+ r = Reflect.decorate(decorators, target, key, desc);
1406
+ else
1407
+ for (var i = decorators.length - 1; i >= 0; i--)
1408
+ if (d = decorators[i])
1409
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
1410
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
1411
+ };
1412
+ /**
1413
+ * @desc
1414
+ * @param str
1415
+ */
1416
+ const lowercase = (str) => str.toLowerCase();
1417
+ const Bcmtreeview = class {
1418
+ constructor(hostRef) {
1419
+ registerInstance(this, hostRef);
1420
+ this.treeviewChange = createEvent(this, "bcm-treeview-change", 7);
1421
+ this.treeviewSendCheck = createEvent(this, "bcm-treeview-send-check", 7);
1422
+ this.treeviewSendUncheck = createEvent(this, "bcm-treeview-send-uncheck", 7);
1423
+ this.treeviewChecklist = createEvent(this, "bcm-treeview-checklist", 7);
1424
+ this.treeviewItemSelected = createEvent(this, "bcm-treeview-item-selected", 7);
1425
+ this.treeviewClearSelecteds = createEvent(this, "bcm-treeview-clear-selecteds", 7);
1426
+ this.treeviewShowContext = createEvent(this, "bcm-treeview-show-context", 7);
1427
+ this.treeviewUnchecked = createEvent(this, "bcm-treeview-unchecked", 7);
1428
+ this.treeviewChecked = createEvent(this, "bcm-treeview-checked", 7);
1429
+ this.objectMapping = {
1430
+ 'text': 'text',
1431
+ 'icon': 'icon',
1432
+ 'id': 'id',
1433
+ 'items': 'items',
1434
+ 'open': 'open',
1435
+ 'selected': 'selected',
1436
+ 'checked': 'checked',
1437
+ 'tooltipText': 'tooltipText',
1438
+ 'disabled': "disabled",
1439
+ 'favorite': "favorite",
1440
+ };
1441
+ this.checkedObjectList = [];
1442
+ this.allChilds = [];
1443
+ this.onFocus = false;
1444
+ this.minHeight = 200;
1445
+ this.minWidth = 200;
1446
+ this.allOpenCache = false;
1447
+ this.allOpenOnSearch = false;
1448
+ this.parentLength = [{}];
1449
+ this.isSetData = false;
1450
+ this.runClearAndSelect = false;
1451
+ this.checkboxes = false;
1452
+ this.showIcon = false;
1453
+ this.size = 'medium';
1454
+ this.checkedList = [];
1455
+ this.updateCheckedList = [];
1456
+ this.hidden = false;
1457
+ this.search = false;
1458
+ this.searchOnlyChild = false;
1459
+ this.keydown = false;
1460
+ this.allOpen = false;
1461
+ this.fullWidth = false;
1462
+ this.infoFooter = false;
1463
+ this.searchFields = ['text', 'secondaryText', 'tooltipText'];
1464
+ this.searchSub = "items";
1465
+ this.returnField = "id";
1466
+ this._items = [];
1467
+ this.searchPlaceholder = "Search";
1468
+ this.maxHeight = null;
1469
+ this.highlight = false;
1470
+ this.loading = true;
1471
+ this.favIcon = false;
1472
+ this.favIconOnlyChilds = false;
1473
+ this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
1474
+ /**
1475
+ * Component States
1476
+ */
1477
+ this.empty = false;
1478
+ this.showSearch = true;
1479
+ this.items = [];
1480
+ this.total = 0;
1481
+ this.checkCount = 0;
1482
+ this.keyMapForFocus = { 18: false, 87: false };
1483
+ this.checklist = [];
1484
+ this.favoriteList = [];
1485
+ this.checklistSorted = [];
1486
+ this.searchResults = [];
1487
+ }
1488
+ async setData(_data = []) {
1489
+ this.clearAndSelectSearch(false);
1490
+ this.isLoading(true);
1491
+ this.isSetData = true;
1492
+ this.checkedObjectList = [];
1493
+ this.selectedId = null;
1494
+ setTimeout(() => {
1495
+ this._items = _data;
1496
+ this.searchData = JSON.parse(_data);
1497
+ this.calculateMinSizes();
1498
+ this.handleChildProcess();
1499
+ }, 100);
1500
+ return Promise.resolve(true);
1501
+ }
1502
+ async getChecklist() {
1503
+ return this.checkedObjectList;
1504
+ }
1505
+ async getFavorites() {
1506
+ this.getChildItem(this.el).forEach(element => {
1507
+ element[this.objectMapping['favorite']] == true && (this.favIconOnlyChilds && element[this.objectMapping['items']].length == 0 && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))),
1508
+ !this.favIconOnlyChilds && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))));
1509
+ });
1510
+ return this.favoriteList;
1511
+ }
1512
+ async selected(id) {
1513
+ this.selectedId = id;
1514
+ }
1515
+ async clearAndSelectSearch(select = true) {
1516
+ this.runClearAndSelect = true;
1517
+ if (this.search === true) {
1518
+ setTimeout(() => {
1519
+ var searchInput = null;
1520
+ searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
1521
+ if (searchInput) {
1522
+ searchInput.setClear();
1523
+ if (select == true) {
1524
+ searchInput.select();
1525
+ }
1526
+ }
1527
+ }, 100);
1528
+ }
1529
+ }
1530
+ async addChecked(items = []) {
1531
+ this.checkedList = items;
1532
+ }
1533
+ async updateChecked(items = []) {
1534
+ this.updateCheckedList = items;
1535
+ }
1536
+ async config(_config) {
1537
+ if (_config['maxHeight']) {
1538
+ typeof _config['maxHeight'] == 'string'
1539
+ ? this.maxHeight = _config['maxHeight']
1540
+ : this.maxHeight = "100%";
1541
+ }
1542
+ if (_config['searchFields']) {
1543
+ if (Array.isArray(_config['searchFields'])) {
1544
+ this.searchFields = _config['searchFields'];
1545
+ }
1546
+ }
1547
+ if (_config['searchable']) {
1548
+ typeof _config['searchable'] == 'boolean'
1549
+ ? this.search = _config['searchable']
1550
+ : this.search = false;
1551
+ }
1552
+ if (_config['searchOnlyChild']) {
1553
+ typeof _config['searchOnlyChild'] == 'boolean'
1554
+ ? this.searchOnlyChild = _config['searchOnlyChild']
1555
+ : this.searchOnlyChild = false;
1556
+ }
1557
+ if (_config['searchPlaceholder']) {
1558
+ typeof _config['searchPlaceholder'] == 'string'
1559
+ ? this.searchPlaceholder = _config['searchPlaceholder']
1560
+ : this.searchPlaceholder = null;
1561
+ }
1562
+ if (_config['fullWidth']) {
1563
+ typeof _config['fullWidth'] == 'boolean'
1564
+ ? this.fullWidth = _config['fullWidth']
1565
+ : this.fullWidth = false;
1566
+ }
1567
+ if (_config['infoFooter']) {
1568
+ typeof _config['infoFooter'] == 'boolean'
1569
+ ? this.infoFooter = _config['infoFooter']
1570
+ : this.infoFooter = false;
1571
+ }
1572
+ if (_config['highlight']) {
1573
+ typeof _config['highlight'] == 'boolean'
1574
+ ? this.highlight = _config['highlight']
1575
+ : this.highlight = false;
1576
+ }
1577
+ if (_config['checkable']) {
1578
+ typeof _config['checkable'] == 'boolean'
1579
+ ? this.checkboxes = _config['checkable']
1580
+ : this.checkboxes = false;
1581
+ }
1582
+ if (_config['showIcon']) {
1583
+ typeof _config['showIcon'] == 'boolean'
1584
+ ? this.showIcon = _config['showIcon']
1585
+ : this.showIcon = false;
1586
+ }
1587
+ if (_config['favIcon']) {
1588
+ typeof _config['favIcon'] == 'boolean'
1589
+ ? this.favIcon = _config['favIcon']
1590
+ : this.favIcon = false;
1591
+ }
1592
+ if (_config['favIconOnlyChilds']) {
1593
+ typeof _config['favIconOnlyChilds'] == 'boolean'
1594
+ ? this.favIconOnlyChilds = _config['favIconOnlyChilds']
1595
+ : this.favIconOnlyChilds = false;
1596
+ }
1597
+ if (_config['allOpen']) {
1598
+ typeof _config['allOpen'] == 'boolean'
1599
+ ? this.allOpen = _config['allOpen']
1600
+ : this.allOpen = false;
1601
+ }
1602
+ this.allOpenCache = this.allOpen;
1603
+ if (_config['size']) {
1604
+ (["small", "medium", "large"].indexOf(_config['size']) >= 0)
1605
+ ? this.size = _config['size']
1606
+ : this.size = 'medium';
1607
+ }
1608
+ if (_config['mapping']) {
1609
+ if (_config['mapping']['text']) {
1610
+ this.objectMapping['text'] = _config['mapping']['text'];
1611
+ }
1612
+ if (_config['mapping']['icon']) {
1613
+ this.objectMapping['icon'] = _config['mapping']['icon'];
1614
+ }
1615
+ if (_config['mapping']['id']) {
1616
+ this.objectMapping['id'] = _config['mapping']['id'];
1617
+ this.returnField = this.objectMapping['id'];
1618
+ }
1619
+ if (_config['mapping']['items']) {
1620
+ this.objectMapping['items'] = _config['mapping']['items'];
1621
+ this.searchSub = this.objectMapping['items'];
1622
+ }
1623
+ if (_config['mapping']['open']) {
1624
+ this.objectMapping['open'] = _config['mapping']['open'];
1625
+ }
1626
+ if (_config['mapping']['selected']) {
1627
+ this.objectMapping['selected'] = _config['mapping']['selected'];
1628
+ }
1629
+ if (_config['mapping']['checked']) {
1630
+ this.objectMapping['checked'] = _config['mapping']['checked'];
1631
+ }
1632
+ if (_config['mapping']['tooltipText']) {
1633
+ this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
1634
+ }
1635
+ if (_config['mapping']['disabled']) {
1636
+ this.objectMapping['disabled'] = _config['mapping']['disabled'];
1637
+ }
1638
+ if (_config['mapping']['favorite']) {
1639
+ this.objectMapping['favorite'] = _config['mapping']['favorite'];
1640
+ }
1641
+ }
1642
+ // sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
1643
+ return Promise.resolve(true);
1644
+ }
1645
+ calculateMinSizes() {
1646
+ if (this.minHeight < this.el.clientHeight) {
1647
+ this.minHeight = this.el.clientHeight;
1648
+ }
1649
+ }
1650
+ connectedCallback() { }
1651
+ componentWillLoad() { }
1652
+ componentWillRender() {
1653
+ if (sessionStorage.getItem(this._internal_id + "-config")) {
1654
+ this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
1655
+ }
1656
+ }
1657
+ componentDidRender() {
1658
+ // this.isEmpty(true)
1659
+ // if(this.total > 0) {
1660
+ // this.isEmpty(false)
1661
+ // }
1662
+ }
1663
+ // componentDidLoad(){
1664
+ // this.handleChildProcess()
1665
+ // setTimeout(() => {
1666
+ // if(this.isSetData) {
1667
+ // this.isLoading(true)
1668
+ // this.isEmpty(false)
1669
+ // }else{
1670
+ // this.isLoading(false)
1671
+ // this.isEmpty(true)
1672
+ // }
1673
+ // }, 1000);
1674
+ // // this.isEmpty(true)
1675
+ // }
1676
+ componentWillUpdate() { }
1677
+ // componentWillRender(){}
1678
+ // componentDidRender(){}
1679
+ componentDidUpdate() {
1680
+ if (this.checkboxes === true) {
1681
+ this.checkedObjectList = [];
1682
+ if (this.checklistSorted.length > 0) {
1683
+ this.getChildItem(this.el).forEach(element => {
1684
+ element.checked == true && (this.checkedObjectList.indexOf(element.itemObject) < 0 && (this.checkedObjectList.push(element.itemObject)));
1685
+ });
1686
+ this.treeviewChecklist.emit(this.checkedObjectList);
1687
+ }
1688
+ else {
1689
+ this.treeviewChecklist.emit([]);
1690
+ }
1691
+ }
1692
+ }
1693
+ parseItems(newValue) {
1694
+ if (newValue) {
1695
+ typeof newValue == 'string'
1696
+ ? this.items = JSON.parse(newValue)
1697
+ : this.items = newValue;
1698
+ }
1699
+ this.handleChildProcess();
1700
+ }
1701
+ handleChildProcess() {
1702
+ setTimeout(() => {
1703
+ this.allChilds = this.getAllChilds();
1704
+ this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length;
1705
+ if (this.total > 0) {
1706
+ // setTimeout(() => {
1707
+ this.isLoading(false);
1708
+ // }, 100);
1709
+ this.isEmpty(false);
1710
+ }
1711
+ else {
1712
+ // setTimeout(() => {
1713
+ this.isLoading(false);
1714
+ this.isEmpty(true);
1715
+ // }, 100);
1716
+ }
1717
+ }, 100);
1718
+ }
1719
+ /**
1720
+ * @desc
1721
+ * @param group
1722
+ */
1723
+ recursiveItemRenderer(group, parentGroup) {
1724
+ const sId = String(this.selectedId);
1725
+ const gId = String(group[this.objectMapping['id']]);
1726
+ const isSelected = String(group[this.objectMapping['selected']]) === 'true' ? true : false;
1727
+ if (sId === gId || isSelected) {
1728
+ this.treeviewItemSelected.emit(group);
1729
+ }
1730
+ return (h("bcm-treeview-item", Object.assign({ _internal_id: this._internal_id, text: group[this.objectMapping['text']], icon: group[this.objectMapping['icon']], id: group[this.objectMapping['id']], size: this.size, "has-child": !!group[this.objectMapping['items']] }, (parentGroup && { 'parent-id': parentGroup[this.objectMapping['id']] }), (group[this.objectMapping['tooltipText']] && { tooltipText: group[this.objectMapping['tooltipText']] }), (String(group[this.objectMapping['checked']]) === "true" && { checkTrigger: true }), (String(group[this.objectMapping['open']]) === "true" && { open: true }), (String(group[this.objectMapping['selected']]) === "true" && { selected: true }), (String(group[this.objectMapping['disabled']]) === "true" && { disabled: true }), (group[this.objectMapping['items']] && { items: group[this.objectMapping['items']] }), (this.favIcon && !this.favIconOnlyChilds && { favicon: true }), (this.favIcon && this.favIconOnlyChilds && group[this.objectMapping['items']].length == 0 && { favicon: true }), (this.favIcon && group.rightSlot && { favorite: group.rightSlot[this.objectMapping['favorite']] }), (this.showIcon && { showIcon: true }), (String(this.checkboxes) === "true" && { checkboxes: true }), ((this.allOpen || this.allOpenOnSearch) && { open: true }), { itemObject: group }, ((this.checkedList && this.checkedList.find(e => e == group[this.objectMapping['id']]))) && { checkTrigger: true }, (this.updateCheckedList.length > 0 &&
1731
+ ((this.updateCheckedList.find(e => e == group[this.objectMapping['id']])) && { checkTrigger: true }))), group[this.objectMapping['items']] && group[this.objectMapping['items']].map((item) => (this.recursiveItemRenderer(item, group)))));
1732
+ }
1733
+ /**
1734
+ * @desc
1735
+ */
1736
+ handleCheckList(process = 'add', checkId) {
1737
+ // console.log(checkId)
1738
+ if (this.checkboxes === true) {
1739
+ // const { checklist } = this
1740
+ // checkId = Number(checkId)
1741
+ switch (process) {
1742
+ case 'add':
1743
+ if (this.checklist.length > 0) {
1744
+ this.checklist.indexOf(checkId) < 0 && (this.checklist = [...this.checklist, checkId]);
1745
+ }
1746
+ else {
1747
+ this.checklist = [checkId];
1748
+ }
1749
+ break;
1750
+ case 'remove':
1751
+ this.checklist = this.checklist.filter(item => item !== checkId);
1752
+ break;
1753
+ }
1754
+ let sorted = this.checklist.sort(function (a, b) { return a - b; });
1755
+ this.checklistSorted = sorted;
1756
+ // console.log('sorted: ', sorted)
1757
+ this.checkCount = this.checklistSorted.length;
1758
+ }
1759
+ }
1760
+ async showSearchMethod(val = true) {
1761
+ this.showSearch = val;
1762
+ // return val
1763
+ }
1764
+ async searchResultMethod(items = []) {
1765
+ // this.listenSearchResult({ detail: items })
1766
+ await customElements.whenDefined("bcm-old-search");
1767
+ const search = this.el.shadowRoot.querySelector("bcm-old-search");
1768
+ const detail = await search.searchArray(items, this.objectMapping['id']);
1769
+ await this.listenSearchResult({ detail: detail });
1770
+ // return true
1771
+ }
1772
+ isLoading(val) {
1773
+ var treeview = this.el.shadowRoot.getElementById("treeview");
1774
+ var loading = this.el.shadowRoot.getElementById("loading");
1775
+ var searchInput = this.el.shadowRoot.querySelector("bcm-old-search");
1776
+ // var listcontainer = this.el.shadowRoot.getElementById("list-container")
1777
+ if (val === true) {
1778
+ treeview && treeview.classList.add('loading');
1779
+ loading && loading.classList.add('show');
1780
+ if (searchInput) {
1781
+ searchInput.disabled = true;
1782
+ }
1783
+ // listcontainer && listcontainer.classList.add('hidden')
1784
+ }
1785
+ else {
1786
+ treeview && treeview.classList.remove('loading');
1787
+ loading && loading.classList.remove('show');
1788
+ if (searchInput) {
1789
+ searchInput.disabled = false;
1790
+ }
1791
+ // listcontainer && listcontainer.classList.remove('hidden')
1792
+ }
1793
+ return false;
1794
+ }
1795
+ isEmpty(val) {
1796
+ var empty = this.el.shadowRoot.getElementById("empty");
1797
+ // var listcontainer = this.el.shadowRoot.getElementById("list-container")
1798
+ if (val === true) {
1799
+ empty && empty.classList.add('show');
1800
+ // listcontainer && listcontainer.classList.add('hidden')
1801
+ }
1802
+ else {
1803
+ empty && empty.classList.remove('show');
1804
+ // listcontainer && listcontainer.classList.remove('hidden')
1805
+ }
1806
+ }
1807
+ isSearchCount(val = null) {
1808
+ if (this.infoFooter === true) {
1809
+ var inSearch = this.el.shadowRoot.getElementById("in-search");
1810
+ var inTotal = this.el.shadowRoot.getElementById("in-total");
1811
+ if (val >= 0 && val != null && inSearch && inTotal) {
1812
+ inSearch.innerHTML = val;
1813
+ inTotal.style.display = "none";
1814
+ }
1815
+ else {
1816
+ inTotal.style.display = "inline";
1817
+ inSearch.innerHTML = "";
1818
+ }
1819
+ }
1820
+ // if (val > 0){
1821
+ // this.isEmpty(false)
1822
+ // }
1823
+ }
1824
+ listenSearchResult(e) {
1825
+ this.parentLength = [];
1826
+ var searchValue = '';
1827
+ // this.searchResults = e.detail
1828
+ var totalSearch = e.detail.length;
1829
+ this.empty = false;
1830
+ var getAllChilds = this.getAllChilds();
1831
+ this.isEmpty(false);
1832
+ if (e.detail.length > 0) {
1833
+ // this.allOpenOnSearch = true
1834
+ if (e.detail[0] == -1) {
1835
+ totalSearch = 0;
1836
+ this.empty = true;
1837
+ this.isEmpty(true);
1838
+ }
1839
+ if (getAllChilds.length > 0) {
1840
+ getAllChilds.map((item) => {
1841
+ var isParent = false;
1842
+ if (this.searchOnlyChild && item.items && item.items.length > 0) {
1843
+ isParent = true;
1844
+ }
1845
+ e.target.addEventListener('bcm-on-search-value', async (e) => {
1846
+ searchValue = await e.detail;
1847
+ var inputText = item.shadowRoot.getElementById("text");
1848
+ inputText = inputText.textContent || inputText.innerText || "";
1849
+ if (searchValue) {
1850
+ var cacheInputText = lowercase(inputText);
1851
+ var cacheSearchValue = lowercase(searchValue);
1852
+ var index = cacheInputText.indexOf(cacheSearchValue);
1853
+ if (index >= 0) {
1854
+ if (isParent == false) {
1855
+ if (this.parentLength.indexOf(item.id) === -1) {
1856
+ this.parentLength.push(item.id);
1857
+ }
1858
+ if (this.highlight) {
1859
+ inputText = inputText.substring(0, index)
1860
+ + "<span class='highlight'>"
1861
+ + inputText.substring(index, index + searchValue.length)
1862
+ + "</span>"
1863
+ + inputText.substring(index + searchValue.length);
1864
+ }
1865
+ }
1866
+ }
1867
+ }
1868
+ item.shadowRoot.getElementById("text").innerHTML = inputText;
1869
+ });
1870
+ item.hidden = true;
1871
+ var _ids = item.id;
1872
+ if (e.detail.indexOf(_ids) >= 0) {
1873
+ item.hidden = false;
1874
+ item.open = true;
1875
+ setTimeout(() => {
1876
+ if (this.parentLength.indexOf(item.id) !== -1 && item.items && item.items.length > 0 && this.searchOnlyChild == false) {
1877
+ const getChilds = (item) => {
1878
+ this.getAllChilds(item).map(element => {
1879
+ element.hidden = false;
1880
+ element.open = true;
1881
+ getChilds(element);
1882
+ });
1883
+ };
1884
+ getChilds(item);
1885
+ }
1886
+ }, 1);
1887
+ }
1888
+ else {
1889
+ item.hidden = true;
1890
+ }
1891
+ });
1892
+ }
1893
+ }
1894
+ else {
1895
+ // this.allOpenOnSearch = this.allOpenCache
1896
+ if (getAllChilds.length > 0) {
1897
+ getAllChilds.map((item) => {
1898
+ item.hidden = false;
1899
+ });
1900
+ }
1901
+ // this.isEmpty(true)
1902
+ }
1903
+ // if ( this.searchOnlyChild ) {
1904
+ // this.isSearchCount(highlightLength)
1905
+ // }else{
1906
+ setTimeout(() => {
1907
+ if (totalSearch >= 0) {
1908
+ var totals = totalSearch - Number(totalSearch - this.parentLength.length);
1909
+ this.isSearchCount(totals > 0 ? totals : 0);
1910
+ }
1911
+ else {
1912
+ this.isSearchCount();
1913
+ }
1914
+ if (e.detail[0] === -1) {
1915
+ this.isSearchCount(0);
1916
+ }
1917
+ if (e.detail === true) {
1918
+ this.isSearchCount();
1919
+ }
1920
+ }, 100);
1921
+ // }
1922
+ if (e.detail === true) {
1923
+ this.isEmpty(false);
1924
+ }
1925
+ }
1926
+ getAllChilds(element = this.el) {
1927
+ let returnAllItems = [];
1928
+ getChilds(element, 'bcm-treeview-item').forEach(items => {
1929
+ this.getAllChilds(items) && (returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items))
1930
+ // returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]
1931
+ );
1932
+ returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items));
1933
+ // returnAllItems = [...returnAllItems,
1934
+ // items
1935
+ // ]
1936
+ });
1937
+ return returnAllItems;
1938
+ }
1939
+ /**
1940
+ * @desc
1941
+ */
1942
+ handletreeviewItemSelected(event) {
1943
+ this.treeviewClearSelecteds.emit(event.detail);
1944
+ }
1945
+ /**
1946
+ * @desc
1947
+ */
1948
+ handletreeviewChecked(event) {
1949
+ // this.treeviewSendCheck.emit(event.detail)
1950
+ this.handleCheckList('add', event.detail);
1951
+ // this.treeviewChange.emit(event.detail)
1952
+ }
1953
+ /**
1954
+ * @desc
1955
+ */
1956
+ // @Listen('bcm-treeview-check-group-check')
1957
+ // bcmTreeviewCheckGroupChecked(event: any) {
1958
+ // console.log(event)
1959
+ // this.treeviewSendCheck.emit(event.detail)
1960
+ // this.handleCheckList('add',event.detail)
1961
+ // this.treeviewChange.emit(event.detail)
1962
+ // }
1963
+ /**
1964
+ * @desc
1965
+ */
1966
+ handletreeviewUnchecked(event) {
1967
+ // this.treeviewSendUncheck.emit(event.detail)
1968
+ this.handleCheckList('remove', event.detail);
1969
+ // this.treeviewChange.emit(event.detail)
1970
+ }
1971
+ /**
1972
+ * @desc
1973
+ */
1974
+ handletreeviewIndeterminateChecked(event) {
1975
+ this.handleCheckList('add', event.detail);
1976
+ }
1977
+ /**
1978
+ * @desc
1979
+ */
1980
+ handletreeviewIndeterminateUnchecked(event) {
1981
+ this.handleCheckList('remove', event.detail);
1982
+ }
1983
+ treeviewUncheckedMethod(item) {
1984
+ this.handletreeviewUnchecked({ "detail": item });
1985
+ this.componentDidUpdate();
1986
+ return Promise.resolve(true);
1987
+ }
1988
+ /**
1989
+ * @desc
1990
+ * Keyboard Navigation
1991
+ */
1992
+ getIndex(item) {
1993
+ return Array.from(item.parentNode.children).indexOf(item);
1994
+ }
1995
+ /**
1996
+ * @desc
1997
+ * Keyboard Navigation
1998
+ */
1999
+ getNext(item) {
2000
+ let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) + 1];
2001
+ if (returnItem)
2002
+ return returnItem;
2003
+ return false;
2004
+ }
2005
+ /**
2006
+ * @desc
2007
+ * Keyboard Navigation
2008
+ */
2009
+ getPrev(item) {
2010
+ let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) - 1];
2011
+ if (returnItem)
2012
+ return returnItem;
2013
+ return false;
2014
+ }
2015
+ /**
2016
+ * @desc
2017
+ * Keyboard Navigation
2018
+ */
2019
+ getParent(item) {
2020
+ if (lowercase(item.parentElement.tagName) == 'bcm-treeview') {
2021
+ return false;
2022
+ }
2023
+ else {
2024
+ return this.getChildItem(item.parentElement.parentElement)[this.getIndex(item.parentElement)];
2025
+ }
2026
+ }
2027
+ /**
2028
+ * @desc
2029
+ * Keyboard Navigation
2030
+ */
2031
+ getNextParent(item) {
2032
+ let getParent = this.getParent(item);
2033
+ let getNext;
2034
+ if (getParent) {
2035
+ getNext = this.getNext(getParent);
2036
+ if (getNext) {
2037
+ return getNext;
2038
+ }
2039
+ else {
2040
+ return this.getNextParent(getParent);
2041
+ }
2042
+ }
2043
+ }
2044
+ /**
2045
+ * @desc
2046
+ * Keyboard Navigation
2047
+ */
2048
+ getFirstItem(el = this.el) {
2049
+ return this.getChildItem(el)[0];
2050
+ }
2051
+ /**
2052
+ * @desc
2053
+ * Keyboard Navigation
2054
+ */
2055
+ getLastItem(el = this.el) {
2056
+ let childLength = this.getChildItem(el).length;
2057
+ let lastChild = this.getChildItem(el)[childLength - 1];
2058
+ if (this.getChildItem(lastChild).length > 0 && lastChild.open == true) {
2059
+ return this.getLastItem(lastChild);
2060
+ }
2061
+ else {
2062
+ return lastChild;
2063
+ }
2064
+ }
2065
+ /**
2066
+ * @desc
2067
+ * Keyboard Navigation
2068
+ */
2069
+ getChildItem(element = this.el) {
2070
+ let returnItems = getChilds(element, 'bcm-treeview-item');
2071
+ if (returnItems)
2072
+ return returnItems;
2073
+ return 0;
2074
+ }
2075
+ /**
2076
+ * @desc
2077
+ */
2078
+ handleRightClick(e) {
2079
+ this.treeviewShowContext.emit([e.target.id, e.clientY, e.clientX]);
2080
+ e.preventDefault();
2081
+ }
2082
+ /**
2083
+ * @desc
2084
+ */
2085
+ keyboardNavigationUp(e) {
2086
+ let { keyMapForFocus } = this;
2087
+ if (e.keyCode in keyMapForFocus) {
2088
+ keyMapForFocus[e.keyCode] = false;
2089
+ }
2090
+ }
2091
+ /**
2092
+ * @desc
2093
+ */
2094
+ keyboardNavigation(e) {
2095
+ if (this.keydown) {
2096
+ const { keyMapForFocus, focusedElement, el } = this;
2097
+ this.focusedElement = !focusedElement ? el : focusedElement;
2098
+ const which = e.which || 0;
2099
+ if (this.getChildItem(el).length > 0) {
2100
+ if (e.keyCode in keyMapForFocus) {
2101
+ keyMapForFocus[e.keyCode] = true;
2102
+ if (keyMapForFocus[18] && keyMapForFocus[87]) {
2103
+ e.preventDefault();
2104
+ this.focusedElement = this.getFirstItem(this.focusedElement);
2105
+ }
2106
+ }
2107
+ if (which == 9 || //tab
2108
+ which == 13 || //enter
2109
+ which == 18 || //alt
2110
+ which == 32 || //space
2111
+ which == 35 || // end
2112
+ which == 36 || // home
2113
+ (which >= 35 && which <= 40) //end, home, left arrow, up arrow, right arrow, down arrow
2114
+ ) {
2115
+ e.preventDefault();
2116
+ if (!focusedElement) {
2117
+ this.focusedElement = this.getFirstItem(this.focusedElement);
2118
+ }
2119
+ else {
2120
+ this.focusedElement.focused = false;
2121
+ switch (which) {
2122
+ case 13: // enter
2123
+ this.focusedElement.selected = true;
2124
+ break;
2125
+ case 32: // space
2126
+ this.focusedElement.checked && (this.treeviewUnchecked.emit(this.focusedElement.id)) || (this.treeviewChecked.emit(this.focusedElement.id));
2127
+ break;
2128
+ case 35: // end
2129
+ this.focusedElement = this.getLastItem(this.focusedElement.parentElement);
2130
+ break;
2131
+ case 36: // home
2132
+ this.focusedElement = this.getFirstItem(this.focusedElement.parentElement);
2133
+ break;
2134
+ case 37: // left arrow
2135
+ if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2136
+ this.focusedElement.open = false;
2137
+ }
2138
+ else {
2139
+ if (this.getParent(this.focusedElement)) {
2140
+ this.focusedElement = this.getParent(this.focusedElement);
2141
+ }
2142
+ }
2143
+ break;
2144
+ case 38: // up arrow
2145
+ if (this.getPrev(this.focusedElement)) {
2146
+ this.focusedElement = this.getPrev(this.focusedElement);
2147
+ if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2148
+ this.focusedElement = this.getLastItem(this.focusedElement);
2149
+ }
2150
+ }
2151
+ else if (this.getParent(this.focusedElement)) {
2152
+ this.focusedElement = this.getParent(this.focusedElement);
2153
+ }
2154
+ break;
2155
+ case 39: // right arrow
2156
+ if (this.getChildItem(this.focusedElement).length > 0) {
2157
+ if (this.focusedElement.open == true) {
2158
+ this.focusedElement = this.getFirstItem(this.focusedElement);
2159
+ }
2160
+ else {
2161
+ this.focusedElement.open = true;
2162
+ }
2163
+ }
2164
+ break;
2165
+ case 40: // down arrow
2166
+ if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2167
+ this.focusedElement = this.getFirstItem(this.focusedElement);
2168
+ }
2169
+ else if (this.getNext(this.focusedElement)) {
2170
+ this.focusedElement = this.getNext(this.focusedElement);
2171
+ }
2172
+ else if (this.getNextParent(this.focusedElement)) {
2173
+ this.focusedElement = this.getNextParent(this.focusedElement);
2174
+ }
2175
+ break;
2176
+ }
2177
+ }
2178
+ }
2179
+ if (this.focusedElement)
2180
+ this.focusedElement.focused = true;
2181
+ }
2182
+ }
2183
+ }
2184
+ handleFocus(focusEvent = false) {
2185
+ this.onFocus = focusEvent;
2186
+ }
2187
+ render() {
2188
+ const { searchOnlyChild, searchPlaceholder, search, checkCount, searchData, searchFields, searchSub, returnField, total, fullWidth, infoFooter, showSearch } = this;
2189
+ const hostClasses = classnames(this.hidden ? 'hidden' : null, {
2190
+ 'empty': this.empty,
2191
+ 'full-width': fullWidth
2192
+ });
2193
+ const customStyles = {
2194
+ // 'min-height': this.minHeight + 'px',
2195
+ 'min-width': this.minWidth + 'px',
2196
+ 'max-height': this.maxHeight
2197
+ };
2198
+ return (h(Host, { class: hostClasses, style: customStyles }, search && (h("div", { class: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, h("bcm-old-search", { onlyChild: searchOnlyChild, searchPlaceholder: searchPlaceholder, "on-bcm-focus": () => this.handleFocus(true), "on-bcm-blur": () => this.handleFocus(false), data: searchData, returnField: returnField, searchFields: searchFields, searchSub: searchSub, clearable: true }), h("bcm-divider", null))), h("div", { id: "treeview", class: "treeview loading" },
2199
+ // this.loading && (
2200
+ h("div", { id: "loading", class: "loading show" }, h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
2201
+ // )
2202
+ ,
2203
+ // this.empty && (
2204
+ h("div", { id: "empty", class: "empty" }, h("bcm-empty", null, "No Data"))
2205
+ // )
2206
+ , !this.empty && this.items.length !== 0 && this.items.map((item) => (this.recursiveItemRenderer(item, null)))), infoFooter == true && (h("footer", null, h("bcm-text", { scale: "size-1", color: "grey-8" }, checkCount > 0 && ('( ' + checkCount + ' items selected ) '), "Total ", h("span", { id: "in-search" }), " ", h("span", { id: "in-total" }, total), " items found.")))));
2207
+ }
2208
+ get el() { return getElement(this); }
2209
+ static get watchers() { return {
2210
+ "_items": ["parseItems"]
2211
+ }; }
2212
+ };
2213
+ __decorate([
2214
+ IsLoad()
2215
+ ], Bcmtreeview.prototype, "el", void 0);
2216
+ Bcmtreeview.style = treeviewCss;
2217
+
2218
+ const treeviewItemCss = "@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}:host(.hidden){display:none}.treeview-item{display:flex;align-items:stretch;justify-content:flex-start;color:var(--bcm-color-grey-8);padding-left:8px;user-select:none;background-color:var(--bcm-color-grey-1)}.treeview-item-context-menu{display:none;position:absolute;height:auto;background-color:#ffffff;align-items:center;justify-content:center;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25)}.treeview-item-context-menu.show{display:flex}.treeview-item-context-menu span{text-align:left;min-width:100px;padding:5px 8px;font-size:14px;line-height:22px;color:var(--bcm-color-grey-8)}.treeview-item-context-menu span:hover{cursor:pointer;color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item.focus .treeview-item-container{border:2px solid var(--bcm-color-prime-blue-2)}.treeview-item-container{width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.treeview-item-container.disabled{color:var(--bcm-color-grey-6)}.treeview-item-container.disabled .text-content{cursor:not-allowed}.treeview-item-container.selected:not(.disabled){color:var(--bcm-color-prime-blue-6)}.treeview-item-container.selected:not(.disabled):hover:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item-container:hover:not(.disabled),.treeview-item-container:active:not(.disabled){color:var(--bcm-color-prime-blue-6);background-color:var(--bcm-color-prime-blue-1)}.treeview-item-container>section:not(.favicon){display:flex;align-items:stretch;justify-content:flex-start;border:2px solid transparent;flex:1}.treeview-item-container>section.favicon{display:flex;align-items:center;justify-content:center;padding:0 5px;height:100%;cursor:pointer}.treeview-item-container>section.favicon:not(.favorite){display:none}.treeview-item-container:hover:not(.disabled) .favicon{display:flex}.treeview-inner{display:none}.treeview-inner.open{display:block}.collapse-content{display:flex;align-items:center;justify-content:center;width:16px;min-width:16px}.collapse-content.child{cursor:pointer}.check-content{display:flex;align-items:center;justify-content:flex-start;width:24px;min-width:24px;padding-left:8px}.check-content .indeterminate{width:16px;height:16px;position:relative;display:block;padding-right:8px;cursor:pointer}.check-content .indeterminate:after{content:\"\";position:absolute;top:50%;left:9px;width:10px;height:10px;background-color:var(--bcm-color-prime-blue-6);transform:translate(-50%, -50%);opacity:1;z-index:1}.check-content .indeterminate:before{content:\"\";position:absolute;top:-1px;left:0px;width:16px;height:100%;border-radius:2px;background-color:transparent;border:1px solid var(--bcm-color-grey-5);opacity:1;z-index:2}.check-content .indeterminate:hover:not(.disabled):before{border-color:var(--bcm-color-prime-blue-6);box-shadow:0px 2px 4px rgba(54, 121, 171, 0.5)}.check-content .indeterminate.disabled{cursor:not-allowed;background:linear-gradient(90deg, var(--bcm-color-grey-3) 18px, transparent 0px);border-color:var(--bcm-color-grey-3)}.check-content .indeterminate.disabled:after{background-color:var(--bcm-color-grey-6)}.check-content .indeterminate.disabled bcm-icon{filter:brightness(0);opacity:0.3}.text-content{display:flex;align-items:center;justify-content:space-between;cursor:pointer;width:100%;flex:1}.text-content .favicon{display:flex;flex-direction:row;align-items:center;grid-gap:4px}.text-content #text .highlight{background-color:var(--bcm-color-yellow-5)}.text-content.small{padding:0 8px 0 4px}.text-content.medium{padding:4px 8px 4px 4px}.text-content.large{padding:8px 8px 8px 4px}.text-content .icon{text-align:center;margin-right:8px}";
2219
+
2220
+ const BcmtreeviewItem = class {
2221
+ constructor(hostRef) {
2222
+ registerInstance(this, hostRef);
2223
+ this.treeviewItemSelected = createEvent(this, "bcm-treeview-item-selected", 7);
2224
+ this.treeviewUnchecked = createEvent(this, "bcm-treeview-unchecked", 7);
2225
+ this.treeviewChecked = createEvent(this, "bcm-treeview-checked", 7);
2226
+ this.treeviewChange = createEvent(this, "bcm-treeview-change", 7);
2227
+ this.treeviewIndeterminateUnchecked = createEvent(this, "bcm-treeview-indeterminate-unchecked", 7);
2228
+ this.treeviewIndeterminateChecked = createEvent(this, "bcm-treeview-indeterminate-checked", 7);
2229
+ this.itemChecked = createEvent(this, "bcm-treeview-check-item-checked", 7);
2230
+ this.itemUnchecked = createEvent(this, "bcm-treeview-check-item-unchecked", 7);
2231
+ this.groupCheck = createEvent(this, "bcm-treeview-check-group-check", 7);
2232
+ this.favoriteStatus = createEvent(this, "bcm-favorite-status", 7);
2233
+ this.firstRun = true;
2234
+ this._id = (Math.random() * 4).toString(16).replace('.', '');
2235
+ this.hasChild = false;
2236
+ this.size = 'medium';
2237
+ this.icon = 'bug';
2238
+ this.open = false;
2239
+ this.selected = false;
2240
+ this.checkboxes = false;
2241
+ this.showIcon = false;
2242
+ this.favicon = false;
2243
+ this.favorite = false;
2244
+ this.checked = false;
2245
+ this.checkTrigger = false;
2246
+ this.focused = false;
2247
+ this.disabled = false;
2248
+ this.contextMenuShow = false;
2249
+ this._contextMenu = [];
2250
+ this.indeterminateState = 'uncheck';
2251
+ this._internal_id = "";
2252
+ this.menuPadding = 0;
2253
+ this.childLength = 0;
2254
+ this.indeterminate = false;
2255
+ // @State() checkTrigger: boolean = false
2256
+ this.hidden = false;
2257
+ this.contextMenu = [];
2258
+ this.contextOffsetLeft = 0;
2259
+ this.contextOffsetTop = 0;
2260
+ }
2261
+ /**
2262
+ * @ComponentMethod
2263
+ */
2264
+ componentWillLoad() {
2265
+ this.menuPadding = 24;
2266
+ this.childLength = this.el.children.length;
2267
+ this.parseItems(this._contextMenu);
2268
+ }
2269
+ /**
2270
+ * @ComponentMethod
2271
+ */
2272
+ componentDidLoad() {
2273
+ // if (!this.disabled){
2274
+ // // if (this.selected) this.treeviewItemSelected.emit(this.itemObject)
2275
+ // if (this.checked){
2276
+ // // this.treeviewChecked.emit(this._id)
2277
+ // this.handleCheckMouseUp()
2278
+ // }
2279
+ // }
2280
+ if (!this.disabled && this.firstRun && this.checkTrigger) {
2281
+ this.firstRun = false;
2282
+ this.handleCheckMouseUp();
2283
+ }
2284
+ }
2285
+ /**
2286
+ * @desc
2287
+ * @returns {void}
2288
+ */
2289
+ /* setIndeterminateState() {
2290
+ if(this.getAllChilds().length > 0) {
2291
+
2292
+ let state: string = 'uncheck'
2293
+ let allChecked: boolean = true
2294
+ let allUnchecked: boolean = true
2295
+
2296
+ this.getAllChilds().map((item) => {
2297
+ item.checked && (allUnchecked = false)
2298
+ !item.checked && (allChecked = false)
2299
+ });
2300
+
2301
+ !allChecked && !allUnchecked
2302
+ ? state = 'indeterminate'
2303
+ : allChecked
2304
+ ? state = 'determinate'
2305
+ : state = 'uncheck'
2306
+
2307
+ this.indeterminateState = state as any;
2308
+
2309
+ }
2310
+ } */
2311
+ /* @Watch('indeterminateState')
2312
+ onCheckedChange() {
2313
+ if (this.indeterminateState == 'determinate') {
2314
+ this.treeviewChecked.emit(this._id)
2315
+ }else if (this.indeterminateState == 'uncheck') {
2316
+ this.treeviewIndeterminateUnchecked.emit(this._id)
2317
+ this.checked = false
2318
+ }else{
2319
+ this.treeviewIndeterminateUnchecked.emit(this._id)
2320
+ this.checked = false
2321
+ }
2322
+ } */
2323
+ /**
2324
+ * @descc
2325
+ * @param event
2326
+ */
2327
+ handletreeviewClearSelecteds(event) {
2328
+ if (!this.disabled) {
2329
+ if (event.detail && event.detail !== this.itemObject)
2330
+ this.selected = false;
2331
+ }
2332
+ }
2333
+ /**
2334
+ * @descc
2335
+ * @param event
2336
+ */
2337
+ ListentreeviewChange() {
2338
+ //this.setIndeterminateState();
2339
+ }
2340
+ /**
2341
+ * @descc
2342
+ * @param event
2343
+ */
2344
+ ListentreeviewShowContext(event) {
2345
+ this.contextOffsetTop = event.detail[1];
2346
+ this.contextOffsetLeft = event.detail[2];
2347
+ if (event.detail[0] && event.detail[0] === this._id) {
2348
+ this.contextMenuShow = true;
2349
+ }
2350
+ else {
2351
+ this.contextMenuShow = false;
2352
+ }
2353
+ }
2354
+ /**
2355
+ * @desc
2356
+ * @param event
2357
+ */
2358
+ handleWindowClick(event) {
2359
+ const target = event.target;
2360
+ if (target === this.el)
2361
+ return;
2362
+ this.contextMenuShow = false;
2363
+ }
2364
+ /**
2365
+ * @desc
2366
+ */
2367
+ handleClick() {
2368
+ if (!this.disabled) {
2369
+ this.selected = true;
2370
+ this.treeviewItemSelected.emit(this.itemObject);
2371
+ }
2372
+ }
2373
+ /**
2374
+ * @desc
2375
+ */
2376
+ handleFavClick(e) {
2377
+ if (!this.disabled) {
2378
+ this.favorite = !this.favorite;
2379
+ if (!this.itemObject["rightSlot"]) {
2380
+ this.itemObject["rightSlot"] = {};
2381
+ }
2382
+ this.itemObject["rightSlot"]["favorite"] = this.favorite;
2383
+ this.favoriteStatus.emit(this.itemObject);
2384
+ e.stopPropagation();
2385
+ e.preventDefault();
2386
+ }
2387
+ }
2388
+ /**
2389
+ * @desc
2390
+ */
2391
+ handleOpen() {
2392
+ this.open = !this.open;
2393
+ }
2394
+ getRootChilds(element = this.el) {
2395
+ return getChilds(element, 'bcm-treeview-item');
2396
+ }
2397
+ getAllChilds(element = this.el) {
2398
+ let returnAllItems = [];
2399
+ getChilds(element, 'bcm-treeview-item').forEach(items => {
2400
+ this.getAllChilds(items) && (returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]);
2401
+ returnAllItems = [...returnAllItems,
2402
+ items
2403
+ ];
2404
+ });
2405
+ return returnAllItems;
2406
+ }
2407
+ /**
2408
+ * @desc
2409
+ * -
2410
+ */
2411
+ checkGroupState() {
2412
+ // debugger;
2413
+ const childsRoot = this.getRootChilds();
2414
+ let [state, allChecked, allUnchecked] = ['uncheck', true, true];
2415
+ if (childsRoot.length > 0) {
2416
+ childsRoot.forEach(checkbox => {
2417
+ (checkbox.checked || checkbox.indeterminateState === 'indeterminate') && (allUnchecked = false);
2418
+ !checkbox.checked && (allChecked = false);
2419
+ });
2420
+ !allChecked && !allUnchecked
2421
+ ? state = 'indeterminate'
2422
+ : allChecked
2423
+ ? state = 'determinate'
2424
+ : state = 'uncheck';
2425
+ this.indeterminateState = state;
2426
+ if (state === 'determinate') {
2427
+ this.checked = true;
2428
+ // if(this.checked) {
2429
+ this.treeviewChecked.emit(this._id);
2430
+ // }
2431
+ }
2432
+ else {
2433
+ this.checked = false;
2434
+ this.treeviewUnchecked.emit(this._id);
2435
+ }
2436
+ }
2437
+ else {
2438
+ if (this.checked) {
2439
+ this.checked = false;
2440
+ this.treeviewUnchecked.emit(this._id);
2441
+ }
2442
+ else {
2443
+ this.checked = true;
2444
+ this.treeviewChecked.emit(this._id);
2445
+ }
2446
+ }
2447
+ }
2448
+ /**
2449
+ * @Event
2450
+ * @desc
2451
+ * -
2452
+ */
2453
+ handleCheckMouseUp() {
2454
+ const checked = this.checked;
2455
+ const state = this.indeterminateState;
2456
+ if (!this.hasChild) {
2457
+ !checked
2458
+ ? this.checked = true
2459
+ : this.checked = false;
2460
+ if (this.checked) {
2461
+ this.treeviewChecked.emit(this._id);
2462
+ }
2463
+ else {
2464
+ this.treeviewUnchecked.emit(this._id);
2465
+ }
2466
+ this.groupCheck.emit(this.parentId);
2467
+ return;
2468
+ }
2469
+ const childs = this.getAllChilds();
2470
+ if (state === 'indeterminate' || state === 'uncheck') {
2471
+ childs.forEach(child => {
2472
+ child.checked = true;
2473
+ // if(this.checked) {
2474
+ this.treeviewChecked.emit(child._id);
2475
+ // }
2476
+ child.indeterminateState = 'determined';
2477
+ });
2478
+ }
2479
+ else {
2480
+ childs.forEach(child => {
2481
+ child.checked = false;
2482
+ this.treeviewUnchecked.emit(child._id);
2483
+ child.indeterminateState = 'uncheck';
2484
+ });
2485
+ }
2486
+ this.checkGroupState();
2487
+ this.groupCheck.emit(this.parentId);
2488
+ }
2489
+ checkGroup(e) {
2490
+ const { detail: groupId } = e;
2491
+ if (!groupId || this._id !== groupId)
2492
+ return;
2493
+ this.checkGroupState();
2494
+ this.groupCheck.emit(this.parentId);
2495
+ }
2496
+ /**
2497
+ * @desc
2498
+ * @param item
2499
+ */
2500
+ contextItemRenderer(item) {
2501
+ return (h("span", null, item.title));
2502
+ }
2503
+ /**
2504
+ * @desc
2505
+ * @param newValue
2506
+ * @returns {void}
2507
+ */
2508
+ parseItems(newValue) {
2509
+ if (newValue) {
2510
+ typeof newValue == 'string'
2511
+ ? this.contextMenu = JSON.parse(newValue)
2512
+ : this.contextMenu = newValue;
2513
+ }
2514
+ }
2515
+ render() {
2516
+ const { _id, text, tooltipText, size, icon, open, childLength, checkboxes, showIcon, checked, indeterminateState, focused, contextMenuShow } = this;
2517
+ const menuPadding = this.menuPadding + 'px';
2518
+ const textContent = classnames('text-content', size, 'size-2'
2519
+ // {
2520
+ // 'size-2': size === 'small' || size === 'medium',
2521
+ // 'size-3': size === 'large',
2522
+ // }
2523
+ );
2524
+ const classes = classnames('treeview-item', {
2525
+ 'focus': focused,
2526
+ 'open': open,
2527
+ 'selected': this.selected
2528
+ });
2529
+ const treeviewContextMenu = classnames('treeview-item-context-menu', {
2530
+ 'show': contextMenuShow
2531
+ });
2532
+ const treeviewInner = classnames('treeview-inner', {
2533
+ 'open': open,
2534
+ });
2535
+ const indeterminate = classnames('indeterminate', {
2536
+ 'disabled': this.disabled,
2537
+ });
2538
+ const treeviewItemContainer = classnames('treeview-item-container', {
2539
+ 'selected': this.selected,
2540
+ 'disabled': this.disabled
2541
+ });
2542
+ const collapseContent = classnames('collapse-content', {
2543
+ 'child': childLength > 0,
2544
+ });
2545
+ const hostClasses = classnames(this.hidden ? 'hidden' : null);
2546
+ const faviconClass = classnames("favicon", {
2547
+ "favorite": this.favorite
2548
+ });
2549
+ return (h(Host, { class: hostClasses }, h("div", { class: classes }, h("div", { class: collapseContent, id: "collapse-button", onClick: () => childLength > 0 && this.handleOpen() }, childLength > 0 && (h("bcm-icon", { class: "collapse-icon", icon: `far fa-${open ? 'caret-down' : 'caret-right'}` }))), h("div", { class: treeviewItemContainer }, h("section", { onMouseUp: () => this.handleCheckMouseUp() }, checkboxes && (h("div", { class: "check-content" }, indeterminateState == 'indeterminate' && (h("span", { class: indeterminate })) || (h("bcm-checkbox", { id: 'check-' + _id, name: 'check-' + _id, checked: checked, disabled: this.disabled, noCaption: true })))), h("div", { class: textContent, onClick: () => this.handleClick(), title: tooltipText }, showIcon && icon && (h("bcm-icon", { class: "icon", icon: icon })), h("span", { id: "text" }, text))), this.favicon && (h("section", { class: faviconClass, onClick: (e) => this.handleFavClick(e) }, h("bcm-icon", { title: this.favorite ? "Click to remove from favorite list" : "Click to add to your favourites list", icon: "far fa-star" })))), !checkboxes && (h("div", { class: treeviewContextMenu, style: { top: this.contextOffsetTop + 'px', left: this.contextOffsetLeft + 'px' } }, this.contextMenu.length !== 0 && this.contextMenu.map((item) => (this.contextItemRenderer(item)))))), h("div", { class: treeviewInner, style: { paddingLeft: menuPadding } }, h("slot", null))));
2550
+ }
2551
+ get el() { return getElement(this); }
2552
+ static get watchers() { return {
2553
+ "_contextMenu": ["parseItems"]
2554
+ }; }
2555
+ };
2556
+ BcmtreeviewItem.style = treeviewItemCss;
2557
+
2558
+ export { BcmCheckboxLite as bcm_checkbox_lite, BcmDivider as bcm_divider, BcmEmpty as bcm_empty, BcmListbox as bcm_listbox, BcmListboxGroup as bcm_listbox_group, BcmListboxItem as bcm_listbox_item, BcmOldSearch as bcm_old_search, Bcmtreeview as bcm_treeview, BcmtreeviewItem as bcm_treeview_item };