bromcom-ui 2.12.0-test.0 → 2.12.0-test.1
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-3dba7987.js → p-0389b380.js} +1 -1
- package/dist/bromcom-ui/{p-4689c10d.entry.js → p-055b38fd.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8858f845.entry.js → p-0a3d3b7d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-67a6f0b1.entry.js → p-13eeb974.entry.js} +1 -1
- package/dist/bromcom-ui/p-158245f6.entry.js +5 -0
- package/dist/bromcom-ui/{p-a5830216.entry.js → p-19e378e2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-055e4575.entry.js → p-1a53401f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-90b3e6b7.entry.js → p-1b2e1320.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ed1fb15d.entry.js → p-1c404cc8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7c43d2ac.entry.js → p-1d48da4b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e61cd999.entry.js → p-1d96b6d6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2fdde750.entry.js → p-22a0e447.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1e793658.entry.js → p-28d0fb9d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b175108e.js → p-350e752d.js} +1 -1
- package/dist/bromcom-ui/{p-91c0ab1c.entry.js → p-3917a612.entry.js} +1 -1
- package/dist/bromcom-ui/{p-39eb3017.entry.js → p-39ae1e94.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aaed6cc7.js → p-3ea2dda1.js} +1 -1
- package/dist/bromcom-ui/{p-f06f42dc.entry.js → p-3f1e16ee.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5f04686a.entry.js → p-3f2cf69e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8de5e85a.entry.js → p-40584ce5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89cffdc1.entry.js → p-4364285a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c7a3c347.entry.js → p-475d306a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e6755449.js → p-482054dc.js} +1 -1
- package/dist/bromcom-ui/{p-ebcb30ef.entry.js → p-4adb8c83.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bd640601.entry.js → p-4d189e27.entry.js} +1 -1
- package/dist/bromcom-ui/p-4ebb85f9.js +5 -0
- package/dist/bromcom-ui/{p-57d2c129.entry.js → p-5c1af163.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c2620166.entry.js → p-5d45ff27.entry.js} +1 -1
- package/dist/bromcom-ui/{p-cfffca09.entry.js → p-65511654.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5bea1cd3.entry.js → p-7237c3e9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bf2dcc43.entry.js → p-72d4ced8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d971ec3b.entry.js → p-74252264.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bba4602d.entry.js → p-7942e17a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f9a7a32e.entry.js → p-7bc49347.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d0dc95ae.js → p-83882081.js} +1 -1
- package/dist/bromcom-ui/{p-d9157255.entry.js → p-85371fa1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-30a06f92.js → p-862e5ce9.js} +1 -1
- package/dist/bromcom-ui/{p-3e63aea1.entry.js → p-91f15c4d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-195c5945.entry.js → p-965ef00a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2ab4e748.entry.js → p-9d95be18.entry.js} +1 -1
- package/dist/bromcom-ui/p-9ea56166.entry.js +5 -0
- package/dist/bromcom-ui/{p-c1c4d275.entry.js → p-9f688a29.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5e50d99c.entry.js → p-a366357e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e2e529ef.entry.js → p-af4a83dc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8e2fc0fb.entry.js → p-afb1e0ae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b378aff5.entry.js → p-b1f75abe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-72bbcca6.entry.js → p-bc0eb2d3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6b55a1fe.js → p-bc668762.js} +1 -1
- package/dist/bromcom-ui/{p-70761906.entry.js → p-c2ef6353.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d207b61.entry.js → p-c5a06d3a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e671e409.entry.js → p-c7be0488.entry.js} +1 -1
- package/dist/bromcom-ui/{p-94fd1636.entry.js → p-c821b3bf.entry.js} +1 -1
- package/dist/bromcom-ui/{p-54c2dc4e.entry.js → p-ca5073d9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e0aa747b.entry.js → p-cce4fa10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c4d3aee2.js → p-cd2293b7.js} +1 -1
- package/dist/bromcom-ui/{p-b4548f75.entry.js → p-d36d96af.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8eec338f.entry.js → p-d40c26fb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-be970dce.entry.js → p-d60c61e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0a1c01fa.entry.js → p-db8aceb9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74cedefe.entry.js → p-e4a2f8f8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-86bfeae7.entry.js → p-e60832d7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5a6caa99.entry.js → p-e8962d4b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3f8853a8.entry.js → p-ec9b0de4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c9aa4a0d.entry.js → p-ef440eba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-de5a0e24.entry.js → p-efd00594.entry.js} +1 -1
- package/dist/bromcom-ui/{p-68fb3f60.entry.js → p-fa5ecfb2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2fbae1fa.entry.js → p-fdd5d6bb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-56fca120.entry.js → p-fe675eea.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_11.cjs.entry.js +7 -7
- 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-date-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-date.cjs.entry.js +4 -4
- package/dist/cjs/bcm-datetime-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-default.cjs.entry.js +2 -2
- package/dist/cjs/bcm-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-form-2.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-custom.cjs.entry.js +2 -2
- package/dist/cjs/bcm-input-dropdown.cjs.entry.js +4 -4
- package/dist/cjs/bcm-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 +6 -6
- 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-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-time-picker.cjs.entry.js +2 -2
- package/dist/cjs/bcm-toast.cjs.entry.js +2 -2
- package/dist/cjs/bromcom-ui.cjs.js +2 -2
- package/dist/cjs/{generate-c09a3ff3.js → generate-acac74ce.js} +1 -1
- package/dist/cjs/{global-6b15ed51.js → global-47ad6c93.js} +1 -1
- package/dist/cjs/{input-template-8ca49c2e.js → input-template-b836720c.js} +1 -1
- package/dist/cjs/{json-parse-decarator-d32b1b4a.js → json-parse-decarator-b8367488.js} +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{number-helper-243f0583.js → number-helper-fb148ed6.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-6483ada2.js → package-c5399090.js} +1 -1
- package/dist/cjs/{stepper-states-4e435c7d.js → stepper-states-17562587.js} +1 -1
- package/dist/cjs/{tooltip-helper-31cc88d8.js → tooltip-helper-41b2fcd0.js} +3 -3
- package/dist/cjs/{validators-e7423b70.js → validators-a7c046d5.js} +1 -1
- package/dist/collection/components/molecules/number-input/number-input.js +2 -2
- package/dist/components/bcm-number-input.js +1 -1
- package/dist/components/generate.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_11.entry.js +7 -7
- 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-date-picker.entry.js +2 -2
- package/dist/esm/bcm-date.entry.js +4 -4
- package/dist/esm/bcm-datetime-picker.entry.js +2 -2
- 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-form-2.entry.js +2 -2
- package/dist/esm/bcm-input-custom.entry.js +2 -2
- package/dist/esm/bcm-input-dropdown.entry.js +4 -4
- package/dist/esm/bcm-item.entry.js +2 -2
- package/dist/esm/bcm-items.entry.js +2 -2
- package/dist/esm/bcm-list_3.entry.js +6 -6
- 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-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-time-picker.entry.js +2 -2
- package/dist/esm/bcm-toast.entry.js +2 -2
- package/dist/esm/bromcom-ui.js +2 -2
- package/dist/esm/{generate-bcc4b036.js → generate-a1817b7f.js} +1 -1
- package/dist/esm/{global-158eb485.js → global-26b8ded6.js} +1 -1
- package/dist/esm/{input-template-673e33b3.js → input-template-c8611096.js} +1 -1
- package/dist/esm/{json-parse-decarator-c5dee289.js → json-parse-decarator-b230fb3b.js} +1 -1
- package/dist/esm/loader.js +2 -2
- package/dist/esm/{number-helper-f6f2817c.js → number-helper-ccf5aba4.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-255a905d.js → package-5d20a20d.js} +1 -1
- package/dist/esm/{stepper-states-aef71cbc.js → stepper-states-38388dc9.js} +1 -1
- package/dist/esm/{tooltip-helper-b27db4cd.js → tooltip-helper-e4eb77cc.js} +3 -3
- package/dist/esm/{validators-2052b679.js → validators-e63fdc75.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-0218b337.js +0 -5
- package/dist/bromcom-ui/p-619d632d.entry.js +0 -5
- package/dist/bromcom-ui/p-c4b075da.entry.js +0 -5
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{h as n}from"./p-170cf07d.js";import{d as e}from"./p-3fac58f7.js";import{B as s}from"./p-a313fba6.js";import{c as a}from"./p-bed627ab.js";import{s as t}from"./p-
|
|
5
|
+
import{h as n}from"./p-170cf07d.js";import{d as e}from"./p-3fac58f7.js";import{B as s}from"./p-a313fba6.js";import{c as a}from"./p-bed627ab.js";import{s as t}from"./p-cd2293b7.js";const i=({elementType:i,rows:o,id:c,internalId:r,type:l,placeholder:p,value:u,size:f,pattern:d,unit:b,unitPrefix:m,maxLength:x,disabled:w,clearable:h,focused:y,readonly:v,isPasswordVisible:C,passwordToggle:g,noDefaultIcon:j,inValid:_,captionType:k,resize:z,autocomplete:I,_suffix:T,_prefix:L,changePasswordVisibility:B,handleClear:D,steps:O,ref:P,handleBlur:V,handleFocus:F,handleInput:H,handleChange:M,isEyeDropperSupported:E,eyeDropper:S})=>{const q=s.HtmlElementType[i]||s.HtmlElementType.input;l="password"===l&&C?"text":l,u=t((()=>u),""),u=y?u:u+(u&&(null==b?void 0:b.length)>0?" "+b:"");const A="color"===(l=(null==b?void 0:b.length)>0&&!y?"text":l);l="color"===l?"text":l;var G=a("bcm-input__container",q===s.HtmlElementType.textarea&&a("bcm-input__textarea","textarea-size-"+s.Size[f],"resize-"+z,"textarea-"+f),q===s.HtmlElementType.input&&a("input-size-"+s.Size[f]),{focused:y,clearable:h,disabled:w,readonly:v,invalid:_,unit:(null==b?void 0:b.length)>0,error:"error"===k});const J=a("caret-container",{unit:(null==b?void 0:b.length)>0,disabled:w||v||_}),K="bcm-input__container--"+f,N=a(K,"unit-prefix");return n("div",{class:G,id:c+"-container"},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),L&&L.length>0&&n("span",{innerHTML:L}),m&&n("span",{class:N},m),A&&n("i",{class:"tw-flex tw-h-4 tw-w-4 tw-items-center tw-justify-center tw-rounded-full tw-border tw-border-slate-300",style:{backgroundColor:u}})),n(q,Object.assign({tabindex:"0",id:c+"-input","bcm-internal-id":r,class:"bcm-input-element "+K},q===s.HtmlElementType.input&&{type:l,autocomplete:I?"on":"off",pattern:d},q===s.HtmlElementType.textarea&&{rows:o,resize:z},{value:u,maxLength:x,placeholder:p,disabled:w,readOnly:v,ref:n=>P(n),onBlur:n=>(n=>{n.target.parentElement.classList.remove("focused"),V(n)})(n),onFocus:n=>(n=>{n.target.parentElement.classList.add("focused"),F(n)})(n),onInput:n=>H(n),onChange:n=>M(n)})),n("span",{class:"input-suffix-content"},h&&!w&&!v&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>D(n)},n("bcm-icon",{icon:"far fa-times"}))),n("span",{class:"input-suffix-content"},("password"===l||"text"===l)&&g&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>B()},n("bcm-icon",{icon:C?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(e).includes(l)&&!j&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:e[l]}))),n("span",{class:"input-suffix-content"},"number"===l&&n("div",{class:J},n("span",{class:"bcm-input-caret",onClick:()=>O("up")},n("bcm-icon",{icon:"fas fa-caret-up"})),n("span",{class:"bcm-input-caret",onClick:()=>O("down")},n("bcm-icon",{icon:"fas fa-caret-down"})))),n("span",{class:"input-suffix-content"},"number"!==l&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),T&&T.length>0&&n("span",{innerHTML:T})),A&&E()&&n("span",{class:"input-suffix"},n("span",null,n("i",{class:"far fa-eye-dropper",onClick:()=>S()})))))};export{i as I}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as i,h as s,H as e,g as h}from"./p-170cf07d.js";import{I as r}from"./p-9850cbce.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,c as i,h as s,H as e,g as h}from"./p-170cf07d.js";import{I as r}from"./p-9850cbce.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as o}from"./p-cd2293b7.js";import"./p-4ebb85f9.js";import"./p-6b5ed4d8.js";import"./p-0389b380.js";import"./p-7e44e6b5.js";import{a}from"./p-a313fba6.js";import{C as c}from"./p-be7e5e83.js";import{c as n}from"./p-bed627ab.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{h as p}from"./p-76edf59f.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-482054dc.js";const m=class{constructor(s){t(this,s),this.change=i(this,"bcm-change",7),this.onChange=t=>{this.value=this.getValueObject(t.detail),this.change.emit(this.value)},this.getFormat=()=>{if(!this.format){const t=this.use12Hours?"hh":"HH",i=`${this.showSecond?`${t}:mm:ss`:this.showMinute?`${t}:mm`:`${t}`}${this.use12Hours?" a":""}`;switch(this.type){case"time":return`${i}`;case"date":default:return"DD/MM/YYYY";case"datetime":return`DD/MM/YYYY ${i}`;case"week":return"YYYY-wo";case"month":return"MM/YYYY";case"year":return"YYYY"}}return this.format},this.getValueObject=t=>this.range?this.getRangeValueObject(t):this.createValueObject(t),this.getRangeValueObject=t=>{const[i,s]=t||[null,null],e=this.createValueObject(i),h=this.createValueObject(s);return Object.assign({isValid:e.isValid&&h.isValid,start:e,end:h,date:[e.date,h.date],timestamp:[e.timestamp,h.timestamp],value:`${e.value} - ${h.value}`},"time"===this.type&&{time:`${e.time} - ${h.time}`})},this.createValueObject=t=>t&&p(t).isValid()?Object.assign({isValid:p(t).isValid(),date:p(t).toDate(),timestamp:p(t).valueOf(),dateObject:{year:p(t).year(),day:p(t).date(),month:p(t).month(),dayOfWeek:p(t).day(),monthFirstDay:p(t).startOf("month").day()},value:p(t).format(this.getFormat())},"time"===this.type&&{time:p(t).format(this.getFormat()),timeObject:{hour:p(t).hour(),minute:p(t).minute(),second:p(t).second()}}):null,this._id=o.UID(),this.label=void 0,this.placeholder=void 0,this.size=a.Size.medium,this.fullWidth=!1,this.required=!1,this.clearable=!1,this.disabled=!1,this.noMargin=!1,this.caption=void 0,this.noCaption=!1,this.captionType=a.Status.default,this.captionError=void 0,this.name=void 0,this.value=void 0,this.type="date",this.format=void 0,this.range=!1,this.showTime=!1,this.showNow=!0,this.showHour=!0,this.showMinute=!0,this.showSecond=!1,this.use12Hours=!1,this.hourStep=1,this.minuteStep=1,this.secondStep=1,this.hideDisabledOptions=!1,this.disabledTime=void 0,this.showToday=!0,this.disabledDates=void 0}async getValue(){return this.value}async get(){var t;return(null===(t=this.value)||void 0===t?void 0:t.timestamp)||null}async set(t){this.getPickerElement().set(t)}async setClear(){this.getPickerElement().set(null)}async resetCaption(){this.captionType="default",this.captionError=null}async getInput(){return this.el.querySelector("input")}async isValid(){var t;return(null===(t=this.getValueObject(this.value))||void 0===t?void 0:t.isValid)||!1}getPickerElement(){return this.el.querySelector("bcm-rc-picker")}render(){const{label:t,size:i,captionType:h,required:r,_id:o}=this;return s(e,{class:n("bcm-ui-element bcm-ui-input","tw-relative tw-m-0 tw-inline-flex tw-w-full tw-flex-col",{"tw-max-w-[256px]":!this.fullWidth,"tw-mb-2":!this.noMargin})},t&&s("bcm-label",{size:i,type:h,value:t,required:r,htmlFor:o}),s("bcm-rc-picker",{id:o+"-picker",class:n("w-full tw-flex"),onBcmRCPickerChange:t=>this.onChange(t),disabled:this.disabled,clearable:this.clearable,size:i,placeholder:this.placeholder,error:"error"===this.captionType,type:this.type,format:this.getFormat(),range:this.range,showToday:this.showToday,disabledDates:this.disabledDates,showTime:this.showTime,showNow:this.showNow,showHour:this.showHour,showMinute:this.showMinute,showSecond:this.showSecond,use12Hours:this.use12Hours,hourStep:this.hourStep,minuteStep:this.minuteStep,secondStep:this.secondStep,hideDisabledOptions:this.hideDisabledOptions,disabledTime:this.disabledTime}),s(c,{noCaption:this.noCaption,captionType:this.captionType,captionError:this.captionError,caption:this.caption}))}get el(){return h(this)}};!function(t,i,s,e){var h,r=arguments.length,o=r<3?i:null===e?e=Object.getOwnPropertyDescriptor(i,s):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,i,s,e);else for(var a=t.length-1;a>=0;a--)(h=t[a])&&(o=(r<3?h(o):r>3?h(i,s,o):h(i,s))||o);r>3&&o&&Object.defineProperty(i,s,o)}([r()],m.prototype,"el",void 0);export{m as bcm_date}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,h as e,H as s,g as o}from"./p-170cf07d.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as i}from"./p-
|
|
5
|
+
import{r as t,h as e,H as s,g as o}from"./p-170cf07d.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as i}from"./p-cd2293b7.js";import"./p-4ebb85f9.js";import"./p-6b5ed4d8.js";import"./p-0389b380.js";import"./p-7e44e6b5.js";import{a as r}from"./p-a313fba6.js";import{c as a}from"./p-bed627ab.js";import"./p-436364c8.js";import"./p-8c018ae0.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-482054dc.js";const p=class{constructor(e){t(this,e),this._id=i.UID(),this.active=!1,this.disabled=!1,this.index=void 0,this.color="blue",this.size=r.Size.medium}handleClick(){var t;this.disabled||null===(t=i.findParentElement(this.el,"bcm-tab-group"))||void 0===t||t.setActive(this.index)}render(){const{color:t,size:o,active:p,disabled:l}=this,c=i.getTwColor({color:t,tones:[500,600,700,800]});return e(s,{onClick:()=>this.handleClick(),class:a("tw-flex tw-flex-1 tw-items-center tw-justify-center tw-border-b-[2px] tw-border-b-slate-300 tw-transition-font tw-focus:outline-none",{"tw-text-2 tw-py-1 tw-gap-2":o===r.Size.small,"tw-text-3 tw-py-2 tw-gap-3":o===r.Size.medium,"tw-text-4 tw-py-3 tw-gap-4":o===r.Size.large},l?"tw-cursor-not-allowed tw-text-gray-400 tw-opacity-50":"tw-cursor-pointer",p?"tw-text-default-500 enabled:hover:tw-text-default-600 enabled:active:tw-text-default-700 enabled:focus-visible:tw-text-default-800":"tw-text-slate-400 enabled:hover:tw-text-slate-500 enabled:focus-visible:tw-text-slate-700 enabled:active:tw-text-slate-600"),style:c})}get el(){return o(this)}};export{p as bcm_tab_item_header}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as e,h as i,H as o,g as t}from"./p-170cf07d.js";import{G as c}from"./p-
|
|
5
|
+
import{r as e,h as i,H as o,g as t}from"./p-170cf07d.js";import{G as c}from"./p-cd2293b7.js";import{B as r}from"./p-a313fba6.js";import{c as a}from"./p-bed627ab.js";import{C as l}from"./p-816fbffd.js";import"./p-482054dc.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-436364c8.js";import"./p-8c018ae0.js";const s=class{constructor(i){e(this,i),this._id=c.UID(),this.size=r.Size.medium,this.color=void 0,this.static=!1}setColor(e=this.color){if(!e)return;const i="--bcm-item";return"white"==e?{[`${i}-color-default`]:l.dsColor("slate-600"),[`${i}-color-hover`]:l.dsColor("slate-600"),[`${i}-color-focus-visible`]:l.dsColor("slate-600"),[`${i}-color-active`]:l.dsColor("slate-600"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor("white"),[`${i}-background-color-hover`]:l.dsColor(this.static?"white":"slate-100"),[`${i}-background-color-focus-visible`]:l.dsColor(this.static?"white":"slate-200"),[`${i}-background-color-active`]:l.dsColor(this.static?"white":"slate-300"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}:{[`${i}-color-default`]:l.dsColor("white"),[`${i}-color-hover`]:l.dsColor("white"),[`${i}-color-focus-visible`]:l.dsColor("white"),[`${i}-color-active`]:l.dsColor("white"),[`${i}-color-disabled`]:l.dsColor("white"),[`${i}-background-color-default`]:l.dsColor(e+"-500"),[`${i}-background-color-hover`]:l.dsColor(e+"-600"),[`${i}-background-color-focus-visible`]:l.dsColor(e+"-700"),[`${i}-background-color-active`]:l.dsColor(e+"-800"),[`${i}-background-color-disabled`]:l.dsColor("slate-400")}}disconnectedCallback(){}render(){const e=a("bcm-item",`bcm-item-size-${this.size}`);return i(o,{class:e,style:this.setColor()},i("slot",null))}get el(){return t(this)}};s.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");@import url("https://fonts.googleapis.com/css2?family=Inter:wght@200;400;500;600&display=swap"); .size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}*{box-sizing:border-box}.bcm-item{box-sizing:border-box;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;flex-wrap:nowrap;--bcm-item-color-default:var(--bcm-new-ds-color-white);--bcm-item-background-color-default:var(--bcm-new-ds-color-blue-500);--bcm-item-color-hover:var(--bcm-new-ds-color-white);--bcm-item-background-color-hover:var(--bcm-new-ds-color-blue-600);--bcm-item-color-focus-visible:var(--bcm-new-ds-color-white);--bcm-item-background-color-focus-visible:var(--bcm-new-ds-color-blue-800);--bcm-item-color-active:var(--bcm-new-ds-color-white);--bcm-item-background-color-active:var(--bcm-new-ds-color-blue-700);--bcm-item-color-disabled:var(--bcm-new-ds-color-white);--bcm-item-background-color-disabled:var(--bcm-new-ds-color-slate-400);font-family:"Inter", sans-serif;font-size:14px;line-height:calc(14px + 8px);font-weight:400;border-radius:4px;outline:none;color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item-size-small{font-size:12px;line-height:calc(12px + 8px);padding:2px 12px;min-height:calc(calc(12px + 8px) + calc(2px) * 2)}.bcm-item-size-medium{font-size:14px;line-height:calc(14px + 8px);padding:5px 12px;min-height:calc(calc(14px + 8px) + calc(5px) * 2)}.bcm-item-size-large{font-size:16px;line-height:calc(16px + 8px);padding:8px 12px;min-height:calc(calc(16px + 8px) + calc(8px) * 2)}.bcm-item:default{color:var(--bcm-item-color-default);background-color:var(--bcm-item-background-color-default)}.bcm-item:hover{color:var(--bcm-item-color-hover);background-color:var(--bcm-item-background-color-hover)}.bcm-item:focus-visible{color:var(--bcm-item-color-focus-visible);background-color:var(--bcm-item-background-color-focus-visible)}.bcm-item:active{color:var(--bcm-item-color-active);background-color:var(--bcm-item-background-color-active)}.bcm-item:disabled{color:var(--bcm-item-color-disabled);background-color:var(--bcm-item-background-color-disabled)}.bcm-item:not(.static):hover{cursor:pointer}';export{s as bcm_item}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as
|
|
5
|
+
import{r as i,c as e,h as t,H as s,g as h}from"./p-170cf07d.js";import{c as o}from"./p-bed627ab.js";import{B as p}from"./p-a313fba6.js";import{G as n}from"./p-cd2293b7.js";import"./p-e45c1546.js";import"./p-482054dc.js";import"./p-4680865d.js";const a=class{constructor(t){i(this,t),this.onShow=e(this,"bcm-show",7),this.onHide=e(this,"bcm-hide",7),this._title=void 0,this._id=n.UID(),this.message=void 0,this.placement=p.Placement.top,this.trigger=p.TriggerType.click,this.open=!1,this.linkedComponent=void 0}async show(){this.open||(this.open=!0,this.onShow.emit(),this.createBox(),this.showBox())}async hide(){this.open&&(this.open=!1,this.onHide.emit(),this.hideBox())}createBox(){if(!this.getPopoverBox()){const i=document.createElement("old-bcm-popover-box");i.setAttribute("id","box-"+this._id),i.setAttribute("target-id",this._id),i.setAttribute("placement",this.placement),i.setAttribute("message",this.message),i.setAttribute("_title",this._title),i.setAttribute("linked-component",this.linkedComponent),document.body.appendChild(i)}}getPopoverBox(){return document.querySelector(`old-bcm-popover-box[id="box-${this._id}"]`)}showBox(){this.getPopoverBox()&&this.getPopoverBox().show()}hideBox(){this.getPopoverBox()&&this.getPopoverBox().hide()}listenTrigger(i){switch(this.trigger){case"click":"click"===i&&(this.open?this.hide():this.show());break;case"hover":"onMouseOver"===i&&this.show(),"onMouseOut"===i&&this.hide();break;case"focus":"onFocus"===i&&this.show(),"onBlur"===i&&this.hide()}}render(){const i=o("bcm-popover");return t(s,{class:i,onMouseOver:()=>this.listenTrigger("onMouseOver"),onMouseOut:()=>this.listenTrigger("onMouseOut"),onclick:()=>this.listenTrigger("click"),onFocus:()=>this.listenTrigger("onFocus"),onBlur:()=>this.listenTrigger("onBlur"),tabindex:0},t("slot",null))}get el(){return h(this)}};a.style='@import url("https://fonts.googleapis.com/css?family=Roboto:400,500");.size-1{font-size:12px;line-height:20px}.size-2{font-size:14px;line-height:22px}.size-3{font-size:16px;line-height:24px}.size-4{font-size:20px;line-height:28px}.size-5{font-size:24px;line-height:32px}.size-6{font-size:30px;line-height:38px}.size-7{font-size:38px;line-height:46px}.size-8{font-size:46px;line-height:54px}.size-9{font-size:56px;line-height:64px}.weight-regular{font-weight:400}.weight-semibold{font-weight:500}.input-size-large{height:40px}.input-size-medium{height:32px}.input-size-small{height:24px}.resize-none textarea{resize:none}.resize-vertical textarea{resize:vertical}.resize-auto textarea{height:auto;resize:none}.textarea-size-large{padding:4px 0 0 4px;min-height:40px}.textarea-size-large .bcm-input-element{min-height:calc((40px - 8px) + 2px)}.textarea-size-large .input-clear-button{height:calc( 40px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-medium{padding:4px 0 0 4px;min-height:32px}.textarea-size-medium .bcm-input-element{min-height:calc((32px - 8px) + 2px)}.textarea-size-medium .input-clear-button{height:calc( 32px - 16px );top:8px;padding:0;margin-right:8px}.textarea-size-small{padding:0px 0 0 4px;min-height:24px}.textarea-size-small .bcm-input-element{min-height:calc((24px - 8px) + 2px)}.textarea-size-small .input-clear-button{height:calc( 24px - 16px );top:8px;padding:0;margin-right:8px}.bcm-popover{display:inline-flex}';export{a as old_bcm_popover}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as s,h as i,H as e,g as h}from"./p-170cf07d.js";import{c as a}from"./p-bed627ab.js";import{G as d}from"./p-
|
|
5
|
+
import{r as t,c as s,h as i,H as e,g as h}from"./p-170cf07d.js";import{c as a}from"./p-bed627ab.js";import{G as d}from"./p-cd2293b7.js";import{s as p}from"./p-3ea2dda1.js";import"./p-e45c1546.js";import"./p-482054dc.js";import"./p-4680865d.js";import"./p-74e6d2b6.js";const r=class{constructor(i){t(this,i),this.dataIsLoaded=s(this,"data-is-loaded",7),this.bcmChangeHidden=s(this,"bcm-change-hidden",7),this.hidden=!1,this._id=d.UID(),this._title=void 0,this.description=void 0,this.status="default",this.icon=void 0,this.loading=!1,this.valid=!0,this.index=void 0,this.active=!1,this.htmlTemplate=void 0,this.isLast=!1,this.disabled=!1}componentDidLoad(){this.isLast&&this.dataIsLoaded.emit(!0)}getStepper(){return this.el.closest("bcm-stepper")||null}activeChanged(){if(this.active){const t=this.getStepper();t&&p.changeStepDisabled(t.stepperId,this._id,!1)}}statusChange(){const t=this.getStepper();t&&p.changeStepStatus(t.stepperId,this._id,this.status)}hiddenChange(t,s){const i=this.getStepper();t!==s&&i&&!this.active&&this.bcmChangeHidden.emit(t)}disabledChange(t,s){const i=this.getStepper();i&&p.changeStepDisabled(i.stepperId,this._id,t)}render(){const{hidden:t,valid:s,active:h}=this,d=a("bcm-stepper__step",s?"bcm-stepper__step-valid":"bcm-stepper__step-invalid",{"bcm-stepper__step-active":h,hidden:t});return i(e,{class:d},i("slot",null))}get el(){return h(this)}static get watchers(){return{active:["activeChanged"],status:["statusChange"],hidden:["hiddenChange"],disabled:["disabledChange"]}}};export{r as bcm_step}
|
|
@@ -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-d0dc95ae.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as l,s as r}from"./p-c4d3aee2.js";import{N as a}from"./p-0218b337.js";import{S as h}from"./p-6b5ed4d8.js";import{V as m}from"./p-3dba7987.js";import"./p-7e44e6b5.js";import{g as b,s as d}from"./p-fcc6f71e.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-be7e5e83.js";import{c as v}from"./p-bed627ab.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as f}from"./p-74e6d2b6.js";import{F as k}from"./p-310cab1a.js";import{r as w,a as y}from"./p-3182df7e.js";import{I as z}from"./p-6b55a1fe.js";import"./p-436364c8.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-e6755449.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:r,checkedItem:a,focusItem:m,searchIsOnlyChilds:b})=>{const d=t.items&&t.items.length>0;var p=h.htmlEntities(t.text);let u=[];if(c&&h.slugify(p).includes(h.slugify(c))&&(b&&(!b||d&&(i||"group"==t.type))||(p=h.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?h.templateParser(t.template,Object.assign(Object.assign({},t.itemObject),{text:p})):p;const x=t.template?p:l.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&&m(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 r(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=>r(e),focusItem:e=>m(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: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:a,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),l.UID),dataSource:i&&i.length>0&&S(i,B),options:{type:o,treeview:n,checkboxes:s,searchable:a,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=l.debounceInput((()=>this.listenResize()),300,!1),this._id=l.UID(),this.tempId=l.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:h.textLimitter(e.text,7),text:e.tooltipMessage||e.tagTitle||l.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(l.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes){if(!m.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){m.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&&l.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=l.findEventPath(e,this.el)||i&&l.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=l.findEventPathWithKey(e,"className",["bcm-tag"]),n=l.findEventPathWithKey(e,"className",["bcm-tag bcm-tag--other"]),s=l.findEventPathWithKey(e,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),r=l.findEventPathWithKey(e,"className",["right close-button"]);s&&!r&&"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&&l.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=l.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=l.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=l.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=l.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*a.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*a.toNumber(this.maxHeight)*r+"px":a.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{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=>w.createElement("bcm-tooltip",{placement:"bottom",message:e.text,trigger:"hover"},w.createElement("div",{id:e.value+"-tag",className:"bcm-tag",onClick:({target:t})=>this.onClickControl(t,e,!1)},w.createElement("span",{className:"bcm-tag__content dismissable"},w.createElement("div",{className:"value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap"},e.text),w.createElement("span",{className:"right close-button"},w.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=>h.textLimitter(e.text,40,!0))).toString().split(",").join("\r\n"))+(e.length>15?"\r\n...":"");return w.createElement("bcm-tooltip",{placement:"bottom",message:t,trigger:"hover"},w.createElement("div",{className:"bcm-tag bcm-tag--other",onClick:({target:t})=>this.onClickControl(t,e,!0)},w.createElement("span",{className:"bcm-tag__content dismissable "+(this.checked?"checkable checked":"")},w.createElement("span",{className:"value"},`+${null==e?void 0:e.length}`),w.createElement("span",{className:"right close-button"},w.createElement("bcm-icon",{icon:"fa fa-times"})))))},this._id=l.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=w.createElement(k,{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 r=l&&null!==t.parentId;if((t.text&&h.slugify(t.text).includes(h.slugify(i))||t.keywords&&h.slugify(t.keywords).includes(h.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:r((()=>l.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=l.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=l.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),l.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=l.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-83882081.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as l,s as r}from"./p-cd2293b7.js";import{N as a}from"./p-4ebb85f9.js";import{S as h}from"./p-6b5ed4d8.js";import{V as m}from"./p-0389b380.js";import"./p-7e44e6b5.js";import{g as b,s as d}from"./p-fcc6f71e.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-be7e5e83.js";import{c as v}from"./p-bed627ab.js";import"./p-3fac58f7.js";import"./p-2e73d572.js";import{c as f}from"./p-74e6d2b6.js";import{F as k}from"./p-310cab1a.js";import{r as w,a as y}from"./p-3182df7e.js";import{I as z}from"./p-bc668762.js";import"./p-436364c8.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-482054dc.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:r,checkedItem:a,focusItem:m,searchIsOnlyChilds:b})=>{const d=t.items&&t.items.length>0;var p=h.htmlEntities(t.text);let u=[];if(c&&h.slugify(p).includes(h.slugify(c))&&(b&&(!b||d&&(i||"group"==t.type))||(p=h.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?h.templateParser(t.template,Object.assign(Object.assign({},t.itemObject),{text:p})):p;const x=t.template?p:l.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&&m(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 r(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=>r(e),focusItem:e=>m(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: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:a,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),l.UID),dataSource:i&&i.length>0&&S(i,B),options:{type:o,treeview:n,checkboxes:s,searchable:a,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=l.debounceInput((()=>this.listenResize()),300,!1),this._id=l.UID(),this.tempId=l.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:h.textLimitter(e.text,7),text:e.tooltipMessage||e.tagTitle||l.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(l.objectIsEmpty(this.returnFilterData)&&this.handleIndeterminate((null===(i=this.value)||void 0===i?void 0:i.length)||0,this.totalData),this.checkboxes){if(!m.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){m.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&&l.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=l.findEventPath(e,this.el)||i&&l.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=l.findEventPathWithKey(e,"className",["bcm-tag"]),n=l.findEventPathWithKey(e,"className",["bcm-tag bcm-tag--other"]),s=l.findEventPathWithKey(e,"id",[`bcm-list-input-${this._id}`,`bcm-list-label-${this._id}`]),r=l.findEventPathWithKey(e,"className",["right close-button"]);s&&!r&&"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&&l.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=l.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=l.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=l.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=l.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*a.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*a.toNumber(this.maxHeight)*r+"px":a.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{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=>w.createElement("bcm-tooltip",{placement:"bottom",message:e.text,trigger:"hover"},w.createElement("div",{id:e.value+"-tag",className:"bcm-tag",onClick:({target:t})=>this.onClickControl(t,e,!1)},w.createElement("span",{className:"bcm-tag__content dismissable"},w.createElement("div",{className:"value tw-block tw-max-w-[38px] tw-overflow-hidden tw-overflow-ellipsis tw-whitespace-nowrap"},e.text),w.createElement("span",{className:"right close-button"},w.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=>h.textLimitter(e.text,40,!0))).toString().split(",").join("\r\n"))+(e.length>15?"\r\n...":"");return w.createElement("bcm-tooltip",{placement:"bottom",message:t,trigger:"hover"},w.createElement("div",{className:"bcm-tag bcm-tag--other",onClick:({target:t})=>this.onClickControl(t,e,!0)},w.createElement("span",{className:"bcm-tag__content dismissable "+(this.checked?"checkable checked":"")},w.createElement("span",{className:"value"},`+${null==e?void 0:e.length}`),w.createElement("span",{className:"right close-button"},w.createElement("bcm-icon",{icon:"fa fa-times"})))))},this._id=l.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=w.createElement(k,{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 r=l&&null!==t.parentId;if((t.text&&h.slugify(t.text).includes(h.slugify(i))||t.keywords&&h.slugify(t.keywords).includes(h.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:r((()=>l.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=l.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=l.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),l.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=l.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}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{v as r}from"./p-
|
|
5
|
+
import{v as r}from"./p-482054dc.js";import{c as t}from"./p-4680865d.js";var n,e;function o(r,t){try{var n=r();return void 0===n?t:n}catch(r){if(r instanceof TypeError)return t;throw r}}!function(r){r.info="info",r.error="error",r.warning="warning",r.success="success",r.default="default"}(n||(n={})),function(r){r.banner="banner",r.basic="basic"}(e||(e={}));const c=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const r=window.location.hostname;return c.includes(r)})()&&console.log(`%cbromcom ui%c version: ${r}-p `,"color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;"),function(){const r=document.querySelector("body");let t=localStorage.getItem("bcm-theme");!r.classList.contains("bcm-theme-*")&&t&&r.classList.add(`bcm-theme-${t}`)}(),function(){const r=document.querySelector("body");let t=document.querySelector("#bcm-overlay-container");t||(t=document.createElement("div"),t.id="bcm-overlay-container",t.classList.add("bcm-overlay-container"),r.appendChild(t))}();class i{static prettify(r){const t={};for(const n in r)r.hasOwnProperty(n)&&(t[n]=r[n]);return t}static getTwColor(r){const{color:n,variable:e,tones:o}=r=Object.assign({variable:"--bcm-color-default",defaultTone:"600",tones:{50:{},100:{},200:{},300:{},400:{},500:{},600:{},700:{},800:{},900:{},950:{}}},r);if(!n||!t[n])return!1;const c={};return"string"==typeof t[n]?(c[e]=t[n],c):((Array.isArray(o)?o:Object.keys(o)).forEach((r=>{t[n][r]&&(Array.isArray(o[r])?o[r].forEach((o=>{c[`${e}-${o}`]=t[n][r]})):c[`${e}-${r}`]=t[n][r])})),c)}}i.UID=(r="bcm")=>`${r}${Math.random().toString(36).substr(2,9)}`,i.getIconAttrWithStatusType=(r,t=!1)=>{if(t)return{icon:"far fa-spinner-third fa-spin"};switch(r){case n.info:return{icon:"far fa-info-circle"};case n.error:return{icon:"far fa-times-circle"};case n.warning:return{icon:"far fa-exclamation-circle"};case n.success:return{icon:"far fa-check-circle"}}},i.domParser=r=>(new DOMParser).parseFromString(r,"text/html").body.innerText,i.createComponent=(r,t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{n[r]=t[r]})),document.getElementById("bcm-overlay-container").appendChild(n),n},i.createElement=(r="div",t)=>{let n=document.getElementById(t.id);return n||(n=document.createElement(r)),Object.keys(t).forEach((r=>{"innerHTML"==r?n[r]=t[r]:n.setAttribute(r,t[r])})),document.body.appendChild(n),n},i.debounceInput=(r,t,n,e)=>{let o;return function(){let c=this,i=arguments;e&&e.apply(c,i);let u=function(){o=null,n||r.apply(c,i)},a=n&&!o;clearTimeout(o),o=setTimeout(u,t),a&&r.apply(c,i)}},i.flatArray=r=>r.reduce(((r,t)=>r.concat(Array.isArray(t)?i.flatArray(t):t)),[]),i.reverseNodeList=r=>{let t=[];for(let n=r.length-1;n>=0;n--)t.push(r[n]);return t},i.findEventPathWithKey=(r,t,n)=>{n=Array.isArray(n)?n:[n];let e=r.composedPath()||r.path;if(e)return void 0!==e.filter((r=>n.includes(r[t])))[0]},i.findEventPathHasAttribute=(r,t)=>{let n=r.composedPath()||r.path;if(n)return o((()=>!!n.find((r=>r.hasAttribute(t)))),!1)},i.findEventTarget=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.target||r.srcElement;if(n)return t.includes(n)},i.findEventPathWithNodeName=(r,t)=>{let n=r.composedPath()||r.path;if(n)return n.filter((r=>r.nodeName===t))[0]},i.findEventPath=(r,t)=>{t=Array.isArray(t)?t:[t];let n=r.composedPath()||r.path;if(n)return void 0!==n.filter((r=>t.includes(r)))[0]},i.objectIsEmpty=r=>0===Object.keys(r).length&&r.constructor===Object,i.convertIdsToNestedData=(r,t)=>{let n=[],e=[];return t.forEach((t=>{r&&r.indexOf(t.id.toString())>-1?n.push(t):t.items&&(e=i.convertIdsToNestedData(r,t.items),e.length>0&&(t.items=e,n.push(t)))})),n},i.nodeListToArray=r=>Array.prototype.slice.call(r),i.setAttributes=(r,t)=>{Object.keys(t).forEach((n=>{r.setAttribute(n,t[n])}))},i.computedStyle=(r,t)=>window.getComputedStyle(r,null).getPropertyValue(t),i.getAncestor=(r,t)=>{for(;(r=r.parentElement)&&!r.matches(t););return r},i.findParentElement=(r,t)=>{const n=t.charAt(0);if("*"===t)return r.parentElement;if("."===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.classList.contains(t))return r;r=r.parentElement}return null}(r.parentElement,n)}if("#"===n){const n=t.slice(1);return function(r,t){for(;null!==r;){if(r.id===t)return r;r=r.parentElement}return null}(r.parentElement,n)}if("["===n){const n=t.indexOf("]"),e=t.slice(1,n),o=t.slice(n+2,-1);return function(r,t,n){for(;null!==r;){if(r.hasAttribute(t)&&(void 0===n||r.getAttribute(t)===n))return r;r=r.parentElement}return null}(r.parentElement,e,o)}{const n=t.toLowerCase();return function(r,t){for(;null!==r;){if(r.tagName.toLowerCase()===t.toLowerCase())return r;r=r.parentElement}return null}(r.parentElement,n)}};export{i as G,n as S,e as T,o as s}
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Built with Stencil
|
|
3
3
|
* Copyright (c) Bromcom.
|
|
4
4
|
*/
|
|
5
|
-
import{r as t,c as i,f as s,h as e,H as a,g as r}from"./p-170cf07d.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as o}from"./p-
|
|
5
|
+
import{r as t,c as i,f as s,h as e,H as a,g as r}from"./p-170cf07d.js";import"./p-816fbffd.js";import"./p-626a65e9.js";import{G as o}from"./p-cd2293b7.js";import"./p-4ebb85f9.js";import"./p-6b5ed4d8.js";import"./p-0389b380.js";import"./p-7e44e6b5.js";import{d as h}from"./p-8c018ae0.js";import{a as n}from"./p-a313fba6.js";import"./p-436364c8.js";import"./p-4680865d.js";import"./p-e45c1546.js";import"./p-482054dc.js";const c=class{constructor(s){t(this,s),this.tabChange=i(this,"bcm-tab-change",7),this._id=o.UID(),this.active="1",this.color="blue",this.size=n.Size.medium}get tabItems(){return this.el.querySelectorAll("bcm-tab-item")}get tabItemHeaders(){return this.el.querySelectorAll("bcm-tab-item-header")}setTabAttributes(){this.tabItems.forEach(((t,i)=>{const s=!!t.hasAttribute("active"),e=!!t.hasAttribute("disabled"),a=i+1;t.setAttribute("index",`${a}`),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.removeAttribute("active"),t.removeAttribute("disabled"),s&&(t.setAttribute("active",""),this.active=a.toString()),e&&t.setAttribute("disabled","")})),Array.from(this.tabItems).some((t=>t.hasAttribute("active")))||this.tabItems[0].setAttribute("active","")}componentWillLoad(){this.setTabAttributes()}handleTabClick(t){var i,s;t&&(this.active=t.toString()),(null===(i=this.tabItems)||void 0===i?void 0:i.length)&&this.tabItems.forEach((t=>{t.removeAttribute("active"),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.getAttribute("index")==this.active&&t.setAttribute("active","")})),(null===(s=this.tabItemHeaders)||void 0===s?void 0:s.length)&&this.tabItemHeaders.forEach((t=>{t.removeAttribute("active"),t.setAttribute("size",this.size),t.setAttribute("color",this.color),t.getAttribute("index")==this.active&&t.setAttribute("active","")})),this.tabChange.emit(this.active)}componentDidRender(){this.inkBarControl(),this.handleTabClick()}componentDidLoad(){this.inkBarControl(),this.observeTabItem()}async setActive(t){t>0&&t<=this.tabItems.length&&t!=+this.active&&this.handleTabClick(t)}async refresh(){await h(100),s(this)}inkBarControl(){var t;const i=this.el.querySelector("#ink-bar");if(i&&(null===(t=this.tabItemHeaders)||void 0===t?void 0:t.length))for(let t=0;t<this.tabItemHeaders.length;t++){const s=this.tabItemHeaders[t];s.getAttribute("index")===this.active&&(i.style.width=`${s.offsetWidth}px`,i.style.transform=`translateX(${s.offsetLeft}px)`)}}activeChanged(t,i){var s;(null===(s=this.tabItems)||void 0===s?void 0:s.length)&&(Array.from(this.tabItems).some((i=>i.getAttribute("index")==t))||(this.active="1"))}observeTabItem(){this.observer=new MutationObserver((t=>{for(const i of t)if("childList"===i.type)for(const t of i.removedNodes)"BCM-TAB-ITEM"===t.nodeName&&((null==t?void 0:t.active)&&(this.active="1"),this.tabProcess())})),this.observer.observe(this.el,{childList:!0})}tabProcess(){this.updateTabHeaders(),this.regenerateIndex(),this.refresh(),this.inkBarControl()}updateTabHeaders(){const t=Array.from(this.tabItems).map((t=>t.getAttribute("id"))),i=Array.from(this.el.querySelector("#tab-header").querySelectorAll("bcm-tab-item-header"));t.length!==i.length&&i.forEach((i=>{const s=i.getAttribute("tab-id");t.includes(s)||i.remove()}))}regenerateIndex(){this.tabItems.forEach(((t,i)=>{const s=i+1;t.setAttribute("index",`${s}`);const e=this.el.querySelector(`bcm-tab-item-header[tab-id="${t.getAttribute("id")}"]`);e&&(e.setAttribute("index",`${s}`),e.style.order=`${s}`)}))}render(){const{color:t}=this,i=o.getTwColor({color:t,tones:[500]});return e(a,{role:"tablist","aria-label":"Tab Group",class:"tw-flex tw-w-full tw-flex-col tw-items-center tw-font-sans"},e("div",{class:"tw-relative tw-flex tw-w-full tw-flex-row tw-items-end tw-justify-between",id:"tab-header",style:i},e("div",{id:"ink-bar",class:"tw-bg-default-500 tw-absolute tw-bottom-0 tw-left-0 tw-mt-[-2px] tw-h-[2px] tw-rounded-sm tw-transition-transform"})),e("slot",null))}get el(){return r(this)}static get watchers(){return{active:["activeChanged"]}}};export{c as bcm_tab_group}
|