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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/p-01c19c5a.entry.js +5 -0
  3. package/dist/bromcom-ui/{p-16450a8b.entry.js → p-0985e7ba.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-424b7562.entry.js → p-10e70228.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-afde516e.entry.js → p-13c47eea.entry.js} +1 -1
  6. package/dist/bromcom-ui/p-140b6ce0.js +5 -0
  7. package/dist/bromcom-ui/{p-6153f889.entry.js → p-18020ef7.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-3f127ea5.entry.js → p-1b9bffba.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-18d28737.entry.js → p-30bfe3bd.entry.js} +1 -1
  10. package/dist/bromcom-ui/{p-c977ed98.entry.js → p-372ffe04.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-643a09b4.entry.js → p-3c87fd88.entry.js} +1 -1
  12. package/dist/bromcom-ui/p-4597ee14.entry.js +5 -0
  13. package/dist/bromcom-ui/p-47682d2b.entry.js +21 -0
  14. package/dist/bromcom-ui/p-4bace961.entry.js +5 -0
  15. package/dist/bromcom-ui/{p-4e436468.entry.js → p-5f419e20.entry.js} +1 -1
  16. package/dist/bromcom-ui/p-6132700e.entry.js +5 -0
  17. package/dist/bromcom-ui/{p-a58b2664.js → p-62840867.js} +1 -1
  18. package/dist/bromcom-ui/p-629bcf93.entry.js +5 -0
  19. package/dist/bromcom-ui/{p-9da1d897.entry.js → p-6a02ed0b.entry.js} +1 -1
  20. package/dist/bromcom-ui/p-6bfed79a.entry.js +5 -0
  21. package/dist/bromcom-ui/{p-9ac757e9.entry.js → p-6d83c8f6.entry.js} +1 -1
  22. package/dist/bromcom-ui/p-6de1c6ea.entry.js +5 -0
  23. package/dist/bromcom-ui/p-71cbd6f6.entry.js +5 -0
  24. package/dist/bromcom-ui/{p-a835bff0.entry.js → p-73d4bd1c.entry.js} +1 -1
  25. package/dist/bromcom-ui/p-7ada3462.entry.js +5 -0
  26. package/dist/bromcom-ui/p-7c0a3a3d.js +5 -0
  27. package/dist/bromcom-ui/{p-aab72ea1.entry.js → p-7d1dd1b9.entry.js} +1 -1
  28. package/dist/bromcom-ui/{p-ec36f5a0.entry.js → p-82331114.entry.js} +1 -1
  29. package/dist/bromcom-ui/p-8301a465.entry.js +5 -0
  30. package/dist/bromcom-ui/p-85565afb.js +5 -0
  31. package/dist/bromcom-ui/{p-073d177e.entry.js → p-88c38780.entry.js} +1 -1
  32. package/dist/bromcom-ui/{p-8c610886.js → p-8dc361a8.js} +1 -1
  33. package/dist/bromcom-ui/{p-79712823.entry.js → p-90510968.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-e2aaaece.js → p-92d1a4c9.js} +1 -1
  35. package/dist/bromcom-ui/{p-edbdd7dd.js → p-9398df85.js} +1 -1
  36. package/dist/bromcom-ui/{p-841f2b60.entry.js → p-9ec71162.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-17eb0140.entry.js → p-9f954c08.entry.js} +1 -1
  38. package/dist/bromcom-ui/p-9fbc30a6.entry.js +5 -0
  39. package/dist/bromcom-ui/{p-fed84581.js → p-a40d4f27.js} +1 -1
  40. package/dist/bromcom-ui/p-a8d23b66.entry.js +5 -0
  41. package/dist/bromcom-ui/p-a953375b.entry.js +5 -0
  42. package/dist/bromcom-ui/p-a95b18f2.entry.js +5 -0
  43. package/dist/bromcom-ui/{p-f077a1d7.entry.js → p-a9c8b43c.entry.js} +1 -1
  44. package/dist/bromcom-ui/p-baf565be.entry.js +5 -0
  45. package/dist/bromcom-ui/{p-5fc49f6f.entry.js → p-bffc5f8c.entry.js} +1 -1
  46. package/dist/bromcom-ui/{p-07e9b5e7.entry.js → p-c80014e3.entry.js} +1 -1
  47. package/dist/bromcom-ui/p-c852c8fe.entry.js +5 -0
  48. package/dist/bromcom-ui/{p-ec992ac3.entry.js → p-ca788dc4.entry.js} +1 -1
  49. package/dist/bromcom-ui/p-ca8a4fc8.entry.js +5 -0
  50. package/dist/bromcom-ui/p-cc6c6f9e.entry.js +5 -0
  51. package/dist/bromcom-ui/p-d283e83e.entry.js +5 -0
  52. package/dist/bromcom-ui/p-dbad3126.entry.js +5 -0
  53. package/dist/bromcom-ui/{p-a1477028.js → p-de2272c5.js} +1 -1
  54. package/dist/bromcom-ui/{p-60a12878.entry.js → p-df444847.entry.js} +1 -1
  55. package/dist/bromcom-ui/p-ee4845ac.entry.js +5 -0
  56. package/dist/bromcom-ui/{p-da5fdda2.entry.js → p-ef829d33.entry.js} +1 -1
  57. package/dist/bromcom-ui/{p-7e2da99e.entry.js → p-f24b096b.entry.js} +1 -1
  58. package/dist/bromcom-ui/{p-8e772077.entry.js → p-f372306f.entry.js} +1 -1
  59. package/dist/bromcom-ui/p-f818d2a9.entry.js +5 -0
  60. package/dist/bromcom-ui/{p-5bf620b2.entry.js → p-f93bf6db.entry.js} +1 -1
  61. package/dist/bromcom-ui/{p-594953e7.entry.js → p-fc18af27.entry.js} +1 -1
  62. package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
  63. package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
  64. package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
  65. package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -5
  66. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
  67. package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
  68. package/dist/cjs/{bcm-button_15.cjs.entry.js → bcm-button_18.cjs.entry.js} +1990 -18
  69. package/dist/cjs/bcm-caption.cjs.entry.js +4 -5
  70. package/dist/cjs/bcm-card.cjs.entry.js +2 -2
  71. package/dist/cjs/bcm-checkbox-group.cjs.entry.js +2 -2
  72. package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
  73. package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -5
  74. package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
  75. package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
  76. package/dist/cjs/bcm-color-input.cjs.entry.js +4 -5
  77. package/dist/cjs/bcm-default.cjs.entry.js +2 -2
  78. package/dist/cjs/bcm-drawer.cjs.entry.js +4 -5
  79. package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
  80. package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
  81. package/dist/cjs/bcm-form-2.cjs.entry.js +2 -2
  82. package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
  83. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -5
  84. package/dist/cjs/bcm-item.cjs.entry.js +2 -2
  85. package/dist/cjs/bcm-items.cjs.entry.js +2 -2
  86. package/dist/cjs/bcm-menu.cjs.entry.js +5 -6
  87. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -5
  88. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -5
  89. package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -5
  90. package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
  91. package/dist/cjs/bcm-number-input.cjs.entry.js +4 -5
  92. package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
  93. package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
  94. package/dist/cjs/bcm-popover.cjs.entry.js +4 -5
  95. package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
  96. package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -5
  97. package/dist/cjs/bcm-radio.cjs.entry.js +4 -5
  98. package/dist/cjs/bcm-range.cjs.entry.js +2 -2
  99. package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -5
  100. package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -5
  101. package/dist/cjs/bcm-step.cjs.entry.js +3 -3
  102. package/dist/cjs/bcm-stepper.cjs.entry.js +5 -6
  103. package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -5
  104. package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -5
  105. package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -5
  106. package/dist/cjs/bcm-table.cjs.entry.js +4 -5
  107. package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
  108. package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
  109. package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
  110. package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
  111. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  112. package/dist/cjs/{generate-c3a6c8c7.js → generate-8f2a5b22.js} +1 -1
  113. package/dist/cjs/{global-9e8b5009.js → global-6e3108be.js} +1 -1
  114. package/dist/cjs/{input-template-8eeb94e7.js → input-template-866a71d3.js} +1 -1
  115. package/dist/cjs/{json-parse-decarator-0932bec0.js → json-parse-decarator-f30bb239.js} +1 -1
  116. package/dist/cjs/loader.cjs.js +3 -3
  117. package/dist/cjs/{number-helper-4e902d31.js → number-helper-57ea679e.js} +1 -1
  118. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
  119. package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
  120. package/dist/cjs/{package-b23f7b7f.js → package-9f43976f.js} +1 -1
  121. package/dist/cjs/{stepper-states-cb2339c3.js → stepper-states-1199c518.js} +1 -1
  122. package/dist/cjs/{tooltip-helper-4ddec3b4.js → tooltip-helper-f55fc832.js} +3 -4
  123. package/dist/cjs/{validators-e2155072.js → validators-463a67ba.js} +6 -1
  124. package/dist/collection/components/atoms/label/label.js +1 -1
  125. package/dist/collection/components/organism/datetime-picker/datetime-picker.css +47 -0
  126. package/dist/collection/components/other_deprecated/old-input/old-input.css +47 -0
  127. package/dist/components/datetime-picker.js +1 -1
  128. package/dist/components/generate.js +1 -1
  129. package/dist/components/label.js +1 -1
  130. package/dist/components/old-input.js +1 -1
  131. package/dist/esm/bcm-accordion.entry.js +2 -2
  132. package/dist/esm/bcm-alert.entry.js +2 -2
  133. package/dist/esm/bcm-attendance.entry.js +2 -2
  134. package/dist/esm/bcm-avatar_2.entry.js +4 -5
  135. package/dist/esm/bcm-breadcrumb.entry.js +2 -2
  136. package/dist/esm/bcm-button-group.entry.js +2 -2
  137. package/dist/esm/{bcm-button_15.entry.js → bcm-button_18.entry.js} +1989 -20
  138. package/dist/esm/bcm-caption.entry.js +4 -5
  139. package/dist/esm/bcm-card.entry.js +2 -2
  140. package/dist/esm/bcm-checkbox-group.entry.js +2 -2
  141. package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
  142. package/dist/esm/bcm-chip-group.entry.js +4 -5
  143. package/dist/esm/bcm-chip.entry.js +2 -2
  144. package/dist/esm/bcm-collapse.entry.js +2 -2
  145. package/dist/esm/bcm-color-input.entry.js +4 -5
  146. package/dist/esm/bcm-default.entry.js +2 -2
  147. package/dist/esm/bcm-drawer.entry.js +4 -5
  148. package/dist/esm/bcm-dropdown.entry.js +3 -3
  149. package/dist/esm/bcm-expansion-panel.entry.js +2 -2
  150. package/dist/esm/bcm-form-2.entry.js +2 -2
  151. package/dist/esm/bcm-input-custom.entry.js +2 -2
  152. package/dist/esm/bcm-input-dropdown.entry.js +4 -5
  153. package/dist/esm/bcm-item.entry.js +2 -2
  154. package/dist/esm/bcm-items.entry.js +2 -2
  155. package/dist/esm/bcm-menu.entry.js +5 -6
  156. package/dist/esm/bcm-modal-2-footer.entry.js +4 -5
  157. package/dist/esm/bcm-modal-2-header.entry.js +4 -5
  158. package/dist/esm/bcm-modal-2.entry.js +4 -5
  159. package/dist/esm/bcm-modal.entry.js +2 -2
  160. package/dist/esm/bcm-number-input.entry.js +4 -5
  161. package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
  162. package/dist/esm/bcm-popconfirm.entry.js +2 -2
  163. package/dist/esm/bcm-popover.entry.js +4 -5
  164. package/dist/esm/bcm-progress.entry.js +2 -2
  165. package/dist/esm/bcm-radio-group.entry.js +4 -5
  166. package/dist/esm/bcm-radio.entry.js +4 -5
  167. package/dist/esm/bcm-range.entry.js +2 -2
  168. package/dist/esm/bcm-shortcut.entry.js +4 -5
  169. package/dist/esm/bcm-skeleton.entry.js +4 -5
  170. package/dist/esm/bcm-step.entry.js +3 -3
  171. package/dist/esm/bcm-stepper.entry.js +5 -6
  172. package/dist/esm/bcm-tab-group.entry.js +4 -5
  173. package/dist/esm/bcm-tab-item-header.entry.js +4 -5
  174. package/dist/esm/bcm-tab-item.entry.js +4 -5
  175. package/dist/esm/bcm-table.entry.js +4 -5
  176. package/dist/esm/bcm-tag.entry.js +3 -3
  177. package/dist/esm/bcm-textarea.entry.js +3 -3
  178. package/dist/esm/bcm-time-picker.entry.js +2 -2
  179. package/dist/esm/bcm-toast.entry.js +2 -2
  180. package/dist/esm/bromcom-ui.js +3 -3
  181. package/dist/esm/{generate-80f589b2.js → generate-c1065765.js} +1 -1
  182. package/dist/esm/{global-9afe304c.js → global-6365ce83.js} +1 -1
  183. package/dist/esm/{input-template-a5d07ba6.js → input-template-74229cd2.js} +1 -1
  184. package/dist/esm/{json-parse-decarator-5195f510.js → json-parse-decarator-a301c8b7.js} +1 -1
  185. package/dist/esm/loader.js +3 -3
  186. package/dist/esm/{number-helper-aeb5881f.js → number-helper-d42f27d5.js} +1 -1
  187. package/dist/esm/old-bcm-popover-box.entry.js +3 -3
  188. package/dist/esm/old-bcm-popover.entry.js +2 -2
  189. package/dist/esm/{package-5e39e390.js → package-5c7049c1.js} +1 -1
  190. package/dist/esm/{stepper-states-97a648ff.js → stepper-states-39645921.js} +1 -1
  191. package/dist/esm/{tooltip-helper-d339c58a.js → tooltip-helper-61f3e8cb.js} +3 -4
  192. package/dist/esm/{validators-b5e106d5.js → validators-3881959b.js} +6 -2
  193. package/package.json +1 -1
  194. package/dist/bromcom-ui/p-0fc73cca.entry.js +0 -5
  195. package/dist/bromcom-ui/p-175eb1c7.entry.js +0 -5
  196. package/dist/bromcom-ui/p-17c0a72a.entry.js +0 -5
  197. package/dist/bromcom-ui/p-1f5ca41b.entry.js +0 -5
  198. package/dist/bromcom-ui/p-21cb3cfe.entry.js +0 -5
  199. package/dist/bromcom-ui/p-23eb79ac.entry.js +0 -5
  200. package/dist/bromcom-ui/p-2d965b60.entry.js +0 -5
  201. package/dist/bromcom-ui/p-32d93221.entry.js +0 -21
  202. package/dist/bromcom-ui/p-33513345.entry.js +0 -5
  203. package/dist/bromcom-ui/p-3b5c36e8.entry.js +0 -5
  204. package/dist/bromcom-ui/p-40b85b9b.entry.js +0 -5
  205. package/dist/bromcom-ui/p-43a1f84c.entry.js +0 -5
  206. package/dist/bromcom-ui/p-52b7fc24.js +0 -5
  207. package/dist/bromcom-ui/p-56187d14.entry.js +0 -5
  208. package/dist/bromcom-ui/p-58d5775f.entry.js +0 -5
  209. package/dist/bromcom-ui/p-5b96272e.entry.js +0 -5
  210. package/dist/bromcom-ui/p-61314a43.js +0 -5
  211. package/dist/bromcom-ui/p-626a65e9.js +0 -5
  212. package/dist/bromcom-ui/p-64999c43.entry.js +0 -5
  213. package/dist/bromcom-ui/p-8c3a6509.entry.js +0 -5
  214. package/dist/bromcom-ui/p-8fbdb72f.entry.js +0 -5
  215. package/dist/bromcom-ui/p-910c935f.entry.js +0 -5
  216. package/dist/bromcom-ui/p-9f1e6daa.entry.js +0 -5
  217. package/dist/bromcom-ui/p-a889681e.entry.js +0 -5
  218. package/dist/bromcom-ui/p-cfd52d5f.entry.js +0 -5
  219. package/dist/bromcom-ui/p-e19a8e73.entry.js +0 -5
  220. package/dist/bromcom-ui/p-e6faa2bb.entry.js +0 -5
  221. package/dist/bromcom-ui/p-ecd8d70f.entry.js +0 -5
  222. package/dist/bromcom-ui/p-f2776268.entry.js +0 -5
  223. package/dist/bromcom-ui/p-f83b3048.js +0 -5
  224. package/dist/cjs/bcm-date-picker.cjs.entry.js +0 -182
  225. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +0 -1450
  226. package/dist/cjs/bcm-old-input.cjs.entry.js +0 -397
  227. package/dist/cjs/datetime-helper-eaf4fadb.js +0 -11
  228. package/dist/esm/bcm-date-picker.entry.js +0 -178
  229. package/dist/esm/bcm-datetime-picker.entry.js +0 -1446
  230. package/dist/esm/bcm-old-input.entry.js +0 -393
  231. package/dist/esm/datetime-helper-df25808a.js +0 -9
