bromcom-ui 2.11.1-rc.9-3 → 2.11.1-rc.9-5

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 (184) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-ede82918.js → p-0745c696.js} +1 -1
  4. package/dist/bromcom-ui/{p-dc607ae4.entry.js → p-0e3e8cc2.entry.js} +1 -1
  5. package/dist/bromcom-ui/p-0fa6d3a8.entry.js +5 -0
  6. package/dist/bromcom-ui/{p-14ed8029.entry.js → p-160fba10.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-3361f6c9.entry.js → p-201b04e8.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-627c7769.entry.js → p-29263575.entry.js} +1 -1
  9. package/dist/bromcom-ui/p-2b42d77e.entry.js +5 -0
  10. package/dist/bromcom-ui/{p-e497cf5d.entry.js → p-2d9b633e.entry.js} +1 -1
  11. package/dist/bromcom-ui/{p-5bf1657b.entry.js → p-2e9c0070.entry.js} +1 -1
  12. package/dist/bromcom-ui/{p-ebeb9689.entry.js → p-33f3c5c5.entry.js} +1 -1
  13. package/dist/bromcom-ui/{p-abd2f9ff.entry.js → p-4342cdf8.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-bca0ff0a.entry.js → p-4b44c0ea.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-a018f340.entry.js → p-51ba5764.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-35c215f2.entry.js → p-57678987.entry.js} +1 -1
  17. package/dist/bromcom-ui/{p-fba1682e.entry.js → p-59327403.entry.js} +1 -1
  18. package/dist/bromcom-ui/{p-c10b07cc.entry.js → p-5bd4ba44.entry.js} +1 -1
  19. package/dist/bromcom-ui/{p-9589f69c.entry.js → p-5d670fd7.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-adcb30bc.entry.js → p-5dcc28c3.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-5f345ad2.entry.js +5 -0
  22. package/dist/bromcom-ui/{p-70253803.entry.js → p-62d2c650.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-61753299.js → p-6bea284a.js} +1 -1
  24. package/dist/bromcom-ui/{p-178fa936.entry.js → p-6ddd9d7e.entry.js} +1 -1
  25. package/dist/bromcom-ui/p-788d1fb1.entry.js +5 -0
  26. package/dist/bromcom-ui/{p-0eacfbb2.entry.js → p-856dac72.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-8b31581f.js → p-8bb0fe5d.js} +1 -1
  28. package/dist/bromcom-ui/{p-3cdfd8eb.entry.js → p-8e972c24.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-a4b675ef.entry.js → p-93c016f1.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-930f3618.js → p-9586997f.js} +1 -1
  31. package/dist/bromcom-ui/{p-6f37a4d7.entry.js → p-9b2e26f6.entry.js} +1 -1
  32. package/dist/bromcom-ui/p-9b8fcf49.entry.js +16 -0
  33. package/dist/bromcom-ui/{p-db15dca3.entry.js → p-a1d44a10.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-e93d6619.js → p-a2864264.js} +1 -1
  35. package/dist/bromcom-ui/p-aeb4be41.js +5 -0
  36. package/dist/bromcom-ui/{p-7fd22a35.entry.js → p-b0dc804a.entry.js} +1 -1
  37. package/dist/bromcom-ui/{p-5a391fcd.js → p-b51e5b06.js} +1 -1
  38. package/dist/bromcom-ui/p-c75b2352.entry.js +5 -0
  39. package/dist/bromcom-ui/p-c77541f4.js +10 -0
  40. package/dist/bromcom-ui/{p-5a22b74b.entry.js → p-cb56a1d9.entry.js} +1 -1
  41. package/dist/bromcom-ui/p-d1298c40.js +5 -0
  42. package/dist/bromcom-ui/{p-90223f9f.entry.js → p-d3b38aff.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-f9b59bcc.entry.js → p-d6cee6ba.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-e10780ed.entry.js → p-dce99e4d.entry.js} +1 -1
  45. package/dist/cjs/{bcm-accordion_46.cjs.entry.js → bcm-accordion_47.cjs.entry.js} +8764 -8633
  46. package/dist/cjs/bcm-alert.cjs.entry.js +3 -3
  47. package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +6 -6
  48. package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +6 -6
  49. package/dist/cjs/bcm-breadcrumb.cjs.entry.js +3 -3
  50. package/dist/cjs/bcm-caption.cjs.entry.js +6 -6
  51. package/dist/cjs/bcm-card.cjs.entry.js +4 -4
  52. package/dist/cjs/bcm-checkbox-lite_8.cjs.entry.js +3 -3
  53. package/dist/cjs/bcm-chip-group.cjs.entry.js +6 -6
  54. package/dist/cjs/bcm-collapse.cjs.entry.js +3 -3
  55. package/dist/cjs/bcm-date-picker.cjs.entry.js +3 -3
  56. package/dist/cjs/bcm-datetime-picker.cjs.entry.js +3 -3
  57. package/dist/cjs/bcm-default.cjs.entry.js +3 -3
  58. package/dist/cjs/bcm-form-2.cjs.entry.js +5 -4
  59. package/dist/cjs/bcm-input-2.cjs.entry.js +153 -0
  60. package/dist/cjs/bcm-input-custom.cjs.entry.js +3 -3
  61. package/dist/cjs/bcm-input-dropdown.cjs.entry.js +6 -6
  62. package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +6 -6
  63. package/dist/cjs/bcm-modal-2-header.cjs.entry.js +6 -6
  64. package/dist/cjs/bcm-modal-2.cjs.entry.js +6 -6
  65. package/dist/cjs/bcm-number-input.cjs.entry.js +260 -72
  66. package/dist/cjs/bcm-overlay_2.cjs.entry.js +1 -1
  67. package/dist/cjs/bcm-popover.cjs.entry.js +6 -6
  68. package/dist/cjs/bcm-range.cjs.entry.js +3 -3
  69. package/dist/cjs/bcm-react-number.cjs.entry.js +1230 -0
  70. package/dist/cjs/bcm-select.cjs.entry.js +1 -1
  71. package/dist/cjs/bcm-skeleton.cjs.entry.js +6 -6
  72. package/dist/cjs/bcm-table.cjs.entry.js +6 -6
  73. package/dist/cjs/bcm-tag.cjs.entry.js +4 -4
  74. package/dist/cjs/bcm-time-picker.cjs.entry.js +3 -3
  75. package/dist/cjs/bcm-toast.cjs.entry.js +3 -3
  76. package/dist/cjs/bromcom-ui.cjs.js +3 -3
  77. package/dist/cjs/{color-helper-c3a819ea.js → color-helper-dc98a2ca.js} +1 -1
  78. package/dist/cjs/{colors-078851ec.js → colors-250d0982.js} +13 -7
  79. package/dist/cjs/{generate-f73a098d.js → generate-e4106db0.js} +2 -2
  80. package/dist/cjs/{global-baf04c81.js → global-c0174398.js} +1 -1
  81. package/dist/cjs/index-e05a7c6f.js +545 -0
  82. package/dist/cjs/input.style-b5676e6a.js +122 -0
  83. package/dist/cjs/loader.cjs.js +3 -3
  84. package/dist/cjs/{number-helper-0543a62e.js → number-helper-0846aefe.js} +1 -1
  85. package/dist/cjs/old-bcm-popover-box.cjs.entry.js +4 -4
  86. package/dist/cjs/old-bcm-popover.cjs.entry.js +3 -3
  87. package/dist/cjs/{package-e717a31f.js → package-822a0e3f.js} +1 -1
  88. package/dist/cjs/{validators-77768582.js → validators-0fadce56.js} +1 -1
  89. package/dist/collection/collection-manifest.json +2 -0
  90. package/dist/collection/components/atoms/link/link.css +9 -3
  91. package/dist/collection/components/molecules/input/input.style.js +117 -0
  92. package/dist/collection/components/molecules/input/input2.js +918 -0
  93. package/dist/collection/components/molecules/number-input/number-input.js +777 -96
  94. package/dist/collection/components/molecules/number-input/react-input.js +96 -0
  95. package/dist/collection/components/molecules/radio/radio.js +1 -1
  96. package/dist/collection/components/organism/form/form.js +2 -2
  97. package/dist/collection/components/organism/form-2/bcm-form-components.js +2 -1
  98. package/dist/collection/components/organism/list/list.css +0 -1
  99. package/dist/collection/components/other_deprecated/select/select.css +1 -1
  100. package/dist/collection/components/third-parts/rc-picker/date.js +1 -1
  101. package/dist/collection/components/third-parts/rc-picker/rc-picker.css +40 -5
  102. package/dist/collection/components/third-parts/rc-picker/rc-picker.js +11 -2
  103. package/dist/components/{raf.js → Overflow.js} +692 -69
  104. package/dist/components/bcm-date.js +1 -1
  105. package/dist/components/bcm-form-2.js +2 -1
  106. package/dist/components/bcm-input-2.d.ts +11 -0
  107. package/dist/components/bcm-input-2.js +225 -0
  108. package/dist/components/bcm-number-input.js +295 -79
  109. package/dist/components/bcm-react-number.d.ts +11 -0
  110. package/dist/components/bcm-react-number.js +10 -0
  111. package/dist/components/bcm-select.js +1 -1
  112. package/dist/components/colors2.js +13 -7
  113. package/dist/components/form.js +2 -2
  114. package/dist/components/generate.js +1 -1
  115. package/dist/components/index.d.ts +2 -0
  116. package/dist/components/index.js +2 -0
  117. package/dist/components/input.style.js +120 -0
  118. package/dist/components/link.js +1 -1
  119. package/dist/components/list.js +1 -1
  120. package/dist/components/radio.js +1 -1
  121. package/dist/components/rc-overflow.js +1 -593
  122. package/dist/components/rc-picker.js +8620 -8025
  123. package/dist/components/react-input.js +1242 -0
  124. package/dist/esm/{bcm-accordion_46.entry.js → bcm-accordion_47.entry.js} +8656 -8526
  125. package/dist/esm/bcm-alert.entry.js +3 -3
  126. package/dist/esm/bcm-attendance-actions-comment.entry.js +6 -6
  127. package/dist/esm/bcm-attendance-actions-dropdown.entry.js +6 -6
  128. package/dist/esm/bcm-breadcrumb.entry.js +3 -3
  129. package/dist/esm/bcm-caption.entry.js +6 -6
  130. package/dist/esm/bcm-card.entry.js +4 -4
  131. package/dist/esm/bcm-checkbox-lite_8.entry.js +3 -3
  132. package/dist/esm/bcm-chip-group.entry.js +6 -6
  133. package/dist/esm/bcm-collapse.entry.js +3 -3
  134. package/dist/esm/bcm-date-picker.entry.js +3 -3
  135. package/dist/esm/bcm-datetime-picker.entry.js +3 -3
  136. package/dist/esm/bcm-default.entry.js +3 -3
  137. package/dist/esm/bcm-form-2.entry.js +5 -4
  138. package/dist/esm/bcm-input-2.entry.js +149 -0
  139. package/dist/esm/bcm-input-custom.entry.js +3 -3
  140. package/dist/esm/bcm-input-dropdown.entry.js +6 -6
  141. package/dist/esm/bcm-modal-2-footer.entry.js +6 -6
  142. package/dist/esm/bcm-modal-2-header.entry.js +6 -6
  143. package/dist/esm/bcm-modal-2.entry.js +6 -6
  144. package/dist/esm/bcm-number-input.entry.js +259 -71
  145. package/dist/esm/bcm-overlay_2.entry.js +1 -1
  146. package/dist/esm/bcm-popover.entry.js +6 -6
  147. package/dist/esm/bcm-range.entry.js +3 -3
  148. package/dist/esm/bcm-react-number.entry.js +1226 -0
  149. package/dist/esm/bcm-select.entry.js +1 -1
  150. package/dist/esm/bcm-skeleton.entry.js +6 -6
  151. package/dist/esm/bcm-table.entry.js +6 -6
  152. package/dist/esm/bcm-tag.entry.js +4 -4
  153. package/dist/esm/bcm-time-picker.entry.js +3 -3
  154. package/dist/esm/bcm-toast.entry.js +3 -3
  155. package/dist/esm/bromcom-ui.js +3 -3
  156. package/dist/esm/{color-helper-3b528349.js → color-helper-74614f24.js} +1 -1
  157. package/dist/esm/{colors-c530a5b8.js → colors-dd598eea.js} +13 -7
  158. package/dist/esm/{generate-c2c0b02e.js → generate-dbe68f53.js} +2 -2
  159. package/dist/esm/{global-2473677b.js → global-0bea93f1.js} +1 -1
  160. package/dist/esm/index-036974d7.js +541 -0
  161. package/dist/esm/input.style-e855c0f3.js +120 -0
  162. package/dist/esm/loader.js +3 -3
  163. package/dist/esm/{number-helper-75447fa6.js → number-helper-4a35e676.js} +1 -1
  164. package/dist/esm/old-bcm-popover-box.entry.js +4 -4
  165. package/dist/esm/old-bcm-popover.entry.js +3 -3
  166. package/dist/esm/{package-28dc6847.js → package-c9093920.js} +1 -1
  167. package/dist/esm/{validators-5a383988.js → validators-0d9bab98.js} +1 -1
  168. package/dist/types/components/molecules/input/input.style.d.ts +576 -0
  169. package/dist/types/components/molecules/input/input2.d.ts +64 -0
  170. package/dist/types/components/molecules/number-input/number-input.d.ts +66 -17
  171. package/dist/types/components/molecules/number-input/react-input.d.ts +16 -0
  172. package/dist/types/components.d.ts +203 -19
  173. package/package.json +4 -3
  174. package/dist/bromcom-ui/p-350dbff0.entry.js +0 -5
  175. package/dist/bromcom-ui/p-3a43bf45.js +0 -5
  176. package/dist/bromcom-ui/p-64f21481.entry.js +0 -20
  177. package/dist/bromcom-ui/p-bb46d881.entry.js +0 -5
  178. package/dist/bromcom-ui/p-c7030364.entry.js +0 -5
  179. package/dist/bromcom-ui/p-de0b0192.entry.js +0 -5
  180. package/dist/cjs/bcm-link.cjs.entry.js +0 -51
  181. package/dist/collection/components/molecules/number-input/number-input.css +0 -137
  182. package/dist/collection/components/molecules/number-input/number-input.style.js +0 -45
  183. package/dist/esm/bcm-link.entry.js +0 -47
  184. package/dist/types/components/molecules/number-input/number-input.style.d.ts +0 -200
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as i,c as e,h as t,H as s,g as h}from"./p-170cf07d.js";import{c as o}from"./p-e0ab7b38.js";import{a as p}from"./p-a313fba6.js";import{G as n}from"./p-930f3618.js";import"./p-6657830f.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";const a=class{constructor(t){i(this,t),this.onShow=e(this,"bcm-show",7),this.onHide=e(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const i=document.createElement("old-bcm-popover-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("_title",this._title),i.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(i)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}render(){const i=o("bcm-popover");return t(s,{class:i,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
5
+ import{r as i,c as e,h as t,H as s,g as h}from"./p-170cf07d.js";import{c as o}from"./p-e0ab7b38.js";import{a as p}from"./p-a313fba6.js";import{G as n}from"./p-9586997f.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";const a=class{constructor(t){i(this,t),this.onShow=e(this,"bcm-show",7),this.onHide=e(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const i=document.createElement("old-bcm-popover-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("_title",this._title),i.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(i)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}render(){const i=o("bcm-popover");return t(s,{class:i,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import{r as t,c as i,h as e,H as n}from"./p-170cf07d.js";import{c as o}from"./p-e0ab7b38.js";import{I as r}from"./p-9850cbce.js";import{G as c}from"./p-9586997f.js";import{a}from"./p-a313fba6.js";import{C as s}from"./p-2cd6cdee.js";import{i as p}from"./p-d1298c40.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";import"./p-08c75801.js";const l=class{constructor(e){t(this,e),this.focus=i(this,"bcm-focus",7),this.blur=i(this,"bcm-blur",7),this.clear=i(this,"bcm-clear",7),this.change=i(this,"bcm-change",7),this.input=i(this,"bcm-input",7),this._id=c.UID(),this._internal_id=c.UID(),this.value="",this.size=a.Size.medium,this.label=void 0,this.pattern=void 0,this.tooltip=void 0,this.placeholder=void 0,this.disabled=!1,this.readonly=!1,this.clearable=!1,this.autocomplete=!1,this.name=void 0,this.type=a.InputType.text,this.hidden=!1,this.required=!1,this.fullWidth=!1,this.noDefaultIcon=void 0,this.disableWatchValue=!1,this.passwordToggle=!1,this.maxLength=null,this.minLength=null,this.unitPrefix=null,this.unit=void 0,this.decimal=!0,this.min=void 0,this.max=void 0,this.step=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this._prefix=void 0,this._suffix=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.inValid=!1,this.valueCache="",this.focused=!1,this.isPasswordVisible=!1}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}handleClear(t){this.inputElement.value="",this.value="",this.inputElement.focus(),this.clear.emit(t),this.change.emit(this.value),t.stopPropagation()}handleInput(t){this.value=this.inputElement.value,this.input.emit(this.value),this.change.emit(this.value)}handleChange(t){this.value=this.inputElement.value,this.change.emit(this.value)}handleFocus(t){this.focused=!0,this.focus.emit(t)}handleBlur(t){this.focused=!1,this.blur.emit(t)}handleKeyUp(t){"Enter"===t.key&&this.blur.emit(t)}render(){const{value:t,size:i,label:r,type:c,captionType:a,caption:l,captionError:m,placeholder:u,fullWidth:b,disabled:h,readonly:d,clearable:x,unit:g,inValid:f,focused:_,noCaption:v,required:y,hidden:z,_id:w,autocomplete:k,_prefix:j,_suffix:C}=this,B=(null==t?void 0:t.length)>0&&x,{host:D,inputContainer:I,input:E,slotClass:F,clearButton:R,controls:T,controlsBtn:q,controlsBtnDown:H,controlsBtnUp:M,controlsDivider:U}=p({size:i,fullWidth:b,focused:_,clearable:B,disabled:h,readonly:d,invalid:f,unit:(null==g?void 0:g.length)>0,error:"error"===a,hidden:z});return e(n,{class:D(),onClick:()=>this.onBcmFocus()},r&&e("bcm-label",{tooltip:this.tooltip,type:a,value:r,required:y,htmlFor:w}),e("div",{class:I()},e("div",{class:F()},e("slot",{name:"prefix"},j&&j.length>0&&e("span",{innerHTML:j}))),e("input",{class:E(),id:w,type:c,value:t,pattern:this.pattern,placeholder:u,disabled:h,readonly:d,ref:t=>this.inputElement=t,onInput:t=>this.handleInput(t),onChange:t=>this.handleChange(t),onFocus:t=>this.handleFocus(t),onBlur:t=>this.handleBlur(t),onKeyUp:t=>this.handleKeyUp(t),autoComplete:k?"on":"off",required:y}),e("div",{class:F()},B&&e("button",{type:"button",class:R(),onClick:t=>this.handleClear(t)},e("i",{class:"far fa-times"})),e("slot",{name:"suffix"},C&&C.length>0&&e("span",{innerHTML:C})),"number"===c&&e("div",{class:T()},e("button",{type:"button",onClick:()=>this.onBcmFocus(),class:o(q(),M())},e("i",{class:"fas fa-caret-up"})),e("div",{class:U()}),e("button",{type:"button",onClick:()=>this.onBcmFocus(),class:o(q(),H())},e("i",{class:"fas fa-caret-down"}))))),e(s,{noCaption:v,captionType:a,captionError:m,caption:l,customErrorMessage:this.customErrorMessage}))}};(function(t,i,e,n){var o,r=arguments.length,c=r<3?i:null===n?n=Object.getOwnPropertyDescriptor(i,e):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,i,e,n);else for(var a=t.length-1;a>=0;a--)(o=t[a])&&(c=(r<3?o(c):r>3?o(i,e,c):o(i,e))||c);r>3&&c&&Object.defineProperty(i,e,c)})([r()],l.prototype,"inputElement",void 0),l.style='@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-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{l as bcm_input_2}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as i,H as e,g as s}from"./p-170cf07d.js";import{c as a}from"./p-e0ab7b38.js";import{I as h}from"./p-9850cbce.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-930f3618.js";import{a as r}from"./p-a313fba6.js";import{d as l}from"./p-8c018ae0.js";import"./p-6657830f.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";const o=class{constructor(i){t(this,i),this._id=p.UID(),this.date=new Date,this.value=void 0,this.endDate=null,this.range=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabledDates="",this.disabled=!1,this.noMargin=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this._internal_id=(4*Math.random()).toString(16).replace(".",""),this.placement=r.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.stateStartDate=null,this.stateEndDate=null}handleStartDateChange(){this.handleDate()}handleEndDateChange(){this.handleDate()}handlePickerLoad(){this.value=this.picker.value}handlePickerChange(t){this.value=t.detail}async set(t){return this.picker.set(t)}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setDisabled(t){this.disabled=t}async setClear(){return await this.picker.setClear(),await l(10),Promise.resolve()}async setStartDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateStartDate=t):this.setClear()}async setEndDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateEndDate=t):this.setClear()}handleDate(){this.range?this.stateStartDate&&this.stateEndDate&&this.set(this.stateStartDate+"-"+this.stateEndDate):this.set(this.stateStartDate)}async getInput(){return await this.picker.getInput()}async open(){return await this.picker.open()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async resetCaption(){return await l(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent});return i(e,{class:t},i("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:t=>this.picker=t,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":t=>this.handlePickerChange(t),noCaption:this.noCaption,caption:this.caption,captionError:this.captionError,captionType:this.captionType,alignment:this.alignment,placement:this.placement,noMargin:this.noMargin}))}get el(){return s(this)}static get watchers(){return{stateStartDate:["handleStartDateChange"],stateEndDate:["handleEndDateChange"]}}};(function(t,i,e,s){var a,h=arguments.length,n=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(n=(h<3?a(n):h>3?a(i,e,n):a(i,e))||n);h>3&&n&&Object.defineProperty(i,e,n)})([h()],o.prototype,"el",void 0),o.style='@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}';export{o as bcm_date_picker}
5
+ import{r as t,h as i,H as e,g as s}from"./p-170cf07d.js";import{c as a}from"./p-e0ab7b38.js";import{I as h}from"./p-9850cbce.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-9586997f.js";import{a as r}from"./p-a313fba6.js";import{d as l}from"./p-8c018ae0.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";const o=class{constructor(i){t(this,i),this._id=p.UID(),this.date=new Date,this.value=void 0,this.endDate=null,this.range=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabledDates="",this.disabled=!1,this.noMargin=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this._internal_id=(4*Math.random()).toString(16).replace(".",""),this.placement=r.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.stateStartDate=null,this.stateEndDate=null}handleStartDateChange(){this.handleDate()}handleEndDateChange(){this.handleDate()}handlePickerLoad(){this.value=this.picker.value}handlePickerChange(t){this.value=t.detail}async set(t){return this.picker.set(t)}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setDisabled(t){this.disabled=t}async setClear(){return await this.picker.setClear(),await l(10),Promise.resolve()}async setStartDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateStartDate=t):this.setClear()}async setEndDate(t){t?(t=n.convertTimeStampToDate(new Date(t).getTime()),this.stateEndDate=t):this.setClear()}handleDate(){this.range?this.stateStartDate&&this.stateEndDate&&this.set(this.stateStartDate+"-"+this.stateEndDate):this.set(this.stateStartDate)}async getInput(){return await this.picker.getInput()}async open(){return await this.picker.open()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async resetCaption(){return await l(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent});return i(e,{class:t},i("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:t=>this.picker=t,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":t=>this.handlePickerChange(t),noCaption:this.noCaption,caption:this.caption,captionError:this.captionError,captionType:this.captionType,alignment:this.alignment,placement:this.placement,noMargin:this.noMargin}))}get el(){return s(this)}static get watchers(){return{stateStartDate:["handleStartDateChange"],stateEndDate:["handleEndDateChange"]}}};(function(t,i,e,s){var a,h=arguments.length,n=h<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(n=(h<3?a(n):h>3?a(i,e,n):a(i,e))||n);h>3&&n&&Object.defineProperty(i,e,n)})([h()],o.prototype,"el",void 0),o.style='@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}';export{o as bcm_date_picker}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{C as r}from"./p-436364c8.js";import{e as s}from"./p-8c018ae0.js";import{c as t}from"./p-3a43bf45.js";class e{static parseColor(r,s=600){if(!r)return{tone:null,colorName:null};const[t,e]=r.split("-");return{tone:e?parseInt(e):s,colorName:t}}}e.isHex=r=>/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r),e.isRgb=r=>/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(r),e.isRgba=r=>/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(r),e.isHsl=r=>/^hsl\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%)\)$/.test(r),e.isHsla=r=>/^hsla\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%),\s*(\d{1,3})\)$/.test(r),e.isVariable=r=>/^var\((.*)\)$/.test(r),e.extractVariable=r=>r.match(/^var\((.*)\)$/)[1],e.convertColorToHex=t=>{if(t){if(e.isVariable(t)){const r=e.extractVariable(t);return getComputedStyle(document.documentElement).getPropertyValue(r)}if(e.isHex(t))return t;if(e.isRgb(t)){const r=t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/);return`#${(16777216+65536*parseInt(r[1])+256*parseInt(r[2])+parseInt(r[3])).toString(16).substring(1)}`}if(s(r,t))return s(r,t)}},e.reverseColor=r=>{let s=e.convertColorToHex(r).trim();if(s)return 4===s.length&&(s=`#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`),(299*parseInt(s.substring(1,3),16)+587*parseInt(s.substring(3,5),16)+114*parseInt(s.substring(5,7),16))/1e3>=200?"#334155":"#fff"},e.dsColor=r=>"var(--bcm-new-ds-color-"+r+")",e.getTwColorToHex=r=>e.getTwColor(r)||t.blue[500],e.getTwColor=(r,s=!1)=>{if(t[r])return t[r];const e=r.split("-"),n=e[e.length-1],o=e.slice(0,e.length-1).join("-");return t[o]&&t[o][n]?s?1:t[o][n]:t[o]?s?2:t[o]:(console.warn("Color not found in tailwind colors: "+r),0)},e.twColor=(r,s="500")=>{const t=r&&-1===r.indexOf("-")?`${r}-${s}`:r,n=e.getTwColor(t,!0);return 1===n?t:2===n?r:"blue-500"},e.twColorReverse=r=>e.reverseColor(e.getTwColorToHex(r)),e.generateStyleString=r=>Object.keys(r).reduce(((s,t)=>`${s}${t}:${r[t]};`),"");export{e as C}
5
+ import{C as r}from"./p-436364c8.js";import{e as s}from"./p-8c018ae0.js";import{c as t}from"./p-aeb4be41.js";class e{static parseColor(r,s=600){if(!r)return{tone:null,colorName:null};const[t,e]=r.split("-");return{tone:e?parseInt(e):s,colorName:t}}}e.isHex=r=>/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(r),e.isRgb=r=>/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(r),e.isRgba=r=>/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/.test(r),e.isHsl=r=>/^hsl\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%)\)$/.test(r),e.isHsla=r=>/^hsla\((\d{1,3}),\s*(\d{1,3}%),\s*(\d{1,3}%),\s*(\d{1,3})\)$/.test(r),e.isVariable=r=>/^var\((.*)\)$/.test(r),e.extractVariable=r=>r.match(/^var\((.*)\)$/)[1],e.convertColorToHex=t=>{if(t){if(e.isVariable(t)){const r=e.extractVariable(t);return getComputedStyle(document.documentElement).getPropertyValue(r)}if(e.isHex(t))return t;if(e.isRgb(t)){const r=t.match(/^rgb\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3})\)$/);return`#${(16777216+65536*parseInt(r[1])+256*parseInt(r[2])+parseInt(r[3])).toString(16).substring(1)}`}if(s(r,t))return s(r,t)}},e.reverseColor=r=>{let s=e.convertColorToHex(r).trim();if(s)return 4===s.length&&(s=`#${s[1]}${s[1]}${s[2]}${s[2]}${s[3]}${s[3]}`),(299*parseInt(s.substring(1,3),16)+587*parseInt(s.substring(3,5),16)+114*parseInt(s.substring(5,7),16))/1e3>=200?"#334155":"#fff"},e.dsColor=r=>"var(--bcm-new-ds-color-"+r+")",e.getTwColorToHex=r=>e.getTwColor(r)||t.blue[500],e.getTwColor=(r,s=!1)=>{if(t[r])return t[r];const e=r.split("-"),n=e[e.length-1],o=e.slice(0,e.length-1).join("-");return t[o]&&t[o][n]?s?1:t[o][n]:t[o]?s?2:t[o]:(console.warn("Color not found in tailwind colors: "+r),0)},e.twColor=(r,s="500")=>{const t=r&&-1===r.indexOf("-")?`${r}-${s}`:r,n=e.getTwColor(t,!0);return 1===n?t:2===n?r:"blue-500"},e.twColorReverse=r=>e.reverseColor(e.getTwColorToHex(r)),e.generateStyleString=r=>Object.keys(r).reduce(((s,t)=>`${s}${t}:${r[t]};`),"");export{e as C}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as p,H as s,g as r}from"./p-170cf07d.js";import"./p-61753299.js";import"./p-626a65e9.js";import{G as o}from"./p-930f3618.js";import"./p-ede82918.js";import"./p-a0d6d680.js";import"./p-e93d6619.js";import"./p-7e44e6b5.js";import"./p-a313fba6.js";import{c as e}from"./p-e0ab7b38.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-3a43bf45.js";import"./p-6657830f.js";import"./p-8b31581f.js";const i=class{constructor(p){t(this,p),this._id=o.UID(),this.el.slot="footer"}render(){return p(s,{class:e("tw-flex tw-flex-row tw-items-center tw-justify-end tw-gap-2 tw-px-6 tw-pb-6 tw-pt-2")},p("slot",null))}get el(){return r(this)}};export{i as bcm_modal_2_footer}
5
+ import{r as t,h as p,H as s,g as r}from"./p-170cf07d.js";import"./p-6bea284a.js";import"./p-626a65e9.js";import{G as o}from"./p-9586997f.js";import"./p-0745c696.js";import"./p-a0d6d680.js";import"./p-a2864264.js";import"./p-7e44e6b5.js";import"./p-a313fba6.js";import{c as e}from"./p-e0ab7b38.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-aeb4be41.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";const i=class{constructor(p){t(this,p),this._id=o.UID(),this.el.slot="footer"}render(){return p(s,{class:e("tw-flex tw-flex-row tw-items-center tw-justify-end tw-gap-2 tw-px-6 tw-pb-6 tw-pt-2")},p("slot",null))}get el(){return r(this)}};export{i as bcm_modal_2_footer}
@@ -0,0 +1,5 @@
1
+ /*!
2
+ * Built with Stencil
3
+ * Copyright (c) Bromcom.
4
+ */
5
+ import{r as t,c as e,f as i,h as s,H as a,g as o}from"./p-170cf07d.js";import{I as n}from"./p-9850cbce.js";import{G as r,s as h}from"./p-9586997f.js";import{S as p}from"./p-a0d6d680.js";import{a as l}from"./p-a313fba6.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";import"./p-6657830f.js";const c=["BCM-INPUT","BCM-TEXTAREA","BCM-SWITCH","BCM-CHECKBOX","BCM-RADIO-GROUP","BCM-CHECKBOX-GROUP","BCM-RANGE","BCM-FORM","BCM-FORM-GROUP","BCM-LIST","BCM-COLORPICKER","BCM-DATE","BCM-DATE-PICKER","BCM-TIME-PICKER","BCM-DATETIME-PICKER","BCM-SELECT","BCM-LISTBOX","BCM-CHIP-GROUP","BCM-INPUT-DROPDOWN","BCM-NUMBER-INPUT"];const m=class{constructor(i){t(this,i),this.bcmForm=e(this,"bcm-form",7),this.isLoad=!1,this.formData={},this.formObj=new Map,this._id=r.UID(),this.validation=!1}componentDidLoad(){this.isLoad=!0,i(this)}componentIsValid(t){if(!t.hidden){this.checkIsGroup(t);const e=["bcm-checkbox","bcm-switch"].includes(p.lowercase(t.tagName))?0==t.value:p.isNullOrEmpty(t.value);t.required&&(e?(t.captionError=l.FormErrorMessages.required,t.captionType="error",this.formObj.set(t.id,{name:t.name,valid:!1,errorDetails:t.captionError})):(t.captionError=null,t.captionType="default",this.formObj.delete(t.id)))}}isGroup(t){return["bcm-checkbox-group"].includes(p.lowercase(t.tagName))}checkIsGroup(t){if(this.isGroup(t))for(let e of Array.from(t.querySelectorAll("bcm-checkbox")))e&&this.componentIsValid(e)}changeCheckboxGroup(t){const e=t.target,{changed:i}=t.detail,s=Array.from(e.querySelectorAll("bcm-checkbox"));for(let t of s)t.id==i.element.id&&(t.value=i.event.value,this.componentIsValid(t))}bcmComponentList(){return h((()=>Array.from(this.el.querySelectorAll("*")).filter((t=>c.includes(t.tagName)&&(!t["s-hn"]||"BCM-FORM-2"==t["s-hn"]))).filter(Boolean)),[])}formResponse(){const t={formData:this.formData,isValid:0==this.formObj.size,errorDetails:Object.assign({},this.formObj.size>0&&Array.from(this.formObj).map((([t,e])=>({[e.name]:e.errorDetails})))),message:0==this.formObj.size?"":"Please fill in all inputs"};return this.bcmForm.emit(t),t}async setMethodType(t){const{isLoad:e,validation:i}=this;if(e)for(const e of this.bcmComponentList())try{await e[t](),"setClear"==t&&i&&this.componentIsValid(e)}catch(i){console.error(e.nodeName,t,i)}return Promise.resolve()}async submit(){const{isLoad:t,validation:e}=this;if(t)for(const t of this.bcmComponentList()){const{name:i,value:s}=t;this.formData[i]=p.isNullOrEmpty(s)?null:s,e&&this.componentIsValid(t)}return Promise.resolve(this.formResponse())}async set(t){var e,i,s;if(this.isLoad&&t&&(null===(e=this.bcmComponentList())||void 0===e?void 0:e.length)>0)for(let e of Object.keys(t)){const a=null!==(s=null===(i=this.bcmComponentList())||void 0===i?void 0:i.find((t=>t.name==e)))&&void 0!==s?s:{};if(a)try{await a.set(t[e]),this.componentIsValid(a)}catch(t){console.warn("set: ",e,a.nodeName)}}}async get(){var t;let e={};if((null===(t=this.bcmComponentList())||void 0===t?void 0:t.length)>0)for(let t of this.bcmComponentList()){const i=await t.get();e=Object.assign(Object.assign({},e),{[t.name]:p.isNullOrEmpty(i)?null:i})}return Promise.resolve(e)}async resetCaption(){return Promise.resolve(await this.setMethodType("resetCaption"))}async setClear(){return this.formData={},this.formObj=new Map,Promise.resolve(await this.setMethodType("setClear"))}onChange(t){const{isLoad:e,validation:i}=this;if(e){const e=t.target,s=e&&e.tagName.toLowerCase().startsWith("bcm-");if(i&&s){if(this.isGroup(e))return this.changeCheckboxGroup(t);this.componentIsValid(e)}}}render(){return s(a,null,s("slot",null))}get el(){return o(this)}};(function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);o>3&&n&&Object.defineProperty(e,i,n)})([n()],m.prototype,"el",void 0),m.style='@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}';export{m as bcm_form_2}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,h as e,H as s,g as r}from"./p-170cf07d.js";import{G as o}from"./p-930f3618.js";import{c as i}from"./p-e0ab7b38.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";import"./p-6657830f.js";const l=class{constructor(e){t(this,e),this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleChange=t=>{this.value=t.target.value,console.log(t)},this.handleInput=t=>{console.log(t)},this._id=o.UID(),this.name=void 0,this.value=void 0,this.type="text",this.label=void 0,this.required=!1,this.disabled=!1,this.readonly=!1,this.placeholder=void 0,this.fullwidth=!1,this.hasFocus=!1}render(){const{_id:t,type:r,name:o,value:l,label:a,required:w,fullwidth:n,placeholder:d,disabled:h,readonly:c}=this;return e(s,{class:i("tw-inline-flex tw-w-full tw-max-w-[256px] tw-flex-col",{"tw-max-w-full":n})},a&&e("bcm-label",{value:a,required:w,htmlFor:t}),e("div",{class:i("tw-relative tw-flex tw-w-full tw-flex-row tw-items-stretch tw-rounded tw-border tw-p-0 hover:tw-border-primary-600",{"tw-cursor-not-allowed tw-bg-secondary-50":this.disabled,"tw-cursor-text":!this.disabled,"tw-cursor-default tw-bg-secondary-50":this.readonly,"tw-border-primary-500 tw-bg-secondary-50":this.hasFocus,"tw-border-secondary-300 tw-bg-white":!this.hasFocus})},e("input",{id:t,name:o,type:r,value:l,"data-value":l,placeholder:d,required:w,disabled:h,readonly:c,class:i("tw-text-overflow-ellipsis","tw-rounded-none","tw-flex-1","tw-cursor-inherit","tw-w-full","tw-appearance-none","tw-overflow-hidden","tw-whitespace-nowrap","tw-border-none","tw-bg-transparent","tw-p-2","tw-text-secondary-600","tw-placeholder-secondary-300","tw-outline-none"),onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:t=>this.handleChange(t),onInput:this.handleInput})))}get el(){return r(this)}};export{l as bcm_input_custom}
5
+ import{r as t,h as e,H as s,g as r}from"./p-170cf07d.js";import{G as o}from"./p-9586997f.js";import{c as i}from"./p-e0ab7b38.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";import"./p-6657830f.js";const l=class{constructor(e){t(this,e),this.handleFocus=()=>{this.hasFocus=!0},this.handleBlur=()=>{this.hasFocus=!1},this.handleChange=t=>{this.value=t.target.value,console.log(t)},this.handleInput=t=>{console.log(t)},this._id=o.UID(),this.name=void 0,this.value=void 0,this.type="text",this.label=void 0,this.required=!1,this.disabled=!1,this.readonly=!1,this.placeholder=void 0,this.fullwidth=!1,this.hasFocus=!1}render(){const{_id:t,type:r,name:o,value:l,label:a,required:w,fullwidth:n,placeholder:d,disabled:h,readonly:c}=this;return e(s,{class:i("tw-inline-flex tw-w-full tw-max-w-[256px] tw-flex-col",{"tw-max-w-full":n})},a&&e("bcm-label",{value:a,required:w,htmlFor:t}),e("div",{class:i("tw-relative tw-flex tw-w-full tw-flex-row tw-items-stretch tw-rounded tw-border tw-p-0 hover:tw-border-primary-600",{"tw-cursor-not-allowed tw-bg-secondary-50":this.disabled,"tw-cursor-text":!this.disabled,"tw-cursor-default tw-bg-secondary-50":this.readonly,"tw-border-primary-500 tw-bg-secondary-50":this.hasFocus,"tw-border-secondary-300 tw-bg-white":!this.hasFocus})},e("input",{id:t,name:o,type:r,value:l,"data-value":l,placeholder:d,required:w,disabled:h,readonly:c,class:i("tw-text-overflow-ellipsis","tw-rounded-none","tw-flex-1","tw-cursor-inherit","tw-w-full","tw-appearance-none","tw-overflow-hidden","tw-whitespace-nowrap","tw-border-none","tw-bg-transparent","tw-p-2","tw-text-secondary-600","tw-placeholder-secondary-300","tw-outline-none"),onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:t=>this.handleChange(t),onInput:this.handleInput})))}get el(){return r(this)}};export{l as bcm_input_custom}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- const c="2.11.1-rc.9-3";export{c as v}
5
+ const c="2.11.1-rc.9-5";export{c as v}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-170cf07d.js";import{D as h,E as r}from"./p-7e44e6b5.js";import{c as o}from"./p-e0ab7b38.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-8c018ae0.js";import{G as d}from"./p-930f3618.js";import{a as m}from"./p-a313fba6.js";import{g as p,s as u}from"./p-beaec5b8.js";import{L as b}from"./p-eca0acda.js";import{I as g}from"./p-9850cbce.js";import"./p-6657830f.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";import"./p-a0d6d680.js";var f,x,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(f||(f={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(x||(x={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=m.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let h=s?n+1:n-1;h<0?h=0:void 0===this[t][h]&&(h=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][h],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new r({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=0==this.currentDate.minute?0:this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(f)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(x)[this.currentDate.dayOfWeek],e=Object.values(f)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parseDate(t){var e=t.split("/"),i=parseInt(e[0],10),s=parseInt(e[1],10)-1,a=parseInt(e[2],10);if(isNaN(i)||isNaN(s)||isNaN(a))return"invalid date";var n=new Date(a,s,i);return n.getDate()!==i||n.getMonth()!==s||n.getFullYear()!==a?"invalid date":n}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),h=new Date(s),r="invalid date"!==n.toString().toLowerCase()&&"invalid date"!==this.parseDate(t),o="invalid date"!==h.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),m=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),p=r&&l,u=o&&d;return{date:n,date2:h,timeSections:m?a.split(":"):"",dateIsValid:p,date2IsValid:u,rangeIsValid:p&&u,timeIsValid:m}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),h=i(new Date(t).getHours()),r=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${h}:${r}`:`${s}/${a}/${n} ${h}:${r}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){p(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(p(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===m.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent,"no-margin":this.noMargin}),n=o("toggle",{disabled:this.disabled}),h="time"==this.type?'<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>':'<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>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.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":!0,disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<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>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:h}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(n<3?a(h):n>3?a(e,i,h):a(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)})([g()],w.prototype,"el",void 0),w.style='@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}';export{w as bcm_datetime_picker}
5
+ import{r as t,c as e,f as i,h as s,H as a,g as n}from"./p-170cf07d.js";import{D as h,E as r}from"./p-7e44e6b5.js";import{c as o}from"./p-e0ab7b38.js";import{D as c}from"./p-626a65e9.js";import{d as l}from"./p-8c018ae0.js";import{G as d}from"./p-9586997f.js";import{a as m}from"./p-a313fba6.js";import{g as p,s as u}from"./p-beaec5b8.js";import{L as b}from"./p-eca0acda.js";import{I as g}from"./p-9850cbce.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";import"./p-a0d6d680.js";var f,x,y;!function(t){t.january="january",t.february="february",t.march="march",t.april="april",t.may="may",t.june="june",t.july="july",t.august="august",t.september="september",t.october="october",t.november="november",t.december="december"}(f||(f={})),function(t){t.sunday="sunday",t.monday="monday",t.tuesday="tuesday",t.wednesday="wednesday",t.thursday="thursday",t.friday="friday",t.saturday="saturday"}(x||(x={})),function(t){t.datetime="datetime",t.range="range",t.date="date",t.time="time"}(y||(y={}));const v=JSON.stringify,w=class{constructor(i){t(this,i),this.load=e(this,"bcm-load",7),this.change=e(this,"bcm-change",7),this.bcmOpen=e(this,"bcm-open",7),this.inputId=null,this.emptyState=!1,this.initialized=!1,this.disabledDatesList={min:null,max:null,dates:[]},this.dayNumbers=[],this.valueText=null,this.dataIsValid=!1,this._id=d.UID(),this.date=new Date,this.endDate=null,this.type=y.datetime,this.disabled=!1,this.disabledDates="",this.value=null,this._open=!1,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.minYear=1900,this.maxYear=2200,this.noCaption=!1,this.noMargin=!1,this.captionError=void 0,this.caption="",this.captionType="default",this.alignment=void 0,this.placement=m.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1,this.years=[],this.hours=[],this.minutes=[],this.hasDateModule=!1,this.hasTimeModule=!1,this.renderDate=void 0,this.selectedDate=void 0,this.selectedEndDate=void 0,this.error=!1,this.errorText="",this.tick={}}markForCheck(){this.tick=d.UID()}openChanged(){this.bcmOpen.emit(this._open)}componentWillLoad(){if(this.inputId="picker-input-"+this._id,this.hasDateModule=this.type===y.datetime||this.type===y.date||this.type===y.range,this.hasTimeModule=this.type===y.datetime||this.type===y.time,this.prepareDisabledDates(),this.setData(),!this.initialized){for(let t=this.minYear;t<=this.maxYear;t++)this.years.push(t);for(let t=0;t<=23;t++)this.hours.push(t);for(let t=0;t<=59;t++)this.minutes.push(t);this.load.emit()}this.initialized=!0}componentDidRender(){this.hasDateModule&&!this.yearsDragger&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&!this.hoursDragger&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour)),this.hasTimeModule&&!this.minutesDragger&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute))}renderDateChange(){this.initialized&&(this.setData(),this.hasDateModule&&this.setDragSelection("years",this.currentDate.year))}openChange(t){t&&(this.calculateLocation(),this.hasDateModule&&(this.createDragSelection("years",this.yearsElement,this.yearsWrapperElement,this.yearsStripElement,h.y),this.createWheelChange("years",this.yearsWrapperElement,this.yearsStripElement),this.setDragSelection("years",this.currentDate.year)),this.hasTimeModule&&(this.createDragSelection("hours",this.hoursElement,this.hoursWrapperElement,this.timeStripElement,h.y),this.createWheelChange("hours",this.hoursWrapperElement,this.timeStripElement),this.setDragSelection("hours",this.currentDate.hour,!0)),this.hasTimeModule&&(this.createDragSelection("minutes",this.minutesElement,this.minutesWrapperElement,this.timeStripElement,h.y),this.createWheelChange("minutes",this.minutesWrapperElement,this.timeStripElement),this.setDragSelection("minutes",this.currentDate.minute,!0)),this.markForCheck(),i(this.el))}valueChange(t,e){const i={isValid:!1,value:this.valueText};if(t)if(this.type!==y.range&&this.error)this.change.emit({isValid:!1,value:this.inputElement.value});else try{if((e&&v(t.dateObject)!==v(e.dateObject)||!e&&t)&&(this.type!==y.date&&this.type!==y.datetime||this.change.emit(t),this.type===y.time&&this.change.emit(t),this.type===y.range)){const e=t.dateObject;e.start.date&&e.end.date?t.isValid&&this.change.emit({isValid:t.isValid,value:t.value,start:e.start,end:e.end}):this.change.emit(i)}}catch(t){}else this.change.emit()}disabledDatesChange(t){t&&this.prepareDisabledDates()}stringToDate(t){return t.getMonth?t:new Date(Date.parse(this.switchDDMM(t)))}dateToString(t){if(!(t instanceof Date))return!1}switchDDMM(t){if(!t)return;const e=t.split("/");return-1===t.indexOf("/")||3!==e.length?t:`${e[1]}/${e[0]}/${e[2]}`}setData(){this.date=this.stringToDate(this.date),this.initialized||this.renderDate||(this.renderDate=this.date&&this.date||new Date),!this.initialized&&this.endDate&&(this.selectedEndDate=this.stringToDate(this.endDate));const t=this.renderDate;if(this.currentDate=this.createDateObject(t),this.dayNumbers=this.getMonthDayNumbers(t).map((e=>({day:e,thisMonth:!0,isWeekend:this.getDayIsWeekend(t,e),today:this.getIsCurrentDate(t,e),date:this.getTargetDayDate(t,e)}))),this.currentDate.year>this.minYear){let e=new Date(new Date(t).setMonth(this.currentDate.month-1,1)),i=this.getMonthDayNumbers(e).reverse(),s=this.currentDate.monthFirstDay;for(let t=1;t<(0===s?7:s);t++){const s=i[t-1];this.dayNumbers.unshift({day:s,prevMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}if(this.currentDate.year<this.maxYear){let e=new Date(new Date(t).setMonth(this.currentDate.month+1)),i=this.getMonthDayNumbers(e),s=42-this.dayNumbers.length;for(let t=0;t<s;t++){const s=i[t];this.dayNumbers.push({day:s,nextMonth:!0,isWeekend:this.getDayIsWeekend(e,s),date:this.getTargetDayDate(e,s)})}}this.emptyState||(this.valueText=this.getValueText()),i(this.el)}prepareDisabledDates(){if(!this.disabledDates)return;let t=null;if("string"==typeof this.disabledDates)try{t=JSON.parse(this.disabledDates)}catch(t){return}else t=this.disabledDates;if(t.dates&&t.dates.length&&t.dates.length){const e=t.dates.map((t=>{const e=new Date(t);return"invalid date"===e.toString().toLowerCase()?null:e})).filter((t=>t));this.disabledDatesList.dates=e}if(t.min&&t.max&&(t.min.getTime()>t.max.getTime()||t.max.getTime()<t.min.getTime()))return;t.min&&t.min instanceof Date?this.disabledDatesList.min=new Date(t.min.toDateString()):delete this.disabledDatesList.min,t.max&&t.max instanceof Date?this.disabledDatesList.max=new Date(t.max.toDateString()):delete this.disabledDatesList.max;const e=this.inputElement&&this.inputElement.value;e&&this.setDataFromText(e)}createWheelChange(t,e,i){e.addEventListener("wheel",(e=>{const s=e.deltaY>0,a=this[t+"Dragger"].getOffset().top,n=this.getTargetChildByDragPosition({y:a},i);let h=s?n+1:n-1;h<0?h=0:void 0===this[t][h]&&(h=this[t].length-1),"time"!=this.type||this.selectedDate||this.setTime(),this.setDragSelection(t,this[t][h],!0,!0)}))}createDragSelection(t,e,i,s,a){const n=t+"Dragger";this[n]=new r({target:e,trigger:i,direction:a,useTransform:!0,limit:{y:{max:s.offsetTop-s.offsetHeight/2,min:-1*(e.offsetHeight-(s.offsetTop+s.offsetHeight/2))}}}),this[n].on("end",(e=>{const i=this.getTargetChildByDragPosition(e,s);this.selectTargetChildByDragIdx(i,s,this[n]),this.setDragSelection(t,this[t][i],!1)}))}getTargetChildByDragPosition({y:t},e){const i=e.offsetHeight,s=i/2;return Math.floor(-(t-(e.offsetTop-s)-s)/i)}selectTargetChildByDragIdx(t,e,i,s=!0){i.setPosition({y:e.offsetHeight/2+e.offsetTop-(t+1)*e.offsetHeight,anim:s})}setDragSelection(t,e,i=!0,s=!1){const a=this[t].findIndex((t=>t===e));switch(i&&this.selectTargetChildByDragIdx(a,this["years"===t?t+"StripElement":"timeStripElement"],this[t+"Dragger"],s),t){case"years":this.date.setFullYear(e);break;case"hours":this.date.setHours(e);break;case"minutes":this.date.setMinutes(e)}this.renderDate=this.date,this.setData(),this.selectedDate&&this.setValue()}getHours12(){const t=(this.date.getHours()+24)%12||12;return t>12?t-12:t}createDateObject(t,{excludeTime:e=!1,exactMonthNumber:i=!1}={}){const s=t.getFullYear();return Object.assign(Object.assign({year:s>=this.maxYear?this.maxYear:s<=this.minYear?this.minYear:s,day:t.getDate(),month:t.getMonth()+(i?1:0),dayOfWeek:t.getDay(),monthFirstDay:new Date(new Date(t).setDate(1)).getDay()},!e&&{hour:t.getHours()}),!e&&{minute:t.getMinutes()})}generateDaysArrayFromMax(t){return Array.from(Array(t+1).keys()).slice(1)}getMonthDayNumbers(t){const e=this.getDaysInMonth(t.getMonth(),t.getFullYear());return this.generateDaysArrayFromMax(e)}getTargetDayDate(t,e){return new Date(new Date(t).setDate(e))}getDayIsWeekend(t,e){const i=new Date(new Date(t).setDate(e)).getDay();return 6===i||0===i}getClock(t){return{hours:(t=t||new Date).getHours(),minutes:t.getMinutes(),seconds:t.getSeconds(),milis:t.getMilliseconds()}}setValue(t){var e,i,s;const a=new Date(this.date.setHours(Number(this.currentDate.hour),Number(this.currentDate.minute)));if(t)this.value=null;else{if(this.dataIsValid=!0,this.type===y.datetime){const t=Object.assign({},this.currentDate);t.month+=1,(null===(e=this.value)||void 0===e?void 0:e.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.date){const t=Object.assign({},this.currentDate);delete t.hour,delete t.minute,t.month+=1,(null===(i=this.value)||void 0===i?void 0:i.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),dateObject:t,value:this.valueText})}if(this.type===y.time){const t=this.getTimeText(),e=Object.assign({},this.currentDate);e.month+=1,this.value={isValid:this.dataIsValid,date:a,timestamp:a.getTime(),time:t,dateObject:e,timeObject:{hours:this.currentDate.hour,minutes:this.currentDate.minute},value:t},this.inputElement.value=t}this.type===y.range&&(null===(s=this.value)||void 0===s?void 0:s.value)!=this.valueText&&(this.value={isValid:this.dataIsValid,dateObject:{start:Object.assign({},this.selectedDate&&{date:this.selectedDate,timestamp:this.selectedDate.getTime(),detail:this.createDateObject(this.selectedDate,{excludeTime:!0,exactMonthNumber:!0})}),end:Object.assign({},this.selectedEndDate&&{date:this.selectedEndDate,timestamp:this.selectedEndDate.getTime(),detail:this.createDateObject(this.selectedEndDate,{excludeTime:!0,exactMonthNumber:!0})})},value:this.valueText})}}setMonth(t){this.renderDate.setDate(1),this.renderDate=new Date(this.renderDate.setMonth(t)),this.setDragSelection("years",this.currentDate.year)}checkRangeValidation({popupClosing:t=!1}={}){return this.type!==y.range||(t&&(!this.selectedDate||this.selectedDate&&!this.selectedEndDate)?(this.setError(!0,"date range invalid"),!1):(t||this.setError(!1),!0))}pad(t,e){return t<e?"0":""}isInputClearable(){return!(!this.inputElement||!this.inputElement.value)}isDisabledDate(t){if(this.disabledDatesList.dates.map((e=>this.isSameDate(e,t))).filter((t=>t)).length)return!0;if(this.disabledDatesList.min){const e=new Date(this.disabledDatesList.min);if(e&&e.getTime()>t.getTime())return!0}if(this.disabledDatesList.max){const e=new Date(this.disabledDatesList.max);if(e&&new Date(e.setDate(e.getDate()+1)).getTime()<t.getTime())return!0}}setDate(t,e,i=!1){const s=this.type===y.range,a=!!this.selectedEndDate;if((this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(t))&&(this.emptyState=!1,(!s||s&&!a)&&(this.date=new Date(t.setHours(this.currentDate.hour,this.currentDate.minute))),s&&this.checkRangeValidation(),s&&this.selectedDate&&this.selectedEndDate&&(this.selectedDate=null,this.selectedEndDate=null),e)){const e=new Date(t);s&&this.selectedDate?this.selectedDate.getTime()>e.getTime()?(this.selectedEndDate=this.selectedDate)&&(this.selectedDate=e):this.selectedEndDate=e:this.selectedDate=e,!s&&(this._open=i),this.renderDate=this.date,this.valueText=this.getValueText(),this.setValue();const a=this.valueText.split("/"),n=this.valueText?this.changeFormat(new Date(a[1]+"/"+a[0]+"/"+a[2])):"";this.inputElement.value=n}}setDataFromText(t,e=!1,i=!0){let s=!1,a="";const n=this.parse(t);if(this.type!==y.date&&this.type!==y.datetime||!this.isDisabledDate(n.date)||(n.dateIsValid=!1,a="disabled-date"),this.type===y.datetime&&n.dateIsValid&&n.timeIsValid&&(e&&this.setDate(n.date,!0,i),e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.date&&n.dateIsValid&&(e&&this.setDate(n.date,!0,i),s=!0),this.type===y.time&&n.timeIsValid&&(e&&this.setTime(n.timeSections[0],n.timeSections[1]),s=!0),this.type===y.range&&(n.dateIsValid&&!this.selectedDate&&(e&&this.setDate(n.date,!0,i),s=!0),n.date2IsValid&&!this.selectedEndDate&&(e&&this.setDate(n.date2,!0,i),s=!0),this.selectedDate&&this.selectedEndDate&&n.rangeIsValid&&(this.isSameDate(n.date2,this.selectedEndDate)&&!this.isSameDate(n.date,this.selectedDate)&&(this.selectedDate=null,e&&this.setDate(n.date,!0,i),s=!0),this.isSameDate(n.date,this.selectedDate)&&!this.isSameDate(n.date2,this.selectedEndDate)&&(this.selectedEndDate=null,e&&this.setDate(n.date2,!0,i),s=!0)),this.selectedDate&&this.selectedEndDate&&!n.rangeIsValid&&e&&(this.selectedDate=null,this.selectedEndDate=null)),s)e&&(this.renderDate=this.date),this.setError(!1);else{this.type===y.range&&this.selectedDate&&this.selectedEndDate&&n.rangeIsValid?this.setError(!1):a?this.setError(!0,"disabled-date"===a&&"selected date is not allowed"):(t&&this.setError(!0,(this.type===y.datetime?"invalid date or time":this.type===y.range&&"invalid date range")||this.type===y.date&&"The selected date is not allowed."||this.type===y.time&&"invalid time"),this.setValue(!0));const e=t.split("/"),i=t&&!this.error?this.changeFormat(new Date(e[1]+"/"+e[0]+"/"+e[2])):"";this.inputElement.value=i}}setDateToday(){const t=new Date;this.type===y.range&&(this.selectedDate=null,this.selectedEndDate=null),this.setDate(t,!0,!1)}HourContentDblClick(t){const e=d.findEventPathWithNodeName(t,"SPAN");e&&e.classList.contains("selected")&&(this.setValue(),this._open=!1)}setTime(t,e){this.renderDate=new Date(this.date.setHours(Number(t||this.getClock().hours),Number(e||this.getClock().minutes))),this.type===y.time&&(this.selectedDate=this.date);const i=this.currentDate.hour||(new Date).getHours(),s=0==this.currentDate.minute?0:this.currentDate.minute||(new Date).getMinutes();this.setDragSelection("hours",i,!0,!0),this.setDragSelection("minutes",s,!0,!0)}setError(t=!1,e=""){this.error=t,this.errorText=t?e:""}getError(){const{error:t,errorText:e}=this;return{valid:!t,error:t,errorText:e}}getDaysInMonth(t,e){return new Date(e,t+1,0).getDate()}getIsCurrentDate(t,e){const i=new Date;return i.getDate()===e&&i.getMonth()===t.getMonth()&&i.getFullYear()===t.getFullYear()}isSameDate(t,e){return t.getFullYear()===e.getFullYear()&&t.getMonth()===e.getMonth()&&t.getDate()===e.getDate()}getSelected(t,e=!1){const i=new Date(this["selected"+(e?"EndDate":"Date")]),s=i.getFullYear(),a=i.getMonth(),n=i.getDate();return t.getDate()===n&&t.getMonth()===a&&t.getFullYear()===s}getDateIsInRange(t){if(this.type!==y.range||!this.selectedDate||!this.selectedEndDate)return;const e=t.getTime(),i=this.selectedDate.getTime(),s=this.selectedEndDate.getTime();return e>i&&e<s}getMonthText(){return Object.values(f)[this.renderDate.getMonth()]}getCurrentDateText(){const t=Object.values(x)[this.currentDate.dayOfWeek],e=Object.values(f)[this.currentDate.month];return`${t}, ${this.currentDate.day}th ${e} ${this.currentDate.year}`}getTimeText(){const{hour:t,minute:e}=this.currentDate;return`${t<10?"0"+t:t}:${e<10?"0"+e:e}`}getValueText(){if(!this.selectedDate)return"";const t=this.selectedDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;let a="";if(this.type!==y.date&&this.type!==y.datetime||(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.time&&(a=this.getTimeText()),this.type===y.datetime&&(a=`${a} ${this.getTimeText()}`),this.type===y.range&&(a=`${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`),this.type===y.range&&this.selectedEndDate){const t=this.selectedEndDate,e=t.getFullYear(),i=t.getDate(),s=t.getMonth()+1;a+=`-${i<10?"0"+i:i}/${s<10?"0"+s:s}/${e}`}return this.setDataFromText(a),a}parseDate(t){var e=t.split("/"),i=parseInt(e[0],10),s=parseInt(e[1],10)-1,a=parseInt(e[2],10);if(isNaN(i)||isNaN(s)||isNaN(a))return"invalid date";var n=new Date(a,s,i);return n.getDate()!==i||n.getMonth()!==s||n.getFullYear()!==a?"invalid date":n}parse(t){const e=t.split(this.type===y.range?"-":" "),i=this.switchDDMM(e[0]),s=this.switchDDMM(e[1]),a=this.type===y.datetime?e[1]:e[0],n=new Date(i),h=new Date(s),r="invalid date"!==n.toString().toLowerCase()&&"invalid date"!==this.parseDate(t),o="invalid date"!==h.toString().toLowerCase(),c=/^((0?[1-9]|1[0-2])(-|\/)(0?[1-9]|[12]\d|3[01])(-|\/)[12]\d{3})$/,l=c.test(i),d=c.test(s),m=/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(a),p=r&&l,u=o&&d;return{date:n,date2:h,timeSections:m?a.split(":"):"",dateIsValid:p,date2IsValid:u,rangeIsValid:p&&u,timeIsValid:m}}getPrevMonth(){this.setMonth(this.renderDate.getMonth()-1)}getNextMonth(){this.setMonth(this.renderDate.getMonth()+1)}yearClick(t){this.yearsDragger.busy||this.setDragSelection("years",this.years[t],!0,!0)}hourClick(t){this.hoursDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("hours",this.hours[t],!0,!0))}minuteClick(t){this.minutesDragger.busy||(this.selectedDate||this.setTime(),this.setDragSelection("minutes",this.minutes[t],!0,!0))}openPicker(){this.disabled||!this._open&&(this._open=!0)}handleDayNumber(t){this.type===y.range&&this.selectedDate&&!this.selectedEndDate&&this.isSameDate(this.selectedDate,t)||this.setDate(t,!0)}handleInputInput(t){this.setDataFromText(t,!0)}handleInputChange(t){this.setDataFromText(this.inputElement.value,!0,!1),t.stopPropagation()}async handleInputClear(){return this.selectedDate=null,this.selectedEndDate=null,this.emptyState=!0,this.renderDate=new Date,this._open=!1,this.setValue(!0),this.setError(),this.getValueText(),await this.inputElement.setClear(),await l(10),Promise.resolve()}handleWheel(t){t.preventDefault()}handleWindowClick(t){if(this._open){const e=document.getElementById(`picker-vp-${this._id}`),i=d.findEventPath(t,this.el),s=!!e&&d.findEventPath(t,e);i||s||(this._open=!1)}}openToggle(){this.disabled||(this._open=!this._open)}async open(){await l(50),this.openToggle()}async close(){this._open=!1}async getValue(){return this.value}async setDisabled(t){this.disabled=t}changeFormat(t,e=!1){if(!t)return;const i=t=>t<10?`0${t}`:t,s=i(new Date(t).getDate()),a=i(new Date(t).getMonth()+1),n=new Date(t).getFullYear(),h=i(new Date(t).getHours()),r=i(new Date(t).getMinutes());return"range"==this.type||"date"==this.type?e?`${a}/${s}/${n}`:`${s}/${a}/${n}`:e?`${a}/${s}/${n} ${h}:${r}`:`${s}/${a}/${n} ${h}:${r}`}isTime(t){return/^([0-1]?[0-9]|2[0-4]):([0-5][0-9])(:[0-5][0-9])?$/.test(t)}getHHMM(t){if(!t)return;const e=t=>t<10?`0${t}`:t;return`${e(new Date(t).getHours())}:${e(new Date(t).getMinutes())}`}async set(t){if(t)if("number"==typeof t&&(t=new Date(t)),"time"==this.type){let e=t;this.isTime(t)||(e=this.getHHMM(t)),this.setDataFromText(e,!0,!1)}else{const i=t.toString().split("-"),s=Date.parse(i[0]);if(i[0]&&!isNaN(s)){var e=this.changeFormat(c.convertTimeStampToDate(new Date(i[0]).getTime()));i[1]&&!isNaN(Date.parse(i[1]))&&(e=e+"-"+this.changeFormat(c.convertTimeStampToDate(new Date(i[1]).getTime()))),this.setDataFromText(e,!0,!1)}else this.setDataFromText("",!0,!1)}else this.setClear()}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async setClear(){return await this.handleInputClear(),Promise.resolve()}async getInput(){return this.inputElement}async isValid(){return this.getError()}async resetCaption(){return await l(10),await this.inputElement.resetCaption(),this.captionType="default",this.captionError=null,await l(10),Promise.resolve()}addZeroBefore(t){return(t<10?"0":"")+t}formatDate(t,e){const i={mm:this.addZeroBefore(t.getMonth()+1),dd:this.addZeroBefore(t.getDate()),yyyy:this.addZeroBefore(t.getFullYear()),hh:this.addZeroBefore(t.getHours()),mi:this.addZeroBefore(t.getMinutes())};return e.replace(/mm|dd|yyyy|hh|mi/gi,(t=>i[t]))}handleResize(){this.calculateLocation()}handleWheels(t){if(this._open){const e=document.querySelector(`#picker-vp-${this._id}`);e&&d.findEventPath(t,e)?this.calculateLocation():this._open=!1}}componentDidLoad(){const t=this.el.shadowRoot.querySelector(`#picker-vp-${this._id}`);t&&(document.body.appendChild(t),this.calculateLocation())}disconnectedCallback(){this.el.innerHTML="";const t=document.getElementById(`picker-vp-${this._id}`);t&&t.remove()}async calculateLocation(){const t=document.getElementById(`picker-vp-${this._id}`),e=this.placement.split("-");this.alignment&&(this.placement=e[0]+("right"==this.alignment?"-end":"-start"));var i=this.placement;const s=document.getElementById(this.linkedComponent?this.linkedComponent:this._id);if(s){const e=this.linkedComponent?s:s.shadowRoot.querySelector(`#picker-input-${this._id}`)||s.shadowRoot.querySelector("bcm-datetime-picker").shadowRoot.querySelector(`#picker-input-${this._id}`);if(t&&e){p(t,e,i,(t=>i=t)),await l(10);let s=u(i,e),a=this.noCaption?0:20,n=0;switch(p(t,e,i,(t=>i=t)),await l(10),s=u(i,e),t.style.top=this.linkedComponent?("top"==i.split("-")[0]?s[0]-t.offsetHeight:s[0])+"px":("top"==i.split("-")[0]?s[0]-t.offsetHeight+n:s[0]-a)+"px",i.split("-")[1]){case"start":t.style.left=s[1]+"px";break;case"center":t.style.left=s[1]-t.offsetWidth/2+"px";break;case"end":t.style.left=s[1]-t.offsetWidth+"px"}t.classList.toggle("bcm-list--top","top"==i.split("-")[0])}}}handleKeyDown(t){(t.keyCode||t.which)===m.KeyCode.escape&&this._open&&(this._open=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.markForCheck())}render(){const t=o("day-numbers"),e=o("datetime-picker","datetime-picker-wrapper",{open:this._open,"no-caption":this.noCaption}),i=o(this.hidden?"hidden":null,{"full-width":this.fullWidth,"linked-component":this.linkedComponent,"no-margin":this.noMargin}),n=o("toggle",{disabled:this.disabled}),h="time"==this.type?'<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>':'<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>';return s(a,{class:i,"bcm-internal-id":this.inputId},this.label&&s("div",{class:"picker-label",onClick:()=>this.openToggle()},s(b,{size:"medium",type:this.captionType,value:this.label,required:this.required,htmlFor:this._id})),s("bcm-old-input",{ref:t=>this.inputElement=t,placeholder:this.placeholder||"Select "+(this.type===y.datetime?"date and time":"")+(this.type===y.date?"date":"")+(this.type===y.time?"time":"")+(this.type===y.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":!0,disableWatchValue:!0,"on-bcm-clear":()=>this.handleInputClear(),"on-bcm-change":t=>this.handleInputChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType},this.error&&s("span",{slot:"suffix"},s("span",{id:"error-icon",class:n,innerHTML:'<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>',title:this.errorText})),s("span",{slot:"suffix",onClick:()=>this.openPicker()},s("span",{id:"calender-icon",class:n,innerHTML:h}))),s("div",{id:"picker-vp-"+this._id,class:e,onWheel:t=>this.handleWheel(t)},s("div",{class:"modules"},this.hasDateModule&&s("div",{class:"date-container"},s("div",{class:"bcm-datetime-picker__header"},s("span",null),s("div",{class:"month-year"},s("button",{onClick:()=>this.getPrevMonth()},s("bcm-icon",{icon:"far fa-chevron-left"})),s("div",{class:"month-year-wrapper"},s("span",{class:"month"},this.getMonthText()),",",s("span",{class:"year"},this.date.getFullYear())),s("button",{onClick:()=>this.getNextMonth()},s("bcm-icon",{icon:"far fa-chevron-right"}))),s("span",{class:"today",onClick:()=>this.setDateToday()},"Today")),s("div",{class:"bcm-datetime-picker__content"},s("div",{class:"years",ref:t=>this.yearsWrapperElement=t},s("div",{class:"items",ref:t=>this.yearsElement=t},this.years.map(((t,e)=>s("span",{onClick:()=>this.yearClick(e)},t)))),s("div",{class:"select-strip",ref:t=>this.yearsStripElement=t})),s("div",{class:"days"},s("div",{class:"day-labels"},s("span",null,"Mo"),s("span",null,"Tu"),s("span",null,"We"),s("span",null,"Th"),s("span",null,"Fr"),s("span",null,"Sa"),s("span",null,"Su")),s("div",{class:t},this.dayNumbers.map((t=>s("span",{class:{"is-disabled-date":(this.type===y.date||this.type===y.datetime)&&this.isDisabledDate(t.date),"not-this-month":!t.thisMonth,"is-weekend":t.isWeekend,today:t.today,selected:this.getSelected(t.date),"selected-start":this.getSelected(t.date)&&this.selectedEndDate&&this.type===y.range,"selected-end":this.getSelected(t.date,!0)&&this.type===y.range,range:this.getDateIsInRange(t.date)&&this.type===y.range},onClick:()=>this.handleDayNumber(t.date)},s("span",{class:"number"},t.day)))))))),this.hasTimeModule&&s("div",{class:"time-container"},s("div",{class:"bcm-datetime-picker__header"},s("div",{class:"month-year"},s("span",{class:"month"},this.getTimeText())),s("span",{class:"now",onClick:()=>{this.setTime(),"time"==this.type&&(this._open=!1)}},"Now")),s("div",{class:"bcm-datetime-picker__content",onDblClick:t=>{this.HourContentDblClick(t)}},s("div",{class:"hours",ref:t=>this.hoursWrapperElement=t},s("div",{class:"items",ref:t=>this.hoursElement=t},this.hours.map(((t,e)=>s("span",{class:this.currentDate.hour===t?"selected":"",onClick:()=>this.hourClick(e)},(t<10&&"0")+t))))),s("div",{class:"minutes",ref:t=>this.minutesWrapperElement=t},s("div",{class:"items",ref:t=>this.minutesElement=t},this.minutes.map(((t,e)=>s("span",{class:this.currentDate.minute===t?"selected":"",onClick:()=>this.minuteClick(e)},(t<10&&"0")+t))))),s("div",{class:"select-strip",ref:t=>this.timeStripElement=t}))))))}get el(){return n(this)}static get watchers(){return{_open:["openChanged","openChange"],renderDate:["renderDateChange"],value:["valueChange"],disabledDates:["disabledDatesChange"]}}};(function(t,e,i,s){var a,n=arguments.length,h=n<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(h=(n<3?a(h):n>3?a(e,i,h):a(e,i))||h);n>3&&h&&Object.defineProperty(e,i,h)})([g()],w.prototype,"el",void 0),w.style='@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}';export{w as bcm_datetime_picker}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{h as s,r as t,c as i,g as e}from"./p-170cf07d.js";import{G as o}from"./p-930f3618.js";import{a as c}from"./p-a313fba6.js";import{c as h}from"./p-e0ab7b38.js";import{N as a}from"./p-ede82918.js";import{e as r}from"./p-8c018ae0.js";import{C as l}from"./p-436364c8.js";import{C as n}from"./p-2e73d572.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";import"./p-6657830f.js";const m=({_id:t,color:i,customStyle:e,size:o,checked:m,hidden:p,value:d,type:f,onDismiss:b,onSelect:u})=>{!o&&(o=c.FontSize["size-1"]);const j=h(((s,t=!1)=>(a.isNumber(s)&&(s=c.FontSize["size-"+s]||c.FontSize["size-4"]),t?+(c.FontSizeValue[s]||c.FontSizeValue["size-4"])+2:s))(o),"bcm-tag__content",f),k=h("bcm-tag",{hidden:p});return s("div",{id:t,class:h(k,{checked:m})},s("span",{hidden:!0},s("slot",null)),s("span",{class:j,style:(s=>{if((f===c.TagType.basic||f==c.TagType.dismissable)&&n[s])return{color:r(l,n[s]+"-6"),borderColor:r(l,n[s]+"-3"),backgroundColor:r(l,n[s]+"-1")}})(i),onClick:s=>u(s)},f===c.TagType.add&&s("span",{class:"left"},s("bcm-icon",{icon:"far fa-plus"})),f===c.TagType.checkable&&s("input",{type:"checkbox",checked:m}),s("span",{class:"value",style:e},d),f===c.TagType.dismissable&&s("span",{class:"right close-button",onClick:s=>b(s)},s("bcm-icon",{icon:"fal fa-times"}))))},p=class{constructor(s){t(this,s),this.change=i(this,"bcm-change",7),this.tagDismissable=i(this,"bcm-tag-dismissable",7),this.bcmTagSelect=i(this,"bcm-tag-select",7),this._id=o.UID(),this._internal_id=o.UID(),this.hidden=!1,this.value="",this.type=c.TagType.basic,this.checked=!1,this.color=void 0,this.customStyle=void 0,this.itemObject=void 0,this.size=c.FontSize["size-1"],this.closeFunc=s=>s,this.selectFunc=s=>s}handleClick(){this.type===c.TagType.checkable&&this.handleChecked()}handleClose(){this.tagDismissable.emit(this.el)}handleChecked(){this.checked=!this.checked,this.change.emit(this.checked)}render(){const{type:t,color:i,value:e,customStyle:o,size:h,hidden:a,checked:r}=this;return s(m,{size:h,hidden:a,color:i,customStyle:o,checked:r,value:e,type:c.TagType[t],onSelect:s=>{this.bcmTagSelect.emit(s),this.selectFunc({event:s,id:this._id})},onDismiss:s=>{this.handleClose(),this.closeFunc(s)}})}get el(){return e(this)}};export{p as bcm_tag}
5
+ import{h as s,r as t,c as i,g as e}from"./p-170cf07d.js";import{G as o}from"./p-9586997f.js";import{a as c}from"./p-a313fba6.js";import{c as h}from"./p-e0ab7b38.js";import{N as a}from"./p-0745c696.js";import{e as r}from"./p-8c018ae0.js";import{C as l}from"./p-436364c8.js";import{C as n}from"./p-2e73d572.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";import"./p-6657830f.js";const m=({_id:t,color:i,customStyle:e,size:o,checked:m,hidden:p,value:d,type:b,onDismiss:f,onSelect:u})=>{!o&&(o=c.FontSize["size-1"]);const j=h(((s,t=!1)=>(a.isNumber(s)&&(s=c.FontSize["size-"+s]||c.FontSize["size-4"]),t?+(c.FontSizeValue[s]||c.FontSizeValue["size-4"])+2:s))(o),"bcm-tag__content",b),k=h("bcm-tag",{hidden:p});return s("div",{id:t,class:h(k,{checked:m})},s("span",{hidden:!0},s("slot",null)),s("span",{class:j,style:(s=>{if((b===c.TagType.basic||b==c.TagType.dismissable)&&n[s])return{color:r(l,n[s]+"-6"),borderColor:r(l,n[s]+"-3"),backgroundColor:r(l,n[s]+"-1")}})(i),onClick:s=>u(s)},b===c.TagType.add&&s("span",{class:"left"},s("bcm-icon",{icon:"far fa-plus"})),b===c.TagType.checkable&&s("input",{type:"checkbox",checked:m}),s("span",{class:"value",style:e},d),b===c.TagType.dismissable&&s("span",{class:"right close-button",onClick:s=>f(s)},s("bcm-icon",{icon:"fal fa-times"}))))},p=class{constructor(s){t(this,s),this.change=i(this,"bcm-change",7),this.tagDismissable=i(this,"bcm-tag-dismissable",7),this.bcmTagSelect=i(this,"bcm-tag-select",7),this._id=o.UID(),this._internal_id=o.UID(),this.hidden=!1,this.value="",this.type=c.TagType.basic,this.checked=!1,this.color=void 0,this.customStyle=void 0,this.itemObject=void 0,this.size=c.FontSize["size-1"],this.closeFunc=s=>s,this.selectFunc=s=>s}handleClick(){this.type===c.TagType.checkable&&this.handleChecked()}handleClose(){this.tagDismissable.emit(this.el)}handleChecked(){this.checked=!this.checked,this.change.emit(this.checked)}render(){const{type:t,color:i,value:e,customStyle:o,size:h,hidden:a,checked:r}=this;return s(m,{size:h,hidden:a,color:i,customStyle:o,checked:r,value:e,type:c.TagType[t],onSelect:s=>{this.bcmTagSelect.emit(s),this.selectFunc({event:s,id:this._id})},onDismiss:s=>{this.handleClose(),this.closeFunc(s)}})}get el(){return e(this)}};export{p as bcm_tag}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{v as r}from"./p-8b31581f.js";import{c as t}from"./p-3a43bf45.js";var n,e;function o(r,t){try{var n=r();return void 0===n?t:n}catch(r){if(r instanceof TypeError)return t;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(n||(n={})),function(r){r.banner="banner",r.basic="basic"}(e||(e={}));const c=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return c.includes(r)})()&&console.log(`%cbromcom ui%c version: ${r}-p `,"color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let t=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&t&&r.classList.add(`bcm-theme-${t}`)}(),function(){const r=document.querySelector("body");let t=document.querySelector("#bcm-overlay-container");t||(t=document.createElement("div"),t.id="bcm-overlay-container",t.classList.add("bcm-overlay-container"),r.appendChild(t))}();class i{static prettify(r){const t={};for(const n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);return t}static getTwColor(r){const{color:n,variable:e,tones:o}=r=Object.assign({variable:"--bcm-color-default",defaultTone:"600",tones:{50:{},100:{},200:{},300:{},400:{},500:{},600:{},700:{},800:{},900:{},950:{}}},r);if(!n||!t[n])return!1;const c={};return"string"==typeof t[n]?(c[e]=t[n],c):((Array.isArray(o)?o:Object.keys(o)).forEach((r=>{t[n][r]&&(Array.isArray(o[r])?o[r].forEach((o=>{c[`${e}-${o}`]=t[n][r]})):c[`${e}-${r}`]=t[n][r])})),c)}}i.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,i.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case n.info:return{icon:"far fa-info-circle"};case n.error:return{icon:"far fa-times-circle"};case n.warning:return{icon:"far fa-exclamation-circle"};case n.success:return{icon:"far fa-check-circle"}}},i.domParser=r=>(new DOMParser).parseFromString(r,"text/html").body.innerText,i.createComponent=(r,t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{n[r]=t[r]})),document.getElementById("bcm-overlay-container").appendChild(n),n},i.createElement=(r="div",t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{"innerHTML"==r?n[r]=t[r]:n.setAttribute(r,t[r])})),document.body.appendChild(n),n},i.debounceInput=(r,t,n,e)=>{let o;return function(){let c=this,i=arguments;e&&e.apply(c,i);let u=function(){o=null,n||r.apply(c,i)},a=n&&!o;clearTimeout(o),o=setTimeout(u,t),a&&r.apply(c,i)}},i.flatArray=r=>r.reduce(((r,t)=>r.concat(Array.isArray(t)?i.flatArray(t):t)),[]),i.reverseNodeList=r=>{let t=[];for(let n=r.length-1;n>=0;n--)t.push(r[n]);return t},i.findEventPathWithKey=(r,t,n)=>{n=Array.isArray(n)?n:[n];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>n.includes(r[t])))[0]},i.findEventPathHasAttribute=(r,t)=>{let n=r.composedPath()||r.path;if(n)return o((()=>!!n.find((r=>r.hasAttribute(t)))),!1)},i.findEventTarget=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.target||r.srcElement;if(n)return t.includes(n)},i.findEventPathWithNodeName=(r,t)=>{let n=r.composedPath()||r.path;if(n)return n.filter((r=>r.nodeName===t))[0]},i.findEventPath=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.composedPath()||r.path;if(n)return void 0!==n.filter((r=>t.includes(r)))[0]},i.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,i.convertIdsToNestedData=(r,t)=>{let n=[],e=[];return t.forEach((t=>{r&&r.indexOf(t.id.toString())>-1?n.push(t):t.items&&(e=i.convertIdsToNestedData(r,t.items),e.length>0&&(t.items=e,n.push(t)))})),n},i.nodeListToArray=r=>Array.prototype.slice.call(r),i.setAttributes=(r,t)=>{Object.keys(t).forEach((n=>{r.setAttribute(n,t[n])}))},i.computedStyle=(r,t)=>window.getComputedStyle(r,null).getPropertyValue(t),i.getAncestor=(r,t)=>{for(;(r=r.parentElement)&&!r.matches(t););return r},i.findParentElement=(r,t)=>{const n=t.charAt(0);if("*"===t)return r.parentElement;if("."===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.classList.contains(t))return r;r=r.parentElement}return null}(r.parentElement,n)}if("#"===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.id===t)return r;r=r.parentElement}return null}(r.parentElement,n)}if("["===n){const n=t.indexOf("]"),e=t.slice(1,n),o=t.slice(n+2,-1);return function(r,t,n){for(;null!==r;){if(r.hasAttribute(t)&&(void 0===n||r.getAttribute(t)===n))return r;r=r.parentElement}return null}(r.parentElement,e,o)}{const n=t.toLowerCase();return function(r,t){for(;null!==r;){if(r.tagName.toLowerCase()===t.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,n)}};export{i as G,n as S,e as T,o as s}
5
+ import{v as r}from"./p-8bb0fe5d.js";import{c as t}from"./p-aeb4be41.js";var n,e;function o(r,t){try{var n=r();return void 0===n?t:n}catch(r){if(r instanceof TypeError)return t;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(n||(n={})),function(r){r.banner="banner",r.basic="basic"}(e||(e={}));const c=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return c.includes(r)})()&&console.log(`%cbromcom ui%c version: ${r}-p `,"color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let t=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&t&&r.classList.add(`bcm-theme-${t}`)}(),function(){const r=document.querySelector("body");let t=document.querySelector("#bcm-overlay-container");t||(t=document.createElement("div"),t.id="bcm-overlay-container",t.classList.add("bcm-overlay-container"),r.appendChild(t))}();class i{static prettify(r){const t={};for(const n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);return t}static getTwColor(r){const{color:n,variable:e,tones:o}=r=Object.assign({variable:"--bcm-color-default",defaultTone:"600",tones:{50:{},100:{},200:{},300:{},400:{},500:{},600:{},700:{},800:{},900:{},950:{}}},r);if(!n||!t[n])return!1;const c={};return"string"==typeof t[n]?(c[e]=t[n],c):((Array.isArray(o)?o:Object.keys(o)).forEach((r=>{t[n][r]&&(Array.isArray(o[r])?o[r].forEach((o=>{c[`${e}-${o}`]=t[n][r]})):c[`${e}-${r}`]=t[n][r])})),c)}}i.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,i.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case n.info:return{icon:"far fa-info-circle"};case n.error:return{icon:"far fa-times-circle"};case n.warning:return{icon:"far fa-exclamation-circle"};case n.success:return{icon:"far fa-check-circle"}}},i.domParser=r=>(new DOMParser).parseFromString(r,"text/html").body.innerText,i.createComponent=(r,t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{n[r]=t[r]})),document.getElementById("bcm-overlay-container").appendChild(n),n},i.createElement=(r="div",t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{"innerHTML"==r?n[r]=t[r]:n.setAttribute(r,t[r])})),document.body.appendChild(n),n},i.debounceInput=(r,t,n,e)=>{let o;return function(){let c=this,i=arguments;e&&e.apply(c,i);let u=function(){o=null,n||r.apply(c,i)},a=n&&!o;clearTimeout(o),o=setTimeout(u,t),a&&r.apply(c,i)}},i.flatArray=r=>r.reduce(((r,t)=>r.concat(Array.isArray(t)?i.flatArray(t):t)),[]),i.reverseNodeList=r=>{let t=[];for(let n=r.length-1;n>=0;n--)t.push(r[n]);return t},i.findEventPathWithKey=(r,t,n)=>{n=Array.isArray(n)?n:[n];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>n.includes(r[t])))[0]},i.findEventPathHasAttribute=(r,t)=>{let n=r.composedPath()||r.path;if(n)return o((()=>!!n.find((r=>r.hasAttribute(t)))),!1)},i.findEventTarget=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.target||r.srcElement;if(n)return t.includes(n)},i.findEventPathWithNodeName=(r,t)=>{let n=r.composedPath()||r.path;if(n)return n.filter((r=>r.nodeName===t))[0]},i.findEventPath=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.composedPath()||r.path;if(n)return void 0!==n.filter((r=>t.includes(r)))[0]},i.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,i.convertIdsToNestedData=(r,t)=>{let n=[],e=[];return t.forEach((t=>{r&&r.indexOf(t.id.toString())>-1?n.push(t):t.items&&(e=i.convertIdsToNestedData(r,t.items),e.length>0&&(t.items=e,n.push(t)))})),n},i.nodeListToArray=r=>Array.prototype.slice.call(r),i.setAttributes=(r,t)=>{Object.keys(t).forEach((n=>{r.setAttribute(n,t[n])}))},i.computedStyle=(r,t)=>window.getComputedStyle(r,null).getPropertyValue(t),i.getAncestor=(r,t)=>{for(;(r=r.parentElement)&&!r.matches(t););return r},i.findParentElement=(r,t)=>{const n=t.charAt(0);if("*"===t)return r.parentElement;if("."===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.classList.contains(t))return r;r=r.parentElement}return null}(r.parentElement,n)}if("#"===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.id===t)return r;r=r.parentElement}return null}(r.parentElement,n)}if("["===n){const n=t.indexOf("]"),e=t.slice(1,n),o=t.slice(n+2,-1);return function(r,t,n){for(;null!==r;){if(r.hasAttribute(t)&&(void 0===n||r.getAttribute(t)===n))return r;r=r.parentElement}return null}(r.parentElement,e,o)}{const n=t.toLowerCase();return function(r,t){for(;null!==r;){if(r.tagName.toLowerCase()===t.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,n)}};export{i as G,n as S,e as T,o as s}
@@ -2,4 +2,4 @@
2
2
  * Built with Stencil
3
3
  * Copyright (c) Bromcom.
4
4
  */
5
- import{r as t,c as s,h as i,H as e,g as o}from"./p-170cf07d.js";import{c as w}from"./p-e0ab7b38.js";import{G as a}from"./p-930f3618.js";import{S as r}from"./p-a0d6d680.js";import{a as h}from"./p-a313fba6.js";import{d as n}from"./p-8c018ae0.js";import"./p-6657830f.js";import"./p-8b31581f.js";import"./p-3a43bf45.js";const c=class{constructor(i){t(this,i),this.bcmToastClose=s(this,"bcm-toast-close",7),this.bcmToastOpen=s(this,"bcm-toast-open",7),this.bcmToastView=s(this,"bcm-toast-view",7),this._id=a.UID(),this.status=void 0,this.message="",this.description="",this.duration=3e3,this.position=h.Placement.bottom,this.messageIcon=void 0,this.viewButton=!1,this.closeButton=!0,this.removeAfterClose=!0,this.visible=!1,this.visibleContainer=!1}async show(){const t=document.getElementById(this._id+"-container");return t&&this.createContainer(this.position).appendChild(t),this.visible=!0,await n(50),this.visibleContainer=!0,this.bcmToastOpen.emit(),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>this.hide()),this.duration),this.el}async hide(){this.visibleContainer=!1,clearTimeout(this.timer),this.bcmToastClose.emit(),await n(100),this.visible=!1,this.removeAfterClose&&(await n(100),this.el.remove())}handleMouseEnter(){clearTimeout(this.timer)}handleMouseLeave(){this.visible&&(this.timer=setTimeout((()=>this.hide()),1e3))}createContainer(t){const s="bcm-toast-container-"+t;let i=document.getElementById(s);if(!i){i=document.createElement("div"),i.id=s;const t=w("tw-pointer-events-none tw-overflow-hidden tw-z-50","tw-fixed tw-flex","tw-p-4 tw-gap-4",{"tw-flex-col-reverse tw-inset-x-0 tw-top-4 tw-mx-auto":this.position===h.Placement.top,"tw-flex-col tw-inset-x-0 tw-bottom-4 tw-mx-auto":this.position===h.Placement.bottom,"tw-flex-col-reverse tw-top-4 tw-left-4":this.position===h.Placement["top-start"],"tw-flex-col-reverse tw-top-4 tw-right-4":this.position===h.Placement["top-end"],"tw-flex-col tw-bottom-4 tw-left-4":this.position===h.Placement["bottom-start"],"tw-flex-col tw-bottom-4 tw-right-4":this.position===h.Placement["bottom-end"]});i.classList.add(...t.split(" ")),document.body.appendChild(i)}return i}render(){return i(e,{class:"tw-hidden"},i("div",{class:w({"tw-hidden":!this.visible}),id:this._id+"-container",onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},i("div",{class:w("tw-pointer-events-auto tw-transform tw-transition tw-duration-300 tw-ease-in-out","tw-flex tw-min-w-[256px] tw-max-w-[420px] tw-flex-col tw-gap-2 tw-rounded-lg tw-border tw-font-sans tw-font-normal tw-shadow-2","tw-border-gray-300 tw-bg-white tw-text-slate-600",{"tw-p-4":!this.description,"tw-p-6":this.description},"tw-transform tw-transition tw-duration-300 tw-ease-in-out ",{"tw-translate-y-0 tw-opacity-100 ":this.visibleContainer,"tw-opacity-0":!this.visibleContainer,"tw-translate-y-[-100%]":!this.visibleContainer&&"top"===this.position.split("-")[0],"tw-translate-y-[100%]":!this.visibleContainer&&"bottom"===this.position.split("-")[0]})},i("div",{class:"tw-flex tw-items-center tw-justify-between tw-gap-5"},i("div",{class:"tw-flex tw-items-center tw-gap-3 "},this.status&&i("i",{class:w("tw-text-6",this.messageIcon?this.messageIcon:"far",{"tw-text-emerald-500":"success"===this.status,"tw-text-red-500":"error"===this.status,"tw-text-amber-500":"warning"===this.status,"tw-text-blue-500":"info"===this.status},{"fa-check-circle":!this.messageIcon&&"success"===this.status,"fa-exclamation-circle":!this.messageIcon&&"error"===this.status,"fa-exclamation-triangle":!this.messageIcon&&"warning"===this.status,"fa-info-circle":!this.messageIcon&&"info"===this.status})}),i("span",{class:w({"tw-text-4":!this.description,"tw-text-6 tw-font-medium":this.description})},!this.description&&this.status&&i("span",null,r.capitalize(this.status),": "),this.message)),i("div",{class:"tw-flex tw-items-baseline tw-gap-2"},this.viewButton&&i("button",{onClick:()=>this.bcmToastView.emit(),title:"View details",class:w("tw-cursor-pointer tw-rounded tw-bg-transparent tw-p-0 tw-px-1 tw-text-4 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200","tw-transition tw-duration-300 tw-ease-in-out",{"tw-font-medium":this.description})},"View"),this.closeButton&&i("button",{title:"Close",onClick:()=>this.hide(),class:w("tw-rounded tw-bg-transparent tw-p-0","tw-flex tw-h-6 tw-w-6 tw-cursor-pointer tw-items-center tw-justify-center tw-text-3 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200")},i("i",{class:"fal fa-times"})))),this.description&&i("div",{class:"tw-text-3 "},this.description),i("slot",null))))}get el(){return o(this)}};export{c as bcm_toast}
5
+ import{r as t,c as s,h as i,H as e,g as o}from"./p-170cf07d.js";import{c as w}from"./p-e0ab7b38.js";import{G as a}from"./p-9586997f.js";import{S as r}from"./p-a0d6d680.js";import{a as h}from"./p-a313fba6.js";import{d as n}from"./p-8c018ae0.js";import"./p-6657830f.js";import"./p-8bb0fe5d.js";import"./p-aeb4be41.js";const c=class{constructor(i){t(this,i),this.bcmToastClose=s(this,"bcm-toast-close",7),this.bcmToastOpen=s(this,"bcm-toast-open",7),this.bcmToastView=s(this,"bcm-toast-view",7),this._id=a.UID(),this.status=void 0,this.message="",this.description="",this.duration=3e3,this.position=h.Placement.bottom,this.messageIcon=void 0,this.viewButton=!1,this.closeButton=!0,this.removeAfterClose=!0,this.visible=!1,this.visibleContainer=!1}async show(){const t=document.getElementById(this._id+"-container");return t&&this.createContainer(this.position).appendChild(t),this.visible=!0,await n(50),this.visibleContainer=!0,this.bcmToastOpen.emit(),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>this.hide()),this.duration),this.el}async hide(){this.visibleContainer=!1,clearTimeout(this.timer),this.bcmToastClose.emit(),await n(100),this.visible=!1,this.removeAfterClose&&(await n(100),this.el.remove())}handleMouseEnter(){clearTimeout(this.timer)}handleMouseLeave(){this.visible&&(this.timer=setTimeout((()=>this.hide()),1e3))}createContainer(t){const s="bcm-toast-container-"+t;let i=document.getElementById(s);if(!i){i=document.createElement("div"),i.id=s;const t=w("tw-pointer-events-none tw-overflow-hidden tw-z-50","tw-fixed tw-flex","tw-p-4 tw-gap-4",{"tw-flex-col-reverse tw-inset-x-0 tw-top-4 tw-mx-auto":this.position===h.Placement.top,"tw-flex-col tw-inset-x-0 tw-bottom-4 tw-mx-auto":this.position===h.Placement.bottom,"tw-flex-col-reverse tw-top-4 tw-left-4":this.position===h.Placement["top-start"],"tw-flex-col-reverse tw-top-4 tw-right-4":this.position===h.Placement["top-end"],"tw-flex-col tw-bottom-4 tw-left-4":this.position===h.Placement["bottom-start"],"tw-flex-col tw-bottom-4 tw-right-4":this.position===h.Placement["bottom-end"]});i.classList.add(...t.split(" ")),document.body.appendChild(i)}return i}render(){return i(e,{class:"tw-hidden"},i("div",{class:w({"tw-hidden":!this.visible}),id:this._id+"-container",onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},i("div",{class:w("tw-pointer-events-auto tw-transform tw-transition tw-duration-300 tw-ease-in-out","tw-flex tw-min-w-[256px] tw-max-w-[420px] tw-flex-col tw-gap-2 tw-rounded-lg tw-border tw-font-sans tw-font-normal tw-shadow-2","tw-border-gray-300 tw-bg-white tw-text-slate-600",{"tw-p-4":!this.description,"tw-p-6":this.description},"tw-transform tw-transition tw-duration-300 tw-ease-in-out ",{"tw-translate-y-0 tw-opacity-100 ":this.visibleContainer,"tw-opacity-0":!this.visibleContainer,"tw-translate-y-[-100%]":!this.visibleContainer&&"top"===this.position.split("-")[0],"tw-translate-y-[100%]":!this.visibleContainer&&"bottom"===this.position.split("-")[0]})},i("div",{class:"tw-flex tw-items-center tw-justify-between tw-gap-5"},i("div",{class:"tw-flex tw-items-center tw-gap-3 "},this.status&&i("i",{class:w("tw-text-6",this.messageIcon?this.messageIcon:"far",{"tw-text-emerald-500":"success"===this.status,"tw-text-red-500":"error"===this.status,"tw-text-amber-500":"warning"===this.status,"tw-text-blue-500":"info"===this.status},{"fa-check-circle":!this.messageIcon&&"success"===this.status,"fa-exclamation-circle":!this.messageIcon&&"error"===this.status,"fa-exclamation-triangle":!this.messageIcon&&"warning"===this.status,"fa-info-circle":!this.messageIcon&&"info"===this.status})}),i("span",{class:w({"tw-text-4":!this.description,"tw-text-6 tw-font-medium":this.description})},!this.description&&this.status&&i("span",null,r.capitalize(this.status),": "),this.message)),i("div",{class:"tw-flex tw-items-baseline tw-gap-2"},this.viewButton&&i("button",{onClick:()=>this.bcmToastView.emit(),title:"View details",class:w("tw-cursor-pointer tw-rounded tw-bg-transparent tw-p-0 tw-px-1 tw-text-4 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200","tw-transition tw-duration-300 tw-ease-in-out",{"tw-font-medium":this.description})},"View"),this.closeButton&&i("button",{title:"Close",onClick:()=>this.hide(),class:w("tw-rounded tw-bg-transparent tw-p-0","tw-flex tw-h-6 tw-w-6 tw-cursor-pointer tw-items-center tw-justify-center tw-text-3 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200")},i("i",{class:"fal fa-times"})))),this.description&&i("div",{class:"tw-text-3 "},this.description),i("slot",null))))}get el(){return o(this)}};export{c as bcm_toast}