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