@@ -7,7 +7,7 @@
7
7
  Object.defineProperty(exports, '__esModule', { value: true });
8
8
 
9
9
  const index$2 = require('./index-c591ecec.js');
10
- const generate = require('./generate-c3a6c8c7.js');
10
+ const generate = require('./generate-8f2a5b22.js');
11
11
  const bcm = require('./bcm-3c58a6d5.js');
12
12
  const index$3 = require('./index-95ae50d0.js');
13
13
  const index$1 = require('./index-d321de96.js');
@@ -17,20 +17,19 @@ const captionTemplate = require('./caption-template-6f535b93.js');
17
17
  const utils = require('./utils-fc077139.js');
18
18
  const isLoadDecorator = require('./is-load-decorator-15036f37.js');
19
19
  const _commonjsHelpers = require('./_commonjsHelpers-ed84c3ca.js');
20
- require('./datetime-helper-eaf4fadb.js');
21
- const numberHelper = require('./number-helper-4e902d31.js');
20
+ const validators = require('./validators-463a67ba.js');
21
+ const numberHelper = require('./number-helper-57ea679e.js');
22
22
  const stringHelper = require('./string-helper-3212f4ea.js');
23
- const validators = require('./validators-e2155072.js');
24
- require('./element-dragger-a8562f82.js');
23
+ const elementDragger = require('./element-dragger-a8562f82.js');
25
24
  require('./types-cc4adee7.js');
26
25
  require('./types-7523fd99.js');
27
- const inputTemplate = require('./input-template-8eeb94e7.js');
26
+ const popoverPlacement = require('./popover-placement-9b4b4153.js');
28
27
  const labelTemplate = require('./label-template-a6f51ef2.js');
28
+ const inputTemplate = require('./input-template-866a71d3.js');
29
29
  const floatingUi = require('./floating-ui-555cd3d4.js');
30
- const jsonParseDecarator = require('./json-parse-decarator-0932bec0.js');
31
- const popoverPlacement = require('./popover-placement-9b4b4153.js');
32
- const tooltipHelper = require('./tooltip-helper-4ddec3b4.js');
33
- require('./package-b23f7b7f.js');
30
+ const jsonParseDecarator = require('./json-parse-decarator-f30bb239.js');
31
+ const tooltipHelper = require('./tooltip-helper-f55fc832.js');
32
+ require('./package-9f43976f.js');
34
33
  require('./colors-078851ec.js');
35
34
  require('./colors-56282b00.js');
36
35
 
@@ -385,7 +384,7 @@ BcmButton.style = buttonCss;
385
384
 
386
385
  const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-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}";
387
386
 
388
- var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
387
+ var __decorate$8 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
389
388
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
390
389
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
391
390
  r = Reflect.decorate(decorators, target, key, desc);
@@ -537,7 +536,7 @@ const BcmCheckbox = class {
537
536
  "checked": ["watchChecked"]
538
537
  }; }
539
538
  };
540
- __decorate$6([
539
+ __decorate$8([
541
540
  isLoadDecorator.IsLoad()
542
541
  ], BcmCheckbox.prototype, "el", void 0);
543
542
  BcmCheckbox.style = checkboxCss;
@@ -773,8 +772,8 @@ var Wc={},Yc=new Map,Zc=new Map,$c=["abort","abort",Xb,"animationEnd",Yb,"animat
773
772
  "seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",$b,"transitionEnd","waiting","waiting"];function ad(a,b){for(var c=0;c<a.length;c+=2){var d=a[c],e=a[c+1],f="on"+(e[0].toUpperCase()+e.slice(1));f={phasedRegistrationNames:{bubbled:f,captured:f+"Capture"},dependencies:[d],eventPriority:b};Zc.set(d,b);Yc.set(d,f);Wc[e]=f;}}
774
773
  ad("blur blur cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focus focus input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0);
775
774
  ad("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1);ad($c,2);for(var bd="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),cd=0;cd<bd.length;cd++)Zc.set(bd[cd],0);
776
- var dd=scheduler.unstable_UserBlockingPriority,ed=scheduler.unstable_runWithPriority,fd=!0;function F$1(a,b){vc(b,a,!1);}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id.bind(null,b,1,a);}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1);}function gd(a,b,c,d){Ja||Ha();var e=id,f=Ja;Ja=!0;try{Ga(e,a,b,c,d);}finally{(Ja=f)||La();}}function hd(a,b,c,d){ed(dd,id.bind(null,a,b,c,d));}
777
- function id(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else {var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a);}finally{qc(a);}}}}
775
+ var dd=scheduler.unstable_UserBlockingPriority,ed=scheduler.unstable_runWithPriority,fd=!0;function F$1(a,b){vc(b,a,!1);}function vc(a,b,c){var d=Zc.get(b);switch(void 0===d?2:d){case 0:d=gd.bind(null,b,1,a);break;case 1:d=hd.bind(null,b,1,a);break;default:d=id$1.bind(null,b,1,a);}c?a.addEventListener(b,d,!0):a.addEventListener(b,d,!1);}function gd(a,b,c,d){Ja||Ha();var e=id$1,f=Ja;Ja=!0;try{Ga(e,a,b,c,d);}finally{(Ja=f)||La();}}function hd(a,b,c,d){ed(dd,id$1.bind(null,a,b,c,d));}
776
+ function id$1(a,b,c,d){if(fd)if(0<Ac.length&&-1<Hc.indexOf(a))a=Kc(null,a,b,c,d),Ac.push(a);else {var e=Rc(a,b,c,d);if(null===e)Lc(a,d);else if(-1<Hc.indexOf(a))a=Kc(e,a,b,c,d),Ac.push(a);else if(!Oc(e,a,b,c,d)){Lc(a,d);a=rc(a,d,null,b);try{Ma(sc,a);}finally{qc(a);}}}}
778
777
  function Rc(a,b,c,d){c=nc(d);c=tc(c);if(null!==c){var e=dc(c);if(null===e)c=null;else {var f=e.tag;if(13===f){c=ec(e);if(null!==c)return c;c=null;}else if(3===f){if(e.stateNode.hydrate)return 3===e.tag?e.stateNode.containerInfo:null;c=null;}else e!==c&&(c=null);}}a=rc(a,d,c,b);try{Ma(sc,a);}finally{qc(a);}return null}
779
778
  var jd={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,
780
779
  floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},kd=["Webkit","ms","Moz","O"];Object.keys(jd).forEach(function(a){kd.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);jd[b]=jd[a];});});function ld(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||jd.hasOwnProperty(a)&&jd[a]?(""+b).trim():b+"px"}
@@ -992,7 +991,7 @@ function gk(a){return !(!a||1!==a.nodeType&&9!==a.nodeType&&11!==a.nodeType&&(8!
992
991
  function ik(a,b,c,d,e){var f=c._reactRootContainer;if(f){var g=f._internalRoot;if("function"===typeof e){var h=e;e=function(){var a=ck(g);h.call(a);};}bk(b,g,a,e);}else {f=c._reactRootContainer=hk(c,d);g=f._internalRoot;if("function"===typeof e){var k=e;e=function(){var a=ck(g);k.call(a);};}Nj(function(){bk(b,g,a,e);});}return ck(g)}function jk(a,b,c){var d=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return {$$typeof:$a,key:null==d?null:""+d,children:a,containerInfo:b,implementation:c}}
993
992
  wc=function(a){if(13===a.tag){var b=hg(Gg(),150,100);Ig(a,b);ek(a,b);}};xc=function(a){13===a.tag&&(Ig(a,3),ek(a,3));};yc=function(a){if(13===a.tag){var b=Gg();b=Hg(b,a,null);Ig(a,b);ek(a,b);}};
994
993
  za=function(a,b,c){switch(b){case "input":Cb(a,c);b=c.name;if("radio"===c.type&&null!=b){for(c=a;c.parentNode;)c=c.parentNode;c=c.querySelectorAll("input[name="+JSON.stringify(""+b)+'][type="radio"]');for(b=0;b<c.length;b++){var d=c[b];if(d!==a&&d.form===a.form){var e=Qd(d);if(!e)throw Error(u$1(90));yb(d);Cb(d,e);}}}break;case "textarea":Kb(a,c);break;case "select":b=c.value,null!=b&&Hb(a,!!c.multiple,b,!1);}};Fa=Mj;
995
- Ga=function(a,b,c,d,e){var f=W$1;W$1|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W$1=f,W$1===V$1&&gg();}};Ha=function(){(W$1&(1|fj|gj))===V$1&&(Lj(),Dj());};Ia=function(a,b){var c=W$1;W$1|=2;try{return a(b)}finally{W$1=c,W$1===V$1&&gg();}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u$1(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd);},Da,Ea,id,mc,Dj,{current:!1}]};
994
+ Ga=function(a,b,c,d,e){var f=W$1;W$1|=4;try{return cg(98,a.bind(null,b,c,d,e))}finally{W$1=f,W$1===V$1&&gg();}};Ha=function(){(W$1&(1|fj|gj))===V$1&&(Lj(),Dj());};Ia=function(a,b){var c=W$1;W$1|=2;try{return a(b)}finally{W$1=c,W$1===V$1&&gg();}};function kk(a,b){var c=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!gk(b))throw Error(u$1(200));return jk(a,b,null,c)}var lk={Events:[Nc,Pd,Qd,xa,ta,Xd,function(a){jc(a,Wd);},Da,Ea,id$1,mc,Dj,{current:!1}]};
996
995
  (function(a){var b=a.findFiberByHostInstance;return Yj(objectAssign({},a,{overrideHookState:null,overrideProps:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wa.ReactCurrentDispatcher,findHostInstanceByFiber:function(a){a=hc(a);return null===a?null:a.stateNode},findFiberByHostInstance:function(a){return b?b(a):null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null}))})({findFiberByHostInstance:tc,bundleType:0,version:"16.14.0",
997
996
  rendererPackageName:"react-dom"});var __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lk;var createPortal=kk;var findDOMNode$1=function(a){if(null==a)return null;if(1===a.nodeType)return a;var b=a._reactInternalFiber;if(void 0===b){if("function"===typeof a.render)throw Error(u$1(188));throw Error(u$1(268,Object.keys(a)));}a=hc(b);a=null===a?null:a.stateNode;return a};
998
997
  var flushSync=function(a,b){if((W$1&(fj|gj))!==V$1)throw Error(u$1(187));var c=W$1;W$1|=1;try{return cg(99,a.bind(null,b))}finally{W$1=c,gg();}};var hydrate=function(a,b,c){if(!gk(b))throw Error(u$1(200));return ik(null,a,b,!0,c)};var render=function(a,b,c){if(!gk(b))throw Error(u$1(200));return ik(null,a,b,!1,c)};
@@ -23046,7 +23045,7 @@ const moment$1 = /*#__PURE__*/Object.freeze({
23046
23045
  'default': hooks
23047
23046
  });
23048
23047
 
23049
- var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23048
+ var __decorate$7 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23050
23049
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23051
23050
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
23052
23051
  r = Reflect.decorate(decorators, target, key, desc);
@@ -23194,10 +23193,1598 @@ const BcmDate = class {
23194
23193
  }
23195
23194
  get el() { return index$2.getElement(this); }
23196
23195
  };
