bromcom-ui 2.8.1-rc.9 → 2.9.0-rc.0

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 (242) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-016a9d78.entry.js → p-02afc93f.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-d657a132.entry.js → p-0906c9b4.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-ab51aa2b.entry.js → p-0d4a552d.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-3c15cdb7.entry.js → p-0ee4e283.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-494df97b.entry.js → p-0fdbbbe8.entry.js} +1 -1
  7. package/dist/bromcom-ui/p-14378828.entry.js +5 -0
  8. package/dist/bromcom-ui/{p-92924b7e.entry.js → p-15fa3329.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-5de5cb0d.entry.js → p-1c5a2111.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-2053339a.entry.js → p-20ac20d4.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-daf2ed63.entry.js → p-236def30.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-9b0855f6.entry.js → p-24a733ff.entry.js} +1 -1
  13. package/dist/bromcom-ui/p-24aefda6.js +1 -1
  14. package/dist/bromcom-ui/p-2cb4a196.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-b3584d64.js → p-2ea24a6e.js} +1 -1
  16. package/dist/bromcom-ui/{p-6af5bc87.entry.js → p-334e3147.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-125d13c0.entry.js → p-344a4674.entry.js} +1 -1
  18. package/dist/bromcom-ui/p-3ad545f0.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-7b5ddef4.entry.js → p-40a5e4fc.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-440afdfa.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-6cf8afd4.entry.js → p-4b34b3f9.entry.js} +1 -1
  22. package/dist/bromcom-ui/{p-6b692c54.entry.js → p-55001c80.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-73f70b2f.entry.js → p-56896e3a.entry.js} +1 -1
  24. package/dist/bromcom-ui/{p-f8b03d4d.entry.js → p-5f288af5.entry.js} +1 -1
  25. package/dist/bromcom-ui/{p-284542a6.entry.js → p-70b428e8.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-40d258ce.entry.js → p-72b7fda0.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-a6f5fe0b.entry.js → p-7658ec26.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-80a43b79.js +5 -0
  29. package/dist/bromcom-ui/p-87df3ffb.js +5 -0
  30. package/dist/bromcom-ui/{p-bc7ccd4e.entry.js → p-8864e6af.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-89b21290.entry.js +5 -0
  32. package/dist/bromcom-ui/{p-90981da9.entry.js → p-89f7a5c7.entry.js} +1 -1
  33. package/dist/bromcom-ui/p-8d0ca8c2.js +1 -1
  34. package/dist/bromcom-ui/{p-34efb8eb.entry.js → p-9b10d955.entry.js} +1 -1
  35. package/dist/bromcom-ui/{p-585fbc98.entry.js → p-9c7e9b5d.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-9eb2a75d.entry.js +5 -0
  37. package/dist/bromcom-ui/p-a0a3fd94.entry.js +5 -0
  38. package/dist/bromcom-ui/{p-b94bdddf.entry.js → p-a2046742.entry.js} +1 -1
  39. package/dist/bromcom-ui/p-a429e85b.js +1 -1
  40. package/dist/bromcom-ui/{p-997c4fbd.entry.js → p-a49ded35.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-a97ee69d.entry.js +19 -0
  42. package/dist/bromcom-ui/{p-8114163e.entry.js → p-ab55def1.entry.js} +1 -1
  43. package/dist/bromcom-ui/p-b60bcecf.js +1 -1
  44. package/dist/bromcom-ui/{p-a3453263.js → p-b94fa326.js} +1 -1
  45. package/dist/bromcom-ui/{p-e28100e6.entry.js → p-be6d0712.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-e60380c6.entry.js → p-c9b10de5.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-0a404cf9.entry.js → p-cad8f786.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-3642f316.entry.js → p-cf7af1fc.entry.js} +1 -1
  49. package/dist/bromcom-ui/{p-e17e1e3e.entry.js → p-d011a407.entry.js} +1 -1
  50. package/dist/bromcom-ui/{p-8c2bf4ad.entry.js → p-d1598dd5.entry.js} +1 -1
  51. package/dist/bromcom-ui/p-d3cb8d25.js +5 -0
  52. package/dist/bromcom-ui/{p-ee75e899.entry.js → p-dcb2ae7f.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-09d1d69d.entry.js → p-dce2079e.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-83bae50b.entry.js → p-e008411a.entry.js} +1 -1
  55. package/dist/bromcom-ui/{p-fe1532b5.js → p-e0f440b4.js} +1 -1
  56. package/dist/bromcom-ui/{p-bfb70c75.entry.js → p-e3cafc0d.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-0372f13a.entry.js → p-e606c42b.entry.js} +1 -1
  58. package/dist/bromcom-ui/p-e66821e5.entry.js +5 -0
  59. package/dist/bromcom-ui/{p-10d55ac5.entry.js → p-e6ce5ec8.entry.js} +1 -1
  60. package/dist/bromcom-ui/{p-508580f7.js → p-f902b559.js} +1 -1
  61. package/dist/cjs/{bcm-634604e3.js → bcm-ab921827.js} +4 -4
  62. package/dist/cjs/bcm-accordion.cjs.entry.js +1 -1
  63. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  64. package/dist/cjs/bcm-attendance.cjs.entry.js +1 -1
  65. package/dist/cjs/{bcm-colorful_2.cjs.entry.js → bcm-avatar_15.cjs.entry.js} +6164 -92
  66. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-button-group.cjs.entry.js +6 -6
  68. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  69. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +416 -0
  70. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +5 -5
  71. package/dist/cjs/bcm-checkbox_2.cjs.entry.js +193 -0
  72. package/dist/cjs/bcm-collapse.cjs.entry.js +1 -1
  73. package/dist/cjs/bcm-color-input.cjs.entry.js +5 -5
  74. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +8 -8
  76. package/dist/cjs/bcm-default.cjs.entry.js +1 -1
  77. package/dist/cjs/bcm-drawer.cjs.entry.js +7 -7
  78. package/dist/cjs/bcm-dropdown.cjs.entry.js +6 -6
  79. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +3 -3
  80. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  81. package/dist/cjs/bcm-input-custom.cjs.entry.js +1 -1
  82. package/dist/cjs/bcm-item.cjs.entry.js +3 -3
  83. package/dist/cjs/bcm-items.cjs.entry.js +3 -3
  84. package/dist/cjs/bcm-link.cjs.entry.js +3 -3
  85. package/dist/cjs/bcm-menu.cjs.entry.js +7 -7
  86. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +5 -5
  87. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +5 -5
  88. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  89. package/dist/cjs/bcm-modal.cjs.entry.js +6 -6
  90. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +4 -4
  91. package/dist/cjs/bcm-popconfirm.cjs.entry.js +4 -4
  92. package/dist/cjs/bcm-popover.cjs.entry.js +8 -8
  93. package/dist/cjs/bcm-progress.cjs.entry.js +3 -3
  94. package/dist/cjs/bcm-radio-group.cjs.entry.js +9 -9
  95. package/dist/cjs/bcm-radio.cjs.entry.js +12 -12
  96. package/dist/cjs/bcm-range.cjs.entry.js +5 -5
  97. package/dist/cjs/bcm-select.cjs.entry.js +2 -2
  98. package/dist/cjs/bcm-skeleton.cjs.entry.js +1 -1
  99. package/dist/cjs/bcm-step.cjs.entry.js +2 -2
  100. package/dist/cjs/bcm-stepper.cjs.entry.js +8 -8
  101. package/dist/cjs/bcm-switch.cjs.entry.js +8 -8
  102. package/dist/cjs/bcm-tab-group.cjs.entry.js +6 -6
  103. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +9 -9
  104. package/dist/cjs/bcm-tab-item.cjs.entry.js +5 -5
  105. package/dist/cjs/bcm-tag.cjs.entry.js +14 -14
  106. package/dist/cjs/bcm-text.cjs.entry.js +3 -3
  107. package/dist/cjs/bcm-textarea.cjs.entry.js +6 -6
  108. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  109. package/dist/cjs/bcm-toast.cjs.entry.js +10 -10
  110. package/dist/cjs/bromcom-ui.cjs.js +1 -1
  111. package/dist/cjs/{floating-ui-74eb26d6.js → floating-ui-c9fc2202.js} +2 -2
  112. package/dist/cjs/{generate-cf48ed2d.js → generate-21143214.js} +1 -1
  113. package/dist/cjs/{input-template-129e6e5b.js → input-template-1441e468.js} +6 -6
  114. package/dist/cjs/{json-parse-decarator-f0554ad2.js → json-parse-decarator-8dbf0b0e.js} +1 -1
  115. package/dist/cjs/{label-template-cc69bc21.js → label-template-4d5f99a5.js} +3 -3
  116. package/dist/cjs/loader.cjs.js +1 -1
  117. package/dist/cjs/{number-helper-453e02ee.js → number-helper-08a7ff70.js} +1 -1
  118. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +6 -6
  119. package/dist/cjs/old-bcm-popover.cjs.entry.js +4 -4
  120. package/dist/cjs/{popover-placement-3c8f3a72.js → popover-placement-ccb40073.js} +1 -1
  121. package/dist/cjs/{slot-template-3e59d7d8.js → slot-template-d70ea082.js} +1 -1
  122. package/dist/cjs/{stepper-states-3082dce8.js → stepper-states-9b6818aa.js} +1 -1
  123. package/dist/cjs/{string-helper-45cffee0.js → string-helper-d681e5c7.js} +2 -2
  124. package/dist/cjs/{tooltip-helper-748b4ab6.js → tooltip-helper-235b26ea.js} +9 -9
  125. package/dist/cjs/{validators-2fcf98d3.js → validators-6a0077a8.js} +1 -1
  126. package/dist/collection/collection-manifest.json +1 -0
  127. package/dist/collection/components/atoms/chip/chip-group.js +292 -0
  128. package/dist/collection/components/atoms/chip/chip.js +107 -26
  129. package/dist/collection/components/molecules/linked/linked.js +6 -17
  130. package/dist/collection/components/organism/form/form.js +1 -0
  131. package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
  132. package/dist/collection/components/organism/list/list.css +3 -0
  133. package/dist/components/bcm-chip-group.d.ts +11 -0
  134. package/dist/components/bcm-chip-group.js +174 -0
  135. package/dist/components/bcm-chip.js +1 -100
  136. package/dist/components/bcm-form-2.js +1 -0
  137. package/dist/components/bcm-form.js +1 -0
  138. package/dist/components/bcm-list.js +1 -1702
  139. package/dist/{esm/bcm-chip.entry.js → components/chip.js} +110 -33
  140. package/dist/components/generate.js +1 -1
  141. package/dist/components/index.d.ts +1 -0
  142. package/dist/components/index.js +1 -0
  143. package/dist/components/linked.js +6 -17
  144. package/dist/{esm/bcm-list.entry.js → components/list.js} +136 -31
  145. package/dist/esm/bcm-9f50af9c.js +1 -1
  146. package/dist/esm/bcm-accordion.entry.js +1 -1
  147. package/dist/esm/bcm-alert.entry.js +1 -1
  148. package/dist/esm/bcm-attendance.entry.js +1 -1
  149. package/dist/esm/{bcm-colorful_2.entry.js → bcm-avatar_15.entry.js} +6148 -89
  150. package/dist/esm/bcm-breadcrumb.entry.js +1 -1
  151. package/dist/esm/bcm-button-group.entry.js +2 -2
  152. package/dist/esm/bcm-card.entry.js +1 -1
  153. package/dist/esm/bcm-checkbox-group.entry.js +412 -0
  154. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  155. package/dist/esm/bcm-checkbox_2.entry.js +188 -0
  156. package/dist/esm/bcm-collapse.entry.js +1 -1
  157. package/dist/esm/bcm-color-input.entry.js +3 -3
  158. package/dist/esm/bcm-date-picker.entry.js +2 -2
  159. package/dist/esm/bcm-datetime-picker.entry.js +2 -2
  160. package/dist/esm/bcm-default.entry.js +1 -1
  161. package/dist/esm/bcm-drawer.entry.js +4 -4
  162. package/dist/esm/bcm-dropdown.entry.js +3 -3
  163. package/dist/esm/bcm-expansion-panel.entry.js +1 -1
  164. package/dist/esm/bcm-form-2.entry.js +3 -2
  165. package/dist/esm/bcm-input-custom.entry.js +1 -1
  166. package/dist/esm/bcm-item.entry.js +2 -2
  167. package/dist/esm/bcm-items.entry.js +1 -1
  168. package/dist/esm/bcm-link.entry.js +1 -1
  169. package/dist/esm/bcm-menu.entry.js +4 -4
  170. package/dist/esm/bcm-modal-2-footer.entry.js +3 -3
  171. package/dist/esm/bcm-modal-2-header.entry.js +3 -3
  172. package/dist/esm/bcm-modal-2.entry.js +4 -4
  173. package/dist/esm/bcm-modal.entry.js +2 -2
  174. package/dist/esm/bcm-popconfirm-box.entry.js +1 -1
  175. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  176. package/dist/esm/bcm-popover.entry.js +4 -4
  177. package/dist/esm/bcm-progress.entry.js +2 -2
  178. package/dist/esm/bcm-radio-group.entry.js +4 -4
  179. package/dist/esm/bcm-radio.entry.js +4 -4
  180. package/dist/esm/bcm-range.entry.js +2 -2
  181. package/dist/esm/bcm-skeleton.entry.js +1 -1
  182. package/dist/esm/bcm-step.entry.js +2 -2
  183. package/dist/esm/bcm-stepper.entry.js +5 -5
  184. package/dist/esm/bcm-switch.entry.js +2 -2
  185. package/dist/esm/bcm-tab-group.entry.js +4 -4
  186. package/dist/esm/bcm-tab-item-header.entry.js +4 -4
  187. package/dist/esm/bcm-tab-item.entry.js +3 -3
  188. package/dist/esm/bcm-tag.entry.js +3 -3
  189. package/dist/esm/bcm-textarea.entry.js +3 -3
  190. package/dist/esm/bcm-time-picker.entry.js +2 -2
  191. package/dist/esm/bcm-toast.entry.js +2 -2
  192. package/dist/esm/bromcom-ui.js +1 -1
  193. package/dist/esm/floating-ui-e7341329.js +1 -1
  194. package/dist/esm/{generate-03cf1f82.js → generate-a39b1045.js} +1 -1
  195. package/dist/esm/{input-template-6137ed1b.js → input-template-e1df6efd.js} +2 -2
  196. package/dist/esm/{json-parse-decarator-699aaeeb.js → json-parse-decarator-b1ceb8c8.js} +1 -1
  197. package/dist/esm/label-template-d74fe788.js +1 -1
  198. package/dist/esm/loader.js +1 -1
  199. package/dist/esm/{number-helper-61c91978.js → number-helper-fa8e8000.js} +1 -1
  200. package/dist/esm/old-bcm-popover-box.entry.js +2 -2
  201. package/dist/esm/old-bcm-popover.entry.js +2 -2
  202. package/dist/esm/{stepper-states-0fc18a9f.js → stepper-states-44849ee8.js} +1 -1
  203. package/dist/esm/string-helper-6bd24967.js +1 -1
  204. package/dist/esm/{tooltip-helper-a06cb0a2.js → tooltip-helper-10b64c23.js} +4 -4
  205. package/dist/esm/{validators-c6a4a8ac.js → validators-dd70be40.js} +1 -1
  206. package/dist/types/components/atoms/chip/chip-group.d.ts +22 -0
  207. package/dist/types/components/atoms/chip/chip.d.ts +18 -13
  208. package/dist/types/components/molecules/linked/linked.d.ts +0 -2
  209. package/dist/types/components.d.ts +47 -4
  210. package/package.json +1 -1
  211. package/dist/bromcom-ui/p-00fd6de2.entry.js +0 -5
  212. package/dist/bromcom-ui/p-1736eee9.entry.js +0 -5
  213. package/dist/bromcom-ui/p-1eabd5dc.js +0 -10
  214. package/dist/bromcom-ui/p-28345f61.js +0 -5
  215. package/dist/bromcom-ui/p-3b3f7c54.entry.js +0 -5
  216. package/dist/bromcom-ui/p-4cbc9da5.entry.js +0 -5
  217. package/dist/bromcom-ui/p-55837df1.entry.js +0 -5
  218. package/dist/bromcom-ui/p-6ea2108c.entry.js +0 -5
  219. package/dist/bromcom-ui/p-7aa855fc.entry.js +0 -5
  220. package/dist/bromcom-ui/p-88078128.entry.js +0 -13
  221. package/dist/bromcom-ui/p-8aa77fd1.js +0 -5
  222. package/dist/bromcom-ui/p-c5bd9dd7.entry.js +0 -5
  223. package/dist/bromcom-ui/p-c818a4fc.entry.js +0 -5
  224. package/dist/bromcom-ui/p-c8c9d35e.entry.js +0 -5
  225. package/dist/bromcom-ui/p-cc45ea99.entry.js +0 -5
  226. package/dist/bromcom-ui/p-d155cf69.entry.js +0 -5
  227. package/dist/bromcom-ui/p-ebc87fe9.entry.js +0 -5
  228. package/dist/bromcom-ui/p-ed9bf8e9.js +0 -5
  229. package/dist/cjs/bcm-avatar_2.cjs.entry.js +0 -139
  230. package/dist/cjs/bcm-button_7.cjs.entry.js +0 -1521
  231. package/dist/cjs/bcm-chip.cjs.entry.js +0 -74
  232. package/dist/cjs/bcm-input.cjs.entry.js +0 -370
  233. package/dist/cjs/bcm-list.cjs.entry.js +0 -1607
  234. package/dist/cjs/bcm-rc-overflow_2.cjs.entry.js +0 -2443
  235. package/dist/cjs/bcm-typography.cjs.entry.js +0 -21
  236. package/dist/cjs/index-906fb4e5.js +0 -540
  237. package/dist/esm/bcm-avatar_2.entry.js +0 -134
  238. package/dist/esm/bcm-button_7.entry.js +0 -1511
  239. package/dist/esm/bcm-input.entry.js +0 -366
  240. package/dist/esm/bcm-rc-overflow_2.entry.js +0 -2438
  241. package/dist/esm/bcm-typography.entry.js +0 -17
  242. package/dist/esm/index-6310a048.js +0 -537
@@ -2,1708 +2,7 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import { h, proxyCustomElement, HTMLElement, createEvent, Host } from '@stencil/core/internal/client';
6
- import { I as IsLoad } from './is-load-decorator.js';
7
- import { J as JsonParse } from './json-parse-decarator.js';
8
- import './color-helper.js';
9
- import { V as Validators } from './validators.js';
10
- import { s as snq, G as Generate } from './generate.js';
11
- import { N as NumberHelper } from './number-helper.js';
12
- import { S as StringHelper } from './string-helper.js';
13
- import './element-dragger.js';
14
- import { g as getPlacement, s as setPosition } from './popover-placement.js';
15
- import { p as pluralize, d as delay } from './utils.js';
16
- import { B as Bcm, a as Bcm$1 } from './bcm.js';
17
- import { C as CaptionTemplate } from './caption-template.js';
18
- import { c as classnames } from './index2.js';
19
- import './types.js';
20
- import { L as LabelTemplate } from './label-template.js';
21
- import './types2.js';
22
- import { c as createStore } from './index4.js';
23
- import { d as defineCustomElement$5 } from './icon.js';
24
- import { d as defineCustomElement$4 } from './rc-overflow.js';
25
- import { d as defineCustomElement$3 } from './search.js';
26
- import { d as defineCustomElement$2 } from './tooltip.js';
27
-
28
- const CheckboxTemplate = ({ disabled, checked, readonly, required, indeterminate, hidden, captionType, _id }) => {
29
- // if ( indeterminate ) {
30
- // checked = indeterminate == 'determinate' ? true : false
31
- // }
32
- const hostClasses = classnames('bcm-checkbox', 'bcm-checkbox__type-default', `bcm-checkbox-size-medium`, {
33
- // 'size-2': size === Bcm.Size.small || size === Bcm.Size.medium,
34
- // 'size-3': optionType === 'button' && size === Bcm.Size.large,
35
- 'error': captionType == Bcm.Status.error,
36
- hidden,
37
- checked,
38
- disabled,
39
- required,
40
- readonly,
41
- });
42
- const bcmCheckboxIconClass = classnames('bcm-checkbox__label-icon', 'bcm-checkbox__label-icon-lite', 'bcm-checkbox__label-icon-' + indeterminate, {
43
- 'bcm-checkbox__label-icon-checked': checked,
44
- });
45
- const bcmCheckboxLabelClass = classnames('bcm-checkbox__label');
46
- return (h("div", { class: hostClasses },
47
- h("input", { tabindex: "-1", id: _id, type: "checkbox", checked: checked, disabled: disabled, required: required, readonly: readonly }),
48
- h("label", { class: bcmCheckboxLabelClass, htmlFor: _id },
49
- h("span", { class: bcmCheckboxIconClass },
50
- h("bcm-icon", { icon: "far fa-check" })))));
51
- };
52
-
53
- const InfoFooterTemplate = ({ selected, total, found, multiple, variableText }) => {
54
- total = total || 0;
55
- variableText = variableText ? pluralize(variableText, total) : 'items';
56
- return (h("footer", { class: "bcm-info-footer" },
57
- h("bcm-text", { scale: "size-1", color: "grey-8" },
58
- (multiple && selected > 0) && ` ( ${selected} selected ) `,
59
- ` Total ${total} `,
60
- found != null && ` / ${found} `,
61
- ` ${variableText} found. `)));
62
- };
63
-
64
- const ListItemTemplate = ({ item, treeview, highlight, checkboxes, size, selectedItem, openGroup, checkedItem, focusItem, searchIsOnlyChilds }) => {
65
- const isHaveChildren = item.items && item.items.length > 0;
66
- var text = StringHelper.htmlEntities(item.text);
67
- let intersection = [];
68
- if (highlight && StringHelper.slugify(text).includes(StringHelper.slugify(highlight))) {
69
- if (!searchIsOnlyChilds || (searchIsOnlyChilds && (!isHaveChildren || (!treeview && item.type != "group")))) {
70
- text = StringHelper.highlight(text, highlight);
71
- }
72
- }
73
- if (item.type != 'group' && item.template) {
74
- const match = item.template
75
- .replace(/\s/g, '')
76
- .match(/\{{[^}}]+\}/g)
77
- .map(x => x.replace(/[{}]/g, ''));
78
- const keys = Object.keys(item.itemObject);
79
- intersection = match.filter(x => keys.includes(x));
80
- }
81
- text = item.isHtmlContent ? item.isHtmlContent : item.template && intersection.length > 0 ? StringHelper.templateParser(item.template, Object.assign(Object.assign({}, item.itemObject), { text })) : text;
82
- const unClickable = !treeview && item.type == "group" && !item.clickable;
83
- const disabled = item.disabled;
84
- const readonly = item.readonly;
85
- const itemClick = (event) => {
86
- let path = event.path || event.composedPath();
87
- if (path.filter(x => x.attributes && x.attributes.getNamedItem("unlinked"))[0]) {
88
- return;
89
- }
90
- if (readonly) {
91
- collapseClick();
92
- }
93
- !unClickable && !disabled && !readonly && (checkboxes ? checkedItem(item.id) : selectedItem(item.id));
94
- };
95
- const collapseClick = () => {
96
- item.open = item.isSearching;
97
- openGroup(item.id);
98
- };
99
- return (h("div", { id: item.id, hidden: item.hidden, "on-focus": e => !unClickable && !disabled && focusItem(e), class: classnames('bcm-list__item',
100
- // size === 'large' ? 'size-3' : 'size-2',
101
- 'bcm-list__item-' + size, {
102
- 'bcm-list__item--group': !treeview && item.type == 'group',
103
- 'bcm-list__item--readonly': readonly,
104
- }) },
105
- h("div", { class: classnames('bcm-list__item-content', !checkboxes && item.selected && 'selected', { disabled: disabled }) },
106
- treeview && (h("div", { class: "bcm-list__item-content-collapse-icon", onClick: () => collapseClick() }, isHaveChildren && h("bcm-icon", { icon: classnames('fas fa-caret-' + (item.isSearching || item.open ? 'down' : 'right')) }))),
107
- h("div", { class: classnames('bcm-list__item-content-text', { treeview }), onClick: (e) => itemClick(e) },
108
- checkboxes && (treeview || (!treeview && item.type != 'group')) && (h("div", { class: "bcm-list__item-content-text-checkbox" },
109
- h(CheckboxTemplate, { indeterminate: item.indeterminate, checked: item.checked, disabled: item.disabled }))),
110
- h("span", Object.assign({ class: "bcm-list__item-content-text-inner" }, (item.title && { "title": item.title }), { innerHTML: text })))),
111
- (treeview || !treeview && item.type == "group") && isHaveChildren && (h("div", { class: "bcm-list__item-childs" }, (item.isSearching || item.open || (!treeview && item.type == "group")) &&
112
- item.items.map((item) => (h(ListItemTemplate, { highlight: highlight, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, size: size, selectedItem: selectedItem, checkedItem: checkedItem, openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) })))))));
113
- };
114
-
115
- const ListTemplate = ({ highlight, selectAllItem, bcmListContainer, treeview, checkboxes, checkAll, infoFooter, value, totalData, searchFound, variableText, _id, data, width, height, size, searchPlaceholder, minSearchLength, selectedItem, openGroup, checkedItem, onScrollEvent, focusItem, items, searchable, searchIsOnlyChilds, emptyText, emptyIcon, }) => {
116
- const showSelectAll = !(treeview && searchFound > 0) && !(searchFound > 0);
117
- const setScrollHeight = () => {
118
- const itemHeight = size === 'small' ? 28 : size === 'medium' ? 36 : 48;
119
- const itemCount = searchFound == null ? (treeview ? items.length : totalData) : searchFound;
120
- const scrollHeight = itemCount * itemHeight || 0;
121
- return {
122
- 'min-height': `${scrollHeight}px`,
123
- 'overscroll-behavior': 'none',
124
- 'height': '100%',
125
- 'display': 'flex',
126
- 'flex-direction': 'column',
127
- };
128
- };
129
- return (h("div", { id: `bcm-list-${_id}`, class: bcmListContainer, style: { '--height': height, '--width': width } },
130
- data && searchable && (h("section", { class: "bcm-list__container-search" },
131
- h("bcm-search", { size: size, id: `bcm-list-${_id}-search`, data: data, clearable: true, placeholder: searchPlaceholder, "min-search-length": minSearchLength, searchIsOnlyChilds: searchIsOnlyChilds }))),
132
- h("main", { onScroll: e => onScrollEvent(e), class: "scrolling", style: { 'overscroll-behavior': 'none' } },
133
- h("div", { style: setScrollHeight() },
134
- checkAll && searchFound != 0 && items && items.length > 0 && checkboxes && showSelectAll && (h("section", { class: "bcm-list__container-select-all" },
135
- h(ListItemTemplate, { size: size, item: selectAllItem, treeview: false, checkboxes: true, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
136
- items.map((item) => (h(ListItemTemplate, { highlight: highlight, size: size, item: item, searchIsOnlyChilds: searchIsOnlyChilds, treeview: treeview, checkboxes: checkboxes, selectedItem: itemId => selectedItem(itemId), checkedItem: itemId => checkedItem(itemId), openGroup: parentId => openGroup(parentId), focusItem: itemId => focusItem(itemId) }))),
137
- (!items || items.length === 0) && searchFound != 0 && (h("section", { class: "bcm-list__container-no-data" },
138
- h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
139
- h("span", { innerHTML: emptyText || 'No data' })))),
140
- searchFound == 0 && (h("section", { class: "bcm-list__container-no-data" },
141
- h("bcm-empty", { style: { height: 'auto' }, icon: emptyIcon },
142
- h("span", { innerHTML: emptyText || 'No Data Found' })))))),
143
- infoFooter && data && data.length > 0 && (h(InfoFooterTemplate, { selected: value === null || value === void 0 ? void 0 : value.length, total: totalData, found: searchFound, multiple: checkboxes, variableText: variableText }))));
144
- };
145
-
146
- const { state } = createStore({
147
- value: new Map(),
148
- });
149
- const setValue = val => {
150
- const { id, dataSource, options } = val;
151
- const { type, treeview, checkboxes, searchable, value, name, label, size, disabled, readonly, highlight, required, hidden, fullWidth, height, maxHeight, minHeight, width, infoFooter, variableText, template, allOpen, keyControl, checkAll, linkedComponent, placeholder, searchPlaceholder, searchIsOnlyChilds, clearable, caption, noCaption, captionType, captionError, placement, } = options;
152
- const itemOptions = { size, checkboxes, template, allOpen, highlight, treeview };
153
- const data = {
154
- id: snq(() => id, Generate.UID),
155
- dataSource: dataSource && dataSource.length > 0 && recursive(dataSource, itemOptions),
156
- options: {
157
- type,
158
- treeview,
159
- checkboxes,
160
- searchable,
161
- value,
162
- name,
163
- label,
164
- size,
165
- disabled,
166
- readonly,
167
- highlight,
168
- required,
169
- hidden,
170
- fullWidth,
171
- height,
172
- maxHeight,
173
- minHeight,
174
- width,
175
- infoFooter,
176
- variableText,
177
- template,
178
- allOpen,
179
- keyControl,
180
- checkAll,
181
- linkedComponent,
182
- placeholder,
183
- searchPlaceholder,
184
- searchIsOnlyChilds,
185
- clearable,
186
- caption,
187
- noCaption,
188
- captionType,
189
- captionError,
190
- placement,
191
- },
192
- totalItems: (dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) > 0 && calculateTotalItems(dataSource, options.treeview),
193
- totalRoots: dataSource === null || dataSource === void 0 ? void 0 : dataSource.length,
194
- };
195
- state.value.set(data.id, data);
196
- };
197
- const recursive = (data, options, parentId, parentIndex = "0.") => {
198
- let recData = [];
199
- if (data && data.length > 0) {
200
- recData = data.map((item, index) => (Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ itemObject: item }, item), options), { parentId: snq(() => parentId, null), open: options.allOpen || item.open || false }), ((options.treeview || (!options.treeview && item.type == 'group')) && item.items && item.items.length > 0
201
- ? { items: snq(() => recursive(item.items, options, item.id, `${parentIndex}${index}`), []) }
202
- : { items: [] })), { ct: `${parentIndex}${index}` })));
203
- }
204
- return recData;
205
- };
206
- const removeValue = _id => {
207
- state.value.delete(_id);
208
- };
209
- const getValue = id => snq(() => state.value.get(id), {});
210
- const calculateTotalItems = (dataSource, treeview) => {
211
- let total = 0;
212
- dataSource.forEach(item => {
213
- if (treeview || (!treeview && item.type != "group")) {
214
- total += 1;
215
- }
216
- if ((treeview || (!treeview && item.type == "group")) && item.items) {
217
- total += calculateTotalItems(item.items, treeview);
218
- }
219
- });
220
- return total;
221
- };
222
- const getData = id => {
223
- let data = [];
224
- const value = getValue(id);
225
- if (value) {
226
- const { dataSource } = value;
227
- data = dataSource;
228
- }
229
- return data;
230
- };
231
- const getDataPagination = (id, limit = 3, ids) => {
232
- let data = [];
233
- const value = getValue(id);
234
- if (value) {
235
- const { dataSource } = value;
236
- data = !ids ? dataSource.slice(0, limit) : dataSource.filter(item => ids.indexOf(item.id) > -1).slice(0, limit);
237
- }
238
- return data;
239
- };
240
- const openGroup = (id, groupId, items, status) => {
241
- let dataSource;
242
- if (items) {
243
- dataSource = items;
244
- }
245
- else {
246
- const value = getValue(id);
247
- dataSource = value.dataSource;
248
- }
249
- if (dataSource) {
250
- dataSource.forEach(item => {
251
- if (status != undefined) {
252
- item.open = status;
253
- }
254
- else if (item.id == groupId) {
255
- item.open = !item.open;
256
- item.isSearching = item.open;
257
- if (!item.open && item.items) {
258
- openGroup(id, groupId, item.items, false);
259
- }
260
- }
261
- else if (item.items) {
262
- openGroup(id, groupId, item.items);
263
- }
264
- });
265
- }
266
- };
267
- const removeOtherTags = (id, ids, items) => {
268
- ids = Array.isArray(ids) ? ids : [ids];
269
- let dataSource;
270
- if (items) {
271
- dataSource = items;
272
- }
273
- else {
274
- const value = getValue(id);
275
- dataSource = value.dataSource;
276
- }
277
- if (dataSource) {
278
- ids.forEach(otherTagIds => {
279
- dataSource.forEach(child => {
280
- if (child.id == otherTagIds) {
281
- child.checked = false;
282
- child.itemObject.checked = false;
283
- }
284
- else if (child.items) {
285
- onRemoveItems(id, otherTagIds, child.items);
286
- }
287
- });
288
- });
289
- }
290
- };
291
- const onRemoveItems = (id, itemId, items) => {
292
- if (items) {
293
- items.forEach(item => {
294
- if (item.id == itemId) {
295
- item.checked = false;
296
- item.itemObject.checked = false;
297
- indeterminateStatus(id, item.parentId);
298
- }
299
- else if (item.items) {
300
- onRemoveItems(id, itemId, item.items);
301
- }
302
- });
303
- }
304
- };
305
- const addChecked = (id, ids) => {
306
- const value = getValue(id);
307
- if (value) {
308
- ids.forEach(item => {
309
- checkedItem(id, item);
310
- });
311
- }
312
- };
313
- const checkedItem = (id, itemId) => {
314
- findItem(id, itemId);
315
- };
316
- const findItem = (id, itemId, items) => {
317
- itemId = Array.isArray(itemId) ? itemId : [itemId];
318
- let dataSource;
319
- if (items) {
320
- dataSource = items;
321
- }
322
- else {
323
- const value = getValue(id);
324
- dataSource = value.dataSource;
325
- }
326
- if (dataSource) {
327
- dataSource.forEach(item => {
328
- if (itemId.includes(item.id)) {
329
- checkedProcess(id, item);
330
- if (item.parentId) {
331
- indeterminateStatus(id, item.parentId);
332
- }
333
- }
334
- else if (item.items) {
335
- findItem(id, itemId, item.items);
336
- }
337
- });
338
- }
339
- };
340
- const checkedProcess = (id, item, status) => {
341
- const value = getValue(id);
342
- if (value) {
343
- const treeview = value.options.treeview;
344
- if (item) {
345
- // && !item.hidden => select all bastığımızda hidden olanları seçmemesi içindi
346
- if (treeview || (!treeview && item.type != "group")) {
347
- if (!item.disabled) {
348
- if (status != undefined) {
349
- item.checked = status;
350
- }
351
- else {
352
- item.checked = !item.checked;
353
- }
354
- item.itemObject.checked = item.checked;
355
- item.indeterminate = item.checked ? "determinate" : "uncheck";
356
- }
357
- }
358
- if (item.items) {
359
- item.items.forEach(child => {
360
- checkedProcess(id, child, status == undefined ? item.checked : status);
361
- });
362
- }
363
- }
364
- }
365
- };
366
- const indeterminateStatus = (id, itemId, items) => {
367
- let dataSource;
368
- if (items) {
369
- dataSource = items;
370
- }
371
- else {
372
- const value = getValue(id);
373
- dataSource = value.dataSource;
374
- }
375
- if (dataSource) {
376
- dataSource.forEach(item => {
377
- if (item.id == itemId) {
378
- let allChecked = true;
379
- let allUnchecked = true;
380
- if (item.items) {
381
- item.items.map(child => {
382
- (child.checked || child.indeterminate === "indeterminate") && (allUnchecked = false);
383
- !child.checked && (allChecked = false);
384
- });
385
- }
386
- const indeterminateState = !allChecked && !allUnchecked ? "indeterminate" : allChecked ? "determinate" : "uncheck";
387
- item.indeterminate = indeterminateState;
388
- item.checked = indeterminateState == "determinate" ? true : false;
389
- item.itemObject.checked = item.checked;
390
- if (item.parentId) {
391
- indeterminateStatus(id, item.parentId);
392
- }
393
- }
394
- else if (item.items) {
395
- indeterminateStatus(id, itemId, item.items);
396
- }
397
- });
398
- }
399
- };
400
- const filterData = (id, ids, items, searchOtherTag) => {
401
- let checkeds = [];
402
- let visibled = [];
403
- getValue(id).isSearchOtherTag = searchOtherTag;
404
- let dataSource;
405
- if (items) {
406
- dataSource = items;
407
- }
408
- else {
409
- const value = getValue(id);
410
- dataSource = value.dataSource;
411
- }
412
- if (dataSource) {
413
- dataSource.forEach(item => {
414
- if (ids) {
415
- item.hidden = true;
416
- // const filter = ids.find((find) => find.id === item.id)
417
- var filter;
418
- for (let index = 0; index < ids.length; index++) {
419
- if (ids[index].id === item.id) {
420
- filter = ids[index];
421
- break;
422
- }
423
- }
424
- if (filter) {
425
- item.hidden = false;
426
- if (!getValue(id).isSearchOtherTag) {
427
- item.isSearching = true;
428
- }
429
- visibled.push(item);
430
- if (item.checked) {
431
- checkeds.push(item);
432
- }
433
- if (filter.items) {
434
- const { checkedItems, visibledItems } = filterData(id, filter.items, item.items, searchOtherTag);
435
- if (checkedItems) {
436
- checkeds = [...new Set([...checkeds, ...checkedItems])];
437
- }
438
- if (visibledItems) {
439
- visibled = [...new Set([...visibled, ...visibledItems])];
440
- }
441
- }
442
- }
443
- }
444
- else {
445
- item.hidden = false;
446
- if (item.items) {
447
- filterData(id, null, item.items);
448
- }
449
- visibled.push(item);
450
- item.isSearching = false;
451
- }
452
- });
453
- }
454
- return { checkedItems: checkeds !== null && checkeds !== void 0 ? checkeds : [], visibledItems: visibled !== null && visibled !== void 0 ? visibled : [] };
455
- };
456
- const getSelected = (id, items) => {
457
- let dataSource;
458
- let selected = null;
459
- if (items) {
460
- dataSource = items;
461
- }
462
- else {
463
- const value = getValue(id);
464
- dataSource = value.dataSource;
465
- }
466
- if (dataSource) {
467
- dataSource.forEach(item => {
468
- if (item.selected) {
469
- selected = item.itemObject;
470
- }
471
- else if (item.items) {
472
- const found = getSelected(id, item.items);
473
- if (found) {
474
- selected = found;
475
- }
476
- }
477
- });
478
- }
479
- return selected;
480
- };
481
- const getCheckedList = (id, items) => {
482
- let dataSource;
483
- let checkedList = [];
484
- let nestedResult = [];
485
- if (items) {
486
- dataSource = items;
487
- }
488
- else {
489
- const value = getValue(id);
490
- dataSource = value.dataSource;
491
- }
492
- if (dataSource) {
493
- dataSource.forEach(item => {
494
- var _a;
495
- const newItem = Object.assign(Object.assign({}, item.itemObject), { ct: item.ct });
496
- let foundChild = [];
497
- let foundItem = [];
498
- if (item.checked) {
499
- checkedList.push(newItem);
500
- foundItem.push(Object.assign(Object.assign({}, newItem), { items: [] }));
501
- }
502
- if (item.items) {
503
- const found = getCheckedList(id, item.items);
504
- if (((_a = found === null || found === void 0 ? void 0 : found.checkedList) === null || _a === void 0 ? void 0 : _a.length) > 0) {
505
- checkedList = [...checkedList, ...found.checkedList];
506
- }
507
- if (found.nestedResult.length > 0) {
508
- foundChild = found.nestedResult;
509
- }
510
- }
511
- if (foundChild.length > 0) {
512
- if (foundItem.length == 0) {
513
- foundItem.push(Object.assign(Object.assign({}, newItem), { items: [] }));
514
- }
515
- foundItem[0].items = foundChild;
516
- nestedResult.push(foundItem[0]);
517
- }
518
- else {
519
- if (foundItem.length > 0) {
520
- foundItem[0].items = foundChild;
521
- nestedResult.push(foundItem[0]);
522
- }
523
- }
524
- });
525
- }
526
- return { checkedList: (checkedList === null || checkedList === void 0 ? void 0 : checkedList.length) > 0 ? checkedList : null, nestedResult: nestedResult };
527
- };
528
- const selectedItem = (id, itemId, items) => {
529
- let dataSource;
530
- let selected = [];
531
- if (items) {
532
- dataSource = items;
533
- }
534
- else {
535
- const value = getValue(id);
536
- dataSource = value.dataSource;
537
- }
538
- if (dataSource) {
539
- dataSource.forEach(item => {
540
- if (itemId) {
541
- if (item.id == itemId) {
542
- // if (!item.selected){
543
- item.selected = true;
544
- item.itemObject.selected = item.selected;
545
- // }
546
- }
547
- else {
548
- if (item.selected) {
549
- item.selected = false;
550
- item.itemObject.selected = item.selected;
551
- }
552
- }
553
- }
554
- if (item.items) {
555
- const found = selectedItem(id, itemId, item.items);
556
- if ((found === null || found === void 0 ? void 0 : found.length) > 0) {
557
- selected = [...selected, ...found];
558
- }
559
- }
560
- if (item.selected) {
561
- selected.push(item.itemObject);
562
- }
563
- });
564
- }
565
- return selected && selected.length > 0 ? selected : null;
566
- };
567
- const setClear = (id, items) => {
568
- let dataSource;
569
- if (items) {
570
- dataSource = items;
571
- }
572
- else {
573
- const value = getValue(id);
574
- dataSource = value.dataSource;
575
- }
576
- if (dataSource) {
577
- dataSource.forEach(item => {
578
- var _a, _b, _c;
579
- item.checked && (item.checked = false);
580
- item.selected && (item.selected = false);
581
- item.indeterminate && (item.indeterminate = "uncheck");
582
- ((_a = item.itemObject) === null || _a === void 0 ? void 0 : _a.checked) && (item.itemObject.checked = false);
583
- ((_b = item.itemObject) === null || _b === void 0 ? void 0 : _b.selected) && (item.itemObject.selected = false);
584
- ((_c = item.itemObject) === null || _c === void 0 ? void 0 : _c.indeterminate) && (item.itemObject.indeterminate = "uncheck");
585
- if (item.items) {
586
- setClear(id, item.items);
587
- }
588
- });
589
- }
590
- };
591
- const selectAll = (id, status) => {
592
- const dataSource = getValue(id).dataSource;
593
- if (dataSource) {
594
- dataSource.forEach(item => {
595
- checkedProcess(id, item, status);
596
- });
597
- }
598
- };
599
- const updateOptions = (id, options) => {
600
- Object.keys(getValue(id).options).forEach(key => {
601
- getValue(id).options[key] = options[key];
602
- });
603
- };
604
- const removeState = id => {
605
- return Promise.resolve(state.value.delete(id));
606
- };
607
- const listState = {
608
- setValue,
609
- removeValue,
610
- getValue,
611
- getData,
612
- getDataPagination,
613
- openGroup,
614
- checkedItem,
615
- filterData,
616
- getSelected,
617
- getCheckedList,
618
- selectedItem,
619
- addChecked,
620
- setClear,
621
- selectAll,
622
- removeOtherTags,
623
- onRemoveItems,
624
- updateOptions,
625
- removeState,
626
- };
627
-
628
- class KeyControl {
629
- constructor(keyCode, element, elementName, childElementName) {
630
- this.elementName = '';
631
- this.childElementName = '';
632
- this.keyCode = keyCode;
633
- this.element = element;
634
- this.elementName = elementName;
635
- this.childElementName = childElementName;
636
- }
637
- getKeyCode() {
638
- return this.keyCode;
639
- }
640
- getElementName() {
641
- return this.elementName;
642
- }
643
- getChildElementName() {
644
- return this.childElementName;
645
- }
646
- getFocusedElementName() {
647
- return this.getElementName() + '.focused';
648
- }
649
- getFocusedElement() {
650
- return this.element.querySelectorAll(this.getFocusedElementName())[0] || null;
651
- }
652
- getFirstElement() {
653
- return this.element.querySelectorAll(this.getElementName())[0] || null;
654
- }
655
- getNextElement() {
656
- var _a;
657
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.nextElementSibling) || this.getFirstElement();
658
- }
659
- getPreviousElement() {
660
- var _a;
661
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.previousElementSibling) || this.getFirstElement();
662
- }
663
- getChildElement() {
664
- var _a;
665
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.getChildElementName())[0]) || null;
666
- }
667
- getParentElement(element) {
668
- if (element && element) {
669
- const isRootElement = element && element.attributes['data-isroot'];
670
- if (isRootElement) {
671
- return element;
672
- }
673
- return this.getParentElement(element.parentNode);
674
- }
675
- }
676
- focusElementIsOpen() {
677
- var _a;
678
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.classList.contains('bcm-list__item--open')) || false;
679
- }
680
- isRootElement() {
681
- var _a;
682
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll(this.getChildElementName()).length) > 0;
683
- }
684
- isRootElementIsOpen() {
685
- return this.getFocusedElement().classList.contains('bcm-list__item--open');
686
- }
687
- getFocusedChildElement() {
688
- var _a;
689
- return ((_a = this.getChildElement()) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.focused')[0]) || null;
690
- }
691
- isLastElement() {
692
- var _a;
693
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.nextElementSibling) === null;
694
- }
695
- focusParentElementFirstChild() {
696
- var _a, _b;
697
- return this.setFocus((_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.firstChild);
698
- }
699
- isFirstElement() {
700
- var _a;
701
- return ((_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.previousElementSibling) === null;
702
- }
703
- focusRootElement() {
704
- var _a, _b, _c;
705
- return this.setFocus((_c = (_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.firstChild);
706
- }
707
- nextRootElement() {
708
- var _a, _b, _c;
709
- return this.setFocus((_c = (_b = (_a = this.getFocusedElement()) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.parentElement) === null || _c === void 0 ? void 0 : _c.nextElementSibling);
710
- }
711
- findFocusElementParent() {
712
- return this.getFocusedElement().parentNode.querySelectorAll('.bcm-list__item--open');
713
- }
714
- getLastElement() {
715
- return this.element.querySelectorAll(this.getElementName())[this.element.querySelectorAll(this.getElementName()).length - 1] || null;
716
- }
717
- setFocus(element) {
718
- element.focus();
719
- }
720
- }
721
-
722
- class ListKeyControl extends KeyControl {
723
- constructor(keyCode, element, treeview, checkBoxes) {
724
- super(keyCode, element, '.bcm-list__item', '.bcm-list__item-childs');
725
- this.isTreeview = false;
726
- this.isCheckBoxes = false;
727
- this.isTreeview = treeview;
728
- this.isCheckBoxes = checkBoxes;
729
- }
730
- keyUpControl() {
731
- if (this.isTreeview) {
732
- this.keyUpTreeview();
733
- }
734
- else {
735
- if (this.isFirstElement()) {
736
- this.setFocus(this.getLastElement());
737
- }
738
- else {
739
- this.setFocus(this.getPreviousElement());
740
- }
741
- }
742
- }
743
- keyDownTreeView() {
744
- var _a;
745
- if (this.isTreeview) {
746
- if (this.isRootElement() && this.isRootElementIsOpen()) {
747
- const childs = this.getChildElement();
748
- if (childs) {
749
- this.setFocus(childs.firstChild);
750
- }
751
- }
752
- else {
753
- if (this.isLastElement() && this.getParentElement(this.getFocusedElement())) {
754
- this.setFocus((_a = this.getParentElement(this.getFocusedElement())) === null || _a === void 0 ? void 0 : _a.nextElementSibling);
755
- }
756
- else {
757
- this.setFocus(this.getNextElement());
758
- }
759
- }
760
- }
761
- }
762
- keyUpTreeview() {
763
- if (this.isFirstElement()) {
764
- const parent = this.getParentElement(this.getFocusedElement());
765
- this.setFocus(parent);
766
- }
767
- else {
768
- const previousElement = this.getPreviousElement();
769
- if (previousElement) {
770
- if (previousElement.classList.contains('bcm-list__item--open')) {
771
- const getChildElement = previousElement.querySelectorAll(this.getChildElementName())[0];
772
- console.log({ getChildElement });
773
- this.setFocus(getChildElement.lastChild);
774
- }
775
- else {
776
- this.setFocus(previousElement);
777
- }
778
- }
779
- }
780
- }
781
- keyDownControl() {
782
- if (this.isTreeview) {
783
- this.keyDownTreeView();
784
- }
785
- else {
786
- if (this.isLastElement()) {
787
- this.setFocus(this.getFirstElement());
788
- }
789
- else {
790
- this.setFocus(this.getNextElement());
791
- }
792
- }
793
- }
794
- keyRightControl() {
795
- if (this.isTreeview) {
796
- if (!this.isRootElementIsOpen() && this.isRootElement()) {
797
- const { id } = this.getFocusedElement();
798
- this.openGroup(id);
799
- }
800
- }
801
- }
802
- keyLeftControl() {
803
- if (this.isTreeview) {
804
- if (this.isRootElementIsOpen() && this.isRootElement()) {
805
- const { id } = this.getFocusedElement();
806
- this.openGroup(id);
807
- }
808
- }
809
- }
810
- keyEnterControl() { }
811
- keySpaceControl() {
812
- if (this.isCheckBoxes) {
813
- const { id } = this.getFocusedElement();
814
- this.checkedItem(id);
815
- }
816
- }
817
- keyDown() {
818
- switch (this.getKeyCode()) {
819
- case Bcm.KeyCode.up:
820
- this.keyUpControl();
821
- break;
822
- case Bcm.KeyCode.down:
823
- this.keyDownControl();
824
- break;
825
- case Bcm.KeyCode.left:
826
- this.keyLeftControl();
827
- break;
828
- case Bcm.KeyCode.right:
829
- this.keyRightControl();
830
- break;
831
- case Bcm.KeyCode.enter:
832
- this.keyEnterControl();
833
- break;
834
- case Bcm.KeyCode.space:
835
- this.keySpaceControl();
836
- break;
837
- }
838
- }
839
- keyUp() { }
840
- }
841
-
842
- const listCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); @import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-caption-area{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:12px;line-height:calc(12px + 8px);color:var(--bcm-new-ds-color-slate-400);display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;flex-wrap:nowrap;margin-top:2px}.bcm-caption-area__text{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.default{color:var(--bcm-new-ds-color-slate-400)}.bcm-caption-area__text.info{color:var(--bcm-new-ds-color-blue-500)}.bcm-caption-area__text.success{color:var(--bcm-new-ds-color-emerald-500)}.bcm-caption-area__text.warning{color:var(--bcm-new-ds-color-amber-500)}.bcm-caption-area__text.error{color:var(--bcm-new-ds-color-red-500)}.bcm-caption-area__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-caption-area__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-caption-area__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}*{box-sizing:border-box}.bcm-label{display:inline-flex;align-items:flex-start;grid-gap:2px}.bcm-label__text{margin-bottom:2px;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:inline-block;color:var(--bcm-new-ds-color-slate-600)}.bcm-label__size-small{font-size:10px;line-height:calc(10px + 8px);min-height:calc(10px + 8px)}.bcm-label__size-medium{font-size:12px;line-height:calc(12px + 8px);min-height:calc(12px + 8px)}.bcm-label__size-large{font-size:14px;line-height:calc(14px + 8px);min-height:calc(14px + 8px)}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}.bcm-list{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{scroll-behavior:smooth;padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800;transition:visibility 0s linear 400ms, opacity 100ms, transform 200ms}.bcm-list__container.bcm-list__type-linked-component.bcm-list--top,.bcm-list__container.bcm-list__type-select.bcm-list--top,.bcm-list__container.bcm-list__type-autocomplete.bcm-list--top{transform:translateY(-10%)}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{opacity:1;transform:translateY(0);visibility:visible;transition:visibility 0s linear 0s, opacity 100ms, transform 100ms}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:4px 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-50);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);user-select:none;cursor:not-allowed}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--readonly:focus>.bcm-list__item-content:not(.disabled),.bcm-list__item--readonly.focused>.bcm-list__item-content:not(.disabled){color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content{color:var(--bcm-color-grey-7)}.bcm-list__item--readonly>.bcm-list__item-content:hover,.bcm-list__item--readonly>.bcm-list__item-content:focus{color:var(--bcm-color-grey-7)}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}";
843
-
844
- var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
845
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
846
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
847
- r = Reflect.decorate(decorators, target, key, desc);
848
- else
849
- for (var i = decorators.length - 1; i >= 0; i--)
850
- if (d = decorators[i])
851
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
852
- return c > 3 && r && Object.defineProperty(target, key, r), r;
853
- };
854
- const BcmList$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
855
- constructor() {
856
- super();
857
- this.__registerHost();
858
- this.bcmChecklist = createEvent(this, "bcm-checklist", 7);
859
- this.bcmSelected = createEvent(this, "bcm-selected", 7);
860
- this.change = createEvent(this, "bcm-change", 7);
861
- this.open = createEvent(this, "bcm-open", 7);
862
- this.close = createEvent(this, "bcm-close", 7);
863
- this.debounce = null;
864
- this.debounceHandler = Generate.debounceInput(() => this.listenResize(), 300, false);
865
- this._id = Generate.UID();
866
- this.type = Bcm$1.ListType.listbox;
867
- this.treeview = false;
868
- this.checkboxes = false;
869
- this.searchable = false;
870
- this.value = null;
871
- this.inputText = undefined;
872
- this.name = undefined;
873
- this.label = undefined;
874
- this.size = Bcm$1.Size.medium;
875
- this.disabled = false;
876
- this.readonly = false;
877
- this.highlight = false;
878
- this.highlightText = undefined;
879
- this.required = false;
880
- this.hidden = false;
881
- this.fullWidth = false;
882
- this.height = "256px";
883
- this.maxHeight = "500px";
884
- this.minHeight = "150px";
885
- this.width = "256px";
886
- this.infoFooter = false;
887
- this.variableText = "item";
888
- this.template = undefined;
889
- this.allOpen = false;
890
- this.keyControl = false;
891
- this.checkAll = true;
892
- this.stopDeepClean = false;
893
- this.linkedComponent = undefined;
894
- this.isOpen = false;
895
- this.calculatedViewport = false;
896
- this.isSelectedOther = false;
897
- this.isHaveOtherTag = false;
898
- this.placeholder = "Choose an option";
899
- this.searchPlaceholder = "Search";
900
- this.searchIsOnlyChilds = false;
901
- this.minSearchLength = 2;
902
- this.clearable = false;
903
- this.caption = undefined;
904
- this.noCaption = false;
905
- this.captionType = Bcm$1.Status.default;
906
- this.captionError = undefined;
907
- this.emptyText = undefined;
908
- this.emptyIcon = "fad fa-folder-open";
909
- this.captionCache = undefined;
910
- this.captionTypeCache = undefined;
911
- this.tick = {};
912
- this.totalData = 0;
913
- this.totalRootData = 0;
914
- this.limit = 20;
915
- this.searchGetParents = undefined;
916
- this.searchResultLimit = 20;
917
- this.searchFound = null;
918
- this.returnFilterData = {};
919
- this.returnOtherData = {};
920
- this.options = {
921
- rootMargin: "30px",
922
- };
923
- this.tagContainerWidth = 0;
924
- this.selectAllItem = {
925
- id: "select-all",
926
- text: "Select All",
927
- value: "select-all",
928
- checked: false,
929
- disabled: false,
930
- icon: "",
931
- status: Bcm$1.Status.default,
932
- indeterminate: "uncheck",
933
- };
934
- this.placement = Bcm$1.Placement["bottom-start"];
935
- this.data = [];
936
- }
937
- connectedCallback() {
938
- if (this.height != "256px") {
939
- if (this.height.indexOf("px") > -1) {
940
- this.limit = Math.floor(+this.height.replace("px", "") / 10);
941
- }
942
- else {
943
- this.limit = Math.floor(+(window.innerHeight / 10));
944
- }
945
- this.searchResultLimit = this.limit;
946
- this.markForCheck();
947
- }
948
- const checkElementWithDom = document.querySelectorAll(`#bcm-list-${this._id}`);
949
- (checkElementWithDom === null || checkElementWithDom === void 0 ? void 0 : checkElementWithDom.length) > 1 && checkElementWithDom.forEach((item, index) => index > 0 && item.remove());
950
- }
951
- componentWillRender() {
952
- this.calculateLocation();
953
- }
954
- componentShouldUpdate(newVal, oldVal, propName) {
955
- if (Object.keys(this.getOptions()).indexOf(propName) > -1 && newVal !== oldVal) {
956
- this.updateOptions();
957
- }
958
- }
959
- get containerWidth() {
960
- var _a, _b;
961
- return (_b = (_a = this.el) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect()) === null || _b === void 0 ? void 0 : _b.width;
962
- }
963
- get tagCount() {
964
- return this.containerWidth > 0 ? Math.floor(+(this.containerWidth - 100) / 85) : 0;
965
- }
966
- get tagData() {
967
- return snq(() => {
968
- var _a;
969
- return (_a = this.value) === null || _a === void 0 ? void 0 : _a.map(item => ({
970
- value: item.id,
971
- label: StringHelper.textLimitter(item.text, 7),
972
- text: item.tooltipMessage || item.tagTitle || item.text,
973
- }));
974
- }, []);
975
- }
976
- async componentDidLoad() {
977
- await this.initState();
978
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
979
- const list = this.el.querySelector(`#bcm-list-${this._id}`);
980
- if (list) {
981
- document.body.appendChild(list);
982
- }
983
- }
984
- }
985
- disconnectedCallback() {
986
- this.isOpen = false;
987
- if (this.stopDeepClean)
988
- return;
989
- listState.removeState(this._id);
990
- this.el.innerHTML = "";
991
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
992
- const list = document.querySelectorAll(`#bcm-list-${this._id}`);
993
- if (list === null || list === void 0 ? void 0 : list.length) {
994
- list.forEach(item => item.remove());
995
- this.el.remove();
996
- }
997
- }
998
- }
999
- watchId(_, oldVal) {
1000
- // console.info('Changed component id:', oldVal + ' -> ' + newVal);
1001
- listState.removeState(oldVal);
1002
- this.initState();
1003
- }
1004
- handleValueChange(newVal, oldVal) {
1005
- var _a;
1006
- if (Generate.objectIsEmpty(this.returnFilterData)) {
1007
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1008
- }
1009
- if (this.checkboxes) {
1010
- if (!Validators.compareTwoArrayIsSame(newVal, oldVal)) {
1011
- this.bcmChecklist.emit(this.value);
1012
- this.change.emit(this.value);
1013
- }
1014
- }
1015
- else {
1016
- if ((newVal === null || newVal === void 0 ? void 0 : newVal.id) != (oldVal === null || oldVal === void 0 ? void 0 : oldVal.id)) {
1017
- this.change.emit(this.value);
1018
- }
1019
- }
1020
- }
1021
- watchReturnFilterData(newVal) {
1022
- var _a;
1023
- const { checkedItems, visibledItems } = newVal;
1024
- if (checkedItems && visibledItems) {
1025
- this.handleIndeterminate(checkedItems.length, visibledItems.length);
1026
- }
1027
- else {
1028
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1029
- }
1030
- }
1031
- async handleOpen() {
1032
- if (this.isOpen) {
1033
- this.open.emit();
1034
- this.calculateLocation();
1035
- this.onSelectSearch();
1036
- }
1037
- else {
1038
- this.listScrollToTop();
1039
- this.close.emit();
1040
- await delay(100);
1041
- this.unSelectOther();
1042
- }
1043
- }
1044
- listScrollToTop() {
1045
- const list = document.querySelector(`#bcm-list-${this._id}`);
1046
- if (list) {
1047
- list.querySelector(".scrolling").scrollTop = 0;
1048
- }
1049
- }
1050
- async dataChanged(newValue, oldValue) {
1051
- if (!Validators.compareTwoArrayIsSame(newValue, oldValue)) {
1052
- await this.initState();
1053
- }
1054
- }
1055
- isIntersecting(e) {
1056
- const target = e === null || e === void 0 ? void 0 : e.target;
1057
- if (target && target.id === this._id) {
1058
- this.listenResize();
1059
- }
1060
- }
1061
- handleSlotItems(e) {
1062
- var _a;
1063
- if (((_a = e === null || e === void 0 ? void 0 : e.detail) === null || _a === void 0 ? void 0 : _a.length) > 0) {
1064
- this.data = e.detail;
1065
- }
1066
- }
1067
- handleChange(e) {
1068
- if (e.target.id == `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1069
- e.stopImmediatePropagation();
1070
- }
1071
- }
1072
- handleResize() {
1073
- this.calculateLocation();
1074
- this.debounceHandler();
1075
- }
1076
- handleWheel(event) {
1077
- if (this.isOpen) {
1078
- const list = document.querySelector(`#bcm-list-${this._id}`);
1079
- const isClickInside = list && Generate.findEventPath(event, list);
1080
- if (isClickInside) {
1081
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1082
- this.calculateLocation();
1083
- }
1084
- }
1085
- else {
1086
- this.hide();
1087
- }
1088
- }
1089
- }
1090
- clearAutocomplete() {
1091
- if (this.type == "autocomplete") {
1092
- const autocompleteInput = this.getAutoCompleteInput();
1093
- if (autocompleteInput) {
1094
- autocompleteInput.handleClear(false);
1095
- }
1096
- }
1097
- }
1098
- async handleSelectOtherTag(e) {
1099
- if (this.disabled)
1100
- return;
1101
- const { id, checked } = e.detail;
1102
- this.isSelectedOther = checked;
1103
- if (id) {
1104
- checked ? this.filterOtherList(id) : this.unSelectOther();
1105
- this.isOpen = true;
1106
- }
1107
- }
1108
- async handleDeleteTag(e) {
1109
- var _a;
1110
- if (this.disabled)
1111
- return;
1112
- const { id } = e.detail;
1113
- this.isSelectedOther && this.unSelectOther();
1114
- Array.isArray(id) ? listState.removeOtherTags(this._id, id) : listState.checkedItem(this._id, id);
1115
- this.value = (await this.getCheckedList()).checkedList;
1116
- this.handleIndeterminate(((_a = this.value) === null || _a === void 0 ? void 0 : _a.length) || 0, this.totalData);
1117
- }
1118
- async handleSelectTag(_) {
1119
- if (this.disabled)
1120
- return;
1121
- this.clearAutocomplete();
1122
- this.onSelectSearch();
1123
- this.unSelectOther();
1124
- }
1125
- handleClick(event) {
1126
- var _a;
1127
- if (this.disabled)
1128
- return;
1129
- const list = document.querySelector(`#bcm-list-${this._id}`);
1130
- const isClickInside = Generate.findEventPath(event, this.el) || (list && Generate.findEventPath(event, list));
1131
- if (isClickInside) {
1132
- if (this.debounce !== null) {
1133
- event.preventDefault();
1134
- event.stopPropagation();
1135
- clearTimeout(this.debounce);
1136
- this.debounce = null;
1137
- }
1138
- this.debounce = setTimeout(() => {
1139
- this.debounce = null;
1140
- }, 300);
1141
- }
1142
- if (!isClickInside) {
1143
- if (this.type == "autocomplete") {
1144
- const autocompleteInput = this.getAutoCompleteInput();
1145
- if (autocompleteInput) {
1146
- if (this.checkboxes) {
1147
- autocompleteInput.setValue("");
1148
- }
1149
- else {
1150
- autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
1151
- }
1152
- }
1153
- }
1154
- }
1155
- const clickToTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag"]);
1156
- const clickToOtherTag = Generate.findEventPathWithKey(event, "className", ["bcm-tag bcm-tag--other"]);
1157
- const clickToSelect = Generate.findEventPathWithKey(event, "id", [`bcm-list-input-${this._id}`, `bcm-list-label-${this._id}`]);
1158
- const clickToTagDismiss = Generate.findEventPathWithKey(event, "className", ["right close-button"]);
1159
- if (clickToSelect && !clickToTagDismiss && this.type != "autocomplete") {
1160
- this.isOpen = clickToTag || clickToOtherTag ? true : !this.isOpen;
1161
- }
1162
- if (list) {
1163
- if (this.isOpen) {
1164
- if (!list.contains(event.target) && !this.el.contains(event.target)) {
1165
- this.isOpen = false;
1166
- // this.unSelectOther()
1167
- }
1168
- }
1169
- }
1170
- }
1171
- bcmOnSearchClear(event) {
1172
- var _a, _b;
1173
- if (this.type == "autocomplete") {
1174
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1175
- if (event.detail) {
1176
- this.setClear();
1177
- }
1178
- }
1179
- }
1180
- }
1181
- bcmOnSearch(event) {
1182
- var _a, _b, _c, _d, _e, _f;
1183
- if (((_a = event === null || event === void 0 ? void 0 : event.target) === null || _a === void 0 ? void 0 : _a.id) === `bcm-list-${this._id}-search` || ((_b = event === null || event === void 0 ? void 0 : event.target) === null || _b === void 0 ? void 0 : _b.id) === `bcm-list-input-tag-container-${this._id}-autocomplete-input`) {
1184
- this.searchGetParents = snq(() => { var _a; return (_a = event.detail) === null || _a === void 0 ? void 0 : _a.parentIndex; }, null);
1185
- this.searchResultLimit = 10;
1186
- this.searchFound = ((_c = event.detail) === null || _c === void 0 ? void 0 : _c.matching) != null ? (_d = event.detail) === null || _d === void 0 ? void 0 : _d.matching.length : null;
1187
- this.returnFilterData = listState.filterData(this._id, (_e = event.detail) === null || _e === void 0 ? void 0 : _e.nestedResult);
1188
- if (this.searchFound > 0 && this.highlight) {
1189
- this.highlightText = (_f = event.detail) === null || _f === void 0 ? void 0 : _f.value;
1190
- }
1191
- if (this.type == "autocomplete") {
1192
- this.isOpen = true;
1193
- }
1194
- if (!event.detail.result) {
1195
- if (this.type == "autocomplete") {
1196
- this.isOpen = false;
1197
- }
1198
- else {
1199
- this.returnFilterData = {};
1200
- listState.filterData(this._id, null);
1201
- }
1202
- // this.isSelectedOther = false
1203
- this.searchResultLimit = null;
1204
- this.highlightText = null;
1205
- }
1206
- this.markForCheck();
1207
- }
1208
- }
1209
- //keyboard navigation
1210
- handleKeyDown(ev) {
1211
- const keycode = ev.keyCode || ev.which;
1212
- if (keycode === Bcm$1.KeyCode.escape) {
1213
- if (this.isOpen) {
1214
- this.isOpen = false;
1215
- ev.preventDefault();
1216
- ev.stopPropagation();
1217
- ev.stopImmediatePropagation();
1218
- }
1219
- }
1220
- if (this.keyControl) {
1221
- const keyboard = new ListKeyControl(keycode, this.el, this.treeview, this.checkboxes);
1222
- keyboard.openGroup = openGroupId => {
1223
- this.openGroup(openGroupId);
1224
- };
1225
- keyboard.checkedItem = checkedItemId => {
1226
- this.checkedItem(checkedItemId);
1227
- };
1228
- keyboard.keyDown();
1229
- }
1230
- }
1231
- handleKeyUp(ev) {
1232
- if (this.keyControl) {
1233
- const focusedList = Generate.findEventPath(ev, this.el);
1234
- if (focusedList) {
1235
- const list = document.getElementById(`bcm-list-${this._id}`);
1236
- if (list) {
1237
- const items = list.querySelectorAll(".bcm-list__item.focused");
1238
- if (items.length > 0) {
1239
- const main = list.querySelector("main");
1240
- const itemHeight = items[0].offsetHeight;
1241
- const listHeight = main.offsetHeight;
1242
- const itemTop = items[0].offsetTop;
1243
- if (itemTop > listHeight) {
1244
- main.scrollTop = itemTop - listHeight / 2 + itemHeight / 2;
1245
- }
1246
- if (itemTop < listHeight) {
1247
- main.scrollTop = itemTop - listHeight / 2 - itemHeight / 2;
1248
- }
1249
- }
1250
- }
1251
- }
1252
- }
1253
- }
1254
- async set(data) {
1255
- if (data) {
1256
- if (Array.isArray(data)) {
1257
- this.addChecked(data);
1258
- }
1259
- if (typeof data === "string" || typeof data === "number") {
1260
- this.selectedItem(data);
1261
- }
1262
- }
1263
- else {
1264
- this.setClear();
1265
- }
1266
- }
1267
- async get() {
1268
- var _a, _b;
1269
- return this.value ? (this.checkboxes ? (_b = (_a = ((await this.getCheckedList()))) === null || _a === void 0 ? void 0 : _a.checkedList) === null || _b === void 0 ? void 0 : _b.map(item => item.id) : this.value.id) : null;
1270
- }
1271
- async getCheckedList() {
1272
- return Promise.resolve(listState.getCheckedList(this._id));
1273
- }
1274
- async getSelected() {
1275
- return Promise.resolve(listState.getSelected(this._id));
1276
- }
1277
- async getValue() {
1278
- return Promise.resolve(this.value);
1279
- }
1280
- async addChecked(ids = [], save = false, emit = true) {
1281
- if (ids && ids.length > 0) {
1282
- if (!save) {
1283
- listState.setClear(this._id);
1284
- await delay(10);
1285
- }
1286
- await listState.addChecked(this._id, ids);
1287
- await delay(10);
1288
- emit && (this.value = (await this.getCheckedList()).checkedList);
1289
- this.markForCheck();
1290
- }
1291
- return Promise.resolve(this.value);
1292
- }
1293
- async selected(id) {
1294
- if (id) {
1295
- return Promise.resolve(await this.selectedItem(id));
1296
- }
1297
- return false;
1298
- }
1299
- async setClear(e) {
1300
- listState.setClear(this._id);
1301
- this.value = null;
1302
- this.inputText = "";
1303
- this.isOpen = false;
1304
- this.selectAllItem.indeterminate = "uncheck";
1305
- this.markForCheck();
1306
- if (e) {
1307
- e.stopPropagation();
1308
- e.preventDefault();
1309
- }
1310
- await delay(10);
1311
- return Promise.resolve();
1312
- }
1313
- async resetCaption() {
1314
- await delay(10);
1315
- this.caption = this.captionCache;
1316
- this.captionType = this.captionTypeCache;
1317
- this.captionError = null;
1318
- await delay(10);
1319
- return Promise.resolve();
1320
- }
1321
- async show() {
1322
- this.isOpen = true;
1323
- return Promise.resolve();
1324
- }
1325
- async hide() {
1326
- this.isOpen = false;
1327
- return Promise.resolve();
1328
- }
1329
- updateOptions() {
1330
- listState.updateOptions(this._id, this);
1331
- }
1332
- handleIndeterminate(checkeds, total) {
1333
- this.selectAllItem = Object.assign(Object.assign({}, this.selectAllItem), { indeterminate: this.checkboxes && checkeds > 0 ? (checkeds === total ? "check" : "indeterminate") : "uncheck", checked: this.checkboxes && checkeds > 0 ? (checkeds === total ? true : false) : false });
1334
- }
1335
- listenResize() {
1336
- this.calculateLocation();
1337
- this.markForCheck();
1338
- }
1339
- async unSelectOther() {
1340
- await this.onClearSearch();
1341
- this.isSelectedOther = false;
1342
- this.searchFound = null;
1343
- this.returnFilterData = {};
1344
- listState.filterData(this._id, null);
1345
- await delay(10);
1346
- return Promise.resolve();
1347
- }
1348
- async onClearSearch() {
1349
- const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
1350
- if (searchInput) {
1351
- await searchInput.handleClear();
1352
- }
1353
- return Promise.resolve();
1354
- }
1355
- async onSelectSearch() {
1356
- const searchInput = document.getElementById(`bcm-list-${this._id}-search`);
1357
- if (searchInput) {
1358
- await delay(100);
1359
- searchInput.onBcmFocus();
1360
- searchInput.onBcmSelect();
1361
- }
1362
- }
1363
- async filterOtherList(ids) {
1364
- const checklist = (await this.getCheckedList()).nestedResult;
1365
- const filter = Generate.convertIdsToNestedData(ids, checklist);
1366
- this.returnFilterData = await listState.filterData(this._id, filter, null, true);
1367
- this.searchFound = (ids === null || ids === void 0 ? void 0 : ids.length) || 0;
1368
- this.limit = 500;
1369
- this.searchGetParents = null;
1370
- await delay(1000);
1371
- this.markForCheck();
1372
- }
1373
- async initState() {
1374
- var _a, _b, _c;
1375
- this.onClearSearch();
1376
- await listState.setValue({
1377
- id: this._id,
1378
- dataSource: this.data && snq(() => (typeof this.data == "string" ? JSON.parse(this.data) : this.data), []),
1379
- options: this,
1380
- });
1381
- const { totalRoots, totalItems } = listState.getValue(this._id);
1382
- this.totalData = totalItems;
1383
- this.totalRootData = totalRoots;
1384
- this.value = this.checkboxes ? (await this.getCheckedList()).checkedList : listState.selectedItem(this._id) ? listState.selectedItem(this._id)[0] : null;
1385
- if (!this.checkboxes) {
1386
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
1387
- }
1388
- // checkli olan subparentların indeterminate kontrolü için
1389
- if (this.checkboxes && ((_b = this.value) === null || _b === void 0 ? void 0 : _b.length) > 0) {
1390
- const checkedIDs = [];
1391
- this.value.forEach(item => {
1392
- if (!item.items || item.items.length === 0) {
1393
- checkedIDs.push(item.id);
1394
- }
1395
- });
1396
- await this.addChecked(checkedIDs, false, false);
1397
- }
1398
- await this.handleIndeterminate((_c = this.value) === null || _c === void 0 ? void 0 : _c.length, this.totalData);
1399
- await this.markForCheck();
1400
- }
1401
- async markForCheck() {
1402
- await delay(10);
1403
- this.tick = Generate.UID();
1404
- }
1405
- getOptions() {
1406
- return snq(() => listState.getValue(this._id).options, {});
1407
- }
1408
- getItems() {
1409
- if (this.isSelectedOther) {
1410
- return this.returnFilterData["checkedItems"];
1411
- }
1412
- return snq(() => listState.getData(this._id), []);
1413
- }
1414
- getLimitedItems(ids) {
1415
- return snq(() => listState.getDataPagination(this._id, this.searchResultLimit || this.limit, ids), []);
1416
- }
1417
- openGroup(parentId) {
1418
- listState.openGroup(this._id, parentId);
1419
- this.markForCheck();
1420
- }
1421
- focusItem(e) {
1422
- if (e.target.classList.contains("bcm-list__item")) {
1423
- const item = e.target;
1424
- const list = document.getElementById(`bcm-list-${this._id}`);
1425
- if (list) {
1426
- const items = list.querySelectorAll(".bcm-list__item");
1427
- if (items.length > 0) {
1428
- const selectedItem = list.querySelector(".bcm-list__item.focused");
1429
- if (selectedItem) {
1430
- selectedItem.classList.remove("focused");
1431
- }
1432
- item.classList.add("focused");
1433
- }
1434
- }
1435
- }
1436
- }
1437
- async selectedItem(itemId) {
1438
- var _a;
1439
- if (!this.checkboxes) {
1440
- this.value = listState.selectedItem(this._id, itemId) ? listState.selectedItem(this._id, itemId)[0] : null;
1441
- this.inputText = ((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || null;
1442
- this.isOpen = false;
1443
- this.markForCheck();
1444
- if (this.type == "autocomplete" && this.value) {
1445
- // await delay(100)
1446
- // this.resetCaption()
1447
- const autocompleteInput = this.getAutoCompleteInput();
1448
- if (autocompleteInput) {
1449
- setTimeout(() => {
1450
- var _a;
1451
- autocompleteInput.setValue(((_a = this.value) === null || _a === void 0 ? void 0 : _a.text) || "");
1452
- this.isOpen = false;
1453
- }, 100);
1454
- }
1455
- }
1456
- }
1457
- return Promise.resolve(this.value);
1458
- }
1459
- async checkedItem(itemId) {
1460
- const isCheckSelectAll = itemId === "select-all";
1461
- if (!isCheckSelectAll) {
1462
- listState.checkedItem(this._id, itemId);
1463
- }
1464
- else {
1465
- listState.selectAll(this._id, !this.selectAllItem.checked);
1466
- }
1467
- this.value = (await this.getCheckedList()).checkedList;
1468
- this.changeVisibleCheckeds();
1469
- this.markForCheck();
1470
- }
1471
- changeVisibleCheckeds() {
1472
- const { visibledItems } = this.returnFilterData;
1473
- this.returnFilterData = {
1474
- visibledItems,
1475
- checkedItems: (visibledItems && visibledItems.filter(item => item.checked)) || [],
1476
- };
1477
- }
1478
- getAutoCompleteInput() {
1479
- return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`);
1480
- }
1481
- dataScrollEvent(event) {
1482
- let count = 0;
1483
- let io = new IntersectionObserver((data) => {
1484
- if (count === 0) {
1485
- count++;
1486
- if (data[0].isIntersecting) {
1487
- this.limit += 15;
1488
- this.searchResultLimit += 15;
1489
- io.disconnect();
1490
- io = null;
1491
- }
1492
- }
1493
- }, this.options);
1494
- io.observe(event.target.lastElementChild);
1495
- }
1496
- async calculateLocation() {
1497
- var _a, _b;
1498
- if (this.type == "select" || this.type == "autocomplete" || this.linkedComponent) {
1499
- const list = document.getElementById(`bcm-list-${this._id}`);
1500
- // list && (list.style.height = '256px') //sebebi neydi ki!
1501
- var placement = this.placement;
1502
- const targetElementId = this.linkedComponent ? this.linkedComponent : `bcm-list-input-${this._id}`;
1503
- const targetElement = document.getElementById(targetElementId);
1504
- if (list && targetElement) {
1505
- getPlacement(list, targetElement, placement, (place) => (placement = place));
1506
- await delay(10);
1507
- let pos = setPosition(placement, targetElement);
1508
- let captionAreaHeight = 0;
1509
- let labelAreaHeight = 0;
1510
- if (this.linkedComponent) {
1511
- const linked = document.getElementById(this.linkedComponent);
1512
- if (linked) {
1513
- if (!linked["noCaption"]) {
1514
- const captionArea = ((_a = linked.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".bcm-caption-area")) || linked.querySelector(".bcm-caption-area");
1515
- if (captionArea) {
1516
- captionAreaHeight = captionArea.offsetHeight || captionArea.clientHeight;
1517
- }
1518
- }
1519
- const labelArea = ((_b = linked.shadowRoot) === null || _b === void 0 ? void 0 : _b.querySelector(".bcm-label")) || linked.querySelector(".bcm-label");
1520
- if (labelArea) {
1521
- labelAreaHeight = labelArea.offsetHeight || labelArea.clientHeight;
1522
- }
1523
- }
1524
- }
1525
- if (this.fullWidth) {
1526
- list.style.width = targetElement.offsetWidth + "px";
1527
- }
1528
- else {
1529
- list.style.width = this.width || "auto";
1530
- }
1531
- if (this.height.indexOf("%") > -1) {
1532
- list.style.height = NumberHelper.toNumber(this.height) * 0.01 * window.innerHeight - pos[0] - 50 + "px";
1533
- }
1534
- else {
1535
- list.style.height = this.height;
1536
- }
1537
- list.style.minHeight = this.minHeight;
1538
- // const calculatedMaxHeight = window.innerHeight - pos[0] - 50;
1539
- const calculatedMaxHeight = placement.split("-")[0] == "top" ? window.innerHeight - (window.innerHeight - pos[0]) - 50 : window.innerHeight - pos[0] - 50;
1540
- if (this.maxHeight.indexOf("%") > -1) {
1541
- list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) * 0.01 * calculatedMaxHeight + "px";
1542
- }
1543
- else {
1544
- list.style.maxHeight = NumberHelper.toNumber(this.maxHeight) < calculatedMaxHeight ? this.maxHeight : calculatedMaxHeight + "px";
1545
- }
1546
- getPlacement(list, targetElement, placement, (place) => (placement = place));
1547
- await delay(10);
1548
- pos = setPosition(placement, targetElement);
1549
- list.style.top = (placement.split("-")[0] == "top" ? pos[0] - list.offsetHeight + labelAreaHeight : pos[0] - captionAreaHeight) + "px";
1550
- // list.style.left = pos[1] + 'px';
1551
- list.style.left = placement.split("-")[1] == "end" ? pos[1] - list.offsetWidth + "px" : pos[1] + "px";
1552
- list.classList.toggle("bcm-list--top", placement.split("-")[0] == "top");
1553
- this.calculatedViewport = true;
1554
- }
1555
- }
1556
- }
1557
- render() {
1558
- const { checkboxes, treeview, label, size, disabled, readonly, required, hidden, fullWidth, searchable } = this.getOptions();
1559
- const hostClasses = classnames("bcm-list", `bcm-list__size-${size}`, `bcm-list__${this.type}`, size === "large" ? "size-3" : "size-2", {
1560
- "error": this.captionType == Bcm$1.Status.error,
1561
- "full-width": fullWidth,
1562
- "bcm-list__linked": this.linkedComponent,
1563
- hidden,
1564
- readonly,
1565
- disabled,
1566
- });
1567
- const bcmListContainer = classnames("bcm-list__container", this.linkedComponent ? "bcm-list__type-linked-component" : `bcm-list__type-${this.type}`, {
1568
- "is-open": this.isOpen && this.calculatedViewport,
1569
- "error": this.captionType == Bcm$1.Status.error,
1570
- "full-width": fullWidth,
1571
- hidden,
1572
- readonly,
1573
- disabled,
1574
- });
1575
- const bcmListInput = classnames("bcm-list__input");
1576
- const openedType = this.type == "select" || this.type == "autocomplete" || this.linkedComponent;
1577
- return (h(Host, { class: hostClasses, tabindex: "0", style: {
1578
- "--width": fullWidth ? "100%" : this.width,
1579
- "--height": openedType ? "100%" : this.height,
1580
- "--max-height": openedType ? "inherit" : this.maxHeight,
1581
- "--min-height": openedType ? "inherit" : this.minHeight,
1582
- } }, h("div", { id: `bcm-list-label-${this._id}`, class: "bcm-list__label" }, label && (h("div", null, h(LabelTemplate, { size: this.size, type: this.captionType, value: label, required: required, htmlFor: this._id })))), this.type == "select" && (h("div", { id: `bcm-list-input-${this._id}`, class: bcmListInput }, h("span", { class: classnames("bcm-list__input-container", { "type-single": !checkboxes, "value-empty": !this.value }) }, this.checkboxes ? (this.value && this.value.length > 0 ? (h("bcm-rc-overflow", { data: this.tagData, maxCount: this.tagCount })) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))) : this.value ? (this.inputText) : (h("span", { class: "bcm-list__input-placeholder" }, this.placeholder))), h("span", { class: classnames("bcm-list__input-buttons", {
1583
- disabled: disabled,
1584
- }) }, this.clearable && this.value && (h("div", { class: "bcm-list__input-buttons-button" }, h("bcm-icon", { icon: "fal fa-times", onClick: e => !disabled && this.setClear(e) }))), h("div", { class: `bcm-list__input-buttons-button caret-is ${this.isOpen && this.calculatedViewport && "caret-is-open"}` }, h("bcm-icon", { icon: `far fa-angle-down` }))))), this.type === "autocomplete" && (h("div", { id: `bcm-list-input-${this._id}`, class: classnames(bcmListInput, { "bcm-list__input-autocomplete": this.type == "autocomplete" }) }, h("span", { class: "bcm-list__input-container", id: `bcm-list-input-tag-container-${this._id}` }, this.checkboxes && h("span", { class: "bcm-list__input-tag-container", id: `bcm-list-input-tag-container-${this._id}-autocomplete` }), h("bcm-search", { id: `bcm-list-input-tag-container-${this._id}-autocomplete-input`, class: "bcm-list__autocomplete", data: this.data, clearable: true, "full-width": true, "no-caption": true, placeholder: this.placeholder })))), h(ListTemplate, { highlight: this.highlightText, searchable: this.type == "autocomplete" ? false : searchable, bcmListContainer: bcmListContainer, checkboxes: checkboxes, treeview: treeview, infoFooter: this.infoFooter, value: this.value, totalData: this.totalData, searchFound: this.searchFound, variableText: this.variableText, searchPlaceholder: this.searchPlaceholder, minSearchLength: this.minSearchLength, searchIsOnlyChilds: this.searchIsOnlyChilds, _id: this._id, checkAll: this.checkAll, data: this.getItems(), width: this.width, height: this.height, size: this.size, selectAllItem: this.selectAllItem, onScrollEvent: e => this.dataScrollEvent(e), items: this.getLimitedItems(this.searchGetParents), selectedItem: itemId => this.selectedItem(itemId), checkedItem: itemId => this.checkedItem(itemId), openGroup: parentId => this.openGroup(parentId), focusItem: itemId => this.focusItem(itemId), emptyText: this.emptyText, emptyIcon: this.emptyIcon }), h(CaptionTemplate, { noCaption: this.noCaption, captionType: this.captionType, captionError: this.captionError, caption: this.caption })));
1585
- }
1586
- get el() { return this; }
1587
- static get watchers() { return {
1588
- "_id": ["watchId"],
1589
- "value": ["handleValueChange"],
1590
- "returnFilterData": ["watchReturnFilterData"],
1591
- "isOpen": ["handleOpen"],
1592
- "data": ["dataChanged"]
1593
- }; }
1594
- static get style() { return listCss; }
1595
- }, [0, "bcm-list", {
1596
- "_id": [1537, "id"],
1597
- "type": [1025],
1598
- "treeview": [1028],
1599
- "checkboxes": [1028],
1600
- "searchable": [1028],
1601
- "value": [1032],
1602
- "name": [1025],
1603
- "label": [1025],
1604
- "size": [1025],
1605
- "disabled": [1028],
1606
- "readonly": [1028],
1607
- "highlight": [1028],
1608
- "highlightText": [1032, "highlight-text"],
1609
- "required": [1028],
1610
- "hidden": [1028],
1611
- "fullWidth": [1028, "full-width"],
1612
- "height": [1025],
1613
- "maxHeight": [1025, "max-height"],
1614
- "minHeight": [1025, "min-height"],
1615
- "width": [1025],
1616
- "infoFooter": [1028, "info-footer"],
1617
- "variableText": [1025, "variable-text"],
1618
- "template": [1025],
1619
- "allOpen": [1028, "all-open"],
1620
- "keyControl": [1028, "key-control"],
1621
- "checkAll": [1028, "check-all"],
1622
- "stopDeepClean": [4, "stop-deep-clean"],
1623
- "linkedComponent": [1025, "linked-component"],
1624
- "placeholder": [1025],
1625
- "searchPlaceholder": [1025, "search-placeholder"],
1626
- "searchIsOnlyChilds": [1028, "search-is-only-childs"],
1627
- "minSearchLength": [2, "min-search-length"],
1628
- "clearable": [1028],
1629
- "caption": [1025],
1630
- "noCaption": [1028, "no-caption"],
1631
- "captionType": [1025, "caption-type"],
1632
- "captionError": [1025, "caption-error"],
1633
- "emptyText": [1, "empty-text"],
1634
- "emptyIcon": [1, "empty-icon"],
1635
- "placement": [1025],
1636
- "data": [1032],
1637
- "inputText": [32],
1638
- "isOpen": [32],
1639
- "calculatedViewport": [32],
1640
- "isSelectedOther": [32],
1641
- "isHaveOtherTag": [32],
1642
- "captionCache": [32],
1643
- "captionTypeCache": [32],
1644
- "tick": [32],
1645
- "totalData": [32],
1646
- "totalRootData": [32],
1647
- "limit": [32],
1648
- "searchGetParents": [32],
1649
- "searchResultLimit": [32],
1650
- "searchFound": [32],
1651
- "returnFilterData": [32],
1652
- "returnOtherData": [32],
1653
- "options": [32],
1654
- "tagContainerWidth": [32],
1655
- "selectAllItem": [32],
1656
- "set": [64],
1657
- "get": [64],
1658
- "getCheckedList": [64],
1659
- "getSelected": [64],
1660
- "getValue": [64],
1661
- "addChecked": [64],
1662
- "selected": [64],
1663
- "setClear": [64],
1664
- "resetCaption": [64],
1665
- "show": [64],
1666
- "hide": [64]
1667
- }, [[2, "bcm-is-intersecting", "isIntersecting"], [2, "bcm-items", "handleSlotItems"], [0, "bcm-change", "handleChange"], [9, "resize", "handleResize"], [7, "scroll", "handleWheel"], [4, "wheel", "handleWheel"], [0, "bcm-select-other-tag", "handleSelectOtherTag"], [0, "bcm-delete-tag", "handleDeleteTag"], [0, "bcm-select-tag", "handleSelectTag"], [10, "click", "handleClick"], [10, "bcm-on-search-clear", "bcmOnSearchClear"], [10, "bcm-on-search", "bcmOnSearch"], [10, "keydown", "handleKeyDown"], [10, "keyup", "handleKeyUp"]]]);
1668
- __decorate([
1669
- IsLoad()
1670
- ], BcmList$1.prototype, "el", void 0);
1671
- __decorate([
1672
- JsonParse("data", true)
1673
- ], BcmList$1.prototype, "dataChanged", null);
1674
- function defineCustomElement$1() {
1675
- if (typeof customElements === "undefined") {
1676
- return;
1677
- }
1678
- const components = ["bcm-list", "bcm-icon", "bcm-rc-overflow", "bcm-search", "bcm-tooltip"];
1679
- components.forEach(tagName => { switch (tagName) {
1680
- case "bcm-list":
1681
- if (!customElements.get(tagName)) {
1682
- customElements.define(tagName, BcmList$1);
1683
- }
1684
- break;
1685
- case "bcm-icon":
1686
- if (!customElements.get(tagName)) {
1687
- defineCustomElement$5();
1688
- }
1689
- break;
1690
- case "bcm-rc-overflow":
1691
- if (!customElements.get(tagName)) {
1692
- defineCustomElement$4();
1693
- }
1694
- break;
1695
- case "bcm-search":
1696
- if (!customElements.get(tagName)) {
1697
- defineCustomElement$3();
1698
- }
1699
- break;
1700
- case "bcm-tooltip":
1701
- if (!customElements.get(tagName)) {
1702
- defineCustomElement$2();
1703
- }
1704
- break;
1705
- } });
1706
- }
5
+ import { B as BcmList$1, d as defineCustomElement$1 } from './list.js';
1707
6
 
1708
7
  const BcmList = BcmList$1;
1709
8
  const defineCustomElement = defineCustomElement$1;