bromcom-ui 2.7.23-0 → 2.7.23-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (681) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/p-09d5a379.entry.js +5 -0
  3. package/dist/bromcom-ui/p-0c840479.entry.js +5 -0
  4. package/dist/bromcom-ui/p-0e65ba4e.entry.js +5 -0
  5. package/dist/bromcom-ui/{p-104a53f4.entry.js → p-1ed03d82.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-21260645.js +11 -0
  7. package/dist/bromcom-ui/p-26482c36.entry.js +5 -0
  8. package/dist/bromcom-ui/p-30a0df61.entry.js +5 -0
  9. package/dist/bromcom-ui/p-3a0627d6.js +5 -0
  10. package/dist/bromcom-ui/{p-fd509fc7.entry.js → p-3a18ac56.entry.js} +1 -1
  11. package/dist/bromcom-ui/p-3c30d4d9.entry.js +5 -0
  12. package/dist/bromcom-ui/p-3de14529.entry.js +5 -0
  13. package/dist/bromcom-ui/{p-ec84b668.js → p-492f79c5.js} +1 -1
  14. package/dist/bromcom-ui/p-4b282fae.js +5 -0
  15. package/dist/bromcom-ui/p-4cacbecc.entry.js +5 -0
  16. package/dist/bromcom-ui/p-4dc6cb10.entry.js +5 -0
  17. package/dist/bromcom-ui/p-52ffbce1.entry.js +5 -0
  18. package/dist/bromcom-ui/{p-04a35e6e.entry.js → p-564a4bcf.entry.js} +1 -1
  19. package/dist/bromcom-ui/p-59c64f1e.entry.js +5 -0
  20. package/dist/bromcom-ui/p-5aa98c00.entry.js +5 -0
  21. package/dist/bromcom-ui/p-5b1fe30d.js +5 -0
  22. package/dist/bromcom-ui/p-640bdbfe.entry.js +5 -0
  23. package/dist/bromcom-ui/p-68757684.entry.js +5 -0
  24. package/dist/bromcom-ui/p-6fa38458.entry.js +5 -0
  25. package/dist/bromcom-ui/{p-9f2678ff.js → p-74d4721e.js} +1 -1
  26. package/dist/bromcom-ui/p-751e67ae.entry.js +5 -0
  27. package/dist/bromcom-ui/{p-85a413b7.entry.js → p-75935aa1.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-78a5b566.entry.js +5 -0
  29. package/dist/bromcom-ui/p-79cf7a7f.entry.js +5 -0
  30. package/dist/bromcom-ui/{p-3f0ba719.entry.js → p-7c229289.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-82433894.entry.js +5 -0
  32. package/dist/bromcom-ui/p-84c2fbb7.entry.js +5 -0
  33. package/dist/bromcom-ui/{p-a8ea0995.entry.js → p-8f80435c.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-54311536.js → p-8f891f59.js} +1 -1
  35. package/dist/bromcom-ui/p-8f8b734b.entry.js +5 -0
  36. package/dist/bromcom-ui/p-96b85605.entry.js +5 -0
  37. package/dist/bromcom-ui/{p-372b6929.js → p-97af1110.js} +1 -1
  38. package/dist/bromcom-ui/p-a55fa840.entry.js +5 -0
  39. package/dist/bromcom-ui/p-a6c5d57e.entry.js +5 -0
  40. package/dist/bromcom-ui/p-a72c4382.entry.js +5 -0
  41. package/dist/bromcom-ui/p-b84d36ec.entry.js +5 -0
  42. package/dist/bromcom-ui/p-bf575256.js +5 -0
  43. package/dist/bromcom-ui/p-c67b182a.entry.js +5 -0
  44. package/dist/bromcom-ui/p-ca8302ae.entry.js +5 -0
  45. package/dist/bromcom-ui/p-d0cb4ea4.entry.js +5 -0
  46. package/dist/bromcom-ui/{p-a3d86b62.entry.js → p-d5f62fea.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-da876901.entry.js +5 -0
  48. package/dist/bromcom-ui/p-dacdb214.entry.js +5 -0
  49. package/dist/bromcom-ui/p-e19790cc.entry.js +5 -0
  50. package/dist/bromcom-ui/p-e4fd5844.entry.js +5 -0
  51. package/dist/bromcom-ui/p-e50904fc.entry.js +5 -0
  52. package/dist/{cjs/bcm-form-group.cjs.entry.js → bromcom-ui/p-e7672c8d.entry.js} +1 -26
  53. package/dist/bromcom-ui/p-f0395f5a.entry.js +5 -0
  54. package/dist/bromcom-ui/{p-0def73f1.entry.js → p-f3f94eec.entry.js} +1 -1
  55. package/dist/bromcom-ui/p-f77107d8.entry.js +5 -0
  56. package/dist/bromcom-ui/p-f8ddaa35.entry.js +5 -0
  57. package/package.json +1 -1
  58. package/dist/bromcom-ui/p-01dc2270.entry.js +0 -5
  59. package/dist/bromcom-ui/p-08629997.entry.js +0 -5
  60. package/dist/bromcom-ui/p-0ea84f4b.entry.js +0 -5
  61. package/dist/bromcom-ui/p-11f0f76f.entry.js +0 -5
  62. package/dist/bromcom-ui/p-14d3e86d.entry.js +0 -5
  63. package/dist/bromcom-ui/p-17391b09.entry.js +0 -5
  64. package/dist/bromcom-ui/p-2315f389.entry.js +0 -5
  65. package/dist/bromcom-ui/p-23e9049b.entry.js +0 -5
  66. package/dist/bromcom-ui/p-289cac1d.entry.js +0 -5
  67. package/dist/bromcom-ui/p-2fb69387.entry.js +0 -5
  68. package/dist/bromcom-ui/p-3b0ecb63.entry.js +0 -5
  69. package/dist/bromcom-ui/p-3c89bea0.entry.js +0 -5
  70. package/dist/bromcom-ui/p-3e755638.entry.js +0 -5
  71. package/dist/bromcom-ui/p-4a300d69.js +0 -5
  72. package/dist/bromcom-ui/p-4e9bbb2c.entry.js +0 -5
  73. package/dist/bromcom-ui/p-530fe66e.entry.js +0 -5
  74. package/dist/bromcom-ui/p-534d1564.entry.js +0 -5
  75. package/dist/bromcom-ui/p-626a65e9.js +0 -5
  76. package/dist/bromcom-ui/p-6751ac6c.entry.js +0 -5
  77. package/dist/bromcom-ui/p-68ee093f.entry.js +0 -5
  78. package/dist/bromcom-ui/p-6b6db5fd.entry.js +0 -5
  79. package/dist/bromcom-ui/p-6f1f904f.entry.js +0 -5
  80. package/dist/bromcom-ui/p-72319740.entry.js +0 -5
  81. package/dist/bromcom-ui/p-74a966cd.entry.js +0 -5
  82. package/dist/bromcom-ui/p-7d8dd5e1.entry.js +0 -5
  83. package/dist/bromcom-ui/p-7f159c03.entry.js +0 -5
  84. package/dist/bromcom-ui/p-88570697.entry.js +0 -5
  85. package/dist/bromcom-ui/p-8af13df0.entry.js +0 -5
  86. package/dist/bromcom-ui/p-8f44fd30.entry.js +0 -5
  87. package/dist/bromcom-ui/p-93c6ae9a.entry.js +0 -5
  88. package/dist/bromcom-ui/p-94ee9201.entry.js +0 -5
  89. package/dist/bromcom-ui/p-97b4df53.entry.js +0 -5
  90. package/dist/bromcom-ui/p-ac1db3e8.js +0 -5
  91. package/dist/bromcom-ui/p-ace2e92f.js +0 -5
  92. package/dist/bromcom-ui/p-af4b55d4.js +0 -11
  93. package/dist/bromcom-ui/p-b6c3153d.entry.js +0 -5
  94. package/dist/bromcom-ui/p-bc29d9e4.entry.js +0 -5
  95. package/dist/bromcom-ui/p-bcf914ee.entry.js +0 -5
  96. package/dist/bromcom-ui/p-bd37254a.js +0 -5
  97. package/dist/bromcom-ui/p-be0d39a5.entry.js +0 -5
  98. package/dist/bromcom-ui/p-c3275d09.entry.js +0 -5
  99. package/dist/bromcom-ui/p-c46bd121.entry.js +0 -5
  100. package/dist/bromcom-ui/p-cc56b821.entry.js +0 -5
  101. package/dist/bromcom-ui/p-cdf2a73b.entry.js +0 -5
  102. package/dist/bromcom-ui/p-d81a006e.entry.js +0 -5
  103. package/dist/bromcom-ui/p-de7b0fe7.js +0 -5
  104. package/dist/bromcom-ui/p-e0d9de16.js +0 -5
  105. package/dist/bromcom-ui/p-e4fe2b3f.js +0 -5
  106. package/dist/bromcom-ui/p-e5217003.entry.js +0 -5
  107. package/dist/bromcom-ui/p-e67c2435.entry.js +0 -5
  108. package/dist/bromcom-ui/p-e81541e2.entry.js +0 -5
  109. package/dist/bromcom-ui/p-eb91b96a.entry.js +0 -5
  110. package/dist/bromcom-ui/p-ebc832c7.entry.js +0 -5
  111. package/dist/bromcom-ui/p-ec105e45.entry.js +0 -5
  112. package/dist/bromcom-ui/p-ed78a192.entry.js +0 -5
  113. package/dist/bromcom-ui/p-eef50ebf.js +0 -5
  114. package/dist/bromcom-ui/p-f129846d.entry.js +0 -5
  115. package/dist/bromcom-ui/p-f3ddd992.entry.js +0 -5
  116. package/dist/bromcom-ui/p-f6e7c76e.js +0 -5
  117. package/dist/bromcom-ui/p-fa0f8e51.entry.js +0 -5
  118. package/dist/bromcom-ui/p-fab4465c.entry.js +0 -5
  119. package/dist/cjs/_commonjsHelpers-3d2989e8.js +0 -24
  120. package/dist/cjs/bcm-662d70d8.js +0 -448
  121. package/dist/cjs/bcm-accordion.cjs.entry.js +0 -85
  122. package/dist/cjs/bcm-action-buttons_3.cjs.entry.js +0 -133
  123. package/dist/cjs/bcm-alert.cjs.entry.js +0 -108
  124. package/dist/cjs/bcm-attendance.cjs.entry.js +0 -50
  125. package/dist/cjs/bcm-autocomplete.cjs.entry.js +0 -141
  126. package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -141
  127. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +0 -53
  128. package/dist/cjs/bcm-button-group.cjs.entry.js +0 -102
  129. package/dist/cjs/bcm-button_7.cjs.entry.js +0 -2827
  130. package/dist/cjs/bcm-card.cjs.entry.js +0 -76
  131. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +0 -395
  132. package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +0 -2467
  133. package/dist/cjs/bcm-checkbox.cjs.entry.js +0 -165
  134. package/dist/cjs/bcm-chip.cjs.entry.js +0 -70
  135. package/dist/cjs/bcm-collapse-group.cjs.entry.js +0 -57
  136. package/dist/cjs/bcm-collapse.cjs.entry.js +0 -56
  137. package/dist/cjs/bcm-colorpicker.cjs.entry.js +0 -419
  138. package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -155
  139. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1432
  140. package/dist/cjs/bcm-default.cjs.entry.js +0 -40
  141. package/dist/cjs/bcm-drawer.cjs.entry.js +0 -101
  142. package/dist/cjs/bcm-dropdown.cjs.entry.js +0 -217
  143. package/dist/cjs/bcm-error-layout.cjs.entry.js +0 -64
  144. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +0 -127
  145. package/dist/cjs/bcm-form-2.cjs.entry.js +0 -205
  146. package/dist/cjs/bcm-input.cjs.entry.js +0 -323
  147. package/dist/cjs/bcm-label_3.cjs.entry.js +0 -198
  148. package/dist/cjs/bcm-link.cjs.entry.js +0 -47
  149. package/dist/cjs/bcm-menu.cjs.entry.js +0 -201
  150. package/dist/cjs/bcm-message.cjs.entry.js +0 -85
  151. package/dist/cjs/bcm-modal.cjs.entry.js +0 -137
  152. package/dist/cjs/bcm-notification.cjs.entry.js +0 -89
  153. package/dist/cjs/bcm-old-input.cjs.entry.js +0 -383
  154. package/dist/cjs/bcm-old-tag_2.cjs.entry.js +0 -143
  155. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +0 -109
  156. package/dist/cjs/bcm-popconfirm.cjs.entry.js +0 -102
  157. package/dist/cjs/bcm-popover-box.cjs.entry.js +0 -130
  158. package/dist/cjs/bcm-popover.cjs.entry.js +0 -100
  159. package/dist/cjs/bcm-progress.cjs.entry.js +0 -160
  160. package/dist/cjs/bcm-radio-group.cjs.entry.js +0 -253
  161. package/dist/cjs/bcm-radio.cjs.entry.js +0 -89
  162. package/dist/cjs/bcm-range.cjs.entry.js +0 -175
  163. package/dist/cjs/bcm-result.cjs.entry.js +0 -65
  164. package/dist/cjs/bcm-select-group.cjs.entry.js +0 -31
  165. package/dist/cjs/bcm-select-option.cjs.entry.js +0 -37
  166. package/dist/cjs/bcm-select.cjs.entry.js +0 -1167
  167. package/dist/cjs/bcm-step.cjs.entry.js +0 -93
  168. package/dist/cjs/bcm-stepper.cjs.entry.js +0 -211
  169. package/dist/cjs/bcm-student-card.cjs.entry.js +0 -48
  170. package/dist/cjs/bcm-switch.cjs.entry.js +0 -125
  171. package/dist/cjs/bcm-tab-pane.cjs.entry.js +0 -56
  172. package/dist/cjs/bcm-tab.cjs.entry.js +0 -75
  173. package/dist/cjs/bcm-table.cjs.entry.js +0 -64
  174. package/dist/cjs/bcm-tabs-content.cjs.entry.js +0 -48
  175. package/dist/cjs/bcm-tabs.cjs.entry.js +0 -376
  176. package/dist/cjs/bcm-tag.cjs.entry.js +0 -113
  177. package/dist/cjs/bcm-textarea.cjs.entry.js +0 -134
  178. package/dist/cjs/bcm-time-picker.cjs.entry.js +0 -123
  179. package/dist/cjs/bcm-timeline-item.cjs.entry.js +0 -41
  180. package/dist/cjs/bcm-timeline.cjs.entry.js +0 -59
  181. package/dist/cjs/bcm-treeview-group.cjs.entry.js +0 -23
  182. package/dist/cjs/bromcom-ui.cjs.js +0 -24
  183. package/dist/cjs/caption-template-bd235000.js +0 -34
  184. package/dist/cjs/color-helper-1ac6ed4d.js +0 -43
  185. package/dist/cjs/colors-56282b00.js +0 -224
  186. package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
  187. package/dist/cjs/element-dragger-a8562f82.js +0 -279
  188. package/dist/cjs/generate-94d96c1b.js +0 -182
  189. package/dist/cjs/global-0977baef.js +0 -38
  190. package/dist/cjs/index-53637125.js +0 -1864
  191. package/dist/cjs/index-78c4b134.js +0 -64
  192. package/dist/cjs/index-89682d55.js +0 -193
  193. package/dist/cjs/index.cjs.js +0 -6
  194. package/dist/cjs/input-template-216ca09e.js +0 -99
  195. package/dist/cjs/is-load-decorator-20a4687b.js +0 -56
  196. package/dist/cjs/json-parse-decarator-6300e515.js +0 -40
  197. package/dist/cjs/label-template-fab08e13.js +0 -23
  198. package/dist/cjs/loader.cjs.js +0 -26
  199. package/dist/cjs/number-helper-78263c8e.js +0 -20
  200. package/dist/cjs/popover-placement-c1b5276c.js +0 -98
  201. package/dist/cjs/property-decorators-6f740807.js +0 -21
  202. package/dist/cjs/slot-template-0ee3c054.js +0 -15
  203. package/dist/cjs/stepper-states-7b826859.js +0 -83
  204. package/dist/cjs/string-helper-4f680856.js +0 -134
  205. package/dist/cjs/types-05047466.js +0 -32
  206. package/dist/cjs/utils-fc077139.js +0 -131
  207. package/dist/cjs/validators-267d9753.js +0 -33
  208. package/dist/collection/collection-manifest.json +0 -92
  209. package/dist/collection/components/atoms/avatar/avatar.css +0 -448
  210. package/dist/collection/components/atoms/avatar/avatar.js +0 -261
  211. package/dist/collection/components/atoms/badge/badge.css +0 -481
  212. package/dist/collection/components/atoms/badge/badge.js +0 -215
  213. package/dist/collection/components/atoms/button/button.css +0 -598
  214. package/dist/collection/components/atoms/button/button.js +0 -500
  215. package/dist/collection/components/atoms/button/types.js +0 -170
  216. package/dist/collection/components/atoms/divider/divider.css +0 -142
  217. package/dist/collection/components/atoms/divider/divider.js +0 -72
  218. package/dist/collection/components/atoms/icon/icon.css +0 -127
  219. package/dist/collection/components/atoms/icon/icon.js +0 -59
  220. package/dist/collection/components/atoms/label/label.css +0 -408
  221. package/dist/collection/components/atoms/label/label.js +0 -206
  222. package/dist/collection/components/atoms/link/link.css +0 -419
  223. package/dist/collection/components/atoms/link/link.js +0 -165
  224. package/dist/collection/components/atoms/old-tag/old-tag.css +0 -305
  225. package/dist/collection/components/atoms/old-tag/old-tag.js +0 -315
  226. package/dist/collection/components/atoms/old-tag/types.js +0 -30
  227. package/dist/collection/components/atoms/states/button.states.js +0 -31
  228. package/dist/collection/components/atoms/tag/tag.js +0 -324
  229. package/dist/collection/components/atoms/tag/types.js +0 -30
  230. package/dist/collection/components/atoms/text/text.css +0 -429
  231. package/dist/collection/components/atoms/text/text.js +0 -148
  232. package/dist/collection/components/data-table/table.css +0 -130
  233. package/dist/collection/components/data-table/table.js +0 -82
  234. package/dist/collection/components/default/default.css +0 -127
  235. package/dist/collection/components/default/default.js +0 -53
  236. package/dist/collection/components/molecules/accordion/accordion.css +0 -127
  237. package/dist/collection/components/molecules/accordion/accordion.js +0 -129
  238. package/dist/collection/components/molecules/alert/alert.css +0 -191
  239. package/dist/collection/components/molecules/alert/alert.js +0 -294
  240. package/dist/collection/components/molecules/alert/types.js +0 -23
  241. package/dist/collection/components/molecules/breadcrumb/breadcrumb.css +0 -201
  242. package/dist/collection/components/molecules/breadcrumb/breadcrumb.js +0 -145
  243. package/dist/collection/components/molecules/breadcrumb/types.js +0 -5
  244. package/dist/collection/components/molecules/card/card.css +0 -408
  245. package/dist/collection/components/molecules/card/card.js +0 -128
  246. package/dist/collection/components/molecules/checkbox/checkbox-lite.js +0 -211
  247. package/dist/collection/components/molecules/checkbox/checkbox.css +0 -1280
  248. package/dist/collection/components/molecules/checkbox/checkbox.js +0 -678
  249. package/dist/collection/components/molecules/checkbox/group.css +0 -156
  250. package/dist/collection/components/molecules/checkbox/group.js +0 -769
  251. package/dist/collection/components/molecules/collapse/collapse.css +0 -174
  252. package/dist/collection/components/molecules/collapse/collapse.js +0 -161
  253. package/dist/collection/components/molecules/collapse/group.js +0 -128
  254. package/dist/collection/components/molecules/drawer/drawer.css +0 -496
  255. package/dist/collection/components/molecules/drawer/drawer.js +0 -271
  256. package/dist/collection/components/molecules/dropdown/dropdown.css +0 -419
  257. package/dist/collection/components/molecules/dropdown/dropdown.js +0 -760
  258. package/dist/collection/components/molecules/empty/empty.css +0 -414
  259. package/dist/collection/components/molecules/empty/empty.js +0 -147
  260. package/dist/collection/components/molecules/empty/static/default.svg +0 -5
  261. package/dist/collection/components/molecules/empty/static/simple.svg +0 -9
  262. package/dist/collection/components/molecules/empty/types.js +0 -21
  263. package/dist/collection/components/molecules/error-layout/error-layout.css +0 -396
  264. package/dist/collection/components/molecules/error-layout/error-layout.js +0 -167
  265. package/dist/collection/components/molecules/error-layout/types.js +0 -5
  266. package/dist/collection/components/molecules/expansion-panel/expansion-panel.css +0 -474
  267. package/dist/collection/components/molecules/expansion-panel/expansion-panel.js +0 -322
  268. package/dist/collection/components/molecules/input/input.css +0 -1208
  269. package/dist/collection/components/molecules/input/input.js +0 -1170
  270. package/dist/collection/components/molecules/input/types.js +0 -17
  271. package/dist/collection/components/molecules/item/item.css +0 -446
  272. package/dist/collection/components/molecules/item/item.js +0 -141
  273. package/dist/collection/components/molecules/items/items.js +0 -74
  274. package/dist/collection/components/molecules/message/message.css +0 -165
  275. package/dist/collection/components/molecules/message/message.js +0 -212
  276. package/dist/collection/components/molecules/message/types.js +0 -14
  277. package/dist/collection/components/molecules/modal/modal.css +0 -526
  278. package/dist/collection/components/molecules/modal/modal.js +0 -379
  279. package/dist/collection/components/molecules/notification/notification.css +0 -183
  280. package/dist/collection/components/molecules/notification/notification.js +0 -234
  281. package/dist/collection/components/molecules/notification/types.js +0 -15
  282. package/dist/collection/components/molecules/old-input/old-input.css +0 -1360
  283. package/dist/collection/components/molecules/old-input/old-input.js +0 -1144
  284. package/dist/collection/components/molecules/old-input/types.js +0 -17
  285. package/dist/collection/components/molecules/popconfirm/popconfirm-box.css +0 -563
  286. package/dist/collection/components/molecules/popconfirm/popconfirm-box.js +0 -387
  287. package/dist/collection/components/molecules/popconfirm/popconfirm.css +0 -127
  288. package/dist/collection/components/molecules/popconfirm/popconfirm.js +0 -376
  289. package/dist/collection/components/molecules/popover/popover-box.css +0 -582
  290. package/dist/collection/components/molecules/popover/popover-box.js +0 -385
  291. package/dist/collection/components/molecules/popover/popover.css +0 -127
  292. package/dist/collection/components/molecules/popover/popover.js +0 -292
  293. package/dist/collection/components/molecules/progress/progress.css +0 -486
  294. package/dist/collection/components/molecules/progress/progress.js +0 -394
  295. package/dist/collection/components/molecules/progress/types.js +0 -28
  296. package/dist/collection/components/molecules/radio/group.css +0 -795
  297. package/dist/collection/components/molecules/radio/group.js +0 -642
  298. package/dist/collection/components/molecules/radio/radio.css +0 -1280
  299. package/dist/collection/components/molecules/radio/radio.js +0 -280
  300. package/dist/collection/components/molecules/radio/types.js +0 -30
  301. package/dist/collection/components/molecules/range/range.css +0 -570
  302. package/dist/collection/components/molecules/range/range.js +0 -462
  303. package/dist/collection/components/molecules/result/result.css +0 -164
  304. package/dist/collection/components/molecules/result/result.js +0 -133
  305. package/dist/collection/components/molecules/result/types.js +0 -22
  306. package/dist/collection/components/molecules/search/search.css +0 -131
  307. package/dist/collection/components/molecules/search/search.js +0 -486
  308. package/dist/collection/components/molecules/search-2/search-2.css +0 -1208
  309. package/dist/collection/components/molecules/search-2/search-2.js +0 -402
  310. package/dist/collection/components/molecules/select/group.css +0 -144
  311. package/dist/collection/components/molecules/select/group.js +0 -88
  312. package/dist/collection/components/molecules/select/option.css +0 -164
  313. package/dist/collection/components/molecules/select/option.js +0 -142
  314. package/dist/collection/components/molecules/select/select-box.css +0 -143
  315. package/dist/collection/components/molecules/select/select-box.js +0 -104
  316. package/dist/collection/components/molecules/select/select.css +0 -364
  317. package/dist/collection/components/molecules/select/select.js +0 -2217
  318. package/dist/collection/components/molecules/states/alert.states.js +0 -25
  319. package/dist/collection/components/molecules/states/checkbox-group.states.js +0 -199
  320. package/dist/collection/components/molecules/states/radio-group.states.js +0 -107
  321. package/dist/collection/components/molecules/states/search.states.js +0 -136
  322. package/dist/collection/components/molecules/states/stepper-states.js +0 -79
  323. package/dist/collection/components/molecules/stepper/step.js +0 -346
  324. package/dist/collection/components/molecules/stepper/stepper.css +0 -617
  325. package/dist/collection/components/molecules/stepper/stepper.js +0 -484
  326. package/dist/collection/components/molecules/switch/switch.css +0 -1272
  327. package/dist/collection/components/molecules/switch/switch.js +0 -706
  328. package/dist/collection/components/molecules/textarea/textarea.css +0 -1208
  329. package/dist/collection/components/molecules/textarea/textarea.js +0 -720
  330. package/dist/collection/components/molecules/textarea/types.js +0 -13
  331. package/dist/collection/components/molecules/timeline/timeline-item.css +0 -254
  332. package/dist/collection/components/molecules/timeline/timeline-item.js +0 -149
  333. package/dist/collection/components/molecules/timeline/timeline.css +0 -205
  334. package/dist/collection/components/molecules/timeline/timeline.js +0 -115
  335. package/dist/collection/components/molecules/tooltip/tooltip-box.css +0 -544
  336. package/dist/collection/components/molecules/tooltip/tooltip-box.js +0 -291
  337. package/dist/collection/components/molecules/tooltip/tooltip.css +0 -127
  338. package/dist/collection/components/molecules/tooltip/tooltip.js +0 -291
  339. package/dist/collection/components/organism/autocomplete/autocomplete.css +0 -168
  340. package/dist/collection/components/organism/autocomplete/autocomplete.js +0 -389
  341. package/dist/collection/components/organism/colorpicker/colorpicker.css +0 -313
  342. package/dist/collection/components/organism/colorpicker/colorpicker.js +0 -763
  343. package/dist/collection/components/organism/colorpicker/static/chess.png +0 -0
  344. package/dist/collection/components/organism/colorpicker/static/color.svg +0 -14
  345. package/dist/collection/components/organism/colorpicker/static/colors.svg +0 -16
  346. package/dist/collection/components/organism/date-picker/date-picker.css +0 -141
  347. package/dist/collection/components/organism/date-picker/date-picker.js +0 -768
  348. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +0 -1429
  349. package/dist/collection/components/organism/datetime-picker/datetime-picker.js +0 -2166
  350. package/dist/collection/components/organism/datetime-picker/types.js +0 -39
  351. package/dist/collection/components/organism/form/form-group.css +0 -131
  352. package/dist/collection/components/organism/form/form-group.js +0 -120
  353. package/dist/collection/components/organism/form/form.css +0 -132
  354. package/dist/collection/components/organism/form/form.js +0 -670
  355. package/dist/collection/components/organism/form-2/bcm-form-components.js +0 -26
  356. package/dist/collection/components/organism/form-2/form-2.css +0 -127
  357. package/dist/collection/components/organism/form-2/form-2.js +0 -328
  358. package/dist/collection/components/organism/list/list-key-control.js +0 -125
  359. package/dist/collection/components/organism/list/list-tag-control.js +0 -136
  360. package/dist/collection/components/organism/list/list.css +0 -2033
  361. package/dist/collection/components/organism/list/list.js +0 -1801
  362. package/dist/collection/components/organism/listbox/listbox-group.css +0 -139
  363. package/dist/collection/components/organism/listbox/listbox-group.js +0 -93
  364. package/dist/collection/components/organism/listbox/listbox-item.css +0 -269
  365. package/dist/collection/components/organism/listbox/listbox-item.js +0 -641
  366. package/dist/collection/components/organism/listbox/listbox.css +0 -365
  367. package/dist/collection/components/organism/listbox/listbox.js +0 -1989
  368. package/dist/collection/components/organism/listbox/types.js +0 -11
  369. package/dist/collection/components/organism/states/bcm-list2.states.js +0 -530
  370. package/dist/collection/components/organism/tabs/tab-pane.css +0 -142
  371. package/dist/collection/components/organism/tabs/tab-pane.js +0 -158
  372. package/dist/collection/components/organism/tabs/tab.css +0 -587
  373. package/dist/collection/components/organism/tabs/tab.js +0 -293
  374. package/dist/collection/components/organism/tabs/tabs-content.css +0 -136
  375. package/dist/collection/components/organism/tabs/tabs-content.js +0 -137
  376. package/dist/collection/components/organism/tabs/tabs.css +0 -212
  377. package/dist/collection/components/organism/tabs/tabs.js +0 -796
  378. package/dist/collection/components/organism/tabs/types.js +0 -30
  379. package/dist/collection/components/organism/time-picker/time-picker.css +0 -141
  380. package/dist/collection/components/organism/time-picker/time-picker.js +0 -615
  381. package/dist/collection/components/organism/treeview/treeview-group.css +0 -0
  382. package/dist/collection/components/organism/treeview/treeview-group.js +0 -18
  383. package/dist/collection/components/organism/treeview/treeview-item.css +0 -318
  384. package/dist/collection/components/organism/treeview/treeview-item.js +0 -977
  385. package/dist/collection/components/organism/treeview/treeview.css +0 -190
  386. package/dist/collection/components/organism/treeview/treeview.js +0 -1689
  387. package/dist/collection/components/organism/treeview/types.js +0 -11
  388. package/dist/collection/decorators/is-load-decorator.js +0 -51
  389. package/dist/collection/decorators/json-parse-decarator.js +0 -35
  390. package/dist/collection/decorators/property-decorators.js +0 -16
  391. package/dist/collection/global/components/_checkbox.css +0 -627
  392. package/dist/collection/global/global.js +0 -66
  393. package/dist/collection/global/variables/colors.js +0 -220
  394. package/dist/collection/helper/color-helper.js +0 -38
  395. package/dist/collection/helper/datetime-helper.js +0 -7
  396. package/dist/collection/helper/generate.js +0 -147
  397. package/dist/collection/helper/number-helper.js +0 -15
  398. package/dist/collection/helper/string-helper.js +0 -65
  399. package/dist/collection/helper/validators.js +0 -28
  400. package/dist/collection/index.js +0 -5
  401. package/dist/collection/models/abstract-classes/abstract-key-control.js +0 -97
  402. package/dist/collection/models/bcm-types.js +0 -5
  403. package/dist/collection/models/bcm.js +0 -466
  404. package/dist/collection/models/states/atoms/bcm-atoms-state.js +0 -5
  405. package/dist/collection/models/states/molecules/bcm-molecules-state.js +0 -5
  406. package/dist/collection/models/states/organisms/bcm-organisms-state.js +0 -5
  407. package/dist/collection/new-ds/components/action-buttons/action-buttons.css +0 -152
  408. package/dist/collection/new-ds/components/action-buttons/action-buttons.js +0 -61
  409. package/dist/collection/new-ds/components/attendance/attendance.css +0 -433
  410. package/dist/collection/new-ds/components/attendance/attendance.js +0 -85
  411. package/dist/collection/new-ds/components/button-group/button-group.css +0 -419
  412. package/dist/collection/new-ds/components/button-group/button-group.js +0 -235
  413. package/dist/collection/new-ds/components/chip/chip.css +0 -453
  414. package/dist/collection/new-ds/components/chip/chip.js +0 -187
  415. package/dist/collection/new-ds/components/menu/menu.css +0 -698
  416. package/dist/collection/new-ds/components/menu/menu.js +0 -509
  417. package/dist/collection/new-ds/components/student-card/student-card.css +0 -454
  418. package/dist/collection/new-ds/components/student-card/student-card.js +0 -152
  419. package/dist/collection/templates/button-template.js +0 -22
  420. package/dist/collection/templates/caption-template.js +0 -29
  421. package/dist/collection/templates/checkbox-group-template.js +0 -10
  422. package/dist/collection/templates/checkbox-template.js +0 -31
  423. package/dist/collection/templates/icon-template.js +0 -24
  424. package/dist/collection/templates/info-footer-template.js +0 -16
  425. package/dist/collection/templates/input-template.js +0 -81
  426. package/dist/collection/templates/label-template.js +0 -18
  427. package/dist/collection/templates/list-item-template.js +0 -58
  428. package/dist/collection/templates/list-template.js +0 -22
  429. package/dist/collection/templates/slot-template.js +0 -10
  430. package/dist/collection/templates/step-template.js +0 -26
  431. package/dist/collection/templates/tag-template.js +0 -45
  432. package/dist/collection/types/index.js +0 -5
  433. package/dist/collection/utils/element-dragger.js +0 -274
  434. package/dist/collection/utils/popover-placement.js +0 -96
  435. package/dist/collection/utils/utils.js +0 -223
  436. package/dist/collection/utils/validation.js +0 -47
  437. package/dist/esm/_commonjsHelpers-f805a026.js +0 -21
  438. package/dist/esm/bcm-accordion.entry.js +0 -81
  439. package/dist/esm/bcm-action-buttons_3.entry.js +0 -127
  440. package/dist/esm/bcm-alert.entry.js +0 -104
  441. package/dist/esm/bcm-attendance.entry.js +0 -46
  442. package/dist/esm/bcm-autocomplete.entry.js +0 -137
  443. package/dist/esm/bcm-avatar_2.entry.js +0 -136
  444. package/dist/esm/bcm-breadcrumb.entry.js +0 -49
  445. package/dist/esm/bcm-button-group.entry.js +0 -98
  446. package/dist/esm/bcm-button_7.entry.js +0 -2817
  447. package/dist/esm/bcm-card.entry.js +0 -72
  448. package/dist/esm/bcm-checkbox-group.entry.js +0 -391
  449. package/dist/esm/bcm-checkbox-lite_8.entry.js +0 -2456
  450. package/dist/esm/bcm-checkbox.entry.js +0 -161
  451. package/dist/esm/bcm-chip.entry.js +0 -66
  452. package/dist/esm/bcm-collapse-group.entry.js +0 -53
  453. package/dist/esm/bcm-collapse.entry.js +0 -52
  454. package/dist/esm/bcm-colorpicker.entry.js +0 -415
  455. package/dist/esm/bcm-date-picker.entry.js +0 -151
  456. package/dist/esm/bcm-datetime-picker.entry.js +0 -1428
  457. package/dist/esm/bcm-default.entry.js +0 -36
  458. package/dist/esm/bcm-drawer.entry.js +0 -97
  459. package/dist/esm/bcm-dropdown.entry.js +0 -213
  460. package/dist/esm/bcm-e046ec7a.js +0 -446
  461. package/dist/esm/bcm-error-layout.entry.js +0 -60
  462. package/dist/esm/bcm-expansion-panel.entry.js +0 -123
  463. package/dist/esm/bcm-form-2.entry.js +0 -201
  464. package/dist/esm/bcm-form-group.entry.js +0 -26
  465. package/dist/esm/bcm-input.entry.js +0 -319
  466. package/dist/esm/bcm-label_3.entry.js +0 -192
  467. package/dist/esm/bcm-link.entry.js +0 -43
  468. package/dist/esm/bcm-menu.entry.js +0 -197
  469. package/dist/esm/bcm-message.entry.js +0 -81
  470. package/dist/esm/bcm-modal.entry.js +0 -133
  471. package/dist/esm/bcm-notification.entry.js +0 -85
  472. package/dist/esm/bcm-old-input.entry.js +0 -379
  473. package/dist/esm/bcm-old-tag_2.entry.js +0 -138
  474. package/dist/esm/bcm-popconfirm-box.entry.js +0 -105
  475. package/dist/esm/bcm-popconfirm.entry.js +0 -98
  476. package/dist/esm/bcm-popover-box.entry.js +0 -126
  477. package/dist/esm/bcm-popover.entry.js +0 -96
  478. package/dist/esm/bcm-progress.entry.js +0 -156
  479. package/dist/esm/bcm-radio-group.entry.js +0 -249
  480. package/dist/esm/bcm-radio.entry.js +0 -85
  481. package/dist/esm/bcm-range.entry.js +0 -171
  482. package/dist/esm/bcm-result.entry.js +0 -61
  483. package/dist/esm/bcm-select-group.entry.js +0 -27
  484. package/dist/esm/bcm-select-option.entry.js +0 -33
  485. package/dist/esm/bcm-select.entry.js +0 -1163
  486. package/dist/esm/bcm-step.entry.js +0 -89
  487. package/dist/esm/bcm-stepper.entry.js +0 -207
  488. package/dist/esm/bcm-student-card.entry.js +0 -44
  489. package/dist/esm/bcm-switch.entry.js +0 -121
  490. package/dist/esm/bcm-tab-pane.entry.js +0 -52
  491. package/dist/esm/bcm-tab.entry.js +0 -71
  492. package/dist/esm/bcm-table.entry.js +0 -60
  493. package/dist/esm/bcm-tabs-content.entry.js +0 -44
  494. package/dist/esm/bcm-tabs.entry.js +0 -372
  495. package/dist/esm/bcm-tag.entry.js +0 -109
  496. package/dist/esm/bcm-textarea.entry.js +0 -130
  497. package/dist/esm/bcm-time-picker.entry.js +0 -119
  498. package/dist/esm/bcm-timeline-item.entry.js +0 -37
  499. package/dist/esm/bcm-timeline.entry.js +0 -55
  500. package/dist/esm/bcm-treeview-group.entry.js +0 -19
  501. package/dist/esm/bromcom-ui.js +0 -22
  502. package/dist/esm/caption-template-dac0e581.js +0 -32
  503. package/dist/esm/color-helper-f797b964.js +0 -41
  504. package/dist/esm/colors-1d7854ea.js +0 -222
  505. package/dist/esm/datetime-helper-df25808a.js +0 -9
  506. package/dist/esm/element-dragger-89bb52fd.js +0 -277
  507. package/dist/esm/generate-c173d211.js +0 -179
  508. package/dist/esm/global-7747dd78.js +0 -36
  509. package/dist/esm/index-61ad8f90.js +0 -191
  510. package/dist/esm/index-64896f16.js +0 -1833
  511. package/dist/esm/index-e193c9fe.js +0 -62
  512. package/dist/esm/index.js +0 -4
  513. package/dist/esm/input-template-e2ab2aee.js +0 -97
  514. package/dist/esm/is-load-decorator-39dac946.js +0 -54
  515. package/dist/esm/json-parse-decarator-e1620b31.js +0 -38
  516. package/dist/esm/label-template-2209f515.js +0 -21
  517. package/dist/esm/loader.js +0 -22
  518. package/dist/esm/number-helper-ff02b21e.js +0 -18
  519. package/dist/esm/polyfills/core-js.js +0 -11
  520. package/dist/esm/polyfills/css-shim.js +0 -1
  521. package/dist/esm/polyfills/dom.js +0 -79
  522. package/dist/esm/polyfills/es5-html-element.js +0 -1
  523. package/dist/esm/polyfills/index.js +0 -34
  524. package/dist/esm/polyfills/system.js +0 -6
  525. package/dist/esm/popover-placement-5d7a090b.js +0 -95
  526. package/dist/esm/property-decorators-dec4638c.js +0 -19
  527. package/dist/esm/slot-template-09f76e3f.js +0 -13
  528. package/dist/esm/stepper-states-fee3b4f4.js +0 -81
  529. package/dist/esm/string-helper-c0a44d3a.js +0 -132
  530. package/dist/esm/types-d1bc713d.js +0 -32
  531. package/dist/esm/utils-57652744.js +0 -123
  532. package/dist/esm/validators-33ffa1fa.js +0 -31
  533. package/dist/index.cjs.js +0 -1
  534. package/dist/index.js +0 -1
  535. package/dist/types/components/atoms/avatar/avatar.d.ts +0 -23
  536. package/dist/types/components/atoms/badge/badge.d.ts +0 -17
  537. package/dist/types/components/atoms/button/button.d.ts +0 -33
  538. package/dist/types/components/atoms/button/types.d.ts +0 -166
  539. package/dist/types/components/atoms/divider/divider.d.ts +0 -6
  540. package/dist/types/components/atoms/icon/icon.d.ts +0 -5
  541. package/dist/types/components/atoms/label/label.d.ts +0 -16
  542. package/dist/types/components/atoms/link/link.d.ts +0 -12
  543. package/dist/types/components/atoms/old-tag/old-tag.d.ts +0 -27
  544. package/dist/types/components/atoms/old-tag/types.d.ts +0 -29
  545. package/dist/types/components/atoms/states/button.states.d.ts +0 -7
  546. package/dist/types/components/atoms/tag/tag.d.ts +0 -24
  547. package/dist/types/components/atoms/tag/types.d.ts +0 -29
  548. package/dist/types/components/atoms/text/text.d.ts +0 -10
  549. package/dist/types/components/data-table/table.d.ts +0 -8
  550. package/dist/types/components/default/default.d.ts +0 -6
  551. package/dist/types/components/molecules/accordion/accordion.d.ts +0 -11
  552. package/dist/types/components/molecules/alert/alert.d.ts +0 -21
  553. package/dist/types/components/molecules/alert/types.d.ts +0 -25
  554. package/dist/types/components/molecules/breadcrumb/breadcrumb.d.ts +0 -14
  555. package/dist/types/components/molecules/breadcrumb/types.d.ts +0 -10
  556. package/dist/types/components/molecules/card/card.d.ts +0 -11
  557. package/dist/types/components/molecules/checkbox/checkbox-lite.d.ts +0 -14
  558. package/dist/types/components/molecules/checkbox/checkbox.d.ts +0 -56
  559. package/dist/types/components/molecules/checkbox/group.d.ts +0 -56
  560. package/dist/types/components/molecules/collapse/collapse.d.ts +0 -12
  561. package/dist/types/components/molecules/collapse/group.d.ts +0 -15
  562. package/dist/types/components/molecules/drawer/drawer.d.ts +0 -21
  563. package/dist/types/components/molecules/dropdown/dropdown.d.ts +0 -52
  564. package/dist/types/components/molecules/empty/empty.d.ts +0 -29
  565. package/dist/types/components/molecules/empty/types.d.ts +0 -19
  566. package/dist/types/components/molecules/error-layout/error-layout.d.ts +0 -25
  567. package/dist/types/components/molecules/error-layout/types.d.ts +0 -4
  568. package/dist/types/components/molecules/expansion-panel/expansion-panel.d.ts +0 -31
  569. package/dist/types/components/molecules/input/input.d.ts +0 -82
  570. package/dist/types/components/molecules/input/types.d.ts +0 -13
  571. package/dist/types/components/molecules/item/item.d.ts +0 -13
  572. package/dist/types/components/molecules/items/items.d.ts +0 -10
  573. package/dist/types/components/molecules/message/message.d.ts +0 -32
  574. package/dist/types/components/molecules/message/types.d.ts +0 -13
  575. package/dist/types/components/molecules/modal/modal.d.ts +0 -26
  576. package/dist/types/components/molecules/notification/notification.d.ts +0 -42
  577. package/dist/types/components/molecules/notification/types.d.ts +0 -14
  578. package/dist/types/components/molecules/old-input/old-input.d.ts +0 -79
  579. package/dist/types/components/molecules/old-input/types.d.ts +0 -13
  580. package/dist/types/components/molecules/popconfirm/popconfirm-box.d.ts +0 -29
  581. package/dist/types/components/molecules/popconfirm/popconfirm.d.ts +0 -28
  582. package/dist/types/components/molecules/popover/popover-box.d.ts +0 -24
  583. package/dist/types/components/molecules/popover/popover.d.ts +0 -22
  584. package/dist/types/components/molecules/progress/progress.d.ts +0 -25
  585. package/dist/types/components/molecules/progress/types.d.ts +0 -14
  586. package/dist/types/components/molecules/radio/group.d.ts +0 -54
  587. package/dist/types/components/molecules/radio/radio.d.ts +0 -20
  588. package/dist/types/components/molecules/radio/types.d.ts +0 -29
  589. package/dist/types/components/molecules/range/range.d.ts +0 -36
  590. package/dist/types/components/molecules/result/result.d.ts +0 -13
  591. package/dist/types/components/molecules/result/types.d.ts +0 -19
  592. package/dist/types/components/molecules/search/search.d.ts +0 -32
  593. package/dist/types/components/molecules/search-2/search-2.d.ts +0 -35
  594. package/dist/types/components/molecules/select/group.d.ts +0 -6
  595. package/dist/types/components/molecules/select/option.d.ts +0 -10
  596. package/dist/types/components/molecules/select/select-box.d.ts +0 -15
  597. package/dist/types/components/molecules/select/select.d.ts +0 -131
  598. package/dist/types/components/molecules/states/alert.states.d.ts +0 -7
  599. package/dist/types/components/molecules/states/checkbox-group.states.d.ts +0 -53
  600. package/dist/types/components/molecules/states/radio-group.states.d.ts +0 -48
  601. package/dist/types/components/molecules/states/search.states.d.ts +0 -14
  602. package/dist/types/components/molecules/states/stepper-states.d.ts +0 -13
  603. package/dist/types/components/molecules/stepper/step.d.ts +0 -25
  604. package/dist/types/components/molecules/stepper/stepper.d.ts +0 -34
  605. package/dist/types/components/molecules/switch/switch.d.ts +0 -46
  606. package/dist/types/components/molecules/textarea/textarea.d.ts +0 -52
  607. package/dist/types/components/molecules/textarea/types.d.ts +0 -9
  608. package/dist/types/components/molecules/timeline/timeline-item.d.ts +0 -16
  609. package/dist/types/components/molecules/timeline/timeline.d.ts +0 -25
  610. package/dist/types/components/molecules/tooltip/tooltip-box.d.ts +0 -22
  611. package/dist/types/components/molecules/tooltip/tooltip.d.ts +0 -23
  612. package/dist/types/components/organism/autocomplete/autocomplete.d.ts +0 -31
  613. package/dist/types/components/organism/colorpicker/colorpicker.d.ts +0 -176
  614. package/dist/types/components/organism/date-picker/date-picker.d.ts +0 -76
  615. package/dist/types/components/organism/datetime-picker/datetime-picker.d.ts +0 -438
  616. package/dist/types/components/organism/datetime-picker/types.d.ts +0 -54
  617. package/dist/types/components/organism/form/form-group.d.ts +0 -9
  618. package/dist/types/components/organism/form/form.d.ts +0 -34
  619. package/dist/types/components/organism/form-2/bcm-form-components.d.ts +0 -2
  620. package/dist/types/components/organism/form-2/form-2.d.ts +0 -25
  621. package/dist/types/components/organism/list/list-key-control.d.ts +0 -18
  622. package/dist/types/components/organism/list/list-tag-control.d.ts +0 -17
  623. package/dist/types/components/organism/list/list.d.ts +0 -136
  624. package/dist/types/components/organism/listbox/listbox-group.d.ts +0 -7
  625. package/dist/types/components/organism/listbox/listbox-item.d.ts +0 -58
  626. package/dist/types/components/organism/listbox/listbox.d.ts +0 -152
  627. package/dist/types/components/organism/listbox/types.d.ts +0 -11
  628. package/dist/types/components/organism/states/bcm-list2.states.d.ts +0 -28
  629. package/dist/types/components/organism/tabs/tab-pane.d.ts +0 -19
  630. package/dist/types/components/organism/tabs/tab.d.ts +0 -36
  631. package/dist/types/components/organism/tabs/tabs-content.d.ts +0 -18
  632. package/dist/types/components/organism/tabs/tabs.d.ts +0 -112
  633. package/dist/types/components/organism/tabs/types.d.ts +0 -39
  634. package/dist/types/components/organism/time-picker/time-picker.d.ts +0 -68
  635. package/dist/types/components/organism/treeview/treeview-group.d.ts +0 -3
  636. package/dist/types/components/organism/treeview/treeview-item.d.ts +0 -119
  637. package/dist/types/components/organism/treeview/treeview.d.ts +0 -181
  638. package/dist/types/components/organism/treeview/types.d.ts +0 -11
  639. package/dist/types/components.d.ts +0 -3463
  640. package/dist/types/decorators/is-load-decorator.d.ts +0 -7
  641. package/dist/types/decorators/json-parse-decarator.d.ts +0 -4
  642. package/dist/types/decorators/property-decorators.d.ts +0 -4
  643. package/dist/types/global/variables/colors.d.ts +0 -217
  644. package/dist/types/helper/color-helper.d.ts +0 -10
  645. package/dist/types/helper/datetime-helper.d.ts +0 -3
  646. package/dist/types/helper/generate.d.ts +0 -19
  647. package/dist/types/helper/number-helper.d.ts +0 -10
  648. package/dist/types/helper/string-helper.d.ts +0 -27
  649. package/dist/types/helper/validators.d.ts +0 -10
  650. package/dist/types/index.d.ts +0 -1
  651. package/dist/types/models/abstract-classes/abstract-key-control.d.ts +0 -31
  652. package/dist/types/models/bcm-types.d.ts +0 -21
  653. package/dist/types/models/bcm.d.ts +0 -456
  654. package/dist/types/models/states/atoms/bcm-atoms-state.d.ts +0 -34
  655. package/dist/types/models/states/molecules/bcm-molecules-state.d.ts +0 -90
  656. package/dist/types/models/states/organisms/bcm-organisms-state.d.ts +0 -78
  657. package/dist/types/new-ds/components/action-buttons/action-buttons.d.ts +0 -6
  658. package/dist/types/new-ds/components/attendance/attendance.d.ts +0 -7
  659. package/dist/types/new-ds/components/button-group/button-group.d.ts +0 -21
  660. package/dist/types/new-ds/components/chip/chip.d.ts +0 -24
  661. package/dist/types/new-ds/components/menu/menu.d.ts +0 -38
  662. package/dist/types/new-ds/components/student-card/student-card.d.ts +0 -10
  663. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  664. package/dist/types/templates/button-template.d.ts +0 -18
  665. package/dist/types/templates/caption-template.d.ts +0 -14
  666. package/dist/types/templates/checkbox-group-template.d.ts +0 -10
  667. package/dist/types/templates/checkbox-template.d.ts +0 -13
  668. package/dist/types/templates/icon-template.d.ts +0 -7
  669. package/dist/types/templates/info-footer-template.d.ts +0 -10
  670. package/dist/types/templates/input-template.d.ts +0 -34
  671. package/dist/types/templates/label-template.d.ts +0 -12
  672. package/dist/types/templates/list-item-template.d.ts +0 -13
  673. package/dist/types/templates/list-template.d.ts +0 -27
  674. package/dist/types/templates/slot-template.d.ts +0 -8
  675. package/dist/types/templates/step-template.d.ts +0 -17
  676. package/dist/types/templates/tag-template.d.ts +0 -21
  677. package/dist/types/types/index.d.ts +0 -12
  678. package/dist/types/utils/element-dragger.d.ts +0 -146
  679. package/dist/types/utils/popover-placement.d.ts +0 -3
  680. package/dist/types/utils/utils.d.ts +0 -55
  681. package/dist/types/utils/validation.d.ts +0 -19
@@ -1,2456 +0,0 @@
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-64896f16.js';
6
- import { c as classnames } from './index-e193c9fe.js';
7
- import { G as Generate } from './generate-c173d211.js';
8
- import { B as Bcm } from './bcm-e046ec7a.js';
9
- import { c as getChilds, d as delay } from './utils-57652744.js';
10
- import './_commonjsHelpers-f805a026.js';
11
-
12
- 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{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{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{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{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{background-color:var(--bcm-checkbox-primary-color-disabled)}.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}";
13
-
14
- const BcmCheckboxLite = class {
15
- constructor(hostRef) {
16
- registerInstance(this, hostRef);
17
- this._id = Generate.UID();
18
- this.checked = true;
19
- this.indeterminate = null;
20
- this.disabled = false;
21
- this.hidden = false;
22
- this.required = false;
23
- this.readOnly = false;
24
- this.captionType = Bcm.Status.default;
25
- }
26
- render() {
27
- const { disabled, checked, readOnly, required, indeterminate, hidden, captionType, _id } = this;
28
- const hostClasses = classnames('bcm-checkbox', 'bcm-checkbox__type-default', {
29
- 'error': captionType == Bcm.Status.error,
30
- hidden,
31
- checked,
32
- disabled,
33
- required,
34
- readOnly,
35
- });
36
- const bcmCheckboxIconClass = classnames('bcm-checkbox__icon', 'bcm-checkbox__icon-lite', 'bcm-checkbox__icon-' + indeterminate, {
37
- checked
38
- });
39
- const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
40
- return (h(Host, { class: hostClasses }, 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: {
41
- 'height': '12px',
42
- 'min-height': '12px',
43
- 'width': '12px',
44
- 'min-width': '12px'
45
- } }, 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", stroke: "#bfbfbf", "stroke-width": "0.3" })))))));
46
- }
47
- get el() { return getElement(this); }
48
- };
49
- BcmCheckboxLite.style = checkboxCss;
50
-
51
- 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)}";
52
-
53
- const BcmDivider = class {
54
- constructor(hostRef) {
55
- registerInstance(this, hostRef);
56
- this.hidden = false;
57
- this.direction = Bcm.Direction.horizontal;
58
- }
59
- render() {
60
- const { hidden, direction } = this;
61
- const hostClasses = classnames('bcm-divider', 'bcm-divider__direction-' + direction, {
62
- 'hidden': hidden
63
- });
64
- return (h(Host, { class: hostClasses }, h("span", { hidden: true }, h("slot", null))));
65
- }
66
- };
67
- BcmDivider.style = dividerCss;
68
-
69
- 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}";
70
-
71
- /**
72
- * @desc
73
- * @param str
74
- */
75
- const lowercase$2 = (str) => str.toLowerCase();
76
- const BcmListbox = class {
77
- constructor(hostRef) {
78
- registerInstance(this, hostRef);
79
- this.listboxItemSelected = createEvent(this, "bcm-listbox-item-selected", 7);
80
- this.listboxClearSelected = createEvent(this, "bcm-listbox-clear-selecteds", 7);
81
- this.listboxSendCheck = createEvent(this, "bcm-listbox-send-check", 7);
82
- this.listboxSendUncheck = createEvent(this, "bcm-listbox-send-uncheck", 7);
83
- this.listboxChecklist = createEvent(this, "bcm-listbox-checklist", 7);
84
- this.listboxChange = createEvent(this, "bcm-listbox-change", 7);
85
- this.listboxChecked = createEvent(this, "bcm-listbox-checked", 7);
86
- this.change = createEvent(this, "bcm-change", 7);
87
- this.objectMapping = {
88
- 'id': "id",
89
- 'text': "text",
90
- 'icon': "icon",
91
- 'avatar': "avatar",
92
- 'avatarName': "avatarName",
93
- 'avatarImage': "avatarImage",
94
- 'secondaryText': "secondaryText",
95
- 'tooltipText': "tooltipText",
96
- 'selected': "selected",
97
- 'checked': "checked",
98
- 'disabled': "disabled",
99
- };
100
- this.checkedObjectList = [];
101
- this.cacheCheckedObjectList = [];
102
- this.allChilds = [];
103
- this.onlyChilds = [];
104
- this.firstRun = true;
105
- this.firstCheck = false;
106
- this.onFocus = false;
107
- this.isSetData = false;
108
- this.isGroupArray = [];
109
- this.intersection = [];
110
- /**
111
- * Component Properties
112
- */
113
- this.innerComponent = false;
114
- this.checkboxes = false;
115
- this.required = false;
116
- this.value = null;
117
- this.search = false;
118
- this.infoFooter = false;
119
- this.showIcon = false;
120
- this.size = 'medium';
121
- this.checkedList = [];
122
- this.updateCheckedList = [];
123
- this._items = [];
124
- this.fullWidth = false;
125
- this.searchFields = ['text', 'secondaryText', 'tooltipText'];
126
- this.hidden = false;
127
- this.returnField = "id";
128
- this.searchSub = "items";
129
- this.searchText = "";
130
- this.treeview = false;
131
- this.searchPlaceholder = "Search";
132
- this.numberOfColumns = 1;
133
- this.height = null;
134
- this.maxHeight = null;
135
- this.template = null;
136
- this.highlight = false;
137
- this.loading = true;
138
- this.noCaption = false;
139
- this.captionType = 'default';
140
- this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
141
- /**
142
- * Component States
143
- */
144
- this.searchResults = [];
145
- this.totalSearch = 0;
146
- this.showSearch = true;
147
- this.empty = false;
148
- this.runClearAndSelect = false;
149
- this.total = 0;
150
- this.items = [];
151
- this.checklist = [];
152
- this.sortedChecklist = [];
153
- this.indeterminateState = 'uncheck';
154
- this.checked = false;
155
- this.checklistSorted = [];
156
- }
157
- async setClear() {
158
- this.listboxChecklist.emit([]);
159
- this.value = null;
160
- this.selectedId = null;
161
- this.listboxClearSelected.emit([]);
162
- // this.checkedObjectList.forEach(item => {
163
- // this.listboxUncheckedMethod(String(item[this.objectMapping['id']]), this._internal_id)
164
- // });
165
- let isItem = getChilds(this.el, 'bcm-listbox-item');
166
- let elementStatuses = [];
167
- if (isItem) {
168
- isItem.map(element => {
169
- elementStatuses.push(element.checked = false);
170
- });
171
- }
172
- // console.log("uncheck")
173
- await Promise.all(elementStatuses);
174
- // if ( allStatuses ){
175
- // console.log("bitti")
176
- // }
177
- this.checklist = [];
178
- this.sortedChecklist = [];
179
- this.checklistSorted = [];
180
- this.checkedObjectList = [];
181
- await delay(10);
182
- return Promise.resolve();
183
- }
184
- async resetCaption() {
185
- await delay(10);
186
- this.caption = this.captionCache;
187
- this.captionType = this.captionTypeCache;
188
- this.captionError = null;
189
- await delay(10);
190
- return Promise.resolve();
191
- }
192
- connectedCallback() {
193
- this.captionCache = this.caption;
194
- this.captionTypeCache = this.captionType;
195
- }
196
- async getValue() {
197
- if (this.checkboxes) {
198
- return this.checkedObjectList;
199
- }
200
- else {
201
- return this.value;
202
- }
203
- }
204
- async getChecklist() {
205
- return this.checkedObjectList;
206
- }
207
- async showSearchMethod(val = true) {
208
- if (this.treeview == false && this.search == true) {
209
- this.showSearch = val;
210
- var search = null;
211
- if (search = this.el.shadowRoot.getElementById("search")) {
212
- if (val) {
213
- search.classList.remove('hidden');
214
- }
215
- else {
216
- search.classList.add('hidden');
217
- }
218
- }
219
- }
220
- }
221
- async selected(id) {
222
- this.selectedId = String(id);
223
- if (this.treeview === true) {
224
- setTimeout(async () => {
225
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
226
- if (bcmTreeview) {
227
- await bcmTreeview.selected(this.selectedId);
228
- }
229
- }, 100);
230
- }
231
- }
232
- async clearAndSelectSearch(select = true) {
233
- this.runClearAndSelect = true;
234
- if (this.search == true) {
235
- setTimeout(() => {
236
- var searchInput = null;
237
- searchInput = this.el.shadowRoot.querySelector("bcm-search");
238
- if (searchInput) {
239
- searchInput.setClear();
240
- if (select == true) {
241
- searchInput.select();
242
- }
243
- }
244
- }, 100);
245
- }
246
- }
247
- async addChecked(items) {
248
- await this.setClear();
249
- if (items) {
250
- if (typeof items != 'string') {
251
- await delay(50);
252
- if (sessionStorage.getItem(this._internal_id + "-config")) {
253
- this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
254
- }
255
- this.checkedList = items;
256
- this.checkedList.forEach((item) => {
257
- this.handleListboxChecked({ detail: String(item) }, this._internal_id);
258
- });
259
- this.updateCheckedList = [];
260
- if (this.treeview === true) {
261
- setTimeout(async () => {
262
- await customElements.whenDefined("bcm-treeview");
263
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
264
- if (bcmTreeview) {
265
- await bcmTreeview.addChecked(items);
266
- }
267
- }, 50);
268
- }
269
- }
270
- }
271
- }
272
- async updateChecked(items) {
273
- this.setClear();
274
- this.checkedList = [];
275
- this.updateCheckedList = items;
276
- this.updateCheckedList.forEach((item) => {
277
- this.handleListboxChecked({ detail: item });
278
- });
279
- setTimeout(async () => {
280
- if (this.treeview === true) {
281
- await customElements.whenDefined("bcm-treeview");
282
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
283
- if (bcmTreeview) {
284
- await bcmTreeview.updateChecked(items);
285
- }
286
- }
287
- }, 100);
288
- }
289
- async config(_config) {
290
- if (_config['treeview'] && _config['treeview'] === true) {
291
- typeof _config['treeview'] == 'boolean'
292
- ? this.treeview = _config['treeview']
293
- : this.treeview = false;
294
- }
295
- setTimeout(async () => {
296
- if (this.treeview === true) {
297
- await customElements.whenDefined("bcm-treeview");
298
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
299
- if (bcmTreeview) {
300
- await bcmTreeview.config(_config);
301
- if (this.selectedId) {
302
- await bcmTreeview.selected(this.selectedId);
303
- }
304
- }
305
- }
306
- }, 300);
307
- if (_config['searchFields']) {
308
- if (Array.isArray(_config['searchFields'])) {
309
- this.searchFields = _config['searchFields'];
310
- }
311
- }
312
- if (_config['searchPlaceholder']) {
313
- typeof _config['searchPlaceholder'] == 'string'
314
- ? this.searchPlaceholder = _config['searchPlaceholder']
315
- : this.searchPlaceholder = null;
316
- }
317
- if (_config['maxHeight']) {
318
- typeof _config['maxHeight'] == 'string'
319
- ? this.maxHeight = _config['maxHeight']
320
- : this.maxHeight = "100%";
321
- }
322
- if (_config['height']) {
323
- typeof _config['height'] == 'string'
324
- ? this.height = _config['height']
325
- : this.height = "100%";
326
- }
327
- if (_config['template']) {
328
- typeof _config['template'] == 'string'
329
- ? this.template = _config['template']
330
- : this.template = null;
331
- }
332
- if (_config['searchable']) {
333
- typeof _config['searchable'] == 'boolean'
334
- ? this.search = _config['searchable']
335
- : this.search = false;
336
- }
337
- if (_config['highlight']) {
338
- typeof _config['highlight'] == 'boolean'
339
- ? this.highlight = _config['highlight']
340
- : this.highlight = false;
341
- }
342
- if (_config['fullWidth']) {
343
- typeof _config['fullWidth'] == 'boolean'
344
- ? this.fullWidth = _config['fullWidth']
345
- : this.fullWidth = false;
346
- }
347
- if (_config['numberOfColumns']) {
348
- typeof _config['numberOfColumns'] == 'number'
349
- ? this.numberOfColumns = _config['numberOfColumns']
350
- : this.numberOfColumns = 1;
351
- }
352
- if (_config['infoFooter']) {
353
- typeof _config['infoFooter'] == 'boolean'
354
- ? this.infoFooter = _config['infoFooter']
355
- : this.infoFooter = false;
356
- }
357
- if (_config['checkable']) {
358
- typeof _config['checkable'] == 'boolean'
359
- ? this.checkboxes = _config['checkable']
360
- : this.checkboxes = false;
361
- }
362
- if (_config['showIcon']) {
363
- typeof _config['showIcon'] == 'boolean'
364
- ? this.showIcon = _config['showIcon']
365
- : this.showIcon = false;
366
- }
367
- if (_config['size']) {
368
- (["small", "medium", "large"].indexOf(_config['size']) >= 0)
369
- ? this.size = _config['size']
370
- : this.size = 'medium';
371
- }
372
- this.searchSub = this.objectMapping['items'];
373
- if (_config['mapping']) {
374
- if (_config['mapping']['id']) {
375
- this.objectMapping['id'] = String(_config['mapping']['id']);
376
- this.returnField = this.objectMapping['id'];
377
- }
378
- if (_config['mapping']['text']) {
379
- this.objectMapping['text'] = _config['mapping']['text'];
380
- }
381
- if (_config['mapping']['icon']) {
382
- this.objectMapping['icon'] = _config['mapping']['icon'];
383
- }
384
- if (_config['mapping']['avatar']) {
385
- this.objectMapping['avatar'] = _config['mapping']['avatar'];
386
- }
387
- if (_config['mapping']['avatarName']) {
388
- this.objectMapping['avatarName'] = _config['mapping']['avatarName'];
389
- }
390
- if (_config['mapping']['avatarImage']) {
391
- this.objectMapping['avatarImage'] = _config['mapping']['avatarImage'];
392
- }
393
- if (_config['mapping']['secondaryText']) {
394
- this.objectMapping['secondaryText'] = _config['mapping']['secondaryText'];
395
- }
396
- if (_config['mapping']['tooltipText']) {
397
- this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
398
- }
399
- if (_config['mapping']['disabled']) {
400
- this.objectMapping['disabled'] = _config['mapping']['disabled'];
401
- }
402
- if (_config['mapping']['checked']) {
403
- this.objectMapping['checked'] = _config['mapping']['checked'];
404
- }
405
- if (_config['mapping']['selected']) {
406
- this.objectMapping['selected'] = _config['mapping']['selected'];
407
- }
408
- if (_config['mapping']['items']) {
409
- this.objectMapping['items'] = _config['mapping']['items'];
410
- this.searchSub = this.objectMapping['items'];
411
- }
412
- // if ( this.treeview ) {
413
- // }else{
414
- // this.searchSub = this.objectMapping['items']
415
- // }
416
- }
417
- sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
418
- // forceUpdate(this.el)
419
- return Promise.resolve(true);
420
- }
421
- async setData(_data = []) {
422
- this.clearAndSelectSearch(false);
423
- this.isLoading(true);
424
- this._items = _data;
425
- this.searchData = JSON.parse(_data);
426
- this.isSetData = true;
427
- // this.isEmpty(false)
428
- setTimeout(async () => {
429
- if (this.treeview === true) {
430
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
431
- if (bcmTreeview) {
432
- await bcmTreeview.setData(_data);
433
- if (this.searchData.length > 0) {
434
- this.isEmpty(false);
435
- this.isLoading(false);
436
- }
437
- }
438
- }
439
- }, 100);
440
- }
441
- // componentDidLoad(){
442
- // console.log("kilitle")
443
- // setTimeout(() => {
444
- // if(this.isSetData) {
445
- // this.isLoading(true)
446
- // this.isEmpty(false)
447
- // }else{
448
- // this.isLoading(false)
449
- // this.isEmpty(true)
450
- // }
451
- // }, 100);
452
- // }
453
- componentWillRender() {
454
- if (this.isSetData) {
455
- this.onlyChilds = this.getAllGroup(this.el, true);
456
- this.allChilds = this.getAllGroup();
457
- if (this.onlyChilds.length != this.total) {
458
- this.total = this.onlyChilds.length;
459
- }
460
- if (this.checkboxes === true) {
461
- this.setIndeterminateState();
462
- if (this.checklistSorted.length > 0) {
463
- this.checkedObjectList = [];
464
- this.getAllGroup(this.el).forEach(element => {
465
- element.checked == true && (this.firstCheck = true,
466
- this.checkedObjectList.indexOf(element.itemObject) == -1 && (this.checkedObjectList.push(element.itemObject)));
467
- });
468
- if (JSON.stringify(this.cacheCheckedObjectList) !== JSON.stringify(this.checkedObjectList)) {
469
- this.listboxChecklist.emit(this.checkedObjectList);
470
- this.cacheCheckedObjectList = this.checkedObjectList;
471
- this.value = this.checkedObjectList;
472
- }
473
- }
474
- else {
475
- if (this.firstCheck) {
476
- this.listboxChecklist.emit([]);
477
- this.cacheCheckedObjectList = [];
478
- if (this.value != null) {
479
- this.value = null;
480
- }
481
- }
482
- }
483
- }
484
- }
485
- }
486
- componentDidRender() {
487
- // this.isEmpty(true)
488
- // this.isLoading(true)
489
- // if(this.total > 0) {
490
- // this.isLoading(false)
491
- // this.isEmpty(false)
492
- // }
493
- // this.isEmpty(true)
494
- if (this.isSetData) {
495
- if (this.total > 0) {
496
- this.isEmpty(false);
497
- this.isLoading(false);
498
- }
499
- else {
500
- this.isEmpty(true);
501
- }
502
- }
503
- }
504
- /**
505
- * @desc
506
- * @returns {void}
507
- */
508
- setIndeterminateState() {
509
- let state = 'uncheck';
510
- let allChecked = true;
511
- let allUnchecked = true;
512
- this.getAllGroup(this.el, true).map((item) => {
513
- item.checked && (allUnchecked = false);
514
- !item.checked && (allChecked = false);
515
- });
516
- !allChecked && !allUnchecked
517
- ? state = 'indeterminate'
518
- : allChecked
519
- ? state = 'determinate'
520
- : state = 'uncheck';
521
- this.indeterminateState = state;
522
- this.checked = state == 'determinate' ? true : false;
523
- // this.listboxChecklist.emit(this.sortedChecklist)
524
- }
525
- getAllGroup(element = this.el, onlyItem = false) {
526
- let returnAllItems = [];
527
- let isGroup = getChilds(element, 'bcm-listbox-group');
528
- let isItem = getChilds(element, 'bcm-listbox-item');
529
- if (isGroup.length > 0) {
530
- isGroup.forEach(group => {
531
- if (this.isGroupArray.indexOf(Number(group.id)) === -1) {
532
- this.isGroupArray.push(Number(group.id));
533
- }
534
- if (onlyItem == false) {
535
- returnAllItems = [...returnAllItems,
536
- group
537
- ];
538
- }
539
- getChilds(group, 'bcm-listbox-item').forEach(items => {
540
- if (!(returnAllItems.indexOf(items) >= 0)) {
541
- returnAllItems = [...returnAllItems,
542
- items
543
- ];
544
- }
545
- });
546
- });
547
- }
548
- if (isItem.length > 0) {
549
- isItem.forEach(items => {
550
- if (!(returnAllItems.indexOf(items) >= 0)) {
551
- returnAllItems = [...returnAllItems,
552
- items
553
- ];
554
- }
555
- });
556
- }
557
- return returnAllItems;
558
- }
559
- getAllChilds(element = this.el, type = null) {
560
- let returnAllItems = [];
561
- let oldItems = [];
562
- if (!this._items || type === "slot") {
563
- getChilds(element, 'bcm-listbox-item').forEach(items => {
564
- returnAllItems = [...returnAllItems,
565
- items
566
- ];
567
- });
568
- }
569
- else if (this._items && this._items.length > 0) {
570
- oldItems = JSON.parse(this._items);
571
- oldItems.map((item) => (((item.type === 'group') ? (item.items.map((item) => ((returnAllItems = [...returnAllItems, item])))) :
572
- (returnAllItems = [...returnAllItems, item]))));
573
- }
574
- return returnAllItems;
575
- }
576
- /**
577
- * @desc
578
- */
579
- handleCheckList(process = 'add', checkId) {
580
- checkId = String(checkId);
581
- if (this.checkboxes) {
582
- if (this.items && this.items.find(e => e[this.objectMapping['id']] == checkId)) {
583
- // checkId = Number(checkId)
584
- switch (process) {
585
- case 'add':
586
- if (this.checklist.length > 0) {
587
- if (!this.checklist.includes(checkId)) {
588
- this.checklist = [...this.checklist, checkId];
589
- }
590
- }
591
- else {
592
- this.checklist = [checkId];
593
- }
594
- break;
595
- case 'remove':
596
- this.checklist = this.checklist.filter(item => item !== checkId);
597
- break;
598
- }
599
- let sorted = this.checklist.sort(function (a, b) { return a - b; });
600
- this.sortedChecklist = this.checklist;
601
- this.checklistSorted = sorted;
602
- // forceUpdate(this.el)
603
- }
604
- }
605
- }
606
- handleIndeterminateClick() {
607
- let state = 'uncheck';
608
- let allChecked = true;
609
- let allUnchecked = true;
610
- let visibleItem = [];
611
- this.getAllGroup(this.el, true).map((item) => {
612
- if (item.hidden === false) {
613
- visibleItem.push(item);
614
- item.checked && (allUnchecked = false);
615
- !item.checked && (allChecked = false);
616
- }
617
- });
618
- !allChecked && !allUnchecked
619
- ? state = 'indeterminate'
620
- : allChecked
621
- ? state = 'determinate'
622
- : state = 'uncheck';
623
- visibleItem.map((item) => {
624
- if (state !== 'uncheck') {
625
- item.checked = false;
626
- this.handleCheckList('remove', String(item.id));
627
- }
628
- else {
629
- item.checked = true;
630
- this.handleCheckList('add', String(item.id));
631
- }
632
- });
633
- this.setIndeterminateState();
634
- }
635
- handleCheckboxClick(e) {
636
- e.preventDefault();
637
- }
638
- /**
639
- * @desc
640
- * @param item
641
- */
642
- itemRenderer(item) {
643
- if (item[this.objectMapping['id']] && String(this.selectedId) == String(item[this.objectMapping['id']])) {
644
- this.listboxItemSelected.emit(item);
645
- }
646
- // if(item[this.objectMapping['selected']] && item[this.objectMapping['selected']] === true){
647
- // this.listboxItemSelected.emit(item)
648
- // }
649
- // var checkedListCache = this.checkedList;
650
- // if(checkedListCache && checkedListCache.find(e => e == item[this.objectMapping['id']])){
651
- // this.handleListboxChecked({detail: item[this.objectMapping['id']]})
652
- // }
653
- // const index = checkedListCache.indexOf(item[this.objectMapping['id']]);
654
- // if (index > -1) {
655
- // checkedListCache.splice(index, 1);
656
- // }
657
- // if(this.updateCheckedList.length > 0 ){
658
- // if( this.updateCheckedList.find(e => e == item[this.objectMapping['id']]) ){
659
- // const index = this.updateCheckedList.indexOf(item[this.objectMapping['id']]);
660
- // if (index > -1) {
661
- // this.updateCheckedList.splice(index, 1);
662
- // }
663
- // this.listboxChecked.emit(item[this.objectMapping['id']])
664
- // }
665
- // }
666
- 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 })));
667
- }
668
- /**
669
- * @desc
670
- * @param group
671
- */
672
- recursiveGroupRenderer(group) {
673
- 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))))));
674
- }
675
- async searchResultMethod(items = []) {
676
- if (this.treeview == true) {
677
- const bcmtreeview = this.el.shadowRoot.querySelector("bcm-treeview");
678
- // await bcmListbox.config(this._config)
679
- if (bcmtreeview) {
680
- bcmtreeview.searchResultMethod({ detail: (items.length > 0 ? items : true) });
681
- }
682
- }
683
- else {
684
- this.listenSearchResult({ detail: (items.length > 0 ? items : true), isEvent: true });
685
- }
686
- // return true
687
- }
688
- handleListboxSelected(event) {
689
- this.listboxItemSelected.emit(event.detail);
690
- }
691
- /**
692
- * @desc
693
- */
694
- // @Listen('bcm-treeview-checklist')
695
- // handleListboxCheckedList(e) {
696
- // this.listboxChecklist.emit(e.detail)
697
- // }
698
- isLoading(val) {
699
- var listContainer = this.el.shadowRoot.getElementById("bcm-listbox-list");
700
- var loading = this.el.shadowRoot.getElementById("loading");
701
- var searchInput = this.el.shadowRoot.querySelector("bcm-search");
702
- // var listcontainer = this.el.shadowRoot.getElementById("list-container")
703
- if (val) {
704
- if (searchInput) {
705
- searchInput.disabled = true;
706
- }
707
- listContainer && listContainer.classList.add('loading');
708
- loading && loading.classList.add('show');
709
- // listcontainer && listcontainer.classList.add('hidden')
710
- }
711
- else {
712
- if (searchInput) {
713
- searchInput.disabled = false;
714
- }
715
- listContainer && listContainer.classList.remove('loading');
716
- loading && loading.classList.remove('show');
717
- // listcontainer && listcontainer.classList.remove('hidden')
718
- }
719
- }
720
- isEmpty(val) {
721
- var empty = this.el.shadowRoot.getElementById("empty");
722
- var listcontainer = this.el.shadowRoot.getElementById("list-container");
723
- var checkall = this.el.shadowRoot.getElementById("checkall");
724
- if (val) {
725
- empty && empty.classList.add('show');
726
- listcontainer && listcontainer.classList.add('hidden');
727
- checkall && checkall.classList.add('hidden');
728
- }
729
- else {
730
- empty && empty.classList.remove('show');
731
- listcontainer && listcontainer.classList.remove('hidden');
732
- checkall && checkall.classList.remove('hidden');
733
- }
734
- }
735
- isSearchCount(val = false) {
736
- if (this.infoFooter) {
737
- var inSearch = this.el.shadowRoot.getElementById("in-search");
738
- var inTotal = this.el.shadowRoot.getElementById("in-total");
739
- if (val !== false && val >= 0 && val != null && inSearch && inTotal) {
740
- inSearch.innerHTML = val;
741
- inTotal.style.display = "none";
742
- }
743
- else {
744
- inTotal.style.display = "inline";
745
- inSearch.innerHTML = "";
746
- }
747
- }
748
- }
749
- listenSearchResult(event) {
750
- var path = event.path || (event.composedPath && event.composedPath());
751
- if (event.isEvent == undefined) {
752
- if (path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
753
- var searchValue = '';
754
- if (this.treeview == false) {
755
- // var checkall = null
756
- // this.checkboxes && (checkall = this.el.shadowRoot.getElementById("checkall"))
757
- var totalSearch = event.detail.length;
758
- // this.empty = false
759
- this.isEmpty(false);
760
- this.intersection = [];
761
- if (event.detail.length > 0) {
762
- if (event.detail[0] == -1) {
763
- totalSearch = 0;
764
- this.empty = true;
765
- this.isEmpty(true);
766
- }
767
- if (this.allChilds.length > 0) {
768
- // this.checkboxes && ( checkall && checkall.classList.add('hidden') )
769
- this.allChilds.map((item) => {
770
- if (this.highlight) {
771
- event.target.addEventListener('bcm-on-search-value', async (e) => {
772
- var inputText = item.shadowRoot.getElementById("text");
773
- if (inputText) {
774
- searchValue = await e.detail;
775
- inputText = (inputText === null || inputText === void 0 ? void 0 : inputText.textContent) || (inputText === null || inputText === void 0 ? void 0 : inputText.innerText) || "";
776
- if (searchValue) {
777
- var cacheInputText = lowercase$2(inputText);
778
- var cacheSearchValue = lowercase$2(searchValue);
779
- var index = cacheInputText.indexOf(cacheSearchValue);
780
- if (index >= 0) {
781
- inputText = inputText.substring(0, index) + "<span class='highlight'>" + inputText.substring(index, index + searchValue.length) + "</span>" + inputText.substring(index + searchValue.length);
782
- }
783
- }
784
- item.shadowRoot.getElementById("text").innerHTML = inputText;
785
- }
786
- });
787
- }
788
- item.hidden = true;
789
- var _ids = String(item.id);
790
- if (event.detail.indexOf(_ids) >= 0) {
791
- item.hidden = false;
792
- }
793
- else {
794
- item.hidden = true;
795
- }
796
- });
797
- }
798
- this.intersection = event.detail[0] == -1 ? [0] : event.detail.filter(x => this.isGroupArray.includes(x));
799
- }
800
- else {
801
- if (this.allChilds.length > 0) {
802
- this.allChilds.map((item) => {
803
- item.hidden = false;
804
- });
805
- // this.checkboxes && ( checkall && checkall.classList.remove('hidden') )
806
- }
807
- // this.isEmpty(true)
808
- }
809
- if (this.search || this.checkboxes) {
810
- setTimeout(() => {
811
- if (totalSearch >= 0) {
812
- var totals = totalSearch;
813
- this.isSearchCount(totals);
814
- }
815
- else {
816
- this.isSearchCount(0);
817
- }
818
- if (event.detail[0] === -1) {
819
- this.isSearchCount(0);
820
- }
821
- if (event.detail === true) {
822
- this.isSearchCount();
823
- }
824
- }, 100);
825
- }
826
- if (event.detail === true) {
827
- this.isEmpty(false);
828
- }
829
- if (this.runClearAndSelect) {
830
- this.runClearAndSelect = false;
831
- this.isSearchCount(true);
832
- }
833
- }
834
- }
835
- }
836
- }
837
- /**
838
- * @desc
839
- * @param newValue
840
- * @returns {void}
841
- */
842
- parseItems(newValue) {
843
- if (newValue) {
844
- typeof newValue == 'string'
845
- ? this.items = JSON.parse(newValue)
846
- : this.items = newValue;
847
- }
848
- this.handleChildProcess();
849
- }
850
- handleChange(newValue) {
851
- this.change.emit(newValue);
852
- this.listboxChange.emit(newValue);
853
- }
854
- handleChildProcess() {
855
- setTimeout(() => {
856
- this.onlyChilds = this.getAllGroup(this.el, true);
857
- this.total = this.onlyChilds.length;
858
- // console.log(this.total)
859
- // this.allChilds = this.getAllChilds()
860
- // this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length
861
- if (this.total > 0) {
862
- // setTimeout(() => {
863
- this.isLoading(false);
864
- // }, 100);
865
- this.isEmpty(false);
866
- }
867
- else {
868
- // setTimeout(() => {
869
- this.isLoading(false);
870
- this.isEmpty(true);
871
- // }, 100);
872
- }
873
- }, 100);
874
- }
875
- /**
876
- * @desc
877
- */
878
- handleListboxClearSelected(event) {
879
- var path = event.path || (event.composedPath && event.composedPath());
880
- if (this.checkboxes == false && path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) {
881
- this.value = event.detail;
882
- this.selectedId = String(event.detail[this.objectMapping['id']]);
883
- this.listboxClearSelected.emit(event.detail);
884
- }
885
- }
886
- /**
887
- * @desc
888
- */
889
- handleListboxChecked(event, _internal_id = this._internal_id) {
890
- var path = event.path || (event.composedPath && event.composedPath());
891
- if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
892
- this.listboxSendCheck.emit(event.detail);
893
- this.handleCheckList('add', event.detail);
894
- this.setIndeterminateState();
895
- }
896
- }
897
- /**
898
- * @desc
899
- */
900
- handleListboxUnchecked(event, _internal_id = this._internal_id) {
901
- var path = event.path || (event.composedPath && event.composedPath());
902
- if ((path && path.filter((input) => input['_internal_id'] == this._internal_id)[0] != undefined) || _internal_id == this._internal_id) {
903
- this.listboxSendUncheck.emit(event.detail);
904
- this.handleCheckList('remove', event.detail);
905
- this.setIndeterminateState();
906
- }
907
- }
908
- async listboxUncheckedMethod(item, internal_id = this._internal_id) {
909
- if (this.treeview) {
910
- await customElements.whenDefined("bcm-treeview");
911
- const bcmTreeview = this.el.shadowRoot.querySelector("bcm-treeview");
912
- if (bcmTreeview) {
913
- await bcmTreeview.treeviewUncheckedMethod(item);
914
- }
915
- }
916
- else {
917
- this.handleListboxUnchecked({ "detail": item }, internal_id);
918
- }
919
- }
920
- handleFocus(focusEvent = false) {
921
- this.onFocus = focusEvent;
922
- }
923
- render() {
924
- 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;
925
- const bcmListbox = classnames('bcm-listbox', {
926
- 'error': captionType == 'error' ? true : false,
927
- 'full-width': fullWidth,
928
- 'flex': _flex
929
- });
930
- const classes = classnames('listbox-item', {
931
- 'hidden': this.totalSearch > 0
932
- });
933
- const classesContainer = classnames('listbox-item-container');
934
- const textContent = classnames('listbox-item-container-text-content', size, {
935
- 'size-2': size === 'small' || size === 'medium',
936
- 'size-3': size === 'large',
937
- });
938
- const listContainer = classnames('list-container', {
939
- 'column-1': this.numberOfColumns <= 1,
940
- 'column-2': this.numberOfColumns == 2,
941
- 'column-3': this.numberOfColumns >= 3,
942
- });
943
- const listContainerStyle = {
944
- 'grid-template-columns': this.numberOfColumns <= 1 ? '1fr' : 'repeat(' + this.numberOfColumns + ', ' + (210 - (this.numberOfColumns * 10)) + 'px)'
945
- };
946
- const hostClasses = classnames(this.hidden ? 'hidden' : null,
947
- // this.totalSearch > 0 ? 'hidden' : null,
948
- {
949
- 'flex': _flex,
950
- 'full-width': fullWidth
951
- });
952
- var customStyles = {
953
- 'max-height': this.maxHeight
954
- };
955
- const customStylesList = {
956
- 'min-height': this.height ? "inherit" : this.maxHeight ? "auto" : "200px"
957
- };
958
- if (this.height) {
959
- customStyles = Object.assign(Object.assign({}, customStyles), { 'height': this.height });
960
- }
961
- const captionClasses = classnames('size-1', 'input-caption', 'caption-' + captionType);
962
- 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-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)))),
963
- // this.empty == false && (
964
- 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)))))
965
- // )
966
- ,
967
- // this.loading && (
968
- h("div", { id: "loading", class: "loading show" }, h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
969
- // )
970
- ,
971
- // ( this.empty || total == 0 ) && (
972
- h("div", { id: "empty", class: "empty" }, h("bcm-empty", { size: "small", text: "No Data" }))
973
- // )
974
- ), 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"
975
- ? h("span", { class: captionClasses }, " ", captionError, " ")
976
- : caption && h("span", { class: captionClasses }, " ", caption, " ")))));
977
- }
978
- get el() { return getElement(this); }
979
- static get watchers() { return {
980
- "_items": ["parseItems"],
981
- "value": ["handleChange"]
982
- }; }
983
- };
984
- BcmListbox.style = listboxCss;
985
-
986
- 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}";
987
-
988
- const uppercase = (str) => str.toUpperCase();
989
- const BcmListboxGroup = class {
990
- constructor(hostRef) {
991
- registerInstance(this, hostRef);
992
- this._id = (Math.random() * 4).toString(16).replace('.', '');
993
- this.hidden = false;
994
- }
995
- componentWillLoad() {
996
- this.text = uppercase(this.text);
997
- }
998
- render() {
999
- const { text } = this;
1000
- const classes = classnames('listbox-group');
1001
- const classesTitle = classnames('listbox-group-title');
1002
- const hostClasses = classnames(this.hidden ? 'hidden' : null);
1003
- return (h(Host, { class: hostClasses }, h("div", { class: classes }, h("div", { class: classesTitle }, h("bcm-text", { scale: "size-2", color: "grey-1" }, " ", text, " ")), h("slot", null))));
1004
- }
1005
- };
1006
- BcmListboxGroup.style = listboxGroupCss;
1007
-
1008
- 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)}";
1009
-
1010
- const BcmListboxItem = class {
1011
- constructor(hostRef) {
1012
- registerInstance(this, hostRef);
1013
- this.listboxItemSelected = createEvent(this, "bcm-listbox-item-selected", 7);
1014
- this.listboxUnchecked = createEvent(this, "bcm-listbox-unchecked", 7);
1015
- this.listboxChecked = createEvent(this, "bcm-listbox-checked", 7);
1016
- this.objectMapping = {
1017
- 'id': "id",
1018
- 'text': "text",
1019
- 'icon': "icon",
1020
- 'avatar': "avatar",
1021
- 'avatarName': "avatarName",
1022
- 'avatarImage': "avatarImage",
1023
- 'secondaryText': "secondaryText",
1024
- 'tooltipText': "tooltipText",
1025
- 'selected': "selected",
1026
- 'checked': "checked",
1027
- 'disabled': "disabled",
1028
- };
1029
- this.display = true;
1030
- this.avatar = false;
1031
- this._id = (Math.random() * 4).toString(16).replace('.', '');
1032
- this.size = 'medium';
1033
- this.icon = 'bug';
1034
- this.open = false;
1035
- this.selected = false;
1036
- this.checkboxes = false;
1037
- this.showIcon = false;
1038
- this.checked = false;
1039
- this.focused = false;
1040
- this.hidden = false;
1041
- this.disabled = false;
1042
- this._internal_id = "";
1043
- this.template = null;
1044
- }
1045
- componentDidLoad() {
1046
- if (!this.disabled) {
1047
- if (this.selected === true) {
1048
- this.listboxItemSelected.emit(this.itemObject);
1049
- }
1050
- this.checkboxes === true && (this.checked === true && (this.listboxChecked.emit(this._id)));
1051
- }
1052
- }
1053
- /**
1054
- * @desc
1055
- */
1056
- handleClick() {
1057
- if (!this.disabled) {
1058
- this.checkboxes === true && (this.checked === true && (this.listboxUnchecked.emit(this._id)) || (this.listboxChecked.emit(this._id)));
1059
- this.checkboxes === false && (this.selected = true,
1060
- this.listboxItemSelected.emit(this.itemObject));
1061
- }
1062
- }
1063
- handleCheckboxClick(e) {
1064
- e.preventDefault();
1065
- }
1066
- isInternal(event) {
1067
- var path = event.path || (event.composedPath && event.composedPath());
1068
- const detect = path
1069
- && path[0]
1070
- && path[0].attributes
1071
- && path[0].attributes['bcm-internal-id']
1072
- && path[0].attributes['bcm-internal-id'].value;
1073
- return detect == this._internal_id;
1074
- }
1075
- /**
1076
- * @descc
1077
- * @param event
1078
- */
1079
- ListenListboxCheck(event) {
1080
- if (this.isInternal(event)) {
1081
- if (!this.disabled) {
1082
- if (event.detail && event.detail === this._id) {
1083
- this.checked = true;
1084
- }
1085
- }
1086
- }
1087
- }
1088
- /**
1089
- * @descc
1090
- * @param event
1091
- */
1092
- ListenListboxUncheck(event) {
1093
- if (this.isInternal(event)) {
1094
- if (!this.disabled) {
1095
- if (event.detail && event.detail === this._id) {
1096
- this.checked = false;
1097
- }
1098
- }
1099
- }
1100
- }
1101
- /**
1102
- * @descc
1103
- * @param event
1104
- */
1105
- handleListboxClearSelecteds(event) {
1106
- if (this.checkboxes == false && this.isInternal(event)) {
1107
- if (!this.disabled) {
1108
- if (event.detail) {
1109
- if (event.detail !== this.itemObject) {
1110
- this.selected = false;
1111
- }
1112
- else {
1113
- this.selected = true;
1114
- }
1115
- }
1116
- }
1117
- }
1118
- }
1119
- templateParser(template) {
1120
- var rxp = /{{([^}]+)}}/g, str = template, curMatch;
1121
- while (curMatch = rxp.exec(str)) {
1122
- template = template.replace("{{" + curMatch[1] + "}}", this.itemObject[curMatch[1]]);
1123
- }
1124
- return template;
1125
- }
1126
- render() {
1127
- const { display, focused, selected, size, showIcon, icon, checkboxes, _id, checked, text, avatarName, avatarImage, avatar, secondaryText, tooltipText } = this;
1128
- const classes = classnames('listbox-item', {
1129
- 'disabled': this.disabled,
1130
- 'display': display
1131
- });
1132
- const classesContainer = classnames('listbox-item-container', {
1133
- 'disabled': this.disabled,
1134
- 'focus': focused,
1135
- 'selected': selected
1136
- });
1137
- const textContent = classnames('listbox-item-container-text-content', size, {
1138
- 'disabled': this.disabled,
1139
- 'size-2': size === 'small' || size === 'medium',
1140
- 'size-3': size === 'large',
1141
- });
1142
- const hostClasses = classnames(this.hidden ? 'hidden' : null);
1143
- const htmlContent = classnames('listbox-item-container-html-content', size, {
1144
- 'disabled': this.disabled,
1145
- 'size-2': size === 'small' || size === 'medium',
1146
- 'size-3': size === 'large',
1147
- });
1148
- 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)))))))));
1149
- }
1150
- get el() { return getElement(this); }
1151
- };
1152
- BcmListboxItem.style = listboxItemCss;
1153
-
1154
- const searchCss = "@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}";
1155
-
1156
- const lowercase$1 = (str) => str.toLowerCase();
1157
- const BcmSearch = class {
1158
- constructor(hostRef) {
1159
- registerInstance(this, hostRef);
1160
- this.bcmOnSearch = createEvent(this, "bcm-on-search", 7);
1161
- this.bcmOnSearchValue = createEvent(this, "bcm-on-search-value", 7);
1162
- this.data = [];
1163
- this.searchFields = ['text', 'value' /*, ...*/];
1164
- this.returnField = 'idx';
1165
- this.searchSub = null;
1166
- this.hidden = false;
1167
- this.onlyChild = false;
1168
- this.clearable = false;
1169
- this.searchValue = '';
1170
- this.searchPlaceholder = 'Search';
1171
- this.disabled = false;
1172
- this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
1173
- this.results = [];
1174
- }
1175
- getInput() {
1176
- return this.el.shadowRoot.querySelector('bcm-old-input');
1177
- }
1178
- componentDidLoad() {
1179
- this.getInput().clearable = this.clearable;
1180
- }
1181
- listenBcmChange(e) {
1182
- e.stopPropagation();
1183
- }
1184
- async setValue(value) {
1185
- await this.getInput().setValue(value);
1186
- return value;
1187
- }
1188
- async select() {
1189
- await this.getInput().select();
1190
- this.bcmOnSearch.emit(true);
1191
- return true;
1192
- }
1193
- async setClear() {
1194
- await this.getInput().setClear();
1195
- this.bcmOnSearch.emit(true);
1196
- return true;
1197
- }
1198
- async searchArray(value, idFields = null) {
1199
- // console.log(this.data)
1200
- let cacheSearchFields = this.searchFields;
1201
- let arrayResult = [];
1202
- if (idFields) {
1203
- this.searchFields = [idFields];
1204
- }
1205
- value.forEach(item => {
1206
- // item = {[idFields]:item}
1207
- this.results = [];
1208
- // console.log(this.data)
1209
- this.nestedSearch(this.data, item, true);
1210
- arrayResult.push(...this.results);
1211
- });
1212
- this.searchFields = cacheSearchFields;
1213
- return arrayResult;
1214
- // await this.getInput().setValue( value )
1215
- // return value
1216
- }
1217
- nestedSearch(items, value, equal = false) {
1218
- var result;
1219
- items && (items.map((item) => {
1220
- this.searchFields.map(searchField => {
1221
- if (searchField in item) {
1222
- // debugger;
1223
- item[searchField] = lowercase$1(String(item[searchField]));
1224
- if (this.onlyChild) {
1225
- if (item[this.searchSub]) {
1226
- var temp = this.nestedSearch(item[this.searchSub], value, equal);
1227
- if (temp) {
1228
- this.results.push((result = String(item[this.returnField])));
1229
- this.results.push(temp);
1230
- }
1231
- }
1232
- else {
1233
- if (equal) {
1234
- // console.log(value)
1235
- if (item[searchField] == lowercase$1(String(value))) {
1236
- // if (item == lowercase(value)) {
1237
- this.results.push((result = String(item[this.returnField])));
1238
- // this.results.push (result = String(item))
1239
- }
1240
- }
1241
- else {
1242
- if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
1243
- this.results.push((result = String(item[this.returnField])));
1244
- }
1245
- }
1246
- }
1247
- }
1248
- else {
1249
- if (item[this.searchSub]) {
1250
- var temp = this.nestedSearch(item[this.searchSub], value, equal);
1251
- if (temp) {
1252
- this.results.push((result = String(item[this.returnField])));
1253
- this.results.push(temp);
1254
- }
1255
- }
1256
- if (equal) {
1257
- // console.log(value)
1258
- if (item[searchField] == lowercase$1(String(value))) {
1259
- // if (item == lowercase(value)) {
1260
- this.results.push((result = String(item[this.returnField])));
1261
- // this.results.push (result = String(item))
1262
- }
1263
- }
1264
- else {
1265
- if (item[searchField].indexOf(lowercase$1(value)) !== -1) {
1266
- this.results.push((result = String(item[this.returnField])));
1267
- }
1268
- }
1269
- }
1270
- }
1271
- });
1272
- }));
1273
- return result;
1274
- }
1275
- /**
1276
- * @desc
1277
- * @param value
1278
- */
1279
- inputChange(value) {
1280
- this.results = [];
1281
- // data prop'unda arama yapılacak (searchFields prop'u içerisindeki alanlar ile)
1282
- // arama sonucunda eşleyen itemların 'idx', index
1283
- // değerleri, array şeklinde root component'e
1284
- // event ile gönderilecek
1285
- // Örneğin value == 'to' olduğunda aşağıdaki
1286
- // sonuçlar filtrelenmeli
1287
- // -->
1288
- //{ text: 'Mateusz Eaton', idx: 2 },
1289
- //{ text: 'Tony Vickers', idx: 3 },
1290
- // result array'i eşleşen itemların
1291
- // index numaralarını tutacak
1292
- // results = [2, 3]
1293
- // Örnek arama
1294
- // #
1295
- this.nestedSearch(this.data, value);
1296
- this.results = Array.from(new Set(this.results));
1297
- (value && ((this.results.length > 0 && this.bcmOnSearch.emit(this.results)) || this.bcmOnSearch.emit([-1]))) || this.bcmOnSearch.emit(true);
1298
- this.bcmOnSearchValue.emit(value);
1299
- }
1300
- render() {
1301
- const hostClasses = classnames(this.hidden ? 'hidden' : null);
1302
- 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 })));
1303
- }
1304
- get el() { return getElement(this); }
1305
- static get watchers() { return {
1306
- "searchValue": ["inputChange"]
1307
- }; }
1308
- };
1309
- BcmSearch.style = searchCss;
1310
-
1311
- 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}";
1312
-
1313
- /**
1314
- * @desc
1315
- * @param str
1316
- */
1317
- const lowercase = (str) => str.toLowerCase();
1318
- const Bcmtreeview = class {
1319
- constructor(hostRef) {
1320
- registerInstance(this, hostRef);
1321
- this.treeviewChange = createEvent(this, "bcm-treeview-change", 7);
1322
- this.treeviewSendCheck = createEvent(this, "bcm-treeview-send-check", 7);
1323
- this.treeviewSendUncheck = createEvent(this, "bcm-treeview-send-uncheck", 7);
1324
- this.treeviewChecklist = createEvent(this, "bcm-treeview-checklist", 7);
1325
- this.treeviewItemSelected = createEvent(this, "bcm-treeview-item-selected", 7);
1326
- this.treeviewClearSelecteds = createEvent(this, "bcm-treeview-clear-selecteds", 7);
1327
- this.treeviewShowContext = createEvent(this, "bcm-treeview-show-context", 7);
1328
- this.treeviewUnchecked = createEvent(this, "bcm-treeview-unchecked", 7);
1329
- this.treeviewChecked = createEvent(this, "bcm-treeview-checked", 7);
1330
- this.objectMapping = {
1331
- 'text': 'text',
1332
- 'icon': 'icon',
1333
- 'id': 'id',
1334
- 'items': 'items',
1335
- 'open': 'open',
1336
- 'selected': 'selected',
1337
- 'checked': 'checked',
1338
- 'tooltipText': 'tooltipText',
1339
- 'disabled': "disabled",
1340
- 'favorite': "favorite",
1341
- };
1342
- this.checkedObjectList = [];
1343
- this.allChilds = [];
1344
- this.onFocus = false;
1345
- this.minHeight = 200;
1346
- this.minWidth = 200;
1347
- this.allOpenCache = false;
1348
- this.allOpenOnSearch = false;
1349
- this.parentLength = [{}];
1350
- this.isSetData = false;
1351
- this.runClearAndSelect = false;
1352
- this.checkboxes = false;
1353
- this.showIcon = false;
1354
- this.size = 'medium';
1355
- this.checkedList = [];
1356
- this.updateCheckedList = [];
1357
- this.hidden = false;
1358
- this.search = false;
1359
- this.searchOnlyChild = false;
1360
- this.keydown = false;
1361
- this.allOpen = false;
1362
- this.fullWidth = false;
1363
- this.infoFooter = false;
1364
- this.searchFields = ['text', 'secondaryText', 'tooltipText'];
1365
- this.searchSub = "items";
1366
- this.returnField = "id";
1367
- this._items = [];
1368
- this.searchPlaceholder = "Search";
1369
- this.maxHeight = null;
1370
- this.highlight = false;
1371
- this.loading = true;
1372
- this.favIcon = false;
1373
- this.favIconOnlyChilds = false;
1374
- this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
1375
- /**
1376
- * Component States
1377
- */
1378
- this.empty = false;
1379
- this.showSearch = true;
1380
- this.items = [];
1381
- this.total = 0;
1382
- this.checkCount = 0;
1383
- this.keyMapForFocus = { 18: false, 87: false };
1384
- this.checklist = [];
1385
- this.favoriteList = [];
1386
- this.checklistSorted = [];
1387
- this.searchResults = [];
1388
- }
1389
- async setData(_data = []) {
1390
- this.clearAndSelectSearch(false);
1391
- this.isLoading(true);
1392
- this.isSetData = true;
1393
- this.checkedObjectList = [];
1394
- this.selectedId = null;
1395
- setTimeout(() => {
1396
- this._items = _data;
1397
- this.searchData = JSON.parse(_data);
1398
- this.calculateMinSizes();
1399
- this.handleChildProcess();
1400
- }, 100);
1401
- return Promise.resolve(true);
1402
- }
1403
- async getChecklist() {
1404
- return this.checkedObjectList;
1405
- }
1406
- async getFavorites() {
1407
- this.getChildItem(this.el).forEach(element => {
1408
- element[this.objectMapping['favorite']] == true && (this.favIconOnlyChilds && element[this.objectMapping['items']].length == 0 && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))),
1409
- !this.favIconOnlyChilds && (this.favoriteList.indexOf(element.itemObject) < 0 && (this.favoriteList.push(element.itemObject))));
1410
- });
1411
- return this.favoriteList;
1412
- }
1413
- async selected(id) {
1414
- this.selectedId = id;
1415
- }
1416
- async clearAndSelectSearch(select = true) {
1417
- this.runClearAndSelect = true;
1418
- if (this.search === true) {
1419
- setTimeout(() => {
1420
- var searchInput = null;
1421
- searchInput = this.el.shadowRoot.querySelector("bcm-search");
1422
- if (searchInput) {
1423
- searchInput.setClear();
1424
- if (select == true) {
1425
- searchInput.select();
1426
- }
1427
- }
1428
- }, 100);
1429
- }
1430
- }
1431
- async addChecked(items = []) {
1432
- this.checkedList = items;
1433
- }
1434
- async updateChecked(items = []) {
1435
- this.updateCheckedList = items;
1436
- }
1437
- async config(_config) {
1438
- if (_config['maxHeight']) {
1439
- typeof _config['maxHeight'] == 'string'
1440
- ? this.maxHeight = _config['maxHeight']
1441
- : this.maxHeight = "100%";
1442
- }
1443
- if (_config['searchFields']) {
1444
- if (Array.isArray(_config['searchFields'])) {
1445
- this.searchFields = _config['searchFields'];
1446
- }
1447
- }
1448
- if (_config['searchable']) {
1449
- typeof _config['searchable'] == 'boolean'
1450
- ? this.search = _config['searchable']
1451
- : this.search = false;
1452
- }
1453
- if (_config['searchOnlyChild']) {
1454
- typeof _config['searchOnlyChild'] == 'boolean'
1455
- ? this.searchOnlyChild = _config['searchOnlyChild']
1456
- : this.searchOnlyChild = false;
1457
- }
1458
- if (_config['searchPlaceholder']) {
1459
- typeof _config['searchPlaceholder'] == 'string'
1460
- ? this.searchPlaceholder = _config['searchPlaceholder']
1461
- : this.searchPlaceholder = null;
1462
- }
1463
- if (_config['fullWidth']) {
1464
- typeof _config['fullWidth'] == 'boolean'
1465
- ? this.fullWidth = _config['fullWidth']
1466
- : this.fullWidth = false;
1467
- }
1468
- if (_config['infoFooter']) {
1469
- typeof _config['infoFooter'] == 'boolean'
1470
- ? this.infoFooter = _config['infoFooter']
1471
- : this.infoFooter = false;
1472
- }
1473
- if (_config['highlight']) {
1474
- typeof _config['highlight'] == 'boolean'
1475
- ? this.highlight = _config['highlight']
1476
- : this.highlight = false;
1477
- }
1478
- if (_config['checkable']) {
1479
- typeof _config['checkable'] == 'boolean'
1480
- ? this.checkboxes = _config['checkable']
1481
- : this.checkboxes = false;
1482
- }
1483
- if (_config['showIcon']) {
1484
- typeof _config['showIcon'] == 'boolean'
1485
- ? this.showIcon = _config['showIcon']
1486
- : this.showIcon = false;
1487
- }
1488
- if (_config['favIcon']) {
1489
- typeof _config['favIcon'] == 'boolean'
1490
- ? this.favIcon = _config['favIcon']
1491
- : this.favIcon = false;
1492
- }
1493
- if (_config['favIconOnlyChilds']) {
1494
- typeof _config['favIconOnlyChilds'] == 'boolean'
1495
- ? this.favIconOnlyChilds = _config['favIconOnlyChilds']
1496
- : this.favIconOnlyChilds = false;
1497
- }
1498
- if (_config['allOpen']) {
1499
- typeof _config['allOpen'] == 'boolean'
1500
- ? this.allOpen = _config['allOpen']
1501
- : this.allOpen = false;
1502
- }
1503
- this.allOpenCache = this.allOpen;
1504
- if (_config['size']) {
1505
- (["small", "medium", "large"].indexOf(_config['size']) >= 0)
1506
- ? this.size = _config['size']
1507
- : this.size = 'medium';
1508
- }
1509
- if (_config['mapping']) {
1510
- if (_config['mapping']['text']) {
1511
- this.objectMapping['text'] = _config['mapping']['text'];
1512
- }
1513
- if (_config['mapping']['icon']) {
1514
- this.objectMapping['icon'] = _config['mapping']['icon'];
1515
- }
1516
- if (_config['mapping']['id']) {
1517
- this.objectMapping['id'] = _config['mapping']['id'];
1518
- this.returnField = this.objectMapping['id'];
1519
- }
1520
- if (_config['mapping']['items']) {
1521
- this.objectMapping['items'] = _config['mapping']['items'];
1522
- this.searchSub = this.objectMapping['items'];
1523
- }
1524
- if (_config['mapping']['open']) {
1525
- this.objectMapping['open'] = _config['mapping']['open'];
1526
- }
1527
- if (_config['mapping']['selected']) {
1528
- this.objectMapping['selected'] = _config['mapping']['selected'];
1529
- }
1530
- if (_config['mapping']['checked']) {
1531
- this.objectMapping['checked'] = _config['mapping']['checked'];
1532
- }
1533
- if (_config['mapping']['tooltipText']) {
1534
- this.objectMapping['tooltipText'] = _config['mapping']['tooltipText'];
1535
- }
1536
- if (_config['mapping']['disabled']) {
1537
- this.objectMapping['disabled'] = _config['mapping']['disabled'];
1538
- }
1539
- if (_config['mapping']['favorite']) {
1540
- this.objectMapping['favorite'] = _config['mapping']['favorite'];
1541
- }
1542
- }
1543
- // sessionStorage.setItem(this._internal_id + "-config", JSON.stringify(_config));
1544
- return Promise.resolve(true);
1545
- }
1546
- calculateMinSizes() {
1547
- if (this.minHeight < this.el.clientHeight) {
1548
- this.minHeight = this.el.clientHeight;
1549
- }
1550
- }
1551
- connectedCallback() { }
1552
- componentWillLoad() { }
1553
- componentWillRender() {
1554
- if (sessionStorage.getItem(this._internal_id + "-config")) {
1555
- this.config(JSON.parse(sessionStorage.getItem(this._internal_id + "-config")));
1556
- }
1557
- }
1558
- componentDidRender() {
1559
- // this.isEmpty(true)
1560
- // if(this.total > 0) {
1561
- // this.isEmpty(false)
1562
- // }
1563
- }
1564
- // componentDidLoad(){
1565
- // this.handleChildProcess()
1566
- // setTimeout(() => {
1567
- // if(this.isSetData) {
1568
- // this.isLoading(true)
1569
- // this.isEmpty(false)
1570
- // }else{
1571
- // this.isLoading(false)
1572
- // this.isEmpty(true)
1573
- // }
1574
- // }, 1000);
1575
- // // this.isEmpty(true)
1576
- // }
1577
- componentWillUpdate() { }
1578
- // componentWillRender(){}
1579
- // componentDidRender(){}
1580
- componentDidUpdate() {
1581
- if (this.checkboxes === true) {
1582
- this.checkedObjectList = [];
1583
- if (this.checklistSorted.length > 0) {
1584
- this.getChildItem(this.el).forEach(element => {
1585
- element.checked == true && (this.checkedObjectList.indexOf(element.itemObject) < 0 && (this.checkedObjectList.push(element.itemObject)));
1586
- });
1587
- this.treeviewChecklist.emit(this.checkedObjectList);
1588
- }
1589
- else {
1590
- this.treeviewChecklist.emit([]);
1591
- }
1592
- }
1593
- }
1594
- parseItems(newValue) {
1595
- if (newValue) {
1596
- typeof newValue == 'string'
1597
- ? this.items = JSON.parse(newValue)
1598
- : this.items = newValue;
1599
- }
1600
- this.handleChildProcess();
1601
- }
1602
- handleChildProcess() {
1603
- setTimeout(() => {
1604
- this.allChilds = this.getAllChilds();
1605
- this.total = this.allChilds.filter((v, i, a) => a.indexOf(v) === i).length;
1606
- if (this.total > 0) {
1607
- // setTimeout(() => {
1608
- this.isLoading(false);
1609
- // }, 100);
1610
- this.isEmpty(false);
1611
- }
1612
- else {
1613
- // setTimeout(() => {
1614
- this.isLoading(false);
1615
- this.isEmpty(true);
1616
- // }, 100);
1617
- }
1618
- }, 100);
1619
- }
1620
- /**
1621
- * @desc
1622
- * @param group
1623
- */
1624
- recursiveItemRenderer(group, parentGroup) {
1625
- const sId = String(this.selectedId);
1626
- const gId = String(group[this.objectMapping['id']]);
1627
- const isSelected = String(group[this.objectMapping['selected']]) === 'true' ? true : false;
1628
- if (sId === gId || isSelected) {
1629
- this.treeviewItemSelected.emit(group);
1630
- }
1631
- 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 &&
1632
- ((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)))));
1633
- }
1634
- /**
1635
- * @desc
1636
- */
1637
- handleCheckList(process = 'add', checkId) {
1638
- // console.log(checkId)
1639
- if (this.checkboxes === true) {
1640
- // const { checklist } = this
1641
- // checkId = Number(checkId)
1642
- switch (process) {
1643
- case 'add':
1644
- if (this.checklist.length > 0) {
1645
- this.checklist.indexOf(checkId) < 0 && (this.checklist = [...this.checklist, checkId]);
1646
- }
1647
- else {
1648
- this.checklist = [checkId];
1649
- }
1650
- break;
1651
- case 'remove':
1652
- this.checklist = this.checklist.filter(item => item !== checkId);
1653
- break;
1654
- }
1655
- let sorted = this.checklist.sort(function (a, b) { return a - b; });
1656
- this.checklistSorted = sorted;
1657
- // console.log('sorted: ', sorted)
1658
- this.checkCount = this.checklistSorted.length;
1659
- }
1660
- }
1661
- async showSearchMethod(val = true) {
1662
- this.showSearch = val;
1663
- // return val
1664
- }
1665
- async searchResultMethod(items = []) {
1666
- // this.listenSearchResult({ detail: items })
1667
- await customElements.whenDefined("bcm-search");
1668
- const search = this.el.shadowRoot.querySelector("bcm-search");
1669
- const detail = await search.searchArray(items, this.objectMapping['id']);
1670
- await this.listenSearchResult({ detail: detail });
1671
- // return true
1672
- }
1673
- isLoading(val) {
1674
- var treeview = this.el.shadowRoot.getElementById("treeview");
1675
- var loading = this.el.shadowRoot.getElementById("loading");
1676
- var searchInput = this.el.shadowRoot.querySelector("bcm-search");
1677
- // var listcontainer = this.el.shadowRoot.getElementById("list-container")
1678
- if (val === true) {
1679
- treeview && treeview.classList.add('loading');
1680
- loading && loading.classList.add('show');
1681
- if (searchInput) {
1682
- searchInput.disabled = true;
1683
- }
1684
- // listcontainer && listcontainer.classList.add('hidden')
1685
- }
1686
- else {
1687
- treeview && treeview.classList.remove('loading');
1688
- loading && loading.classList.remove('show');
1689
- if (searchInput) {
1690
- searchInput.disabled = false;
1691
- }
1692
- // listcontainer && listcontainer.classList.remove('hidden')
1693
- }
1694
- return false;
1695
- }
1696
- isEmpty(val) {
1697
- var empty = this.el.shadowRoot.getElementById("empty");
1698
- // var listcontainer = this.el.shadowRoot.getElementById("list-container")
1699
- if (val === true) {
1700
- empty && empty.classList.add('show');
1701
- // listcontainer && listcontainer.classList.add('hidden')
1702
- }
1703
- else {
1704
- empty && empty.classList.remove('show');
1705
- // listcontainer && listcontainer.classList.remove('hidden')
1706
- }
1707
- }
1708
- isSearchCount(val = null) {
1709
- if (this.infoFooter === true) {
1710
- var inSearch = this.el.shadowRoot.getElementById("in-search");
1711
- var inTotal = this.el.shadowRoot.getElementById("in-total");
1712
- if (val >= 0 && val != null && inSearch && inTotal) {
1713
- inSearch.innerHTML = val;
1714
- inTotal.style.display = "none";
1715
- }
1716
- else {
1717
- inTotal.style.display = "inline";
1718
- inSearch.innerHTML = "";
1719
- }
1720
- }
1721
- // if (val > 0){
1722
- // this.isEmpty(false)
1723
- // }
1724
- }
1725
- listenSearchResult(e) {
1726
- this.parentLength = [];
1727
- var searchValue = '';
1728
- // this.searchResults = e.detail
1729
- var totalSearch = e.detail.length;
1730
- this.empty = false;
1731
- var getAllChilds = this.getAllChilds();
1732
- this.isEmpty(false);
1733
- if (e.detail.length > 0) {
1734
- // this.allOpenOnSearch = true
1735
- if (e.detail[0] == -1) {
1736
- totalSearch = 0;
1737
- this.empty = true;
1738
- this.isEmpty(true);
1739
- }
1740
- if (getAllChilds.length > 0) {
1741
- getAllChilds.map((item) => {
1742
- var isParent = false;
1743
- if (this.searchOnlyChild && item.items && item.items.length > 0) {
1744
- isParent = true;
1745
- }
1746
- e.target.addEventListener('bcm-on-search-value', async (e) => {
1747
- searchValue = await e.detail;
1748
- var inputText = item.shadowRoot.getElementById("text");
1749
- inputText = inputText.textContent || inputText.innerText || "";
1750
- if (searchValue) {
1751
- var cacheInputText = lowercase(inputText);
1752
- var cacheSearchValue = lowercase(searchValue);
1753
- var index = cacheInputText.indexOf(cacheSearchValue);
1754
- if (index >= 0) {
1755
- if (isParent == false) {
1756
- if (this.parentLength.indexOf(item.id) === -1) {
1757
- this.parentLength.push(item.id);
1758
- }
1759
- if (this.highlight) {
1760
- inputText = inputText.substring(0, index)
1761
- + "<span class='highlight'>"
1762
- + inputText.substring(index, index + searchValue.length)
1763
- + "</span>"
1764
- + inputText.substring(index + searchValue.length);
1765
- }
1766
- }
1767
- }
1768
- }
1769
- item.shadowRoot.getElementById("text").innerHTML = inputText;
1770
- });
1771
- item.hidden = true;
1772
- var _ids = item.id;
1773
- if (e.detail.indexOf(_ids) >= 0) {
1774
- item.hidden = false;
1775
- item.open = true;
1776
- setTimeout(() => {
1777
- if (this.parentLength.indexOf(item.id) !== -1 && item.items && item.items.length > 0 && this.searchOnlyChild == false) {
1778
- const getChilds = (item) => {
1779
- this.getAllChilds(item).map(element => {
1780
- element.hidden = false;
1781
- element.open = true;
1782
- getChilds(element);
1783
- });
1784
- };
1785
- getChilds(item);
1786
- }
1787
- }, 1);
1788
- }
1789
- else {
1790
- item.hidden = true;
1791
- }
1792
- });
1793
- }
1794
- }
1795
- else {
1796
- // this.allOpenOnSearch = this.allOpenCache
1797
- if (getAllChilds.length > 0) {
1798
- getAllChilds.map((item) => {
1799
- item.hidden = false;
1800
- });
1801
- }
1802
- // this.isEmpty(true)
1803
- }
1804
- // if ( this.searchOnlyChild ) {
1805
- // this.isSearchCount(highlightLength)
1806
- // }else{
1807
- setTimeout(() => {
1808
- if (totalSearch >= 0) {
1809
- var totals = totalSearch - Number(totalSearch - this.parentLength.length);
1810
- this.isSearchCount(totals > 0 ? totals : 0);
1811
- }
1812
- else {
1813
- this.isSearchCount();
1814
- }
1815
- if (e.detail[0] === -1) {
1816
- this.isSearchCount(0);
1817
- }
1818
- if (e.detail === true) {
1819
- this.isSearchCount();
1820
- }
1821
- }, 100);
1822
- // }
1823
- if (e.detail === true) {
1824
- this.isEmpty(false);
1825
- }
1826
- }
1827
- getAllChilds(element = this.el) {
1828
- let returnAllItems = [];
1829
- getChilds(element, 'bcm-treeview-item').forEach(items => {
1830
- this.getAllChilds(items) && (returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items))
1831
- // returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]
1832
- );
1833
- returnAllItems.indexOf(items) < 0 && (returnAllItems.push(items));
1834
- // returnAllItems = [...returnAllItems,
1835
- // items
1836
- // ]
1837
- });
1838
- return returnAllItems;
1839
- }
1840
- /**
1841
- * @desc
1842
- */
1843
- handletreeviewItemSelected(event) {
1844
- this.treeviewClearSelecteds.emit(event.detail);
1845
- }
1846
- /**
1847
- * @desc
1848
- */
1849
- handletreeviewChecked(event) {
1850
- // this.treeviewSendCheck.emit(event.detail)
1851
- this.handleCheckList('add', event.detail);
1852
- // this.treeviewChange.emit(event.detail)
1853
- }
1854
- /**
1855
- * @desc
1856
- */
1857
- // @Listen('bcm-treeview-check-group-check')
1858
- // bcmTreeviewCheckGroupChecked(event: any) {
1859
- // console.log(event)
1860
- // this.treeviewSendCheck.emit(event.detail)
1861
- // this.handleCheckList('add',event.detail)
1862
- // this.treeviewChange.emit(event.detail)
1863
- // }
1864
- /**
1865
- * @desc
1866
- */
1867
- handletreeviewUnchecked(event) {
1868
- // this.treeviewSendUncheck.emit(event.detail)
1869
- this.handleCheckList('remove', event.detail);
1870
- // this.treeviewChange.emit(event.detail)
1871
- }
1872
- /**
1873
- * @desc
1874
- */
1875
- handletreeviewIndeterminateChecked(event) {
1876
- this.handleCheckList('add', event.detail);
1877
- }
1878
- /**
1879
- * @desc
1880
- */
1881
- handletreeviewIndeterminateUnchecked(event) {
1882
- this.handleCheckList('remove', event.detail);
1883
- }
1884
- treeviewUncheckedMethod(item) {
1885
- this.handletreeviewUnchecked({ "detail": item });
1886
- this.componentDidUpdate();
1887
- return Promise.resolve(true);
1888
- }
1889
- /**
1890
- * @desc
1891
- * Keyboard Navigation
1892
- */
1893
- getIndex(item) {
1894
- return Array.from(item.parentNode.children).indexOf(item);
1895
- }
1896
- /**
1897
- * @desc
1898
- * Keyboard Navigation
1899
- */
1900
- getNext(item) {
1901
- let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) + 1];
1902
- if (returnItem)
1903
- return returnItem;
1904
- return false;
1905
- }
1906
- /**
1907
- * @desc
1908
- * Keyboard Navigation
1909
- */
1910
- getPrev(item) {
1911
- let returnItem = this.getChildItem(item.parentElement)[this.getIndex(item) - 1];
1912
- if (returnItem)
1913
- return returnItem;
1914
- return false;
1915
- }
1916
- /**
1917
- * @desc
1918
- * Keyboard Navigation
1919
- */
1920
- getParent(item) {
1921
- if (lowercase(item.parentElement.tagName) == 'bcm-treeview') {
1922
- return false;
1923
- }
1924
- else {
1925
- return this.getChildItem(item.parentElement.parentElement)[this.getIndex(item.parentElement)];
1926
- }
1927
- }
1928
- /**
1929
- * @desc
1930
- * Keyboard Navigation
1931
- */
1932
- getNextParent(item) {
1933
- let getParent = this.getParent(item);
1934
- let getNext;
1935
- if (getParent) {
1936
- getNext = this.getNext(getParent);
1937
- if (getNext) {
1938
- return getNext;
1939
- }
1940
- else {
1941
- return this.getNextParent(getParent);
1942
- }
1943
- }
1944
- }
1945
- /**
1946
- * @desc
1947
- * Keyboard Navigation
1948
- */
1949
- getFirstItem(el = this.el) {
1950
- return this.getChildItem(el)[0];
1951
- }
1952
- /**
1953
- * @desc
1954
- * Keyboard Navigation
1955
- */
1956
- getLastItem(el = this.el) {
1957
- let childLength = this.getChildItem(el).length;
1958
- let lastChild = this.getChildItem(el)[childLength - 1];
1959
- if (this.getChildItem(lastChild).length > 0 && lastChild.open == true) {
1960
- return this.getLastItem(lastChild);
1961
- }
1962
- else {
1963
- return lastChild;
1964
- }
1965
- }
1966
- /**
1967
- * @desc
1968
- * Keyboard Navigation
1969
- */
1970
- getChildItem(element = this.el) {
1971
- let returnItems = getChilds(element, 'bcm-treeview-item');
1972
- if (returnItems)
1973
- return returnItems;
1974
- return 0;
1975
- }
1976
- /**
1977
- * @desc
1978
- */
1979
- handleRightClick(e) {
1980
- this.treeviewShowContext.emit([e.target.id, e.clientY, e.clientX]);
1981
- e.preventDefault();
1982
- }
1983
- /**
1984
- * @desc
1985
- */
1986
- keyboardNavigationUp(e) {
1987
- let { keyMapForFocus } = this;
1988
- if (e.keyCode in keyMapForFocus) {
1989
- keyMapForFocus[e.keyCode] = false;
1990
- }
1991
- }
1992
- /**
1993
- * @desc
1994
- */
1995
- keyboardNavigation(e) {
1996
- if (this.keydown) {
1997
- const { keyMapForFocus, focusedElement, el } = this;
1998
- this.focusedElement = !focusedElement ? el : focusedElement;
1999
- const which = e.which || 0;
2000
- if (this.getChildItem(el).length > 0) {
2001
- if (e.keyCode in keyMapForFocus) {
2002
- keyMapForFocus[e.keyCode] = true;
2003
- if (keyMapForFocus[18] && keyMapForFocus[87]) {
2004
- e.preventDefault();
2005
- this.focusedElement = this.getFirstItem(this.focusedElement);
2006
- }
2007
- }
2008
- if (which == 9 || //tab
2009
- which == 13 || //enter
2010
- which == 18 || //alt
2011
- which == 32 || //space
2012
- which == 35 || // end
2013
- which == 36 || // home
2014
- (which >= 35 && which <= 40) //end, home, left arrow, up arrow, right arrow, down arrow
2015
- ) {
2016
- e.preventDefault();
2017
- if (!focusedElement) {
2018
- this.focusedElement = this.getFirstItem(this.focusedElement);
2019
- }
2020
- else {
2021
- this.focusedElement.focused = false;
2022
- switch (which) {
2023
- case 13: // enter
2024
- this.focusedElement.selected = true;
2025
- break;
2026
- case 32: // space
2027
- this.focusedElement.checked && (this.treeviewUnchecked.emit(this.focusedElement.id)) || (this.treeviewChecked.emit(this.focusedElement.id));
2028
- break;
2029
- case 35: // end
2030
- this.focusedElement = this.getLastItem(this.focusedElement.parentElement);
2031
- break;
2032
- case 36: // home
2033
- this.focusedElement = this.getFirstItem(this.focusedElement.parentElement);
2034
- break;
2035
- case 37: // left arrow
2036
- if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2037
- this.focusedElement.open = false;
2038
- }
2039
- else {
2040
- if (this.getParent(this.focusedElement)) {
2041
- this.focusedElement = this.getParent(this.focusedElement);
2042
- }
2043
- }
2044
- break;
2045
- case 38: // up arrow
2046
- if (this.getPrev(this.focusedElement)) {
2047
- this.focusedElement = this.getPrev(this.focusedElement);
2048
- if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2049
- this.focusedElement = this.getLastItem(this.focusedElement);
2050
- }
2051
- }
2052
- else if (this.getParent(this.focusedElement)) {
2053
- this.focusedElement = this.getParent(this.focusedElement);
2054
- }
2055
- break;
2056
- case 39: // right arrow
2057
- if (this.getChildItem(this.focusedElement).length > 0) {
2058
- if (this.focusedElement.open == true) {
2059
- this.focusedElement = this.getFirstItem(this.focusedElement);
2060
- }
2061
- else {
2062
- this.focusedElement.open = true;
2063
- }
2064
- }
2065
- break;
2066
- case 40: // down arrow
2067
- if (this.getChildItem(this.focusedElement).length > 0 && this.focusedElement.open == true) {
2068
- this.focusedElement = this.getFirstItem(this.focusedElement);
2069
- }
2070
- else if (this.getNext(this.focusedElement)) {
2071
- this.focusedElement = this.getNext(this.focusedElement);
2072
- }
2073
- else if (this.getNextParent(this.focusedElement)) {
2074
- this.focusedElement = this.getNextParent(this.focusedElement);
2075
- }
2076
- break;
2077
- }
2078
- }
2079
- }
2080
- if (this.focusedElement)
2081
- this.focusedElement.focused = true;
2082
- }
2083
- }
2084
- }
2085
- handleFocus(focusEvent = false) {
2086
- this.onFocus = focusEvent;
2087
- }
2088
- render() {
2089
- const { searchOnlyChild, searchPlaceholder, search, checkCount, searchData, searchFields, searchSub, returnField, total, fullWidth, infoFooter, showSearch } = this;
2090
- const hostClasses = classnames(this.hidden ? 'hidden' : null, {
2091
- 'empty': this.empty,
2092
- 'full-width': fullWidth
2093
- });
2094
- const customStyles = {
2095
- // 'min-height': this.minHeight + 'px',
2096
- 'min-width': this.minWidth + 'px',
2097
- 'max-height': this.maxHeight
2098
- };
2099
- return (h(Host, { class: hostClasses, style: customStyles }, search && (h("div", { class: "search", style: { 'display': String(showSearch) == 'false' ? 'none' : 'block' } }, h("bcm-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" },
2100
- // this.loading && (
2101
- h("div", { id: "loading", class: "loading show" }, h("bcm-icon", { class: "prefix", icon: "far fa-spinner-third fa-spin" }))
2102
- // )
2103
- ,
2104
- // this.empty && (
2105
- h("div", { id: "empty", class: "empty" }, h("bcm-empty", { size: "small", text: "No Data" }))
2106
- // )
2107
- , !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.")))));
2108
- }
2109
- get el() { return getElement(this); }
2110
- static get watchers() { return {
2111
- "_items": ["parseItems"]
2112
- }; }
2113
- };
2114
- Bcmtreeview.style = treeviewCss;
2115
-
2116
- 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}";
2117
-
2118
- const BcmtreeviewItem = class {
2119
- constructor(hostRef) {
2120
- registerInstance(this, hostRef);
2121
- this.treeviewItemSelected = createEvent(this, "bcm-treeview-item-selected", 7);
2122
- this.treeviewUnchecked = createEvent(this, "bcm-treeview-unchecked", 7);
2123
- this.treeviewChecked = createEvent(this, "bcm-treeview-checked", 7);
2124
- this.treeviewChange = createEvent(this, "bcm-treeview-change", 7);
2125
- this.treeviewIndeterminateUnchecked = createEvent(this, "bcm-treeview-indeterminate-unchecked", 7);
2126
- this.treeviewIndeterminateChecked = createEvent(this, "bcm-treeview-indeterminate-checked", 7);
2127
- this.itemChecked = createEvent(this, "bcm-treeview-check-item-checked", 7);
2128
- this.itemUnchecked = createEvent(this, "bcm-treeview-check-item-unchecked", 7);
2129
- this.groupCheck = createEvent(this, "bcm-treeview-check-group-check", 7);
2130
- this.favoriteStatus = createEvent(this, "bcm-favorite-status", 7);
2131
- this.firstRun = true;
2132
- this._id = (Math.random() * 4).toString(16).replace('.', '');
2133
- this.hasChild = false;
2134
- this.size = 'medium';
2135
- this.icon = 'bug';
2136
- this.open = false;
2137
- this.selected = false;
2138
- this.checkboxes = false;
2139
- this.showIcon = false;
2140
- this.favicon = false;
2141
- this.favorite = false;
2142
- this.checked = false;
2143
- this.checkTrigger = false;
2144
- this.focused = false;
2145
- this.disabled = false;
2146
- this.contextMenuShow = false;
2147
- this._contextMenu = [];
2148
- this.indeterminateState = 'uncheck';
2149
- this._internal_id = "";
2150
- this.menuPadding = 0;
2151
- this.childLength = 0;
2152
- this.indeterminate = false;
2153
- // @State() checkTrigger: boolean = false
2154
- this.hidden = false;
2155
- this.contextMenu = [];
2156
- this.contextOffsetLeft = 0;
2157
- this.contextOffsetTop = 0;
2158
- }
2159
- /**
2160
- * @ComponentMethod
2161
- */
2162
- componentWillLoad() {
2163
- this.menuPadding = 24;
2164
- this.childLength = this.el.children.length;
2165
- this.parseItems(this._contextMenu);
2166
- }
2167
- /**
2168
- * @ComponentMethod
2169
- */
2170
- componentDidLoad() {
2171
- // if (!this.disabled){
2172
- // // if (this.selected) this.treeviewItemSelected.emit(this.itemObject)
2173
- // if (this.checked){
2174
- // // this.treeviewChecked.emit(this._id)
2175
- // this.handleCheckMouseUp()
2176
- // }
2177
- // }
2178
- if (!this.disabled && this.firstRun && this.checkTrigger) {
2179
- this.firstRun = false;
2180
- this.handleCheckMouseUp();
2181
- }
2182
- }
2183
- /**
2184
- * @desc
2185
- * @returns {void}
2186
- */
2187
- /* setIndeterminateState() {
2188
- if(this.getAllChilds().length > 0) {
2189
-
2190
- let state: string = 'uncheck'
2191
- let allChecked: boolean = true
2192
- let allUnchecked: boolean = true
2193
-
2194
- this.getAllChilds().map((item) => {
2195
- item.checked && (allUnchecked = false)
2196
- !item.checked && (allChecked = false)
2197
- });
2198
-
2199
- !allChecked && !allUnchecked
2200
- ? state = 'indeterminate'
2201
- : allChecked
2202
- ? state = 'determinate'
2203
- : state = 'uncheck'
2204
-
2205
- this.indeterminateState = state as any;
2206
-
2207
- }
2208
- } */
2209
- /* @Watch('indeterminateState')
2210
- onCheckedChange() {
2211
- if (this.indeterminateState == 'determinate') {
2212
- this.treeviewChecked.emit(this._id)
2213
- }else if (this.indeterminateState == 'uncheck') {
2214
- this.treeviewIndeterminateUnchecked.emit(this._id)
2215
- this.checked = false
2216
- }else{
2217
- this.treeviewIndeterminateUnchecked.emit(this._id)
2218
- this.checked = false
2219
- }
2220
- } */
2221
- /**
2222
- * @descc
2223
- * @param event
2224
- */
2225
- handletreeviewClearSelecteds(event) {
2226
- if (!this.disabled) {
2227
- if (event.detail && event.detail !== this.itemObject)
2228
- this.selected = false;
2229
- }
2230
- }
2231
- /**
2232
- * @descc
2233
- * @param event
2234
- */
2235
- ListentreeviewChange() {
2236
- //this.setIndeterminateState();
2237
- }
2238
- /**
2239
- * @descc
2240
- * @param event
2241
- */
2242
- ListentreeviewShowContext(event) {
2243
- this.contextOffsetTop = event.detail[1];
2244
- this.contextOffsetLeft = event.detail[2];
2245
- if (event.detail[0] && event.detail[0] === this._id) {
2246
- this.contextMenuShow = true;
2247
- }
2248
- else {
2249
- this.contextMenuShow = false;
2250
- }
2251
- }
2252
- /**
2253
- * @desc
2254
- * @param event
2255
- */
2256
- handleWindowClick(event) {
2257
- const target = event.target;
2258
- if (target === this.el)
2259
- return;
2260
- this.contextMenuShow = false;
2261
- }
2262
- /**
2263
- * @desc
2264
- */
2265
- handleClick() {
2266
- if (!this.disabled) {
2267
- this.selected = true;
2268
- this.treeviewItemSelected.emit(this.itemObject);
2269
- }
2270
- }
2271
- /**
2272
- * @desc
2273
- */
2274
- handleFavClick(e) {
2275
- if (!this.disabled) {
2276
- this.favorite = !this.favorite;
2277
- if (!this.itemObject["rightSlot"]) {
2278
- this.itemObject["rightSlot"] = {};
2279
- }
2280
- this.itemObject["rightSlot"]["favorite"] = this.favorite;
2281
- this.favoriteStatus.emit(this.itemObject);
2282
- e.stopPropagation();
2283
- e.preventDefault();
2284
- }
2285
- }
2286
- /**
2287
- * @desc
2288
- */
2289
- handleOpen() {
2290
- this.open = !this.open;
2291
- }
2292
- getRootChilds(element = this.el) {
2293
- return getChilds(element, 'bcm-treeview-item');
2294
- }
2295
- getAllChilds(element = this.el) {
2296
- let returnAllItems = [];
2297
- getChilds(element, 'bcm-treeview-item').forEach(items => {
2298
- this.getAllChilds(items) && (returnAllItems = [...returnAllItems, ...this.getAllChilds(items)]);
2299
- returnAllItems = [...returnAllItems,
2300
- items
2301
- ];
2302
- });
2303
- return returnAllItems;
2304
- }
2305
- /**
2306
- * @desc
2307
- * -
2308
- */
2309
- checkGroupState() {
2310
- // debugger;
2311
- const childsRoot = this.getRootChilds();
2312
- let [state, allChecked, allUnchecked] = ['uncheck', true, true];
2313
- if (childsRoot.length > 0) {
2314
- childsRoot.forEach(checkbox => {
2315
- (checkbox.checked || checkbox.indeterminateState === 'indeterminate') && (allUnchecked = false);
2316
- !checkbox.checked && (allChecked = false);
2317
- });
2318
- !allChecked && !allUnchecked
2319
- ? state = 'indeterminate'
2320
- : allChecked
2321
- ? state = 'determinate'
2322
- : state = 'uncheck';
2323
- this.indeterminateState = state;
2324
- if (state === 'determinate') {
2325
- this.checked = true;
2326
- // if(this.checked) {
2327
- this.treeviewChecked.emit(this._id);
2328
- // }
2329
- }
2330
- else {
2331
- this.checked = false;
2332
- this.treeviewUnchecked.emit(this._id);
2333
- }
2334
- }
2335
- else {
2336
- if (this.checked) {
2337
- this.checked = false;
2338
- this.treeviewUnchecked.emit(this._id);
2339
- }
2340
- else {
2341
- this.checked = true;
2342
- this.treeviewChecked.emit(this._id);
2343
- }
2344
- }
2345
- }
2346
- /**
2347
- * @Event
2348
- * @desc
2349
- * -
2350
- */
2351
- handleCheckMouseUp() {
2352
- const checked = this.checked;
2353
- const state = this.indeterminateState;
2354
- if (!this.hasChild) {
2355
- !checked
2356
- ? this.checked = true
2357
- : this.checked = false;
2358
- if (this.checked) {
2359
- this.treeviewChecked.emit(this._id);
2360
- }
2361
- else {
2362
- this.treeviewUnchecked.emit(this._id);
2363
- }
2364
- this.groupCheck.emit(this.parentId);
2365
- return;
2366
- }
2367
- const childs = this.getAllChilds();
2368
- if (state === 'indeterminate' || state === 'uncheck') {
2369
- childs.forEach(child => {
2370
- child.checked = true;
2371
- // if(this.checked) {
2372
- this.treeviewChecked.emit(child._id);
2373
- // }
2374
- child.indeterminateState = 'determined';
2375
- });
2376
- }
2377
- else {
2378
- childs.forEach(child => {
2379
- child.checked = false;
2380
- this.treeviewUnchecked.emit(child._id);
2381
- child.indeterminateState = 'uncheck';
2382
- });
2383
- }
2384
- this.checkGroupState();
2385
- this.groupCheck.emit(this.parentId);
2386
- }
2387
- checkGroup(e) {
2388
- const { detail: groupId } = e;
2389
- if (!groupId || this._id !== groupId)
2390
- return;
2391
- this.checkGroupState();
2392
- this.groupCheck.emit(this.parentId);
2393
- }
2394
- /**
2395
- * @desc
2396
- * @param item
2397
- */
2398
- contextItemRenderer(item) {
2399
- return (h("span", null, item.title));
2400
- }
2401
- /**
2402
- * @desc
2403
- * @param newValue
2404
- * @returns {void}
2405
- */
2406
- parseItems(newValue) {
2407
- if (newValue) {
2408
- typeof newValue == 'string'
2409
- ? this.contextMenu = JSON.parse(newValue)
2410
- : this.contextMenu = newValue;
2411
- }
2412
- }
2413
- render() {
2414
- const { _id, text, tooltipText, size, icon, open, childLength, checkboxes, showIcon, checked, indeterminateState, focused, contextMenuShow } = this;
2415
- const menuPadding = this.menuPadding + 'px';
2416
- const textContent = classnames('text-content', size, 'size-2'
2417
- // {
2418
- // 'size-2': size === 'small' || size === 'medium',
2419
- // 'size-3': size === 'large',
2420
- // }
2421
- );
2422
- const classes = classnames('treeview-item', {
2423
- 'focus': focused,
2424
- 'open': open,
2425
- 'selected': this.selected
2426
- });
2427
- const treeviewContextMenu = classnames('treeview-item-context-menu', {
2428
- 'show': contextMenuShow
2429
- });
2430
- const treeviewInner = classnames('treeview-inner', {
2431
- 'open': open,
2432
- });
2433
- const indeterminate = classnames('indeterminate', {
2434
- 'disabled': this.disabled,
2435
- });
2436
- const treeviewItemContainer = classnames('treeview-item-container', {
2437
- 'selected': this.selected,
2438
- 'disabled': this.disabled
2439
- });
2440
- const collapseContent = classnames('collapse-content', {
2441
- 'child': childLength > 0,
2442
- });
2443
- const hostClasses = classnames(this.hidden ? 'hidden' : null);
2444
- const faviconClass = classnames("favicon", {
2445
- "favorite": this.favorite
2446
- });
2447
- 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))));
2448
- }
2449
- get el() { return getElement(this); }
2450
- static get watchers() { return {
2451
- "_contextMenu": ["parseItems"]
2452
- }; }
2453
- };
2454
- BcmtreeviewItem.style = treeviewItemCss;
2455
-
2456
- export { BcmCheckboxLite as bcm_checkbox_lite, BcmDivider as bcm_divider, BcmListbox as bcm_listbox, BcmListboxGroup as bcm_listbox_group, BcmListboxItem as bcm_listbox_item, BcmSearch as bcm_search, Bcmtreeview as bcm_treeview, BcmtreeviewItem as bcm_treeview_item };