23197
- __decorate$5([
23196
+ __decorate$7([
23198
23197
  isLoadDecorator.IsLoad()
23199
23198
  ], BcmDate.prototype, "el", void 0);
23200
23199
 
23200
+ const datePickerCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:inline-flex;width:100%;max-width:256px}:host(.full-width){max-width:100%}:host(.hidden){display:none}:host(.linked-component){display:none}";
23201
+
23202
+ var __decorate$6 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23203
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23204
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
23205
+ r = Reflect.decorate(decorators, target, key, desc);
23206
+ else
23207
+ for (var i = decorators.length - 1; i >= 0; i--)
23208
+ if (d = decorators[i])
23209
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23210
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23211
+ };
23212
+ const BcmDatePicker = class {
23213
+ constructor(hostRef) {
23214
+ index$2.registerInstance(this, hostRef);
23215
+ this._id = generate.Generate.UID();
23216
+ this.date = new Date();
23217
+ this.value = undefined;
23218
+ this.endDate = null;
23219
+ this.range = false;
23220
+ this.hidden = false;
23221
+ this.name = undefined;
23222
+ this.fullWidth = false;
23223
+ this.required = false;
23224
+ this.label = undefined;
23225
+ this.placeholder = undefined;
23226
+ this.disabledDates = '';
23227
+ this.disabled = false;
23228
+ this.noMargin = false;
23229
+ this.noCaption = false;
23230
+ this.caption = '';
23231
+ this.captionError = undefined;
23232
+ this.captionType = 'default';
23233
+ this.alignment = undefined;
23234
+ this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
23235
+ this.placement = bcm.Bcm.Placement['bottom-start'];
23236
+ this.linkedComponent = undefined;
23237
+ this.clearable = false;
23238
+ this.stateStartDate = null;
23239
+ this.stateEndDate = null;
23240
+ }
23241
+ handleStartDateChange() {
23242
+ this.handleDate();
23243
+ }
23244
+ handleEndDateChange() {
23245
+ this.handleDate();
23246
+ }
23247
+ /**
23248
+ * @desc
23249
+ */
23250
+ handlePickerLoad() {
23251
+ this.value = this.picker.value;
23252
+ }
23253
+ /**
23254
+ * @desc
23255
+ * @param event
23256
+ */
23257
+ handlePickerChange(event) {
23258
+ this.value = event.detail;
23259
+ }
23260
+ /**
23261
+ * @desc
23262
+ * @param value
23263
+ */
23264
+ async set(value) {
23265
+ return this.picker.set(value);
23266
+ }
23267
+ async get() {
23268
+ var _a;
23269
+ return ((_a = this.value) === null || _a === void 0 ? void 0 : _a.timestamp) || null;
23270
+ }
23271
+ /**
23272
+ * @desc
23273
+ * @param disabled
23274
+ */
23275
+ async setDisabled(disabled) {
23276
+ this.disabled = disabled;
23277
+ }
23278
+ async setClear() {
23279
+ await this.picker.setClear();
23280
+ await utils.delay(10);
23281
+ return Promise.resolve();
23282
+ }
23283
+ async setStartDate(dateOrTime) {
23284
+ if (dateOrTime) {
23285
+ dateOrTime = validators.DateTimeHelper.convertTimeStampToDate(new Date(dateOrTime).getTime());
23286
+ this.stateStartDate = dateOrTime;
23287
+ }
23288
+ else {
23289
+ this.setClear();
23290
+ }
23291
+ }
23292
+ async setEndDate(dateOrTime) {
23293
+ if (dateOrTime) {
23294
+ dateOrTime = validators.DateTimeHelper.convertTimeStampToDate(new Date(dateOrTime).getTime());
23295
+ this.stateEndDate = dateOrTime;
23296
+ }
23297
+ else {
23298
+ this.setClear();
23299
+ }
23300
+ }
23301
+ /* mp --- */
23302
+ handleDate() {
23303
+ if (this.range) {
23304
+ if (this.stateStartDate && this.stateEndDate) {
23305
+ this.set(this.stateStartDate + '-' + this.stateEndDate);
23306
+ }
23307
+ }
23308
+ else {
23309
+ this.set(this.stateStartDate);
23310
+ }
23311
+ }
23312
+ /**
23313
+ * @desc
23314
+ */
23315
+ async getInput() {
23316
+ return await this.picker.getInput();
23317
+ }
23318
+ /**
23319
+ * @desc
23320
+ */
23321
+ async open() {
23322
+ return await this.picker.open();
23323
+ }
23324
+ /**
23325
+ * @desc
23326
+ */
23327
+ async getValue() {
23328
+ return this.value;
23329
+ }
23330
+ /**
23331
+ * @desc
23332
+ */
23333
+ async isValid() {
23334
+ return await this.picker.isValid();
23335
+ }
23336
+ async resetCaption() {
23337
+ await utils.delay(10);
23338
+ await this.picker.resetCaption();
23339
+ this.captionType = 'default';
23340
+ this.captionError = null;
23341
+ await utils.delay(10);
23342
+ return Promise.resolve();
23343
+ }
23344
+ render() {
23345
+ const hostClasses = index$3.classnames(this.hidden ? 'hidden' : null, {
23346
+ 'full-width': this.fullWidth,
23347
+ 'linked-component': this.linkedComponent,
23348
+ });
23349
+ return (index$2.h(index$2.Host, { class: hostClasses }, index$2.h("bcm-datetime-picker", { "linked-component": this.linkedComponent, id: this._id, name: this.name, type: this.range ? 'range' : 'date', date: this.date, placeholder: this.placeholder, fullWidth: this.fullWidth, ref: el => (this.picker = el), required: this.required, clearable: this.clearable, label: this.label, "end-date": this.endDate, disabled: this.disabled, disabledDates: this.disabledDates, "on-bcm-load": () => this.handlePickerLoad(), "on-bcm-change": (e) => this.handlePickerChange(e), noCaption: this.noCaption, caption: this.caption, captionError: this.captionError, captionType: this.captionType, alignment: this.alignment, placement: this.placement, noMargin: this.noMargin })));
23350
+ }
23351
+ get el() { return index$2.getElement(this); }
23352
+ static get watchers() { return {
23353
+ "stateStartDate": ["handleStartDateChange"],
23354
+ "stateEndDate": ["handleEndDateChange"]
23355
+ }; }
23356
+ };
23357
+ __decorate$6([
23358
+ isLoadDecorator.IsLoad()
23359
+ ], BcmDatePicker.prototype, "el", void 0);
23360
+ BcmDatePicker.style = datePickerCss;
23361
+
23362
+ var Months;
23363
+ (function (Months) {
23364
+ Months["january"] = "january";
23365
+ Months["february"] = "february";
23366
+ Months["march"] = "march";
23367
+ Months["april"] = "april";
23368
+ Months["may"] = "may";
23369
+ Months["june"] = "june";
23370
+ Months["july"] = "july";
23371
+ Months["august"] = "august";
23372
+ Months["september"] = "september";
23373
+ Months["october"] = "october";
23374
+ Months["november"] = "november";
23375
+ Months["december"] = "december";
23376
+ })(Months || (Months = {}));
23377
+ var Days;
23378
+ (function (Days) {
23379
+ Days["sunday"] = "sunday";
23380
+ Days["monday"] = "monday";
23381
+ Days["tuesday"] = "tuesday";
23382
+ Days["wednesday"] = "wednesday";
23383
+ Days["thursday"] = "thursday";
23384
+ Days["friday"] = "friday";
23385
+ Days["saturday"] = "saturday";
23386
+ })(Days || (Days = {}));
23387
+ /**
23388
+ * 'type' prop predefined values
23389
+ */
23390
+ var Types;
23391
+ (function (Types) {
23392
+ Types["datetime"] = "datetime";
23393
+ Types["range"] = "range";
23394
+ Types["date"] = "date";
23395
+ Types["time"] = "time";
23396
+ })(Types || (Types = {}));
23397
+
23398
+ const datetimePickerCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}:host{display:inline-flex;flex-direction:column;position:relative;width:100%;max-width:256px;margin:0;margin-bottom:8px}:host(.full-width){max-width:100%}:host(.no-margin){margin:0}:host(.hidden){display:none}:host(.linked-component){display:none}.toggle{cursor:pointer}.toggle.disabled{cursor:not-allowed}.modules{display:flex}.picker-label{user-select:none;line-height:1}.datetime-picker{position:absolute;top:-1000px;display:inline-flex;flex-direction:column;box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);opacity:0;visibility:hidden;transition:transform 0.2s ease, opacity 0.3s ease;transform:scale(0.8) translateY(-100px);background-color:#ffffff;min-height:356px;max-height:356px;box-sizing:border-box;z-index:-1000}.datetime-picker.alignment-left{left:0}.datetime-picker.alignment-right{right:0}.datetime-picker.open{top:calc(100% - 28px);z-index:10000;opacity:1;visibility:visible;transform:scale(1) translateY(0)}.datetime-picker.open.no-caption{top:100%}.actions{display:flex;align-items:center;justify-content:space-between;padding:8px;margin-top:auto;border-top:1px solid var(--bcm-color-grey-6)}.actions .current-date{font-size:14px;line-height:22px;color:var(--bcm-color-prime-blue-6);text-transform:capitalize}.date-container+.time-container{border-left:1px solid #cecece}.time-container{width:185px}.time-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.time-container .bcm-datetime-picker__header .now{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.time-container .bcm-datetime-picker__content{position:relative;display:flex}.time-container .hours,.time-container .minutes,.time-container .time-period{position:relative;flex:1 1 100%;max-width:100%;height:280px;overflow:hidden}.time-container .hours .items>span,.time-container .minutes .items>span,.time-container .time-period .items>span{font-size:14px;color:var(--bcm-color-grey-8)}.time-container .hours .items>span.selected,.time-container .minutes .items>span.selected,.time-container .time-period .items>span.selected{color:var(--bcm-color-prime-blue-6)}.date-container{width:364px;}.date-container .bcm-datetime-picker__header{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;max-height:60px;border-bottom:1px solid var(--bcm-color-grey-4)}.date-container .bcm-datetime-picker__header .month-year-wrapper{display:flex;align-items:center;justify-content:center;margin:0 4px;min-width:125px}.date-container .bcm-datetime-picker__header .month-year{font-size:16px;line-height:24px}.date-container .bcm-datetime-picker__header .month-year{display:flex;align-items:center}.date-container .bcm-datetime-picker__header .month-year button{display:flex;align-items:center;box-shadow:none;background:transparent;outline:none;appearance:none;border:none;color:var(--bcm-color-prime-blue-6);cursor:pointer}.date-container .bcm-datetime-picker__header .month{text-transform:capitalize}.date-container .bcm-datetime-picker__header .year{padding-left:4px}.date-container .bcm-datetime-picker__header .today{font-size:14px;line-height:22px;cursor:pointer;color:var(--bcm-color-prime-blue-6);user-select:none}.date-container .bcm-datetime-picker__content{display:flex}.date-container .years{position:relative;flex:0 0 70px;max-width:70px;height:280px;overflow:hidden;background-color:var(--bcm-color-grey-2)}.date-container .days{width:100%}.date-container .day-numbers,.date-container .day-labels{display:grid;grid-template-columns:repeat(7, 1fr)}.date-container .day-numbers{padding:24px 24px}.date-container .day-numbers>span,.date-container .day-labels span{text-align:center}.date-container .day-numbers>span{position:relative;padding-bottom:100%;cursor:pointer}.date-container .day-numbers>span.not-this-month{color:var(--bcm-color-grey-4)}.date-container .day-numbers>span.is-weekend{color:var(--bcm-color-prime-blue-3)}.date-container .day-numbers>span.is-disabled-date:not(.today){color:var(--bcm-color-grey-4);cursor:not-allowed}.date-container .day-numbers>span.is-disabled-date:not(.today):before{opacity:0 !important}.date-container .day-numbers>span.today{color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.today:before{opacity:1;background-color:var(--bcm-color-prime-blue-2);border:1px solid var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.selected-start{background:linear-gradient(90deg, white 50%, #8abde2 50%) !important}.date-container .day-numbers>span.selected-end{background:linear-gradient(90deg, #8abde2 50%, white 50%) !important}.date-container .day-numbers>span.range{background:#8abde2}.date-container .day-numbers>span.range:not(.today){color:#ffffff}.date-container .day-numbers>span.range:not(.today):before{background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers>span.range.is-weekend:not(.today){color:var(--bcm-color-prime-blue-2)}.date-container .day-numbers>span.selected,.date-container .day-numbers>span.selected-end{color:#ffffff}.date-container .day-numbers>span.selected:before,.date-container .day-numbers>span.selected-end:before{opacity:1;background-color:var(--bcm-color-prime-blue-6)}.date-container .day-numbers.start-1>span:first-child{grid-column:1}.date-container .day-numbers.start-2>span:first-child{grid-column:2}.date-container .day-numbers.start-3>span:first-child{grid-column:3}.date-container .day-numbers.start-4>span:first-child{grid-column:4}.date-container .day-numbers.start-5>span:first-child{grid-column:5}.date-container .day-numbers.start-6>span:first-child{grid-column:6}.date-container .day-numbers.start-7>span:first-child{grid-column:7}.date-container .day-numbers>span:before{content:\"\";position:absolute;top:0;left:0;width:100%;height:100%;border-radius:50%;background-color:var(--bcm-color-grey-4);opacity:0;box-sizing:border-box}.date-container .day-numbers>span:hover.not-this-month:not(.is-weekend){color:var(--bcm-color-grey-6)}.date-container .day-numbers>span:hover:before{opacity:1}.date-container .day-numbers .number{position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.date-container .day-labels{padding:24px 40px 0 40px}.date-container .day-labels span{font-size:12px;color:var(--bcm-color-grey-6)}.date-container .day-labels span:nth-child(7n+6),.date-container .day-labels span:nth-child(7n+7){color:var(--bcm-color-prime-blue-3)}.years .items,.hours .items,.minutes .items,.time-period .items{position:relative;display:flex;flex-direction:column;z-index:0;transform:translateY(0);scroll-behavior:smooth}.years .items>span,.hours .items>span,.minutes .items>span,.time-period .items>span{text-align:center;font-size:12px;min-height:26px;max-height:26px;line-height:26px;color:var(--bcm-color-grey-8);user-select:none}.years:before,.years:after,.hours:before,.hours:after,.minutes:before,.minutes:after,.time-period:before,.time-period:after{content:\"\";position:absolute;left:0;width:100%;height:40px}.years:before,.hours:before,.minutes:before,.time-period:before{top:-40px;box-shadow:0 10px 100px 70px #ffffff;z-index:1}.years:after,.hours:after,.minutes:after,.time-period:after{bottom:-40px;box-shadow:0 -10px 100px 70px #ffffff;z-index:2}.select-strip{position:absolute;width:100%;top:50%;left:0;transform:translateY(-50%);min-height:26px;max-height:26px;border:1px solid var(--bcm-color-grey-5);border-left:0;border-right:0;pointer-events:none;box-sizing:border-box}.bcm-label{font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:4px;font-weight:500;color:#475569}.bcm-label.tw-text-1{font-size:10px;line-height:18px}.bcm-label.tw-text-2{font-size:12px;line-height:20px}.bcm-label.tw-text-3{font-size:14px;line-height:22px}.bcm-caption-area{color:#dc2626;font-weight:400;justify-content:space-between;align-items:flex-start;flex-direction:row;min-height:20px;display:flex;margin-top:4px;font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bcm-caption-area.tw-text-1{font-size:10px;line-height:18px}.bcm-caption-area.tw-text-2{font-size:12px;line-height:20px}.bcm-caption-area.tw-text-3{font-size:14px;line-height:22px}.picker-input-container{display:flex;flex-direction:column;align-items:flex-start;justify-content:stretch}";
23399
+
23400
+ var __decorate$5 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
23401
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
23402
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
23403
+ r = Reflect.decorate(decorators, target, key, desc);
23404
+ else
23405
+ for (var i = decorators.length - 1; i >= 0; i--)
23406
+ if (d = decorators[i])
23407
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
23408
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
23409
+ };
23410
+ const stringify = JSON.stringify;
23411
+ const BcmDatetimePicker = class {
23412
+ constructor(hostRef) {
23413
+ index$2.registerInstance(this, hostRef);
23414
+ this.load = index$2.createEvent(this, "bcm-load", 7);
23415
+ this.change = index$2.createEvent(this, "bcm-change", 7);
23416
+ this.bcmOpen = index$2.createEvent(this, "bcm-open", 7);
23417
+ this.inputId = null;
23418
+ this.emptyState = false;
23419
+ this.initialized = false;
23420
+ this.disabledDatesList = { min: null, max: null, dates: [] };
23421
+ this.dayNumbers = [];
23422
+ this.valueText = null;
23423
+ this.dataIsValid = false;
23424
+ this._id = generate.Generate.UID();
23425
+ this.date = new Date();
23426
+ this.endDate = null;
23427
+ this.type = Types.datetime;
23428
+ this.disabled = false;
23429
+ this.disabledDates = '';
23430
+ this.value = null;
23431
+ this._open = false;
23432
+ this.hidden = false;
23433
+ this.name = undefined;
23434
+ this.fullWidth = false;
23435
+ this.required = false;
23436
+ this.label = undefined;
23437
+ this.placeholder = undefined;
23438
+ this.minYear = 1900;
23439
+ this.maxYear = 2200;
23440
+ this.noCaption = false;
23441
+ this.noMargin = false;
23442
+ this.captionError = undefined;
23443
+ this.caption = '';
23444
+ this.captionType = 'default';
23445
+ this.alignment = undefined;
23446
+ this.placement = bcm.Bcm.Placement['bottom-start'];
23447
+ this.linkedComponent = undefined;
23448
+ this.clearable = false;
23449
+ this.years = [];
23450
+ this.hours = [];
23451
+ this.minutes = [];
23452
+ this.hasDateModule = false;
23453
+ this.hasTimeModule = false;
23454
+ this.renderDate = undefined;
23455
+ this.selectedDate = undefined;
23456
+ this.selectedEndDate = undefined;
23457
+ this.error = false;
23458
+ this.errorText = '';
23459
+ this.tick = {};
23460
+ }
23461
+ markForCheck() {
23462
+ this.tick = generate.Generate.UID();
23463
+ }
23464
+ openChanged() {
23465
+ this.bcmOpen.emit(this._open);
23466
+ }
23467
+ /**
23468
+ * @ComponentMethod
23469
+ */
23470
+ componentWillLoad() {
23471
+ this.inputId = 'picker-input-' + this._id;
23472
+ this.hasDateModule = this.type === Types.datetime
23473
+ || this.type === Types.date
23474
+ || this.type === Types.range;
23475
+ this.hasTimeModule = this.type === Types.datetime
23476
+ || this.type === Types.time;
23477
+ this.prepareDisabledDates();
23478
+ this.setData();
23479
+ // Generate year, hour, minute sequences
23480
+ // #
23481
+ if (!this.initialized) {
23482
+ for (let i = this.minYear; i <= this.maxYear; i++)
23483
+ this.years.push(i);
23484
+ for (let i = 0; i <= 23; i++)
23485
+ this.hours.push(i);
23486
+ for (let i = 0; i <= 59; i++)
23487
+ this.minutes.push(i);
23488
+ this.load.emit();
23489
+ }
23490
+ this.initialized = true;
23491
+ }
23492
+ /**
23493
+ * @ComponentMethod
23494
+ */
23495
+ componentDidRender() {
23496
+ // Create years selection
23497
+ // #
23498
+ if (this.hasDateModule && !this.yearsDragger) {
23499
+ this.createDragSelection('years', this.yearsElement, this.yearsWrapperElement, this.yearsStripElement, elementDragger.DragDirections.y);
23500
+ this.createWheelChange('years', this.yearsWrapperElement, this.yearsStripElement);
23501
+ this.setDragSelection('years', this.currentDate.year);
23502
+ }
23503
+ // Create hours selection
23504
+ // #
23505
+ if (this.hasTimeModule && !this.hoursDragger) {
23506
+ this.createDragSelection('hours', this.hoursElement, this.hoursWrapperElement, this.timeStripElement, elementDragger.DragDirections.y);
23507
+ this.createWheelChange('hours', this.hoursWrapperElement, this.timeStripElement);
23508
+ this.setDragSelection('hours', this.currentDate.hour);
23509
+ }
23510
+ // Create minutes selection
23511
+ // #
23512
+ if (this.hasTimeModule && !this.minutesDragger) {
23513
+ this.createDragSelection('minutes', this.minutesElement, this.minutesWrapperElement, this.timeStripElement, elementDragger.DragDirections.y);
23514
+ this.createWheelChange('minutes', this.minutesWrapperElement, this.timeStripElement);
23515
+ this.setDragSelection('minutes', this.currentDate.minute);
23516
+ }
23517
+ }
23518
+ /**
23519
+ * @desc
23520
+ * @param newValue
23521
+ */
23522
+ renderDateChange() {
23523
+ if (!this.initialized)
23524
+ return;
23525
+ this.setData();
23526
+ this.hasDateModule && this.setDragSelection('years', this.currentDate.year);
23527
+ }
23528
+ /**
23529
+ * @desc
23530
+ * @param newValue
23531
+ */
23532
+ openChange(newValue) {
23533
+ if (newValue) {
23534
+ this.calculateLocation();
23535
+ // Create years selection
23536
+ // #
23537
+ if (this.hasDateModule) {
23538
+ this.createDragSelection('years', this.yearsElement, this.yearsWrapperElement, this.yearsStripElement, elementDragger.DragDirections.y);
23539
+ this.createWheelChange('years', this.yearsWrapperElement, this.yearsStripElement);
23540
+ this.setDragSelection('years', this.currentDate.year);
23541
+ }
23542
+ // Create hours selection
23543
+ // #
23544
+ if (this.hasTimeModule) {
23545
+ this.createDragSelection('hours', this.hoursElement, this.hoursWrapperElement, this.timeStripElement, elementDragger.DragDirections.y);
23546
+ this.createWheelChange('hours', this.hoursWrapperElement, this.timeStripElement);
23547
+ this.setDragSelection('hours', this.currentDate.hour, true);
23548
+ }
23549
+ // Create minutes selection
23550
+ // #
23551
+ if (this.hasTimeModule) {
23552
+ this.createDragSelection('minutes', this.minutesElement, this.minutesWrapperElement, this.timeStripElement, elementDragger.DragDirections.y);
23553
+ this.createWheelChange('minutes', this.minutesWrapperElement, this.timeStripElement);
23554
+ this.setDragSelection('minutes', this.currentDate.minute, true);
23555
+ }
23556
+ this.markForCheck();
23557
+ index$2.forceUpdate(this.el);
23558
+ }
23559
+ }
23560
+ /**
23561
+ * @desc
23562
+ * @param newValue
23563
+ */
23564
+ valueChange(newValue, oldValue) {
23565
+ const errorObject1 = { isValid: false, value: this.valueText };
23566
+ const errorObject2 = { isValid: false, value: this.inputElement.value };
23567
+ if (!newValue) {
23568
+ this.change.emit();
23569
+ return;
23570
+ }
23571
+ if (this.type !== Types.range && this.error) {
23572
+ this.change.emit(errorObject2);
23573
+ return;
23574
+ }
23575
+ try {
23576
+ if ((oldValue && stringify(newValue.dateObject) !== stringify(oldValue.dateObject)) || (!oldValue && newValue)) {
23577
+ if (this.type === Types.date || this.type === Types.datetime) {
23578
+ this.change.emit(newValue);
23579
+ }
23580
+ if (this.type === Types.time) {
23581
+ this.change.emit(newValue);
23582
+ // this.change.emit({
23583
+ // time: newValue.time,
23584
+ // timeObject: newValue.dateObject
23585
+ // })
23586
+ }
23587
+ if (this.type === Types.range) {
23588
+ const dateObject = newValue.dateObject;
23589
+ if (dateObject.start.date && dateObject.end.date) {
23590
+ if (newValue.isValid) {
23591
+ this.change.emit({
23592
+ isValid: newValue.isValid,
23593
+ value: newValue.value,
23594
+ start: dateObject.start,
23595
+ end: dateObject.end
23596
+ });
23597
+ }
23598
+ }
23599
+ else {
23600
+ this.change.emit(errorObject1);
23601
+ }
23602
+ }
23603
+ }
23604
+ }
23605
+ catch (exception) { }
23606
+ }
23607
+ /**
23608
+ * @desc
23609
+ * @param newValue -
23610
+ */
23611
+ disabledDatesChange(newValue) {
23612
+ if (newValue) {
23613
+ this.prepareDisabledDates();
23614
+ }
23615
+ }
23616
+ /**
23617
+ * @desc
23618
+ * @param date
23619
+ */
23620
+ stringToDate(date) {
23621
+ const isDate = !!date.getMonth;
23622
+ if (!isDate) {
23623
+ return new Date(Date.parse(this.switchDDMM(date)));
23624
+ }
23625
+ return date;
23626
+ }
23627
+ /**
23628
+ * @desc
23629
+ * @param date
23630
+ */
23631
+ dateToString(date) {
23632
+ if (!(date instanceof Date))
23633
+ return false;
23634
+ }
23635
+ /**
23636
+ *
23637
+ * @param str
23638
+ */
23639
+ switchDDMM(str) {
23640
+ if (!str)
23641
+ return;
23642
+ const parts = str.split('/');
23643
+ if (str.indexOf('/') === -1 || parts.length !== 3)
23644
+ return str;
23645
+ return `${parts[1]}/${parts[0]}/${parts[2]}`;
23646
+ }
23647
+ /**
23648
+ * @desc
23649
+ */
23650
+ setData() {
23651
+ this.date = this.stringToDate(this.date);
23652
+ if (!this.initialized && !this.renderDate) {
23653
+ this.renderDate = this.date && this.date || new Date();
23654
+ }
23655
+ if (!this.initialized && this.endDate) {
23656
+ this.selectedEndDate = this.stringToDate(this.endDate);
23657
+ //this.currentEndDate = this.createDateObject(this.selectedEndDate)
23658
+ }
23659
+ const date = this.renderDate;
23660
+ this.currentDate = this.createDateObject(date);
23661
+ // Calculate days in current
23662
+ // month
23663
+ this.dayNumbers = this.getMonthDayNumbers(date).map(day => {
23664
+ return {
23665
+ day,
23666
+ thisMonth: true,
23667
+ isWeekend: this.getDayIsWeekend(date, day),
23668
+ today: this.getIsCurrentDate(date, day),
23669
+ date: this.getTargetDayDate(date, day)
23670
+ };
23671
+ });
23672
+ // Add prev month days to
23673
+ // empty columns
23674
+ if (this.currentDate.year > this.minYear) {
23675
+ let targetMonth = new Date(new Date(date).setMonth(this.currentDate.month - 1, 1));
23676
+ let targetMonthDayNumbers = this.getMonthDayNumbers(targetMonth).reverse();
23677
+ let max = this.currentDate.monthFirstDay;
23678
+ for (let i = 1; i < (max === 0 ? 7 : max); i++) {
23679
+ const day = targetMonthDayNumbers[i - 1];
23680
+ this.dayNumbers.unshift({
23681
+ day,
23682
+ prevMonth: true,
23683
+ isWeekend: this.getDayIsWeekend(targetMonth, day),
23684
+ date: this.getTargetDayDate(targetMonth, day)
23685
+ });
23686
+ }
23687
+ }
23688
+ // Add next month days to
23689
+ // rest of columns
23690
+ if (this.currentDate.year < this.maxYear) {
23691
+ let targetMonth = new Date(new Date(date).setMonth(this.currentDate.month + 1));
23692
+ let targetMonthDayNumbers = this.getMonthDayNumbers(targetMonth);
23693
+ let max = 42 - this.dayNumbers.length;
23694
+ for (let i = 0; i < max; i++) {
23695
+ const day = targetMonthDayNumbers[i];
23696
+ this.dayNumbers.push({
23697
+ day,
23698
+ nextMonth: true,
23699
+ isWeekend: this.getDayIsWeekend(targetMonth, day),
23700
+ date: this.getTargetDayDate(targetMonth, day)
23701
+ });
23702
+ }
23703
+ }
23704
+ if (!this.emptyState) {
23705
+ this.valueText = this.getValueText();
23706
+ }
23707
+ index$2.forceUpdate(this.el);
23708
+ }
23709
+ /**
23710
+ * @desc
23711
+ */
23712
+ prepareDisabledDates() {
23713
+ if (!this.disabledDates)
23714
+ return;
23715
+ let disabledDatesData = null;
23716
+ if (typeof this.disabledDates === 'string') {
23717
+ try {
23718
+ disabledDatesData = JSON.parse(this.disabledDates);
23719
+ }
23720
+ catch (e) {
23721
+ return;
23722
+ }
23723
+ }
23724
+ else
23725
+ disabledDatesData = this.disabledDates;
23726
+ // Convert dates to list
23727
+ // #
23728
+ if (disabledDatesData.dates && disabledDatesData.dates.length && !!disabledDatesData.dates.length) {
23729
+ const disabledDates = disabledDatesData.dates.map(date => {
23730
+ const tempDate = new Date(date);
23731
+ if (tempDate.toString().toLowerCase() === 'invalid date')
23732
+ return null;
23733
+ else
23734
+ return tempDate;
23735
+ }).filter(date => date);
23736
+ this.disabledDatesList.dates = disabledDates;
23737
+ }
23738
+ // Get min & max range
23739
+ // #
23740
+ if (disabledDatesData.min &&
23741
+ disabledDatesData.max && (disabledDatesData.min.getTime() > disabledDatesData.max.getTime() ||
23742
+ disabledDatesData.max.getTime() < disabledDatesData.min.getTime())) {
23743
+ return;
23744
+ }
23745
+ if (disabledDatesData.min && disabledDatesData.min instanceof Date) {
23746
+ this.disabledDatesList.min = new Date(disabledDatesData.min.toDateString());
23747
+ }
23748
+ else {
23749
+ delete this.disabledDatesList.min;
23750
+ }
23751
+ if (disabledDatesData.max && disabledDatesData.max instanceof Date) {
23752
+ this.disabledDatesList.max = new Date(disabledDatesData.max.toDateString());
23753
+ }
23754
+ else {
23755
+ delete this.disabledDatesList.max;
23756
+ }
23757
+ const value = this.inputElement && this.inputElement.value;
23758
+ value && this.setDataFromText(value);
23759
+ }
23760
+ /**
23761
+ *
23762
+ * @param target
23763
+ * @param wheelTriggerElement
23764
+ * @param strip
23765
+ */
23766
+ createWheelChange(target, wheelTriggerElement, strip) {
23767
+ /**
23768
+ * [ Mouse Event: wheel ]
23769
+ */
23770
+ wheelTriggerElement.addEventListener('wheel', (event) => {
23771
+ const moveDown = event.deltaY > 0;
23772
+ const dragger = this[target + 'Dragger'];
23773
+ const draggerOffsetY = dragger.getOffset().top;
23774
+ const childIdx = this.getTargetChildByDragPosition({ y: draggerOffsetY }, strip);
23775
+ let nextChild = moveDown ? childIdx + 1 : childIdx - 1;
23776
+ // Array bounds check
23777
+ // #
23778
+ nextChild < 0
23779
+ ? (nextChild = 0) : typeof this[target][nextChild] === 'undefined'
23780
+ ? (nextChild = this[target].length - 1) : nextChild;
23781
+ if (this.type == "time" && !this.selectedDate) {
23782
+ this.setTime();
23783
+ }
23784
+ this.setDragSelection(target, this[target][nextChild], true, true);
23785
+ });
23786
+ }
23787
+ /**
23788
+ * @desc
23789
+ */
23790
+ createDragSelection(target, element, dragTriggerElement, strip, direction) {
23791
+ const dragger = target + 'Dragger';
23792
+ this[dragger] = new elementDragger.ElementDragger({
23793
+ target: element,
23794
+ trigger: dragTriggerElement,
23795
+ direction: direction,
23796
+ useTransform: true,
23797
+ limit: {
23798
+ y: {
23799
+ max: strip.offsetTop - (strip.offsetHeight / 2),
23800
+ min: (element.offsetHeight - (strip.offsetTop + strip.offsetHeight / 2)) * -1
23801
+ }
23802
+ }
23803
+ });
23804
+ /**
23805
+ * [ ElementDragger Event: end ]
23806
+ */
23807
+ this[dragger].on('end', (pos) => {
23808
+ const childIdx = this.getTargetChildByDragPosition(pos, strip);
23809
+ // Select target child when dragging
23810
+ // end
23811
+ this.selectTargetChildByDragIdx(childIdx, strip, this[dragger]);
23812
+ // Set target value
23813
+ // #
23814
+ this.setDragSelection(target, this[target][childIdx], false);
23815
+ });
23816
+ }
23817
+ /**
23818
+ * @desc Calculates which child in center of strip
23819
+ * for drag areas
23820
+ */
23821
+ getTargetChildByDragPosition({ y }, strip) {
23822
+ const stripHeight = strip.offsetHeight;
23823
+ const stripCenter = stripHeight / 2;
23824
+ const stripTriggerY = strip.offsetTop - (stripCenter);
23825
+ const childY = -(y - stripTriggerY - (stripCenter));
23826
+ return Math.floor(childY / stripHeight);
23827
+ }
23828
+ /**
23829
+ * @esc
23830
+ * @param target
23831
+ * @param childIdx
23832
+ */
23833
+ selectTargetChildByDragIdx(childIdx, strip, dragger, anim = true) {
23834
+ const y = ((strip.offsetHeight / 2) + strip.offsetTop) - ((childIdx + 1) * (strip.offsetHeight));
23835
+ dragger.setPosition({ y, anim });
23836
+ }
23837
+ /**
23838
+ * @desc
23839
+ * @param year
23840
+ */
23841
+ setDragSelection(target, value, scroll = true, anim = false) {
23842
+ // if (!value) return
23843
+ const childIdx = this[target].findIndex((itemValue) => itemValue === value);
23844
+ scroll && this.selectTargetChildByDragIdx(childIdx, this[target === 'years' ? target + 'StripElement' : 'timeStripElement'], this[target + 'Dragger'], anim);
23845
+ switch (target) {
23846
+ case 'years':
23847
+ this.date.setFullYear(value);
23848
+ break;
23849
+ case 'hours':
23850
+ this.date.setHours(value);
23851
+ break;
23852
+ case 'minutes':
23853
+ this.date.setMinutes(value);
23854
+ break;
23855
+ }
23856
+ this.renderDate = this.date;
23857
+ this.setData();
23858
+ if (this.selectedDate) {
23859
+ this.setValue();
23860
+ }
23861
+ }
23862
+ /**
23863
+ * @desc
23864
+ * @returns
23865
+ */
23866
+ getHours12() {
23867
+ const hours = (this.date.getHours() + 24) % 12 || 12;
23868
+ return hours > 12 ? hours - 12 : hours;
23869
+ }
23870
+ /**
23871
+ * @desc
23872
+ * @param date
23873
+ * @param excludeTime -
23874
+ */
23875
+ createDateObject(date, { excludeTime = false, exactMonthNumber = false } = {}) {
23876
+ const dateYear = date.getFullYear();
23877
+ const year = dateYear >= this.maxYear
23878
+ ? this.maxYear : dateYear <= this.minYear
23879
+ ? this.minYear : dateYear;
23880
+ return Object.assign(Object.assign({ year, day: date.getDate(), month: date.getMonth() + (exactMonthNumber ? 1 : 0), dayOfWeek: date.getDay(), monthFirstDay: new Date(new Date(date).setDate(1)).getDay() }, !excludeTime && { hour: date.getHours() }), !excludeTime && { minute: date.getMinutes() });
23881
+ }
23882
+ /**
23883
+ * @desc
23884
+ * @param max
23885
+ */
23886
+ generateDaysArrayFromMax(max) {
23887
+ return Array.from(Array(max + 1).keys()).slice(1);
23888
+ }
23889
+ /**
23890
+ * @desc
23891
+ * @param date
23892
+ */
23893
+ getMonthDayNumbers(date) {
23894
+ const totalDays = this.getDaysInMonth(date.getMonth(), date.getFullYear());
23895
+ return this.generateDaysArrayFromMax(totalDays);
23896
+ }
23897
+ /**
23898
+ * @desc
23899
+ * @param date
23900
+ * @param day
23901
+ */
23902
+ getTargetDayDate(date, day) {
23903
+ return new Date(new Date(date).setDate(day));
23904
+ }
23905
+ /**
23906
+ * @desc
23907
+ * @param date
23908
+ * @param day
23909
+ */
23910
+ getDayIsWeekend(date, day) {
23911
+ const dayOfWeek = new Date(new Date(date).setDate(day)).getDay();
23912
+ return (dayOfWeek === 6) || (dayOfWeek === 0);
23913
+ }
23914
+ /**
23915
+ * @desc
23916
+ * @param date
23917
+ */
23918
+ getClock(date) {
23919
+ date = date || new Date();
23920
+ const hours = date.getHours();
23921
+ const minutes = date.getMinutes();
23922
+ const seconds = date.getSeconds();
23923
+ const milis = date.getMilliseconds();
23924
+ return { hours, minutes, seconds, milis };
23925
+ }
23926
+ /**
23927
+ * @desc
23928
+ */
23929
+ setValue(reset) {
23930
+ var _a, _b, _c;
23931
+ const date = new Date(this.date.setHours(Number(this.currentDate.hour), Number(this.currentDate.minute)));
23932
+ if (reset) {
23933
+ this.value = null;
23934
+ return;
23935
+ }
23936
+ this.dataIsValid = true;
23937
+ if (this.type === Types.datetime) {
23938
+ const dateObject = Object.assign({}, this.currentDate);
23939
+ dateObject.month += 1;
23940
+ if (((_a = this.value) === null || _a === void 0 ? void 0 : _a.value) != this.valueText) {
23941
+ this.value = {
23942
+ isValid: this.dataIsValid,
23943
+ date: date,
23944
+ timestamp: date.getTime(),
23945
+ dateObject,
23946
+ value: this.valueText
23947
+ };
23948
+ }
23949
+ }
23950
+ if (this.type === Types.date) {
23951
+ const dateObject = Object.assign({}, this.currentDate);
23952
+ delete dateObject.hour;
23953
+ delete dateObject.minute;
23954
+ dateObject.month += 1;
23955
+ if (((_b = this.value) === null || _b === void 0 ? void 0 : _b.value) != this.valueText) {
23956
+ this.value = {
23957
+ isValid: this.dataIsValid,
23958
+ date,
23959
+ timestamp: date.getTime(),
23960
+ dateObject,
23961
+ value: this.valueText
23962
+ };
23963
+ }
23964
+ }
23965
+ if (this.type === Types.time) {
23966
+ const getTimeText = this.getTimeText();
23967
+ const dateObject = Object.assign({}, this.currentDate);
23968
+ dateObject.month += 1;
23969
+ this.value = {
23970
+ isValid: this.dataIsValid,
23971
+ date: date,
23972
+ timestamp: date.getTime(),
23973
+ time: getTimeText,
23974
+ dateObject,
23975
+ timeObject: {
23976
+ hours: this.currentDate.hour,
23977
+ minutes: this.currentDate.minute
23978
+ },
23979
+ value: getTimeText
23980
+ };
23981
+ this.inputElement.value = getTimeText;
23982
+ }
23983
+ if (this.type === Types.range) {
23984
+ if (((_c = this.value) === null || _c === void 0 ? void 0 : _c.value) != this.valueText) {
23985
+ this.value = {
23986
+ isValid: this.dataIsValid,
23987
+ dateObject: {
23988
+ start: Object.assign({}, this.selectedDate && {
23989
+ date: this.selectedDate,
23990
+ timestamp: this.selectedDate.getTime(),
23991
+ detail: this.createDateObject(this.selectedDate, {
23992
+ excludeTime: true,
23993
+ exactMonthNumber: true
23994
+ })
23995
+ }),
23996
+ end: Object.assign({}, this.selectedEndDate && {
23997
+ date: this.selectedEndDate,
23998
+ timestamp: this.selectedEndDate.getTime(),
23999
+ detail: this.createDateObject(this.selectedEndDate, {
24000
+ excludeTime: true,
24001
+ exactMonthNumber: true
24002
+ })
24003
+ })
24004
+ },
24005
+ value: this.valueText
24006
+ };
24007
+ }
24008
+ }
24009
+ }
24010
+ /**
24011
+ * @desc
24012
+ * @param month
24013
+ */
24014
+ setMonth(month) {
24015
+ this.renderDate.setDate(1);
24016
+ this.renderDate = new Date(this.renderDate.setMonth(month));
24017
+ this.setDragSelection('years', this.currentDate.year);
24018
+ }
24019
+ /**
24020
+ * @desc
24021
+ * @param popupClosing -
24022
+ */
24023
+ checkRangeValidation({ popupClosing = false } = {}) {
24024
+ if (this.type !== Types.range)
24025
+ return true;
24026
+ const errorText = 'date range invalid';
24027
+ if (popupClosing && (!this.selectedDate || this.selectedDate && !this.selectedEndDate)) {
24028
+ this.setError(true, errorText);
24029
+ return false;
24030
+ }
24031
+ if (!popupClosing) {
24032
+ this.setError(false);
24033
+ return true;
24034
+ }
24035
+ return true;
24036
+ }
24037
+ /**
24038
+ * @desc
24039
+ * @param value
24040
+ * @param max
24041
+ * @returns
24042
+ */
24043
+ pad(value, max) {
24044
+ return value < max ? '0' : '';
24045
+ }
24046
+ /**
24047
+ * @desc
24048
+ * @returns
24049
+ */
24050
+ isInputClearable() {
24051
+ if (this.inputElement && this.inputElement.value) {
24052
+ return true;
24053
+ }
24054
+ return false;
24055
+ }
24056
+ /**
24057
+ * @desc
24058
+ * @param date
24059
+ */
24060
+ isDisabledDate(date) {
24061
+ if (!!this.disabledDatesList.dates.map(d => this.isSameDate(d, date)).filter(d => d).length)
24062
+ return true;
24063
+ if (this.disabledDatesList.min) {
24064
+ const minDate = new Date(this.disabledDatesList.min);
24065
+ if (minDate && minDate.getTime() > date.getTime())
24066
+ return true;
24067
+ }
24068
+ if (this.disabledDatesList.max) {
24069
+ const maxDate = new Date(this.disabledDatesList.max);
24070
+ if (maxDate && new Date(maxDate.setDate(maxDate.getDate() + 1)).getTime() < date.getTime())
24071
+ return true;
24072
+ }
24073
+ }
24074
+ /**
24075
+ * @desc
24076
+ * @param date
24077
+ */
24078
+ setDate(date, isUserSelect, notClosePicker = false) {
24079
+ const isRange = this.type === Types.range;
24080
+ const isEndSelect = !!this.selectedEndDate;
24081
+ // Check disabled date
24082
+ // #
24083
+ if ((this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(date)) {
24084
+ return;
24085
+ }
24086
+ this.emptyState = false;
24087
+ if (!isRange || (isRange && !isEndSelect)) {
24088
+ this.date = new Date(date.setHours(this.currentDate.hour, this.currentDate.minute));
24089
+ }
24090
+ isRange && this.checkRangeValidation();
24091
+ if (isRange && this.selectedDate && this.selectedEndDate) {
24092
+ this.selectedDate = null;
24093
+ this.selectedEndDate = null;
24094
+ }
24095
+ if (isUserSelect) {
24096
+ const newDate = new Date(date);
24097
+ !isRange
24098
+ ? this.selectedDate = newDate
24099
+ : !this.selectedDate
24100
+ ? this.selectedDate = newDate
24101
+ : this.selectedDate.getTime() > newDate.getTime()
24102
+ ? (this.selectedEndDate = this.selectedDate) && (this.selectedDate = newDate)
24103
+ : this.selectedEndDate = newDate;
24104
+ !isRange && (this._open = notClosePicker);
24105
+ this.renderDate = this.date;
24106
+ this.valueText = this.getValueText();
24107
+ this.setValue();
24108
+ const splitText = this.valueText.split('/');
24109
+ const newValue = this.valueText ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
24110
+ this.inputElement.value = newValue;
24111
+ }
24112
+ }
24113
+ setDataFromText(text, updateData = false, openPicker = true) {
24114
+ let update = false;
24115
+ let errorState = '';
24116
+ const parsed = this.parse(text);
24117
+ if ((this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(parsed.date)) {
24118
+ parsed.dateIsValid = false;
24119
+ errorState = 'disabled-date';
24120
+ }
24121
+ // Check mode datetime
24122
+ // #
24123
+ if (this.type === Types.datetime && parsed.dateIsValid && parsed.timeIsValid) {
24124
+ updateData && this.setDate(parsed.date, true, openPicker);
24125
+ updateData && this.setTime(parsed.timeSections[0], parsed.timeSections[1]);
24126
+ update = true;
24127
+ }
24128
+ // Check mode date
24129
+ // #
24130
+ if (this.type === Types.date && parsed.dateIsValid) {
24131
+ updateData && this.setDate(parsed.date, true, openPicker);
24132
+ update = true;
24133
+ }
24134
+ // Check mode time
24135
+ // #
24136
+ if (this.type === Types.time && parsed.timeIsValid) {
24137
+ updateData && this.setTime(parsed.timeSections[0], parsed.timeSections[1]);
24138
+ update = true;
24139
+ }
24140
+ // Check mode range
24141
+ // #
24142
+ if (this.type === Types.range) {
24143
+ if (parsed.dateIsValid && !this.selectedDate) {
24144
+ updateData && this.setDate(parsed.date, true, openPicker);
24145
+ update = true;
24146
+ }
24147
+ if (parsed.date2IsValid && !this.selectedEndDate) {
24148
+ updateData && this.setDate(parsed.date2, true, openPicker);
24149
+ update = true;
24150
+ }
24151
+ if (this.selectedDate && this.selectedEndDate && parsed.rangeIsValid) {
24152
+ if (this.isSameDate(parsed.date2, this.selectedEndDate) && !this.isSameDate(parsed.date, this.selectedDate)) {
24153
+ this.selectedDate = null;
24154
+ updateData && this.setDate(parsed.date, true, openPicker);
24155
+ update = true;
24156
+ }
24157
+ if (this.isSameDate(parsed.date, this.selectedDate) && !this.isSameDate(parsed.date2, this.selectedEndDate)) {
24158
+ this.selectedEndDate = null;
24159
+ updateData && this.setDate(parsed.date2, true, openPicker);
24160
+ update = true;
24161
+ }
24162
+ }
24163
+ if (this.selectedDate && this.selectedEndDate && !parsed.rangeIsValid && updateData) {
24164
+ this.selectedDate = null;
24165
+ this.selectedEndDate = null;
24166
+ }
24167
+ }
24168
+ // Fix: render warning
24169
+ if (update) {
24170
+ if (updateData) {
24171
+ this.renderDate = this.date;
24172
+ }
24173
+ this.setError(false);
24174
+ }
24175
+ else {
24176
+ if (this.type === Types.range && this.selectedDate && this.selectedEndDate && parsed.rangeIsValid) {
24177
+ this.setError(false);
24178
+ }
24179
+ else {
24180
+ if (errorState) {
24181
+ this.setError(true, (errorState === 'disabled-date' && 'selected date is not allowed'));
24182
+ }
24183
+ else {
24184
+ if (text) {
24185
+ this.setError(true, (this.type === Types.datetime && 'invalid date or time') ||
24186
+ (this.type === Types.range && 'invalid date range') ||
24187
+ (this.type === Types.date && 'The selected date is not allowed.') ||
24188
+ (this.type === Types.time && 'invalid time'));
24189
+ }
24190
+ this.setValue(true);
24191
+ }
24192
+ }
24193
+ const splitText = text.split('/');
24194
+ const newValue = text && !this.error ? this.changeFormat(new Date(splitText[1] + "/" + splitText[0] + "/" + splitText[2])) : '';
24195
+ this.inputElement.value = newValue;
24196
+ }
24197
+ }
24198
+ /**
24199
+ * @desc
24200
+ */
24201
+ setDateToday() {
24202
+ const date = new Date();
24203
+ if (this.type === Types.range) {
24204
+ this.selectedDate = null;
24205
+ this.selectedEndDate = null;
24206
+ }
24207
+ this.setDate(date, true, false);
24208
+ }
24209
+ HourContentDblClick(e) {
24210
+ const getPath = generate.Generate.findEventPathWithNodeName(e, 'SPAN');
24211
+ if (getPath && getPath.classList.contains('selected')) {
24212
+ this.setValue();
24213
+ this._open = false;
24214
+ }
24215
+ }
24216
+ /**
24217
+ * @desc
24218
+ */
24219
+ setTime(hours, minutes) {
24220
+ this.renderDate = new Date(this.date.setHours(Number(hours || this.getClock().hours), Number(minutes || this.getClock().minutes)));
24221
+ if (this.type === Types.time) {
24222
+ this.selectedDate = this.date;
24223
+ }
24224
+ const hour = this.currentDate.hour || new Date().getHours();
24225
+ const minute = this.currentDate.minute || new Date().getMinutes();
24226
+ this.setDragSelection('hours', hour, true, true);
24227
+ this.setDragSelection('minutes', minute, true, true);
24228
+ }
24229
+ /**
24230
+ * @desc
24231
+ * @param state
24232
+ * @param error
24233
+ */
24234
+ setError(state = false, error = '') {
24235
+ this.error = state;
24236
+ this.errorText = !state ? '' : error;
24237
+ }
24238
+ /**
24239
+ * @desc
24240
+ */
24241
+ getError() {
24242
+ const { error, errorText } = this;
24243
+ return { valid: !error, error, errorText };
24244
+ }
24245
+ /**
24246
+ * @desc
24247
+ * @param month
24248
+ * @param year
24249
+ */
24250
+ getDaysInMonth(month, year) {
24251
+ return new Date(year, month + 1, 0).getDate();
24252
+ }
24253
+ /**
24254
+ * @desc
24255
+ * @param date
24256
+ * @param day
24257
+ * @returns
24258
+ */
24259
+ getIsCurrentDate(date, day) {
24260
+ const today = new Date();
24261
+ return today.getDate() === day
24262
+ && today.getMonth() === date.getMonth()
24263
+ && today.getFullYear() === date.getFullYear();
24264
+ }
24265
+ /**
24266
+ * @desc
24267
+ * @param date1
24268
+ * @param date2
24269
+ */
24270
+ isSameDate(date1, date2) {
24271
+ return (date1.getFullYear() === date2.getFullYear() &&
24272
+ date1.getMonth() === date2.getMonth() &&
24273
+ date1.getDate() === date2.getDate());
24274
+ }
24275
+ /**
24276
+ * @desc
24277
+ * @param date
24278
+ * @returns
24279
+ */
24280
+ getSelected(date, endDate = false) {
24281
+ const selectPart = endDate ? 'EndDate' : 'Date';
24282
+ const targetDate = new Date(this['selected' + selectPart]);
24283
+ const year = targetDate.getFullYear();
24284
+ const month = targetDate.getMonth();
24285
+ const day = targetDate.getDate();
24286
+ const isSelected = date.getDate() === day
24287
+ && date.getMonth() === month
24288
+ && date.getFullYear() === year;
24289
+ return isSelected;
24290
+ }
24291
+ /**
24292
+ * @desc
24293
+ * @param date
24294
+ */
24295
+ getDateIsInRange(date) {
24296
+ if (this.type !== Types.range || (!this.selectedDate || !this.selectedEndDate))
24297
+ return;
24298
+ const current = date.getTime();
24299
+ const start = this.selectedDate.getTime();
24300
+ const end = this.selectedEndDate.getTime();
24301
+ return current > start && current < end;
24302
+ }
24303
+ /**
24304
+ * @desc
24305
+ */
24306
+ getMonthText() {
24307
+ return Object.values(Months)[this.renderDate.getMonth()];
24308
+ }
24309
+ /**
24310
+ * @desc
24311
+ */
24312
+ getCurrentDateText() {
24313
+ const dayText = Object.values(Days)[this.currentDate.dayOfWeek];
24314
+ const monthText = Object.values(Months)[this.currentDate.month];
24315
+ const text = `${dayText}, ${this.currentDate.day}th ${monthText} ${this.currentDate.year}`;
24316
+ return text;
24317
+ }
24318
+ /**
24319
+ * @desc
24320
+ * @returns
24321
+ */
24322
+ getTimeText() {
24323
+ const { hour, minute } = this.currentDate;
24324
+ return `${hour < 10 ? '0' + hour : hour}:${minute < 10 ? '0' + minute : minute}`;
24325
+ }
24326
+ /**
24327
+ *
24328
+ */
24329
+ getValueText() {
24330
+ if (!this.selectedDate)
24331
+ return '';
24332
+ const selectedDate = this.selectedDate;
24333
+ const year = selectedDate.getFullYear();
24334
+ const day = selectedDate.getDate();
24335
+ const baseMonth = selectedDate.getMonth();
24336
+ const month = baseMonth + 1;
24337
+ let text = '';
24338
+ if (this.type === Types.date || this.type === Types.datetime) {
24339
+ text = `${day < 10 ? '0' + day : day}/${month < 10 ? '0' + month : month}/${year}`;
24340
+ }
24341
+ if (this.type === Types.time) {
24342
+ text = this.getTimeText();
24343
+ }
24344
+ if (this.type === Types.datetime) {
24345
+ text = `${text} ${this.getTimeText()}`;
24346
+ }
24347
+ if (this.type === Types.range) {
24348
+ text = `${day < 10 ? '0' + day : day}/${month < 10 ? '0' + month : month}/${year}`;
24349
+ }
24350
+ if (this.type === Types.range && this.selectedEndDate) {
24351
+ const endDate = this.selectedEndDate;
24352
+ const endYear = endDate.getFullYear();
24353
+ const endDay = endDate.getDate();
24354
+ const endBaseMonth = endDate.getMonth();
24355
+ const endMonth = endBaseMonth + 1;
24356
+ text += `-${endDay < 10 ? '0' + endDay : endDay}/${endMonth < 10 ? '0' + endMonth : endMonth}/${endYear}`;
24357
+ }
24358
+ this.setDataFromText(text);
24359
+ return text;
24360
+ }
24361
+ parseDate(input) {
24362
+ var parts = input.split('/');
24363
+ var day = parseInt(parts[0], 10);
24364
+ var month = parseInt(parts[1], 10) - 1;
24365
+ var year = parseInt(parts[2], 10);
24366
+ if (isNaN(day) || isNaN(month) || isNaN(year)) {
24367
+ return 'invalid date';
24368
+ }
24369
+ var date = new Date(year, month, day);
24370
+ if (date.getDate() !== day || date.getMonth() !== month || date.getFullYear() !== year) {
24371
+ return 'invalid date';
24372
+ }
24373
+ return date;
24374
+ }
24375
+ /**
24376
+ * @desc
24377
+ * @param dateStr
24378
+ */
24379
+ parse(dateStr) {
24380
+ const sections = dateStr.split(this.type === Types.range ? '-' : ' ');
24381
+ // const sections: Array<string> = dateStr.split("-")
24382
+ const sectionDate = this.switchDDMM(sections[0]);
24383
+ const sectionDate2 = this.switchDDMM(sections[1]);
24384
+ const sectionTime = this.type === Types.datetime ? sections[1] : sections[0];
24385
+ const date = new Date(sectionDate);
24386
+ const date2 = new Date(sectionDate2);
24387
+ const dateCheck = date.toString().toLowerCase() !== 'invalid date' && this.parseDate(dateStr) !== 'invalid date';
24388
+ const dateCheck2 = date2.toString().toLowerCase() !== 'invalid date';
24389
+ const regDate = /^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/;
24390
+ const regDateCheck = regDate.test(sectionDate);
24391
+ const regDateCheck2 = regDate.test(sectionDate2);
24392
+ const regTime = /\b([01][0-9]|2[0-3]):([0-5][0-9])\b/;
24393
+ const regTimeCheck = regTime.test(sectionTime);
24394
+ const dateIsValid = dateCheck && regDateCheck;
24395
+ const date2IsValid = dateCheck2 && regDateCheck2;
24396
+ const timeSections = regTimeCheck ? sectionTime.split(':') : '';
24397
+ return {
24398
+ date,
24399
+ date2,
24400
+ timeSections,
24401
+ dateIsValid,
24402
+ date2IsValid,
24403
+ rangeIsValid: dateIsValid && date2IsValid,
24404
+ timeIsValid: regTimeCheck
24405
+ };
24406
+ }
24407
+ /**
24408
+ * @desc
24409
+ */
24410
+ getPrevMonth() {
24411
+ this.setMonth(this.renderDate.getMonth() - 1);
24412
+ }
24413
+ /**
24414
+ * @desc
24415
+ */
24416
+ getNextMonth() {
24417
+ this.setMonth(this.renderDate.getMonth() + 1);
24418
+ }
24419
+ /**
24420
+ * @desc
24421
+ * @param idx
24422
+ */
24423
+ yearClick(idx) {
24424
+ if (this.yearsDragger.busy)
24425
+ return;
24426
+ this.setDragSelection('years', this.years[idx], true, true);
24427
+ }
24428
+ /**
24429
+ * @desc
24430
+ * @param idx
24431
+ */
24432
+ hourClick(idx) {
24433
+ if (this.hoursDragger.busy)
24434
+ return;
24435
+ if (!this.selectedDate) {
24436
+ this.setTime();
24437
+ }
24438
+ this.setDragSelection('hours', this.hours[idx], true, true);
24439
+ }
24440
+ /**
24441
+ * @desc
24442
+ * @param idx
24443
+ */
24444
+ minuteClick(idx) {
24445
+ if (this.minutesDragger.busy)
24446
+ return;
24447
+ if (!this.selectedDate) {
24448
+ this.setTime();
24449
+ }
24450
+ this.setDragSelection('minutes', this.minutes[idx], true, true);
24451
+ }
24452
+ /**
24453
+ * @desc
24454
+ */
24455
+ openPicker() {
24456
+ if (this.disabled)
24457
+ return;
24458
+ !this._open && (this._open = true);
24459
+ }
24460
+ /**
24461
+ * @desc
24462
+ * @param date
24463
+ */
24464
+ handleDayNumber(date) {
24465
+ if (this.type === Types.range
24466
+ && this.selectedDate
24467
+ && !this.selectedEndDate
24468
+ && this.isSameDate(this.selectedDate, date))
24469
+ return;
24470
+ this.setDate(date, true);
24471
+ }
24472
+ /**
24473
+ * @desc
24474
+ * @param value
24475
+ */
24476
+ handleInputInput(value) {
24477
+ this.setDataFromText(value, true);
24478
+ }
24479
+ /**
24480
+ * @desc
24481
+ * @param event -
24482
+ */
24483
+ handleInputChange(event) {
24484
+ this.setDataFromText(this.inputElement.value, true, false);
24485
+ event.stopPropagation();
24486
+ }
24487
+ /**
24488
+ * @desc
24489
+ */
24490
+ async handleInputClear() {
24491
+ this.selectedDate = null;
24492
+ this.selectedEndDate = null;
24493
+ this.emptyState = true;
24494
+ this.renderDate = new Date();
24495
+ this._open = false;
24496
+ this.setValue(true);
24497
+ this.setError();
24498
+ this.getValueText();
24499
+ await this.inputElement.setClear();
24500
+ await utils.delay(10);
24501
+ return Promise.resolve();
24502
+ }
24503
+ /**
24504
+ * @desc
24505
+ * @param event
24506
+ */
24507
+ handleWheel(event) {
24508
+ event.preventDefault();
24509
+ }
24510
+ /**
24511
+ * @desc
24512
+ * @param event
24513
+ */
24514
+ handleWindowClick(event) {
24515
+ if (this._open) {
24516
+ const list = document.getElementById(`picker-vp-${this._id}`);
24517
+ const isClickInside = generate.Generate.findEventPath(event, this.el);
24518
+ const isClickList = list ? (generate.Generate.findEventPath(event, list)) : false;
24519
+ if (!isClickInside && !isClickList) {
24520
+ this._open = false;
24521
+ }
24522
+ }
24523
+ }
24524
+ openToggle() {
24525
+ if (this.disabled)
24526
+ return;
24527
+ this._open = !this._open;
24528
+ }
24529
+ /**
24530
+ * @desc
24531
+ */
24532
+ async open() {
24533
+ await utils.delay(50);
24534
+ this.openToggle();
24535
+ }
24536
+ /**
24537
+ * @desc
24538
+ */
24539
+ async close() {
24540
+ this._open = false;
24541
+ }
24542
+ /**
24543
+ * @desc
24544
+ */
24545
+ async getValue() {
24546
+ return this.value;
24547
+ }
24548
+ /**
24549
+ * @param
24550
+ * @param disabled
24551
+ */
24552
+ async setDisabled(disabled) {
24553
+ this.disabled = disabled;
24554
+ }
24555
+ changeFormat(date, reverseDay = false) {
24556
+ if (!date)
24557
+ return;
24558
+ const pad = (n) => n < 10 ? `0${n}` : n;
24559
+ const day = pad(new Date(date).getDate());
24560
+ const month = pad(new Date(date).getMonth() + 1);
24561
+ const year = new Date(date).getFullYear();
24562
+ const hours = pad(new Date(date).getHours());
24563
+ const minutes = pad(new Date(date).getMinutes());
24564
+ if (this.type == "range" || this.type == "date") {
24565
+ return reverseDay ? `${month}/${day}/${year}` : `${day}/${month}/${year}`;
24566
+ }
24567
+ return reverseDay ? `${month}/${day}/${year} ${hours}:${minutes}` : `${day}/${month}/${year} ${hours}:${minutes}`;
24568
+ }
24569
+ isTime(value) {
24570
+ return /^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(value);
24571
+ }
24572
+ getHHMM(date) {
24573
+ if (!date)
24574
+ return;
24575
+ const pad = (n) => n < 10 ? `0${n}` : n;
24576
+ const hours = pad(new Date(date).getHours());
24577
+ const minutes = pad(new Date(date).getMinutes());
24578
+ return `${hours}:${minutes}`;
24579
+ }
24580
+ /**
24581
+ * @desc
24582
+ * @param dateOrTime
24583
+ */
24584
+ async set(dateOrTime) {
24585
+ if (dateOrTime) {
24586
+ if (typeof dateOrTime === "number") {
24587
+ dateOrTime = new Date(dateOrTime);
24588
+ }
24589
+ if (this.type == "time") {
24590
+ let time = dateOrTime;
24591
+ if (!this.isTime(dateOrTime)) {
24592
+ time = this.getHHMM(dateOrTime);
24593
+ }
24594
+ this.setDataFromText(time, true, false);
24595
+ }
24596
+ else {
24597
+ const split = dateOrTime.toString().split('-');
24598
+ const parseDate0 = Date.parse(split[0]);
24599
+ if (split[0] && !isNaN(parseDate0)) {
24600
+ var date = this.changeFormat(validators.DateTimeHelper.convertTimeStampToDate(new Date(split[0]).getTime()));
24601
+ if (split[1] && !isNaN(Date.parse(split[1]))) {
24602
+ var date2 = this.changeFormat(validators.DateTimeHelper.convertTimeStampToDate(new Date(split[1]).getTime()));
24603
+ date = date + "-" + date2;
24604
+ }
24605
+ this.setDataFromText(date, true, false);
24606
+ }
24607
+ else {
24608
+ this.setDataFromText('', true, false);
24609
+ }
24610
+ }
24611
+ }
24612
+ else {
24613
+ this.setClear();
24614
+ }
24615
+ }
24616
+ async get() {
24617
+ var _a;
24618
+ return ((_a = this.value) === null || _a === void 0 ? void 0 : _a.timestamp) || null;
24619
+ }
24620
+ async setClear() {
24621
+ await this.handleInputClear();
24622
+ return Promise.resolve();
24623
+ }
24624
+ /**
24625
+ * @desc
24626
+ */
24627
+ async getInput() {
24628
+ return this.inputElement;
24629
+ }
24630
+ /**
24631
+ * @desc
24632
+ * @returns
24633
+ */
24634
+ async isValid() {
24635
+ return this.getError();
24636
+ }
24637
+ async resetCaption() {
24638
+ await utils.delay(10);
24639
+ await this.inputElement.resetCaption();
24640
+ this.captionType = 'default';
24641
+ this.captionError = null;
24642
+ await utils.delay(10);
24643
+ return Promise.resolve();
24644
+ }
24645
+ addZeroBefore(n) {
24646
+ return (n < 10 ? '0' : '') + n;
24647
+ }
24648
+ formatDate(date, format) {
24649
+ const map = {
24650
+ mm: this.addZeroBefore(date.getMonth() + 1),
24651
+ dd: this.addZeroBefore(date.getDate()),
24652
+ yyyy: this.addZeroBefore(date.getFullYear()),
24653
+ hh: this.addZeroBefore(date.getHours()),
24654
+ mi: this.addZeroBefore(date.getMinutes()),
24655
+ };
24656
+ return format.replace(/mm|dd|yyyy|hh|mi/gi, matched => map[matched]);
24657
+ }
24658
+ handleResize() {
24659
+ this.calculateLocation();
24660
+ }
24661
+ handleWheels(event) {
24662
+ if (this._open) {
24663
+ const list = document.querySelector(`#picker-vp-${this._id}`);
24664
+ const isClickInside = list && generate.Generate.findEventPath(event, list);
24665
+ if (isClickInside) {
24666
+ this.calculateLocation();
24667
+ }
24668
+ else {
24669
+ this._open = false;
24670
+ }
24671
+ }
24672
+ }
24673
+ componentDidLoad() {
24674
+ const picker = this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);
24675
+ //move to body
24676
+ if (picker) {
24677
+ document.body.appendChild(picker);
24678
+ this.calculateLocation();
24679
+ }
24680
+ }
24681
+ disconnectedCallback() {
24682
+ this.el.innerHTML = '';
24683
+ const pickerBox = document.getElementById(`picker-vp-${this._id}`);
24684
+ if (pickerBox) {
24685
+ pickerBox.remove();
24686
+ }
24687
+ }
24688
+ async calculateLocation() {
24689
+ const pickerBox = document.getElementById(`picker-vp-${this._id}`);
24690
+ const placementArray = this.placement.split('-');
24691
+ if (this.alignment) {
24692
+ this.placement = placementArray[0] + (this.alignment == "right" ? "-end" : "-start");
24693
+ }
24694
+ var placement = this.placement;
24695
+ const targetElementId = this.linkedComponent ? this.linkedComponent : this._id;
24696
+ const target = document.getElementById(targetElementId);
24697
+ if (target) {
24698
+ const targetElement = this.linkedComponent ? target : target.shadowRoot.querySelector(`#picker-input-${this._id}`) || target.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);
24699
+ if (pickerBox && targetElement) {
24700
+ popoverPlacement.getPlacement(pickerBox, targetElement, placement, (place) => (placement = place));
24701
+ await utils.delay(10);
24702
+ let pos = popoverPlacement.setPosition(placement, targetElement);
24703
+ let captionAreaHeight = this.noCaption ? 0 : 20;
24704
+ let labelAreaHeight = 0;
24705
+ // if (this.fullWidth) {
24706
+ // pickerBox.style.width = targetElement.offsetWidth + 'px';
24707
+ // }
24708
+ popoverPlacement.getPlacement(pickerBox, targetElement, placement, (place) => (placement = place));
24709
+ await utils.delay(10);
24710
+ pos = popoverPlacement.setPosition(placement, targetElement);
24711
+ if (this.linkedComponent) {
24712
+ pickerBox.style.top = (placement.split('-')[0] == 'top' ? pos[0] - pickerBox.offsetHeight : pos[0]) + 'px';
24713
+ }
24714
+ else {
24715
+ pickerBox.style.top = (placement.split('-')[0] == 'top' ? pos[0] - pickerBox.offsetHeight + labelAreaHeight : pos[0] - captionAreaHeight) + 'px';
24716
+ }
24717
+ switch (placement.split('-')[1]) {
24718
+ case "start":
24719
+ pickerBox.style.left = pos[1] + 'px';
24720
+ break;
24721
+ case "center":
24722
+ pickerBox.style.left = pos[1] - pickerBox.offsetWidth / 2 + 'px';
24723
+ break;
24724
+ case "end":
24725
+ pickerBox.style.left = pos[1] - pickerBox.offsetWidth + 'px';
24726
+ break;
24727
+ }
24728
+ pickerBox.classList.toggle('bcm-list--top', placement.split('-')[0] == 'top');
24729
+ }
24730
+ }
24731
+ }
24732
+ handleKeyDown(ev) {
24733
+ const keycode = ev.keyCode || ev.which;
24734
+ if (keycode === bcm.Bcm.KeyCode.escape) {
24735
+ if (this._open) {
24736
+ this._open = false;
24737
+ ev.preventDefault();
24738
+ ev.stopPropagation();
24739
+ ev.stopImmediatePropagation();
24740
+ this.markForCheck();
24741
+ }
24742
+ }
24743
+ }
24744
+ render() {
24745
+ const dayNumbersClasses = index$3.classnames('day-numbers');
24746
+ const datetimePickerClasses = index$3.classnames('datetime-picker', 'datetime-picker-wrapper', {
24747
+ 'open': this._open,
24748
+ 'no-caption': this.noCaption,
24749
+ });
24750
+ const hostClasses = index$3.classnames(this.hidden ? 'hidden' : null, {
24751
+ 'full-width': this.fullWidth,
24752
+ 'linked-component': this.linkedComponent,
24753
+ 'no-margin': this.noMargin,
24754
+ });
24755
+ const toggleClasses = index$3.classnames('toggle', {
24756
+ disabled: this.disabled
24757
+ });
24758
+ const clockIcon = `<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm61.8-104.4l-84.9-61.7c-3.1-2.3-4.9-5.9-4.9-9.7V116c0-6.6 5.4-12 12-12h32c6.6 0 12 5.4 12 12v141.7l66.8 48.6c5.4 3.9 6.5 11.4 2.6 16.8L334.6 349c-3.9 5.3-11.4 6.5-16.8 2.6z"/></svg>`;
24759
+ const calendarIcon = `<svg style="fill: #595959; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M148 288h-40c-6.6 0-12-5.4-12-12v-40c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12zm108-12v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 96v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm-96 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm192 0v-40c0-6.6-5.4-12-12-12h-40c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12zm96-260v352c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V112c0-26.5 21.5-48 48-48h48V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h128V12c0-6.6 5.4-12 12-12h40c6.6 0 12 5.4 12 12v52h48c26.5 0 48 21.5 48 48zm-48 346V160H48v298c0 3.3 2.7 6 6 6h340c3.3 0 6-2.7 6-6z"/></svg>`;
24760
+ const errorIcon = `<svg style="fill: #ef4444; width: 14px; height: 14px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M256 8C119 8 8 119 8 256s111 248 248 248 248-111 248-248S393 8 256 8zm0 448c-110.5 0-200-89.5-200-200S145.5 56 256 56s200 89.5 200 200-89.5 200-200 200zm42-104c0 23.2-18.8 42-42 42s-42-18.8-42-42 18.8-42 42-42 42 18.8 42 42zm-81.4-211.4l6.8 136c.3 6.4 5.6 11.4 12 11.4h41.2c6.4 0 11.7-5.1 12-11.4l6.8-136c.3-6.9-5.1-12.6-12-12.6h-54.8c-6.9 0-12.4 5.7-12 12.6z"/></svg>`;
24761
+ const inputIcon = this.type == "time" ? clockIcon : calendarIcon;
24762
+ return (index$2.h(index$2.Host, { class: hostClasses, "bcm-internal-id": this.inputId }, this.label && (index$2.h("div", { class: "picker-label", onClick: () => this.openToggle() }, index$2.h(labelTemplate.LabelTemplate, { size: "medium", type: this.captionType, value: this.label, required: this.required, htmlFor: this._id }))), index$2.h("bcm-old-input", { ref: el => (this.inputElement = el), placeholder: this.placeholder || 'Select ' + (this.type === Types.datetime ? 'date and time' : '') + (this.type === Types.date ? 'date' : '') + (this.type === Types.time ? 'time' : '') + (this.type === Types.range ? 'date range' : ''), value: this.valueText, required: this.required, fullWidth: this.fullWidth, disabled: this.disabled, name: this.name, id: this.inputId, clearable: this.clearable, onClick: () => this.openPicker(), "no-margin": true, disableWatchValue: true, "on-bcm-clear": () => this.handleInputClear(), "on-bcm-change": (e) => this.handleInputChange(e),
24763
+ // on-bcm-input={(e: CustomEvent) => this.handleInputInput(e.detail)}
24764
+ noCaption: this.noCaption, captionError: this.captionError, caption: this.caption, captionType: this.captionType }, this.error && (index$2.h("span", { slot: "suffix" }, index$2.h("span", { id: "error-icon", class: toggleClasses, innerHTML: errorIcon, title: this.errorText }))), index$2.h("span", { slot: "suffix", onClick: () => this.openPicker() }, index$2.h("span", { id: "calender-icon", class: toggleClasses, innerHTML: inputIcon }))), index$2.h("div", { id: "picker-vp-" + this._id, class: datetimePickerClasses, onWheel: (e) => this.handleWheel(e) }, index$2.h("div", { class: "modules" }, this.hasDateModule && (index$2.h("div", { class: "date-container" }, index$2.h("div", { class: "bcm-datetime-picker__header" }, index$2.h("span", null), index$2.h("div", { class: "month-year" }, index$2.h("button", { onClick: () => this.getPrevMonth() }, index$2.h("bcm-icon", { icon: "far fa-chevron-left" })), index$2.h("div", { class: "month-year-wrapper" }, index$2.h("span", { class: "month" }, this.getMonthText()), ",", index$2.h("span", { class: "year" }, this.date.getFullYear())), index$2.h("button", { onClick: () => this.getNextMonth() }, index$2.h("bcm-icon", { icon: "far fa-chevron-right" }))), index$2.h("span", { class: "today", onClick: () => this.setDateToday() }, "Today")), index$2.h("div", { class: "bcm-datetime-picker__content" }, index$2.h("div", { class: "years", ref: el => (this.yearsWrapperElement = el) }, index$2.h("div", { class: "items", ref: el => (this.yearsElement = el) }, this.years.map((year, idx) => index$2.h("span", { onClick: () => this.yearClick(idx) }, year))), index$2.h("div", { class: "select-strip", ref: el => (this.yearsStripElement = el) })), index$2.h("div", { class: "days" }, index$2.h("div", { class: "day-labels" }, index$2.h("span", null, "Mo"), index$2.h("span", null, "Tu"), index$2.h("span", null, "We"), index$2.h("span", null, "Th"), index$2.h("span", null, "Fr"), index$2.h("span", null, "Sa"), index$2.h("span", null, "Su")), index$2.h("div", { class: dayNumbersClasses }, this.dayNumbers.map(day => (index$2.h("span", { class: {
24765
+ 'is-disabled-date': (this.type === Types.date || this.type === Types.datetime) && this.isDisabledDate(day.date),
24766
+ 'not-this-month': !day.thisMonth,
24767
+ 'is-weekend': day.isWeekend,
24768
+ 'today': day.today,
24769
+ 'selected': this.getSelected(day.date),
24770
+ 'selected-start': this.getSelected(day.date) && this.selectedEndDate && this.type === Types.range,
24771
+ 'selected-end': this.getSelected(day.date, true) && this.type === Types.range,
24772
+ 'range': this.getDateIsInRange(day.date) && this.type === Types.range
24773
+ }, onClick: () => this.handleDayNumber(day.date) }, index$2.h("span", { class: "number" }, day.day))))))))), this.hasTimeModule && (index$2.h("div", { class: "time-container" }, index$2.h("div", { class: "bcm-datetime-picker__header" }, index$2.h("div", { class: "month-year" }, index$2.h("span", { class: "month" }, this.getTimeText())), index$2.h("span", { class: "now", onClick: () => { this.setTime(), this.type == "time" && (this._open = false); } }, "Now")), index$2.h("div", { class: "bcm-datetime-picker__content", onDblClick: (e) => { this.HourContentDblClick(e); } }, index$2.h("div", { class: "hours", ref: el => (this.hoursWrapperElement = el) }, index$2.h("div", { class: "items", ref: el => (this.hoursElement = el) }, this.hours.map((hour, idx) => index$2.h("span", { class: this.currentDate.hour === hour ? 'selected' : '', onClick: () => this.hourClick(idx) }, (hour < 10 && '0') + hour)))), index$2.h("div", { class: "minutes", ref: el => (this.minutesWrapperElement = el) }, index$2.h("div", { class: "items", ref: el => (this.minutesElement = el) }, this.minutes.map((minute, idx) => index$2.h("span", { class: this.currentDate.minute === minute ? 'selected' : '', onClick: () => this.minuteClick(idx) }, (minute < 10 && '0') + minute)))), index$2.h("div", { class: "select-strip", ref: el => (this.timeStripElement = el) }))))))));
24774
+ }
24775
+ get el() { return index$2.getElement(this); }
24776
+ static get watchers() { return {
24777
+ "_open": ["openChanged", "openChange"],
24778
+ "renderDate": ["renderDateChange"],
24779
+ "value": ["valueChange"],
24780
+ "disabledDates": ["disabledDatesChange"]
24781
+ }; }
24782
+ };
24783
+ __decorate$5([
24784
+ isLoadDecorator.IsLoad()
24785
+ ], BcmDatetimePicker.prototype, "el", void 0);
24786
+ BcmDatetimePicker.style = datetimePickerCss;
24787
+
23201
24788
  const formCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block;margin-bottom:8px}:host(.hidden){display:none}";
