bromcom-ui 2.9.0-rc.6 → 2.9.0-rc.7
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/global/global.js +13 -5
- package/dist/bromcom-ui/p-000b420c.entry.js +5 -0
- package/dist/bromcom-ui/p-00fdf291.js +5 -0
- package/dist/bromcom-ui/p-06229e3f.entry.js +5 -0
- package/dist/bromcom-ui/p-0c43313a.entry.js +5 -0
- package/dist/bromcom-ui/p-0ec92a6b.entry.js +5 -0
- package/dist/bromcom-ui/p-17622eb2.entry.js +5 -0
- package/dist/bromcom-ui/p-18e7852c.entry.js +5 -0
- package/dist/bromcom-ui/p-1d1d8a3d.entry.js +5 -0
- package/dist/bromcom-ui/p-21676489.entry.js +5 -0
- package/dist/bromcom-ui/p-2395d0c2.entry.js +5 -0
- package/dist/bromcom-ui/p-259dc75a.entry.js +5 -0
- package/dist/bromcom-ui/p-26ef712b.entry.js +5 -0
- package/dist/bromcom-ui/p-2987a7b4.entry.js +5 -0
- package/dist/bromcom-ui/p-2c6d6b81.entry.js +5 -0
- package/dist/bromcom-ui/p-2d8e0eda.entry.js +5 -0
- package/dist/bromcom-ui/p-36daa24a.entry.js +5 -0
- package/dist/bromcom-ui/p-36febf51.entry.js +5 -0
- package/dist/bromcom-ui/p-376f2520.entry.js +5 -0
- package/dist/bromcom-ui/p-3ba3a354.entry.js +5 -0
- package/dist/bromcom-ui/p-4ed1f823.entry.js +5 -0
- package/dist/bromcom-ui/{p-2b13dd48.js → p-50a7dd08.js} +1 -1
- package/dist/bromcom-ui/p-539839b3.entry.js +5 -0
- package/dist/bromcom-ui/p-5a46ec8e.entry.js +5 -0
- package/dist/bromcom-ui/p-66712bb9.entry.js +5 -0
- package/dist/bromcom-ui/p-68601d61.entry.js +5 -0
- package/dist/bromcom-ui/p-6c0807a4.entry.js +5 -0
- package/dist/bromcom-ui/p-7359e502.entry.js +5 -0
- package/dist/bromcom-ui/p-7d69462f.entry.js +5 -0
- package/dist/bromcom-ui/p-877d7d32.entry.js +5 -0
- package/dist/bromcom-ui/p-89f86797.entry.js +5 -0
- package/dist/bromcom-ui/{p-dbdb10d5.js → p-8a860cff.js} +1 -1
- package/dist/bromcom-ui/p-940dda87.js +5 -0
- package/dist/bromcom-ui/p-9635a90f.entry.js +5 -0
- package/dist/bromcom-ui/p-96f68aca.entry.js +5 -0
- package/dist/bromcom-ui/p-9e0d6a0a.entry.js +5 -0
- package/dist/bromcom-ui/p-a0dece18.entry.js +5 -0
- package/dist/bromcom-ui/p-a2e7ae97.entry.js +5 -0
- package/dist/bromcom-ui/p-a367da3b.entry.js +5 -0
- package/dist/bromcom-ui/p-a5193cc3.entry.js +5 -0
- package/dist/bromcom-ui/{p-6a5ac874.entry.js → p-aa0eca7a.entry.js} +1 -1
- package/dist/bromcom-ui/p-bf59206d.entry.js +5 -0
- package/dist/bromcom-ui/p-c0a68c3a.js +5 -0
- package/dist/bromcom-ui/p-c115e8f7.entry.js +5 -0
- package/dist/bromcom-ui/{p-17264523.js → p-cde20403.js} +1 -1
- package/dist/bromcom-ui/p-ce8592a0.js +5 -0
- package/dist/bromcom-ui/p-d030cf23.entry.js +5 -0
- package/dist/bromcom-ui/p-d673d273.entry.js +5 -0
- package/dist/bromcom-ui/p-e8485a2f.entry.js +5 -0
- package/dist/bromcom-ui/p-f113c511.entry.js +5 -0
- package/dist/bromcom-ui/p-f2386dd2.entry.js +5 -0
- package/dist/bromcom-ui/p-f34bd011.entry.js +5 -0
- package/dist/bromcom-ui/p-fa7dc5ae.entry.js +5 -0
- package/dist/bromcom-ui/{p-3215d598.js → p-fb1cb57d.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +2 -1
- package/dist/cjs/bcm-alert.cjs.entry.js +2 -1
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -1
- package/dist/cjs/bcm-avatar.cjs.entry.js +4 -3
- package/dist/cjs/bcm-badge_15.cjs.entry.js +5 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -1
- package/dist/cjs/bcm-button-group.cjs.entry.js +2 -1
- package/dist/cjs/bcm-card.cjs.entry.js +2 -1
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +2 -1
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -1
- package/dist/cjs/bcm-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -3
- package/dist/cjs/bcm-chip.cjs.entry.js +2 -1
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -1
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -3
- package/dist/cjs/bcm-date-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-default.cjs.entry.js +2 -1
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -1
- package/dist/cjs/bcm-form-2.cjs.entry.js +2 -1
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -1
- package/dist/cjs/bcm-input.cjs.entry.js +5 -4
- package/dist/cjs/bcm-label.cjs.entry.js +2 -1
- package/dist/cjs/bcm-list_3.cjs.entry.js +6 -5
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -3
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -3
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -3
- package/dist/cjs/bcm-modal.cjs.entry.js +2 -1
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -1
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -1
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -1
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -3
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -3
- package/dist/cjs/bcm-range.cjs.entry.js +2 -1
- package/dist/cjs/bcm-skeleton.cjs.entry.js +2 -1
- package/dist/cjs/bcm-step.cjs.entry.js +3 -2
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -4
- package/dist/cjs/bcm-switch.cjs.entry.js +2 -1
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -2
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -2
- package/dist/cjs/bcm-time-picker.cjs.entry.js +2 -1
- package/dist/cjs/bcm-toast.cjs.entry.js +2 -1
- package/dist/cjs/bromcom-ui.cjs.js +2 -1
- package/dist/cjs/{generate-d3f8c970.js → generate-c6ed8219.js} +2 -3
- package/dist/cjs/global-e45184f0.js +22 -0
- package/dist/cjs/{input-template-22725c68.js → input-template-99396b47.js} +1 -1
- package/dist/cjs/{json-parse-decarator-22c236ad.js → json-parse-decarator-08847f37.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -1
- package/dist/cjs/{number-helper-66fe9479.js → number-helper-e137c8d6.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -2
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -1
- package/dist/cjs/package-de04912b.js +9 -0
- package/dist/cjs/{stepper-states-43daae37.js → stepper-states-3414f192.js} +1 -1
- package/dist/cjs/{validators-aa39e3ec.js → validators-77b56203.js} +1 -1
- package/dist/collection/global/global.js +13 -5
- package/dist/components/generate.js +3 -3
- package/dist/components/index.js +8 -2
- package/dist/esm/bcm-accordion.entry.js +2 -1
- package/dist/esm/bcm-alert.entry.js +2 -1
- package/dist/esm/bcm-attendance.entry.js +2 -1
- package/dist/esm/bcm-avatar.entry.js +4 -3
- package/dist/esm/bcm-badge_15.entry.js +5 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -1
- package/dist/esm/bcm-button-group.entry.js +2 -1
- package/dist/esm/bcm-card.entry.js +2 -1
- package/dist/esm/bcm-checkbox-group.entry.js +2 -1
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -1
- package/dist/esm/bcm-checkbox.entry.js +2 -1
- package/dist/esm/bcm-chip-group.entry.js +4 -3
- package/dist/esm/bcm-chip.entry.js +2 -1
- package/dist/esm/bcm-collapse.entry.js +2 -1
- package/dist/esm/bcm-color-input.entry.js +4 -3
- package/dist/esm/bcm-date-picker.entry.js +2 -1
- package/dist/esm/bcm-datetime-picker.entry.js +2 -1
- package/dist/esm/bcm-default.entry.js +2 -1
- package/dist/esm/bcm-drawer.entry.js +4 -3
- package/dist/esm/bcm-expansion-panel.entry.js +2 -1
- package/dist/esm/bcm-form-2.entry.js +2 -1
- package/dist/esm/bcm-input-custom.entry.js +2 -1
- package/dist/esm/bcm-input.entry.js +5 -4
- package/dist/esm/bcm-label.entry.js +2 -1
- package/dist/esm/bcm-list_3.entry.js +6 -5
- package/dist/esm/bcm-modal-2-footer.entry.js +4 -3
- package/dist/esm/bcm-modal-2-header.entry.js +4 -3
- package/dist/esm/bcm-modal-2.entry.js +4 -3
- package/dist/esm/bcm-modal.entry.js +2 -1
- package/dist/esm/bcm-popconfirm-box.entry.js +2 -1
- package/dist/esm/bcm-popconfirm.entry.js +2 -1
- package/dist/esm/bcm-progress.entry.js +2 -1
- package/dist/esm/bcm-radio-group.entry.js +4 -3
- package/dist/esm/bcm-radio.entry.js +4 -3
- package/dist/esm/bcm-range.entry.js +2 -1
- package/dist/esm/bcm-skeleton.entry.js +2 -1
- package/dist/esm/bcm-step.entry.js +3 -2
- package/dist/esm/bcm-stepper.entry.js +5 -4
- package/dist/esm/bcm-switch.entry.js +2 -1
- package/dist/esm/bcm-tag.entry.js +3 -2
- package/dist/esm/bcm-textarea.entry.js +3 -2
- package/dist/esm/bcm-time-picker.entry.js +2 -1
- package/dist/esm/bcm-toast.entry.js +2 -1
- package/dist/esm/bromcom-ui.js +2 -1
- package/dist/esm/{generate-786bd626.js → generate-f05c24f0.js} +1 -2
- package/dist/esm/global-c0136d64.js +20 -0
- package/dist/esm/{input-template-88fba8d7.js → input-template-85f595d7.js} +1 -1
- package/dist/esm/{json-parse-decarator-e85e0fea.js → json-parse-decarator-2f05d903.js} +1 -1
- package/dist/esm/loader.js +2 -1
- package/dist/esm/{number-helper-d9b73e76.js → number-helper-a66bec28.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -2
- package/dist/esm/old-bcm-popover.entry.js +2 -1
- package/dist/esm/package-56c53e8e.js +7 -0
- package/dist/esm/{stepper-states-026cdd66.js → stepper-states-a0e95cc8.js} +1 -1
- package/dist/esm/{validators-0b019b63.js → validators-f99b9189.js} +1 -1
- package/package.json +2 -2
- package/dist/bromcom-ui/p-0641597e.entry.js +0 -5
- package/dist/bromcom-ui/p-16dd7db9.entry.js +0 -5
- package/dist/bromcom-ui/p-17af6738.js +0 -5
- package/dist/bromcom-ui/p-184b7d3b.js +0 -5
- package/dist/bromcom-ui/p-1fbd8af5.entry.js +0 -5
- package/dist/bromcom-ui/p-24b8154c.entry.js +0 -5
- package/dist/bromcom-ui/p-24d8e9d6.entry.js +0 -5
- package/dist/bromcom-ui/p-2afdec61.entry.js +0 -5
- package/dist/bromcom-ui/p-2b88c7bb.entry.js +0 -5
- package/dist/bromcom-ui/p-31eabaf3.entry.js +0 -5
- package/dist/bromcom-ui/p-3baf677c.entry.js +0 -5
- package/dist/bromcom-ui/p-459212eb.entry.js +0 -5
- package/dist/bromcom-ui/p-57f8802e.entry.js +0 -5
- package/dist/bromcom-ui/p-5c468c5b.entry.js +0 -5
- package/dist/bromcom-ui/p-6272ecb4.entry.js +0 -5
- package/dist/bromcom-ui/p-6b861832.entry.js +0 -5
- package/dist/bromcom-ui/p-772a214f.js +0 -5
- package/dist/bromcom-ui/p-7a394115.entry.js +0 -5
- package/dist/bromcom-ui/p-81b2dffb.entry.js +0 -5
- package/dist/bromcom-ui/p-891de348.entry.js +0 -5
- package/dist/bromcom-ui/p-8d7bbe30.entry.js +0 -5
- package/dist/bromcom-ui/p-8de9d6b6.entry.js +0 -5
- package/dist/bromcom-ui/p-8fc8b4ff.entry.js +0 -5
- package/dist/bromcom-ui/p-9099a1bf.entry.js +0 -5
- package/dist/bromcom-ui/p-9773e744.entry.js +0 -5
- package/dist/bromcom-ui/p-a512ca45.entry.js +0 -5
- package/dist/bromcom-ui/p-b10265d7.entry.js +0 -5
- package/dist/bromcom-ui/p-b26ded9b.entry.js +0 -5
- package/dist/bromcom-ui/p-b45b54b5.entry.js +0 -5
- package/dist/bromcom-ui/p-b47e4417.entry.js +0 -5
- package/dist/bromcom-ui/p-c2cbb810.entry.js +0 -5
- package/dist/bromcom-ui/p-c387f0fb.entry.js +0 -5
- package/dist/bromcom-ui/p-c3a91954.entry.js +0 -5
- package/dist/bromcom-ui/p-ca6cd989.entry.js +0 -5
- package/dist/bromcom-ui/p-ccaabc2e.entry.js +0 -5
- package/dist/bromcom-ui/p-d37502f9.entry.js +0 -5
- package/dist/bromcom-ui/p-dd43bcd9.entry.js +0 -5
- package/dist/bromcom-ui/p-de850d57.entry.js +0 -5
- package/dist/bromcom-ui/p-e0c60c5d.entry.js +0 -5
- package/dist/bromcom-ui/p-e520d2a2.entry.js +0 -5
- package/dist/bromcom-ui/p-e86e4968.entry.js +0 -5
- package/dist/bromcom-ui/p-eaad2239.entry.js +0 -5
- package/dist/bromcom-ui/p-ee4b8753.entry.js +0 -5
- package/dist/bromcom-ui/p-ee50f5e2.entry.js +0 -5
- package/dist/bromcom-ui/p-ee5da693.entry.js +0 -5
- package/dist/bromcom-ui/p-f0fa1c29.entry.js +0 -5
- package/dist/bromcom-ui/p-fe37e88f.entry.js +0 -5
- package/dist/cjs/global-b0d21446.js +0 -15
- package/dist/esm/global-4fad925b.js +0 -13
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{h as t,r as e,c as i,H as n,g as c}from"./p-6d7fe687.js";import{I as o}from"./p-54c0916c.js";import{J as r}from"./p-184b7d3b.js";import"./p-2fc584c4.js";import"./p-626a65e9.js";import{s,G as l}from"./p-17af6738.js";import{N as a}from"./p-17264523.js";import{S as h}from"./p-8d0ca8c2.js";import{V as m}from"./p-dbdb10d5.js";import"./p-5ae0a59b.js";import{g as b,s as d}from"./p-dbc4c30c.js";import{p as u,d as p}from"./p-3c7a0345.js";import{a as f,B as x}from"./p-a429e85b.js";import{C as _}from"./p-a56e8c98.js";import{c as v}from"./p-d65a1e21.js";import"./p-3fac58f7.js";import{L as g}from"./p-c49d038e.js";import"./p-2e73d572.js";import{c as y}from"./p-3cde7f38.js";import{r as w,a as k}from"./p-1eabd5dc.js";import{c as z}from"./p-6f56f8ca.js";import{I as j}from"./p-2b13dd48.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-74b2d896.js";const O=({disabled:e,checked:i,readonly:n,required:c,indeterminate:o,hidden:r,captionType:s,_id:l})=>{const a=v("bcm-checkbox","bcm-checkbox__type-default","bcm-checkbox-size-medium",{error:s==f.Status.error,hidden:r,checked:i,disabled:e,required:c,readonly:n}),h=v("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+o,{"bcm-checkbox__label-icon-checked":i}),m=v("bcm-checkbox__label");return t("div",{class:a},t("input",{tabindex:"-1",id:l,type:"checkbox",checked:i,disabled:e,required:c,readonly:n}),t("label",{class:m,htmlFor:l},t("span",{class:h},t("bcm-icon",{icon:"far fa-check"}))))},I=({selected:e,total:i,found:n,multiple:c,variableText:o})=>(i=i||0,o=o?u(o,i):"items",t("footer",{class:"bcm-info-footer"},t("bcm-text",{scale:"size-1",color:"grey-8"},c&&e>0&&` ( ${e} selected ) `,` Total ${i} `,null!=n&&` / ${n} `,` ${o} found. `))),S=({item:e,treeview:i,highlight:n,checkboxes:c,size:o,selectedItem:r,openGroup:s,checkedItem:l,focusItem:a,searchIsOnlyChilds:m})=>{const b=e.items&&e.items.length>0;var d=h.htmlEntities(e.text);let u=[];if(n&&h.slugify(d).includes(h.slugify(n))&&(m&&(!m||b&&(i||"group"==e.type))||(d=h.highlight(d,n))),"group"!=e.type&&e.template){const t=e.template.replace(/\s/g,"").match(/\{{[^}}]+\}/g).map((t=>t.replace(/[{}]/g,""))),i=Object.keys(e.itemObject);u=t.filter((t=>i.includes(t)))}d=e.isHtmlContent?e.isHtmlContent:e.template&&u.length>0?h.templateParser(e.template,Object.assign(Object.assign({},e.itemObject),{text:d})):d;const p=!i&&"group"==e.type&&!e.clickable,f=e.disabled,x=e.readonly,_=()=>{e.open=e.isSearching,s(e.id)};return t("div",{id:e.id,hidden:e.hidden,"on-focus":t=>!p&&!f&&a(t),class:v("bcm-list__item","bcm-list__item-"+o,{"bcm-list__item--group":!i&&"group"==e.type,"bcm-list__item--readonly":x})},t("div",{class:v("bcm-list__item-content",!c&&e.selected&&"selected",{disabled:f})},i&&t("div",{class:"bcm-list__item-content-collapse-icon",onClick:()=>_()},b&&t("bcm-icon",{icon:v("fas fa-caret-"+(e.isSearching||e.open?"down":"right"))})),t("div",{class:v("bcm-list__item-content-text",{treeview:i}),onClick:t=>{var i;((i=t).path||i.composedPath()).filter((t=>t.attributes&&t.attributes.getNamedItem("unlinked")))[0]||(x&&_(),!p&&!f&&!x&&(c?l(e.id):r(e.id)))}},c&&(i||!i&&"group"!=e.type)&&t("div",{class:"bcm-list__item-content-text-checkbox"},t(O,{indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled})),t("span",Object.assign({class:"bcm-list__item-content-text-inner"},e.title&&{title:e.title},{innerHTML:d})))),(i||!i&&"group"==e.type)&&b&&t("div",{class:"bcm-list__item-childs"},(e.isSearching||e.open||!i&&"group"==e.type)&&e.items.map((e=>t(S,{highlight:n,item:e,searchIsOnlyChilds:m,treeview:i,checkboxes:c,size:o,selectedItem:r,checkedItem:l,openGroup:t=>s(t),focusItem:t=>a(t)})))))},C=({highlight:e,selectAllItem:i,bcmListContainer:n,treeview:c,checkboxes:o,checkAll:r,infoFooter:s,value:l,totalData:a,searchFound:h,variableText:m,_id:b,data:d,width:u,height:p,size:f,searchPlaceholder:x,minSearchLength:_,selectedItem:v,openGroup:g,checkedItem:y,onScrollEvent:w,focusItem:k,items:z,searchable:j,searchIsOnlyChilds:O,emptyText:C,emptyIcon:E})=>{const M=!(c&&h>0||h>0);return t("div",{id:`bcm-list-${b}`,class:n,style:{"--height":p,"--width":u}},d&&j&&t("section",{class:"bcm-list__container-search"},t("bcm-search",{size:f,id:`bcm-list-${b}-search`,data:d,clearable:!0,placeholder:x,"min-search-length":_,searchIsOnlyChilds:O})),t("main",{onScroll:t=>w(t),class:"scrolling",style:{"overscroll-behavior":"none"}},t("div",{style:{"min-height":`${(null==h?c?z.length:a:h)*("small"===f?28:"medium"===f?36:48)||0}px`,"overscroll-behavior":"none",height:"100%",display:"flex","flex-direction":"column"}},r&&0!=h&&z&&z.length>0&&o&&M&&t("section",{class:"bcm-list__container-select-all"},t(S,{size:f,item:i,treeview:!1,checkboxes:!0,selectedItem:t=>v(t),checkedItem:t=>y(t),openGroup:t=>g(t),focusItem:t=>k(t)})),z.map((i=>t(S,{highlight:e,size:f,item:i,searchIsOnlyChilds:O,treeview:c,checkboxes:o,selectedItem:t=>v(t),checkedItem:t=>y(t),openGroup:t=>g(t),focusItem:t=>k(t)}))),(!z||0===z.length)&&0!=h&&t("section",{class:"bcm-list__container-no-data"},t("bcm-empty",{style:{height:"auto"},icon:E},t("span",{innerHTML:C||"No data"}))),0==h&&t("section",{class:"bcm-list__container-no-data"},t("bcm-empty",{style:{height:"auto"},icon:E},t("span",{innerHTML:C||"No Data Found"}))))),s&&d&&d.length>0&&t(I,{selected:null==l?void 0:l.length,total:a,found:h,multiple:o,variableText:m}))},{state:E}=y({value:new Map}),M=(t,e,i,n="0.")=>{let c=[];return t&&t.length>0&&(c=t.map(((t,c)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({itemObject:t},t),e),{parentId:s((()=>i),null),open:e.allOpen||t.open||!1}),(e.treeview||!e.treeview&&"group"==t.type)&&t.items&&t.items.length>0?{items:s((()=>M(t.items,e,t.id,`${n}${c}`)),[])}:{items:[]}),{ct:`${n}${c}`})))),c},T=t=>s((()=>E.value.get(t)),{}),R=(t,e)=>{let i=0;return t.forEach((t=>{(e||!e&&"group"!=t.type)&&(i+=1),(e||!e&&"group"==t.type)&&t.items&&(i+=R(t.items,e))})),i},$=(t,e,i,n)=>{let c;c=i||T(t).dataSource,c&&c.forEach((i=>{null!=n?i.open=n:i.id==e?(i.open=!i.open,i.isSearching=i.open,!i.open&&i.items&&$(t,e,i.items,!1)):i.items&&$(t,e,i.items)}))},D=(t,e,i)=>{i&&i.forEach((i=>{i.id==e?(i.checked=!1,i.itemObject.checked=!1,A(t,i.parentId)):i.items&&D(t,e,i.items)}))},F=(t,e)=>{P(t,e)},P=(t,e,i)=>{let n;e=Array.isArray(e)?e:[e],n=i||T(t).dataSource,n&&n.forEach((i=>{e.includes(i.id)?(N(t,i),i.parentId&&A(t,i.parentId)):i.items&&P(t,e,i.items)}))},N=(t,e,i)=>{const n=T(t);if(n){const c=n.options.treeview;e&&((c||!c&&"group"!=e.type)&&(e.disabled||(e.checked=null!=i?i:!e.checked,e.itemObject.checked=e.checked,e.indeterminate=e.checked?"determinate":"uncheck")),e.items&&e.items.forEach((n=>{N(t,n,null==i?e.checked:i)})))}},A=(t,e,i)=>{let n;n=i||T(t).dataSource,n&&n.forEach((i=>{if(i.id==e){let e=!0,n=!0;i.items&&i.items.map((t=>{(t.checked||"indeterminate"===t.indeterminate)&&(n=!1),!t.checked&&(e=!1)}));const c=e||n?e?"determinate":"uncheck":"indeterminate";i.indeterminate=c,i.checked="determinate"==c,i.itemObject.checked=i.checked,i.parentId&&A(t,i.parentId)}else i.items&&A(t,e,i.items)}))},L=(t,e,i,n)=>{let c,o=[],r=[];return T(t).isSearchOtherTag=n,c=i||T(t).dataSource,c&&c.forEach((i=>{if(e){var c;i.hidden=!0;for(let t=0;t<e.length;t++)if(e[t].id===i.id){c=e[t];break}if(c&&(i.hidden=!1,T(t).isSearchOtherTag||(i.isSearching=!0),r.push(i),i.checked&&o.push(i),c.items)){const{checkedItems:e,visibledItems:s}=L(t,c.items,i.items,n);e&&(o=[...new Set([...o,...e])]),s&&(r=[...new Set([...r,...s])])}}else i.hidden=!1,i.items&&L(t,null,i.items),r.push(i),i.isSearching=!1})),{checkedItems:null!=o?o:[],visibledItems:null!=r?r:[]}},V=(t,e)=>{let i,n=null;return i=e||T(t).dataSource,i&&i.forEach((e=>{if(e.selected)n=e.itemObject;else if(e.items){const i=V(t,e.items);i&&(n=i)}})),n},q=(t,e)=>{let i,n=[],c=[];return i=e||T(t).dataSource,i&&i.forEach((e=>{var i;const o=Object.assign(Object.assign({},e.itemObject),{ct:e.ct});let r=[],s=[];if(e.checked&&(n.push(o),s.push(Object.assign(Object.assign({},o),{items:[]}))),e.items){const c=q(t,e.items);(null===(i=null==c?void 0:c.checkedList)||void 0===i?void 0:i.length)>0&&(n=[...n,...c.checkedList]),c.nestedResult.length>0&&(r=c.nestedResult)}r.length>0?(0==s.length&&s.push(Object.assign(Object.assign({},o),{items:[]})),s[0].items=r,c.push(s[0])):s.length>0&&(s[0].items=r,c.push(s[0]))})),{checkedList:(null==n?void 0:n.length)>0?n:null,nestedResult:c}},W=(t,e,i)=>{let n,c=[];return n=i||T(t).dataSource,n&&n.forEach((i=>{if(e&&(i.id==e?(i.selected=!0,i.itemObject.selected=i.selected):i.selected&&(i.selected=!1,i.itemObject.selected=i.selected)),i.items){const n=W(t,e,i.items);(null==n?void 0:n.length)>0&&(c=[...c,...n])}i.selected&&c.push(i.itemObject)})),c&&c.length>0?c:null},G=(t,e)=>{let i;i=e||T(t).dataSource,i&&i.forEach((e=>{var i,n,c;e.checked&&(e.checked=!1),e.selected&&(e.selected=!1),e.indeterminate&&(e.indeterminate="uncheck"),(null===(i=e.itemObject)||void 0===i?void 0:i.checked)&&(e.itemObject.checked=!1),(null===(n=e.itemObject)||void 0===n?void 0:n.selected)&&(e.itemObject.selected=!1),(null===(c=e.itemObject)||void 0===c?void 0:c.indeterminate)&&(e.itemObject.indeterminate="uncheck"),e.items&&G(t,e.items)}))},H={setValue:t=>{const{id:e,dataSource:i,options:n}=t,{type:c,treeview:o,checkboxes:r,searchable:a,value:h,name:m,label:b,size:d,disabled:u,readonly:p,highlight:f,required:x,hidden:_,fullWidth:v,height:g,maxHeight:y,minHeight:w,width:k,infoFooter:z,variableText:j,template:O,allOpen:I,keyControl:S,checkAll:C,linkedComponent:T,placeholder:$,searchPlaceholder:D,searchIsOnlyChilds:F,clearable:P,caption:N,noCaption:A,captionType:L,captionError:V,placement:q}=n,W={size:d,checkboxes:r,template:O,allOpen:I,highlight:f,treeview:o},G={id:s((()=>e),l.UID),dataSource:i&&i.length>0&&M(i,W),options:{type:c,treeview:o,checkboxes:r,searchable:a,value:h,name:m,label:b,size:d,disabled:u,readonly:p,highlight:f,required:x,hidden:_,fullWidth:v,height:g,maxHeight:y,minHeight:w,width:k,infoFooter:z,variableText:j,template:O,allOpen:I,keyControl:S,checkAll:C,linkedComponent:T,placeholder:$,searchPlaceholder:D,searchIsOnlyChilds:F,clearable:P,caption:N,noCaption:A,captionType:L,captionError:V,placement:q},totalItems:(null==i?void 0:i.length)>0&&R(i,n.treeview),totalRoots:null==i?void 0:i.length};E.value.set(G.id,G)},removeValue:t=>{E.value.delete(t)},getValue:T,getData:t=>{let e=[];const i=T(t);if(i){const{dataSource:t}=i;e=t}return e},getDataPagination:(t,e=3,i)=>{let n=[];const c=T(t);if(c){const{dataSource:t}=c;n=i?t.filter((t=>i.indexOf(t.id)>-1)).slice(0,e):t.slice(0,e)}return n},openGroup:$,checkedItem:F,filterData:L,getSelected:V,getCheckedList:q,selectedItem:W,addChecked:(t,e)=>{T(t)&&e.forEach((e=>{F(t,e)}))},setClear:G,selectAll:(t,e)=>{const i=T(t).dataSource;i&&i.forEach((i=>{N(t,i,e)}))},removeOtherTags:(t,e,i)=>{let n;if(e=Array.isArray(e)?e:[e],i)n=i;else{const e=T(t);n=e.dataSource}n&&e.forEach((e=>{n.forEach((i=>{i.id==e?(i.checked=!1,i.itemObject.checked=!1):i.items&&D(t,e,i.items)}))}))},onRemoveItems:D,updateOptions:(t,e)=>{Object.keys(T(t).options).forEach((i=>{T(t).options[i]=e[i]}))},removeState:t=>Promise.resolve(E.value.delete(t))};class B{constructor(t,e,i,n){this.elementName="",this.childElementName="",this.keyCode=t,this.element=e,this.elementName=i,this.childElementName=n}getKeyCode(){return this.keyCode}getElementName(){return this.elementName}getChildElementName(){return this.childElementName}getFocusedElementName(){return this.getElementName()+".focused"}getFocusedElement(){return this.element.querySelectorAll(this.getFocusedElementName())[0]||null}getFirstElement(){return this.element.querySelectorAll(this.getElementName())[0]||null}getNextElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.nextElementSibling)||this.getFirstElement()}getPreviousElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.previousElementSibling)||this.getFirstElement()}getChildElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.querySelectorAll(this.getChildElementName())[0])||null}getParentElement(t){if(t&&t)return t&&t.attributes["data-isroot"]?t:this.getParentElement(t.parentNode)}focusElementIsOpen(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.classList.contains("bcm-list__item--open"))||!1}isRootElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.querySelectorAll(this.getChildElementName()).length)>0}isRootElementIsOpen(){return this.getFocusedElement().classList.contains("bcm-list__item--open")}getFocusedChildElement(){var t;return(null===(t=this.getChildElement())||void 0===t?void 0:t.querySelectorAll(".focused")[0])||null}isLastElement(){var t;return null===(null===(t=this.getFocusedElement())||void 0===t?void 0:t.nextElementSibling)}focusParentElementFirstChild(){var t,e;return this.setFocus(null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.firstChild)}isFirstElement(){var t;return null===(null===(t=this.getFocusedElement())||void 0===t?void 0:t.previousElementSibling)}focusRootElement(){var t,e,i;return this.setFocus(null===(i=null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.firstChild)}nextRootElement(){var t,e,i;return this.setFocus(null===(i=null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.nextElementSibling)}findFocusElementParent(){return this.getFocusedElement().parentNode.querySelectorAll(".bcm-list__item--open")}getLastElement(){return this.element.querySelectorAll(this.getElementName())[this.element.querySelectorAll(this.getElementName()).length-1]||null}setFocus(t){t.focus()}}class K extends B{constructor(t,e,i,n){super(t,e,".bcm-list__item",".bcm-list__item-childs"),this.isTreeview=!1,this.isCheckBoxes=!1,this.isTreeview=i,this.isCheckBoxes=n}keyUpControl(){this.isTreeview?this.keyUpTreeview():this.isFirstElement()?this.setFocus(this.getLastElement()):this.setFocus(this.getPreviousElement())}keyDownTreeView(){var t;if(this.isTreeview)if(this.isRootElement()&&this.isRootElementIsOpen()){const t=this.getChildElement();t&&this.setFocus(t.firstChild)}else this.isLastElement()&&this.getParentElement(this.getFocusedElement())?this.setFocus(null===(t=this.getParentElement(this.getFocusedElement()))||void 0===t?void 0:t.nextElementSibling):this.setFocus(this.getNextElement())}keyUpTreeview(){if(this.isFirstElement()){const t=this.getParentElement(this.getFocusedElement());this.setFocus(t)}else{const t=this.getPreviousElement();if(t)if(t.classList.contains("bcm-list__item--open")){const e=t.querySelectorAll(this.getChildElementName())[0];console.log({getChildElement:e}),this.setFocus(e.lastChild)}else this.setFocus(t)}}keyDownControl(){this.isTreeview?this.keyDownTreeView():this.isLastElement()?this.setFocus(this.getFirstElement()):this.setFocus(this.getNextElement())}keyRightControl(){if(this.isTreeview&&!this.isRootElementIsOpen()&&this.isRootElement()){const{id:t}=this.getFocusedElement();this.openGroup(t)}}keyLeftControl(){if(this.isTreeview&&this.isRootElementIsOpen()&&this.isRootElement()){const{id:t}=this.getFocusedElement();this.openGroup(t)}}keyEnterControl(){}keySpaceControl(){if(this.isCheckBoxes){const{id:t}=this.getFocusedElement();this.checkedItem(t)}}keyDown(){switch(this.getKeyCode()){case f.KeyCode.up:this.keyUpControl();break;case f.KeyCode.down:this.keyDownControl();break;case f.KeyCode.left:this.keyLeftControl();break;case f.KeyCode.right:this.keyRightControl();break;case f.KeyCode.enter:this.keyEnterControl();break;case f.KeyCode.space:this.keySpaceControl()}}keyUp(){}}var U=function(t,e,i,n){var c,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(r=(o<3?c(r):o>3?c(e,i,r):c(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const Y=class{constructor(t){e(this,t),this.bcmChecklist=i(this,"bcm-checklist",7),this.bcmSelected=i(this,"bcm-selected",7),this.change=i(this,"bcm-change",7),this.open=i(this,"bcm-open",7),this.close=i(this,"bcm-close",7),this.debounce=null,this.debounceHandler=l.debounceInput((()=>this.listenResize()),300,!1),this._id=l.UID(),this.type=x.ListType.listbox,this.treeview=!1,this.checkboxes=!1,this.searchable=!1,this.value=null,this.inputText=void 0,this.name=void 0,this.label=void 0,this.size=x.Size.medium,this.disabled=!1,this.readonly=!1,this.highlight=!1,this.highlightText=void 0,this.required=!1,this.hidden=!1,this.fullWidth=!1,this.height="256px",this.maxHeight="500px",this.minHeight="150px",this.width="256px",this.infoFooter=!1,this.variableText="item",this.template=void 0,this.allOpen=!1,this.keyControl=!1,this.checkAll=!0,this.stopDeepClean=!1,this.linkedComponent=void 0,this.isOpen=!1,this.calculatedViewport=!1,this.isSelectedOther=!1,this.isHaveOtherTag=!1,this.placeholder="Choose an option",this.searchPlaceholder="Search",this.searchIsOnlyChilds=!1,this.minSearchLength=2,this.clearable=!1,this.caption=void 0,this.noCaption=!1,this.captionType=x.Status.default,this.captionError=void 0,this.emptyText=void 0,this.emptyIcon="fad fa-folder-open",this.captionCache=void 0,this.captionTypeCache=void 0,this.tick={},this.totalData=0,this.totalRootData=0,this.limit=20,this.searchGetParents=void 0,this.searchResultLimit=20,this.searchFound=null,this.returnFilterData={},this.returnOtherData={},this.options={rootMargin:"30px"},this.tagContainerWidth=0,this.selectAllItem={id:"select-all",text:"Select All",value:"select-all",checked:!1,disabled:!1,icon:"",status:x.Status.default,indeterminate:"uncheck"},this.placement=x.Placement["bottom-start"],this.data=[]}connectedCallback(){"256px"!=this.height&&(this.limit=this.height.indexOf("px")>-1?Math.floor(+this.height.replace("px","")/10):Math.floor(+window.innerHeight/10),this.searchResultLimit=this.limit,this.markForCheck());const t=document.querySelectorAll(`#bcm-list-${this._id}`);(null==t?void 0:t.length)>1&&t.forEach(((t,e)=>e>0&&t.remove()))}componentWillRender(){this.calculateLocation()}componentShouldUpdate(t,e,i){Object.keys(this.getOptions()).indexOf(i)>-1&&t!==e&&this.updateOptions()}get containerWidth(){var t,e;return null===(e=null===(t=this.el)||void 0===t?void 0:t.getBoundingClientRect())||void 0===e?void 0:e.width}get tagCount(){return this.containerWidth>0?Math.floor(+(this.containerWidth-100)/85):0}get tagData(){return s((()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>({value:t.id,label:h.textLimitter(t.text,7),text:t.tooltipMessage||t.tagTitle||t.text})))}),[])}async componentDidLoad(){if(await this.initState(),"select"==this.type||"autocomplete"==this.type||this.linkedComponent){const t=this.el.querySelector(`#bcm-list-${this._id}`);t&&document.body.appendChild(t)}}disconnectedCallback(){if(this.isOpen=!1,!this.stopDeepClean&&(H.removeState(this._id),this.el.innerHTML="","select"==this.type||"autocomplete"==this.type||this.linkedComponent)){const t=document.querySelectorAll(`#bcm-list-${this._id}`);(null==t?void 0:t.length)&&(t.forEach((t=>t.remove())),this.el.remove())}}watchId(t,e){H.removeState(e),this.initState()}handleValueChange(t,e){var i;l.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes?m.compareTwoArrayIsSame(t,e)||(this.bcmChecklist.emit(this.value),this.change.emit(this.value)):(null==t?void 0:t.id)!=(null==e?void 0:e.id)&&this.change.emit(this.value)}watchReturnFilterData(t){var e;const{checkedItems:i,visibledItems:n}=t;i&&n?this.handleIndeterminate(i.length,n.length):this.handleIndeterminate((null===(e=this.value)||void 0===e?void 0:e.length)||0,this.totalData)}async handleOpen(){this.isOpen?(this.open.emit(),this.calculateLocation(),this.onSelectSearch()):(this.listScrollToTop(),this.close.emit(),await p(100),this.unSelectOther())}listScrollToTop(){const t=document.querySelector(`#bcm-list-${this._id}`);t&&(t.querySelector(".scrolling").scrollTop=0)}async dataChanged(t,e){m.compareTwoArrayIsSame(t,e)||await this.initState()}isIntersecting(t){const e=null==t?void 0:t.target;e&&e.id===this._id&&this.listenResize()}handleSlotItems(t){var e;(null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.length)>0&&(this.data=t.detail)}handleChange(t){t.target.id==`bcm-list-input-tag-container-${this._id}-autocomplete-input`&&t.stopImmediatePropagation()}handleResize(){this.calculateLocation(),this.debounceHandler()}handleWheel(t){if(this.isOpen){const e=document.querySelector(`#bcm-list-${this._id}`);e&&l.findEventPath(t,e)?("select"==this.type||"autocomplete"==this.type||this.linkedComponent)&&this.calculateLocation():this.hide()}}clearAutocomplete(){if("autocomplete"==this.type){const t=this.getAutoCompleteInput();t&&t.handleClear(!1)}}async handleSelectOtherTag(t){if(this.disabled)return;const{id:e,checked:i}=t.detail;this.isSelectedOther=i,e&&(i?this.filterOtherList(e):this.unSelectOther(),this.isOpen=!0)}async handleDeleteTag(t){var e;if(this.disabled)return;const{id:i}=t.detail;this.isSelectedOther&&this.unSelectOther(),Array.isArray(i)?H.removeOtherTags(this._id,i):H.checkedItem(this._id,i),this.value=(await this.getCheckedList()).checkedList,this.handleIndeterminate((null===(e=this.value)||void 0===e?void 0:e.length)||0,this.totalData)}async handleSelectTag(t){this.disabled||(this.clearAutocomplete(),this.onSelectSearch(),this.unSelectOther())}handleClick(t){var e;if(this.disabled)return;const i=document.querySelector(`#bcm-list-${this._id}`),n=l.findEventPath(t,this.el)||i&&l.findEventPath(t,i);if(n&&(null!==this.debounce&&(t.preventDefault(),t.stopPropagation(),clearTimeout(this.debounce),this.debounce=null),this.debounce=setTimeout((()=>{this.debounce=null}),300)),!n&&"autocomplete"==this.type){const t=this.getAutoCompleteInput();t&&t.setValue(this.checkboxes?"":(null===(e=this.value)||void 0===e?void 0:e.text)||"")}const c=l.findEventPathWithKey(t,"className",["bcm-tag"]),o=l.findEventPathWithKey(t,"className",["bcm-tag bcm-tag--other"]),r=l.findEventPathWithKey(t,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),s=l.findEventPathWithKey(t,"className",["right close-button"]);r&&!s&&"autocomplete"!=this.type&&(this.isOpen=!(!c&&!o&&this.isOpen)),i&&this.isOpen&&(i.contains(t.target)||this.el.contains(t.target)||(this.isOpen=!1))}bcmOnSearchClear(t){var e,i;"autocomplete"==this.type&&((null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||t.detail&&this.setClear())}bcmOnSearch(t){var e,i,n,c,o,r;(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||(this.searchGetParents=s((()=>{var e;return null===(e=t.detail)||void 0===e?void 0:e.parentIndex}),null),this.searchResultLimit=10,this.searchFound=null!=(null===(n=t.detail)||void 0===n?void 0:n.matching)?null===(c=t.detail)||void 0===c?void 0:c.matching.length:null,this.returnFilterData=H.filterData(this._id,null===(o=t.detail)||void 0===o?void 0:o.nestedResult),this.searchFound>0&&this.highlight&&(this.highlightText=null===(r=t.detail)||void 0===r?void 0:r.value),"autocomplete"==this.type&&(this.isOpen=!0),t.detail.result||("autocomplete"==this.type?this.isOpen=!1:(this.returnFilterData={},H.filterData(this._id,null)),this.searchResultLimit=null,this.highlightText=null),this.markForCheck())}handleKeyDown(t){const e=t.keyCode||t.which;if(e===x.KeyCode.escape&&this.isOpen&&(this.isOpen=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),this.keyControl){const t=new K(e,this.el,this.treeview,this.checkboxes);t.openGroup=t=>{this.openGroup(t)},t.checkedItem=t=>{this.checkedItem(t)},t.keyDown()}}handleKeyUp(t){if(this.keyControl&&l.findEventPath(t,this.el)){const t=document.getElementById(`bcm-list-${this._id}`);if(t){const e=t.querySelectorAll(".bcm-list__item.focused");if(e.length>0){const i=t.querySelector("main"),n=e[0].offsetHeight,c=i.offsetHeight,o=e[0].offsetTop;o>c&&(i.scrollTop=o-c/2+n/2),o<c&&(i.scrollTop=o-c/2-n/2)}}}}async set(t){t?(Array.isArray(t)&&this.addChecked(t),"string"!=typeof t&&"number"!=typeof t||this.selectedItem(t)):this.setClear()}async get(){var t,e;return this.value?this.checkboxes?null===(e=null===(t=await this.getCheckedList())||void 0===t?void 0:t.checkedList)||void 0===e?void 0:e.map((t=>t.id)):this.value.id:null}async getCheckedList(){return Promise.resolve(H.getCheckedList(this._id))}async getSelected(){return Promise.resolve(H.getSelected(this._id))}async getValue(){return Promise.resolve(this.value)}async addChecked(t=[],e=!1,i=!0){return t&&t.length>0&&(e||(H.setClear(this._id),await p(10)),await H.addChecked(this._id,t),await p(10),i&&(this.value=(await this.getCheckedList()).checkedList),this.markForCheck()),Promise.resolve(this.value)}async selected(t){return!!t&&Promise.resolve(await this.selectedItem(t))}async setClear(t){return H.setClear(this._id),this.value=null,this.inputText="",this.isOpen=!1,this.selectAllItem.indeterminate="uncheck",this.markForCheck(),t&&(t.stopPropagation(),t.preventDefault()),await p(10),Promise.resolve()}async resetCaption(){return await p(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await p(10),Promise.resolve()}async show(){return this.isOpen=!0,Promise.resolve()}async hide(){return this.isOpen=!1,Promise.resolve()}updateOptions(){H.updateOptions(this._id,this)}handleIndeterminate(t,e){this.selectAllItem=Object.assign(Object.assign({},this.selectAllItem),{indeterminate:this.checkboxes&&t>0?t===e?"check":"indeterminate":"uncheck",checked:!!(this.checkboxes&&t>0)&&t===e})}listenResize(){this.calculateLocation(),this.markForCheck()}async unSelectOther(){return await this.onClearSearch(),this.isSelectedOther=!1,this.searchFound=null,this.returnFilterData={},H.filterData(this._id,null),await p(10),Promise.resolve()}async onClearSearch(){const t=document.getElementById(`bcm-list-${this._id}-search`);return t&&await t.handleClear(),Promise.resolve()}async onSelectSearch(){const t=document.getElementById(`bcm-list-${this._id}-search`);t&&(await p(100),t.onBcmFocus(),t.onBcmSelect())}async filterOtherList(t){const e=(await this.getCheckedList()).nestedResult,i=l.convertIdsToNestedData(t,e);this.returnFilterData=await H.filterData(this._id,i,null,!0),this.searchFound=(null==t?void 0:t.length)||0,this.limit=500,this.searchGetParents=null,await p(1e3),this.markForCheck()}async initState(){var t,e,i;this.onClearSearch(),await H.setValue({id:this._id,dataSource:this.data&&s((()=>"string"==typeof this.data?JSON.parse(this.data):this.data),[]),options:this});const{totalRoots:n,totalItems:c}=H.getValue(this._id);if(this.totalData=c,this.totalRootData=n,this.value=this.checkboxes?(await this.getCheckedList()).checkedList:H.selectedItem(this._id)?H.selectedItem(this._id)[0]:null,this.checkboxes||(this.inputText=(null===(t=this.value)||void 0===t?void 0:t.text)||null),this.checkboxes&&(null===(e=this.value)||void 0===e?void 0:e.length)>0){const t=[];this.value.forEach((e=>{e.items&&0!==e.items.length||t.push(e.id)})),await this.addChecked(t,!1,!1)}await this.handleIndeterminate(null===(i=this.value)||void 0===i?void 0:i.length,this.totalData),await this.markForCheck()}async markForCheck(){await p(10),this.tick=l.UID()}getOptions(){return s((()=>H.getValue(this._id).options),{})}getItems(){return this.isSelectedOther?this.returnFilterData.checkedItems:s((()=>H.getData(this._id)),[])}getLimitedItems(t){return s((()=>H.getDataPagination(this._id,this.searchResultLimit||this.limit,t)),[])}openGroup(t){H.openGroup(this._id,t),this.markForCheck()}focusItem(t){if(t.target.classList.contains("bcm-list__item")){const e=t.target,i=document.getElementById(`bcm-list-${this._id}`);if(i&&i.querySelectorAll(".bcm-list__item").length>0){const t=i.querySelector(".bcm-list__item.focused");t&&t.classList.remove("focused"),e.classList.add("focused")}}}async selectedItem(t){var e;if(!this.checkboxes&&(this.value=H.selectedItem(this._id,t)?H.selectedItem(this._id,t)[0]:null,this.inputText=(null===(e=this.value)||void 0===e?void 0:e.text)||null,this.isOpen=!1,this.markForCheck(),"autocomplete"==this.type&&this.value)){const t=this.getAutoCompleteInput();t&&setTimeout((()=>{var e;t.setValue((null===(e=this.value)||void 0===e?void 0:e.text)||""),this.isOpen=!1}),100)}return Promise.resolve(this.value)}async checkedItem(t){"select-all"===t?H.selectAll(this._id,!this.selectAllItem.checked):H.checkedItem(this._id,t),this.value=(await this.getCheckedList()).checkedList,this.changeVisibleCheckeds(),this.markForCheck()}changeVisibleCheckeds(){const{visibledItems:t}=this.returnFilterData;this.returnFilterData={visibledItems:t,checkedItems:t&&t.filter((t=>t.checked))||[]}}getAutoCompleteInput(){return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`)}dataScrollEvent(t){let e=0,i=new IntersectionObserver((t=>{0===e&&(e++,t[0].isIntersecting&&(this.limit+=15,this.searchResultLimit+=15,i.disconnect(),i=null))}),this.options);i.observe(t.target.lastElementChild)}async calculateLocation(){var t,e;if("select"==this.type||"autocomplete"==this.type||this.linkedComponent){const n=document.getElementById(`bcm-list-${this._id}`);var i=this.placement;const c=document.getElementById(this.linkedComponent?this.linkedComponent:`bcm-list-input-${this._id}`);if(n&&c){b(n,c,i,(t=>i=t)),await p(10);let o=d(i,c),r=0,s=0;if(this.linkedComponent){const i=document.getElementById(this.linkedComponent);if(i){if(!i.noCaption){const e=(null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelector(".bcm-caption-area"))||i.querySelector(".bcm-caption-area");e&&(r=e.offsetHeight||e.clientHeight)}const n=(null===(e=i.shadowRoot)||void 0===e?void 0:e.querySelector(".bcm-label"))||i.querySelector(".bcm-label");n&&(s=n.offsetHeight||n.clientHeight)}}n.style.width=this.fullWidth?c.offsetWidth+"px":this.width||"auto",n.style.height=this.height.indexOf("%")>-1?.01*a.toNumber(this.height)*window.innerHeight-o[0]-50+"px":this.height,n.style.minHeight=this.minHeight;const l="top"==i.split("-")[0]?window.innerHeight-(window.innerHeight-o[0])-50:window.innerHeight-o[0]-50;n.style.maxHeight=this.maxHeight.indexOf("%")>-1?.01*a.toNumber(this.maxHeight)*l+"px":a.toNumber(this.maxHeight)<l?this.maxHeight:l+"px",b(n,c,i,(t=>i=t)),await p(10),o=d(i,c),n.style.top=("top"==i.split("-")[0]?o[0]-n.offsetHeight+s:o[0]-r)+"px",n.style.left="end"==i.split("-")[1]?o[1]-n.offsetWidth+"px":o[1]+"px",n.classList.toggle("bcm-list--top","top"==i.split("-")[0]),this.calculatedViewport=!0}}}render(){const{checkboxes:e,treeview:i,label:c,size:o,disabled:r,readonly:s,required:l,hidden:a,fullWidth:h,searchable:m}=this.getOptions(),b=v("bcm-list",`bcm-list__size-${o}`,`bcm-list__${this.type}`,"large"===o?"size-3":"size-2",{error:this.captionType==x.Status.error,"full-width":h,"bcm-list__linked":this.linkedComponent,hidden:a,readonly:s,disabled:r}),d=v("bcm-list__container",this.linkedComponent?"bcm-list__type-linked-component":`bcm-list__type-${this.type}`,{"is-open":this.isOpen&&this.calculatedViewport,error:this.captionType==x.Status.error,"full-width":h,hidden:a,readonly:s,disabled:r}),u=v("bcm-list__input"),p="select"==this.type||"autocomplete"==this.type||this.linkedComponent;return t(n,{class:b,tabindex:"0",style:{"--width":h?"100%":this.width,"--height":p?"100%":this.height,"--max-height":p?"inherit":this.maxHeight,"--min-height":p?"inherit":this.minHeight}},t("div",{id:`bcm-list-label-${this._id}`,class:"bcm-list__label"},c&&t("div",null,t(g,{size:this.size,type:this.captionType,value:c,required:l,htmlFor:this._id}))),"select"==this.type&&t("div",{id:`bcm-list-input-${this._id}`,class:u},t("span",{class:v("bcm-list__input-container",{"type-single":!e,"value-empty":!this.value})},this.checkboxes?this.value&&this.value.length>0?t("bcm-rc-overflow",{data:this.tagData,maxCount:this.tagCount}):t("span",{class:"bcm-list__input-placeholder"},this.placeholder):this.value?this.inputText:t("span",{class:"bcm-list__input-placeholder"},this.placeholder)),t("span",{class:v("bcm-list__input-buttons",{disabled:r})},this.clearable&&this.value&&t("div",{class:"bcm-list__input-buttons-button"},t("bcm-icon",{icon:"fal fa-times",onClick:t=>!r&&this.setClear(t)})),t("div",{class:`bcm-list__input-buttons-button caret-is ${this.isOpen&&this.calculatedViewport&&"caret-is-open"}`},t("bcm-icon",{icon:"far fa-angle-down"})))),"autocomplete"===this.type&&t("div",{id:`bcm-list-input-${this._id}`,class:v(u,{"bcm-list__input-autocomplete":"autocomplete"==this.type})},t("span",{class:"bcm-list__input-container",id:`bcm-list-input-tag-container-${this._id}`},this.checkboxes&&t("span",{class:"bcm-list__input-tag-container",id:`bcm-list-input-tag-container-${this._id}-autocomplete`}),t("bcm-search",{id:`bcm-list-input-tag-container-${this._id}-autocomplete-input`,class:"bcm-list__autocomplete",data:this.data,clearable:!0,"full-width":!0,"no-caption":!0,placeholder:this.placeholder}))),t(C,{highlight:this.highlightText,searchable:"autocomplete"!=this.type&&m,bcmListContainer:d,checkboxes:e,treeview:i,infoFooter:this.infoFooter,value:this.value,totalData:this.totalData,searchFound:this.searchFound,variableText:this.variableText,searchPlaceholder:this.searchPlaceholder,minSearchLength:this.minSearchLength,searchIsOnlyChilds:this.searchIsOnlyChilds,_id:this._id,checkAll:this.checkAll,data:this.getItems(),width:this.width,height:this.height,size:this.size,selectAllItem:this.selectAllItem,onScrollEvent:t=>this.dataScrollEvent(t),items:this.getLimitedItems(this.searchGetParents),selectedItem:t=>this.selectedItem(t),checkedItem:t=>this.checkedItem(t),openGroup:t=>this.openGroup(t),focusItem:t=>this.focusItem(t),emptyText:this.emptyText,emptyIcon:this.emptyIcon}),t(_,{noCaption:this.noCaption,captionType:this.captionType,captionError:this.captionError,caption:this.caption}))}get el(){return c(this)}static get watchers(){return{_id:["watchId"],value:["handleValueChange"],returnFilterData:["watchReturnFilterData"],isOpen:["handleOpen"],data:["dataChanged"]}}};function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},J.apply(this,arguments)}function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function X(t,e,i){return(e=function(t){var e=function(t){if("object"!==Q(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==Q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Q(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Z(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function tt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(i),!0).forEach((function(e){X(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function it(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,c,o,r,s=[],l=!0,a=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){a=!0,c=t}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(a)throw c}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?et(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(t,e){if(null==t)return{};var i,n,c=function(t,e){if(null==t)return{};var i,n,c={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||(c[i]=t[i]);return c}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(c[i]=t[i])}return c}function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ct.apply(this,arguments)}
|
|
5
|
+
import{h as t,r as e,c as i,H as n,g as c}from"./p-6d7fe687.js";import{I as o}from"./p-54c0916c.js";import{J as r}from"./p-00fdf291.js";import"./p-2fc584c4.js";import"./p-626a65e9.js";import{s,G as l}from"./p-ce8592a0.js";import{N as a}from"./p-cde20403.js";import{S as h}from"./p-8d0ca8c2.js";import{V as m}from"./p-8a860cff.js";import"./p-5ae0a59b.js";import{g as b,s as d}from"./p-dbc4c30c.js";import{p as u,d as p}from"./p-3c7a0345.js";import{a as f,B as x}from"./p-a429e85b.js";import{C as _}from"./p-a56e8c98.js";import{c as v}from"./p-d65a1e21.js";import"./p-3fac58f7.js";import{L as g}from"./p-c49d038e.js";import"./p-2e73d572.js";import{c as y}from"./p-3cde7f38.js";import{r as w,a as k}from"./p-1eabd5dc.js";import{c as z}from"./p-6f56f8ca.js";import{I as j}from"./p-50a7dd08.js";import"./p-436364c8.js";import"./p-4aa0e6b1.js";import"./p-940dda87.js";import"./p-74b2d896.js";const O=({disabled:e,checked:i,readonly:n,required:c,indeterminate:o,hidden:r,captionType:s,_id:l})=>{const a=v("bcm-checkbox","bcm-checkbox__type-default","bcm-checkbox-size-medium",{error:s==f.Status.error,hidden:r,checked:i,disabled:e,required:c,readonly:n}),h=v("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+o,{"bcm-checkbox__label-icon-checked":i}),m=v("bcm-checkbox__label");return t("div",{class:a},t("input",{tabindex:"-1",id:l,type:"checkbox",checked:i,disabled:e,required:c,readonly:n}),t("label",{class:m,htmlFor:l},t("span",{class:h},t("bcm-icon",{icon:"far fa-check"}))))},I=({selected:e,total:i,found:n,multiple:c,variableText:o})=>(i=i||0,o=o?u(o,i):"items",t("footer",{class:"bcm-info-footer"},t("bcm-text",{scale:"size-1",color:"grey-8"},c&&e>0&&` ( ${e} selected ) `,` Total ${i} `,null!=n&&` / ${n} `,` ${o} found. `))),S=({item:e,treeview:i,highlight:n,checkboxes:c,size:o,selectedItem:r,openGroup:s,checkedItem:l,focusItem:a,searchIsOnlyChilds:m})=>{const b=e.items&&e.items.length>0;var d=h.htmlEntities(e.text);let u=[];if(n&&h.slugify(d).includes(h.slugify(n))&&(m&&(!m||b&&(i||"group"==e.type))||(d=h.highlight(d,n))),"group"!=e.type&&e.template){const t=e.template.replace(/\s/g,"").match(/\{{[^}}]+\}/g).map((t=>t.replace(/[{}]/g,""))),i=Object.keys(e.itemObject);u=t.filter((t=>i.includes(t)))}d=e.isHtmlContent?e.isHtmlContent:e.template&&u.length>0?h.templateParser(e.template,Object.assign(Object.assign({},e.itemObject),{text:d})):d;const p=!i&&"group"==e.type&&!e.clickable,f=e.disabled,x=e.readonly,_=()=>{e.open=e.isSearching,s(e.id)};return t("div",{id:e.id,hidden:e.hidden,"on-focus":t=>!p&&!f&&a(t),class:v("bcm-list__item","bcm-list__item-"+o,{"bcm-list__item--group":!i&&"group"==e.type,"bcm-list__item--readonly":x})},t("div",{class:v("bcm-list__item-content",!c&&e.selected&&"selected",{disabled:f})},i&&t("div",{class:"bcm-list__item-content-collapse-icon",onClick:()=>_()},b&&t("bcm-icon",{icon:v("fas fa-caret-"+(e.isSearching||e.open?"down":"right"))})),t("div",{class:v("bcm-list__item-content-text",{treeview:i}),onClick:t=>{var i;((i=t).path||i.composedPath()).filter((t=>t.attributes&&t.attributes.getNamedItem("unlinked")))[0]||(x&&_(),!p&&!f&&!x&&(c?l(e.id):r(e.id)))}},c&&(i||!i&&"group"!=e.type)&&t("div",{class:"bcm-list__item-content-text-checkbox"},t(O,{indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled})),t("span",Object.assign({class:"bcm-list__item-content-text-inner"},e.title&&{title:e.title},{innerHTML:d})))),(i||!i&&"group"==e.type)&&b&&t("div",{class:"bcm-list__item-childs"},(e.isSearching||e.open||!i&&"group"==e.type)&&e.items.map((e=>t(S,{highlight:n,item:e,searchIsOnlyChilds:m,treeview:i,checkboxes:c,size:o,selectedItem:r,checkedItem:l,openGroup:t=>s(t),focusItem:t=>a(t)})))))},C=({highlight:e,selectAllItem:i,bcmListContainer:n,treeview:c,checkboxes:o,checkAll:r,infoFooter:s,value:l,totalData:a,searchFound:h,variableText:m,_id:b,data:d,width:u,height:p,size:f,searchPlaceholder:x,minSearchLength:_,selectedItem:v,openGroup:g,checkedItem:y,onScrollEvent:w,focusItem:k,items:z,searchable:j,searchIsOnlyChilds:O,emptyText:C,emptyIcon:E})=>{const M=!(c&&h>0||h>0);return t("div",{id:`bcm-list-${b}`,class:n,style:{"--height":p,"--width":u}},d&&j&&t("section",{class:"bcm-list__container-search"},t("bcm-search",{size:f,id:`bcm-list-${b}-search`,data:d,clearable:!0,placeholder:x,"min-search-length":_,searchIsOnlyChilds:O})),t("main",{onScroll:t=>w(t),class:"scrolling",style:{"overscroll-behavior":"none"}},t("div",{style:{"min-height":`${(null==h?c?z.length:a:h)*("small"===f?28:"medium"===f?36:48)||0}px`,"overscroll-behavior":"none",height:"100%",display:"flex","flex-direction":"column"}},r&&0!=h&&z&&z.length>0&&o&&M&&t("section",{class:"bcm-list__container-select-all"},t(S,{size:f,item:i,treeview:!1,checkboxes:!0,selectedItem:t=>v(t),checkedItem:t=>y(t),openGroup:t=>g(t),focusItem:t=>k(t)})),z.map((i=>t(S,{highlight:e,size:f,item:i,searchIsOnlyChilds:O,treeview:c,checkboxes:o,selectedItem:t=>v(t),checkedItem:t=>y(t),openGroup:t=>g(t),focusItem:t=>k(t)}))),(!z||0===z.length)&&0!=h&&t("section",{class:"bcm-list__container-no-data"},t("bcm-empty",{style:{height:"auto"},icon:E},t("span",{innerHTML:C||"No data"}))),0==h&&t("section",{class:"bcm-list__container-no-data"},t("bcm-empty",{style:{height:"auto"},icon:E},t("span",{innerHTML:C||"No Data Found"}))))),s&&d&&d.length>0&&t(I,{selected:null==l?void 0:l.length,total:a,found:h,multiple:o,variableText:m}))},{state:E}=y({value:new Map}),M=(t,e,i,n="0.")=>{let c=[];return t&&t.length>0&&(c=t.map(((t,c)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({itemObject:t},t),e),{parentId:s((()=>i),null),open:e.allOpen||t.open||!1}),(e.treeview||!e.treeview&&"group"==t.type)&&t.items&&t.items.length>0?{items:s((()=>M(t.items,e,t.id,`${n}${c}`)),[])}:{items:[]}),{ct:`${n}${c}`})))),c},T=t=>s((()=>E.value.get(t)),{}),R=(t,e)=>{let i=0;return t.forEach((t=>{(e||!e&&"group"!=t.type)&&(i+=1),(e||!e&&"group"==t.type)&&t.items&&(i+=R(t.items,e))})),i},$=(t,e,i,n)=>{let c;c=i||T(t).dataSource,c&&c.forEach((i=>{null!=n?i.open=n:i.id==e?(i.open=!i.open,i.isSearching=i.open,!i.open&&i.items&&$(t,e,i.items,!1)):i.items&&$(t,e,i.items)}))},D=(t,e,i)=>{i&&i.forEach((i=>{i.id==e?(i.checked=!1,i.itemObject.checked=!1,A(t,i.parentId)):i.items&&D(t,e,i.items)}))},F=(t,e)=>{P(t,e)},P=(t,e,i)=>{let n;e=Array.isArray(e)?e:[e],n=i||T(t).dataSource,n&&n.forEach((i=>{e.includes(i.id)?(N(t,i),i.parentId&&A(t,i.parentId)):i.items&&P(t,e,i.items)}))},N=(t,e,i)=>{const n=T(t);if(n){const c=n.options.treeview;e&&((c||!c&&"group"!=e.type)&&(e.disabled||(e.checked=null!=i?i:!e.checked,e.itemObject.checked=e.checked,e.indeterminate=e.checked?"determinate":"uncheck")),e.items&&e.items.forEach((n=>{N(t,n,null==i?e.checked:i)})))}},A=(t,e,i)=>{let n;n=i||T(t).dataSource,n&&n.forEach((i=>{if(i.id==e){let e=!0,n=!0;i.items&&i.items.map((t=>{(t.checked||"indeterminate"===t.indeterminate)&&(n=!1),!t.checked&&(e=!1)}));const c=e||n?e?"determinate":"uncheck":"indeterminate";i.indeterminate=c,i.checked="determinate"==c,i.itemObject.checked=i.checked,i.parentId&&A(t,i.parentId)}else i.items&&A(t,e,i.items)}))},L=(t,e,i,n)=>{let c,o=[],r=[];return T(t).isSearchOtherTag=n,c=i||T(t).dataSource,c&&c.forEach((i=>{if(e){var c;i.hidden=!0;for(let t=0;t<e.length;t++)if(e[t].id===i.id){c=e[t];break}if(c&&(i.hidden=!1,T(t).isSearchOtherTag||(i.isSearching=!0),r.push(i),i.checked&&o.push(i),c.items)){const{checkedItems:e,visibledItems:s}=L(t,c.items,i.items,n);e&&(o=[...new Set([...o,...e])]),s&&(r=[...new Set([...r,...s])])}}else i.hidden=!1,i.items&&L(t,null,i.items),r.push(i),i.isSearching=!1})),{checkedItems:null!=o?o:[],visibledItems:null!=r?r:[]}},V=(t,e)=>{let i,n=null;return i=e||T(t).dataSource,i&&i.forEach((e=>{if(e.selected)n=e.itemObject;else if(e.items){const i=V(t,e.items);i&&(n=i)}})),n},q=(t,e)=>{let i,n=[],c=[];return i=e||T(t).dataSource,i&&i.forEach((e=>{var i;const o=Object.assign(Object.assign({},e.itemObject),{ct:e.ct});let r=[],s=[];if(e.checked&&(n.push(o),s.push(Object.assign(Object.assign({},o),{items:[]}))),e.items){const c=q(t,e.items);(null===(i=null==c?void 0:c.checkedList)||void 0===i?void 0:i.length)>0&&(n=[...n,...c.checkedList]),c.nestedResult.length>0&&(r=c.nestedResult)}r.length>0?(0==s.length&&s.push(Object.assign(Object.assign({},o),{items:[]})),s[0].items=r,c.push(s[0])):s.length>0&&(s[0].items=r,c.push(s[0]))})),{checkedList:(null==n?void 0:n.length)>0?n:null,nestedResult:c}},W=(t,e,i)=>{let n,c=[];return n=i||T(t).dataSource,n&&n.forEach((i=>{if(e&&(i.id==e?(i.selected=!0,i.itemObject.selected=i.selected):i.selected&&(i.selected=!1,i.itemObject.selected=i.selected)),i.items){const n=W(t,e,i.items);(null==n?void 0:n.length)>0&&(c=[...c,...n])}i.selected&&c.push(i.itemObject)})),c&&c.length>0?c:null},G=(t,e)=>{let i;i=e||T(t).dataSource,i&&i.forEach((e=>{var i,n,c;e.checked&&(e.checked=!1),e.selected&&(e.selected=!1),e.indeterminate&&(e.indeterminate="uncheck"),(null===(i=e.itemObject)||void 0===i?void 0:i.checked)&&(e.itemObject.checked=!1),(null===(n=e.itemObject)||void 0===n?void 0:n.selected)&&(e.itemObject.selected=!1),(null===(c=e.itemObject)||void 0===c?void 0:c.indeterminate)&&(e.itemObject.indeterminate="uncheck"),e.items&&G(t,e.items)}))},H={setValue:t=>{const{id:e,dataSource:i,options:n}=t,{type:c,treeview:o,checkboxes:r,searchable:a,value:h,name:m,label:b,size:d,disabled:u,readonly:p,highlight:f,required:x,hidden:_,fullWidth:v,height:g,maxHeight:y,minHeight:w,width:k,infoFooter:z,variableText:j,template:O,allOpen:I,keyControl:S,checkAll:C,linkedComponent:T,placeholder:$,searchPlaceholder:D,searchIsOnlyChilds:F,clearable:P,caption:N,noCaption:A,captionType:L,captionError:V,placement:q}=n,W={size:d,checkboxes:r,template:O,allOpen:I,highlight:f,treeview:o},G={id:s((()=>e),l.UID),dataSource:i&&i.length>0&&M(i,W),options:{type:c,treeview:o,checkboxes:r,searchable:a,value:h,name:m,label:b,size:d,disabled:u,readonly:p,highlight:f,required:x,hidden:_,fullWidth:v,height:g,maxHeight:y,minHeight:w,width:k,infoFooter:z,variableText:j,template:O,allOpen:I,keyControl:S,checkAll:C,linkedComponent:T,placeholder:$,searchPlaceholder:D,searchIsOnlyChilds:F,clearable:P,caption:N,noCaption:A,captionType:L,captionError:V,placement:q},totalItems:(null==i?void 0:i.length)>0&&R(i,n.treeview),totalRoots:null==i?void 0:i.length};E.value.set(G.id,G)},removeValue:t=>{E.value.delete(t)},getValue:T,getData:t=>{let e=[];const i=T(t);if(i){const{dataSource:t}=i;e=t}return e},getDataPagination:(t,e=3,i)=>{let n=[];const c=T(t);if(c){const{dataSource:t}=c;n=i?t.filter((t=>i.indexOf(t.id)>-1)).slice(0,e):t.slice(0,e)}return n},openGroup:$,checkedItem:F,filterData:L,getSelected:V,getCheckedList:q,selectedItem:W,addChecked:(t,e)=>{T(t)&&e.forEach((e=>{F(t,e)}))},setClear:G,selectAll:(t,e)=>{const i=T(t).dataSource;i&&i.forEach((i=>{N(t,i,e)}))},removeOtherTags:(t,e,i)=>{let n;if(e=Array.isArray(e)?e:[e],i)n=i;else{const e=T(t);n=e.dataSource}n&&e.forEach((e=>{n.forEach((i=>{i.id==e?(i.checked=!1,i.itemObject.checked=!1):i.items&&D(t,e,i.items)}))}))},onRemoveItems:D,updateOptions:(t,e)=>{Object.keys(T(t).options).forEach((i=>{T(t).options[i]=e[i]}))},removeState:t=>Promise.resolve(E.value.delete(t))};class B{constructor(t,e,i,n){this.elementName="",this.childElementName="",this.keyCode=t,this.element=e,this.elementName=i,this.childElementName=n}getKeyCode(){return this.keyCode}getElementName(){return this.elementName}getChildElementName(){return this.childElementName}getFocusedElementName(){return this.getElementName()+".focused"}getFocusedElement(){return this.element.querySelectorAll(this.getFocusedElementName())[0]||null}getFirstElement(){return this.element.querySelectorAll(this.getElementName())[0]||null}getNextElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.nextElementSibling)||this.getFirstElement()}getPreviousElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.previousElementSibling)||this.getFirstElement()}getChildElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.querySelectorAll(this.getChildElementName())[0])||null}getParentElement(t){if(t&&t)return t&&t.attributes["data-isroot"]?t:this.getParentElement(t.parentNode)}focusElementIsOpen(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.classList.contains("bcm-list__item--open"))||!1}isRootElement(){var t;return(null===(t=this.getFocusedElement())||void 0===t?void 0:t.querySelectorAll(this.getChildElementName()).length)>0}isRootElementIsOpen(){return this.getFocusedElement().classList.contains("bcm-list__item--open")}getFocusedChildElement(){var t;return(null===(t=this.getChildElement())||void 0===t?void 0:t.querySelectorAll(".focused")[0])||null}isLastElement(){var t;return null===(null===(t=this.getFocusedElement())||void 0===t?void 0:t.nextElementSibling)}focusParentElementFirstChild(){var t,e;return this.setFocus(null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.firstChild)}isFirstElement(){var t;return null===(null===(t=this.getFocusedElement())||void 0===t?void 0:t.previousElementSibling)}focusRootElement(){var t,e,i;return this.setFocus(null===(i=null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.firstChild)}nextRootElement(){var t,e,i;return this.setFocus(null===(i=null===(e=null===(t=this.getFocusedElement())||void 0===t?void 0:t.parentElement)||void 0===e?void 0:e.parentElement)||void 0===i?void 0:i.nextElementSibling)}findFocusElementParent(){return this.getFocusedElement().parentNode.querySelectorAll(".bcm-list__item--open")}getLastElement(){return this.element.querySelectorAll(this.getElementName())[this.element.querySelectorAll(this.getElementName()).length-1]||null}setFocus(t){t.focus()}}class K extends B{constructor(t,e,i,n){super(t,e,".bcm-list__item",".bcm-list__item-childs"),this.isTreeview=!1,this.isCheckBoxes=!1,this.isTreeview=i,this.isCheckBoxes=n}keyUpControl(){this.isTreeview?this.keyUpTreeview():this.isFirstElement()?this.setFocus(this.getLastElement()):this.setFocus(this.getPreviousElement())}keyDownTreeView(){var t;if(this.isTreeview)if(this.isRootElement()&&this.isRootElementIsOpen()){const t=this.getChildElement();t&&this.setFocus(t.firstChild)}else this.isLastElement()&&this.getParentElement(this.getFocusedElement())?this.setFocus(null===(t=this.getParentElement(this.getFocusedElement()))||void 0===t?void 0:t.nextElementSibling):this.setFocus(this.getNextElement())}keyUpTreeview(){if(this.isFirstElement()){const t=this.getParentElement(this.getFocusedElement());this.setFocus(t)}else{const t=this.getPreviousElement();if(t)if(t.classList.contains("bcm-list__item--open")){const e=t.querySelectorAll(this.getChildElementName())[0];console.log({getChildElement:e}),this.setFocus(e.lastChild)}else this.setFocus(t)}}keyDownControl(){this.isTreeview?this.keyDownTreeView():this.isLastElement()?this.setFocus(this.getFirstElement()):this.setFocus(this.getNextElement())}keyRightControl(){if(this.isTreeview&&!this.isRootElementIsOpen()&&this.isRootElement()){const{id:t}=this.getFocusedElement();this.openGroup(t)}}keyLeftControl(){if(this.isTreeview&&this.isRootElementIsOpen()&&this.isRootElement()){const{id:t}=this.getFocusedElement();this.openGroup(t)}}keyEnterControl(){}keySpaceControl(){if(this.isCheckBoxes){const{id:t}=this.getFocusedElement();this.checkedItem(t)}}keyDown(){switch(this.getKeyCode()){case f.KeyCode.up:this.keyUpControl();break;case f.KeyCode.down:this.keyDownControl();break;case f.KeyCode.left:this.keyLeftControl();break;case f.KeyCode.right:this.keyRightControl();break;case f.KeyCode.enter:this.keyEnterControl();break;case f.KeyCode.space:this.keySpaceControl()}}keyUp(){}}var U=function(t,e,i,n){var c,o=arguments.length,r=o<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,i,n);else for(var s=t.length-1;s>=0;s--)(c=t[s])&&(r=(o<3?c(r):o>3?c(e,i,r):c(e,i))||r);return o>3&&r&&Object.defineProperty(e,i,r),r};const Y=class{constructor(t){e(this,t),this.bcmChecklist=i(this,"bcm-checklist",7),this.bcmSelected=i(this,"bcm-selected",7),this.change=i(this,"bcm-change",7),this.open=i(this,"bcm-open",7),this.close=i(this,"bcm-close",7),this.debounce=null,this.debounceHandler=l.debounceInput((()=>this.listenResize()),300,!1),this._id=l.UID(),this.type=x.ListType.listbox,this.treeview=!1,this.checkboxes=!1,this.searchable=!1,this.value=null,this.inputText=void 0,this.name=void 0,this.label=void 0,this.size=x.Size.medium,this.disabled=!1,this.readonly=!1,this.highlight=!1,this.highlightText=void 0,this.required=!1,this.hidden=!1,this.fullWidth=!1,this.height="256px",this.maxHeight="500px",this.minHeight="150px",this.width="256px",this.infoFooter=!1,this.variableText="item",this.template=void 0,this.allOpen=!1,this.keyControl=!1,this.checkAll=!0,this.stopDeepClean=!1,this.linkedComponent=void 0,this.isOpen=!1,this.calculatedViewport=!1,this.isSelectedOther=!1,this.isHaveOtherTag=!1,this.placeholder="Choose an option",this.searchPlaceholder="Search",this.searchIsOnlyChilds=!1,this.minSearchLength=2,this.clearable=!1,this.caption=void 0,this.noCaption=!1,this.captionType=x.Status.default,this.captionError=void 0,this.emptyText=void 0,this.emptyIcon="fad fa-folder-open",this.captionCache=void 0,this.captionTypeCache=void 0,this.tick={},this.totalData=0,this.totalRootData=0,this.limit=20,this.searchGetParents=void 0,this.searchResultLimit=20,this.searchFound=null,this.returnFilterData={},this.returnOtherData={},this.options={rootMargin:"30px"},this.tagContainerWidth=0,this.selectAllItem={id:"select-all",text:"Select All",value:"select-all",checked:!1,disabled:!1,icon:"",status:x.Status.default,indeterminate:"uncheck"},this.placement=x.Placement["bottom-start"],this.data=[]}connectedCallback(){"256px"!=this.height&&(this.limit=this.height.indexOf("px")>-1?Math.floor(+this.height.replace("px","")/10):Math.floor(+window.innerHeight/10),this.searchResultLimit=this.limit,this.markForCheck());const t=document.querySelectorAll(`#bcm-list-${this._id}`);(null==t?void 0:t.length)>1&&t.forEach(((t,e)=>e>0&&t.remove()))}componentWillRender(){this.calculateLocation()}componentShouldUpdate(t,e,i){Object.keys(this.getOptions()).indexOf(i)>-1&&t!==e&&this.updateOptions()}get containerWidth(){var t,e;return null===(e=null===(t=this.el)||void 0===t?void 0:t.getBoundingClientRect())||void 0===e?void 0:e.width}get tagCount(){return this.containerWidth>0?Math.floor(+(this.containerWidth-100)/85):0}get tagData(){return s((()=>{var t;return null===(t=this.value)||void 0===t?void 0:t.map((t=>({value:t.id,label:h.textLimitter(t.text,7),text:t.tooltipMessage||t.tagTitle||t.text})))}),[])}async componentDidLoad(){if(await this.initState(),"select"==this.type||"autocomplete"==this.type||this.linkedComponent){const t=this.el.querySelector(`#bcm-list-${this._id}`);t&&document.body.appendChild(t)}}disconnectedCallback(){if(this.isOpen=!1,!this.stopDeepClean&&(H.removeState(this._id),this.el.innerHTML="","select"==this.type||"autocomplete"==this.type||this.linkedComponent)){const t=document.querySelectorAll(`#bcm-list-${this._id}`);(null==t?void 0:t.length)&&(t.forEach((t=>t.remove())),this.el.remove())}}watchId(t,e){H.removeState(e),this.initState()}handleValueChange(t,e){var i;l.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes?m.compareTwoArrayIsSame(t,e)||(this.bcmChecklist.emit(this.value),this.change.emit(this.value)):(null==t?void 0:t.id)!=(null==e?void 0:e.id)&&this.change.emit(this.value)}watchReturnFilterData(t){var e;const{checkedItems:i,visibledItems:n}=t;i&&n?this.handleIndeterminate(i.length,n.length):this.handleIndeterminate((null===(e=this.value)||void 0===e?void 0:e.length)||0,this.totalData)}async handleOpen(){this.isOpen?(this.open.emit(),this.calculateLocation(),this.onSelectSearch()):(this.listScrollToTop(),this.close.emit(),await p(100),this.unSelectOther())}listScrollToTop(){const t=document.querySelector(`#bcm-list-${this._id}`);t&&(t.querySelector(".scrolling").scrollTop=0)}async dataChanged(t,e){m.compareTwoArrayIsSame(t,e)||await this.initState()}isIntersecting(t){const e=null==t?void 0:t.target;e&&e.id===this._id&&this.listenResize()}handleSlotItems(t){var e;(null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.length)>0&&(this.data=t.detail)}handleChange(t){t.target.id==`bcm-list-input-tag-container-${this._id}-autocomplete-input`&&t.stopImmediatePropagation()}handleResize(){this.calculateLocation(),this.debounceHandler()}handleWheel(t){if(this.isOpen){const e=document.querySelector(`#bcm-list-${this._id}`);e&&l.findEventPath(t,e)?("select"==this.type||"autocomplete"==this.type||this.linkedComponent)&&this.calculateLocation():this.hide()}}clearAutocomplete(){if("autocomplete"==this.type){const t=this.getAutoCompleteInput();t&&t.handleClear(!1)}}async handleSelectOtherTag(t){if(this.disabled)return;const{id:e,checked:i}=t.detail;this.isSelectedOther=i,e&&(i?this.filterOtherList(e):this.unSelectOther(),this.isOpen=!0)}async handleDeleteTag(t){var e;if(this.disabled)return;const{id:i}=t.detail;this.isSelectedOther&&this.unSelectOther(),Array.isArray(i)?H.removeOtherTags(this._id,i):H.checkedItem(this._id,i),this.value=(await this.getCheckedList()).checkedList,this.handleIndeterminate((null===(e=this.value)||void 0===e?void 0:e.length)||0,this.totalData)}async handleSelectTag(t){this.disabled||(this.clearAutocomplete(),this.onSelectSearch(),this.unSelectOther())}handleClick(t){var e;if(this.disabled)return;const i=document.querySelector(`#bcm-list-${this._id}`),n=l.findEventPath(t,this.el)||i&&l.findEventPath(t,i);if(n&&(null!==this.debounce&&(t.preventDefault(),t.stopPropagation(),clearTimeout(this.debounce),this.debounce=null),this.debounce=setTimeout((()=>{this.debounce=null}),300)),!n&&"autocomplete"==this.type){const t=this.getAutoCompleteInput();t&&t.setValue(this.checkboxes?"":(null===(e=this.value)||void 0===e?void 0:e.text)||"")}const c=l.findEventPathWithKey(t,"className",["bcm-tag"]),o=l.findEventPathWithKey(t,"className",["bcm-tag bcm-tag--other"]),r=l.findEventPathWithKey(t,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),s=l.findEventPathWithKey(t,"className",["right close-button"]);r&&!s&&"autocomplete"!=this.type&&(this.isOpen=!(!c&&!o&&this.isOpen)),i&&this.isOpen&&(i.contains(t.target)||this.el.contains(t.target)||(this.isOpen=!1))}bcmOnSearchClear(t){var e,i;"autocomplete"==this.type&&((null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||t.detail&&this.setClear())}bcmOnSearch(t){var e,i,n,c,o,r;(null===(e=null==t?void 0:t.target)||void 0===e?void 0:e.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==t?void 0:t.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||(this.searchGetParents=s((()=>{var e;return null===(e=t.detail)||void 0===e?void 0:e.parentIndex}),null),this.searchResultLimit=10,this.searchFound=null!=(null===(n=t.detail)||void 0===n?void 0:n.matching)?null===(c=t.detail)||void 0===c?void 0:c.matching.length:null,this.returnFilterData=H.filterData(this._id,null===(o=t.detail)||void 0===o?void 0:o.nestedResult),this.searchFound>0&&this.highlight&&(this.highlightText=null===(r=t.detail)||void 0===r?void 0:r.value),"autocomplete"==this.type&&(this.isOpen=!0),t.detail.result||("autocomplete"==this.type?this.isOpen=!1:(this.returnFilterData={},H.filterData(this._id,null)),this.searchResultLimit=null,this.highlightText=null),this.markForCheck())}handleKeyDown(t){const e=t.keyCode||t.which;if(e===x.KeyCode.escape&&this.isOpen&&(this.isOpen=!1,t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()),this.keyControl){const t=new K(e,this.el,this.treeview,this.checkboxes);t.openGroup=t=>{this.openGroup(t)},t.checkedItem=t=>{this.checkedItem(t)},t.keyDown()}}handleKeyUp(t){if(this.keyControl&&l.findEventPath(t,this.el)){const t=document.getElementById(`bcm-list-${this._id}`);if(t){const e=t.querySelectorAll(".bcm-list__item.focused");if(e.length>0){const i=t.querySelector("main"),n=e[0].offsetHeight,c=i.offsetHeight,o=e[0].offsetTop;o>c&&(i.scrollTop=o-c/2+n/2),o<c&&(i.scrollTop=o-c/2-n/2)}}}}async set(t){t?(Array.isArray(t)&&this.addChecked(t),"string"!=typeof t&&"number"!=typeof t||this.selectedItem(t)):this.setClear()}async get(){var t,e;return this.value?this.checkboxes?null===(e=null===(t=await this.getCheckedList())||void 0===t?void 0:t.checkedList)||void 0===e?void 0:e.map((t=>t.id)):this.value.id:null}async getCheckedList(){return Promise.resolve(H.getCheckedList(this._id))}async getSelected(){return Promise.resolve(H.getSelected(this._id))}async getValue(){return Promise.resolve(this.value)}async addChecked(t=[],e=!1,i=!0){return t&&t.length>0&&(e||(H.setClear(this._id),await p(10)),await H.addChecked(this._id,t),await p(10),i&&(this.value=(await this.getCheckedList()).checkedList),this.markForCheck()),Promise.resolve(this.value)}async selected(t){return!!t&&Promise.resolve(await this.selectedItem(t))}async setClear(t){return H.setClear(this._id),this.value=null,this.inputText="",this.isOpen=!1,this.selectAllItem.indeterminate="uncheck",this.markForCheck(),t&&(t.stopPropagation(),t.preventDefault()),await p(10),Promise.resolve()}async resetCaption(){return await p(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await p(10),Promise.resolve()}async show(){return this.isOpen=!0,Promise.resolve()}async hide(){return this.isOpen=!1,Promise.resolve()}updateOptions(){H.updateOptions(this._id,this)}handleIndeterminate(t,e){this.selectAllItem=Object.assign(Object.assign({},this.selectAllItem),{indeterminate:this.checkboxes&&t>0?t===e?"check":"indeterminate":"uncheck",checked:!!(this.checkboxes&&t>0)&&t===e})}listenResize(){this.calculateLocation(),this.markForCheck()}async unSelectOther(){return await this.onClearSearch(),this.isSelectedOther=!1,this.searchFound=null,this.returnFilterData={},H.filterData(this._id,null),await p(10),Promise.resolve()}async onClearSearch(){const t=document.getElementById(`bcm-list-${this._id}-search`);return t&&await t.handleClear(),Promise.resolve()}async onSelectSearch(){const t=document.getElementById(`bcm-list-${this._id}-search`);t&&(await p(100),t.onBcmFocus(),t.onBcmSelect())}async filterOtherList(t){const e=(await this.getCheckedList()).nestedResult,i=l.convertIdsToNestedData(t,e);this.returnFilterData=await H.filterData(this._id,i,null,!0),this.searchFound=(null==t?void 0:t.length)||0,this.limit=500,this.searchGetParents=null,await p(1e3),this.markForCheck()}async initState(){var t,e,i;this.onClearSearch(),await H.setValue({id:this._id,dataSource:this.data&&s((()=>"string"==typeof this.data?JSON.parse(this.data):this.data),[]),options:this});const{totalRoots:n,totalItems:c}=H.getValue(this._id);if(this.totalData=c,this.totalRootData=n,this.value=this.checkboxes?(await this.getCheckedList()).checkedList:H.selectedItem(this._id)?H.selectedItem(this._id)[0]:null,this.checkboxes||(this.inputText=(null===(t=this.value)||void 0===t?void 0:t.text)||null),this.checkboxes&&(null===(e=this.value)||void 0===e?void 0:e.length)>0){const t=[];this.value.forEach((e=>{e.items&&0!==e.items.length||t.push(e.id)})),await this.addChecked(t,!1,!1)}await this.handleIndeterminate(null===(i=this.value)||void 0===i?void 0:i.length,this.totalData),await this.markForCheck()}async markForCheck(){await p(10),this.tick=l.UID()}getOptions(){return s((()=>H.getValue(this._id).options),{})}getItems(){return this.isSelectedOther?this.returnFilterData.checkedItems:s((()=>H.getData(this._id)),[])}getLimitedItems(t){return s((()=>H.getDataPagination(this._id,this.searchResultLimit||this.limit,t)),[])}openGroup(t){H.openGroup(this._id,t),this.markForCheck()}focusItem(t){if(t.target.classList.contains("bcm-list__item")){const e=t.target,i=document.getElementById(`bcm-list-${this._id}`);if(i&&i.querySelectorAll(".bcm-list__item").length>0){const t=i.querySelector(".bcm-list__item.focused");t&&t.classList.remove("focused"),e.classList.add("focused")}}}async selectedItem(t){var e;if(!this.checkboxes&&(this.value=H.selectedItem(this._id,t)?H.selectedItem(this._id,t)[0]:null,this.inputText=(null===(e=this.value)||void 0===e?void 0:e.text)||null,this.isOpen=!1,this.markForCheck(),"autocomplete"==this.type&&this.value)){const t=this.getAutoCompleteInput();t&&setTimeout((()=>{var e;t.setValue((null===(e=this.value)||void 0===e?void 0:e.text)||""),this.isOpen=!1}),100)}return Promise.resolve(this.value)}async checkedItem(t){"select-all"===t?H.selectAll(this._id,!this.selectAllItem.checked):H.checkedItem(this._id,t),this.value=(await this.getCheckedList()).checkedList,this.changeVisibleCheckeds(),this.markForCheck()}changeVisibleCheckeds(){const{visibledItems:t}=this.returnFilterData;this.returnFilterData={visibledItems:t,checkedItems:t&&t.filter((t=>t.checked))||[]}}getAutoCompleteInput(){return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`)}dataScrollEvent(t){let e=0,i=new IntersectionObserver((t=>{0===e&&(e++,t[0].isIntersecting&&(this.limit+=15,this.searchResultLimit+=15,i.disconnect(),i=null))}),this.options);i.observe(t.target.lastElementChild)}async calculateLocation(){var t,e;if("select"==this.type||"autocomplete"==this.type||this.linkedComponent){const n=document.getElementById(`bcm-list-${this._id}`);var i=this.placement;const c=document.getElementById(this.linkedComponent?this.linkedComponent:`bcm-list-input-${this._id}`);if(n&&c){b(n,c,i,(t=>i=t)),await p(10);let o=d(i,c),r=0,s=0;if(this.linkedComponent){const i=document.getElementById(this.linkedComponent);if(i){if(!i.noCaption){const e=(null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelector(".bcm-caption-area"))||i.querySelector(".bcm-caption-area");e&&(r=e.offsetHeight||e.clientHeight)}const n=(null===(e=i.shadowRoot)||void 0===e?void 0:e.querySelector(".bcm-label"))||i.querySelector(".bcm-label");n&&(s=n.offsetHeight||n.clientHeight)}}n.style.width=this.fullWidth?c.offsetWidth+"px":this.width||"auto",n.style.height=this.height.indexOf("%")>-1?.01*a.toNumber(this.height)*window.innerHeight-o[0]-50+"px":this.height,n.style.minHeight=this.minHeight;const l="top"==i.split("-")[0]?window.innerHeight-(window.innerHeight-o[0])-50:window.innerHeight-o[0]-50;n.style.maxHeight=this.maxHeight.indexOf("%")>-1?.01*a.toNumber(this.maxHeight)*l+"px":a.toNumber(this.maxHeight)<l?this.maxHeight:l+"px",b(n,c,i,(t=>i=t)),await p(10),o=d(i,c),n.style.top=("top"==i.split("-")[0]?o[0]-n.offsetHeight+s:o[0]-r)+"px",n.style.left="end"==i.split("-")[1]?o[1]-n.offsetWidth+"px":o[1]+"px",n.classList.toggle("bcm-list--top","top"==i.split("-")[0]),this.calculatedViewport=!0}}}render(){const{checkboxes:e,treeview:i,label:c,size:o,disabled:r,readonly:s,required:l,hidden:a,fullWidth:h,searchable:m}=this.getOptions(),b=v("bcm-list",`bcm-list__size-${o}`,`bcm-list__${this.type}`,"large"===o?"size-3":"size-2",{error:this.captionType==x.Status.error,"full-width":h,"bcm-list__linked":this.linkedComponent,hidden:a,readonly:s,disabled:r}),d=v("bcm-list__container",this.linkedComponent?"bcm-list__type-linked-component":`bcm-list__type-${this.type}`,{"is-open":this.isOpen&&this.calculatedViewport,error:this.captionType==x.Status.error,"full-width":h,hidden:a,readonly:s,disabled:r}),u=v("bcm-list__input"),p="select"==this.type||"autocomplete"==this.type||this.linkedComponent;return t(n,{class:b,tabindex:"0",style:{"--width":h?"100%":this.width,"--height":p?"100%":this.height,"--max-height":p?"inherit":this.maxHeight,"--min-height":p?"inherit":this.minHeight}},t("div",{id:`bcm-list-label-${this._id}`,class:"bcm-list__label"},c&&t("div",null,t(g,{size:this.size,type:this.captionType,value:c,required:l,htmlFor:this._id}))),"select"==this.type&&t("div",{id:`bcm-list-input-${this._id}`,class:u},t("span",{class:v("bcm-list__input-container",{"type-single":!e,"value-empty":!this.value})},this.checkboxes?this.value&&this.value.length>0?t("bcm-rc-overflow",{data:this.tagData,maxCount:this.tagCount}):t("span",{class:"bcm-list__input-placeholder"},this.placeholder):this.value?this.inputText:t("span",{class:"bcm-list__input-placeholder"},this.placeholder)),t("span",{class:v("bcm-list__input-buttons",{disabled:r})},this.clearable&&this.value&&t("div",{class:"bcm-list__input-buttons-button"},t("bcm-icon",{icon:"fal fa-times",onClick:t=>!r&&this.setClear(t)})),t("div",{class:`bcm-list__input-buttons-button caret-is ${this.isOpen&&this.calculatedViewport&&"caret-is-open"}`},t("bcm-icon",{icon:"far fa-angle-down"})))),"autocomplete"===this.type&&t("div",{id:`bcm-list-input-${this._id}`,class:v(u,{"bcm-list__input-autocomplete":"autocomplete"==this.type})},t("span",{class:"bcm-list__input-container",id:`bcm-list-input-tag-container-${this._id}`},this.checkboxes&&t("span",{class:"bcm-list__input-tag-container",id:`bcm-list-input-tag-container-${this._id}-autocomplete`}),t("bcm-search",{id:`bcm-list-input-tag-container-${this._id}-autocomplete-input`,class:"bcm-list__autocomplete",data:this.data,clearable:!0,"full-width":!0,"no-caption":!0,placeholder:this.placeholder}))),t(C,{highlight:this.highlightText,searchable:"autocomplete"!=this.type&&m,bcmListContainer:d,checkboxes:e,treeview:i,infoFooter:this.infoFooter,value:this.value,totalData:this.totalData,searchFound:this.searchFound,variableText:this.variableText,searchPlaceholder:this.searchPlaceholder,minSearchLength:this.minSearchLength,searchIsOnlyChilds:this.searchIsOnlyChilds,_id:this._id,checkAll:this.checkAll,data:this.getItems(),width:this.width,height:this.height,size:this.size,selectAllItem:this.selectAllItem,onScrollEvent:t=>this.dataScrollEvent(t),items:this.getLimitedItems(this.searchGetParents),selectedItem:t=>this.selectedItem(t),checkedItem:t=>this.checkedItem(t),openGroup:t=>this.openGroup(t),focusItem:t=>this.focusItem(t),emptyText:this.emptyText,emptyIcon:this.emptyIcon}),t(_,{noCaption:this.noCaption,captionType:this.captionType,captionError:this.captionError,caption:this.caption}))}get el(){return c(this)}static get watchers(){return{_id:["watchId"],value:["handleValueChange"],returnFilterData:["watchReturnFilterData"],isOpen:["handleOpen"],data:["dataChanged"]}}};function J(){return J=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},J.apply(this,arguments)}function Q(t){return Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Q(t)}function X(t,e,i){return(e=function(t){var e=function(t){if("object"!==Q(t)||null===t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,"string");if("object"!==Q(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===Q(e)?e:String(e)}(e))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function Z(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,n)}return i}function tt(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?Z(Object(i),!0).forEach((function(e){X(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Z(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function et(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i<e;i++)n[i]=t[i];return n}function it(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var i=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=i){var n,c,o,r,s=[],l=!0,a=!1;try{if(o=(i=i.call(t)).next,0===e){if(Object(i)!==i)return;l=!1}else for(;!(l=(n=o.call(i)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){a=!0,c=t}finally{try{if(!l&&null!=i.return&&(r=i.return(),Object(r)!==r))return}finally{if(a)throw c}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return et(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?et(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function nt(t,e){if(null==t)return{};var i,n,c=function(t,e){if(null==t)return{};var i,n,c={},o=Object.keys(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||(c[i]=t[i]);return c}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(n=0;n<o.length;n++)e.indexOf(i=o[n])>=0||Object.prototype.propertyIsEnumerable.call(t,i)&&(c[i]=t[i])}return c}function ct(){return ct=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t},ct.apply(this,arguments)}
|
|
6
6
|
/** @license React v16.13.1
|
|
7
7
|
* react-is.production.min.js
|
|
8
8
|
*
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,h as e,H as s,g as r}from"./p-6d7fe687.js";import"./p-2fc584c4.js";import"./p-626a65e9.js";import{G as a}from"./p-ce8592a0.js";import"./p-cde20403.js";import"./p-8d0ca8c2.js";import"./p-8a860cff.js";import"./p-5ae0a59b.js";import"./p-a429e85b.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";const o=class{constructor(e){t(this,e),this._id=a.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{o as bcm_modal_2_header}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{v as o}from"./p-940dda87.js";window.bcm={version:o},function(o){const s=document.head,n=document.createElement("script");Object.keys(o).forEach((s=>{n[s]=o[s]})),s.appendChild(n)}({src:"https://kit.fontawesome.com/5e86bea963.js",crossOrigin:"anonymous"});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as e,c as i,h as t,H as s,g as h}from"./p-6d7fe687.js";import{c as o}from"./p-d65a1e21.js";import{a as p}from"./p-a429e85b.js";import{G as n}from"./p-ce8592a0.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";const a=class{constructor(t){e(this,t),this.onShow=i(this,"bcm-show",7),this.onHide=i(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const e=document.createElement("old-bcm-popover-box");e.setAttribute("id","box-"+this._id),e.setAttribute("target-id",this._id),e.setAttribute("placement",this.placement),e.setAttribute("message",this.message),e.setAttribute("_title",this._title),e.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(e)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(e){switch(this.trigger){case"click":"click"===e&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===e&&this.show(),"onMouseOut"===e&&this.hide();break;case"focus":"onFocus"===e&&this.show(),"onBlur"===e&&this.hide()}}render(){const e=o("bcm-popover");return t(s,{class:e,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{s}from"./p-
|
|
5
|
+
import{s}from"./p-ce8592a0.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}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{v as r}from"./p-940dda87.js";import{c as t}from"./p-4aa0e6b1.js";var e,n;function o(r,t){try{var e=r();return void 0===e?t:e}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"}(e||(e={})),function(r){r.banner="banner",r.basic="basic"}(n||(n={}));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",r.appendChild(t))}();class u{static getTwColor(r){const{color:e,variable:n,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(!e||!t[e])return!1;const c={};return"string"==typeof t[e]?(c[n]=t[e],c):((Array.isArray(o)?o:Object.keys(o)).forEach((r=>{t[e][r]&&(Array.isArray(o[r])?o[r].forEach((o=>{c[`${n}-${o}`]=t[e][r]})):c[`${n}-${r}`]=t[e][r])})),c)}}u.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,u.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case e.info:return{icon:"far fa-info-circle"};case e.error:return{icon:"far fa-times-circle"};case e.warning:return{icon:"far fa-exclamation-circle"};case e.success:return{icon:"far fa-check-circle"}}},u.createComponent=(r,t,e="append-area")=>{let n=e?document.querySelector(e):document.body;e&&!n&&(n=document.createElement("div"),n.id="append-area",document.body.appendChild(n),n.style.visibility="hidden",n.style.opacity="0");let o=document.getElementById(t.id);return o||(o=document.createElement(r)),Object.keys(t).forEach((r=>{o[r]=t[r]})),n.appendChild(o),o},u.createElement=(r="div",t)=>{let e=document.getElementById(t.id);return e||(e=document.createElement(r)),Object.keys(t).forEach((r=>{"innerHTML"==r?e[r]=t[r]:e.setAttribute(r,t[r])})),document.body.appendChild(e),e},u.debounceInput=(r,t,e,n)=>{let o;return function(){let c=this,u=arguments;n&&n.apply(c,u);let i=function(){o=null,e||r.apply(c,u)},a=e&&!o;clearTimeout(o),o=setTimeout(i,t),a&&r.apply(c,u)}},u.flatArray=r=>r.reduce(((r,t)=>r.concat(Array.isArray(t)?u.flatArray(t):t)),[]),u.reverseNodeList=r=>{let t=[];for(let e=r.length-1;e>=0;e--)t.push(r[e]);return t},u.findEventPathWithKey=(r,t,e)=>{e=Array.isArray(e)?e:[e];let n=r.composedPath()||r.path;if(n)return void 0!==n.filter((r=>e.includes(r[t])))[0]},u.findEventPathHasAttribute=(r,t)=>{let e=r.composedPath()||r.path;if(e)return o((()=>!!e.find((r=>r.hasAttribute(t)))),!1)},u.findEventTarget=(r,t)=>{t=Array.isArray(t)?t:[t];let e=r.target||r.srcElement;if(e)return t.includes(e)},u.findEventPathWithNodeName=(r,t)=>{let e=r.composedPath()||r.path;if(e)return e.filter((r=>r.nodeName===t))[0]},u.findEventPath=(r,t)=>{t=Array.isArray(t)?t:[t];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>t.includes(r)))[0]},u.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,u.convertIdsToNestedData=(r,t)=>{let e=[],n=[];return t.forEach((t=>{r&&r.indexOf(t.id.toString())>-1?e.push(t):t.items&&(n=u.convertIdsToNestedData(r,t.items),n.length>0&&(t.items=n,e.push(t)))})),e},u.nodeListToArray=r=>Array.prototype.slice.call(r),u.setAttributes=(r,t)=>{Object.keys(t).forEach((e=>{r.setAttribute(e,t[e])}))},u.computedStyle=(r,t)=>window.getComputedStyle(r,null).getPropertyValue(t),u.getAncestor=(r,t)=>{for(;(r=r.parentElement)&&!r.matches(t););return r},u.findParentElement=(r,t)=>{const e=t.charAt(0);if("*"===t)return r.parentElement;if("."===e){const e=t.slice(1);return function(r,t){for(;null!==r;){if(r.classList.contains(t))return r;r=r.parentElement}return null}(r.parentElement,e)}if("#"===e){const e=t.slice(1);return function(r,t){for(;null!==r;){if(r.id===t)return r;r=r.parentElement}return null}(r.parentElement,e)}if("["===e){const e=t.indexOf("]"),n=t.slice(1,e),o=t.slice(e+2,-1);return function(r,t,e){for(;null!==r;){if(r.hasAttribute(t)&&(void 0===e||r.getAttribute(t)===e))return r;r=r.parentElement}return null}(r.parentElement,n,o)}{const e=t.toLowerCase();return function(r,t){for(;null!==r;){if(r.tagName.toLowerCase()===t.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,e)}};export{u as G,e as S,n as T,o as s}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as e,h as t,H as a,g as i}from"./p-6d7fe687.js";import{G as n}from"./p-ce8592a0.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const r=class{constructor(t){e(this,t),this._id=n.UID(),this.data=[]}render(){const{data:e}=this,i="bcm-attendance";return t(a,{class:i},t("span",{hidden:!0},t("slot",null)),e.map((e=>{var a,n;return t("div",{class:`${i}__item`},t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / AM`},t("span",{class:`${i}__item-am ${i}__item-status-${null!==(a=e.am)&&void 0!==a?a:"default"}`})),t("bcm-tooltip",{trigger:"hover",message:`${e.weekday||null} / PM`},t("span",{class:`${i}__item-pm ${i}__item-status-${null!==(n=e.pm)&&void 0!==n?n:"default"}`})))})))}get el(){return i(this)}};r.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-attendance{width:fit-content;display:inline-flex;align-items:center;flex-direction:row;gap:4px}.bcm-attendance__item{display:flex;flex-direction:row;align-items:center;gap:1px}.bcm-attendance__item-am,.bcm-attendance__item-pm{display:block;width:calc( calc( 12px + 1px ) / 2 );height:calc( 12px + 1px );background-color:var(--bcm-new-ds-color-blue-500)}.bcm-attendance__item-am:hover,.bcm-attendance__item-pm:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-attendance__item-am{border-top-left-radius:100px;border-bottom-left-radius:100px}.bcm-attendance__item-pm{border-top-right-radius:100px;border-bottom-right-radius:100px}.bcm-attendance__item-status-present{background-color:var(--bcm-new-ds-color-emerald-500)}.bcm-attendance__item-status-present:hover{background-color:var(--bcm-new-ds-color-emerald-600)}.bcm-attendance__item-status-late{background-color:var(--bcm-new-ds-color-amber-500)}.bcm-attendance__item-status-late:hover{background-color:var(--bcm-new-ds-color-amber-600)}.bcm-attendance__item-status-absent{background-color:var(--bcm-new-ds-color-red-500)}.bcm-attendance__item-status-absent:hover{background-color:var(--bcm-new-ds-color-red-600)}.bcm-attendance__item-status-default{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-attendance__item-status-default:hover{background-color:var(--bcm-new-ds-color-slate-400)}';export{r as bcm_attendance}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,h as p,H as s,g as r}from"./p-6d7fe687.js";import"./p-2fc584c4.js";import"./p-626a65e9.js";import{G as o}from"./p-ce8592a0.js";import"./p-cde20403.js";import"./p-8d0ca8c2.js";import"./p-8a860cff.js";import"./p-5ae0a59b.js";import"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";const e=class{constructor(p){t(this,p),this._id=o.UID(),this.el.slot="footer"}render(){return p(s,{class:a("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{e as bcm_modal_2_footer}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,c as e,h as i,H as o,g as r}from"./p-6d7fe687.js";import"./p-2fc584c4.js";import"./p-626a65e9.js";import{G as s}from"./p-ce8592a0.js";import"./p-cde20403.js";import"./p-8d0ca8c2.js";import"./p-8a860cff.js";import"./p-5ae0a59b.js";import{B as n}from"./p-a429e85b.js";import{c as a}from"./p-d65a1e21.js";import"./p-436364c8.js";import"./p-3c7a0345.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";const c=class{constructor(i){t(this,i),this.bcmBeforeOpen=e(this,"bcm-before-open",7),this.bcmBeforeClose=e(this,"bcm-before-close",7),this._id=s.UID(),this._title=void 0,this.position=n.Position.right,this.fullWidth=!1,this._open=!1,this._close=!1}async show(){this.bcmBeforeOpen.emit(!0)}async hide(){this.bcmBeforeClose.emit(!0),this._close=!0}_beforeOpen(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!0)}_beforeClose(t){var e;t&&(null===(e=t.target)||void 0===e?void 0:e.id)==this._id&&(this._open=!1)}_openHandler(){this._open?document.body.classList.add("bcm-disable-scroll"):document.body.classList.remove("bcm-disable-scroll")}keyboardNavigation(t){(t.keyCode||0)==n.KeyCode.escape&&(t.preventDefault(),this.hide())}disconnectedCallback(){this._open=!1,document.body.classList.remove("bcm-disable-scroll"),this.el.remove()}render(){const t=a("bcm-drawer",{"bcm-drawer--open":this._open}),e=a("bcm-drawer__content",`bcm-drawer__content--position-${this.position}`,{"bcm-drawer__content--open":this._open,"bcm-drawer__content--close":this._close,"full-width":this.fullWidth}),r=a("bcm-drawer__overlay",{"bcm-drawer__overlay--open":this._open,"bcm-drawer__overlay--close":this._close});return i(o,{class:t},i("div",{class:r,onClick:()=>this.hide()}),i("div",{class:e},i("div",{class:"bcm-drawer__content-header"},i("bcm-text",{class:"bcm-drawer__content-header-title","font-size":"6",weight:"600",color:"slate-800"},this._title," ",i("slot",{name:"header"})),i("div",{class:"bcm-drawer__content-header-close size-4",onClick:()=>this.hide()},i("bcm-icon",{icon:"fal fa-times"}))),i("div",{style:{overflow:"auto",flex:"1"}},i("div",{class:"bcm-drawer__content-body"},i("slot",null))),i("div",{class:"bcm-drawer__content-footer"},i("slot",{name:"footer"}))))}get el(){return r(this)}static get watchers(){return{_open:["_openHandler"]}}};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-drawer{user-select:none;position:absolute;width:100vw;height:100vh;top:-100%;left:-100%;overflow:hidden;visibility:hidden}.bcm-drawer--open{visibility:visible;top:0;left:0}.bcm-drawer__content{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;user-select:text;position:fixed;width:100%;height:100%;background-color:#f1f5f9;z-index:10350;transition:transform 0.2s ease-in-out;transform:translateX(-100%);visibility:hidden;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start}.bcm-drawer__content-body{padding:0 24px 24px 24px}.bcm-drawer__content.full-width{max-width:100%}.bcm-drawer__content-header{padding:24px 24px 0 24px;display:flex;justify-content:space-between;align-items:flex-start;color:var(--bcm-color-grey-8);margin-bottom:8px}.bcm-drawer__content-header-close{padding:4px 8px;margin-right:-4px;margin-top:-4px;color:var(--bcm-color-grey-7)}.bcm-drawer__content-header-close:hover{cursor:pointer;color:var(--bcm-color-grey-8)}.bcm-drawer__content-footer{padding:12px 24px}.bcm-drawer__content--position-left,.bcm-drawer__content--position-right{max-width:500px}.bcm-drawer__content--position-left.full-width,.bcm-drawer__content--position-right.full-width{max-width:100%}.bcm-drawer__content--position-top,.bcm-drawer__content--position-bottom{max-height:500px}.bcm-drawer__content--position-top.full-width,.bcm-drawer__content--position-bottom.full-width{max-height:100%}.bcm-drawer__content--position-left{transform:translateX(-100%);top:0;left:0}.bcm-drawer__content--position-top{transform:translateY(-100%);top:0;left:0}.bcm-drawer__content--position-right{transform:translateX(100%);top:0;right:0}.bcm-drawer__content--position-bottom{transform:translateY(100%);bottom:0;left:0}.bcm-drawer__content--open{transform:translateX(0);visibility:visible}.bcm-drawer__content--close{visibility:visible}.bcm-drawer__overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0, 0, 0, 0.5);z-index:10349;visibility:hidden;opacity:0;transition:opacity 0.3s ease-in-out}.bcm-drawer__overlay--close{opacity:0;visibility:visible;transform:translateX(-100%)}.bcm-drawer__overlay--open{opacity:1;visibility:visible;transform:translateX(0)}';export{c as bcm_drawer}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as e,h as i,H as t,g as p}from"./p-6d7fe687.js";import{G as n}from"./p-ce8592a0.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const a=class{constructor(i){e(this,i),this._id=n.UID(),this.multi=!1}componentDidRender(){this.multi||this.checkExpandedCount()}checkExpandedCount(){var e,i;const t=this.el.querySelectorAll(".bcm-expansion-panel");if(t&&Array.from(t).map((e=>e.expanded)).filter(Boolean).length>1){const p=null===(i=null===(e=Array.from(t).filter((e=>e.expanded)))||void 0===e?void 0:e.pop())||void 0===i?void 0:i.id;Array.from(t).forEach((e=>{e.id!==p&&(e.expanded=!1)}))}}open(e){if(this.multi)return;const i=e.detail,t=this.el.querySelectorAll(".bcm-expansion-panel");t&&t.forEach((e=>{e.id!==i&&(e.expanded=!1)}))}isLoad(e){var i,t,p;if(!this.multi){var n=(null===(t=null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.parentElement)||void 0===t?void 0:t.id)||null;"BCM-EXPANSION-PANEL"==((null===(p=null==e?void 0:e.target)||void 0===p?void 0:p.nodeName)||null)&&this._id==n&&this.checkExpandedCount()}}render(){return i(t,{id:this._id},i("slot",null))}get el(){return p(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}';export{a as bcm_accordion}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as i,c as t,h as e,H as s,g as h}from"./p-6d7fe687.js";import{c as p}from"./p-d65a1e21.js";import{G as n}from"./p-ce8592a0.js";import{a}from"./p-a429e85b.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";const o=class{constructor(e){i(this,e),this.onShow=t(this,"bcm-show",7),this.onHide=t(this,"bcm-hide",7),this.onConfirm=t(this,"bcm-confirm",7),this.onCancel=t(this,"bcm-cancel",7),this._id=n.UID(),this.message=void 0,this.status="warning",this.cancelText="No",this.okeyText="Yes",this.placement=a.Placement.top,this.trigger=a.TriggerType.click,this.open=!1,this.hidden=!1}async show(){this.open=!0,this.onShow.emit(),await this.createBox().then((()=>this.showBox()))}async hide(){this.open=!1,this.onHide.emit()}async createBox(){if(!this.getPopconfirmBox()){const i=document.createElement("bcm-popconfirm-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("status",this.status),i.setAttribute("cancel-text",this.cancelText),i.setAttribute("okey-text",this.okeyText),this.el.parentElement.appendChild(i)}return Promise.resolve()}getPopconfirmBox(){return document.querySelector(`bcm-popconfirm-box[id="box-${this._id}"]`)}showBox(){this.getPopconfirmBox()&&this.getPopconfirmBox().show()}hideBox(){this.getPopconfirmBox()&&this.getPopconfirmBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}onBcmConfirm(i){i.detail==this._id&&this.onConfirm.emit(this._id)}onBcmCancel(i){i.detail==this._id&&this.onCancel.emit(this._id)}render(){const i=p("bcm-popconfirm");return e(s,{class:i,onclick:()=>this.listenTrigger("click")},e("slot",null))}get el(){return h(this)}};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}.bcm-popconfirm{display:inline-flex}';export{o as bcm_popconfirm}
|
|
@@ -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 a}from"./p-6d7fe687.js";import{c as w}from"./p-d65a1e21.js";import{G as o}from"./p-ce8592a0.js";import{S as h}from"./p-8d0ca8c2.js";import{a as r}from"./p-a429e85b.js";import{d as n}from"./p-3c7a0345.js";import"./p-6f56f8ca.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";const c=class{constructor(i){t(this,i),this.bcmToastClose=s(this,"bcm-toast-close",7),this.bcmToastOpen=s(this,"bcm-toast-open",7),this.bcmToastView=s(this,"bcm-toast-view",7),this._id=o.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.visible=!1,this.visibleContainer=!1}async show(){const t=document.getElementById(this._id+"-container");return t&&document.body.appendChild(t),this.visible=!0,await n(50),this.visibleContainer=!0,this.bcmToastOpen.emit(),this.timer&&clearTimeout(this.timer),this.timer=setTimeout((()=>this.hide()),this.duration),this.el}async hide(){this.visibleContainer=!1,clearTimeout(this.timer),this.bcmToastClose.emit(),await n(100),this.visible=!1}handleMouseEnter(){clearTimeout(this.timer)}handleMouseLeave(){this.visible&&(this.timer=setTimeout((()=>this.hide()),1e3))}render(){return i(e,{class:"tw-hidden"},i("div",{class:w({"tw-hidden":!this.visible}),id:this._id+"-container",onMouseEnter:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},i("div",{class:w("tw-pointer-events-auto tw-transform tw-transition tw-duration-300 tw-ease-in-out","tw-flex tw-min-w-[256px] tw-max-w-[420px] tw-flex-col tw-gap-2 tw-rounded-lg tw-border tw-font-sans tw-font-normal tw-shadow-2","tw-border-gray-300 tw-bg-white tw-text-slate-600",{"tw-p-4":!this.description,"tw-p-6":this.description},"tw-fixed tw-z-50","tw-transform tw-transition tw-duration-300 tw-ease-in-out ",{"tw-inset-x-0 tw-top-4 tw-mx-auto":this.position===r.Placement.top,"tw-inset-x-0 tw-bottom-4 tw-mx-auto":this.position===r.Placement.bottom,"tw-top-4 tw-left-4":this.position===r.Placement["top-start"],"tw-top-4 tw-right-4":this.position===r.Placement["top-end"],"tw-bottom-4 tw-left-4":this.position===r.Placement["bottom-start"],"tw-bottom-4 tw-right-4":this.position===r.Placement["bottom-end"],"tw-translate-y-0 tw-opacity-100 ":this.visibleContainer,"tw-opacity-0":!this.visibleContainer,"tw-translate-y-[-100%]":!this.visibleContainer&&"top"===this.position.split("-")[0],"tw-translate-y-[100%]":!this.visibleContainer&&"bottom"===this.position.split("-")[0]})},i("div",{class:"tw-flex tw-items-center tw-justify-between tw-gap-5"},i("div",{class:"tw-flex tw-items-center tw-gap-3 "},this.status&&i("i",{class:w("tw-text-6",this.messageIcon?this.messageIcon:"far",{"tw-text-emerald-500":"success"===this.status,"tw-text-red-500":"error"===this.status,"tw-text-amber-500":"warning"===this.status,"tw-text-blue-500":"info"===this.status},{"fa-check-circle":!this.messageIcon&&"success"===this.status,"fa-exclamation-circle":!this.messageIcon&&"error"===this.status,"fa-exclamation-triangle":!this.messageIcon&&"warning"===this.status,"fa-info-circle":!this.messageIcon&&"info"===this.status})}),i("span",{class:w({"tw-text-4":!this.description,"tw-text-6 tw-font-medium":this.description})},!this.description&&this.status&&i("span",null,h.capitalize(this.status),": "),this.message)),i("div",{class:"tw-flex tw-items-baseline tw-gap-2"},this.viewButton&&i("button",{onClick:()=>this.bcmToastView.emit(),title:"View details",class:w("tw-cursor-pointer tw-rounded tw-bg-transparent tw-p-0 tw-px-1 tw-text-4 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200","tw-transition tw-duration-300 tw-ease-in-out",{"tw-font-medium":this.description})},"View"),this.closeButton&&i("button",{title:"Close",onClick:()=>this.hide(),class:w("tw-rounded tw-bg-transparent tw-p-0","tw-flex tw-h-6 tw-w-6 tw-cursor-pointer tw-items-center tw-justify-center tw-text-3 tw-text-inherit","hover:tw-bg-gray-100 hover:tw-text-slate-800","active:tw-bg-gray-200")},i("i",{class:"fal fa-times"})))),this.description&&i("div",{class:"tw-text-3 "},this.description),i("slot",null))))}get el(){return a(this)}};export{c as bcm_toast}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Built with Stencil
|
|
3
|
+
* Copyright (c) Bromcom.
|
|
4
|
+
*/
|
|
5
|
+
import{r as t,c as e,f as i,h as s,H as a,g as o}from"./p-6d7fe687.js";import{I as n}from"./p-54c0916c.js";import{G as r,s as h}from"./p-ce8592a0.js";import{S as p}from"./p-8d0ca8c2.js";import{a as c}from"./p-a429e85b.js";import"./p-940dda87.js";import"./p-4aa0e6b1.js";import"./p-6f56f8ca.js";const l=["BCM-INPUT","BCM-TEXTAREA","BCM-SWITCH","BCM-CHECKBOX","BCM-RADIO-GROUP","BCM-CHECKBOX-GROUP","BCM-RANGE","BCM-FORM","BCM-FORM-GROUP","BCM-LIST","BCM-COLORPICKER","BCM-DATE-PICKER","BCM-TIME-PICKER","BCM-DATETIME-PICKER","BCM-SELECT","BCM-LISTBOX","BCM-CHIP-GROUP"];const m=class{constructor(i){t(this,i),this.bcmForm=e(this,"bcm-form",7),this.isLoad=!1,this.formData={},this.formObj=new Map,this._id=r.UID(),this.validation=!1}componentDidLoad(){this.isLoad=!0,i(this)}componentIsValid(t){if(!t.hidden){this.checkIsGroup(t);const e=["bcm-checkbox","bcm-switch"].includes(p.lowercase(t.tagName))?0==t.value:p.isNullOrEmpty(t.value);t.required&&(e?(t.captionError=c.FormErrorMessages.required,t.captionType="error",this.formObj.set(t.id,{name:t.name,valid:!1,errorDetails:t.captionError})):(t.captionError=null,t.captionType="default",this.formObj.delete(t.id)))}}isGroup(t){return["bcm-checkbox-group"].includes(p.lowercase(t.tagName))}checkIsGroup(t){if(this.isGroup(t))for(let e of Array.from(t.querySelectorAll("bcm-checkbox")))e&&this.componentIsValid(e)}changeCheckboxGroup(t){const e=t.target,{changed:i}=t.detail,s=Array.from(e.querySelectorAll("bcm-checkbox"));for(let t of s)t.id==i.element.id&&(t.value=i.event.value,this.componentIsValid(t))}bcmComponentList(){return h((()=>Array.from(this.el.querySelectorAll("*")).filter((t=>l.includes(t.tagName)&&(!t["s-hn"]||"BCM-FORM-2"==t["s-hn"]))).filter(Boolean)),[])}formResponse(){const t={formData:this.formData,isValid:0==this.formObj.size,errorDetails:Object.assign({},this.formObj.size>0&&Array.from(this.formObj).map((([t,e])=>({[e.name]:e.errorDetails})))),message:0==this.formObj.size?"":"Please fill in all inputs"};return this.bcmForm.emit(t),t}async setMethodType(t){const{isLoad:e,validation:i}=this;if(e)for(const e of this.bcmComponentList())try{await e[t](),"setClear"==t&&i&&this.componentIsValid(e)}catch(i){console.error(e.nodeName,t,i)}return Promise.resolve()}async submit(){const{isLoad:t,validation:e}=this;if(t)for(const t of this.bcmComponentList()){const{name:i,value:s}=t;this.formData[i]=p.isNullOrEmpty(s)?null:s,e&&this.componentIsValid(t)}return Promise.resolve(this.formResponse())}async set(t){var e,i,s;if(this.isLoad&&t&&(null===(e=this.bcmComponentList())||void 0===e?void 0:e.length)>0)for(let e of Object.keys(t)){const a=null!==(s=null===(i=this.bcmComponentList())||void 0===i?void 0:i.find((t=>t.name==e)))&&void 0!==s?s:{};if(a)try{await a.set(t[e]),this.componentIsValid(a)}catch(t){console.warn("set: ",e,a.nodeName)}}}async get(){var t;let e={};if((null===(t=this.bcmComponentList())||void 0===t?void 0:t.length)>0)for(let t of this.bcmComponentList()){const i=await t.get();e=Object.assign(Object.assign({},e),{[t.name]:p.isNullOrEmpty(i)?null:i})}return Promise.resolve(e)}async resetCaption(){return Promise.resolve(await this.setMethodType("resetCaption"))}async setClear(){return this.formData={},this.formObj=new Map,Promise.resolve(await this.setMethodType("setClear"))}onChange(t){const{isLoad:e,validation:i}=this;if(e){const e=t.target,s=e&&e.tagName.toLowerCase().startsWith("bcm-");if(i&&s){if(this.isGroup(e))return this.changeCheckboxGroup(t);this.componentIsValid(e)}}}render(){return s(a,null,s("slot",null))}get el(){return o(this)}};(function(t,e,i,s){var a,o=arguments.length,n=o<3?e:null===s?s=Object.getOwnPropertyDescriptor(e,i):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)n=Reflect.decorate(t,e,i,s);else for(var r=t.length-1;r>=0;r--)(a=t[r])&&(n=(o<3?a(n):o>3?a(e,i,n):a(e,i))||n);o>3&&n&&Object.defineProperty(e,i,n)})([n()],m.prototype,"el",void 0),m.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}:host{display:block}';export{m as bcm_form_2}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{c as t}from"./p-3cde7f38.js";import{G as e,s}from"./p-
|
|
5
|
+
import{c as t}from"./p-3cde7f38.js";import{G as e,s}from"./p-ce8592a0.js";import{f as a}from"./p-6d7fe687.js";const{state:c}=t({value:new Map,setData:{}}),i={removeState:t=>{c.value.delete(t)},getValue:t=>s((()=>c.value.get(t)),{}),setValue:t=>{const s=Object.assign(Object.assign({},t),{steps:t.steps&&t.steps.length>0&&t.steps.filter((t=>!t.hidden)).map(((s,a)=>({id:s.id||e.UID(),title:s.title||s._title,_title:s.title||s._title||"Step "+(a+1),description:s.description||"",status:s.status||"default",disabled:t.linear?0!=a:s.disabled||!1,icon:s.icon||void 0,valid:s.valid||!0,loading:s.loading||!1,index:a+1,active:t.linear?0==a:t.active===a+1,isLast:a===t.steps.length-1,statusIcon:t.icon,headerHidden:s.hidden})))});c.value.set(t.id,s)},changeActiveStep:(t,e)=>{const s=c.value.get(t);s&&(s.active=e,s.steps=s.steps.map(((t,s)=>Object.assign(Object.assign({},t),{active:s===e-1}))))},getActiveIndex:t=>s((()=>c.value.get(t).active),0),changeStepStatus:(t,e,s)=>{const i=c.value.get(t);i&&i.steps&&(i.steps=i.steps.map((t=>Object.assign(Object.assign({},t),{status:t.id===e?s:t.status}))),a(i.el))},changeStepDisabled:(t,e,s)=>{const i=c.value.get(t);i&&i.steps&&(i.steps=i.steps.map((t=>Object.assign(Object.assign({},t),{disabled:t.id===e?s:t.disabled}))),a(i.el))},stepperReset:t=>{const e=c.value.get(t);e&&(e.active=1,e.steps=e.steps.map(((t,e)=>Object.assign(Object.assign({},t),{active:0===e,status:"default",disabled:0!==e,loading:!1}))),a(e.el))},setActiveIndex:(t,e)=>c.value.get(t).active=e};export{i as s}
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-c6ed8219.js');
|
|
11
|
+
require('./package-de04912b.js');
|
|
11
12
|
require('./colors-e1d142ad.js');
|
|
12
13
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
13
14
|
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index$1 = require('./index-ddfd6d8f.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-c6ed8219.js');
|
|
11
11
|
const index$2 = require('./index-fdbf5226.js');
|
|
12
12
|
const index = require('./index-4506fcd7.js');
|
|
13
13
|
const stringHelper = require('./string-helper-d681e5c7.js');
|
|
14
|
+
require('./package-de04912b.js');
|
|
14
15
|
require('./colors-e1d142ad.js');
|
|
15
16
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
16
17
|
require('./bcm-ab921827.js');
|
|
@@ -7,7 +7,8 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-c6ed8219.js');
|
|
11
|
+
require('./package-de04912b.js');
|
|
11
12
|
require('./colors-e1d142ad.js');
|
|
12
13
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
13
14
|
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index$1 = require('./index-ddfd6d8f.js');
|
|
10
10
|
require('./color-helper-7ab15732.js');
|
|
11
11
|
require('./datetime-helper-eaf4fadb.js');
|
|
12
|
-
const generate = require('./generate-
|
|
13
|
-
require('./number-helper-
|
|
12
|
+
const generate = require('./generate-c6ed8219.js');
|
|
13
|
+
require('./number-helper-e137c8d6.js');
|
|
14
14
|
require('./string-helper-d681e5c7.js');
|
|
15
|
-
require('./validators-
|
|
15
|
+
require('./validators-77b56203.js');
|
|
16
16
|
require('./element-dragger-a8562f82.js');
|
|
17
17
|
const bcm = require('./bcm-ab921827.js');
|
|
18
18
|
const index = require('./index-b08b037a.js');
|
|
@@ -20,6 +20,7 @@ require('./colors-56282b00.js');
|
|
|
20
20
|
require('./utils-fc077139.js');
|
|
21
21
|
require('./colors-e1d142ad.js');
|
|
22
22
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
23
|
+
require('./package-de04912b.js');
|
|
23
24
|
|
|
24
25
|
const avatarStyle = index.cva([
|
|
25
26
|
"bcm-avatar bcm-ui-element bcm-ui-content-display",
|
|
@@ -9,10 +9,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index$1 = require('./index-ddfd6d8f.js');
|
|
10
10
|
const colorHelper = require('./color-helper-7ab15732.js');
|
|
11
11
|
require('./datetime-helper-eaf4fadb.js');
|
|
12
|
-
const generate = require('./generate-
|
|
13
|
-
require('./number-helper-
|
|
12
|
+
const generate = require('./generate-c6ed8219.js');
|
|
13
|
+
require('./number-helper-e137c8d6.js');
|
|
14
14
|
const stringHelper = require('./string-helper-d681e5c7.js');
|
|
15
|
-
require('./validators-
|
|
15
|
+
require('./validators-77b56203.js');
|
|
16
16
|
require('./element-dragger-a8562f82.js');
|
|
17
17
|
const bcm = require('./bcm-ab921827.js');
|
|
18
18
|
const index = require('./index-b08b037a.js');
|
|
@@ -20,12 +20,13 @@ const index$3 = require('./index-fdbf5226.js');
|
|
|
20
20
|
const index$2 = require('./index-4506fcd7.js');
|
|
21
21
|
const slotTemplate = require('./slot-template-d70ea082.js');
|
|
22
22
|
const isLoadDecorator = require('./is-load-decorator-137dded1.js');
|
|
23
|
-
const jsonParseDecarator = require('./json-parse-decarator-
|
|
23
|
+
const jsonParseDecarator = require('./json-parse-decarator-08847f37.js');
|
|
24
24
|
const utils = require('./utils-fc077139.js');
|
|
25
25
|
const floatingUi = require('./floating-ui-c9fc2202.js');
|
|
26
26
|
require('./colors-56282b00.js');
|
|
27
27
|
require('./colors-e1d142ad.js');
|
|
28
28
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
29
|
+
require('./package-de04912b.js');
|
|
29
30
|
|
|
30
31
|
class Tooltip {
|
|
31
32
|
constructor({ message, targetId, placement = "top", color = "slate-700", trigger = "none", size = "medium", openDelay = 0, closeDelay = 0, autoHide = false, emitShow = () => { }, emitHide = () => { }, }) {
|
|
@@ -8,8 +8,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
10
|
const index$1 = require('./index-fdbf5226.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-c6ed8219.js');
|
|
12
12
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
13
|
+
require('./package-de04912b.js');
|
|
13
14
|
require('./colors-e1d142ad.js');
|
|
14
15
|
|
|
15
16
|
const breadcrumbCss = "@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-breadcrumb{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:wrap;color:var(--bcm-color-grey-7)}.bcm-breadcrumb__item{display:flex;align-items:center}.bcm-breadcrumb .seperator{cursor:default;display:inline-flex;align-items:center;justify-content:center;margin-left:8px;margin-right:8px;color:var(--bcm-color-grey-7)}.bcm-breadcrumb bcm-link:hover{color:var(--bcm-color-grey-7)}.bcm-breadcrumb .active{color:var(--bcm-color-grey-8)}.bcm-breadcrumb .active:hover{color:var(--bcm-color-grey-8)}.bcm-breadcrumb .is-link:hover{color:var(--bcm-color-prime-blue-6)}.bcm-breadcrumb .is-link:hover bcm-link,.bcm-breadcrumb .is-link:hover bcm-icon{color:var(--bcm-color-prime-blue-6)}.bcm-breadcrumb__dropdown-item{position:relative;display:inline-flex}.bcm-breadcrumb__dropdown-item summary{display:inline-flex;align-items:center;cursor:pointer}.bcm-breadcrumb__dropdown-item summary>span{display:inline-flex;align-items:center}.bcm-breadcrumb__dropdown-item summary::-webkit-details-marker{display:none}.bcm-breadcrumb__dropdown-item summary:focus{outline:none}.bcm-breadcrumb__dropdown-item summary.open bcm-link,.bcm-breadcrumb__dropdown-item summary.open bcm-icon{color:var(--bcm-color-prime-blue-6)}.bcm-breadcrumb__dropdown-item summary .down-icon{margin-left:4px}.bcm-breadcrumb__dropdown-submenu{position:absolute;min-width:140px;background-color:var(--bcm-color-grey-1);box-shadow:0px 4px 4px rgba(0, 0, 0, 0.25);margin-top:4px}.bcm-breadcrumb__dropdown-submenu .dropdown-item{display:flex;padding:4px 8px}.bcm-breadcrumb__dropdown-submenu .dropdown-item bcm-link{width:100%}";
|
|
@@ -7,10 +7,11 @@
|
|
|
7
7
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
8
8
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
|
-
const generate = require('./generate-
|
|
10
|
+
const generate = require('./generate-c6ed8219.js');
|
|
11
11
|
const bcm = require('./bcm-ab921827.js');
|
|
12
12
|
const index$1 = require('./index-fdbf5226.js');
|
|
13
13
|
const stringHelper = require('./string-helper-d681e5c7.js');
|
|
14
|
+
require('./package-de04912b.js');
|
|
14
15
|
require('./colors-e1d142ad.js');
|
|
15
16
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
16
17
|
|
|
@@ -9,13 +9,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
10
|
const index$1 = require('./index-fdbf5226.js');
|
|
11
11
|
const colorHelper = require('./color-helper-7ab15732.js');
|
|
12
|
-
const generate = require('./generate-
|
|
12
|
+
const generate = require('./generate-c6ed8219.js');
|
|
13
13
|
const stringHelper = require('./string-helper-d681e5c7.js');
|
|
14
14
|
const slotTemplate = require('./slot-template-d70ea082.js');
|
|
15
15
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
16
16
|
require('./colors-56282b00.js');
|
|
17
17
|
require('./utils-fc077139.js');
|
|
18
18
|
require('./colors-e1d142ad.js');
|
|
19
|
+
require('./package-de04912b.js');
|
|
19
20
|
require('./bcm-ab921827.js');
|
|
20
21
|
|
|
21
22
|
const cardCss = "@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}";
|
|
@@ -8,13 +8,14 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index$1 = require('./index-ddfd6d8f.js');
|
|
10
10
|
const index$2 = require('./index-fdbf5226.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-c6ed8219.js');
|
|
12
12
|
const bcm = require('./bcm-ab921827.js');
|
|
13
13
|
const utils = require('./utils-fc077139.js');
|
|
14
14
|
const index = require('./index-4506fcd7.js');
|
|
15
15
|
const labelTemplate = require('./label-template-4d5f99a5.js');
|
|
16
16
|
const isLoadDecorator = require('./is-load-decorator-137dded1.js');
|
|
17
17
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
18
|
+
require('./package-de04912b.js');
|
|
18
19
|
require('./colors-e1d142ad.js');
|
|
19
20
|
require('./slot-template-d70ea082.js');
|
|
20
21
|
require('./string-helper-d681e5c7.js');
|
|
@@ -8,10 +8,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
8
8
|
|
|
9
9
|
const index = require('./index-ddfd6d8f.js');
|
|
10
10
|
const index$1 = require('./index-fdbf5226.js');
|
|
11
|
-
const generate = require('./generate-
|
|
11
|
+
const generate = require('./generate-c6ed8219.js');
|
|
12
12
|
const bcm = require('./bcm-ab921827.js');
|
|
13
13
|
const utils = require('./utils-fc077139.js');
|
|
14
14
|
require('./_commonjsHelpers-bd20f4c0.js');
|
|
15
|
+
require('./package-de04912b.js');
|
|
15
16
|
require('./colors-e1d142ad.js');
|
|
16
17
|
|
|
17
18
|
const checkboxCss = "@import url(\"https://fonts.googleapis.com/css?family=Roboto:400,500\");@import url(\"https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap\"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:\"Inter\", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:\"\";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}";
|