bromcom-ui 3.0.0-alpha.3 → 3.0.0-alpha.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.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/p-01eaca9a.entry.js +5 -0
- package/dist/bromcom-ui/{p-dc8b7bd5.entry.js → p-0b7de283.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ff8adde6.entry.js → p-0e75f6ba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3a6e9576.entry.js → p-112b9a62.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be96827e.js → p-1535f9b1.js} +1 -1
- package/dist/bromcom-ui/{p-ef839034.entry.js → p-32ce6cf6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-33d97b3f.entry.js → p-33b2ed75.entry.js} +1 -1
- package/dist/bromcom-ui/p-3ddd3c83.entry.js +5 -0
- package/dist/bromcom-ui/{p-e115af8a.entry.js → p-4545a13d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f1de8ed5.entry.js → p-5532696c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f6e710ff.entry.js → p-69adb859.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d0647951.js → p-6ce02d0a.js} +1 -1
- package/dist/bromcom-ui/p-7c08789d.entry.js +5 -0
- package/dist/bromcom-ui/{p-b7f449ff.entry.js → p-803739bc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3b988ad1.entry.js → p-8390dd02.entry.js} +1 -1
- package/dist/bromcom-ui/p-91197b04.js +5 -0
- package/dist/bromcom-ui/{p-b9b9d753.entry.js → p-a80e6310.entry.js} +1 -1
- package/dist/bromcom-ui/p-aa67918a.entry.js +5 -0
- package/dist/bromcom-ui/{p-91aa21af.entry.js → p-acab07ec.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a53c3682.entry.js → p-b333a3d7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b386e9c9.entry.js → p-b7787c11.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2e7ffc5a.entry.js → p-b7c56cbe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-221095a9.entry.js → p-c36a7889.entry.js} +1 -1
- package/dist/bromcom-ui/p-ce0ab4e3.entry.js +5 -0
- package/dist/bromcom-ui/{p-ee75cd00.js → p-d3cf91a9.js} +1 -1
- package/dist/bromcom-ui/p-d5464577.entry.js +16 -0
- package/dist/bromcom-ui/{p-bd77f532.entry.js → p-d7a619c5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-baa4193d.entry.js → p-e36b6b08.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6c7fdf95.entry.js → p-f15c1d3d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8001040c.js → p-fc29c94d.js} +1 -1
- package/dist/cjs/bcm-accordion_69.cjs.entry.js +722 -66
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +4 -4
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-file-upload.cjs.entry.js +578 -0
- package/dist/cjs/bcm-form-2.cjs.entry.js +3 -2
- package/dist/cjs/bcm-input-2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-number-input.cjs.entry.js +12 -6
- package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/bcm-table.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
- package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-toast.cjs.entry.js +17 -11
- package/dist/cjs/bromcom-ui.cjs.js +3 -3
- package/dist/cjs/{generate-554f54dc.js → generate-9d1bf6b3.js} +1 -1
- package/dist/cjs/{global-90b5dbce.js → global-d69a64ec.js} +1 -1
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/{number-helper-677e9c02.js → number-helper-ae28b255.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/{package-8445ccd4.js → package-6de220be.js} +1 -1
- package/dist/cjs/{validators-92f2f1ef.js → validators-3381bee2.js} +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/atoms/button/button.js +1 -1
- package/dist/collection/components/atoms/button/types.js +7 -0
- package/dist/collection/components/molecules/color-input/color-input.js +5 -22
- package/dist/collection/components/molecules/color-palette/color-palette.js +4 -4
- package/dist/collection/components/molecules/dropdown/dropdown.js +36 -1
- package/dist/collection/components/molecules/linked/linked-focus-manager.js +86 -0
- package/dist/collection/components/molecules/linked/linked.js +43 -1
- package/dist/collection/components/molecules/number-input/number-input.js +8 -2
- package/dist/collection/components/molecules/number-input/react-input.js +1 -1
- package/dist/collection/components/molecules/upload/file-upload.component.js +1060 -0
- package/dist/collection/components/molecules/upload/file-upload.style.js +201 -0
- package/dist/collection/components/organism/form/form.js +1 -0
- package/dist/collection/components/organism/form-2/bcm-form-components.js +1 -0
- package/dist/collection/components/organism/list/list-focus-manager.js +344 -0
- package/dist/collection/components/organism/list/list-key-control.js +9 -4
- package/dist/collection/components/organism/list/list.css +8 -3
- package/dist/collection/components/organism/list/list.js +227 -27
- package/dist/collection/components/other/toast/toast.js +15 -9
- package/dist/collection/components/other_deprecated/old-tag/old-tag.js +1 -1
- package/dist/collection/components/other_deprecated/tag/tag.js +1 -1
- package/dist/collection/templates/list-item-template.js +6 -5
- package/dist/collection/templates/list-template.js +2 -2
- package/dist/components/bcm-color-input.js +5 -22
- package/dist/components/bcm-dropdown.js +35 -0
- package/dist/components/bcm-file-upload.d.ts +11 -0
- package/dist/components/bcm-file-upload.js +625 -0
- package/dist/components/bcm-form-2.js +1 -0
- package/dist/components/bcm-number-input.js +8 -2
- package/dist/components/bcm-toast.js +15 -9
- package/dist/components/button.js +7 -0
- package/dist/components/color-palette.js +2 -2
- package/dist/components/form.js +1 -0
- package/dist/components/generate.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/linked.js +105 -2
- package/dist/components/list.js +567 -39
- package/dist/esm/bcm-accordion_69.entry.js +722 -66
- package/dist/esm/bcm-attendance-actions-comment.entry.js +4 -4
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +4 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -2
- package/dist/esm/bcm-caption.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +2 -2
- package/dist/esm/bcm-date-picker.entry.js +2 -2
- package/dist/esm/bcm-datetime-picker.entry.js +2 -2
- package/dist/esm/bcm-default.entry.js +2 -2
- package/dist/esm/bcm-file-upload.entry.js +574 -0
- package/dist/esm/bcm-form-2.entry.js +3 -2
- package/dist/esm/bcm-input-2.entry.js +2 -2
- package/dist/esm/bcm-input-custom.entry.js +2 -2
- package/dist/esm/bcm-input-dropdown.entry.js +4 -4
- package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
- package/dist/esm/bcm-modal-2-header.entry.js +4 -4
- package/dist/esm/bcm-modal-2.entry.js +4 -4
- package/dist/esm/bcm-number-input.entry.js +12 -6
- package/dist/esm/bcm-skeleton.entry.js +4 -4
- package/dist/esm/bcm-table.entry.js +4 -4
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +17 -11
- package/dist/esm/bromcom-ui.js +3 -3
- package/dist/esm/{generate-8a394b83.js → generate-56d49b70.js} +1 -1
- package/dist/esm/{global-7919f57f.js → global-97c42a5f.js} +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{number-helper-a86adc72.js → number-helper-455ab41e.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -3
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{package-278e08d9.js → package-edee14d5.js} +1 -1
- package/dist/esm/{validators-89e791a1.js → validators-cc882165.js} +1 -1
- package/dist/types/components/atoms/button/types.d.ts +8 -1
- package/dist/types/components/molecules/color-input/color-input.d.ts +1 -4
- package/dist/types/components/molecules/dropdown/dropdown.d.ts +7 -0
- package/dist/types/components/molecules/linked/linked-focus-manager.d.ts +13 -0
- package/dist/types/components/molecules/linked/linked.d.ts +3 -0
- package/dist/types/components/molecules/number-input/number-input.d.ts +1 -0
- package/dist/types/components/molecules/upload/file-upload.component.d.ts +233 -0
- package/dist/types/components/molecules/upload/file-upload.style.d.ts +548 -0
- package/dist/types/components/organism/list/list-focus-manager.d.ts +53 -0
- package/dist/types/components/organism/list/list-key-control.d.ts +1 -0
- package/dist/types/components/organism/list/list.d.ts +18 -1
- package/dist/types/components/other/toast/toast.d.ts +1 -0
- package/dist/types/components.d.ts +417 -1
- package/dist/types/templates/list-item-template.d.ts +2 -0
- package/dist/types/templates/list-template.d.ts +2 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-16b8a312.entry.js +0 -16
- package/dist/bromcom-ui/p-839b6fd5.entry.js +0 -5
- package/dist/bromcom-ui/p-be8aa3b8.entry.js +0 -5
- package/dist/bromcom-ui/p-d0aa71e1.entry.js +0 -5
- package/dist/bromcom-ui/p-df92d838.js +0 -5
- package/dist/bromcom-ui/p-dfd73f7c.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{E as o}from"./p-e037ee2b.js";import{v as s}from"./p-
|
|
5
|
+
import{E as o}from"./p-e037ee2b.js";import{v as s}from"./p-fc29c94d.js";import{L as t}from"./p-a9eb0321.js";window.bcm={version:s},function(o){const s=document.head,t=document.createElement("script");Object.keys(o).forEach((s=>{t[s]=o[s]})),s.appendChild(t)}({src:"https://kit.fontawesome.com/5e86bea963.js",crossOrigin:"anonymous"}),t.setLicenseKey(o.AG_GRID_LICENSE_KEY);
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as o,h as p,H as t,g as e}from"./p-e037ee2b.js";import"./p-6f861fed.js";import{g as r,s as i}from"./p-2d0ff35e.js";import{F as b}from"./p-6e5f5f36.js";import{c as n}from"./p-64fad38b.js";import{G as s}from"./p-
|
|
5
|
+
import{r as o,h as p,H as t,g as e}from"./p-e037ee2b.js";import"./p-6f861fed.js";import{g as r,s as i}from"./p-2d0ff35e.js";import{F as b}from"./p-6e5f5f36.js";import{c as n}from"./p-64fad38b.js";import{G as s}from"./p-6ce02d0a.js";import{N as a}from"./p-91197b04.js";import{S as m}from"./p-d65bc842.js";import"./p-6f2e4c9b.js";import"./p-a313fba6.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";const x=class{constructor(p){o(this,p),this._id=s.UID(),this._target_id=void 0,this.message=void 0,this._title=void 0,this.placement="bottom",this.open=!1,this.hidden=!1,this.htmlContent=void 0,this.linkedComponent=void 0,this.height="256px",this.maxHeight="500px",this.minHeight="150px",this.placement_string=void 0}async show(){this.open=!0,this.calculateLocation()}async hide(){this.open=!1}getParentPopoverBox(o){if(o){const p=o.closest("old-bcm-popover-box");if(p)return p}return null}componentDidRender(){this.calculateLocation()}handleWheel(){this.calculateLocation()}handleScroll(){this.calculateLocation()}calculateLocation(){if(this.open){var o=this.placement;const p=this.el.querySelector(".bcm-pop-box"),t=document.getElementById(this.linkedComponent)||document.getElementById(this._target_id);if(p&&t){b({ref:t,floating:p,placement:this.placement,offset:2,arrow:!1,arrowColor:""}),r(p,t,o,(p=>o=p));let e=t.getBoundingClientRect().top,n=i(o,t,{rectTop:e});p.style.height=this.height.indexOf("%")>-1?.01*a.toNumber(this.height)*window.innerHeight-n[0]-50+"px":this.height,p.style.minHeight=this.minHeight;const s="top"==o.split("-")[0]?window.innerHeight-(window.innerHeight-e)-50:window.innerHeight-e-50;p.style.maxHeight=this.maxHeight.indexOf("%")>-1?.01*a.toNumber(this.maxHeight)*s+"px":"auto"!=this.maxHeight&&a.toNumber(this.maxHeight)<s?this.maxHeight:s+"px",p.style.overflowY="auto",p.style.minWidth=t.offsetWidth+"px";const m=this.getParentPopoverBox(t);if(m){const o=m.style.zIndex?a.toNumber(m.style.zIndex):10900;this.el.style.zIndex=(+o+1).toString()}(this.message||this._title)&&(p.style.minHeight="0px",p.style.height="auto",p.style.minWidth="230px")}}}setPlacementString(o){const p=m.textContains(o,"-")?o.split("-"):o.split(" ");1===p.length&&p.push("center"),this.placement_string=p.join(" ")}render(){const{message:o,_title:e,open:r,placement_string:i}=this,b=n("bcm-popover-box",i,{"bcm-pop-open":r,"bcm-pop-linked":this.linkedComponent}),s=n("bcm-pop-box");return p(t,{class:b},p("div",{class:s},e&&p("span",{class:"bcm-pop-heading size-2 weight-medium",innerHTML:e}),p("span",{class:"bcm-pop-content size-2",innerHTML:o}),p("slot",null)))}get el(){return e(this)}};x.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}*{box-sizing:border-box}.bcm-popover-box{display:none;position:absolute;transition:transform 0.2s ease-in-out;}.bcm-popover-box .bcm-pop-box{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-size:10px;line-height:calc(10px + 8px);box-shadow:0 4px 12px 2px rgba(17, 24, 38, 0.1);border-radius:4px;position:absolute;box-sizing:border-box;background-color:#FFFFFF;border:1px solid #FFFFFF;z-index:-99999;overflow:hidden;visibility:hidden;width:fit-content;position:absolute;display:block;overflow:hidden;visibility:hidden;z-index:-99999;filter:drop-shadow(0px 1px 6px rgba(0, 0, 0, 0.25))}.bcm-popover-box .bcm-pop-box.bcm-pop-open{overflow:unset;visibility:visible;height:unset}.bcm-popover-box .bcm-pop-box .bcm-pop-heading,.bcm-popover-box .bcm-pop-box .bcm-pop-content{display:block}.bcm-popover-box .bcm-pop-box .bcm-pop-heading:not(:empty){padding:4px 16px;border-bottom:1px solid #D9D9D9;color:var(--bcm-color-grey-9)}.bcm-popover-box .bcm-pop-box .bcm-pop-content:not(:empty){padding:8px 16px;color:var(--bcm-color-grey-8)}.bcm-popover-box::after{content:"";position:absolute;display:none;border:6px solid;z-index:10900;pointer-events:none}.bcm-popover-box.bcm-pop-open{display:block;z-index:10900}.bcm-popover-box.bcm-pop-open .bcm-pop-box{z-index:10900;overflow:unset;visibility:unset}.bcm-popover-box.bcm-pop-open::after{display:block}.bcm-popover-box.top .bcm-pop-box{bottom:100%;margin-bottom:16px}.bcm-popover-box.top::after{bottom:100%;margin-bottom:4px;border-color:#FFFFFF transparent transparent transparent}.bcm-popover-box.bottom .bcm-pop-box{top:100%;margin-top:16px}.bcm-popover-box.bottom::after{top:100%;margin-top:4px;border-color:transparent transparent #FFFFFF transparent}.bcm-popover-box.left .bcm-pop-box{right:100%;margin-right:16px}.bcm-popover-box.left::after{right:100%;margin-right:4px;border-color:transparent transparent transparent #FFFFFF}.bcm-popover-box.right .bcm-pop-box{left:100%;margin-left:16px}.bcm-popover-box.right::after{left:100%;margin-left:4px;border-color:transparent #FFFFFF transparent transparent}.bcm-popover-box.top.center .bcm-pop-box,.bcm-popover-box.bottom.center .bcm-pop-box{left:50%;transform:translateX(-50%)}.bcm-popover-box.top.center::after,.bcm-popover-box.bottom.center::after{left:50%;transform:translateX(-50%)}.bcm-popover-box.top.start .bcm-pop-box,.bcm-popover-box.bottom.start .bcm-pop-box{left:0}.bcm-popover-box.top.start::after,.bcm-popover-box.bottom.start::after{left:16px}.bcm-popover-box.top.end .bcm-pop-box,.bcm-popover-box.bottom.end .bcm-pop-box{right:0}.bcm-popover-box.top.end::after,.bcm-popover-box.bottom.end::after{right:16px}.bcm-popover-box.left.center .bcm-pop-box,.bcm-popover-box.right.center .bcm-pop-box{top:50%;transform:translateY(-50%)}.bcm-popover-box.left.center::after,.bcm-popover-box.right.center::after{top:50%;transform:translateY(-50%)}.bcm-popover-box.left.start .bcm-pop-box,.bcm-popover-box.right.start .bcm-pop-box{top:0}.bcm-popover-box.left.start::after,.bcm-popover-box.right.start::after{top:12px}.bcm-popover-box.left.end .bcm-pop-box,.bcm-popover-box.right.end .bcm-pop-box{bottom:0}.bcm-popover-box.left.end::after,.bcm-popover-box.right.end::after{bottom:12px}.bcm-popover-box.top{transform:translateY(1px)}.bcm-popover-box.bottom{transform:translateY(-1px)}.bcm-popover-box.left{transform:translateX(1px)}.bcm-popover-box.right{transform:translateX(-1px)}.bcm-popover-box.top.bcm-pop-open,.bcm-popover-box.bottom.bcm-pop-open{transform:translateY(0)}.bcm-popover-box.left.bcm-pop-open,.bcm-popover-box.right.bcm-pop-open{transform:translateX(0)}.bcm-popover-box.bcm-pop-linked.top .bcm-pop-box{margin:0 0 2px 0}.bcm-popover-box.bcm-pop-linked.bottom .bcm-pop-box{margin:2px 0 0 0}.bcm-popover-box.bcm-pop-linked.left .bcm-pop-box{margin:0 2px 0 0}.bcm-popover-box.bcm-pop-linked.right .bcm-pop-box{margin:0 0 0 2px}.bcm-popover-box.bcm-pop-linked .bcm-pop-box{filter:unset;border-radius:8px;box-shadow:0 2px 6px 1px rgba(17, 24, 38, 0.1)}.bcm-popover-box.bcm-pop-linked::after{display:none}';export{x as old_bcm_popover_box}
|
|
@@ -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 e,H as i,g as o}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as a}from"./p-
|
|
5
|
+
import{r as t,c as s,h as e,H as i,g as o}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as a}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import{F as r}from"./p-6e5f5f36.js";import{B as p}from"./p-a313fba6.js";import{c as w}from"./p-64fad38b.js";import{c as m}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const c=m({slots:{host:["tw-w-fit","tw-absolute tw-left-0 tw-right-0 tw-z-tooltip tw-opacity-100 tw-transition-opacity tw-duration-300","tw-overscroll-contain tw-scroll-smooth tw-rounded tw-bg-white tw-shadow tw-max-h-64 tw-overflow-y-auto","bcm-ui-element bcm-attendance-actions tw-flex tw-flex-col tw-items-start tw-justify-start tw-p-2 tw-font-medium tw-text-slate-700"],dataItem:["tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-justify-start tw-gap-2 tw-rounded hover:tw-bg-blue-100"],key:["tw-font-mono tw-text-slate-600"],selectedItem:["tw-bg-blue-100"]},variants:{size:{small:{dataItem:["tw-text-2.5 tw-px-2.5 tw-py-2"]},medium:{dataItem:["tw-text-3 tw-px-3 tw-py-2"]},large:{dataItem:["tw-text-4 tw-px-4 tw-py-2"]}}},defaultVariants:{size:"medium"}}),n=class{constructor(e){t(this,e),this.change=s(this,"bcm-attendance-actions-dropdown-change",3),this._id=a.UID(),this.size=p.Size.medium,this.disabled=!1,this.selectedKey=null,this.targetId=null,this.isShow=!1,this.data=[]}handleSelectItem(t){this.selectedKey=t.key,this.change.emit(t)}async show(){const t=document.getElementById(this.targetId);r({ref:t,floating:this.el,placement:"bottom-end",offset:4}),this.isShow=!0}async hide(){this.isShow&&this.el.remove()}handleClickOutside(){this.hide()}render(){const{size:t}=this,{host:s,dataItem:o,selectedItem:a,key:r}=c({size:t});return e(i,{class:s()},this.data.map((t=>e("div",{class:w(o(),this.selectedKey===t.key&&a()),onClick:()=>this.handleSelectItem(t)},e("span",{class:r()},t.key," - "),e("span",null,t.value)))))}get el(){return o(this)}};export{n as bcm_attendance_actions_dropdown}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as i,c as t,h as s,H as h,g as a}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as e}from"./p-6ce02d0a.js";import"./p-91197b04.js";import{S as l}from"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import{d as o}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{C as n}from"./p-556010cb.js";import{c}from"./p-64fad38b.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{i as d}from"./p-7b21fcb9.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";import"./p-08c75801.js";const u=class{constructor(s){i(this,s),this.focus=t(this,"bcm-focus",3),this.blur=t(this,"bcm-blur",3),this.clear=t(this,"bcm-clear",3),this.change=t(this,"bcm-change",7),this.input=t(this,"bcm-input",3),this.beforeClear=t(this,"bcm-input-before-clear",3),this._onChange=t(this,"bcm-onchange",3),this.inValid=!1,this.onInput=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("input",(i=>{this.input.emit(i)}))},this.emitChange=()=>{this.change.emit(this.value)},this.onChange=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("change",(()=>{this.emitChange()}))},this.onFocus=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("focus",(i=>{this.isFocus=!0,this.focus.emit(i)}))},this.onBlur=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("blur",(i=>{this.isFocus=!1,this.blur.emit(i)}))},this.onKeydown=()=>{var i;null===(i=this.inputElement)||void 0===i||i.addEventListener("keydown",(i=>{"ArrowUp"===i.key&&(i.preventDefault(),this.up()),"ArrowDown"===i.key&&(i.preventDefault(),this.down())}))},this.listener=()=>{this.onInput(),this.onChange(),this.onFocus(),this.onBlur(),this.onKeydown()},this._id=e.UID(),this.value="",this.defaultValue=void 0,this._prefix=void 0,this._suffix=void 0,this.size="medium",this.min=void 0,this.max=void 0,this.step=1,this.label=void 0,this.name=void 0,this.fullWidth=!1,this.clearable=!1,this.readonly=!1,this.disabled=!1,this.required=!1,this.mode="none",this.placeholder=void 0,this.thousandSeparator=!1,this.decimalSeparator=void 0,this.decimalScale=void 0,this.fixedDecimalScale=!1,this.allowNegative=!0,this.allowLeadingZeros=!1,this.unitPrefix=void 0,this.unitSuffix=void 0,this.caption=void 0,this.noCaption=!1,this.captionType=r.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.isFocus=!1,this.captionCache=void 0,this.captionTypeCache=void 0,this.valueCache=""}connectedCallback(){this.defaultValue&&(this.value=+this.defaultValue),this.valueCache=this.value,this.captionCache=this.caption,this.captionTypeCache=this.captionType}componentDidLoad(){this.listener()}up(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value+ +this.step,"strict"===this.mode&&this.max&&+this.value>+this.max&&(this.value=this.max),this.emitChange())}down(){this.disabled||(this.value||(this.value=Number(0)),this.value=+this.value-+this.step,"strict"===this.mode&&this.min&&+this.value<+this.min&&(this.value=this.min),this.emitChange())}handleClear(i){this.disabled||this.beforeClear.emit(i).defaultPrevented||(this.value="",this.clear.emit(i),this.emitChange())}checkLength(){const{min:i,max:t,value:s}=this,h=i,a=t;let e=null==s?void 0:s.toString();i&&t?+e<+i||+e>+t?(this.setCaption(l.getMessage("betweenlength",[h,a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):h?+e<+h?(this.setCaption(l.getMessage("minlength",[h]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1):a&&(e>a?(this.setCaption(l.getMessage("maxlength",[a]),"error"),this.inValid=!0):(this.setCaption(),this.inValid=!1))}watchValue(){this.checkLength()}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async set(i){await this.setValue(i)}async get(){return this.value||null}async setValue(i){this.value=i}async setClear(){return this.value=null,await o(10),Promise.resolve()}async resetCaption(){return await o(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.inValid=!1,await o(10),Promise.resolve()}setCaption(i=null,t=null){return this.caption=i||this.captionCache,this.captionType=t||this.captionTypeCache,this.captionError="error"==t?i:null,Promise.resolve()}disconnectedCallback(){var i,t,s,h,a;null===(i=this.inputElement)||void 0===i||i.removeEventListener("input",this.onInput.bind(this)),null===(t=this.inputElement)||void 0===t||t.removeEventListener("change",this.onChange.bind(this)),null===(s=this.inputElement)||void 0===s||s.removeEventListener("focus",this.onFocus.bind(this)),null===(h=this.inputElement)||void 0===h||h.removeEventListener("blur",this.onBlur.bind(this)),null===(a=this.inputElement)||void 0===a||a.removeEventListener("keydown",this.onKeydown.bind(this))}render(){const{_prefix:i,_suffix:t,noCaption:a,captionType:e,captionError:l,caption:o,required:r,_id:u,label:p,size:m,fullWidth:b,clearable:v,value:f,placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,unitPrefix:B,unitSuffix:k,min:D,max:V,step:L,defaultValue:N,disabled:_,mode:P}=this,T=(null==f?void 0:f.toString().length)>0&&v,z="error"==this.captionType||this.inValid,{host:E,inputContainer:H,slotClass:M,clearButton:O,controls:q,controlsBtn:A,controlsBtnDown:F,controlsBtnUp:I,controlsDivider:U,input:W}=d({size:m,fullWidth:b,clearable:T,disabled:_,invalid:z}),Z={placeholder:j,thousandSeparator:w,decimalSeparator:g,decimalScale:x,fixedDecimalScale:y,allowNegative:C,allowLeadingZeros:S,prefix:B,suffix:k},G={min:D,max:V,step:L,value:f,defaultValue:N},R=Object.assign(Object.assign(Object.assign({id:u+"-base-input",name:this.name,disabled:_,mode:P,"aria-label":p,"aria-labelledby":u+"-label",getInputRef:i=>{this.inputElement=i},className:W()},Z),G),{onValueChange:i=>{const{floatValue:t}=i;this.value=t,this._onChange.emit(i)}});return s(h,{class:E()},p&&s("bcm-label",{size:m,type:e,value:p,required:r,htmlFor:u+"-base-input",id:u+"-label"}),s("div",{class:H()},s("div",{class:M()},s("slot",{name:"prefix"},i&&i.length>0&&s("span",{innerHTML:i}))),s("bcm-react-number",{disabled:_,class:"tw-flex-1",options:R}),s("div",{class:M()},!_&&T&&s("button",{class:O(),onClick:i=>this.handleClear(i)},s("i",{class:"far fa-times"})),s("slot",{name:"suffix"},t&&t.length>0&&s("span",{innerHTML:t})),s("div",{class:q()},s("button",{type:"button",disabled:_,class:c(A(),I()),onClick:this.up.bind(this),"aria-label":"Increase value"},s("i",{class:"fas fa-caret-up"})),s("div",{class:U()}),s("button",{type:"button",disabled:_,class:c(A(),F()),onClick:this.down.bind(this),"aria-label":"Decrease value"},s("i",{class:"fas fa-caret-down"}))))),s(n,{noCaption:a,captionType:e,captionError:l,caption:o,customErrorMessage:this.customErrorMessage}))}get el(){return a(this)}static get watchers(){return{value:["watchValue"]}}};export{u as bcm_number_input}
|
|
@@ -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-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{I as n}from"./p-8e5e362a.js";import{G as h}from"./p-
|
|
5
|
+
import{r as t,h as i,H as e,g as s}from"./p-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{I as n}from"./p-8e5e362a.js";import{G as h}from"./p-6ce02d0a.js";import{a as p}from"./p-a313fba6.js";import{d as r}from"./p-6f2e4c9b.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";const o=class{constructor(i){t(this,i),this._id=h.UID(),this.time=new Date,this.value=void 0,this.hidden=!1,this.name=void 0,this.fullWidth=!1,this.required=!1,this.label=void 0,this.placeholder=void 0,this.disabled=!1,this.noMargin=!1,this.noCaption=!1,this.caption="",this.captionError=void 0,this.captionType="default",this.alignment=void 0,this.placement=p.Placement["bottom-start"],this.linkedComponent=void 0,this.clearable=!1}componentWillLoad(){if("string"==typeof this.time){const t=!!/\b([01][0-9]|2[0-3]):([0-5][0-9])\b/.test(this.time)&&this.time.split(":");this.time=t?new Date((new Date).setHours(Number(t[0]),Number(t[1]))):new Date}}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 getInput(){return await this.picker.getInput()}async getValue(){return this.value}async isValid(){return await this.picker.isValid()}async setClear(){return await this.picker.setClear(),await r(10),Promise.resolve()}async resetCaption(){return await r(10),await this.picker.resetCaption(),this.captionType="default",this.captionError=null,await r(10),Promise.resolve()}async open(){return await this.picker.open()}render(){const t=a(this.hidden?"hidden":null,{"full-width":this.fullWidth});return i(e,{class:t},i("bcm-datetime-picker",{"linked-component":this.linkedComponent,id:this._id,fullWidth:this.fullWidth,required:this.required,label:this.label,name:this.name,placeholder:this.placeholder,type:"time",clearable:this.clearable,date:this.time,ref:t=>this.picker=t,disabled:this.disabled,"on-bcm-load":()=>this.handlePickerLoad(),"on-bcm-change":t=>this.handlePickerChange(t),noCaption:this.noCaption,captionError:this.captionError,caption:this.caption,captionType:this.captionType,alignment:this.alignment,placement:this.placement,noMargin:this.noMargin}))}get el(){return s(this)}};(function(t,i,e,s){var a,n=arguments.length,h=n<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,s);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(h=(n<3?a(h):n>3?a(i,e,h):a(i,e))||h);n>3&&h&&Object.defineProperty(i,e,h)})([n()],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_time_picker}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,h as i,H as t,g as p}from"./p-e037ee2b.js";import{G as a}from"./p-
|
|
5
|
+
import{r as e,h as i,H as t,g as p}from"./p-e037ee2b.js";import{G as a}from"./p-6ce02d0a.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";const s=class{constructor(i){e(this,i),this._id=a.UID()}render(){return i(t,null,i("bcm-skeleton",null,i("slot",null)))}get el(){return p(this)}};s.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{s as bcm_default}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as i,f as e,h as o,H as n,g as l,F as s}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as r}from"./p-d0647951.js";import"./p-df92d838.js";import"./p-d65bc842.js";import"./p-ee75cd00.js";import"./p-6f861fed.js";import{B as a}from"./p-a313fba6.js";import{C as d}from"./p-556010cb.js";import{c as u}from"./p-64fad38b.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as p}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-8001040c.js";const h=p({slots:{base:"tw-font-sans tw-flex tw-flex-col tw-items-start tw-justify-start tw-gap-2",content:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-3",inputArea:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-1 tw-box-content tw-border tw-border-solid tw-max-w-[100px] tw-uppercase tw-font-medium tw-text-center tw-border-gray-300 tw-rounded",input:"tw-flex-1 tw-text-inherit tw-uppercase tw-font-semibold tw-text-center tw-border-none tw-bg-transparent tw-outline-none tw-w-full",button:["input-dropdown-button tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-1 tw-rounded tw-outline-none tw-bg-slate-100","tw-border tw-border-solid tw-border-slate-300 tw-font-medium tw-text-slate-600","hover:tw-border-slate-400 hover:tw-bg-slate-200","tw-min-w-[32px]","tw-cursor-pointer","disabled:tw-cursor-not-allowed disabled:tw-text-slate-400 disabled:tw-pointer-events-none","readonly:tw-text-slate-700 readonly:tw-cursor-text"],menu:"tw-mt-1 tw-flex tw-flex-col tw-items-start tw-justify-center tw-gap-2 tw-overflow-auto tw-bg-white tw-p-3 tw-font-sans tw-text-3 tw-text-slate-700",menuItem:"tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 hover:tw-bg-blue-100",selectedItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 tw-bg-primary-200",disabledItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-cursor-not-allowed tw-text-slate-400 tw-bg-slate-100 hover:tw-bg-slate-100 tw-list-none",commentArea:"tw-flex tw-h-fit tw-w-full tw-min-w-[288px] tw-flex-col tw-items-start tw-rounded tw-p-4 tw-shadow-2"},variants:{size:{small:{button:"tw-h-[18px] tw-text-1 tw-leading-none"},medium:{button:"tw-h-[24px] tw-text-2",inputArea:"tw-p-0.5",input:"tw-text-4"},large:{button:"tw-h-[30px] tw-text-2",inputArea:"tw-p-1",input:"tw-text-6"}},invalid:{true:{inputArea:"tw-border-red-600 tw-bg-red-50",input:"tw-text-red-500"}},disabled:{true:{base:"tw-opacity-50 tw-cursor-not-allowed",input:"tw-cursor-not-allowed"}},hideComment:{true:{base:"tw-min-w-[98px]"},false:{base:"tw-min-w-[128px] "}},label:{true:""}},defaultVariants:{size:"medium",invalid:!1,hideComment:!1,disabled:!1}}),c=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.onChangeDropdown=i(this,"bcm-input-dropdown-change",7),this.handleKeyPress=t=>{var i,e;(null===(e=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value)||void 0===e?void 0:e.length)>=+this.maxCharacterLimit&&t.preventDefault()},this._id=r.UID(),this.value=void 0,this.defaultValue={},this.lateKeys="L",this.maxCharacterLimit=1,this.size=a.Size.medium,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.fullWidth=!1,this.hideComment=!1,this.hideCaption=!0,this.disabled=!1,this.required=!1,this.readonly=!1,this.data=[{key:"/",value:"Present",color:"#00b050"},{key:"B",value:"Educated off site (NOT dual registration)",color:"#ffc000"},{key:"C",value:"Other authorised circumstance",color:"#ffc000"},{key:"D",value:"Dual registration",color:"#0070c0"},{key:"E",value:"Excluded",color:"#ff0000"},{key:"F",value:"Free Study",color:"#ffc000"},{key:"I",value:"Illness",color:"#ff0000"},{key:"J",value:"Interview",color:"#ffc000"},{key:"L",value:"Late before reg. closed",color:"#ffc000"}],this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.isOpenMenu=!1,this.invalid=!1}get overlayContainer(){return document.getElementById("bcm-overlay-container")}get menuContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-menu-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-menu-${this._id}`)}get keys(){return this.lateKeys.toLocaleLowerCase().split(",")}get isLate(){var t,i,e,o,n,l;return this.keys.includes(null===(i=null===(t=this.value)||void 0===t?void 0:t.key)||void 0===i?void 0:i.toLocaleLowerCase())||(null===(o=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===o?void 0:o.isLate)||(null===(l=null===(n=this.data)||void 0===n?void 0:n.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===l?void 0:l.lateMin)>0}componentWillLoad(){var t,i;this.captionCache=this.caption,this.captionTypeCache=this.captionType,(null===(t=Object.keys(this.defaultValue))||void 0===t?void 0:t.length)>0?this.watchDefaultValueHandler(this.defaultValue):this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>t.selected))}get commentContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-comment-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-comment-${this._id}`)}clickListener(t){var i,e;const o=r.findEventPath(t,this.el),n=r.findEventPathWithNodeName(t,"BCM-LINKED");o||n||this.keys.includes(null===(i=this.value)||void 0===i?void 0:i.key)||null===(e=this.commentContent)||void 0===e||e.hide()}watchDefaultValueHandler(t){var i,o;t&&(this.value=null===(i=this.data)||void 0===i?void 0:i.find((i=>{var e,o;return(null===(e=null==i?void 0:i.key)||void 0===e?void 0:e.toLowerCase())===(null===(o=t.key)||void 0===o?void 0:o.toLowerCase())})),this.data=this.data.map((i=>(i.key===(null==t?void 0:t.key)?(i=t).selected=!0:i.selected=!1,i))),this.value=null===(o=this.data)||void 0===o?void 0:o.find((t=>null==t?void 0:t.selected)),e(this.el))}async set(t){this.data="string"==typeof t?JSON.parse(t):t}async get(){return this.value}async setClear(){return this.value=null,Promise.resolve()}async resetCaption(){return this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.invalid=!1,Promise.resolve()}onSelectItem(t){var i;this.invalid=!1,this.data=this.data.map((i=>Object.assign(Object.assign({},i),{selected:i.key===t.key}))),this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>null==t?void 0:t.selected)),this.onChangeDropdown.emit(this.value),this.change.emit()}async handleInput(t){var i,e,o,n,l,s,r;const a=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value;if(this.isOpenMenu=!0,(null==a?void 0:a.length)>=+this.maxCharacterLimit){const i=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===a.toLowerCase()}));i?(await(null===(o=this.menuContent)||void 0===o?void 0:o.hide()),(null==i?void 0:i.hideComment)||null===(n=this.commentContent)||void 0===n||n.show(),this.onSelectItem(i)):(this.invalid=!0,this.value=t.target.value,await(null===(l=this.menuContent)||void 0===l?void 0:l.show()),this._input.style.color="#ff0000")}else null===(s=this.commentContent)||void 0===s||s.hide(),null===(r=this.menuContent)||void 0===r||r.hide(),this.value=null,this._input.style.color="#000000",this.invalid=!1;this.change.emit()}onClickSave(){var t;null===(t=this.commentContent)||void 0===t||t.hide(),this.data=this.data.map((t=>Object.assign(Object.assign({},t),t.key===this.value.key&&{lateMin:this.value.lateMin,comment:this.value.comment}))),e(this.el),this.onChangeDropdown.emit(this.value),this.change.emit()}async onClick(t){var i,e;(null==t?void 0:t.hideComment)||null===(i=this.commentContent)||void 0===i||i.show(),await(null===(e=this.menuContent)||void 0===e?void 0:e.hide()),this.onSelectItem(t)}render(){var t,i,e,l,r;const{size:a,label:p,placeholder:c,required:m,disabled:w,readonly:v,_id:x,invalid:g,hideComment:b,noCaption:f,customErrorMessage:y,caption:z,captionType:j,captionError:k,hideCaption:C}=this,{base:I,inputArea:E,input:L,button:O,menu:M,menuItem:$,commentArea:A,disabledItem:B,content:D,selectedItem:S}=h({size:a,invalid:g,hideComment:b,disabled:w});return o(n,{class:I()},p&&o("bcm-label",{htmlFor:x+"-dropdown-input",size:a,value:p,required:m}),o("div",{class:D()},o("div",{class:E()},o("input",{id:x+"-dropdown-input",class:L(),style:{color:null===(t=this.value)||void 0===t?void 0:t.color},type:"text",tabIndex:-1,placeholder:c,value:null===(i=this.value)||void 0===i?void 0:i.key,disabled:w,required:m,autoComplete:"off",readOnly:v,onKeyPress:t=>this.handleKeyPress(t),onInput:t=>this.handleInput(t),ref:t=>this._input=t}),o("button",{disabled:w,id:`i-dropdown-button-${x}`,class:O(),onClick:()=>this.isOpenMenu=!0},o("i",{class:"fas fa-chevron-down"})),o("bcm-linked",{"onBcm-open":({detail:t})=>{var i;return t&&(null===(i=this.commentContent)||void 0===i?void 0:i.hide())},class:"tw-mt-1",id:`i-dropdown-menu-${x}`,"target-id":`i-dropdown-button-${x}`,placement:"bottom-start"},o((()=>{var t;return o(s,null,this.isOpenMenu?o("div",{class:M()},this.invalid&&o("li",{class:$()+" tw-bg-red-100 hover:tw-bg-red-100"},o("span",{class:"tw-text-red-900"},o("i",{class:"far fa-exclamation-circle"})),o("span",null,"There is not mark you entered, please use")),null===(t=this.data)||void 0===t?void 0:t.map((t=>o(s,null,o("li",(null==t?void 0:t.disabled)?{class:B()}:{class:(null==t?void 0:t.selected)?S():$(),onClick:()=>this.onClick(t)},o("span",null,t.key)," - ",o("span",null,t.value)))))):null)}),null)),o("bcm-linked",{id:`i-dropdown-comment-${x}`,"target-id":x,trigger:"custom",placement:"left"},o((()=>{var t,i,e;return o(s,null,this.isOpenMenu?o("div",{class:A()},this.isLate?o(s,null,o("bcm-input",{label:"Minus Late",required:!0,id:this._id+"-input-dropdown-late-content-input",type:"number","full-width":!0,autocomplete:!1,min:0,max:200,value:null===(t=this.value)||void 0===t?void 0:t.lateMin,placeholder:"Enter Minus Late",customErrorMessage:"Max limit 200 mins","onBcm-change":({detail:t})=>this.value.lateMin=+t},o("i",{slot:"prefix",class:"far fa-clock"}))):null,o("bcm-textarea",{"full-width":!0,value:null!==(e=null===(i=this.value)||void 0===i?void 0:i.comment)&&void 0!==e?e:"","onBcm-change":({detail:t})=>this.value.comment=t,label:"Description","no-caption":!0,rows:4}),o("footer",{class:"tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end tw-gap-2"},o("bcm-button",{role:"button","aria-labelledby":"button","aria-label":"button",icon:"fas fa-times",kind:"ghost","icon-position":"prefix",onClick:()=>{var t;return null===(t=this.commentContent)||void 0===t?void 0:t.hide()}},"Close"),o("bcm-button",{role:"button","aria-labelledby":"button","aria-label":"button",icon:"fas fa-save","icon-position":"prefix",onClick:()=>this.onClickSave()},"Save"))):null)}),null))),this.hideComment?null:o("span",{onClick:()=>{var t,i;(null===(t=this.value)||void 0===t?void 0:t.key)&&(this.isOpenMenu=!0,null===(i=this.commentContent)||void 0===i||i.show())},class:u((null===(e=this.value)||void 0===e?void 0:e.comment)||(null===(l=this.value)||void 0===l?void 0:l.lateMin)>0?"tw-text-slate-600":"tw-text-slate-400",{"tw-cursor-pointer":null===(r=this.value)||void 0===r?void 0:r.key})},o("i",{class:"fas fa-comment"}))),!C&&o(d,{noCaption:f,captionType:j,captionError:k,caption:z,customErrorMessage:y}))}get el(){return l(this)}static get watchers(){return{defaultValue:["watchDefaultValueHandler"]}}};c.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-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}:host{display:flex;flex-direction:column;width:100%;position:relative}.input-dropdown-button i{transition:transform 0.2s ease-in-out}.input-dropdown-button[linked-is-open]>i{transform:rotate(-180deg);transition:transform 0.2s ease-in-out}';export{c as bcm_input_dropdown}
|
|
5
|
+
import{r as t,c as i,f as e,h as o,H as n,g as l,F as s}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as r}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import{B as a}from"./p-a313fba6.js";import{C as d}from"./p-556010cb.js";import{c as u}from"./p-64fad38b.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as p}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const h=p({slots:{base:"tw-font-sans tw-flex tw-flex-col tw-items-start tw-justify-start tw-gap-2",content:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-3",inputArea:"tw-flex tw-flex-row tw-items-center tw-justify-start tw-gap-1 tw-box-content tw-border tw-border-solid tw-max-w-[100px] tw-uppercase tw-font-medium tw-text-center tw-border-gray-300 tw-rounded",input:"tw-flex-1 tw-text-inherit tw-uppercase tw-font-semibold tw-text-center tw-border-none tw-bg-transparent tw-outline-none tw-w-full",button:["input-dropdown-button tw-flex tw-flex-row tw-items-center tw-justify-center tw-gap-1 tw-rounded tw-outline-none tw-bg-slate-100","tw-border tw-border-solid tw-border-slate-300 tw-font-medium tw-text-slate-600","hover:tw-border-slate-400 hover:tw-bg-slate-200","tw-min-w-[32px]","tw-cursor-pointer","disabled:tw-cursor-not-allowed disabled:tw-text-slate-400 disabled:tw-pointer-events-none","readonly:tw-text-slate-700 readonly:tw-cursor-text"],menu:"tw-mt-1 tw-flex tw-flex-col tw-items-start tw-justify-center tw-gap-2 tw-overflow-auto tw-bg-white tw-p-3 tw-font-sans tw-text-3 tw-text-slate-700",menuItem:"tw-flex tw-w-full tw-cursor-pointer tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 hover:tw-bg-blue-100",selectedItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-text-slate-700 tw-bg-primary-200",disabledItem:"tw-flex tw-w-full tw-flex-row tw-items-start tw-gap-1 tw-rounded tw-px-3 tw-py-1 tw-cursor-not-allowed tw-text-slate-400 tw-bg-slate-100 hover:tw-bg-slate-100 tw-list-none",commentArea:"tw-flex tw-h-fit tw-w-full tw-min-w-[288px] tw-flex-col tw-items-start tw-rounded tw-p-4 tw-shadow-2"},variants:{size:{small:{button:"tw-h-[18px] tw-text-1 tw-leading-none"},medium:{button:"tw-h-[24px] tw-text-2",inputArea:"tw-p-0.5",input:"tw-text-4"},large:{button:"tw-h-[30px] tw-text-2",inputArea:"tw-p-1",input:"tw-text-6"}},invalid:{true:{inputArea:"tw-border-red-600 tw-bg-red-50",input:"tw-text-red-500"}},disabled:{true:{base:"tw-opacity-50 tw-cursor-not-allowed",input:"tw-cursor-not-allowed"}},hideComment:{true:{base:"tw-min-w-[98px]"},false:{base:"tw-min-w-[128px] "}},label:{true:""}},defaultVariants:{size:"medium",invalid:!1,hideComment:!1,disabled:!1}}),c=class{constructor(e){t(this,e),this.change=i(this,"bcm-change",7),this.onChangeDropdown=i(this,"bcm-input-dropdown-change",7),this.handleKeyPress=t=>{var i,e;(null===(e=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value)||void 0===e?void 0:e.length)>=+this.maxCharacterLimit&&t.preventDefault()},this._id=r.UID(),this.value=void 0,this.defaultValue={},this.lateKeys="L",this.maxCharacterLimit=1,this.size=a.Size.medium,this.label=void 0,this.placeholder=void 0,this.name=void 0,this.fullWidth=!1,this.hideComment=!1,this.hideCaption=!0,this.disabled=!1,this.required=!1,this.readonly=!1,this.data=[{key:"/",value:"Present",color:"#00b050"},{key:"B",value:"Educated off site (NOT dual registration)",color:"#ffc000"},{key:"C",value:"Other authorised circumstance",color:"#ffc000"},{key:"D",value:"Dual registration",color:"#0070c0"},{key:"E",value:"Excluded",color:"#ff0000"},{key:"F",value:"Free Study",color:"#ffc000"},{key:"I",value:"Illness",color:"#ff0000"},{key:"J",value:"Interview",color:"#ffc000"},{key:"L",value:"Late before reg. closed",color:"#ffc000"}],this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.captionError=void 0,this.customErrorMessage=void 0,this.captionCache=void 0,this.captionTypeCache=void 0,this.isOpenMenu=!1,this.invalid=!1}get overlayContainer(){return document.getElementById("bcm-overlay-container")}get menuContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-menu-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-menu-${this._id}`)}get keys(){return this.lateKeys.toLocaleLowerCase().split(",")}get isLate(){var t,i,e,o,n,l;return this.keys.includes(null===(i=null===(t=this.value)||void 0===t?void 0:t.key)||void 0===i?void 0:i.toLocaleLowerCase())||(null===(o=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===o?void 0:o.isLate)||(null===(l=null===(n=this.data)||void 0===n?void 0:n.find((t=>{var i,e,o;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===(null===(o=null===(e=this.value)||void 0===e?void 0:e.key)||void 0===o?void 0:o.toLowerCase())})))||void 0===l?void 0:l.lateMin)>0}componentWillLoad(){var t,i;this.captionCache=this.caption,this.captionTypeCache=this.captionType,(null===(t=Object.keys(this.defaultValue))||void 0===t?void 0:t.length)>0?this.watchDefaultValueHandler(this.defaultValue):this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>t.selected))}get commentContent(){var t,i;return null!==(i=null===(t=this.overlayContainer)||void 0===t?void 0:t.querySelector(`#i-dropdown-comment-${this._id}`))&&void 0!==i?i:this.el.querySelector(`#i-dropdown-comment-${this._id}`)}clickListener(t){var i,e;const o=r.findEventPath(t,this.el),n=r.findEventPathWithNodeName(t,"BCM-LINKED");o||n||this.keys.includes(null===(i=this.value)||void 0===i?void 0:i.key)||null===(e=this.commentContent)||void 0===e||e.hide()}watchDefaultValueHandler(t){var i,o;t&&(this.value=null===(i=this.data)||void 0===i?void 0:i.find((i=>{var e,o;return(null===(e=null==i?void 0:i.key)||void 0===e?void 0:e.toLowerCase())===(null===(o=t.key)||void 0===o?void 0:o.toLowerCase())})),this.data=this.data.map((i=>(i.key===(null==t?void 0:t.key)?(i=t).selected=!0:i.selected=!1,i))),this.value=null===(o=this.data)||void 0===o?void 0:o.find((t=>null==t?void 0:t.selected)),e(this.el))}async set(t){this.data="string"==typeof t?JSON.parse(t):t}async get(){return this.value}async setClear(){return this.value=null,Promise.resolve()}async resetCaption(){return this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,this.invalid=!1,Promise.resolve()}onSelectItem(t){var i;this.invalid=!1,this.data=this.data.map((i=>Object.assign(Object.assign({},i),{selected:i.key===t.key}))),this.value=null===(i=this.data)||void 0===i?void 0:i.find((t=>null==t?void 0:t.selected)),this.onChangeDropdown.emit(this.value),this.change.emit()}async handleInput(t){var i,e,o,n,l,s,r;const a=null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.value;if(this.isOpenMenu=!0,(null==a?void 0:a.length)>=+this.maxCharacterLimit){const i=null===(e=this.data)||void 0===e?void 0:e.find((t=>{var i;return(null===(i=null==t?void 0:t.key)||void 0===i?void 0:i.toLowerCase())===a.toLowerCase()}));i?(await(null===(o=this.menuContent)||void 0===o?void 0:o.hide()),(null==i?void 0:i.hideComment)||null===(n=this.commentContent)||void 0===n||n.show(),this.onSelectItem(i)):(this.invalid=!0,this.value=t.target.value,await(null===(l=this.menuContent)||void 0===l?void 0:l.show()),this._input.style.color="#ff0000")}else null===(s=this.commentContent)||void 0===s||s.hide(),null===(r=this.menuContent)||void 0===r||r.hide(),this.value=null,this._input.style.color="#000000",this.invalid=!1;this.change.emit()}onClickSave(){var t;null===(t=this.commentContent)||void 0===t||t.hide(),this.data=this.data.map((t=>Object.assign(Object.assign({},t),t.key===this.value.key&&{lateMin:this.value.lateMin,comment:this.value.comment}))),e(this.el),this.onChangeDropdown.emit(this.value),this.change.emit()}async onClick(t){var i,e;(null==t?void 0:t.hideComment)||null===(i=this.commentContent)||void 0===i||i.show(),await(null===(e=this.menuContent)||void 0===e?void 0:e.hide()),this.onSelectItem(t)}render(){var t,i,e,l,r;const{size:a,label:p,placeholder:c,required:m,disabled:w,readonly:v,_id:x,invalid:g,hideComment:b,noCaption:f,customErrorMessage:y,caption:z,captionType:j,captionError:k,hideCaption:C}=this,{base:I,inputArea:E,input:L,button:O,menu:M,menuItem:$,commentArea:A,disabledItem:B,content:D,selectedItem:S}=h({size:a,invalid:g,hideComment:b,disabled:w});return o(n,{class:I()},p&&o("bcm-label",{htmlFor:x+"-dropdown-input",size:a,value:p,required:m}),o("div",{class:D()},o("div",{class:E()},o("input",{id:x+"-dropdown-input",class:L(),style:{color:null===(t=this.value)||void 0===t?void 0:t.color},type:"text",tabIndex:-1,placeholder:c,value:null===(i=this.value)||void 0===i?void 0:i.key,disabled:w,required:m,autoComplete:"off",readOnly:v,onKeyPress:t=>this.handleKeyPress(t),onInput:t=>this.handleInput(t),ref:t=>this._input=t}),o("button",{disabled:w,id:`i-dropdown-button-${x}`,class:O(),onClick:()=>this.isOpenMenu=!0},o("i",{class:"fas fa-chevron-down"})),o("bcm-linked",{"onBcm-open":({detail:t})=>{var i;return t&&(null===(i=this.commentContent)||void 0===i?void 0:i.hide())},class:"tw-mt-1",id:`i-dropdown-menu-${x}`,"target-id":`i-dropdown-button-${x}`,placement:"bottom-start"},o((()=>{var t;return o(s,null,this.isOpenMenu?o("div",{class:M()},this.invalid&&o("li",{class:$()+" tw-bg-red-100 hover:tw-bg-red-100"},o("span",{class:"tw-text-red-900"},o("i",{class:"far fa-exclamation-circle"})),o("span",null,"There is not mark you entered, please use")),null===(t=this.data)||void 0===t?void 0:t.map((t=>o(s,null,o("li",(null==t?void 0:t.disabled)?{class:B()}:{class:(null==t?void 0:t.selected)?S():$(),onClick:()=>this.onClick(t)},o("span",null,t.key)," - ",o("span",null,t.value)))))):null)}),null)),o("bcm-linked",{id:`i-dropdown-comment-${x}`,"target-id":x,trigger:"custom",placement:"left"},o((()=>{var t,i,e;return o(s,null,this.isOpenMenu?o("div",{class:A()},this.isLate?o(s,null,o("bcm-input",{label:"Minus Late",required:!0,id:this._id+"-input-dropdown-late-content-input",type:"number","full-width":!0,autocomplete:!1,min:0,max:200,value:null===(t=this.value)||void 0===t?void 0:t.lateMin,placeholder:"Enter Minus Late",customErrorMessage:"Max limit 200 mins","onBcm-change":({detail:t})=>this.value.lateMin=+t},o("i",{slot:"prefix",class:"far fa-clock"}))):null,o("bcm-textarea",{"full-width":!0,value:null!==(e=null===(i=this.value)||void 0===i?void 0:i.comment)&&void 0!==e?e:"","onBcm-change":({detail:t})=>this.value.comment=t,label:"Description","no-caption":!0,rows:4}),o("footer",{class:"tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end tw-gap-2"},o("bcm-button",{role:"button","aria-labelledby":"button","aria-label":"button",icon:"fas fa-times",kind:"ghost","icon-position":"prefix",onClick:()=>{var t;return null===(t=this.commentContent)||void 0===t?void 0:t.hide()}},"Close"),o("bcm-button",{role:"button","aria-labelledby":"button","aria-label":"button",icon:"fas fa-save","icon-position":"prefix",onClick:()=>this.onClickSave()},"Save"))):null)}),null))),this.hideComment?null:o("span",{onClick:()=>{var t,i;(null===(t=this.value)||void 0===t?void 0:t.key)&&(this.isOpenMenu=!0,null===(i=this.commentContent)||void 0===i||i.show())},class:u((null===(e=this.value)||void 0===e?void 0:e.comment)||(null===(l=this.value)||void 0===l?void 0:l.lateMin)>0?"tw-text-slate-600":"tw-text-slate-400",{"tw-cursor-pointer":null===(r=this.value)||void 0===r?void 0:r.key})},o("i",{class:"fas fa-comment"}))),!C&&o(d,{noCaption:f,captionType:j,captionError:k,caption:z,customErrorMessage:y}))}get el(){return l(this)}static get watchers(){return{defaultValue:["watchDefaultValueHandler"]}}};c.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-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}:host{display:flex;flex-direction:column;width:100%;position:relative}.input-dropdown-button i{transition:transform 0.2s ease-in-out}.input-dropdown-button[linked-is-open]>i{transform:rotate(-180deg);transition:transform 0.2s ease-in-out}';export{c as bcm_input_dropdown}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{v as r}from"./p-
|
|
5
|
+
import{v as r}from"./p-fc29c94d.js";import{c as t}from"./p-a2df6c19.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}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,c as s,h as i,H as e,g as w}from"./p-e037ee2b.js";import{c as o}from"./p-64fad38b.js";import{G as a}from"./p-6ce02d0a.js";import{a as r}from"./p-a313fba6.js";import{d as h}from"./p-6f2e4c9b.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";const n=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=r.Placement.bottom,this.messageIcon=void 0,this.viewButton=!1,this.closeButton=!0,this.removeAfterClose=!0,this.visible=!1,this.visibleContainer=!1}renderMultiline(t){return t?t.split("\n").map(((t,s)=>[s>0&&i("br",null),t])):null}async show(){const t=document.getElementById(this._id+"-container");return t&&this.createContainer(this.position).appendChild(t),this.visible=!0,await h(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 h(100),this.visible=!1,this.removeAfterClose&&(await h(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=o("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===r.Placement.top,"tw-flex-col tw-inset-x-0 tw-bottom-4 tw-mx-auto":this.position===r.Placement.bottom,"tw-flex-col-reverse tw-top-4 tw-left-4":this.position===r.Placement["top-start"],"tw-flex-col-reverse tw-top-4 tw-right-4":this.position===r.Placement["top-end"],"tw-flex-col tw-bottom-4 tw-left-4":this.position===r.Placement["bottom-start"],"tw-flex-col tw-bottom-4 tw-right-4":this.position===r.Placement["bottom-end"]});i.classList.add(...t.split(" ")),document.body.appendChild(i)}return i}render(){return i(e,{class:"tw-hidden"},i("div",{class:o({"tw-hidden":!this.visible}),id:this._id+"-container",onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},i("div",{class:o("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-start tw-justify-between tw-gap-5"},i("div",{class:"tw-flex tw-items-start tw-gap-3 "},this.status&&i("i",{class:o("tw-text-6 tw-pt-0.5",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:o({"tw-text-4":!this.description,"tw-text-6 tw-font-medium":this.description})},this.renderMultiline(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:o("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:o("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.renderMultiline(this.description)),i("slot",null))))}get el(){return w(this)}};export{n as bcm_toast}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as i,h as s,H as e,g as o}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as
|
|
5
|
+
import{r as t,c as i,h as s,H as e,g as o}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as a}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import{d as n}from"./p-6f2e4c9b.js";import{F as c}from"./p-6e5f5f36.js";import{B as r}from"./p-a313fba6.js";import{c as l}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const m=l({slots:{host:["tw-w-fit","tw-absolute tw-left-0 tw-right-0 tw-z-tooltip tw-opacity-100 tw-transition-opacity tw-duration-300","tw-rounded tw-bg-white tw-shadow","bcm-ui-element bcm-attendance-actions tw-flex tw-flex-col tw-items-start tw-justify-start tw-p-4 tw-font-medium tw-text-slate-700"],footer:["tw-flex tw-w-full tw-flex-row tw-items-center tw-justify-end tw-gap-2 "]},variants:{size:{small:{},medium:{},large:{}}},defaultVariants:{size:"medium"}}),h=class{constructor(s){t(this,s),this.change=i(this,"bcm-attendance-actions-comment-change",3),this.lateMinutes=null,this.comment=null,this._id=a.UID(),this.size=r.Size.medium,this.disabled=!1,this.selectedKey=null,this.targetId=null,this.isShow=!1,this.isLate=!1,this.selectedItem=null}handleSave(t,i){this.change.emit({lateMinutes:t,comment:i}),this.hide()}async show(){const t=document.getElementById(this.targetId);c({ref:t,floating:this.el,placement:"bottom-end",offset:8,arrow:!0,arrowColor:"tw-bg-white"}),this.isShow=!0,await n(100),this.isLate?this.focusInput():this.focusTextarea()}focusInput(){const t=this.el.querySelector("bcm-input");null==t||t.onBcmSelect()}focusTextarea(){const t=this.el.querySelector("bcm-textarea");null==t||t.onBcmSelect()}async hide(){this.isShow&&this.el.remove()}handleClickOutside(t){a.findEventPath(t,this.el)||this.hide()}async formSubmit(){var t,i,s;const{lateMinutes:e,comment:o,isLate:a}=this;if(a&&e&&!(e>=0&&e<=200))return;const{isValid:n}=await(null===(t=this.el.querySelector("bcm-form"))||void 0===t?void 0:t.submit());n&&this.handleSave(e||(null===(i=this.selectedItem)||void 0===i?void 0:i.lateMin),o||(null===(s=this.selectedItem)||void 0===s?void 0:s.comment))}render(){var t,i;const{size:o}=this,{host:a,footer:n}=m({size:o});return s(e,{class:a(),onKeyDown:t=>{"Escape"===t.key&&this.hide()}},s("bcm-form",{validation:!0,style:{width:"256px"}},this.isLate?s("bcm-input",{label:"Minus Late",required:!0,name:"lateMin",id:this._id+"-input-dropdown-late-content-input",type:"number",size:this.size,autocomplete:!1,"no-margin":!0,min:0,max:200,value:null===(t=this.selectedItem)||void 0===t?void 0:t.lateMin,placeholder:"Enter Minus Late","onBcm-change":({detail:t})=>this.lateMinutes=t,onKeyDown:t=>{"Enter"===t.key&&this.formSubmit()}},s("i",{slot:"prefix",class:"far fa-clock"})):null,s("bcm-textarea",{name:"comment",value:null===(i=this.selectedItem)||void 0===i?void 0:i.comment,size:this.size,"onBcm-change":({detail:t})=>this.comment=t,label:"Description","no-caption":!0,rows:4,onKeyDown:t=>{"Enter"===t.key&&this.formSubmit()}}),s("footer",{class:n()},s("bcm-button",{class:"tw-order-2",icon:"fas fa-save","icon-position":"prefix",size:this.size,onClick:()=>this.formSubmit()},"Save"),s("bcm-button",{class:"tw-order-1",icon:"fas fa-times",kind:"ghost",size:this.size,"icon-position":"prefix",onClick:()=>this.hide()},"Close"))))}get el(){return o(this)}};export{h as bcm_attendance_actions_comment}
|
|
@@ -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 i,g as s}from"./p-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{I as h}from"./p-8e5e362a.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-
|
|
5
|
+
import{r as t,h as e,H as i,g as s}from"./p-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{I as h}from"./p-8e5e362a.js";import{D as n}from"./p-626a65e9.js";import{G as p}from"./p-6ce02d0a.js";import{a as r}from"./p-a313fba6.js";import{d as l}from"./p-6f2e4c9b.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";const o=class{constructor(e){t(this,e),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 e(i,{class:t},e("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,e,i,s){var a,h=arguments.length,n=h<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 p=t.length-1;p>=0;p--)(a=t[p])&&(n=(h<3?a(n):h>3?a(e,i,n):a(e,i))||n);h>3&&n&&Object.defineProperty(e,i,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}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{s}from"./p-6ce02d0a.js";class a{}a.isNumber=a=>s((()=>/^[0-9]+$/i.test(a))),a.convertToNumber=a=>s((()=>Number(a))),a.replaceNumber=a=>s((()=>a.replace(/[^0-9]/g,""))),a.replaceFloat=a=>s((()=>a.replace(/[^0-9.]/g,""))),a.toFixed=(a,r)=>s((()=>a.toFixed(r))),a.parseFloatFixed=(r,e)=>s((()=>parseFloat(a.replaceFloat(r)).toFixed(e))),a.getDecimalLength=a=>s((()=>a.split(".")[1]?a.split(".")[1].length:0)),a.toNumber=a=>s((()=>Number(a.replace(/[^0-9.]/g,""))));export{a as N}
|
|
@@ -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-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,h as p,H as s,g as r}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import"./p-a313fba6.js";import{c as e}from"./p-64fad38b.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.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 i,h as e,H as s,g as o}from"./p-e037ee2b.js";import{G as r}from"./p-6ce02d0a.js";import{c as l}from"./p-08c75801.js";import{C as a}from"./p-556010cb.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-64fad38b.js";const n=l({slots:{container:"bcm-ui-element tw-flex tw-flex-col tw-w-full",label:"tw-text-3 tw-font-medium tw-text-color-label tw-leading-5",triggerWrap:"tw-flex tw-flex-col tw-w-full",zone:["tw-relative tw-rounded tw-border tw-transition-all tw-duration-200 tw-ease-in-out","tw-select-none tw-flex tw-items-center tw-justify-center","tw-border-dashed tw-border-color tw-bg-color-default"],iconContainer:"tw-flex tw-shrink-0 tw-items-center tw-justify-center",iconSizeClass:"tw-block tw-text-color-default",zoneTextWrapper:"tw-flex tw-flex-col tw-flex-1 tw-min-w-0",zoneTextMain:"tw-text-3 tw-font-medium tw-text-color-caption tw-leading-tight",zoneLink:"tw-text-color-primary tw-font-medium hover:tw-underline tw-cursor-pointer",zoneTextSub:"tw-text-2 tw-text-color-caption tw-leading-4",list:"tw-flex tw-flex-col tw-gap-2",fileRow:["tw-flex tw-flex-col tw-rounded tw-min-w-0","tw-bg-color-default tw-px-4 tw-py-2"],fileRowHeader:"tw-flex tw-items-center tw-gap-2 tw-w-full tw-min-w-0",fileIcon:"tw-shrink-0 tw-text-color-primary",fileTitle:"tw-font-medium tw-leading-5 tw-text-color-default tw-truncate tw-flex-1 tw-min-w-0",progressWrapper:"tw-flex tw-items-center tw-gap-2 tw-w-full",progressTrack:"tw-flex-1 tw-h-2 tw-bg-color-default-hover tw-rounded-full tw-overflow-hidden",progressBar:"tw-h-full tw-bg-primary-600 tw-rounded-full tw-transition-all tw-duration-300 tw-ease-out",percent:"tw-text-3 tw-font-medium tw-leading-5 tw-text-color-default tw-min-w-[3ch] tw-text-right tw-shrink-0",actions:"tw-flex tw-items-center tw-shrink-0",iconBtn:["tw-flex tw-items-center tw-justify-center tw-transition-colors tw-cursor-pointer","tw-appearance-none tw-border-none tw-bg-transparent tw-p-0","tw-text-color-default hover:tw-text-color-primary"],errorArea:["tw-flex tw-items-center tw-gap-3 tw-py-1.5 tw-px-3 tw-rounded","tw-bg-red-50 tw-text-color-error tw-text-3 tw-font-medium tw-leading-none"],errorIcon:"tw-flex tw-items-center tw-justify-center tw-shrink-0",errorClose:"tw-ml-auto tw-cursor-pointer hover:tw-opacity-80",captionWrap:"[&_.bcm-caption-area]:!tw-mt-0"},variants:{size:{medium:{container:"tw-gap-1",zone:"tw-gap-2 tw-px-4 tw-py-4",zoneTextWrapper:"tw-gap-1",fileRow:"tw-gap-1 tw-px-4 tw-py-2",fileRowHeader:"tw-gap-2",fileIcon:"tw-text-4",fileTitle:"tw-text-3",iconBtn:"tw-text-4",progressWrapper:"tw-gap-2",progressTrack:"tw-h-2"},small:{container:"tw-gap-0.5",zone:"tw-gap-2 tw-px-3 tw-py-3",zoneTextWrapper:"tw-gap-0.5",fileRow:"tw-gap-0.5 tw-px-3 tw-py-1",fileRowHeader:"tw-gap-1",fileTitle:"tw-text-2",fileIcon:"tw-text-3",percent:"tw-text-2",iconBtn:"tw-text-3",progressWrapper:"tw-gap-1",progressTrack:"tw-h-1.5",list:"tw-gap-1.5"}},position:{vertical:{zone:"tw-flex-col tw-text-center",zoneTextWrapper:"tw-items-center",zoneTextSub:"tw-text-center"},horizontal:{zone:"tw-flex-row tw-text-left",zoneTextWrapper:"tw-items-start"},button:{container:"tw-gap-1"}},disabled:{true:"",false:""},zoneHovered:{true:"",false:""},dragActive:{true:"",false:""},zoneError:{true:"",false:""},fullWidth:{true:{container:"tw-max-w-full"},false:{container:"tw-max-w-64"}}},compoundVariants:[{position:["vertical","horizontal"],size:"medium",class:{iconContainer:"tw-h-10",iconSizeClass:"tw-text-[40px] tw-leading-none"}},{position:"vertical",size:"small",class:{iconContainer:"tw-size-8",iconSizeClass:"tw-text-[32px] tw-leading-none"}},{position:"horizontal",size:"small",class:{iconContainer:"tw-h-8 tw-max-h-8 tw-max-w-9",iconSizeClass:"!tw-text-[28px] !tw-leading-none"}},{position:["vertical","horizontal"],disabled:!1,class:{zone:"tw-cursor-pointer"}},{position:["vertical","horizontal"],disabled:!1,zoneError:!1,zoneHovered:!0,dragActive:!1,class:{zone:"!tw-border-solid !tw-border-color-primaryInfo"}},{position:["vertical","horizontal"],disabled:!1,zoneError:!1,dragActive:!0,class:{zone:"!tw-border-solid !tw-border-color-primaryInfo !tw-bg-primary-50"}},{position:["vertical","horizontal"],zoneError:!0,disabled:!1,class:{zone:"!tw-border-solid tw-border-color-error !tw-bg-red-50"}},{disabled:!0,class:{zone:["tw-cursor-not-allowed","tw-border-dashed tw-border-color-disabled tw-bg-color-disabled"],zoneTextMain:"tw-text-color-disabled",zoneTextSub:"tw-text-color-disabled",zoneLink:"tw-text-color-disabled tw-cursor-not-allowed tw-no-underline hover:tw-no-underline",iconSizeClass:"!tw-text-color-disabled"}}],defaultVariants:{size:"medium",position:"vertical",disabled:!1,zoneHovered:!1,dragActive:!1,zoneError:!1,fullWidth:!1}}),h=class{constructor(e){t(this,e),this.bcmFileChange=i(this,"bcm-file-change",1),this.bcmChange=i(this,"bcm-change",7),this.bcmFileRemoved=i(this,"bcm-file-removed",1),this.bcmUploadCanceled=i(this,"bcm-upload-canceled",1),this.bcmFocus=i(this,"bcm-focus",1),this.bcmBlur=i(this,"bcm-blur",1),this.inputId=r.UID(),this.labelId=r.UID(),this.internalMaxSizeInBytes=1024*this.maxSize*1024,this.onFileInputChange=t=>{const i=t.target;this.addFiles(i.files),i.value=""},this.openFileDialog=t=>{var i;null==t||t.preventDefault(),null==t||t.stopPropagation(),this.disabled||null===(i=this.fileInput)||void 0===i||i.click()},this.handleZoneMouseEnter=()=>{this.disabled||(this.zoneHovered=!0)},this.handleZoneMouseLeave=()=>{this.zoneHovered=!1},this.handleZoneKeyDown=t=>{this.disabled||" "!==t.key&&"Enter"!==t.key||(t.preventDefault(),this.openFileDialog())},this.handleFocus=t=>{this.bcmFocus.emit(t)},this.handleBlur=t=>{this.bcmBlur.emit(t)},this.name="file",this.label="",this.caption="",this.noCaption=!1,this.multiple=!1,this.accept="",this.maxSize=2,this.required=!1,this.disabled=!1,this.size="medium",this.position="vertical",this.buttonLabel=void 0,this.showFileList=!0,this.fullWidth=!1,this.uploadUrl=void 0,this.maxFileCount=void 0,this.customErrorMessages=void 0,this.value=null,this.captionError=void 0,this.captionType=void 0,this.files=[],this.dragActive=!1,this.zoneHovered=!1,this.maxSizeError=!1,this.typeError=!1,this.maxFileCountError=!1}componentWillLoad(){this.internalMaxSizeInBytes=1024*this.maxSize*1024,this.host.hasAttribute("position")||"small"!==this.size||(this.position="horizontal")}get isButtonMode(){return"button"===this.position}get zoneError(){return"error"===this.captionType&&!!this.captionError}getStyleProps(){return{size:this.size,position:this.position,disabled:this.disabled,zoneHovered:this.zoneHovered,dragActive:this.dragActive,zoneError:this.zoneError,fullWidth:this.fullWidth}}disconnectedCallback(){this.uploadTimer&&(window.clearInterval(this.uploadTimer),this.uploadTimer=void 0)}handleMaxSizeChange(){this.internalMaxSizeInBytes=1024*this.maxSize*1024}isFileAccepted(t){if(!this.accept)return!0;const i="."+(t.name.split(".").pop()||"").toLowerCase();return this.accept.toLowerCase().split(",").map((t=>t.trim())).filter(Boolean).includes(i)}emitChange(){const t=this.files.map((t=>t.file));this.value=t.length>0?t:null,this.bcmFileChange.emit(t),this.bcmChange.emit(this.value)}normalizeSetDataToItems(t){return(Array.isArray(t)?t:[t]).filter((t=>t instanceof File)).map((t=>({id:r.UID(),file:t,status:this.showFileList?"uploading":"uploaded",progress:this.showFileList?0:void 0})))}async get(){return this.value}async set(t){this.uploadTimer&&(window.clearInterval(this.uploadTimer),this.uploadTimer=void 0);const i=this.normalizeSetDataToItems(t);if(i.length>0)return this.files=this.multiple?i:[i[0]],this.maxSizeError=!1,this.typeError=!1,this.maxFileCountError=!1,this.emitChange(),void(this.showFileList&&this.startFakeUpload());this.value=t,this.bcmChange.emit(this.value)}async setClear(){return this.files=[],this.maxSizeError=!1,this.typeError=!1,this.maxFileCountError=!1,this.emitChange(),new Promise((t=>setTimeout((()=>{this.resetCaption(),t(void 0)}),10)))}async resetCaption(){return new Promise((t=>setTimeout((()=>{this.captionError=null,this.captionType=null,this.maxSizeError=!1,this.typeError=!1,this.maxFileCountError=!1,t(void 0)}),10)))}startFakeUpload(){this.uploadTimer&&window.clearInterval(this.uploadTimer),this.uploadTimer=window.setInterval((()=>{let t=!1;this.files=this.files.map((i=>{var e;if("uploading"!==i.status)return i;t=!0;const s=null!==(e=i.progress)&&void 0!==e?e:0,o=Math.min(s+15,100);return Object.assign(Object.assign({},i),o>=100?{status:"uploaded",progress:void 0}:{progress:o})})),!t&&this.uploadTimer&&(window.clearInterval(this.uploadTimer),this.uploadTimer=void 0,this.emitChange())}),300)}addFiles(t){if(!t||this.disabled)return;const i=[];let e,s=!1,o=!1;if(Array.from(t).forEach((t=>{this.isFileAccepted(t)?t.size>this.internalMaxSizeInBytes?s=!0:i.push({id:r.UID(),file:t,status:this.showFileList?"uploading":"uploaded",progress:this.showFileList?0:void 0}):o=!0})),this.maxSizeError=s,this.typeError=o,this.maxFileCountError=!1,i.length){if(this.multiple)if("number"==typeof this.maxFileCount){const t=this.maxFileCount-this.files.length;if(t<=0)return this.maxFileCountError=!0,void this.emitChange();const s=i.slice(0,Math.max(0,t));s.length<i.length&&(this.maxFileCountError=!0),e=[...this.files,...s]}else e=[...this.files,...i];else e=[i[0]];this.files=e,this.emitChange(),this.showFileList&&this.startFakeUpload()}else this.emitChange()}removeFile(t){this.files=this.files.filter((i=>i.id!==t.id)),this.bcmFileRemoved.emit(t),this.emitChange()}cancelUpload(t){this.files=this.files.filter((i=>i.id!==t.id)),this.bcmUploadCanceled.emit(t),this.emitChange()}handleDrop(t){var i;if(t.preventDefault(),this.dragActive=!1,this.disabled||this.isButtonMode)return;const e=(null===(i=t.dataTransfer)||void 0===i?void 0:i.files)||null;if(!e||0===e.length)return;const s=e.item(0);s&&this.isFileAccepted(s)?this.addFiles(e):this.typeError=!0}handleDragOver(t){t.preventDefault(),this.disabled||this.isButtonMode||(this.dragActive=!0)}handleDragLeave(t){t.preventDefault(),this.dragActive=!1}async setFocus(t){var i,e;this.isButtonMode?null===(i=this.uploadButtonRef)||void 0===i||i.focus(t):null===(e=this.uploadZoneRef)||void 0===e||e.focus(t)}getMaxSizeLabel(){return`Maximum size ${Math.round(this.internalMaxSizeInBytes/1048576)}MB`}renderErrors(){var t,i,s;const{errorArea:o,errorIcon:r,errorClose:l}=n(this.getStyleProps()),a=(null===(t=this.customErrorMessages)||void 0===t?void 0:t.maxSize)||`The file size exceeds the limit of ${Math.round(this.internalMaxSizeInBytes/1048576)} MB.`,h=(null===(i=this.customErrorMessages)||void 0===i?void 0:i.type)||"This file type is not supported.",c=(null===(s=this.customErrorMessages)||void 0===s?void 0:s.maxFileCount)||"You have reached the maximum number of files.";return e("div",{class:"tw-w-full tw-space-y-2"},this.maxSizeError&&e("div",{class:o()},e("div",{class:r()},e("i",{class:"fa-solid fa-circle-exclamation"})),e("span",{class:"tw-flex-1"},a),e("div",{class:l(),onClick:()=>this.maxSizeError=!1},e("i",{class:"fa-solid fa-xmark"}))),this.typeError&&e("div",{class:o()},e("div",{class:r()},e("i",{class:"fa-solid fa-circle-exclamation"})),e("span",{class:"tw-flex-1"},h),e("div",{class:l(),onClick:()=>this.typeError=!1},e("i",{class:"fa-solid fa-xmark"}))),this.maxFileCountError&&e("div",{class:o()},e("div",{class:r()},e("i",{class:"fa-solid fa-circle-exclamation"})),e("span",{class:"tw-flex-1"},c),e("div",{class:l(),onClick:()=>this.maxFileCountError=!1},e("i",{class:"fa-solid fa-xmark"}))))}renderUploadZone(){const{zone:t,iconContainer:i,iconSizeClass:s,zoneTextWrapper:o,zoneTextMain:r,zoneTextSub:l,zoneLink:a}=n(this.getStyleProps());return e("div",{ref:t=>this.uploadZoneRef=t,tabindex:this.disabled?void 0:0,part:"upload-zone",class:t(),role:"button","aria-disabled":this.disabled?"true":"false","aria-labelledby":this.label?this.labelId:void 0,"aria-label":this.label||"File upload",onClick:this.openFileDialog,onKeyDown:this.handleZoneKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur,onMouseEnter:this.handleZoneMouseEnter,onMouseLeave:this.handleZoneMouseLeave,onDragOver:t=>this.handleDragOver(t),onDragLeave:t=>this.handleDragLeave(t),onDrop:t=>this.handleDrop(t)},e("div",{class:i()},e("i",{class:`fa-solid fa-cloud-arrow-up ${s()}`,"aria-hidden":"true"})),e("div",{class:o()},e("div",{class:r()},"Drag and drop your file here ",e("span",{class:"tw-inline-block"},"or"," ",e("span",{class:a(),role:"button",tabindex:-1,"aria-label":"Choose file",onClick:t=>this.openFileDialog(t)},"Browse files"))),e("div",{class:l()},this.getMaxSizeLabel())))}renderUploadButton(){const{triggerWrap:t}=n(this.getStyleProps()),i=this.buttonLabel||"Upload";return e("div",{class:t(),part:"upload-trigger"},e("bcm-button",{ref:t=>this.uploadButtonRef=t,variant:"upload",size:this.size,disabled:this.disabled,onFocus:this.handleFocus,onBlur:this.handleBlur,"onBcm-click":t=>this.openFileDialog(t)},i))}renderHiddenInput(){return e("input",{ref:t=>this.fileInput=t,id:this.inputId,type:"file",hidden:!0,accept:this.accept,multiple:this.multiple,disabled:this.disabled,onChange:this.onFileInputChange})}renderFileRow(t){var i,s;const{percent:o,iconBtn:r,fileRow:l,fileRowHeader:a,fileIcon:h,fileTitle:c,progressWrapper:d,progressTrack:w,progressBar:p}=n(this.getStyleProps()),u="uploading"===(null==t?void 0:t.status);return e("div",{part:"file-row",class:l(),title:null===(i=null==t?void 0:t.file)||void 0===i?void 0:i.name},e("div",{class:a()},e("i",{class:`fa-regular fa-file ${h()}`}),e("span",{class:c()},null===(s=null==t?void 0:t.file)||void 0===s?void 0:s.name),e("button",{type:"button",part:u?"cancel-btn":"remove-btn",class:r(),onClick:()=>u?this.cancelUpload(t):this.removeFile(t),title:u?"Cancel":"Remove"},e("i",{class:"fa-regular fa-trash"}))),this.showFileList&&u&&e("div",{class:d()},e("div",{class:w()},e("div",{class:p(),style:{width:`${t.progress||0}%`}})),e("span",{class:o()},t.progress||0,"%")))}render(){const{container:t,label:i,list:o,captionWrap:r}=n(this.getStyleProps()),l="string"==typeof this.caption?this.caption.trim().length>0:!!this.caption,h=!this.noCaption&&(l||!!this.captionError);return e(s,{tabindex:"-1"},e("div",{class:t()},this.label&&e("label",{id:this.labelId,htmlFor:this.inputId,part:"label",class:i()},this.label),this.isButtonMode?this.renderUploadButton():this.renderUploadZone(),this.renderHiddenInput(),this.renderErrors(),h&&e("div",{class:r(),part:"caption"},e(a,{noCaption:!1,captionType:this.captionType,captionError:this.captionError,caption:this.caption,size:"small"===this.size?"medium":"large"})),this.showFileList&&this.files.length>0&&e("div",{part:"file-list",class:o()},this.files.map((t=>this.renderFileRow(t))))))}get host(){return o(this)}static get watchers(){return{maxSize:["handleMaxSizeChange"]}}};export{h as bcm_file_upload}
|
|
@@ -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}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as i}from"./p-
|
|
5
|
+
import{r as t,h as e,H as s}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as i}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import"./p-a313fba6.js";import{c as r}from"./p-08c75801.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const o=r({slots:{host:"tw-flex tw-flex-row tw-items-center tw-justify-center tw-flex-shrink-0 tw-relative tw-overflow-hidden tw-bg-gray-200"},variants:{variant:{rect:{host:"tw-rounded"},circle:{host:"tw-rounded-full"}},effect:{pulse:{host:"tw-animate-pulse"},ping:{host:"tw-animate-ping"},none:{host:"tw-animate-none"}},hidden:{true:{host:"tw-hidden"},false:{host:"tw-flex"}}},defaultVariants:{variant:"rect",effect:"pulse",hidden:!1}}),p=class{constructor(e){t(this,e),this._id=i.UID(),this.effect="pulse",this.variant="rect",this.hidden=!1,this.width="100%",this.height="16px",this.marginBottom=null,this.customStyles={}}render(){const{variant:t,effect:i,width:r,height:p,marginBottom:a,customStyles:n,hidden:c}=this,h=Object.assign(Object.assign(Object.assign(Object.assign({},r?{width:r}:{}),p?{height:p}:{}),a?{marginBottom:a}:{}),"string"==typeof n?JSON.parse(n):n),{host:d}=o({variant:t,effect:i,hidden:c});return e(s,{class:d(),style:h})}};export{p as bcm_skeleton}
|
|
@@ -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-e037ee2b.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,h as e,H as s,g as r}from"./p-e037ee2b.js";import{G as o}from"./p-6ce02d0a.js";import{c as i}from"./p-64fad38b.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";import"./p-85eedabc.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:d,placeholder:n,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":d})},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:n,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
|
-
import{r as e,h as i,H as t,g as p}from"./p-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{C as r}from"./p-499d8454.js";import{G as s}from"./p-
|
|
5
|
+
import{r as e,h as i,H as t,g as p}from"./p-e037ee2b.js";import{c as a}from"./p-64fad38b.js";import{C as r}from"./p-499d8454.js";import{G as s}from"./p-6ce02d0a.js";import{S as o}from"./p-d65bc842.js";import{S as n}from"./p-dc73abe2.js";import"./p-85eedabc.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-fc29c94d.js";import"./p-a313fba6.js";const c=class{constructor(i){e(this,i),this.modalSlots={},this._id=s.UID(),this.hidden=!1,this.color="slate",this.header=void 0,this.footer=void 0}connectedCallback(){const e=this.el.querySelectorAll("bcm-card-header, bcm-card-footer");e&&e.forEach((e=>{let i=o.lowercase(o.split(e.nodeName,"-").pop());if(e.slot=i,"header"===i){let i=e.getAttribute("color");i&&(i="white"==i?i:i+"-50",e.setAttribute("style",`background-color: ${r.dsColor(i)}`))}e.classList.add(`bcm-card__${i}`),this.modalSlots[i]=e}))}render(){const e=a("bcm-card",this.hidden?"hidden":null);return i(t,{class:e},i((()=>this.modalSlots.header&&i("slot",{name:"header"})),null),i("div",{class:"bcm-card__body"},i(n,null)),i((()=>this.modalSlots.footer&&i("slot",{name:"footer"})),null))}get el(){return p(this)}};c.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}*{box-sizing:border-box}.bcm-card{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:block;width:100%;background-color:var(--bcm-new-ds-color-white);border-radius:8px;box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1);box-sizing:border-box}.bcm-card__header,.bcm-card__body,.bcm-card__footer{display:block;width:100%}.bcm-card__header{border-radius:8px 8px 0 0;padding:12px 24px;color:var(--bcm-new-ds-color-slate-700);font-weight:600}.bcm-card__body{padding:12px 24px}.bcm-card__footer{padding:12px 24px;border-radius:0 0 8px 8px}';export{c as bcm_card}
|
|
@@ -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 a}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,c as s,h as i,H as e,g as a}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import{d as h}from"./p-6f2e4c9b.js";import{B as r}from"./p-a313fba6.js";import{c as l}from"./p-64fad38b.js";import"./p-436364c8.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const c=class{constructor(i){t(this,i),this.modalClose=s(this,"bcm-modal-close",7),this.modalOpen=s(this,"bcm-modal-open",7),this.modalBeforeClose=s(this,"bcm-modal-before-close",7),this.modalBeforeOpen=s(this,"bcm-modal-before-open",7),this._id=o.UID(),this.isShow=!1,this.center=!1,this.zIndex="10400",this.size=r.Size.medium,this.backdrop=!0,this.fullWidth=!1,this.fullScreen=!1,this.overflow=!0,this.isShowModal=!1,this.shake=!1}handleClick(t){const s=o.findEventPathHasAttribute(t,"data-dismiss"),i=t.target.attributes.getNamedItem("is-click-overlay");i&&"static"===this.backdrop?this.shakeModal():(s||i)&&(this.hide(),t.preventDefault(),t.stopPropagation())}handleKeyDown(t){Array.from(document.querySelectorAll("bcm-modal-2[is-show]")).pop()===this.el&&"Escape"===t.key&&("static"===this.backdrop?this.shakeModal():this.hide(),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation())}shakeModal(){this.shake=!0,setTimeout((()=>this.shake=!1),300)}async hide(){this.modalBeforeClose.emit()}async hideModal(t){t.defaultPrevented||t.target===this.el&&(this.isShowModal=!1,await h(150),this.isShow=!1,this.modalClose.emit())}async show(){this.modalBeforeOpen.emit()}async showModal(t){t.defaultPrevented||t.target===this.el&&(this.isShow=!0,await h(50),this.isShowModal=!0,document.body.appendChild(this.el),this.modalOpen.emit())}getWidth(t){return{small:"576px",medium:"768px",large:"992px",xlarge:"1024px",xxlarge:"1200px",xxxlarge:"1700px"}[t]||t}setSize(){const{fullScreen:t,fullWidth:s,size:i,overflow:e}=this;let a="auto",o="auto",h=s?"100%":this.getWidth(i);return t&&(o=e?"100vh":"auto",h="100vw",a="100vh"),{width:h,minHeight:a,height:o}}render(){return i(e,{class:{"tw-hidden":!this.isShow}},i("bcm-overlay",{"z-index":+this.zIndex-1,opacity:this.isShowModal?"0.5":"0"}),i("div",{class:l("tw-fixed tw-inset-0","tw-flex tw-h-full tw-w-full tw-items-start tw-justify-center","tw-overflow-y-scroll tw-overscroll-contain tw-font-sans",this.center?"tw-items-center":""),style:{zIndex:this.zIndex},"is-click-overlay":!0},i("div",{class:l("tw-flex tw-w-full tw-flex-col","tw-relative tw-z-modal tw-bg-white","tw--translate-y-[20px] tw-transform tw-opacity-0 tw-transition tw-duration-300 tw-ease-in-out",this.fullScreen?"":`tw-m-4 tw-rounded-lg ${this.overflow?"tw-max-h-[90vh]":""} `,this.shake?"tw-animate-shake":""),style:Object.assign(Object.assign({},this.setSize()),this.isShowModal?{transform:"translateY(0)",opacity:"1"}:{})},i("slot",{name:"header"}),i("bcm-scroll-area",{"is-disabled":!this.overflow},i("slot",null)),i("slot",{name:"footer"}))))}get el(){return a(this)}};export{c as bcm_modal_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-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,h as e,H as s,g as r}from"./p-e037ee2b.js";import"./p-499d8454.js";import"./p-626a65e9.js";import{G as o}from"./p-6ce02d0a.js";import"./p-91197b04.js";import"./p-d65bc842.js";import"./p-d3cf91a9.js";import"./p-6f861fed.js";import"./p-a313fba6.js";import"./p-436364c8.js";import"./p-6f2e4c9b.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";import"./p-fc29c94d.js";const p=class{constructor(e){t(this,e),this._id=o.UID(),this.el.slot="header"}render(){return e(s,{class:"tw-w-full tw-flex-none tw-overflow-hidden tw-rounded-t-lg tw-bg-primary-400 tw-pt-1"},e("div",{class:"tw-flex tw-w-full tw-items-center tw-justify-between tw-bg-primary-50 tw-px-4 tw-py-3 tw-text-4 tw-font-medium tw-text-slate-600"},e("span",null,e("slot",null)),e("button",{type:"button",class:"tw-focus:tw-outline-none tw-flex tw-h-8 tw-w-8 tw-cursor-pointer tw-items-center tw-justify-center tw-bg-transparent tw-text-5 tw-text-slate-700 tw-transition tw-duration-150 tw-ease-in-out hover:tw-text-slate-900","data-dismiss":!0},e("i",{class:"far fa-times"}))))}get el(){return r(this)}};export{p as bcm_modal_2_header}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{h as s,r as t,c as i,g as e}from"./p-e037ee2b.js";import{G as c}from"./p-6ce02d0a.js";import{a as o}from"./p-a313fba6.js";import{c as h}from"./p-64fad38b.js";import{N as a}from"./p-91197b04.js";import{e as r}from"./p-6f2e4c9b.js";import{C as l}from"./p-436364c8.js";import{C as n}from"./p-2e73d572.js";import"./p-fc29c94d.js";import"./p-a2df6c19.js";import"./p-85eedabc.js";const d=({_id:t,color:i,customStyle:e,size:c,checked:d,hidden:m,value:p,type:b,onDismiss:f,onSelect:u})=>{!c&&(c=o.FontSize["size-1"]);const j=h(((s,t=!1)=>(a.isNumber(s)&&(s=o.FontSize["size-"+s]||o.FontSize["size-4"]),t?+(o.FontSizeValue[s]||o.FontSizeValue["size-4"])+2:s))(c),"bcm-tag__content",b),k=h("bcm-tag",{hidden:m});return s("div",{id:t,class:h(k,{checked:d})},s("span",{hidden:!0},s("slot",null)),s("span",{class:j,style:(s=>{if((b===o.TagType.basic||b==o.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===o.TagType.add&&s("span",{class:"left"},s("bcm-icon",{icon:"far fa-plus"})),b===o.TagType.checkable&&s("input",{type:"checkbox",checked:d}),s("span",{class:"value",style:e},p),b===o.TagType.dismissable&&s("span",{class:"right close-button",onClick:s=>f(s)},s("bcm-icon",{icon:"fal fa-times"}))))},m=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=c.UID(),this._internal_id=c.UID(),this.hidden=!1,this.value="",this.type=o.TagType.basic,this.checked=!1,this.color=void 0,this.customStyle=void 0,this.itemObject=void 0,this.size=o.FontSize["size-1"],this.closeFunc=s=>s,this.selectFunc=s=>s}handleClick(){this.type===o.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:c,size:h,hidden:a,checked:r}=this;return s(d,{size:h,hidden:a,color:i,customStyle:c,checked:r,value:e,type:o.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{m as bcm_tag}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{s as f}from"./p-
|
|
5
|
+
import{s as f}from"./p-6ce02d0a.js";class a{}a.compareTwoArrayIsSame=(a,d)=>f((()=>a.length===d.length&&a.every(((f,a)=>f===d[a])))),a.isEmailValid=f=>/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(f),a.isUrlValid=f=>/^(?:(?:https?|ftp):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/\S*)?$/i.test(f),a.isNumberValid=f=>/^[+-]?\d+$/.test(f),a.isNumberFloatValid=f=>/^\d+(\.\d+)?$/.test(f),a.isPhoneValid=f=>/^(?=.*[0-9])[- +()0-9]+$/.test(f),a.pattern=(f,a)=>new RegExp(a).test(f),a.isValidate=(f,d)=>{switch(d){case"email":return a.isEmailValid(f);case"url":return a.isUrlValid(f);case"number":return a.isNumberValid(f)||a.isNumberFloatValid(f);case"phone":return a.isPhoneValid(f);default:return!0}};export{a as V}
|