23202
24789
 
23203
24790
  var __decorate$4 = (undefined && undefined.__decorate) || function (decorators, target, key, desc) {
@@ -24063,7 +25650,7 @@ const BcmLabel = class {
24063
25650
  }
24064
25651
  render() {
24065
25652
  const { required, value, label, size, form, htmlFor, type, tooltip } = this;
24066
- return (index$2.h(index$2.Host, { class: "tw-inline-block" }, index$2.h(labelTemplate.LabelTemplate, { form: form, htmlFor: htmlFor, value: value || label, size: size, type: type, required: required, tooltip: tooltip })));
25653
+ return (index$2.h(index$2.Host, { class: "tw-inline-block tw-leading-none" }, index$2.h(labelTemplate.LabelTemplate, { form: form, htmlFor: htmlFor, value: value || label, size: size, type: type, required: required, tooltip: tooltip })));
24067
25654
  }
24068
25655
  get el() { return index$2.getElement(this); }
24069
25656
  };
@@ -25764,6 +27351,388 @@ __decorate$1([
25764
27351
  ], BcmList.prototype, "dataChanged", null);
25765
27352
  BcmList.style = listCss;
25766
27353
 
27354
+ const oldInputCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.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}:host{display:inline-block;width:100%;margin:0 0 8px 0}:host(.hidden){display:none}:host(.no-margin){margin:0}.input-container{display:flex;flex-direction:column;width:100%;max-width:256px}.input-container.full-width{max-width:100%}.input-base{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;flex:1 1 auto;display:inline-flex;align-items:stretch;justify-content:start;position:relative;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;vertical-align:middle;overflow:hidden;padding:0 4px;cursor:text}.input-base.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.input-base.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-300)}.input-base.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.input-base.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.input-base:not(.disabled):hover .caret-container,.input-base:not(.disabled).focused .caret-container{opacity:1}.input-base:not(.disabled):hover .input-clear-button,.input-base:not(.disabled).focused .input-clear-button{opacity:1}.input-base:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.input-base:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.input-base.focused:not(.disabled) .caret-container{opacity:1}.input-base.focused:not(.disabled) .input-clear-button{opacity:1}.input-base:hover:not(.disabled) .caret-container{opacity:1}.input-base:hover:not(.disabled) .input-clear-button{opacity:1}.input-base.disabled{cursor:not-allowed}.input-base.readonly{cursor:default}.input-base.empty .input-clear-button{display:none}.input-base.invalid,.input-base.error{border-color:var(--bcm-new-ds-color-red-500)}.error .label{color:var(--bcm-new-ds-color-red-500) !important}.error .input-base{border-color:var(--bcm-new-ds-color-red-500) !important}.input-base input{color:var(--bcm-new-ds-color-slate-600);flex:1 1 auto;width:0%;border:none;border-radius:2px;background:none;box-shadow:none;padding:0;margin:0 4px;font-family:\"Inter\", sans-serif;cursor:inherit;-webkit-appearance:none;appearance:none}.input-base input::-webkit-search-decoration,.input-base input::-webkit-search-cancel-button,.input-base input::-webkit-search-results-button,.input-base input::-webkit-search-results-decoration{-webkit-appearance:none}.input-base input::placeholder{font-family:\"Inter\", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.input-base input:focus{outline:none}input::-webkit-calendar-picker-indicator{-webkit-appearance:none;display:none}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.input-prefix,.input-suffix{display:inline-flex;align-items:center;justify-content:center;cursor:default;color:var(--bcm-new-ds-color-slate-500)}.input-prefix ::slotted(*),.input-prefix>span{line-height:1;margin-left:4px}.input-suffix ::slotted(*),.input-suffix>span{line-height:1;margin-right:4px}.input-clear-button,.input-password-toggle{display:inline-flex;align-items:center;border:none;background:none;padding:0;cursor:pointer;margin-right:4px;transition:0.2s opacity}.input-clear-button:last-child,.input-clear-button:last-of-type,.input-password-toggle:last-child,.input-password-toggle:last-of-type{margin-right:8px}.input-clear-button:focus,.input-password-toggle:focus{outline:none}.input-clear-button{opacity:0}.label{display:flex;flex-direction:column;font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;color:var(--bcm-new-ds-color-slate-600);margin-bottom:4px}.caption-area{min-height:20px}.input-caption{display:block}.unit.input-suffix{width:24px}.unit-prefix{display:inline-flex;flex:0 0 auto;align-items:center;cursor:default;color:var(--bcm-color-grey-8)}.caret-container{opacity:0;width:30px;display:flex;flex-direction:column;justify-content:center;align-items:center;border-left:1px solid #D9D9D9;border-right:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box;margin-right:4px}.caret-container:last-of-type{margin-right:-space(\"xxxs\");border-right:none}.caret-container .caret{display:inline-flex;height:50%;width:100%;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer}.caret-container .caret:hover{color:var(--bcm-color-prime-blue-6)}.caret-container .caret:active{background-color:var(--bcm-color-grey-3)}.caret-container .caret:last-child{border-top:1px solid #D9D9D9}.caret-container.disabled{background-color:var(--bcm-color-grey-3)}.caret-container.disabled .caret{cursor:not-allowed}.default-icon{margin-right:8px}.input-large{height:40px}.input-medium{height:32px}.input-small{height:24px}.bcm-label{font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;margin-bottom:4px;font-weight:500;color:#475569}.bcm-label.tw-text-1{font-size:10px;line-height:18px}.bcm-label.tw-text-2{font-size:12px;line-height:20px}.bcm-label.tw-text-3{font-size:14px;line-height:22px}.bcm-caption-area{color:#dc2626;font-weight:400;justify-content:space-between;align-items:flex-start;flex-direction:row;min-height:20px;display:flex;margin-top:4px;font-family:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.bcm-caption-area.tw-text-1{font-size:10px;line-height:18px}.bcm-caption-area.tw-text-2{font-size:12px;line-height:20px}.bcm-caption-area.tw-text-3{font-size:14px;line-height:22px}";
27355
+
27356
+ let id = 0;
27357
+ const defaultIcons = {
27358
+ email: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z"/></svg>',
27359
+ tel: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M476.5 22.9L382.3 1.2c-21.6-5-43.6 6.2-52.3 26.6l-43.5 101.5c-8 18.6-2.6 40.6 13.1 53.4l40 32.7C311 267.8 267.8 311 215.4 339.5l-32.7-40c-12.8-15.7-34.8-21.1-53.4-13.1L27.7 329.9c-20.4 8.7-31.5 30.7-26.6 52.3l21.7 94.2c4.8 20.9 23.2 35.5 44.6 35.5C312.3 512 512 313.7 512 67.5c0-21.4-14.6-39.8-35.5-44.6zM69.3 464l-20.9-90.7 98.2-42.1 55.7 68.1c98.8-46.4 150.6-98 197-197l-68.1-55.7 42.1-98.2L464 69.3C463 286.9 286.9 463 69.3 464z"/></svg>',
27360
+ search: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M508.5 468.9L387.1 347.5c-2.3-2.3-5.3-3.5-8.5-3.5h-13.2c31.5-36.5 50.6-84 50.6-136C416 93.1 322.9 0 208 0S0 93.1 0 208s93.1 208 208 208c52 0 99.5-19.1 136-50.6v13.2c0 3.2 1.3 6.2 3.5 8.5l121.4 121.4c4.7 4.7 12.3 4.7 17 0l22.6-22.6c4.7-4.7 4.7-12.3 0-17zM208 368c-88.4 0-160-71.6-160-160S119.6 48 208 48s160 71.6 160 160-71.6 160-160 160z"/></svg>',
27361
+ url: '<svg style="fill: #595959; width: 14px; height: 14px" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M314.222 197.78c51.091 51.091 54.377 132.287 9.75 187.16-6.242 7.73-2.784 3.865-84.94 86.02-54.696 54.696-143.266 54.745-197.99 0-54.711-54.69-54.734-143.255 0-197.99 32.773-32.773 51.835-51.899 63.409-63.457 7.463-7.452 20.331-2.354 20.486 8.192a173.31 173.31 0 0 0 4.746 37.828c.966 4.029-.272 8.269-3.202 11.198L80.632 312.57c-32.755 32.775-32.887 85.892 0 118.8 32.775 32.755 85.892 32.887 118.8 0l75.19-75.2c32.718-32.725 32.777-86.013 0-118.79a83.722 83.722 0 0 0-22.814-16.229c-4.623-2.233-7.182-7.25-6.561-12.346 1.356-11.122 6.296-21.885 14.815-30.405l4.375-4.375c3.625-3.626 9.177-4.594 13.76-2.294 12.999 6.524 25.187 15.211 36.025 26.049zM470.958 41.04c-54.724-54.745-143.294-54.696-197.99 0-82.156 82.156-78.698 78.29-84.94 86.02-44.627 54.873-41.341 136.069 9.75 187.16 10.838 10.838 23.026 19.525 36.025 26.049 4.582 2.3 10.134 1.331 13.76-2.294l4.375-4.375c8.52-8.519 13.459-19.283 14.815-30.405.621-5.096-1.938-10.113-6.561-12.346a83.706 83.706 0 0 1-22.814-16.229c-32.777-32.777-32.718-86.065 0-118.79l75.19-75.2c32.908-32.887 86.025-32.755 118.8 0 32.887 32.908 32.755 86.025 0 118.8l-45.848 45.84c-2.93 2.929-4.168 7.169-3.202 11.198a173.31 173.31 0 0 1 4.746 37.828c.155 10.546 13.023 15.644 20.486 8.192 11.574-11.558 30.636-30.684 63.409-63.457 54.733-54.735 54.71-143.3-.001-197.991z"/></svg>'
27362
+ };
27363
+ const BcmOldInput = class {
27364
+ constructor(hostRef) {
27365
+ index$2.registerInstance(this, hostRef);
27366
+ this.focus = index$2.createEvent(this, "bcm-focus", 7);
27367
+ this.blur = index$2.createEvent(this, "bcm-blur", 7);
27368
+ this.clear = index$2.createEvent(this, "bcm-clear", 7);
27369
+ this.change = index$2.createEvent(this, "bcm-change", 7);
27370
+ this.input = index$2.createEvent(this, "bcm-input", 7);
27371
+ this.inputId = `input-${++id}`;
27372
+ this.isBlur = false;
27373
+ this.type = 'text';
27374
+ this.value = '';
27375
+ this.size = "medium";
27376
+ this.label = undefined;
27377
+ this.noCaption = false;
27378
+ this.noMargin = false;
27379
+ this.captionError = undefined;
27380
+ this.caption = undefined;
27381
+ this.captionType = 'default';
27382
+ this.placeholder = undefined;
27383
+ this.fullWidth = false;
27384
+ this.disabled = false;
27385
+ this.readonly = false;
27386
+ this.clearable = false;
27387
+ this.passwordToggle = undefined;
27388
+ this.noDefaultIcon = undefined;
27389
+ this._id = undefined;
27390
+ this._internal_id = (Math.random() * 4).toString(16).replace('.', '');
27391
+ this.name = undefined;
27392
+ this.unit = null;
27393
+ this.unitPrefix = null;
27394
+ this.decimal = undefined;
27395
+ this.min = null;
27396
+ this.max = null;
27397
+ this.step = null;
27398
+ this.hidden = false;
27399
+ this.required = false;
27400
+ this.disableWatchValue = false;
27401
+ this.maxLength = null;
27402
+ this.tooltip = undefined;
27403
+ this.inValid = false;
27404
+ this.valueCache = undefined;
27405
+ this.captionCache = undefined;
27406
+ this.captionTypeCache = undefined;
27407
+ this.hasFocus = false;
27408
+ this.isPasswordVisible = false;
27409
+ }
27410
+ async setFocus() {
27411
+ this.inputElement.focus();
27412
+ }
27413
+ async removeFocus() {
27414
+ this.inputElement.blur();
27415
+ }
27416
+ async select() {
27417
+ return this.inputElement.select();
27418
+ }
27419
+ async setValue(value) {
27420
+ this.inputElement.value = value;
27421
+ this.value = value;
27422
+ this.handleChange();
27423
+ return value;
27424
+ }
27425
+ async setClear() {
27426
+ this.inputElement.value = '';
27427
+ this.value = '';
27428
+ await utils.delay(10);
27429
+ return Promise.resolve();
27430
+ }
27431
+ async resetCaption() {
27432
+ await utils.delay(10);
27433
+ this.caption = this.captionCache;
27434
+ this.captionType = this.captionTypeCache;
27435
+ this.captionError = null;
27436
+ await utils.delay(10);
27437
+ return Promise.resolve();
27438
+ }
27439
+ async getValue() {
27440
+ return this.value;
27441
+ }
27442
+ handleFocus() {
27443
+ this.hasFocus = true;
27444
+ this.focus.emit();
27445
+ }
27446
+ handleBlur() {
27447
+ this.hasFocus = false;
27448
+ this.isBlur = true;
27449
+ if (this.type == "email") {
27450
+ this.isEmailValid();
27451
+ }
27452
+ if (this.type == "tel") {
27453
+ this.isTelValid();
27454
+ }
27455
+ this.blur.emit();
27456
+ }
27457
+ handleChange() {
27458
+ this.value = this.inputElement.value;
27459
+ this.change.emit(this.value);
27460
+ }
27461
+ handleInput() {
27462
+ if (this.type == "number") {
27463
+ if (this.decimal == "false") {
27464
+ this.inputElement.value = this.inputElement.value.replace(/[^0-9-]/g, '');
27465
+ }
27466
+ else {
27467
+ this.inputElement.value = this.inputElement.value.replace(/[^0-9.,-]/g, '');
27468
+ }
27469
+ this.inputElement.value = this.inputElement.value.replace(/(\..*)\./g, '$1').replace(/(\-.*)\-/g, '$1');
27470
+ }
27471
+ this.value = this.inputElement.value;
27472
+ this.input.emit(this.value);
27473
+ }
27474
+ handleClear(e) {
27475
+ this.inputElement.value = '';
27476
+ this.value = '';
27477
+ this.inputElement.focus();
27478
+ this.change.emit(this.value);
27479
+ this.clear.emit(e);
27480
+ e.stopPropagation();
27481
+ }
27482
+ changePasswordVisibility() {
27483
+ this.isPasswordVisible = !this.isPasswordVisible;
27484
+ }
27485
+ incrementNumber() {
27486
+ if (!this.inValid && !this.disabled && !this.readonly) {
27487
+ let step = this.getNumberStep();
27488
+ let val = Number(this.value) + Number(step);
27489
+ this.value = this.numberDecimal(val);
27490
+ }
27491
+ }
27492
+ decrementNumber() {
27493
+ if (!this.inValid && !this.disabled && !this.readonly) {
27494
+ let step = this.getNumberStep();
27495
+ let val = Number(this.value) - Number(step);
27496
+ this.value = this.numberDecimal(val);
27497
+ }
27498
+ }
27499
+ getNumberStep(step = Number(this.step)) {
27500
+ let returnStep = 1;
27501
+ if (step && Number(step) == step)
27502
+ returnStep = step;
27503
+ return Number(returnStep);
27504
+ }
27505
+ connectedCallback() {
27506
+ this.changePasswordVisibility = this.changePasswordVisibility.bind(this);
27507
+ this.handleChange = this.handleChange.bind(this);
27508
+ this.handleBlur = this.handleBlur.bind(this);
27509
+ this.handleFocus = this.handleFocus.bind(this);
27510
+ this.handleInput = this.handleInput.bind(this);
27511
+ this.handleClear = this.handleClear.bind(this);
27512
+ this.incrementNumber = this.incrementNumber.bind(this);
27513
+ this.decrementNumber = this.decrementNumber.bind(this);
27514
+ this.valueCache = this.value;
27515
+ this.captionCache = this.caption;
27516
+ this.captionTypeCache = this.captionType;
27517
+ }
27518
+ validationRange(val = JSON.stringify({
27519
+ "value": this.value,
27520
+ "min": this.min,
27521
+ "max": this.max
27522
+ })) {
27523
+ let cap = null;
27524
+ let capType = null;
27525
+ let returnValidation = true;
27526
+ let item = JSON.parse(val);
27527
+ let { length, value, min, max } = item;
27528
+ length = parseFloat(length);
27529
+ value = parseFloat(value);
27530
+ min = parseFloat(min);
27531
+ max = parseFloat(max);
27532
+ length !== 0 && (value && (min && max && ((value < min || value > max) && (cap = "Please enter a value between " + min + " and " + max + ".",
27533
+ capType = "error",
27534
+ returnValidation = false)) || min && !max && (value < min && (cap = "Please enter a value greater than or equal to " + min + ".",
27535
+ capType = "error",
27536
+ returnValidation = false)) || !min && max && (value > max && (cap = "Please enter a value less than or equal to " + max + ".",
27537
+ capType = "error",
27538
+ returnValidation = false))));
27539
+ this.setCaption(cap, capType);
27540
+ return returnValidation;
27541
+ }
27542
+ setCaption(caption = null, captionType = null) {
27543
+ this.caption = caption ? caption : this.captionCache;
27544
+ this.captionType = captionType ? captionType : this.captionTypeCache;
27545
+ this.captionError = captionType == "error" ? caption : null;
27546
+ }
27547
+ isEmailValid() {
27548
+ const { value } = this;
27549
+ const regexp = new RegExp(/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/);
27550
+ let cap = null;
27551
+ let capType = null;
27552
+ if (value && !regexp.test(value)) {
27553
+ cap = "Please enter a valid email address.",
27554
+ capType = "error",
27555
+ this.inValid = true;
27556
+ }
27557
+ else {
27558
+ this.inValid = false;
27559
+ }
27560
+ this.setCaption(cap, capType);
27561
+ return this.inValid;
27562
+ }
27563
+ isTelValid() {
27564
+ const { value } = this;
27565
+ const regexp = new RegExp(/^(?=.*[0-9])[- +()0-9]+$/);
27566
+ let cap = null;
27567
+ let capType = null;
27568
+ if (value && !regexp.test(value)) {
27569
+ cap = "Please enter a valid phone number.",
27570
+ capType = "error",
27571
+ this.inValid = true;
27572
+ }
27573
+ else {
27574
+ this.inValid = false;
27575
+ }
27576
+ this.setCaption(cap, capType);
27577
+ return this.inValid;
27578
+ }
27579
+ isNumberValid(caption = "Invalid number", captionType = "error") {
27580
+ const { value } = this;
27581
+ if (value && Number(value) != value) {
27582
+ this.inValid = true;
27583
+ this.setCaption(caption, captionType);
27584
+ return true;
27585
+ }
27586
+ this.inValid = false;
27587
+ return false;
27588
+ }
27589
+ setNumberUnit() {
27590
+ const { value, unit } = this;
27591
+ if (Number(value) == value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 && !value)
27592
+ this.value = 0;
27593
+ }
27594
+ numberDecimal(val = '') {
27595
+ let decLen = this.getDecimalLength();
27596
+ if (val && decLen)
27597
+ return parseFloat(val).toFixed(decLen);
27598
+ return val;
27599
+ }
27600
+ numberNotDecimal(val = 0) {
27601
+ return Math.trunc(val);
27602
+ }
27603
+ getDecimalLength() {
27604
+ const { step } = this;
27605
+ let returnDecimalLength = 0, splitted, splitDec;
27606
+ if (step && Number(step) == step) {
27607
+ if (String(step).includes(".")) {
27608
+ splitted = String(step).split('.');
27609
+ splitDec = splitted[splitted.length - 1].length;
27610
+ }
27611
+ else {
27612
+ splitDec = 0;
27613
+ }
27614
+ returnDecimalLength = splitDec;
27615
+ }
27616
+ return Number(returnDecimalLength);
27617
+ }
27618
+ componentWillRender() {
27619
+ const { type } = this;
27620
+ if (type == "number" && this.value) {
27621
+ if (!this.isNumberValid()) {
27622
+ this.validationRange();
27623
+ }
27624
+ }
27625
+ if (this.isBlur) {
27626
+ if (type == "email" && this.value) {
27627
+ this.isEmailValid();
27628
+ }
27629
+ if (type == "tel" && this.value) {
27630
+ this.isTelValid();
27631
+ }
27632
+ }
27633
+ }
27634
+ componentWillLoad() {
27635
+ const { type, value } = this;
27636
+ if (type == "number" && Number(value) == value) {
27637
+ this.value = this.numberDecimal(value);
27638
+ }
27639
+ }
27640
+ numberControl(e) {
27641
+ if (!this.disabled && !this.readonly) {
27642
+ if (this.type == "number") {
27643
+ var which = e.which || 0;
27644
+ var key = e.key;
27645
+ which == 38 && ( // up arrow
27646
+ e.preventDefault(),
27647
+ this.incrementNumber());
27648
+ which == 40 && ( // down arrow
27649
+ e.preventDefault(),
27650
+ this.decrementNumber());
27651
+ key == "." && String(this.value).includes(".") && ( // dot: shouldn't be more than one
27652
+ e.preventDefault());
27653
+ if (which == 8 || //backspace / delete
27654
+ which == 9 || //tab
27655
+ which == 13 || //enter
27656
+ which == 16 || //shift
27657
+ which == 17 || //ctrl
27658
+ which == 18 || //alt
27659
+ which == 46 || //delete
27660
+ (which == 110 && (this.type == 'number' && this.decimal != false)) || //decimal point
27661
+ // (which == 188 && key == ",") || //comma
27662
+ (which == 190 && key == "." && (this.type == 'number' && this.decimal != false)) || //period
27663
+ (which == 189 && this.inputElement.value.length == 0) || //-
27664
+ (which == 109 && this.inputElement.value.length == 0) || //-
27665
+ (which >= 35 && which <= 40) || //end, home, left arrow, up arrow, right arrow, down arrow
27666
+ (which >= 48 && which <= 57) || //0-9
27667
+ (which >= 96 && which <= 105) //0-9(numpad)
27668
+ )
27669
+ return true;
27670
+ e.preventDefault();
27671
+ if (this.decimal == true) {
27672
+ this.value = this.numberDecimal(this.value);
27673
+ }
27674
+ else if (this.decimal == false) {
27675
+ this.value = this.numberNotDecimal(this.value);
27676
+ }
27677
+ }
27678
+ }
27679
+ }
27680
+ whatchHasFocus() {
27681
+ const { type, hasFocus, value, valueCache, inValid } = this;
27682
+ if (type == "number") {
27683
+ this.isNumberValid();
27684
+ let inValidState = false;
27685
+ if (hasFocus == true) {
27686
+ if (inValid == true) {
27687
+ this.value = '';
27688
+ inValidState = true;
27689
+ }
27690
+ }
27691
+ else {
27692
+ if (this.value == '' && inValid == false) {
27693
+ this.value = valueCache;
27694
+ inValidState = true;
27695
+ }
27696
+ if (value != valueCache && inValid == false && inValidState == false) {
27697
+ this.value = value ? this.numberDecimal(value) : '';
27698
+ }
27699
+ }
27700
+ }
27701
+ }
27702
+ watchValue() {
27703
+ if (!this.disableWatchValue && this.type != 'number') {
27704
+ this.handleChange();
27705
+ }
27706
+ }
27707
+ render() {
27708
+ const { value, size, label, type, captionType, caption, captionError, placeholder, fullWidth, disabled, readonly, clearable, passwordToggle, isPasswordVisible, noDefaultIcon, unit, inValid, hasFocus, unitPrefix, noCaption, required } = this;
27709
+ const containerClasses = index$3.classnames('input-container', {
27710
+ 'full-width': fullWidth,
27711
+ 'error': captionType == 'error' ? true : false
27712
+ });
27713
+ const baseClasses = index$3.classnames('input-base', 'input-' + size, {
27714
+ 'invalid': inValid,
27715
+ 'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0,
27716
+ 'focused': hasFocus,
27717
+ 'disabled': disabled,
27718
+ 'readonly': readonly,
27719
+ 'empty': (value === null || value === void 0 ? void 0 : value.length) < 1
27720
+ });
27721
+ const inputClass = size === 'large' ? 'size-3' : 'size-2';
27722
+ const hostClasses = index$3.classnames(this.hidden ? 'hidden' : null, this.noMargin ? 'no-margin' : null);
27723
+ return (index$2.h(index$2.Host, { class: hostClasses }, index$2.h("div", { class: containerClasses }, label && index$2.h("div", null, index$2.h("bcm-label", { tooltip: this.tooltip, type: captionType, value: label, required: required, htmlFor: this.inputId })), index$2.h("div", { class: baseClasses }, index$2.h("span", { class: "input-prefix" }, index$2.h("slot", { name: "prefix" }), unitPrefix && index$2.h("span", { class: index$3.classnames(inputClass, 'unit-prefix') }, unitPrefix)), index$2.h("input", { "bcm-internal-id": this._id, id: this.inputId, class: inputClass, ref: el => (this.inputElement = el), onFocus: this.handleFocus, onBlur: this.handleBlur, onChange: this.handleChange, onInput: this.handleInput, maxLength: this.maxLength, type: type === 'password' && isPasswordVisible ? 'text' :
27724
+ type === 'number' ? 'text' : type, placeholder: placeholder, value: type === 'number' && !this.hasFocus
27725
+ ? value + (value && (unit === null || unit === void 0 ? void 0 : unit.length) > 0 ? ' ' + unit : '')
27726
+ : value, disabled: this.disabled, readonly: this.readonly }), clearable && !this.disabled && (index$2.h("button", { class: "input-clear-button", onClick: this.handleClear }, index$2.h("svg", { style: { "fill": "#595959", "width": "14px", "height": "14px" }, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512" }, index$2.h("path", { d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z" })))), type === 'password' && passwordToggle && (index$2.h("button", { class: "input-password-toggle", onClick: this.changePasswordVisibility }, index$2.h("bcm-icon", { icon: isPasswordVisible ? "far fa-eye-invisible" : "far fa-eye" }))), Object.keys(defaultIcons).includes(type) && !noDefaultIcon && (index$2.h("span", { class: "input-suffix default-icon", innerHTML: defaultIcons[type] })), type === 'number' && (index$2.h("div", { class: index$3.classnames('caret-container', { 'unit': (unit === null || unit === void 0 ? void 0 : unit.length) > 0 }, { 'disabled': inValid }, { 'disabled': readonly }) }, index$2.h("span", { class: "caret", onClick: inValid == false && this.incrementNumber }, index$2.h("bcm-icon", { icon: "far fa-caret-up" })), index$2.h("span", { class: "caret", onClick: inValid == false && this.decrementNumber }, index$2.h("bcm-icon", { icon: "far fa-caret-down" })))), type !== 'number' && (index$2.h("span", { class: "input-suffix" }, index$2.h("slot", { name: "suffix" })))), index$2.h(captionTemplate.CaptionTemplate, { noCaption: noCaption, captionType: captionType, captionError: captionError, caption: caption }))));
27727
+ }
27728
+ get el() { return index$2.getElement(this); }
27729
+ static get watchers() { return {
27730
+ "hasFocus": ["whatchHasFocus"],
27731
+ "value": ["watchValue"]
27732
+ }; }
27733
+ };
27734
+ BcmOldInput.style = oldInputCss;
27735
+
25767
27736
  function _extends$4() {
25768
27737
  _extends$4 = Object.assign ? Object.assign.bind() : function (target) {
25769
27738
  for (var i = 1; i < arguments.length; i++) {
@@ -37819,12 +39788,15 @@ exports.bcm_button = BcmButton;
37819
39788
  exports.bcm_checkbox = BcmCheckbox;
37820
39789
  exports.bcm_colorful = BcmColorful;
37821
39790
  exports.bcm_date = BcmDate;
39791
+ exports.bcm_date_picker = BcmDatePicker;
39792
+ exports.bcm_datetime_picker = BcmDatetimePicker;
37822
39793
  exports.bcm_form = BcmForm;
37823
39794
  exports.bcm_icon = BcmIcon;
37824
39795
  exports.bcm_input = BcmInput;
37825
39796
  exports.bcm_label = BcmLabel;
37826
39797
  exports.bcm_linked = BcmLinked;
37827
39798
  exports.bcm_list = BcmList;
39799
+ exports.bcm_old_input = BcmOldInput;
37828
39800
  exports.bcm_rc_overflow = BcmRcOverflow;
37829
39801
  exports.bcm_rc_picker = BcmRcPicker;
37830
39802
  exports.bcm_search = BcmSearch;