bromcom-ui 2.11.1 → 2.11.2-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-81887469.entry.js → p-00c28e19.entry.js} +1 -1
- package/dist/bromcom-ui/{p-04068410.entry.js → p-0533a1b0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9810187e.entry.js → p-0a44db90.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a6142e74.entry.js → p-0cd4e8a1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2d3ff3b8.entry.js → p-195c1819.entry.js} +1 -1
- package/dist/bromcom-ui/{p-41e75c88.entry.js → p-19783732.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b4970f5.entry.js → p-1e5df686.entry.js} +1 -1
- package/dist/bromcom-ui/{p-08af4159.entry.js → p-2270e612.entry.js} +1 -1
- package/dist/bromcom-ui/{p-81cbc318.entry.js → p-34740cfd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-51b2e857.entry.js → p-350719ca.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0ed34855.entry.js → p-385a50b0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e377d82.js → p-3b38d001.js} +1 -1
- package/dist/bromcom-ui/{p-a5208f05.entry.js → p-3c04d0f7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-346395fa.entry.js → p-3e2fb868.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e3c69b3b.entry.js → p-44faabe9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7aff122.js → p-4757735e.js} +1 -1
- package/dist/bromcom-ui/{p-84b97f53.entry.js → p-4d5eb722.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bde67994.entry.js → p-50926f4c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f56f2a2d.entry.js → p-543457d1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-82f0b161.js → p-58ca54dc.js} +1 -1
- package/dist/bromcom-ui/{p-d098f115.entry.js → p-60dd2172.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cf011393.entry.js → p-6146d180.entry.js} +1 -1
- package/dist/bromcom-ui/p-62804f2c.entry.js +5 -0
- package/dist/bromcom-ui/{p-7005fb55.entry.js → p-666d9883.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dc62a5f7.entry.js → p-695d8d34.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b764ab86.entry.js → p-69c64256.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0bde4e71.entry.js → p-6c6beb41.entry.js} +1 -1
- package/dist/bromcom-ui/{p-950a341e.entry.js → p-6e961eb9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-06392358.entry.js → p-70c2412a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fe776e62.entry.js → p-7175c984.entry.js} +1 -1
- package/dist/bromcom-ui/{p-65ac7386.entry.js → p-7222a8db.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7c512c4d.entry.js → p-75e4f799.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b4da198b.entry.js → p-76f6db61.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c1761829.entry.js → p-79153d4a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aea1b034.entry.js → p-7b9e8f58.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7caf94d.js → p-80a43d63.js} +1 -1
- package/dist/bromcom-ui/{p-8a6fb2d5.entry.js → p-86384d20.entry.js} +1 -1
- package/dist/bromcom-ui/{p-24906295.entry.js → p-894c02ef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-82d01088.entry.js → p-8b00d553.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fcf4b343.entry.js → p-8b3eafe7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a34bc3d8.entry.js → p-9098db35.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d87846a.entry.js → p-a516049b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-857628f6.js → p-a62adacd.js} +1 -1
- package/dist/bromcom-ui/{p-4e44bab2.entry.js → p-aaf36d5c.entry.js} +1 -1
- package/dist/bromcom-ui/p-ab2dcd70.entry.js +5 -0
- package/dist/bromcom-ui/{p-e9333e52.entry.js → p-ad8d9e10.entry.js} +1 -1
- package/dist/bromcom-ui/p-b12c8235.js +5 -0
- package/dist/bromcom-ui/p-b2c6659a.entry.js +5 -0
- package/dist/bromcom-ui/{p-887c26f8.entry.js → p-b3f7b64d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-52a75efb.entry.js → p-b4755ed0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a1e299af.entry.js → p-b66e0388.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3861fc92.entry.js → p-b6e6027b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20b5c273.entry.js → p-b85fd5f4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3115008f.entry.js → p-c6b86846.entry.js} +1 -1
- package/dist/bromcom-ui/{p-19283acb.entry.js → p-cc449a87.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8ed054fe.js → p-ccbb5a6b.js} +1 -1
- package/dist/bromcom-ui/p-d43d75d2.entry.js +5 -0
- package/dist/bromcom-ui/{p-d9fcd150.js → p-d51f76b2.js} +1 -1
- package/dist/bromcom-ui/{p-375906b2.entry.js → p-ef4baf81.entry.js} +1 -1
- package/dist/bromcom-ui/{p-926f8ac4.entry.js → p-f2b520a4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ce3b34da.entry.js → p-f2e06aca.entry.js} +1 -1
- package/dist/bromcom-ui/{p-743731ac.js → p-f6169b46.js} +1 -1
- package/dist/bromcom-ui/{p-3f3579b5.entry.js → p-f7e70814.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5c70a918.entry.js → p-fc27c9ca.entry.js} +1 -1
- package/dist/cjs/bcm-accordion.cjs.entry.js +2 -2
- package/dist/cjs/bcm-alert.cjs.entry.js +2 -2
- package/dist/cjs/bcm-attendance-actions-comment.cjs.entry.js +4 -4
- package/dist/cjs/bcm-attendance-actions-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-attendance-actions.cjs.entry.js +4 -4
- package/dist/cjs/bcm-attendance.cjs.entry.js +2 -2
- package/dist/cjs/bcm-avatar_2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/bcm-button-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-button_15.cjs.entry.js +6 -6
- package/dist/cjs/bcm-caption.cjs.entry.js +4 -4
- package/dist/cjs/bcm-card.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-group.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox-lite_9.cjs.entry.js +2 -2
- package/dist/cjs/bcm-checkbox_2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-chip-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-chip.cjs.entry.js +2 -2
- package/dist/cjs/bcm-collapse.cjs.entry.js +2 -2
- package/dist/cjs/bcm-color-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-drawer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/bcm-expansion-panel.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-item.cjs.entry.js +2 -2
- package/dist/cjs/bcm-items.cjs.entry.js +2 -2
- package/dist/cjs/bcm-list_3.cjs.entry.js +7 -7
- package/dist/cjs/bcm-menu.cjs.entry.js +5 -5
- package/dist/cjs/bcm-modal-2-footer.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal-2.cjs.entry.js +4 -4
- package/dist/cjs/bcm-modal.cjs.entry.js +2 -2
- package/dist/cjs/bcm-number-input.cjs.entry.js +4 -4
- package/dist/cjs/bcm-popconfirm-box.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popconfirm.cjs.entry.js +2 -2
- package/dist/cjs/bcm-popover.cjs.entry.js +4 -4
- package/dist/cjs/bcm-progress.cjs.entry.js +2 -2
- package/dist/cjs/bcm-radio-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-radio.cjs.entry.js +4 -4
- package/dist/cjs/bcm-range.cjs.entry.js +2 -2
- package/dist/cjs/bcm-shortcut.cjs.entry.js +4 -4
- package/dist/cjs/bcm-skeleton.cjs.entry.js +4 -4
- package/dist/cjs/bcm-step.cjs.entry.js +3 -3
- package/dist/cjs/bcm-stepper.cjs.entry.js +5 -5
- package/dist/cjs/bcm-switch.cjs.entry.js +2 -2
- package/dist/cjs/bcm-tab-group.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tab-item-header.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tab-item.cjs.entry.js +4 -4
- package/dist/cjs/bcm-table.cjs.entry.js +4 -4
- package/dist/cjs/bcm-tag.cjs.entry.js +3 -3
- package/dist/cjs/bcm-textarea.cjs.entry.js +3 -3
- package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/{generate-82c63a56.js → generate-64f84d95.js} +1 -1
- package/dist/cjs/{global-1e13ce25.js → global-895f2946.js} +1 -1
- package/dist/cjs/{input-template-e0087a2b.js → input-template-9c106337.js} +1 -1
- package/dist/cjs/{json-parse-decarator-e0946e2e.js → json-parse-decarator-9db107be.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{number-helper-10017fcd.js → number-helper-f9323233.js} +1 -1
- package/dist/cjs/old-bcm-popover-box.cjs.entry.js +3 -3
- package/dist/cjs/old-bcm-popover.cjs.entry.js +2 -2
- package/dist/cjs/{package-13f78ab4.js → package-992c024f.js} +1 -1
- package/dist/cjs/{stepper-states-77438c3a.js → stepper-states-b3496b3f.js} +1 -1
- package/dist/cjs/{tooltip-helper-a2793290.js → tooltip-helper-cb99c02e.js} +3 -3
- package/dist/cjs/{validators-f4c3063b.js → validators-abb0434a.js} +1 -1
- package/dist/collection/components/organism/list/list.css +0 -1
- package/dist/components/generate.js +1 -1
- package/dist/components/list.js +1 -1
- package/dist/esm/bcm-accordion.entry.js +2 -2
- package/dist/esm/bcm-alert.entry.js +2 -2
- package/dist/esm/bcm-attendance-actions-comment.entry.js +4 -4
- package/dist/esm/bcm-attendance-actions-dropdown.entry.js +4 -4
- package/dist/esm/bcm-attendance-actions.entry.js +4 -4
- package/dist/esm/bcm-attendance.entry.js +2 -2
- package/dist/esm/bcm-avatar_2.entry.js +4 -4
- package/dist/esm/bcm-breadcrumb.entry.js +2 -2
- package/dist/esm/bcm-button-group.entry.js +2 -2
- package/dist/esm/bcm-button_15.entry.js +6 -6
- package/dist/esm/bcm-caption.entry.js +4 -4
- package/dist/esm/bcm-card.entry.js +2 -2
- package/dist/esm/bcm-checkbox-group.entry.js +2 -2
- package/dist/esm/bcm-checkbox-lite_9.entry.js +2 -2
- package/dist/esm/bcm-checkbox_2.entry.js +2 -2
- package/dist/esm/bcm-chip-group.entry.js +4 -4
- package/dist/esm/bcm-chip.entry.js +2 -2
- package/dist/esm/bcm-collapse.entry.js +2 -2
- package/dist/esm/bcm-color-input.entry.js +4 -4
- package/dist/esm/bcm-default.entry.js +2 -2
- package/dist/esm/bcm-drawer.entry.js +4 -4
- package/dist/esm/bcm-dropdown.entry.js +3 -3
- package/dist/esm/bcm-expansion-panel.entry.js +2 -2
- package/dist/esm/bcm-input-custom.entry.js +2 -2
- package/dist/esm/bcm-input-dropdown.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +2 -2
- package/dist/esm/bcm-items.entry.js +2 -2
- package/dist/esm/bcm-list_3.entry.js +7 -7
- package/dist/esm/bcm-menu.entry.js +5 -5
- package/dist/esm/bcm-modal-2-footer.entry.js +4 -4
- package/dist/esm/bcm-modal-2-header.entry.js +4 -4
- package/dist/esm/bcm-modal-2.entry.js +4 -4
- package/dist/esm/bcm-modal.entry.js +2 -2
- package/dist/esm/bcm-number-input.entry.js +4 -4
- package/dist/esm/bcm-popconfirm-box.entry.js +2 -2
- package/dist/esm/bcm-popconfirm.entry.js +2 -2
- package/dist/esm/bcm-popover.entry.js +4 -4
- package/dist/esm/bcm-progress.entry.js +2 -2
- package/dist/esm/bcm-radio-group.entry.js +4 -4
- package/dist/esm/bcm-radio.entry.js +4 -4
- package/dist/esm/bcm-range.entry.js +2 -2
- package/dist/esm/bcm-shortcut.entry.js +4 -4
- package/dist/esm/bcm-skeleton.entry.js +4 -4
- package/dist/esm/bcm-step.entry.js +3 -3
- package/dist/esm/bcm-stepper.entry.js +5 -5
- package/dist/esm/bcm-switch.entry.js +2 -2
- package/dist/esm/bcm-tab-group.entry.js +4 -4
- package/dist/esm/bcm-tab-item-header.entry.js +4 -4
- package/dist/esm/bcm-tab-item.entry.js +4 -4
- package/dist/esm/bcm-table.entry.js +4 -4
- package/dist/esm/bcm-tag.entry.js +3 -3
- package/dist/esm/bcm-textarea.entry.js +3 -3
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +2 -2
- package/dist/esm/{generate-b33f722f.js → generate-56856b63.js} +1 -1
- package/dist/esm/{global-d524a06a.js → global-c0272f2f.js} +1 -1
- package/dist/esm/{input-template-453bfff8.js → input-template-19a34625.js} +1 -1
- package/dist/esm/{json-parse-decarator-1aa4119c.js → json-parse-decarator-c9a132f1.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{number-helper-712eedd0.js → number-helper-0501b786.js} +1 -1
- package/dist/esm/old-bcm-popover-box.entry.js +3 -3
- package/dist/esm/old-bcm-popover.entry.js +2 -2
- package/dist/esm/{package-c604bd07.js → package-a9b6e2c6.js} +1 -1
- package/dist/esm/{stepper-states-00eb7d7d.js → stepper-states-a4b1efb3.js} +1 -1
- package/dist/esm/{tooltip-helper-088013ec.js → tooltip-helper-de7eb9a3.js} +3 -3
- package/dist/esm/{validators-ebf92486.js → validators-be951131.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-0f58e83a.js +0 -5
- package/dist/bromcom-ui/p-2e7107b8.entry.js +0 -5
- package/dist/bromcom-ui/p-5fbb4950.entry.js +0 -5
- package/dist/bromcom-ui/p-630a4d45.entry.js +0 -5
- package/dist/bromcom-ui/p-9b5c86e1.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{h as e,r as t,c as i,H as c,g as o}from"./p-170cf07d.js";import{I as n}from"./p-9850cbce.js";import{J as s}from"./p-1e377d82.js";import"./p-61753299.js";import{V as l}from"./p-857628f6.js";import{G as r,s as a}from"./p-743731ac.js";import{N as h}from"./p-0f58e83a.js";import{S as m}from"./p-a0d6d680.js";import"./p-7e44e6b5.js";import{g as b,s as d}from"./p-beaec5b8.js";import{p,d as u}from"./p-8c018ae0.js";import{B as x,a as _}from"./p-a313fba6.js";import{C as g}from"./p-09318a64.js";import{c as v}from"./p-e0ab7b38.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as f}from"./p-74e6d2b6.js";import{r as k,F as w,a as y}from"./p-b381e7f1.js";import{I as z}from"./p-c7caf94d.js";import"./p-436364c8.js";import"./p-3a43bf45.js";import"./p-6657830f.js";import"./p-8ed054fe.js";const I=({disabled:t,checked:i,readonly:c,required:o,indeterminate:n,hidden:s,captionType:l,_id:r})=>{const a=v("bcm-checkbox","bcm-checkbox__type-default","bcm-checkbox-size-medium",{error:l==x.Status.error,hidden:s,checked:i,disabled:t,required:o,readonly:c}),h=v("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+n,{"bcm-checkbox__label-icon-checked":i}),m=v("bcm-checkbox__label");return e("div",{class:a},e("input",{tabindex:"-1",id:r,type:"checkbox",checked:i,disabled:t,required:o,readonly:c}),e("label",{class:m,htmlFor:r},e("span",{class:h},e("bcm-icon",{icon:"far fa-check"}))))},C=({selected:t,total:i,found:c,multiple:o,variableText:n})=>(i=i||0,n=n?p(n,i):"items",e("footer",{class:"bcm-info-footer"},e("bcm-text",{scale:"size-1",color:"grey-8"},o&&t>0&&` ( ${t} selected ) `,` Total ${i} `,null!=c&&` / ${c} `,` ${n} found. `))),j=({item:t,treeview:i,highlight:c,checkboxes:o,size:n,selectedItem:s,openGroup:l,checkedItem:a,focusItem:h,searchIsOnlyChilds:b})=>{const d=t.items&&t.items.length>0;var p=m.htmlEntities(t.text);let u=[];if(c&&m.slugify(p).includes(m.slugify(c))&&(b&&(!b||d&&(i||"group"==t.type))||(p=m.highlight(p,c))),"group"!=t.type&&t.template){const e=t.template.replace(/\s/g,"").match(/\{{[^}}]+\}/g).map((e=>e.replace(/[{}]/g,""))),i=Object.keys(t.itemObject);u=e.filter((e=>i.includes(e)))}p=t.isHtmlContent?t.isHtmlContent:t.template&&u.length>0?m.templateParser(t.template,Object.assign(Object.assign({},t.itemObject),{text:p})):p;const x=t.template?p:r.domParser(p),_=!i&&"group"==t.type&&!t.clickable,g=t.disabled,f=t.readonly;return e("div",{id:t.id,hidden:t.hidden,"on-focus":e=>!_&&!g&&h(e),class:v("bcm-list__item","bcm-list__item-"+n,{"bcm-list__item--group":!i&&"group"==t.type,"bcm-list__item--readonly":f})},e("div",{class:v("bcm-list__item-content",!o&&t.selected&&"selected",{disabled:g,readonly:f})},i&&e("div",{class:"bcm-list__item-content-collapse-icon",onClick:()=>(t.open=t.isSearching,void l(t.id))},d&&e("bcm-icon",{icon:v("fas fa-caret-"+(t.isSearching||t.open?"down":"right"))})),e("div",{class:v("bcm-list__item-content-text",{treeview:i}),onClick:e=>{var i;((i=e).path||i.composedPath()).filter((e=>e.attributes&&e.attributes.getNamedItem("unlinked")))[0]||!_&&!g&&!f&&(o?a(t.id):s(t.id))}},o&&(i||!i&&"group"!=t.type)&&e("div",{class:"bcm-list__item-content-text-checkbox"},e(I,{indeterminate:t.indeterminate,checked:t.checked,disabled:t.disabled})),e("span",Object.assign({class:"bcm-list__item-content-text-inner"},t.title&&{title:t.title},{innerHTML:x})))),(i||!i&&"group"==t.type)&&d&&e("div",{class:"bcm-list__item-childs"},(t.isSearching||t.open||!i&&"group"==t.type)&&t.items.map((t=>e(j,{highlight:c,item:t,searchIsOnlyChilds:b,treeview:i,checkboxes:o,size:n,selectedItem:s,checkedItem:a,openGroup:e=>l(e),focusItem:e=>h(e)})))))},O=({highlight:t,selectAllItem:i,bcmListContainer:c,treeview:o,checkboxes:n,checkAll:s,infoFooter:l,value:r,totalData:a,searchFound:h,variableText:m,_id:b,tempId:d,data:p,width:u,height:x,size:_,searchPlaceholder:g,minSearchLength:v,selectedItem:f,openGroup:k,checkedItem:w,onScrollEvent:y,focusItem:z,items:I,searchable:O,searchIsOnlyChilds:$,emptyText:S,emptyIcon:E,handleTransitionEnd:T})=>{const F=!(o&&h>0||h>0);return e("div",{id:`bcm-list-${b}`,class:c,"temp-id":`bcm-list-${d}`,style:{"--height":x,"--width":u},onTransitionEnd:e=>T(e)},p&&O&&e("section",{class:"bcm-list__container-search"},e("bcm-search",{size:_,id:`bcm-list-${b}-search`,data:p,clearable:!0,placeholder:g,"min-search-length":v,searchIsOnlyChilds:$})),e("main",{onScroll:e=>y(e),class:"scrolling",style:{"overscroll-behavior":"none"}},e("div",{style:{"min-height":`${(null==h?o?I.length:a:h)*("small"===_?28:"medium"===_?36:48)||0}px`,"overscroll-behavior":"none",height:"100%",display:"flex","flex-direction":"column"}},s&&0!=h&&I&&I.length>0&&n&&F&&e("section",{class:"bcm-list__container-select-all"},e(j,{size:_,item:i,treeview:!1,checkboxes:!0,selectedItem:e=>f(e),checkedItem:e=>w(e),openGroup:e=>k(e),focusItem:e=>z(e)})),I.map((i=>e(j,{highlight:t,size:_,item:i,searchIsOnlyChilds:$,treeview:o,checkboxes:n,selectedItem:e=>f(e),checkedItem:e=>w(e),openGroup:e=>k(e),focusItem:e=>z(e)}))),(!I||0===I.length)&&0!=h&&e("section",{class:"bcm-list__container-no-data"},e("bcm-empty",{style:{height:"auto"},icon:E},e("span",{innerHTML:S||"No data"}))),0==h&&e("section",{class:"bcm-list__container-no-data"},e("bcm-empty",{style:{height:"auto"},icon:E},e("span",{innerHTML:S||"No Data Found"}))))),l&&p&&p.length>0&&e(C,{selected:null==r?void 0:r.length,total:a,found:h,multiple:n,variableText:m}))},{state:$}=f({value:new Map}),S=(e,t,i,c="0.")=>{let o=[];return e&&e.length>0&&(o=e.map(((e,o)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({itemObject:e},e),t),{parentId:a((()=>i),null),open:t.allOpen||e.open||!1}),(t.treeview||!t.treeview&&"group"==e.type)&&e.items&&e.items.length>0?{items:a((()=>S(e.items,t,e.id,`${c}${o}`)),[])}:{items:[]}),{ct:`${c}${o}`})))),o},E=e=>a((()=>$.value.get(e)),{}),T=(e,t)=>{let i=0;return e.forEach((e=>{(t||!t&&"group"!=e.type)&&(i+=1),(t||!t&&"group"==e.type)&&e.items&&(i+=T(e.items,t))})),i},F=(e,t,i,c)=>{let o;o=i||E(e).dataSource,o&&o.forEach((i=>{null!=c?i.open=c:i.id==t?(i.open=!i.open,i.isSearching=i.open,!i.open&&i.items&&F(e,t,i.items,!1)):i.items&&F(e,t,i.items)}))},R=(e,t,i)=>{i&&i.forEach((i=>{i.id==t?(i.checked=!1,i.itemObject.checked=!1,L(e,i.parentId)):i.items&&R(e,t,i.items)}))},D=(e,t)=>{P(e,t)},P=(e,t,i)=>{let c;t=Array.isArray(t)?t:[t],c=i||E(e).dataSource,c&&c.forEach((i=>{t.includes(i.id)?(N(e,i),i.parentId&&L(e,i.parentId)):i.items&&P(e,t,i.items)}))},N=(e,t,i)=>{const c=E(e);if(c){const o=c.options.treeview;t&&((o||!o&&"group"!=t.type)&&(t.disabled||(t.checked=null!=i?i:!t.checked,t.itemObject.checked=t.checked,t.indeterminate=t.checked?"determinate":"uncheck")),t.items&&t.items.forEach((c=>{N(e,c,null==i?t.checked:i)})))}},L=(e,t,i)=>{let c;c=i||E(e).dataSource,c&&c.forEach((i=>{if(i.id==t){let t=!0,c=!0;i.items&&i.items.map((e=>{(e.checked||"indeterminate"===e.indeterminate)&&(c=!1),!e.checked&&(t=!1)}));const o=t||c?t?"determinate":"uncheck":"indeterminate";i.indeterminate=o,i.checked="determinate"==o,i.itemObject.checked=i.checked,i.parentId&&L(e,i.parentId)}else i.items&&L(e,t,i.items)}))},A=(e,t,i,c)=>{let o,n=[],s=[];return E(e).isSearchOtherTag=c,o=i||E(e).dataSource,o&&o.forEach((i=>{if(t){var o;i.hidden=!0;for(let e=0;e<t.length;e++)if(t[e].id===i.id){o=t[e];break}if(o&&(i.hidden=!1,E(e).isSearchOtherTag||(i.isSearching=!0),s.push(i),i.checked&&n.push(i),o.items)){const{checkedItems:t,visibledItems:l}=A(e,o.items,i.items,c);t&&(n=[...new Set([...n,...t])]),l&&(s=[...new Set([...s,...l])])}}else i.hidden=!1,i.items&&A(e,null,i.items),s.push(i),i.isSearching=!1})),{checkedItems:null!=n?n:[],visibledItems:null!=s?s:[]}},V=(e,t)=>{let i,c=null;return i=t||E(e).dataSource,i&&i.forEach((t=>{if(t.selected)c=t.itemObject;else if(t.items){const i=V(e,t.items);i&&(c=i)}})),c},M=(e,t)=>{let i,c=[],o=[];return i=t||E(e).dataSource,i&&i.forEach((t=>{var i;const n=Object.assign(Object.assign({},t.itemObject),{ct:t.ct});let s=[],l=[];if(t.checked&&(c.push(n),l.push(Object.assign(Object.assign({},n),{items:[]}))),t.items){const o=M(e,t.items);(null===(i=null==o?void 0:o.checkedList)||void 0===i?void 0:i.length)>0&&(c=[...c,...o.checkedList]),o.nestedResult.length>0&&(s=o.nestedResult)}s.length>0?(0==l.length&&l.push(Object.assign(Object.assign({},n),{items:[]})),l[0].items=s,o.push(l[0])):l.length>0&&(l[0].items=s,o.push(l[0]))})),{checkedList:(null==c?void 0:c.length)>0?c:null,nestedResult:o}},G=(e,t,i)=>{let c,o=[];return c=i||E(e).dataSource,c&&c.forEach((i=>{if(t&&(i.id==t?(i.selected=!0,i.itemObject.selected=i.selected):i.selected&&(i.selected=!1,i.itemObject.selected=i.selected)),i.items){const c=G(e,t,i.items);(null==c?void 0:c.length)>0&&(o=[...o,...c])}i.selected&&o.push(i.itemObject)})),o&&o.length>0?o:null},B=(e,t)=>{let i;i=t||E(e).dataSource,i&&i.forEach((t=>{var i,c,o;t.checked&&(t.checked=!1),t.selected&&(t.selected=!1),t.indeterminate&&(t.indeterminate="uncheck"),(null===(i=t.itemObject)||void 0===i?void 0:i.checked)&&(t.itemObject.checked=!1),(null===(c=t.itemObject)||void 0===c?void 0:c.selected)&&(t.itemObject.selected=!1),(null===(o=t.itemObject)||void 0===o?void 0:o.indeterminate)&&(t.itemObject.indeterminate="uncheck"),t.items&&B(e,t.items)}))},H={setValue:e=>{const{id:t,dataSource:i,options:c}=e,{type:o,treeview:n,checkboxes:s,searchable:l,value:h,name:m,label:b,size:d,disabled:p,readonly:u,highlight:x,required:_,hidden:g,fullWidth:v,height:f,maxHeight:k,minHeight:w,width:y,infoFooter:z,variableText:I,template:C,allOpen:j,keyControl:O,checkAll:E,linkedComponent:F,placeholder:R,searchPlaceholder:D,searchIsOnlyChilds:P,clearable:N,caption:L,noCaption:A,captionType:V,captionError:M,placement:G}=c,B={size:d,checkboxes:s,template:C,allOpen:j,highlight:x,treeview:n},H={id:a((()=>t),r.UID),dataSource:i&&i.length>0&&S(i,B),options:{type:o,treeview:n,checkboxes:s,searchable:l,value:h,name:m,label:b,size:d,disabled:p,readonly:u,highlight:x,required:_,hidden:g,fullWidth:v,height:f,maxHeight:k,minHeight:w,width:y,infoFooter:z,variableText:I,template:C,allOpen:j,keyControl:O,checkAll:E,linkedComponent:F,placeholder:R,searchPlaceholder:D,searchIsOnlyChilds:P,clearable:N,caption:L,noCaption:A,captionType:V,captionError:M,placement:G},totalItems:(null==i?void 0:i.length)>0&&T(i,c.treeview),totalRoots:null==i?void 0:i.length};$.value.set(H.id,H)},removeValue:e=>{$.value.delete(e)},getValue:E,getData:e=>{let t=[];const i=E(e);if(i){const{dataSource:e}=i;t=e}return t},getDataPagination:(e,t=3,i)=>{let c=[];const o=E(e);if(o){const{dataSource:e}=o;c=i?e.filter((e=>i.indexOf(e.id)>-1)).slice(0,t):e.slice(0,t)}return c},openGroup:F,checkedItem:D,filterData:A,getSelected:V,getCheckedList:M,selectedItem:G,addChecked:(e,t)=>{E(e)&&t.forEach((t=>{D(e,t)}))},setClear:B,selectAll:(e,t)=>{const i=E(e).dataSource;i&&i.forEach((i=>{N(e,i,t)}))},removeOtherTags:(e,t,i)=>{let c;if(t=Array.isArray(t)?t:[t],i)c=i;else{const t=E(e);c=t.dataSource}c&&t.forEach((t=>{c.forEach((i=>{i.id==t?(i.checked=!1,i.itemObject.checked=!1):i.items&&R(e,t,i.items)}))}))},onRemoveItems:R,updateOptions:(e,t)=>{Object.keys(E(e).options).forEach((i=>{E(e).options[i]=t[i]}))},removeState:e=>Promise.resolve($.value.delete(e))};class q{constructor(e,t,i,c){this.elementName="",this.childElementName="",this.keyCode=e,this.element=t,this.elementName=i,this.childElementName=c}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 e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.nextElementSibling)||this.getFirstElement()}getPreviousElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.previousElementSibling)||this.getFirstElement()}getChildElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.querySelectorAll(this.getChildElementName())[0])||null}getParentElement(e){if(e&&e)return e&&e.attributes["data-isroot"]?e:this.getParentElement(e.parentNode)}focusElementIsOpen(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.classList.contains("bcm-list__item--open"))||!1}isRootElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.querySelectorAll(this.getChildElementName()).length)>0}isRootElementIsOpen(){return this.getFocusedElement().classList.contains("bcm-list__item--open")}getFocusedChildElement(){var e;return(null===(e=this.getChildElement())||void 0===e?void 0:e.querySelectorAll(".focused")[0])||null}isLastElement(){var e;return null===(null===(e=this.getFocusedElement())||void 0===e?void 0:e.nextElementSibling)}focusParentElementFirstChild(){var e,t;return this.setFocus(null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.firstChild)}isFirstElement(){var e;return null===(null===(e=this.getFocusedElement())||void 0===e?void 0:e.previousElementSibling)}focusRootElement(){var e,t,i;return this.setFocus(null===(i=null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.firstChild)}nextRootElement(){var e,t,i;return this.setFocus(null===(i=null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.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(e){e.focus()}}class W extends q{constructor(e,t,i,c){super(e,t,".bcm-list__item",".bcm-list__item-childs"),this.isTreeview=!1,this.isCheckBoxes=!1,this.isTreeview=i,this.isCheckBoxes=c}keyUpControl(){this.isTreeview?this.keyUpTreeview():this.isFirstElement()?this.setFocus(this.getLastElement()):this.setFocus(this.getPreviousElement())}keyDownTreeView(){var e;if(this.isTreeview)if(this.isRootElement()&&this.isRootElementIsOpen()){const e=this.getChildElement();e&&this.setFocus(e.firstChild)}else this.isLastElement()&&this.getParentElement(this.getFocusedElement())?this.setFocus(null===(e=this.getParentElement(this.getFocusedElement()))||void 0===e?void 0:e.nextElementSibling):this.setFocus(this.getNextElement())}keyUpTreeview(){if(this.isFirstElement()){const e=this.getParentElement(this.getFocusedElement());this.setFocus(e)}else{const e=this.getPreviousElement();if(e)if(e.classList.contains("bcm-list__item--open")){const t=e.querySelectorAll(this.getChildElementName())[0];console.log({getChildElement:t}),this.setFocus(t.lastChild)}else this.setFocus(e)}}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:e}=this.getFocusedElement();this.openGroup(e)}}keyLeftControl(){if(this.isTreeview&&this.isRootElementIsOpen()&&this.isRootElement()){const{id:e}=this.getFocusedElement();this.openGroup(e)}}keyEnterControl(){}keySpaceControl(){if(this.isCheckBoxes){const{id:e}=this.getFocusedElement();this.checkedItem(e)}}keyDown(){switch(this.getKeyCode()){case x.KeyCode.up:this.keyUpControl();break;case x.KeyCode.down:this.keyDownControl();break;case x.KeyCode.left:this.keyLeftControl();break;case x.KeyCode.right:this.keyRightControl();break;case x.KeyCode.enter:this.keyEnterControl();break;case x.KeyCode.space:this.keySpaceControl()}}keyUp(){}}var U=function(e,t,i,c){var o,n=arguments.length,s=n<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const K=class{constructor(e){t(this,e),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",3),this.close=i(this,"bcm-close",3),this.listClose=i(this,"bcm-list-close",7),this.listOpen=i(this,"bcm-list-open",7),this.debounce=null,this.debounceHandler=r.debounceInput((()=>this.listenResize()),300,!1),this._id=r.UID(),this.tempId=r.UID(),this.type=_.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=_.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.tooltip=void 0,this.infoFooter=!1,this.variableText="item",this.template=void 0,this.allOpen=!1,this.keyControl=!1,this.checkAll=!0,this.stopDeepClean=!1,this.openIntersecting=!1,this.linkedComponent=void 0,this.isOpen=!1,this.isOpenAnimation=!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=_.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:_.Status.default,indeterminate:"uncheck"},this.shouldTriggerChange=void 0,this.placement=_.Placement["bottom-start"],this.disableChangeEvent=!1,this.data=[],window.addEventListener("scroll",this.handleWheel.bind(this),!0),window.addEventListener("wheel",this.handleWheel.bind(this),!0),window.addEventListener("resize",this.handleResize.bind(this),!0)}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 e=document.querySelectorAll(`#bcm-list-${this._id}`);(null==e?void 0:e.length)>1&&e.forEach(((e,t)=>t>0&&e.remove()))}componentWillRender(){this.calculateLocation()}componentShouldUpdate(e,t,i){Object.keys(this.getOptions()).indexOf(i)>-1&&e!==t&&this.updateOptions()}get containerWidth(){var e,t;return null===(t=null===(e=this.el)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.width}get tagCount(){return this.containerWidth>0?Math.floor(+(this.containerWidth-100)/85):0}get tagData(){return a((()=>{var e;return null===(e=this.value)||void 0===e?void 0:e.map((e=>({value:e.id,label:m.textLimitter(e.text,7),text:e.tooltipMessage||e.tagTitle||r.domParser(e.text)})))}),[])}async componentDidLoad(){await this.initState()}disconnectedCallback(){if(this.isOpen=!1,!this.stopDeepClean&&(H.removeState(this._id),this.el.innerHTML="","select"==this.type||"autocomplete"==this.type||this.linkedComponent)){const e=document.querySelectorAll(`#bcm-list-${this._id}`);(null==e?void 0:e.length)&&(e.forEach((e=>e.remove())),this.el.remove())}}watchId(e,t){H.removeState(t),this.initState()}handleValueChange(e,t){var i,c;if(r.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes){if(!l.compareTwoArrayIsSame(e,t)&&(this.bcmChecklist.emit(this.value),!this.disableChangeEvent))if(this.shouldTriggerChange){const e=(null===(c=this.value)||void 0===c?void 0:c.length)?[...this.value].map((e=>Object.assign(Object.assign({},e),this.shouldTriggerChange&&{shouldTriggerChange:this.shouldTriggerChange}))):null;this.change.emit(e)}else this.change.emit(this.value)}else(null==e?void 0:e.id)!=(null==t?void 0:t.id)&&!this.disableChangeEvent&&this.change.emit(this.value?Object.assign(Object.assign({},this.value),this.shouldTriggerChange&&{shouldTriggerChange:this.shouldTriggerChange}):null)}watchReturnFilterData(e){var t;const{checkedItems:i,visibledItems:c}=e;i&&c?this.handleIndeterminate(i.length,c.length):this.handleIndeterminate((null===(t=this.value)||void 0===t?void 0:t.length)||0,this.totalData)}async handleOpen(){if(this.isOpen){if(this.detectClone(),"select"==this.type||"autocomplete"==this.type||this.linkedComponent){const e=this.el.querySelector(`#bcm-list-${this._id}`);e&&document.querySelector("#bcm-overlay-container").appendChild(e)}this.open.emit(),this.calculateLocation(),this.onSelectSearch(),await u(50),this.isOpenAnimation=!0}else this.isOpenAnimation=!1,this.listScrollToTop(),this.close.emit(),this.listClose.emit(),await u(100),this.unSelectOther()}listScrollToTop(){const e=document.querySelector(`#bcm-list-${this._id}`);e&&(e.querySelector(".scrolling").scrollTop=0)}async dataChanged(e,t){l.compareTwoArrayIsSame(e,t)||await this.initState()}isIntersecting(e){const t=null==e?void 0:e.target;t&&t.id===this._id&&this.listenResize()}handleSlotItems(e){var t;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.length)>0&&(this.data=e.detail)}handleChange(e){e.target.id==`bcm-list-input-tag-container-${this._id}-autocomplete-input`&&e.stopImmediatePropagation()}handleResize(){this.calculateLocation(),this.debounceHandler()}handleWheel(e){if(this.isOpen){const t=document.querySelector(`#bcm-list-${this._id}`);t&&r.findEventPath(e,t)?("select"==this.type||"autocomplete"==this.type||this.linkedComponent)&&this.calculateLocation():this.hide()}}clearAutocomplete(){if("autocomplete"==this.type){const e=this.getAutoCompleteInput();e&&e.handleClear(!1)}}async handleSelectOtherTag(e){if(this.disabled)return;const{id:t,checked:i}=e.detail;this.isSelectedOther=i,t&&(i?this.filterOtherList(t):this.unSelectOther(),this.isOpen=!0)}async handleDeleteTag(e){var t;if(this.disabled)return;const{id:i}=e.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===(t=this.value)||void 0===t?void 0:t.length)||0,this.totalData)}async handleSelectTag(e){this.disabled||(this.clearAutocomplete(),this.onSelectSearch(),this.unSelectOther())}handleClick(e){var t;if(this.disabled)return;const i=document.querySelector(`#bcm-list-${this._id}`),c=r.findEventPath(e,this.el)||i&&r.findEventPath(e,i);if(c&&(null!==this.debounce&&(e.preventDefault(),e.stopPropagation(),clearTimeout(this.debounce),this.debounce=null),this.debounce=setTimeout((()=>{this.debounce=null}),300)),!c&&"autocomplete"==this.type){const e=this.getAutoCompleteInput();e&&e.setValue(this.checkboxes?"":(null===(t=this.value)||void 0===t?void 0:t.text)||"")}const o=r.findEventPathWithKey(e,"className",["bcm-tag"]),n=r.findEventPathWithKey(e,"className",["bcm-tag bcm-tag--other"]),s=r.findEventPathWithKey(e,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),l=r.findEventPathWithKey(e,"className",["right close-button"]);s&&!l&&"autocomplete"!=this.type&&(this.isOpen=!(!o&&!n&&this.isOpen)),i&&this.isOpen&&(i.contains(e.target)||this.el.contains(e.target)||(this.isOpen=!1))}bcmOnSearchClear(e){var t,i;"autocomplete"==this.type&&((null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||e.detail&&this.setClear())}bcmOnSearch(e){var t,i,c,o,n,s;(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||(this.searchGetParents=a((()=>{var t;return null===(t=e.detail)||void 0===t?void 0:t.parentIndex}),null),this.searchResultLimit=10,this.searchFound=null!=(null===(c=e.detail)||void 0===c?void 0:c.matching)?null===(o=e.detail)||void 0===o?void 0:o.matching.length:null,this.returnFilterData=H.filterData(this._id,null===(n=e.detail)||void 0===n?void 0:n.nestedResult),this.searchFound>0&&this.highlight&&(this.highlightText=null===(s=e.detail)||void 0===s?void 0:s.value),"autocomplete"==this.type&&(this.isOpen=!0),e.detail.result||("autocomplete"==this.type?this.isOpen=!1:(this.returnFilterData={},H.filterData(this._id,null)),this.searchResultLimit=null,this.highlightText=null),this.markForCheck())}handleKeyDown(e){const t=e.keyCode||e.which;if(t===_.KeyCode.escape&&this.isOpen&&(this.isOpen=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()),this.keyControl){const e=new W(t,this.el,this.treeview,this.checkboxes);e.openGroup=e=>{this.openGroup(e)},e.checkedItem=e=>{this.checkedItem(e)},e.keyDown()}}handleKeyUp(e){if(this.keyControl&&r.findEventPath(e,this.el)){const e=document.getElementById(`bcm-list-${this._id}`);if(e){const t=e.querySelectorAll(".bcm-list__item.focused");if(t.length>0){const i=e.querySelector("main"),c=t[0].offsetHeight,o=i.offsetHeight,n=t[0].offsetTop;n>o&&(i.scrollTop=n-o/2+c/2),n<o&&(i.scrollTop=n-o/2-c/2)}}}}async set(e,t=!0){e?(this.shouldTriggerChange=t,Array.isArray(e)&&this.addChecked(e),"string"!=typeof e&&"number"!=typeof e||this.selectedItem(e)):this.setClear()}async get(){var e,t;return this.value?this.checkboxes?null===(t=null===(e=await this.getCheckedList())||void 0===e?void 0:e.checkedList)||void 0===t?void 0:t.map((e=>e.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 triggerChange(e){this.shouldTriggerChange=e}async addChecked(e=[],t=!1,i=!0){return e&&e.length>0&&(t||(H.setClear(this._id),await u(10)),await H.addChecked(this._id,e),await u(10),i&&(this.value=(await this.getCheckedList()).checkedList),this.markForCheck()),Promise.resolve(this.value)}async selected(e){return!!e&&Promise.resolve(await this.selectedItem(e))}async setClear(e){return H.setClear(this._id),this.value=null,this.inputText="",this.isOpen=!1,this.selectAllItem.indeterminate="uncheck",this.markForCheck(),e&&(e.stopPropagation(),e.preventDefault()),await u(10),Promise.resolve()}async resetCaption(){return await u(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await u(10),Promise.resolve()}detectClone(){const e=document.querySelectorAll(`#bcm-list-${this._id}`);e.length>0&&e.forEach((e=>{const t=e.getAttribute("temp-id");t!==`bcm-list-${this.tempId}`&&(console.warn(`[bcm-list] - Detected duplicate temp-id="${t}"`),e.remove())}))}async show(){return this.isOpen=!0,Promise.resolve()}async hide(){return this.isOpen=!1,Promise.resolve()}updateOptions(){H.updateOptions(this._id,this)}handleIndeterminate(e,t){this.selectAllItem=Object.assign(Object.assign({},this.selectAllItem),{indeterminate:this.checkboxes&&e>0?e===t?"check":"indeterminate":"uncheck",checked:!!(this.checkboxes&&e>0)&&e===t})}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 u(10),Promise.resolve()}async onClearSearch(){const e=document.getElementById(`bcm-list-${this._id}-search`);return e&&await e.handleClear(),Promise.resolve()}async onSelectSearch(){const e=document.getElementById(`bcm-list-${this._id}-search`);e&&(await u(100),e.onBcmFocus(),e.onBcmSelect())}async filterOtherList(e){const t=(await this.getCheckedList()).nestedResult,i=r.convertIdsToNestedData(e,t);this.returnFilterData=await H.filterData(this._id,i,null,!0),this.searchFound=(null==e?void 0:e.length)||0,this.limit=500,this.searchGetParents=null,await u(1e3),this.markForCheck()}async initState(){var e,t,i;this.onClearSearch(),await H.setValue({id:this._id,dataSource:this.data&&a((()=>"string"==typeof this.data?JSON.parse(this.data):this.data),[]),options:this});const{totalRoots:c,totalItems:o}=H.getValue(this._id);if(this.totalData=o,this.totalRootData=c,this.value=this.checkboxes?(await this.getCheckedList()).checkedList:H.selectedItem(this._id)?H.selectedItem(this._id)[0]:null,this.checkboxes||(this.inputText=r.domParser(null===(e=this.value)||void 0===e?void 0:e.text)||null),this.checkboxes&&(null===(t=this.value)||void 0===t?void 0:t.length)>0){const e=[];this.value.forEach((t=>{t.items&&0!==t.items.length||e.push(t.id)})),await this.addChecked(e,!1,!1)}await this.handleIndeterminate(null===(i=this.value)||void 0===i?void 0:i.length,this.totalData),await this.markForCheck()}async markForCheck(){await u(10),this.tick=r.UID()}getOptions(){return a((()=>H.getValue(this._id).options),{})}getItems(){return this.isSelectedOther?this.returnFilterData.checkedItems:a((()=>H.getData(this._id)),[])}getLimitedItems(e){return a((()=>H.getDataPagination(this._id,this.searchResultLimit||this.limit,e)),[])}openGroup(e){H.openGroup(this._id,e),this.markForCheck()}focusItem(e){if(e.target.classList.contains("bcm-list__item")){const t=e.target,i=document.getElementById(`bcm-list-${this._id}`);if(i&&i.querySelectorAll(".bcm-list__item").length>0){const e=i.querySelector(".bcm-list__item.focused");e&&e.classList.remove("focused"),t.classList.add("focused")}}}async selectedItem(e){var t;if(!this.checkboxes&&(this.value=H.selectedItem(this._id,e)?H.selectedItem(this._id,e)[0]:null,this.inputText=r.domParser(null===(t=this.value)||void 0===t?void 0:t.text)||null,this.isOpen=!1,this.markForCheck(),"autocomplete"==this.type&&this.value)){const e=this.getAutoCompleteInput();e&&setTimeout((()=>{var t;e.setValue((null===(t=this.value)||void 0===t?void 0:t.text)||""),this.isOpen=!1}),100)}return Promise.resolve(this.value)}async checkedItem(e){"select-all"===e?H.selectAll(this._id,!this.selectAllItem.checked):H.checkedItem(this._id,e),this.value=(await this.getCheckedList()).checkedList,this.changeVisibleCheckeds(),this.markForCheck()}changeVisibleCheckeds(){const{visibledItems:e}=this.returnFilterData;this.returnFilterData={visibledItems:e,checkedItems:e&&e.filter((e=>e.checked))||[]}}getAutoCompleteInput(){return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`)}dataScrollEvent(e){let t=0,i=new IntersectionObserver((e=>{0===t&&(t++,e[0].isIntersecting&&(this.limit+=15,this.searchResultLimit+=15,i.disconnect(),i=null))}),this.options);i.observe(e.target.lastElementChild)}async calculateLocation(){var e,t;if("select"==this.type||"autocomplete"==this.type||this.linkedComponent){const c=document.getElementById(`bcm-list-${this._id}`);var i=this.placement;const o=document.getElementById(this.linkedComponent?this.linkedComponent:`bcm-list-input-${this._id}`);if(c&&o){b(c,o,i,(e=>i=e)),await u(10);let n=d(i,o),s=0,l=0;if(this.linkedComponent){const i=document.getElementById(this.linkedComponent);if(i){if(!i.noCaption){const t=(null===(e=i.shadowRoot)||void 0===e?void 0:e.querySelector(".bcm-caption-area"))||i.querySelector(".bcm-caption-area");t&&(s=t.offsetHeight||t.clientHeight)}const c=(null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelector(".bcm-label"))||i.querySelector(".bcm-label");c&&(l=c.offsetHeight||c.clientHeight)}}c.style.width=this.fullWidth?o.offsetWidth+"px":this.width||"auto",c.style.height=this.height.indexOf("%")>-1?.01*h.toNumber(this.height)*window.innerHeight-n[0]-50+"px":this.height,c.style.minHeight=this.minHeight;const r="top"==i.split("-")[0]?window.innerHeight-(window.innerHeight-n[0])-50:window.innerHeight-n[0]-50;c.style.maxHeight=this.maxHeight.indexOf("%")>-1?.01*h.toNumber(this.maxHeight)*r+"px":h.toNumber(this.maxHeight)<r?this.maxHeight:r+"px",b(c,o,i,(e=>i=e)),await u(10),n=d(i,o),c.style.top=("top"==i.split("-")[0]?n[0]-c.offsetHeight+l:n[0]-s)+"px",c.style.left="end"==i.split("-")[1]?n[1]-c.offsetWidth+"px":n[1]+"px",c.classList.toggle("bcm-list--top","top"==i.split("-")[0]),this.calculatedViewport=!0}}}handleTransitionEnd(e){const{isOpen:t,type:i}=this;t&&"select"==i&&"transform"==(null==e?void 0:e.propertyName)&&this.listOpen.emit()}render(){const{checkboxes:t,treeview:i,label:o,size:n,disabled:s,readonly:l,required:r,hidden:a,fullWidth:h,searchable:m}=this.getOptions(),b=v("bcm-list",`bcm-list__size-${n}`,`bcm-list__${this.type}`,"large"===n?"size-3":"size-2",{error:this.captionType==_.Status.error,"full-width":h,"bcm-list__linked":this.linkedComponent,hidden:a,readonly:l,disabled:s}),d=v("bcm-list__container",this.linkedComponent?"bcm-list__type-linked-component":`bcm-list__type-${this.type}`,{"is-open":this.isOpen&&this.calculatedViewport,"is-open-animation":this.isOpenAnimation,error:this.captionType==_.Status.error,"full-width":h,hidden:a,readonly:l,disabled:s}),p=v("bcm-list__input"),u="select"==this.type||"autocomplete"==this.type||this.linkedComponent;return e(c,{class:b,tabindex:"0",style:{"--width":h?"100%":this.width,"--height":u?"100%":this.height,"--max-height":u?"inherit":this.maxHeight,"--min-height":u?"inherit":this.minHeight}},e("div",{id:`bcm-list-label-${this._id}`,class:"bcm-list__label"},o&&e("div",null,e("bcm-label",{tooltip:this.tooltip,size:this.size,type:this.captionType,value:o,required:r,htmlFor:this._id}))),"select"==this.type&&e("div",{id:`bcm-list-input-${this._id}`,class:p},e("span",{class:v("bcm-list__input-container",{"type-single":!t,"value-empty":!this.value})},this.checkboxes?this.value&&this.value.length>0?e("bcm-rc-overflow",{data:this.tagData,maxCount:this.tagCount}):e("span",{class:"bcm-list__input-placeholder"},this.placeholder):this.value?this.inputText:e("span",{class:"bcm-list__input-placeholder"},this.placeholder)),e("span",{class:v("bcm-list__input-buttons",{disabled:s})},this.clearable&&this.value&&e("div",{class:"bcm-list__input-buttons-button"},e("bcm-icon",{icon:"fal fa-times",onClick:e=>!s&&this.setClear(e)})),e("div",{class:`bcm-list__input-buttons-button caret-is ${this.isOpen&&this.calculatedViewport&&"caret-is-open"}`},e("bcm-icon",{icon:"far fa-angle-down"})))),"autocomplete"===this.type&&e("div",{id:`bcm-list-input-${this._id}`,class:v(p,{"bcm-list__input-autocomplete":"autocomplete"==this.type})},e("span",{class:"bcm-list__input-container",id:`bcm-list-input-tag-container-${this._id}`},this.checkboxes&&e("span",{class:"bcm-list__input-tag-container",id:`bcm-list-input-tag-container-${this._id}-autocomplete`}),e("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}))),e(O,{highlight:this.highlightText,searchable:"autocomplete"!=this.type&&m,bcmListContainer:d,checkboxes:t,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,tempId:this.tempId,checkAll:this.checkAll,data:this.getItems(),width:this.width,height:this.height,size:this.size,selectAllItem:this.selectAllItem,onScrollEvent:e=>this.dataScrollEvent(e),items:this.getLimitedItems(this.searchGetParents),selectedItem:e=>this.selectedItem(e),checkedItem:e=>this.checkedItem(e),openGroup:e=>this.openGroup(e),focusItem:e=>this.focusItem(e),emptyText:this.emptyText,emptyIcon:this.emptyIcon,handleTransitionEnd:e=>this.handleTransitionEnd(e)}),e(g,{noCaption:this.noCaption,captionType:this.captionType,captionError:this.captionError,caption:this.caption}))}get el(){return o(this)}static get watchers(){return{_id:["watchId"],value:["handleValueChange"],returnFilterData:["watchReturnFilterData"],isOpen:["handleOpen"],data:["dataChanged"]}}};U([n()],K.prototype,"el",void 0),U([s("data",!0)],K.prototype,"dataChanged",null),K.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:"";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}.bcm-list{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{scroll-behavior:smooth;padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{display:none;opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{transition:transform 50ms;display:flex}.bcm-list__container.bcm-list__type-linked-component.is-open-animation,.bcm-list__container.bcm-list__type-select.is-open-animation,.bcm-list__container.bcm-list__type-autocomplete.is-open-animation{opacity:1;transform:translateY(0);visibility:visible}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-700);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-400);background-color:var(--bcm-new-ds-color-slate-200);user-select:none;cursor:not-allowed}.bcm-list__item-content.readonly{color:var(--bcm-new-ds-color-slate-500);background-color:var(--bcm-new-ds-color-slate-100);cursor:default}.bcm-list__item-content.readonly .bcm-list__item-content-collapse-icon{color:var(--bcm-new-ds-color-slate-700);cursor:pointer}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled):not(.readonly){background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}';const J=class{constructor(e){t(this,e),this.selectOtherTag=i(this,"bcm-select-other-tag",7),this.selectTag=i(this,"bcm-select-tag",7),this.deleteTag=i(this,"bcm-delete-tag",7),this.renderItem=e=>k.createElement("bcm-tooltip",{placement:"bottom",message:e.text,trigger:"hover"},k.createElement("div",{id:e.value+"-tag",className:"bcm-tag",onClick:({target:t})=>this.onClickControl(t,e,!1)},k.createElement("span",{className:"bcm-tag__content dismissable"},k.createElement("div",{className:"value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap"},e.text),k.createElement("span",{className:"right close-button"},k.createElement("bcm-icon",{icon:"fa fa-times"}))))),this.renderRest=e=>{const t=(null==e?void 0:e.sort(((e,t)=>+e.ct-+t.ct)).slice(0,15).map((e=>m.textLimitter(e.text,40,!0))).toString().split(",").join("\r\n"))+(e.length>15?"\r\n...":"");return k.createElement("bcm-tooltip",{placement:"bottom",message:t,trigger:"hover"},k.createElement("div",{className:"bcm-tag bcm-tag--other",onClick:({target:t})=>this.onClickControl(t,e,!0)},k.createElement("span",{className:"bcm-tag__content dismissable "+(this.checked?"checkable checked":"")},k.createElement("span",{className:"value"},`+${null==e?void 0:e.length}`),k.createElement("span",{className:"right close-button"},k.createElement("bcm-icon",{icon:"fa fa-times"})))))},this._id=r.UID(),this.maxCount=1,this.data=[],this.checked=!1}isClickDismiss(e){return"BCM-ICON"===e["s-hn"]}onClickControl(e,t,i=!1){const c=this.isClickDismiss(e);c&&this.deleteTag.emit({id:Array.isArray(t)?t.map((e=>e.value)):t.value})&&this.checked&&(this.checked=!1),!i&&this.selectTag.emit({id:t.value})&&this.checked&&(this.checked=!1),i&&!c&&(this.checked=!this.checked,this.selectOtherTag.emit({id:null==t?void 0:t.map((e=>e.value)),checked:this.checked}))}componentWillRender(){const{data:e,renderItem:t,renderRest:i,maxCount:c}=this;this.overflowInstance=k.createElement(w,{data:e,renderItem:t,renderRest:i,maxCount:c}),y.render(this.overflowInstance,this.el)}get el(){return o(this)}};J.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}.rc-overflow{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%}.rc-overflow-item{transition:all 0.3s ease;padding:0 2px;display:flex;align-items:center;justify-content:center}';const{state:Y}=f({value:new Map}),Q=(e,t)=>{let i=[];return e&&(i=e.map((e=>Object.assign(Object.assign(Object.assign({},e),{parentId:a((()=>t),null)}),e.items&&e.items.length>0&&{items:a((()=>Q(e.items,e.id)),[])})))),i},X=e=>a((()=>Y.value.get(e)),{}),Z=(e,t,i)=>{let c=[],o=[],n=[],s=[];const{searchIsOnlyChilds:l}=X(e);return t&&t.length>0&&t.forEach((t=>{let r=l&&null!==t.parentId;if((t.text&&m.slugify(t.text).includes(m.slugify(i))||t.keywords&&m.slugify(t.keywords).includes(m.slugify(i)))&&(!l||l&&r)){if(n.push(t.id),c.push(t.id),o.push(t.id),s.push({id:t.id,text:t.text,parentId:t.parentId}),t.items&&t.items.length>0){const o=Z(e,t.items,i);o.matching.length>0&&o.matching.forEach((e=>{c.push(e)}))}}else if(t.items&&t.items.length>0){const l=Z(e,t.items,i);l.result.length>0&&(l.result.forEach((e=>{n.push(e)})),n.push(t.id),o.push(t.id),s.push({id:t.id,text:t.text,parentId:t.parentId,items:l.nestedResult})),l.matching.length>0&&c.push(...l.matching)}})),{result:n,matching:c,parentIndex:o,nestedResult:s}},ee=(e,t,i)=>{let c;c=i&&i.length>0?i:X(e).dataSource;let o=[];return c&&o.push(Z(e,c,t)),{result:a((()=>r.flatArray(o[0].result)),[]),matching:a((()=>o[0].matching),[]),parentIndex:a((()=>o[0].parentIndex),[]),nestedResult:a((()=>o[0].nestedResult),[])}},te=class{constructor(e){t(this,e),this.bcmOnSearch=i(this,"bcm-on-search",7),this.bcmOnSearchClear=i(this,"bcm-on-search-clear",7),this.debounceHandler=r.debounceInput((e=>this.onSearchValue(e,this)),300,!1,(()=>{var e,t;this.isActiveClearable=(null===(t=null===(e=this.inputElement)||void 0===e?void 0:e.value)||void 0===t?void 0:t.length)>0&&this.clearable})),this._id=r.UID(),this.placeholder="Search",this.disabled=!1,this.readonly=!1,this.clearable=!0,this.size=x.Size.medium,this.limit=10,this.searchIsOnlyChilds=!1,this.minSearchLength=2,this.data=[],this.tick={},this.isActiveClearable=!1}async componentDidLoad(){await this.initState()}async dataChanged(e,t){e!==t&&await this.initState()}async initState(){await(e=>{const{id:t,dataSource:i}=e,c={id:a((()=>t),r.UID),dataSource:i&&i.length>0&&Q(i),searchIsOnlyChilds:e.searchIsOnlyChilds};Y.value.set(c.id,c)})({id:this._id+"-input",dataSource:this.data,searchIsOnlyChilds:this.searchIsOnlyChilds}),await this.markForCheck()}markForCheck(){this.tick=r.UID()}handleInput(){}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async setValue(e){this.inputElement.value=e}handleFocus(){}handleBlur(){}handleChange(){}async handleClear(e=!0){this.inputElement.value="";const{value:t,id:i}=this.inputElement;return ee(i,t),this.isActiveClearable=!1,this.bcmOnSearch.emit({result:null,value:null,matching:null,parentIndex:null}),this.bcmOnSearchClear.emit(e),await u(10),Promise.resolve()}onSearchValue(e,t){const{value:i,id:c}=e.target,o=(null==i?void 0:i.length)>=this.minSearchLength?ee(c,i,null):null,{bcmOnSearch:n,inputElement:s}=t;n.emit({result:null==o?void 0:o.result,value:null==s?void 0:s.value,matching:null==o?void 0:o.matching,parentIndex:null==o?void 0:o.parentIndex,nestedResult:null==o?void 0:o.nestedResult})}render(){const{_id:t,placeholder:i,disabled:o,readonly:n}=this;return e(c,{onClick:()=>{this.onBcmFocus(),this.onBcmSelect()}},e(z,{size:this.size,id:t,type:"search",placeholder:i,disabled:o,"full-width":!0,readonly:n,clearable:this.isActiveClearable,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleClear:()=>this.handleClear(),handleInput:this.debounceHandler,ref:e=>this.inputElement=e}))}get el(){return o(this)}static get watchers(){return{data:["dataChanged"]}}};te.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{K as bcm_list,J as bcm_rc_overflow,te as bcm_search}
|
|
5
|
+
import{h as e,r as t,c as i,H as c,g as o}from"./p-170cf07d.js";import{I as n}from"./p-9850cbce.js";import{J as s}from"./p-3b38d001.js";import"./p-61753299.js";import{V as l}from"./p-a62adacd.js";import{G as a,s as r}from"./p-f6169b46.js";import{N as h}from"./p-b12c8235.js";import{S as m}from"./p-a0d6d680.js";import"./p-7e44e6b5.js";import{g as b,s as d}from"./p-beaec5b8.js";import{p,d as u}from"./p-8c018ae0.js";import{B as x,a as _}from"./p-a313fba6.js";import{C as g}from"./p-09318a64.js";import{c as v}from"./p-e0ab7b38.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as f}from"./p-74e6d2b6.js";import{r as k,F as w,a as y}from"./p-b381e7f1.js";import{I as z}from"./p-80a43d63.js";import"./p-436364c8.js";import"./p-3a43bf45.js";import"./p-6657830f.js";import"./p-ccbb5a6b.js";const I=({disabled:t,checked:i,readonly:c,required:o,indeterminate:n,hidden:s,captionType:l,_id:a})=>{const r=v("bcm-checkbox","bcm-checkbox__type-default","bcm-checkbox-size-medium",{error:l==x.Status.error,hidden:s,checked:i,disabled:t,required:o,readonly:c}),h=v("bcm-checkbox__label-icon","bcm-checkbox__label-icon-lite","bcm-checkbox__label-icon-"+n,{"bcm-checkbox__label-icon-checked":i}),m=v("bcm-checkbox__label");return e("div",{class:r},e("input",{tabindex:"-1",id:a,type:"checkbox",checked:i,disabled:t,required:o,readonly:c}),e("label",{class:m,htmlFor:a},e("span",{class:h},e("bcm-icon",{icon:"far fa-check"}))))},C=({selected:t,total:i,found:c,multiple:o,variableText:n})=>(i=i||0,n=n?p(n,i):"items",e("footer",{class:"bcm-info-footer"},e("bcm-text",{scale:"size-1",color:"grey-8"},o&&t>0&&` ( ${t} selected ) `,` Total ${i} `,null!=c&&` / ${c} `,` ${n} found. `))),j=({item:t,treeview:i,highlight:c,checkboxes:o,size:n,selectedItem:s,openGroup:l,checkedItem:r,focusItem:h,searchIsOnlyChilds:b})=>{const d=t.items&&t.items.length>0;var p=m.htmlEntities(t.text);let u=[];if(c&&m.slugify(p).includes(m.slugify(c))&&(b&&(!b||d&&(i||"group"==t.type))||(p=m.highlight(p,c))),"group"!=t.type&&t.template){const e=t.template.replace(/\s/g,"").match(/\{{[^}}]+\}/g).map((e=>e.replace(/[{}]/g,""))),i=Object.keys(t.itemObject);u=e.filter((e=>i.includes(e)))}p=t.isHtmlContent?t.isHtmlContent:t.template&&u.length>0?m.templateParser(t.template,Object.assign(Object.assign({},t.itemObject),{text:p})):p;const x=t.template?p:a.domParser(p),_=!i&&"group"==t.type&&!t.clickable,g=t.disabled,f=t.readonly;return e("div",{id:t.id,hidden:t.hidden,"on-focus":e=>!_&&!g&&h(e),class:v("bcm-list__item","bcm-list__item-"+n,{"bcm-list__item--group":!i&&"group"==t.type,"bcm-list__item--readonly":f})},e("div",{class:v("bcm-list__item-content",!o&&t.selected&&"selected",{disabled:g,readonly:f})},i&&e("div",{class:"bcm-list__item-content-collapse-icon",onClick:()=>(t.open=t.isSearching,void l(t.id))},d&&e("bcm-icon",{icon:v("fas fa-caret-"+(t.isSearching||t.open?"down":"right"))})),e("div",{class:v("bcm-list__item-content-text",{treeview:i}),onClick:e=>{var i;((i=e).path||i.composedPath()).filter((e=>e.attributes&&e.attributes.getNamedItem("unlinked")))[0]||!_&&!g&&!f&&(o?r(t.id):s(t.id))}},o&&(i||!i&&"group"!=t.type)&&e("div",{class:"bcm-list__item-content-text-checkbox"},e(I,{indeterminate:t.indeterminate,checked:t.checked,disabled:t.disabled})),e("span",Object.assign({class:"bcm-list__item-content-text-inner"},t.title&&{title:t.title},{innerHTML:x})))),(i||!i&&"group"==t.type)&&d&&e("div",{class:"bcm-list__item-childs"},(t.isSearching||t.open||!i&&"group"==t.type)&&t.items.map((t=>e(j,{highlight:c,item:t,searchIsOnlyChilds:b,treeview:i,checkboxes:o,size:n,selectedItem:s,checkedItem:r,openGroup:e=>l(e),focusItem:e=>h(e)})))))},O=({highlight:t,selectAllItem:i,bcmListContainer:c,treeview:o,checkboxes:n,checkAll:s,infoFooter:l,value:a,totalData:r,searchFound:h,variableText:m,_id:b,tempId:d,data:p,width:u,height:x,size:_,searchPlaceholder:g,minSearchLength:v,selectedItem:f,openGroup:k,checkedItem:w,onScrollEvent:y,focusItem:z,items:I,searchable:O,searchIsOnlyChilds:$,emptyText:S,emptyIcon:E,handleTransitionEnd:T})=>{const F=!(o&&h>0||h>0);return e("div",{id:`bcm-list-${b}`,class:c,"temp-id":`bcm-list-${d}`,style:{"--height":x,"--width":u},onTransitionEnd:e=>T(e)},p&&O&&e("section",{class:"bcm-list__container-search"},e("bcm-search",{size:_,id:`bcm-list-${b}-search`,data:p,clearable:!0,placeholder:g,"min-search-length":v,searchIsOnlyChilds:$})),e("main",{onScroll:e=>y(e),class:"scrolling",style:{"overscroll-behavior":"none"}},e("div",{style:{"min-height":`${(null==h?o?I.length:r:h)*("small"===_?28:"medium"===_?36:48)||0}px`,"overscroll-behavior":"none",height:"100%",display:"flex","flex-direction":"column"}},s&&0!=h&&I&&I.length>0&&n&&F&&e("section",{class:"bcm-list__container-select-all"},e(j,{size:_,item:i,treeview:!1,checkboxes:!0,selectedItem:e=>f(e),checkedItem:e=>w(e),openGroup:e=>k(e),focusItem:e=>z(e)})),I.map((i=>e(j,{highlight:t,size:_,item:i,searchIsOnlyChilds:$,treeview:o,checkboxes:n,selectedItem:e=>f(e),checkedItem:e=>w(e),openGroup:e=>k(e),focusItem:e=>z(e)}))),(!I||0===I.length)&&0!=h&&e("section",{class:"bcm-list__container-no-data"},e("bcm-empty",{style:{height:"auto"},icon:E},e("span",{innerHTML:S||"No data"}))),0==h&&e("section",{class:"bcm-list__container-no-data"},e("bcm-empty",{style:{height:"auto"},icon:E},e("span",{innerHTML:S||"No Data Found"}))))),l&&p&&p.length>0&&e(C,{selected:null==a?void 0:a.length,total:r,found:h,multiple:n,variableText:m}))},{state:$}=f({value:new Map}),S=(e,t,i,c="0.")=>{let o=[];return e&&e.length>0&&(o=e.map(((e,o)=>Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({itemObject:e},e),t),{parentId:r((()=>i),null),open:t.allOpen||e.open||!1}),(t.treeview||!t.treeview&&"group"==e.type)&&e.items&&e.items.length>0?{items:r((()=>S(e.items,t,e.id,`${c}${o}`)),[])}:{items:[]}),{ct:`${c}${o}`})))),o},E=e=>r((()=>$.value.get(e)),{}),T=(e,t)=>{let i=0;return e.forEach((e=>{(t||!t&&"group"!=e.type)&&(i+=1),(t||!t&&"group"==e.type)&&e.items&&(i+=T(e.items,t))})),i},F=(e,t,i,c)=>{let o;o=i||E(e).dataSource,o&&o.forEach((i=>{null!=c?i.open=c:i.id==t?(i.open=!i.open,i.isSearching=i.open,!i.open&&i.items&&F(e,t,i.items,!1)):i.items&&F(e,t,i.items)}))},R=(e,t,i)=>{i&&i.forEach((i=>{i.id==t?(i.checked=!1,i.itemObject.checked=!1,L(e,i.parentId)):i.items&&R(e,t,i.items)}))},D=(e,t)=>{P(e,t)},P=(e,t,i)=>{let c;t=Array.isArray(t)?t:[t],c=i||E(e).dataSource,c&&c.forEach((i=>{t.includes(i.id)?(N(e,i),i.parentId&&L(e,i.parentId)):i.items&&P(e,t,i.items)}))},N=(e,t,i)=>{const c=E(e);if(c){const o=c.options.treeview;t&&((o||!o&&"group"!=t.type)&&(t.disabled||(t.checked=null!=i?i:!t.checked,t.itemObject.checked=t.checked,t.indeterminate=t.checked?"determinate":"uncheck")),t.items&&t.items.forEach((c=>{N(e,c,null==i?t.checked:i)})))}},L=(e,t,i)=>{let c;c=i||E(e).dataSource,c&&c.forEach((i=>{if(i.id==t){let t=!0,c=!0;i.items&&i.items.map((e=>{(e.checked||"indeterminate"===e.indeterminate)&&(c=!1),!e.checked&&(t=!1)}));const o=t||c?t?"determinate":"uncheck":"indeterminate";i.indeterminate=o,i.checked="determinate"==o,i.itemObject.checked=i.checked,i.parentId&&L(e,i.parentId)}else i.items&&L(e,t,i.items)}))},A=(e,t,i,c)=>{let o,n=[],s=[];return E(e).isSearchOtherTag=c,o=i||E(e).dataSource,o&&o.forEach((i=>{if(t){var o;i.hidden=!0;for(let e=0;e<t.length;e++)if(t[e].id===i.id){o=t[e];break}if(o&&(i.hidden=!1,E(e).isSearchOtherTag||(i.isSearching=!0),s.push(i),i.checked&&n.push(i),o.items)){const{checkedItems:t,visibledItems:l}=A(e,o.items,i.items,c);t&&(n=[...new Set([...n,...t])]),l&&(s=[...new Set([...s,...l])])}}else i.hidden=!1,i.items&&A(e,null,i.items),s.push(i),i.isSearching=!1})),{checkedItems:null!=n?n:[],visibledItems:null!=s?s:[]}},V=(e,t)=>{let i,c=null;return i=t||E(e).dataSource,i&&i.forEach((t=>{if(t.selected)c=t.itemObject;else if(t.items){const i=V(e,t.items);i&&(c=i)}})),c},M=(e,t)=>{let i,c=[],o=[];return i=t||E(e).dataSource,i&&i.forEach((t=>{var i;const n=Object.assign(Object.assign({},t.itemObject),{ct:t.ct});let s=[],l=[];if(t.checked&&(c.push(n),l.push(Object.assign(Object.assign({},n),{items:[]}))),t.items){const o=M(e,t.items);(null===(i=null==o?void 0:o.checkedList)||void 0===i?void 0:i.length)>0&&(c=[...c,...o.checkedList]),o.nestedResult.length>0&&(s=o.nestedResult)}s.length>0?(0==l.length&&l.push(Object.assign(Object.assign({},n),{items:[]})),l[0].items=s,o.push(l[0])):l.length>0&&(l[0].items=s,o.push(l[0]))})),{checkedList:(null==c?void 0:c.length)>0?c:null,nestedResult:o}},G=(e,t,i)=>{let c,o=[];return c=i||E(e).dataSource,c&&c.forEach((i=>{if(t&&(i.id==t?(i.selected=!0,i.itemObject.selected=i.selected):i.selected&&(i.selected=!1,i.itemObject.selected=i.selected)),i.items){const c=G(e,t,i.items);(null==c?void 0:c.length)>0&&(o=[...o,...c])}i.selected&&o.push(i.itemObject)})),o&&o.length>0?o:null},B=(e,t)=>{let i;i=t||E(e).dataSource,i&&i.forEach((t=>{var i,c,o;t.checked&&(t.checked=!1),t.selected&&(t.selected=!1),t.indeterminate&&(t.indeterminate="uncheck"),(null===(i=t.itemObject)||void 0===i?void 0:i.checked)&&(t.itemObject.checked=!1),(null===(c=t.itemObject)||void 0===c?void 0:c.selected)&&(t.itemObject.selected=!1),(null===(o=t.itemObject)||void 0===o?void 0:o.indeterminate)&&(t.itemObject.indeterminate="uncheck"),t.items&&B(e,t.items)}))},H={setValue:e=>{const{id:t,dataSource:i,options:c}=e,{type:o,treeview:n,checkboxes:s,searchable:l,value:h,name:m,label:b,size:d,disabled:p,readonly:u,highlight:x,required:_,hidden:g,fullWidth:v,height:f,maxHeight:k,minHeight:w,width:y,infoFooter:z,variableText:I,template:C,allOpen:j,keyControl:O,checkAll:E,linkedComponent:F,placeholder:R,searchPlaceholder:D,searchIsOnlyChilds:P,clearable:N,caption:L,noCaption:A,captionType:V,captionError:M,placement:G}=c,B={size:d,checkboxes:s,template:C,allOpen:j,highlight:x,treeview:n},H={id:r((()=>t),a.UID),dataSource:i&&i.length>0&&S(i,B),options:{type:o,treeview:n,checkboxes:s,searchable:l,value:h,name:m,label:b,size:d,disabled:p,readonly:u,highlight:x,required:_,hidden:g,fullWidth:v,height:f,maxHeight:k,minHeight:w,width:y,infoFooter:z,variableText:I,template:C,allOpen:j,keyControl:O,checkAll:E,linkedComponent:F,placeholder:R,searchPlaceholder:D,searchIsOnlyChilds:P,clearable:N,caption:L,noCaption:A,captionType:V,captionError:M,placement:G},totalItems:(null==i?void 0:i.length)>0&&T(i,c.treeview),totalRoots:null==i?void 0:i.length};$.value.set(H.id,H)},removeValue:e=>{$.value.delete(e)},getValue:E,getData:e=>{let t=[];const i=E(e);if(i){const{dataSource:e}=i;t=e}return t},getDataPagination:(e,t=3,i)=>{let c=[];const o=E(e);if(o){const{dataSource:e}=o;c=i?e.filter((e=>i.indexOf(e.id)>-1)).slice(0,t):e.slice(0,t)}return c},openGroup:F,checkedItem:D,filterData:A,getSelected:V,getCheckedList:M,selectedItem:G,addChecked:(e,t)=>{E(e)&&t.forEach((t=>{D(e,t)}))},setClear:B,selectAll:(e,t)=>{const i=E(e).dataSource;i&&i.forEach((i=>{N(e,i,t)}))},removeOtherTags:(e,t,i)=>{let c;if(t=Array.isArray(t)?t:[t],i)c=i;else{const t=E(e);c=t.dataSource}c&&t.forEach((t=>{c.forEach((i=>{i.id==t?(i.checked=!1,i.itemObject.checked=!1):i.items&&R(e,t,i.items)}))}))},onRemoveItems:R,updateOptions:(e,t)=>{Object.keys(E(e).options).forEach((i=>{E(e).options[i]=t[i]}))},removeState:e=>Promise.resolve($.value.delete(e))};class q{constructor(e,t,i,c){this.elementName="",this.childElementName="",this.keyCode=e,this.element=t,this.elementName=i,this.childElementName=c}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 e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.nextElementSibling)||this.getFirstElement()}getPreviousElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.previousElementSibling)||this.getFirstElement()}getChildElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.querySelectorAll(this.getChildElementName())[0])||null}getParentElement(e){if(e&&e)return e&&e.attributes["data-isroot"]?e:this.getParentElement(e.parentNode)}focusElementIsOpen(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.classList.contains("bcm-list__item--open"))||!1}isRootElement(){var e;return(null===(e=this.getFocusedElement())||void 0===e?void 0:e.querySelectorAll(this.getChildElementName()).length)>0}isRootElementIsOpen(){return this.getFocusedElement().classList.contains("bcm-list__item--open")}getFocusedChildElement(){var e;return(null===(e=this.getChildElement())||void 0===e?void 0:e.querySelectorAll(".focused")[0])||null}isLastElement(){var e;return null===(null===(e=this.getFocusedElement())||void 0===e?void 0:e.nextElementSibling)}focusParentElementFirstChild(){var e,t;return this.setFocus(null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.firstChild)}isFirstElement(){var e;return null===(null===(e=this.getFocusedElement())||void 0===e?void 0:e.previousElementSibling)}focusRootElement(){var e,t,i;return this.setFocus(null===(i=null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.parentElement)||void 0===i?void 0:i.firstChild)}nextRootElement(){var e,t,i;return this.setFocus(null===(i=null===(t=null===(e=this.getFocusedElement())||void 0===e?void 0:e.parentElement)||void 0===t?void 0:t.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(e){e.focus()}}class W extends q{constructor(e,t,i,c){super(e,t,".bcm-list__item",".bcm-list__item-childs"),this.isTreeview=!1,this.isCheckBoxes=!1,this.isTreeview=i,this.isCheckBoxes=c}keyUpControl(){this.isTreeview?this.keyUpTreeview():this.isFirstElement()?this.setFocus(this.getLastElement()):this.setFocus(this.getPreviousElement())}keyDownTreeView(){var e;if(this.isTreeview)if(this.isRootElement()&&this.isRootElementIsOpen()){const e=this.getChildElement();e&&this.setFocus(e.firstChild)}else this.isLastElement()&&this.getParentElement(this.getFocusedElement())?this.setFocus(null===(e=this.getParentElement(this.getFocusedElement()))||void 0===e?void 0:e.nextElementSibling):this.setFocus(this.getNextElement())}keyUpTreeview(){if(this.isFirstElement()){const e=this.getParentElement(this.getFocusedElement());this.setFocus(e)}else{const e=this.getPreviousElement();if(e)if(e.classList.contains("bcm-list__item--open")){const t=e.querySelectorAll(this.getChildElementName())[0];console.log({getChildElement:t}),this.setFocus(t.lastChild)}else this.setFocus(e)}}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:e}=this.getFocusedElement();this.openGroup(e)}}keyLeftControl(){if(this.isTreeview&&this.isRootElementIsOpen()&&this.isRootElement()){const{id:e}=this.getFocusedElement();this.openGroup(e)}}keyEnterControl(){}keySpaceControl(){if(this.isCheckBoxes){const{id:e}=this.getFocusedElement();this.checkedItem(e)}}keyDown(){switch(this.getKeyCode()){case x.KeyCode.up:this.keyUpControl();break;case x.KeyCode.down:this.keyDownControl();break;case x.KeyCode.left:this.keyLeftControl();break;case x.KeyCode.right:this.keyRightControl();break;case x.KeyCode.enter:this.keyEnterControl();break;case x.KeyCode.space:this.keySpaceControl()}}keyUp(){}}var U=function(e,t,i,c){var o,n=arguments.length,s=n<3?t:null===c?c=Object.getOwnPropertyDescriptor(t,i):c;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,c);else for(var l=e.length-1;l>=0;l--)(o=e[l])&&(s=(n<3?o(s):n>3?o(t,i,s):o(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s};const K=class{constructor(e){t(this,e),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",3),this.close=i(this,"bcm-close",3),this.listClose=i(this,"bcm-list-close",7),this.listOpen=i(this,"bcm-list-open",7),this.debounce=null,this.debounceHandler=a.debounceInput((()=>this.listenResize()),300,!1),this._id=a.UID(),this.tempId=a.UID(),this.type=_.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=_.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.tooltip=void 0,this.infoFooter=!1,this.variableText="item",this.template=void 0,this.allOpen=!1,this.keyControl=!1,this.checkAll=!0,this.stopDeepClean=!1,this.openIntersecting=!1,this.linkedComponent=void 0,this.isOpen=!1,this.isOpenAnimation=!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=_.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:_.Status.default,indeterminate:"uncheck"},this.shouldTriggerChange=void 0,this.placement=_.Placement["bottom-start"],this.disableChangeEvent=!1,this.data=[],window.addEventListener("scroll",this.handleWheel.bind(this),!0),window.addEventListener("wheel",this.handleWheel.bind(this),!0),window.addEventListener("resize",this.handleResize.bind(this),!0)}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 e=document.querySelectorAll(`#bcm-list-${this._id}`);(null==e?void 0:e.length)>1&&e.forEach(((e,t)=>t>0&&e.remove()))}componentWillRender(){this.calculateLocation()}componentShouldUpdate(e,t,i){Object.keys(this.getOptions()).indexOf(i)>-1&&e!==t&&this.updateOptions()}get containerWidth(){var e,t;return null===(t=null===(e=this.el)||void 0===e?void 0:e.getBoundingClientRect())||void 0===t?void 0:t.width}get tagCount(){return this.containerWidth>0?Math.floor(+(this.containerWidth-100)/85):0}get tagData(){return r((()=>{var e;return null===(e=this.value)||void 0===e?void 0:e.map((e=>({value:e.id,label:m.textLimitter(e.text,7),text:e.tooltipMessage||e.tagTitle||a.domParser(e.text)})))}),[])}async componentDidLoad(){await this.initState()}disconnectedCallback(){if(this.isOpen=!1,!this.stopDeepClean&&(H.removeState(this._id),this.el.innerHTML="","select"==this.type||"autocomplete"==this.type||this.linkedComponent)){const e=document.querySelectorAll(`#bcm-list-${this._id}`);(null==e?void 0:e.length)&&(e.forEach((e=>e.remove())),this.el.remove())}}watchId(e,t){H.removeState(t),this.initState()}handleValueChange(e,t){var i,c;if(a.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes){if(!l.compareTwoArrayIsSame(e,t)&&(this.bcmChecklist.emit(this.value),!this.disableChangeEvent))if(this.shouldTriggerChange){const e=(null===(c=this.value)||void 0===c?void 0:c.length)?[...this.value].map((e=>Object.assign(Object.assign({},e),this.shouldTriggerChange&&{shouldTriggerChange:this.shouldTriggerChange}))):null;this.change.emit(e)}else this.change.emit(this.value)}else(null==e?void 0:e.id)!=(null==t?void 0:t.id)&&!this.disableChangeEvent&&this.change.emit(this.value?Object.assign(Object.assign({},this.value),this.shouldTriggerChange&&{shouldTriggerChange:this.shouldTriggerChange}):null)}watchReturnFilterData(e){var t;const{checkedItems:i,visibledItems:c}=e;i&&c?this.handleIndeterminate(i.length,c.length):this.handleIndeterminate((null===(t=this.value)||void 0===t?void 0:t.length)||0,this.totalData)}async handleOpen(){if(this.isOpen){if(this.detectClone(),"select"==this.type||"autocomplete"==this.type||this.linkedComponent){const e=this.el.querySelector(`#bcm-list-${this._id}`);e&&document.querySelector("#bcm-overlay-container").appendChild(e)}this.open.emit(),this.calculateLocation(),this.onSelectSearch(),await u(50),this.isOpenAnimation=!0}else this.isOpenAnimation=!1,this.listScrollToTop(),this.close.emit(),this.listClose.emit(),await u(100),this.unSelectOther()}listScrollToTop(){const e=document.querySelector(`#bcm-list-${this._id}`);e&&(e.querySelector(".scrolling").scrollTop=0)}async dataChanged(e,t){l.compareTwoArrayIsSame(e,t)||await this.initState()}isIntersecting(e){const t=null==e?void 0:e.target;t&&t.id===this._id&&this.listenResize()}handleSlotItems(e){var t;(null===(t=null==e?void 0:e.detail)||void 0===t?void 0:t.length)>0&&(this.data=e.detail)}handleChange(e){e.target.id==`bcm-list-input-tag-container-${this._id}-autocomplete-input`&&e.stopImmediatePropagation()}handleResize(){this.calculateLocation(),this.debounceHandler()}handleWheel(e){if(this.isOpen){const t=document.querySelector(`#bcm-list-${this._id}`);t&&a.findEventPath(e,t)?("select"==this.type||"autocomplete"==this.type||this.linkedComponent)&&this.calculateLocation():this.hide()}}clearAutocomplete(){if("autocomplete"==this.type){const e=this.getAutoCompleteInput();e&&e.handleClear(!1)}}async handleSelectOtherTag(e){if(this.disabled)return;const{id:t,checked:i}=e.detail;this.isSelectedOther=i,t&&(i?this.filterOtherList(t):this.unSelectOther(),this.isOpen=!0)}async handleDeleteTag(e){var t;if(this.disabled)return;const{id:i}=e.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===(t=this.value)||void 0===t?void 0:t.length)||0,this.totalData)}async handleSelectTag(e){this.disabled||(this.clearAutocomplete(),this.onSelectSearch(),this.unSelectOther())}handleClick(e){var t;if(this.disabled)return;const i=document.querySelector(`#bcm-list-${this._id}`),c=a.findEventPath(e,this.el)||i&&a.findEventPath(e,i);if(c&&(null!==this.debounce&&(e.preventDefault(),e.stopPropagation(),clearTimeout(this.debounce),this.debounce=null),this.debounce=setTimeout((()=>{this.debounce=null}),300)),!c&&"autocomplete"==this.type){const e=this.getAutoCompleteInput();e&&e.setValue(this.checkboxes?"":(null===(t=this.value)||void 0===t?void 0:t.text)||"")}const o=a.findEventPathWithKey(e,"className",["bcm-tag"]),n=a.findEventPathWithKey(e,"className",["bcm-tag bcm-tag--other"]),s=a.findEventPathWithKey(e,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),l=a.findEventPathWithKey(e,"className",["right close-button"]);s&&!l&&"autocomplete"!=this.type&&(this.isOpen=!(!o&&!n&&this.isOpen)),i&&this.isOpen&&(i.contains(e.target)||this.el.contains(e.target)||(this.isOpen=!1))}bcmOnSearchClear(e){var t,i;"autocomplete"==this.type&&((null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||e.detail&&this.setClear())}bcmOnSearch(e){var t,i,c,o,n,s;(null===(t=null==e?void 0:e.target)||void 0===t?void 0:t.id)!==`bcm-list-${this._id}-search`&&(null===(i=null==e?void 0:e.target)||void 0===i?void 0:i.id)!==`bcm-list-input-tag-container-${this._id}-autocomplete-input`||(this.searchGetParents=r((()=>{var t;return null===(t=e.detail)||void 0===t?void 0:t.parentIndex}),null),this.searchResultLimit=10,this.searchFound=null!=(null===(c=e.detail)||void 0===c?void 0:c.matching)?null===(o=e.detail)||void 0===o?void 0:o.matching.length:null,this.returnFilterData=H.filterData(this._id,null===(n=e.detail)||void 0===n?void 0:n.nestedResult),this.searchFound>0&&this.highlight&&(this.highlightText=null===(s=e.detail)||void 0===s?void 0:s.value),"autocomplete"==this.type&&(this.isOpen=!0),e.detail.result||("autocomplete"==this.type?this.isOpen=!1:(this.returnFilterData={},H.filterData(this._id,null)),this.searchResultLimit=null,this.highlightText=null),this.markForCheck())}handleKeyDown(e){const t=e.keyCode||e.which;if(t===_.KeyCode.escape&&this.isOpen&&(this.isOpen=!1,e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation()),this.keyControl){const e=new W(t,this.el,this.treeview,this.checkboxes);e.openGroup=e=>{this.openGroup(e)},e.checkedItem=e=>{this.checkedItem(e)},e.keyDown()}}handleKeyUp(e){if(this.keyControl&&a.findEventPath(e,this.el)){const e=document.getElementById(`bcm-list-${this._id}`);if(e){const t=e.querySelectorAll(".bcm-list__item.focused");if(t.length>0){const i=e.querySelector("main"),c=t[0].offsetHeight,o=i.offsetHeight,n=t[0].offsetTop;n>o&&(i.scrollTop=n-o/2+c/2),n<o&&(i.scrollTop=n-o/2-c/2)}}}}async set(e,t=!0){e?(this.shouldTriggerChange=t,Array.isArray(e)&&this.addChecked(e),"string"!=typeof e&&"number"!=typeof e||this.selectedItem(e)):this.setClear()}async get(){var e,t;return this.value?this.checkboxes?null===(t=null===(e=await this.getCheckedList())||void 0===e?void 0:e.checkedList)||void 0===t?void 0:t.map((e=>e.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 triggerChange(e){this.shouldTriggerChange=e}async addChecked(e=[],t=!1,i=!0){return e&&e.length>0&&(t||(H.setClear(this._id),await u(10)),await H.addChecked(this._id,e),await u(10),i&&(this.value=(await this.getCheckedList()).checkedList),this.markForCheck()),Promise.resolve(this.value)}async selected(e){return!!e&&Promise.resolve(await this.selectedItem(e))}async setClear(e){return H.setClear(this._id),this.value=null,this.inputText="",this.isOpen=!1,this.selectAllItem.indeterminate="uncheck",this.markForCheck(),e&&(e.stopPropagation(),e.preventDefault()),await u(10),Promise.resolve()}async resetCaption(){return await u(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await u(10),Promise.resolve()}detectClone(){const e=document.querySelectorAll(`#bcm-list-${this._id}`);e.length>0&&e.forEach((e=>{const t=e.getAttribute("temp-id");t!==`bcm-list-${this.tempId}`&&(console.warn(`[bcm-list] - Detected duplicate temp-id="${t}"`),e.remove())}))}async show(){return this.isOpen=!0,Promise.resolve()}async hide(){return this.isOpen=!1,Promise.resolve()}updateOptions(){H.updateOptions(this._id,this)}handleIndeterminate(e,t){this.selectAllItem=Object.assign(Object.assign({},this.selectAllItem),{indeterminate:this.checkboxes&&e>0?e===t?"check":"indeterminate":"uncheck",checked:!!(this.checkboxes&&e>0)&&e===t})}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 u(10),Promise.resolve()}async onClearSearch(){const e=document.getElementById(`bcm-list-${this._id}-search`);return e&&await e.handleClear(),Promise.resolve()}async onSelectSearch(){const e=document.getElementById(`bcm-list-${this._id}-search`);e&&(await u(100),e.onBcmFocus(),e.onBcmSelect())}async filterOtherList(e){const t=(await this.getCheckedList()).nestedResult,i=a.convertIdsToNestedData(e,t);this.returnFilterData=await H.filterData(this._id,i,null,!0),this.searchFound=(null==e?void 0:e.length)||0,this.limit=500,this.searchGetParents=null,await u(1e3),this.markForCheck()}async initState(){var e,t,i;this.onClearSearch(),await H.setValue({id:this._id,dataSource:this.data&&r((()=>"string"==typeof this.data?JSON.parse(this.data):this.data),[]),options:this});const{totalRoots:c,totalItems:o}=H.getValue(this._id);if(this.totalData=o,this.totalRootData=c,this.value=this.checkboxes?(await this.getCheckedList()).checkedList:H.selectedItem(this._id)?H.selectedItem(this._id)[0]:null,this.checkboxes||(this.inputText=a.domParser(null===(e=this.value)||void 0===e?void 0:e.text)||null),this.checkboxes&&(null===(t=this.value)||void 0===t?void 0:t.length)>0){const e=[];this.value.forEach((t=>{t.items&&0!==t.items.length||e.push(t.id)})),await this.addChecked(e,!1,!1)}await this.handleIndeterminate(null===(i=this.value)||void 0===i?void 0:i.length,this.totalData),await this.markForCheck()}async markForCheck(){await u(10),this.tick=a.UID()}getOptions(){return r((()=>H.getValue(this._id).options),{})}getItems(){return this.isSelectedOther?this.returnFilterData.checkedItems:r((()=>H.getData(this._id)),[])}getLimitedItems(e){return r((()=>H.getDataPagination(this._id,this.searchResultLimit||this.limit,e)),[])}openGroup(e){H.openGroup(this._id,e),this.markForCheck()}focusItem(e){if(e.target.classList.contains("bcm-list__item")){const t=e.target,i=document.getElementById(`bcm-list-${this._id}`);if(i&&i.querySelectorAll(".bcm-list__item").length>0){const e=i.querySelector(".bcm-list__item.focused");e&&e.classList.remove("focused"),t.classList.add("focused")}}}async selectedItem(e){var t;if(!this.checkboxes&&(this.value=H.selectedItem(this._id,e)?H.selectedItem(this._id,e)[0]:null,this.inputText=a.domParser(null===(t=this.value)||void 0===t?void 0:t.text)||null,this.isOpen=!1,this.markForCheck(),"autocomplete"==this.type&&this.value)){const e=this.getAutoCompleteInput();e&&setTimeout((()=>{var t;e.setValue((null===(t=this.value)||void 0===t?void 0:t.text)||""),this.isOpen=!1}),100)}return Promise.resolve(this.value)}async checkedItem(e){"select-all"===e?H.selectAll(this._id,!this.selectAllItem.checked):H.checkedItem(this._id,e),this.value=(await this.getCheckedList()).checkedList,this.changeVisibleCheckeds(),this.markForCheck()}changeVisibleCheckeds(){const{visibledItems:e}=this.returnFilterData;this.returnFilterData={visibledItems:e,checkedItems:e&&e.filter((e=>e.checked))||[]}}getAutoCompleteInput(){return document.getElementById(`bcm-list-input-tag-container-${this._id}-autocomplete-input`)}dataScrollEvent(e){let t=0,i=new IntersectionObserver((e=>{0===t&&(t++,e[0].isIntersecting&&(this.limit+=15,this.searchResultLimit+=15,i.disconnect(),i=null))}),this.options);i.observe(e.target.lastElementChild)}async calculateLocation(){var e,t;if("select"==this.type||"autocomplete"==this.type||this.linkedComponent){const c=document.getElementById(`bcm-list-${this._id}`);var i=this.placement;const o=document.getElementById(this.linkedComponent?this.linkedComponent:`bcm-list-input-${this._id}`);if(c&&o){b(c,o,i,(e=>i=e)),await u(10);let n=d(i,o),s=0,l=0;if(this.linkedComponent){const i=document.getElementById(this.linkedComponent);if(i){if(!i.noCaption){const t=(null===(e=i.shadowRoot)||void 0===e?void 0:e.querySelector(".bcm-caption-area"))||i.querySelector(".bcm-caption-area");t&&(s=t.offsetHeight||t.clientHeight)}const c=(null===(t=i.shadowRoot)||void 0===t?void 0:t.querySelector(".bcm-label"))||i.querySelector(".bcm-label");c&&(l=c.offsetHeight||c.clientHeight)}}c.style.width=this.fullWidth?o.offsetWidth+"px":this.width||"auto",c.style.height=this.height.indexOf("%")>-1?.01*h.toNumber(this.height)*window.innerHeight-n[0]-50+"px":this.height,c.style.minHeight=this.minHeight;const a="top"==i.split("-")[0]?window.innerHeight-(window.innerHeight-n[0])-50:window.innerHeight-n[0]-50;c.style.maxHeight=this.maxHeight.indexOf("%")>-1?.01*h.toNumber(this.maxHeight)*a+"px":h.toNumber(this.maxHeight)<a?this.maxHeight:a+"px",b(c,o,i,(e=>i=e)),await u(10),n=d(i,o),c.style.top=("top"==i.split("-")[0]?n[0]-c.offsetHeight+l:n[0]-s)+"px",c.style.left="end"==i.split("-")[1]?n[1]-c.offsetWidth+"px":n[1]+"px",c.classList.toggle("bcm-list--top","top"==i.split("-")[0]),this.calculatedViewport=!0}}}handleTransitionEnd(e){const{isOpen:t,type:i}=this;t&&"select"==i&&"transform"==(null==e?void 0:e.propertyName)&&this.listOpen.emit()}render(){const{checkboxes:t,treeview:i,label:o,size:n,disabled:s,readonly:l,required:a,hidden:r,fullWidth:h,searchable:m}=this.getOptions(),b=v("bcm-list",`bcm-list__size-${n}`,`bcm-list__${this.type}`,"large"===n?"size-3":"size-2",{error:this.captionType==_.Status.error,"full-width":h,"bcm-list__linked":this.linkedComponent,hidden:r,readonly:l,disabled:s}),d=v("bcm-list__container",this.linkedComponent?"bcm-list__type-linked-component":`bcm-list__type-${this.type}`,{"is-open":this.isOpen&&this.calculatedViewport,"is-open-animation":this.isOpenAnimation,error:this.captionType==_.Status.error,"full-width":h,hidden:r,readonly:l,disabled:s}),p=v("bcm-list__input"),u="select"==this.type||"autocomplete"==this.type||this.linkedComponent;return e(c,{class:b,tabindex:"0",style:{"--width":h?"100%":this.width,"--height":u?"100%":this.height,"--max-height":u?"inherit":this.maxHeight,"--min-height":u?"inherit":this.minHeight}},e("div",{id:`bcm-list-label-${this._id}`,class:"bcm-list__label"},o&&e("div",null,e("bcm-label",{tooltip:this.tooltip,size:this.size,type:this.captionType,value:o,required:a,htmlFor:this._id}))),"select"==this.type&&e("div",{id:`bcm-list-input-${this._id}`,class:p},e("span",{class:v("bcm-list__input-container",{"type-single":!t,"value-empty":!this.value})},this.checkboxes?this.value&&this.value.length>0?e("bcm-rc-overflow",{data:this.tagData,maxCount:this.tagCount}):e("span",{class:"bcm-list__input-placeholder"},this.placeholder):this.value?this.inputText:e("span",{class:"bcm-list__input-placeholder"},this.placeholder)),e("span",{class:v("bcm-list__input-buttons",{disabled:s})},this.clearable&&this.value&&e("div",{class:"bcm-list__input-buttons-button"},e("bcm-icon",{icon:"fal fa-times",onClick:e=>!s&&this.setClear(e)})),e("div",{class:`bcm-list__input-buttons-button caret-is ${this.isOpen&&this.calculatedViewport&&"caret-is-open"}`},e("bcm-icon",{icon:"far fa-angle-down"})))),"autocomplete"===this.type&&e("div",{id:`bcm-list-input-${this._id}`,class:v(p,{"bcm-list__input-autocomplete":"autocomplete"==this.type})},e("span",{class:"bcm-list__input-container",id:`bcm-list-input-tag-container-${this._id}`},this.checkboxes&&e("span",{class:"bcm-list__input-tag-container",id:`bcm-list-input-tag-container-${this._id}-autocomplete`}),e("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}))),e(O,{highlight:this.highlightText,searchable:"autocomplete"!=this.type&&m,bcmListContainer:d,checkboxes:t,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,tempId:this.tempId,checkAll:this.checkAll,data:this.getItems(),width:this.width,height:this.height,size:this.size,selectAllItem:this.selectAllItem,onScrollEvent:e=>this.dataScrollEvent(e),items:this.getLimitedItems(this.searchGetParents),selectedItem:e=>this.selectedItem(e),checkedItem:e=>this.checkedItem(e),openGroup:e=>this.openGroup(e),focusItem:e=>this.focusItem(e),emptyText:this.emptyText,emptyIcon:this.emptyIcon,handleTransitionEnd:e=>this.handleTransitionEnd(e)}),e(g,{noCaption:this.noCaption,captionType:this.captionType,captionError:this.captionError,caption:this.caption}))}get el(){return o(this)}static get watchers(){return{_id:["watchId"],value:["handleValueChange"],returnFilterData:["watchReturnFilterData"],isOpen:["handleOpen"],data:["dataChanged"]}}};U([n()],K.prototype,"el",void 0),U([s("data",!0)],K.prototype,"dataChanged",null),K.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"); @import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}*{box-sizing:border-box}.bcm-checkbox{outline:none;border:none;--bcm-checkbox-primary-color-default:var(--bcm-new-ds-color-blue-500);--bcm-checkbox-secondary-color-default:var(--bcm-new-ds-color-white);--bcm-checkbox-primary-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-checkbox-secondary-color-hover:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-checkbox-secondary-color-focus-visible:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-active:var(--bcm-new-ds-color-blue-700);--bcm-checkbox-secondary-color-active:var(--bcm-new-ds-color-slate-50);--bcm-checkbox-primary-color-disabled:var(--bcm-new-ds-color-slate-300);--bcm-checkbox-secondary-color-disabled:var(--bcm-new-ds-color-slate-200);display:inline-flex;width:fit-content;flex-direction:column;margin-bottom:8px}.bcm-checkbox:focus,.bcm-checkbox:hover,.bcm-checkbox:active{outline:none;border:none}.bcm-checkbox *{box-sizing:border-box}.bcm-checkbox input[type=radio],.bcm-checkbox input[type=checkbox]{-webkit-appearance:none;appearance:none;background-color:#fff;margin:0;display:none}.bcm-checkbox__input{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap;padding-top:4px}.bcm-checkbox.hidden{display:none}.bcm-checkbox :hover{cursor:pointer}.bcm-checkbox[disabled] :hover,.bcm-checkbox.disabled :hover{cursor:not-allowed}.bcm-checkbox .slot{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;font-weight:500;color:var(--bcm-new-ds-color-slate-600)}.bcm-checkbox .slot:not(:empty){margin-left:8px;margin-right:8px}.bcm-checkbox-size-small .slot{font-size:12px;line-height:calc(12px + 8px);margin-top:-2.5px}.bcm-checkbox-size-small .bcm-checkbox__input{min-height:calc(24px - 4px)}.bcm-checkbox-size-small .bcm-checkbox__label-icon{width:14px;height:14px;min-width:14px;font-size:calc(10px - 2px)}.bcm-checkbox-size-medium .slot{font-size:calc(12px + 1px);line-height:calc(12px + 8px);margin-top:-1.5px}.bcm-checkbox-size-medium .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-medium .bcm-checkbox__label-icon{width:16px;height:16px;min-width:16px;font-size:10px}.bcm-checkbox-size-large .slot{font-size:16px;line-height:calc(16px + 8px);margin-top:-1.5px}.bcm-checkbox-size-large .bcm-checkbox__input{min-height:calc(32px - 4px)}.bcm-checkbox-size-large .bcm-checkbox__label-icon{width:18px;height:18px;min-width:18px;font-size:12px}.bcm-checkbox__label{display:flex;flex-direction:row;align-items:flex-start;justify-content:flex-start;flex-wrap:nowrap}.bcm-checkbox__label-icon{display:flex;flex-direction:column;align-items:center;justify-content:center;flex-wrap:nowrap;border-width:1px;border-style:solid;border-radius:2px}.bcm-checkbox__label-icon-indeterminate{position:relative}.bcm-checkbox__label-icon-indeterminate:after{content:"";display:block;position:absolute;width:70%;height:1.5px;background:var(--bcm-new-ds-color-white)}.bcm-checkbox__label-icon.bcm-radio__icon{width:16px;height:16px;box-sizing:border-box;border-radius:100px}.bcm-checkbox__label-icon.bcm-radio__icon .bcm-radio__icon-inner{width:10px;height:10px;border-radius:100px;background-color:var(--bcm-new-ds-color-white)}.bcm-checkbox .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-default);color:var(--bcm-checkbox-secondary-color-default);border-color:var(--bcm-new-ds-color-slate-300)}.bcm-checkbox .bcm-checkbox__label-icon-checked,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-default);border-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-default);background-color:var(--bcm-checkbox-secondary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-default)}.bcm-checkbox:hover .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-hover);color:var(--bcm-checkbox-secondary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-hover);border-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-hover);background-color:var(--bcm-checkbox-secondary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:hover .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-hover)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-focus-visible);color:var(--bcm-checkbox-secondary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-focus-visible);border-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-focus-visible);background-color:var(--bcm-checkbox-secondary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:focus-visible .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-focus-visible)}.bcm-checkbox:active .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-active);color:var(--bcm-checkbox-secondary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-active);border-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-active);background-color:var(--bcm-checkbox-secondary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox:active .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-active)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon{background:var(--bcm-checkbox-secondary-color-disabled);color:var(--bcm-checkbox-secondary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-checkbox-primary-color-disabled);border-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon{border-color:var(--bcm-checkbox-primary-color-disabled);background-color:var(--bcm-checkbox-secondary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-checked.bcm-radio__icon .bcm-radio__icon-inner,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate.bcm-radio__icon .bcm-radio__icon-inner{background-color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[disabled] .bcm-checkbox__label-icon-indeterminate,.bcm-checkbox.disabled .bcm-checkbox__label-icon-indeterminate{color:var(--bcm-checkbox-primary-color-disabled)}.bcm-checkbox[no-margin] .bcm-checkbox__input{margin:0;min-height:0;padding:0}.bcm-list{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;--width:256px;--height:256px;--max-height:inherit;--min-height:inherit;min-width:90px;display:flex;flex-direction:column;margin:0 0 8px 0}.bcm-list__listbox .bcm-list__container{height:var(--height);max-height:var(--max-height);min-height:var(--min-height)}.bcm-list.full-width{width:100%}.bcm-list__size-small .bcm-list__input{height:24px;font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-small .bcm-list__input .bcm-tag__content.dismissable{font-size:10px;line-height:calc(10px + 8px)}.bcm-list__size-medium .bcm-list__input{height:32px;font-size:14px;line-height:calc(14px + 8px)}.bcm-list__size-medium .bcm-list__input .bcm-tag__content.dismissable{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__size-large .bcm-list__input{height:40px;font-size:16px;line-height:calc(16px + 8px)}.bcm-list__size-large .bcm-list__input .bcm-tag__content.dismissable{font-size:14px;line-height:calc(14px + 8px)}.bcm-list:hover{outline:none}.bcm-list:hover .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-500);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list:focus-visible{outline:none}.bcm-list:focus-visible .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);background-color:var(--bcm-new-ds-color-white)}.bcm-list:active{outline:none}.bcm-list:active .bcm-list__input{border-color:var(--bcm-new-ds-color-blue-600);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list__container{--width:256px;--height:256px;width:var(--width);height:var(--height);background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;padding-top:8px;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;gap:4px}.bcm-list__container main{padding:0 8px;flex:1;overflow:auto;display:flex;flex-direction:column}.bcm-list__container-search{margin:0 8px}.bcm-list__container-search:after{margin:4px 0}.bcm-list__container-no-data{flex:1;display:flex;justify-content:stretch;align-items:stretch;padding-bottom:4px}.bcm-list__container.error{border-color:var(--bcm-color-red-6)}.bcm-list__container.full-width{width:100%}.bcm-list__container.bcm-list__type-linked-component,.bcm-list__container.bcm-list__type-select,.bcm-list__container.bcm-list__type-autocomplete{display:none;opacity:0;visibility:hidden;position:absolute;top:0;left:0;height:0;width:0;transform:translateY(10%);z-index:10800}.bcm-list__container.bcm-list__type-linked-component.is-open,.bcm-list__container.bcm-list__type-select.is-open,.bcm-list__container.bcm-list__type-autocomplete.is-open{transition:transform 50ms;display:flex}.bcm-list__container.bcm-list__type-linked-component.is-open-animation,.bcm-list__container.bcm-list__type-select.is-open-animation,.bcm-list__container.bcm-list__type-autocomplete.is-open-animation{opacity:1;transform:translateY(0);visibility:visible}.bcm-list__container.bcm-list__type-linked-component{margin-top:2px}.bcm-list__label{line-height:1}.bcm-list__input{display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-white);user-select:none;cursor:pointer;padding:0 8px;height:32px;overflow:hidden;position:relative;transition:background-color 100ms, border-color 100ms}.bcm-list__input-spinner{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:center;align-items:center;background-color:var(--bcm-color-grey-1);opacity:0;visibility:hidden;transition:opacity 0.2s ease-in-out;z-index:-1}.bcm-list__input-spinner.is-open{opacity:1;visibility:visible;z-index:1}.bcm-list__input-container{flex:1;display:block;overflow:hidden}.bcm-list__input-container.value-empty{color:var(--bcm-color-grey-6)}.bcm-list__input-container.type-single,.bcm-list__input-container.value-empty{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-list__input-placeholder{color:var(--bcm-color-grey-6)}.bcm-list__input-tag-container{height:100%;width:100%;display:flex;align-items:center;justify-content:flex-start;flex-wrap:nowrap;grid-gap:2px;line-height:1}.bcm-list__input-buttons{display:flex;align-items:center;justify-content:flex-end;grid-gap:4px}.bcm-list__input-buttons-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;padding:0 4px 0 4px;font-size:16px;color:var(--bcm-new-ds-color-slate-500)}.bcm-list__input-buttons-button.caret-is{transform:rotate(360deg);transition:transform 0.2s ease-in-out}.bcm-list__input-buttons-button.caret-is-open{transform:rotate(180deg)}.bcm-list__input-buttons:not(.disabled) .bcm-list__input-buttons-button:hover{cursor:pointer;color:var(--bcm-new-ds-color-slate-600)}.bcm-list__input-autocomplete{position:relative;padding-right:0}.bcm-list__input-autocomplete .bcm-list-input-selected-text{background-color:#ffffff;display:flex;align-items:center;justify-content:flex-start;width:calc(100% - 24px);height:100%;padding:0 calc(8px + 4px);position:absolute;top:0;left:0}.bcm-list__input-autocomplete .bcm-list__input-container{height:100%;display:flex;flex-direction:row}.bcm-list__input-autocomplete .bcm-list__input-container .bcm-list__input-tag-container{width:auto}.bcm-list__input-autocomplete .bcm-input,.bcm-list__input-autocomplete .bcm-list__autocomplete{height:100%;min-width:70px;width:100%}.bcm-list__input-autocomplete .bcm-input__container,.bcm-list__input-autocomplete .bcm-list__autocomplete__container{height:100%;border:none;padding:0;width:100%}.bcm-list__input-autocomplete .bcm-input__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-input__container:not(.disabled):hover,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled).focused,.bcm-list__input-autocomplete .bcm-list__autocomplete__container:not(.disabled):hover{border:none;box-shadow:none}.bcm-list__autocomplete{width:100%;position:relative}.bcm-list.full-width .bcm-list__container,.bcm-list.full-width .bcm-list__input{width:100%}.bcm-list.error .bcm-list__input{border-color:var(--bcm-color-red-6)}.bcm-list.disabled .bcm-list__container,.bcm-list.disabled .bcm-list__input{color:var(--bcm-new-ds-color-slate-300);background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-list.disabled .bcm-tag__content.dismissable .close-button{cursor:default}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button bcm-icon{color:var(--bcm-new-ds-color-slate-100)}.bcm-list:not(.disabled) .bcm-list__input .bcm-tag__content.checked .close-button:hover bcm-icon{color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:hover{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list:not(.disabled) .bcm-list__input:hover .bcm-tag__content.dismissable:not(.checked){background-color:var(--bcm-new-ds-color-slate-200);border-color:var(--bcm-new-ds-color-slate-200)}.bcm-list:not(.disabled) .bcm-list__input:focus-visible{border-color:var(--bcm-new-ds-color-blue-500);box-shadow:0 1px 3px 0 rgba(17, 24, 38, 0.1)}.bcm-list:not(.disabled) .bcm-list__input:active{border-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item{padding:2px 0}.bcm-list__item.disabled{user-select:none}.bcm-list__item:focus{outline:none}.bcm-list__item:focus-visible>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item:focus-visible>.bcm-list__item-content:not(.disabled){color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item-content{display:flex;flex-direction:row;align-items:stretch;justify-content:flex-start;flex-wrap:nowrap;cursor:pointer;border-radius:4px;padding:0;padding-left:4px;color:var(--bcm-new-ds-color-slate-700);transition:background-color 0.2s ease}.bcm-list__item-content.disabled{color:var(--bcm-new-ds-color-slate-400);background-color:var(--bcm-new-ds-color-slate-200);user-select:none;cursor:not-allowed}.bcm-list__item-content.readonly{color:var(--bcm-new-ds-color-slate-500);background-color:var(--bcm-new-ds-color-slate-100);cursor:default}.bcm-list__item-content.readonly .bcm-list__item-content-collapse-icon{color:var(--bcm-new-ds-color-slate-700);cursor:pointer}.bcm-list__item-content.selected{color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-500)}.bcm-list__item-content.selected:hover:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-white);background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item-content:hover:not(.disabled):not(.readonly){background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item-content:active:not(.disabled):not(.readonly){color:var(--bcm-new-ds-color-slate-600);background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item-content-collapse-icon{width:16px;padding:0 8px;display:flex;align-items:center;justify-content:center;font-size:16px}.bcm-list__item-content-collapse-icon.child{cursor:pointer}.bcm-list__item-content-text{user-select:none;padding:8px;width:100%;display:flex;flex-direction:row;align-items:center;justify-content:flex-start}.bcm-list__item-content-text.treeview{padding:8px 0}.bcm-list__item-content-text-checkbox{display:flex;flex-direction:row;align-items:center;justify-content:center;flex-wrap:nowrap;margin-right:8px}.bcm-list__item-content-text-checkbox .bcm-checkbox{margin:0}.bcm-list__item-content-text-inner{width:100%}.bcm-list__item-content-text mark{padding:0;margin:0;font-size:inherit;color:var(--bcm-color-grey-8);background-color:var(--bcm-color-yellow-4)}.bcm-list__item-childs{padding-left:16px}.bcm-list__item-small{padding:2px 0 2px 8px;font-size:10px;line-height:calc(10px + 8px)}.bcm-list__item-small .bcm-list__item-content-text{padding:3px 4px}.bcm-list__item-medium{font-size:12px;line-height:calc(12px + 8px)}.bcm-list__item-medium .bcm-list__item-content-text{padding:6px 4px}.bcm-list__item-large{font-size:14px;line-height:calc(14px + 8px)}.bcm-list__item-large .bcm-list__item-content-text{padding:9px 4px}.bcm-list__item--group{border-radius:4px}.bcm-list__item--group:focus>.bcm-list__item-content:not(.disabled){background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-content{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);border-radius:4px 4px 0 0;cursor:default;font-size:14px;line-height:calc(14px + 8px);font-weight:500;position:sticky;top:0}.bcm-list__item--group>.bcm-list__item-content>.bcm-list__item-content-text{padding:4px 8px 4px 16px}.bcm-list__item--group>.bcm-list__item-content:hover,.bcm-list__item--group>.bcm-list__item-content:focus{color:var(--bcm-new-ds-color-slate-800);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-content-unclickable:hover{color:var(--bcm-new-ds-color-slate-700);background-color:var(--bcm-new-ds-color-slate-50)}.bcm-list__item--group>.bcm-list__item-childs{background-color:var(--bcm-new-ds-color-slate-50);color:var(--bcm-new-ds-color-slate-600);padding-bottom:8px;border-radius:0 0 4px 4px;padding-left:8px}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content{background-color:var(--bcm-new-ds-color-white);color:var(--bcm-new-ds-color-slate-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:hover{background-color:var(--bcm-new-ds-color-slate-100)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:active{background-color:var(--bcm-new-ds-color-slate-200)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content:focus-visible{background-color:var(--bcm-new-ds-color-slate-300)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected{background-color:var(--bcm-new-ds-color-blue-500);color:var(--bcm-new-ds-color-white)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:hover{background-color:var(--bcm-new-ds-color-blue-600)}.bcm-list__item--group>.bcm-list__item-childs .bcm-list__item-content.selected:active{background-color:var(--bcm-new-ds-color-blue-700)}.bcm-list__linked{display:none}.bcm-list .bcm-tag--other .value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bcm-info-footer{text-align:right;padding:4px 8px;background-color:var(--bcm-new-ds-color-slate-100);color:var(--bcm-new-ds-color-slate-600);border-radius:0 0 4px 4px}';const J=class{constructor(e){t(this,e),this.selectOtherTag=i(this,"bcm-select-other-tag",7),this.selectTag=i(this,"bcm-select-tag",7),this.deleteTag=i(this,"bcm-delete-tag",7),this.renderItem=e=>k.createElement("bcm-tooltip",{placement:"bottom",message:e.text,trigger:"hover"},k.createElement("div",{id:e.value+"-tag",className:"bcm-tag",onClick:({target:t})=>this.onClickControl(t,e,!1)},k.createElement("span",{className:"bcm-tag__content dismissable"},k.createElement("div",{className:"value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap"},e.text),k.createElement("span",{className:"right close-button"},k.createElement("bcm-icon",{icon:"fa fa-times"}))))),this.renderRest=e=>{const t=(null==e?void 0:e.sort(((e,t)=>+e.ct-+t.ct)).slice(0,15).map((e=>m.textLimitter(e.text,40,!0))).toString().split(",").join("\r\n"))+(e.length>15?"\r\n...":"");return k.createElement("bcm-tooltip",{placement:"bottom",message:t,trigger:"hover"},k.createElement("div",{className:"bcm-tag bcm-tag--other",onClick:({target:t})=>this.onClickControl(t,e,!0)},k.createElement("span",{className:"bcm-tag__content dismissable "+(this.checked?"checkable checked":"")},k.createElement("span",{className:"value"},`+${null==e?void 0:e.length}`),k.createElement("span",{className:"right close-button"},k.createElement("bcm-icon",{icon:"fa fa-times"})))))},this._id=a.UID(),this.maxCount=1,this.data=[],this.checked=!1}isClickDismiss(e){return"BCM-ICON"===e["s-hn"]}onClickControl(e,t,i=!1){const c=this.isClickDismiss(e);c&&this.deleteTag.emit({id:Array.isArray(t)?t.map((e=>e.value)):t.value})&&this.checked&&(this.checked=!1),!i&&this.selectTag.emit({id:t.value})&&this.checked&&(this.checked=!1),i&&!c&&(this.checked=!this.checked,this.selectOtherTag.emit({id:null==t?void 0:t.map((e=>e.value)),checked:this.checked}))}componentWillRender(){const{data:e,renderItem:t,renderRest:i,maxCount:c}=this;this.overflowInstance=k.createElement(w,{data:e,renderItem:t,renderRest:i,maxCount:c}),y.render(this.overflowInstance,this.el)}get el(){return o(this)}};J.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}.rc-overflow{display:flex;flex-direction:row;flex-wrap:nowrap;width:100%}.rc-overflow-item{transition:all 0.3s ease;padding:0 2px;display:flex;align-items:center;justify-content:center}';const{state:Y}=f({value:new Map}),Q=(e,t)=>{let i=[];return e&&(i=e.map((e=>Object.assign(Object.assign(Object.assign({},e),{parentId:r((()=>t),null)}),e.items&&e.items.length>0&&{items:r((()=>Q(e.items,e.id)),[])})))),i},X=e=>r((()=>Y.value.get(e)),{}),Z=(e,t,i)=>{let c=[],o=[],n=[],s=[];const{searchIsOnlyChilds:l}=X(e);return t&&t.length>0&&t.forEach((t=>{let a=l&&null!==t.parentId;if((t.text&&m.slugify(t.text).includes(m.slugify(i))||t.keywords&&m.slugify(t.keywords).includes(m.slugify(i)))&&(!l||l&&a)){if(n.push(t.id),c.push(t.id),o.push(t.id),s.push({id:t.id,text:t.text,parentId:t.parentId}),t.items&&t.items.length>0){const o=Z(e,t.items,i);o.matching.length>0&&o.matching.forEach((e=>{c.push(e)}))}}else if(t.items&&t.items.length>0){const l=Z(e,t.items,i);l.result.length>0&&(l.result.forEach((e=>{n.push(e)})),n.push(t.id),o.push(t.id),s.push({id:t.id,text:t.text,parentId:t.parentId,items:l.nestedResult})),l.matching.length>0&&c.push(...l.matching)}})),{result:n,matching:c,parentIndex:o,nestedResult:s}},ee=(e,t,i)=>{let c;c=i&&i.length>0?i:X(e).dataSource;let o=[];return c&&o.push(Z(e,c,t)),{result:r((()=>a.flatArray(o[0].result)),[]),matching:r((()=>o[0].matching),[]),parentIndex:r((()=>o[0].parentIndex),[]),nestedResult:r((()=>o[0].nestedResult),[])}},te=class{constructor(e){t(this,e),this.bcmOnSearch=i(this,"bcm-on-search",7),this.bcmOnSearchClear=i(this,"bcm-on-search-clear",7),this.debounceHandler=a.debounceInput((e=>this.onSearchValue(e,this)),300,!1,(()=>{var e,t;this.isActiveClearable=(null===(t=null===(e=this.inputElement)||void 0===e?void 0:e.value)||void 0===t?void 0:t.length)>0&&this.clearable})),this._id=a.UID(),this.placeholder="Search",this.disabled=!1,this.readonly=!1,this.clearable=!0,this.size=x.Size.medium,this.limit=10,this.searchIsOnlyChilds=!1,this.minSearchLength=2,this.data=[],this.tick={},this.isActiveClearable=!1}async componentDidLoad(){await this.initState()}async dataChanged(e,t){e!==t&&await this.initState()}async initState(){await(e=>{const{id:t,dataSource:i}=e,c={id:r((()=>t),a.UID),dataSource:i&&i.length>0&&Q(i),searchIsOnlyChilds:e.searchIsOnlyChilds};Y.value.set(c.id,c)})({id:this._id+"-input",dataSource:this.data,searchIsOnlyChilds:this.searchIsOnlyChilds}),await this.markForCheck()}markForCheck(){this.tick=a.UID()}handleInput(){}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async setValue(e){this.inputElement.value=e}handleFocus(){}handleBlur(){}handleChange(){}async handleClear(e=!0){this.inputElement.value="";const{value:t,id:i}=this.inputElement;return ee(i,t),this.isActiveClearable=!1,this.bcmOnSearch.emit({result:null,value:null,matching:null,parentIndex:null}),this.bcmOnSearchClear.emit(e),await u(10),Promise.resolve()}onSearchValue(e,t){const{value:i,id:c}=e.target,o=(null==i?void 0:i.length)>=this.minSearchLength?ee(c,i,null):null,{bcmOnSearch:n,inputElement:s}=t;n.emit({result:null==o?void 0:o.result,value:null==s?void 0:s.value,matching:null==o?void 0:o.matching,parentIndex:null==o?void 0:o.parentIndex,nestedResult:null==o?void 0:o.nestedResult})}render(){const{_id:t,placeholder:i,disabled:o,readonly:n}=this;return e(c,{onClick:()=>{this.onBcmFocus(),this.onBcmSelect()}},e(z,{size:this.size,id:t,type:"search",placeholder:i,disabled:o,"full-width":!0,readonly:n,clearable:this.isActiveClearable,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleClear:()=>this.handleClear(),handleInput:this.debounceHandler,ref:e=>this.inputElement=e}))}get el(){return o(this)}static get watchers(){return{data:["dataChanged"]}}};te.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-input[no-margin]{margin:0}.bcm-textarea[no-margin]{margin:0}.bcm-switch[no-margin]{margin:0}.bcm-checkbox[no-margin]{margin:0}.bcm-radio-group[no-margin]{margin:0}.bcm-checkbox-group[no-margin]{margin:0}.bcm-range[no-margin]{margin:0}.bcm-form[no-margin]{margin:0}.bcm-form-group[no-margin]{margin:0}.bcm-list[no-margin]{margin:0}.bcm-colorpicker[no-margin]{margin:0}.bcm-date-picker[no-margin]{margin:0}.bcm-time-picker[no-margin]{margin:0}.bcm-datetime-picker[no-margin]{margin:0}.bcm-select[no-margin]{margin:0}.bcm-listbox[no-margin]{margin:0}*{box-sizing:border-box}.bcm-input{display:inline-flex;flex-direction:column;width:100%;max-width:256px;margin-bottom:8px}.bcm-input.full-width{max-width:100%}.bcm-input.hidden{display:none}.bcm-input__container{font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;display:flex;align-items:stretch;flex-direction:row;background-color:var(--bcm-new-ds-color-white);border:1px solid var(--bcm-new-ds-color-slate-300);border-radius:4px;box-sizing:border-box;cursor:text;padding:0 0 0 4px;position:relative;width:100%}.bcm-input__container.disabled{background-color:var(--bcm-new-ds-color-slate-50);cursor:not-allowed}.bcm-input__container.disabled .bcm-input-element{color:var(--bcm-new-ds-color-slate-500)}.bcm-input__container.readonly{background-color:var(--bcm-new-ds-color-slate-50);cursor:default}.bcm-input__container.readonly .bcm-input-element{color:var(--bcm-new-ds-color-slate-600)}.bcm-input__container:not(.disabled):hover .caret-container,.bcm-input__container:not(.disabled).focused .caret-container{opacity:1}.bcm-input__container:not(.disabled):hover .input-clear-button,.bcm-input__container:not(.disabled).focused .input-clear-button{opacity:1}.bcm-input__container:not(.disabled).focused{background-color:var(--bcm-new-ds-color-slate-50)}.bcm-input__container:not(.disabled):hover{border-color:var(--bcm-color-prime-blue-6)}.bcm-input__container.empty .input-clear-button{display:none}.bcm-input__container.invalid,.bcm-input__container.error{border-color:var(--bcm-new-ds-color-red-500)}.bcm-input__container .bcm-input-element{width:100%;color:var(--bcm-new-ds-color-slate-600);flex:1;border:none;background:transparent;box-shadow:unset;padding:0 4px;font-family:"Inter", sans-serif;cursor:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;text-overflow:ellipsis}.bcm-input__container .bcm-input-element::placeholder{font-family:"Inter", sans-serif;color:var(--bcm-new-ds-color-slate-300);user-select:none}.bcm-input__container .bcm-input-element::-webkit-search-decoration,.bcm-input__container .bcm-input-element::-webkit-search-cancel-button,.bcm-input__container .bcm-input-element::-webkit-search-results-button,.bcm-input__container .bcm-input-element::-webkit-search-results-decoration,.bcm-input__container .bcm-input-element::-webkit-calendar-picker-indicator,.bcm-input__container .bcm-input-element::-webkit-inner-spin-button,.bcm-input__container .bcm-input-element::-webkit-outer-spin-button{-webkit-appearance:none}.bcm-input__container .caret-container{width:30px;display:flex;flex-direction:column;justify-content:center;align-items:stretch;border-left:1px solid #D9D9D9;transition:0.2s opacity;user-select:none;box-sizing:border-box}.bcm-input__container .caret-container .bcm-input-caret{display:flex;align-items:center;justify-content:center;color:var(--bcm-color-grey-7);cursor:pointer;flex:1}.bcm-input__container .caret-container .bcm-input-caret bcm-icon{line-height:1}.bcm-input__container .caret-container .bcm-input-caret:hover{color:var(--bcm-color-prime-blue-6)}.bcm-input__container .caret-container .bcm-input-caret:active{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container .bcm-input-caret:last-child{border-top:1px solid #D9D9D9}.bcm-input__container .caret-container.disabled{background-color:var(--bcm-color-grey-3)}.bcm-input__container .caret-container.disabled .bcm-input-caret{cursor:not-allowed}.bcm-input__container .input-suffix-content{display:flex;align-items:center;justify-content:center}.bcm-input__container .input-prefix:not(:empty){padding-left:4px}.bcm-input__container .input-suffix:not(:empty){min-width:24px;padding-right:4px}.bcm-input__container .input-prefix:not(:empty),.bcm-input__container .input-suffix:not(:empty){display:flex;align-items:center;justify-content:center;cursor:default;color:#64748a}.bcm-input__container .input-prefix:not(:empty) .unit-prefix,.bcm-input__container .input-suffix:not(:empty) .unit-prefix{color:#64748a}.bcm-input__container .input-prefix-button:not(:empty),.bcm-input__container .input-suffix-button:not(:empty){cursor:pointer}.bcm-input__container .caret-container,.bcm-input__container .input-clear-button{opacity:0}.bcm-input__container--small{font-size:12px}.bcm-input__container--medium{font-size:14px}.bcm-input__container--large{font-size:16px}.bcm-input__textarea.clearable .bcm-input-element{padding-right:24px}.bcm-input__textarea .input-clear-button{position:absolute;top:4px;right:0}';export{K as bcm_list,J as bcm_rc_overflow,te as bcm_search}
|