bromcom-ui 2.6.3-new-ds.6 → 2.6.3-new-ds.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-336851de.entry.js → p-08977dbb.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0e304371.entry.js → p-0d3acd50.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e2de821d.entry.js → p-0f36fdc0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-579ccea6.entry.js → p-12326068.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3914ba60.entry.js → p-1275ba64.entry.js} +1 -1
- package/dist/bromcom-ui/{p-498773fa.entry.js → p-157f6037.entry.js} +1 -1
- package/dist/bromcom-ui/{p-22a5cf45.entry.js → p-1605ead8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-01f293ce.entry.js → p-24b206b6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3e1e07fc.entry.js → p-25cd7b33.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ec06fb2f.entry.js → p-30e4ec96.entry.js} +1 -1
- package/dist/bromcom-ui/{p-40e35d93.entry.js → p-3596ee65.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7632628c.entry.js → p-37426589.entry.js} +1 -1
- package/dist/bromcom-ui/{p-65660c16.entry.js → p-5e215247.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ef1b42ba.entry.js → p-6ad55e15.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4a61cf92.entry.js → p-785e041e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b486cae3.js → p-78bec67b.js} +1 -1
- package/dist/bromcom-ui/{p-2d4ecbf0.entry.js → p-7a00c72b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dd93f3b1.entry.js → p-98211e55.entry.js} +1 -1
- package/dist/bromcom-ui/{p-72d1e415.entry.js → p-98ee7339.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89ede8c2.entry.js → p-9ca74cb4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-80df2240.entry.js → p-a4652673.entry.js} +1 -1
- package/dist/bromcom-ui/p-b32132cd.entry.js +1 -0
- package/dist/bromcom-ui/{p-39d9f226.entry.js → p-b34733a8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-62550b36.entry.js → p-b3981e18.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ebbef730.entry.js → p-b56b84d8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-094e55c8.entry.js → p-b750655b.entry.js} +1 -1
- package/dist/bromcom-ui/p-be798ff9.entry.js +1 -0
- package/dist/bromcom-ui/{p-5d7657c4.entry.js → p-c3dc7f60.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9ba0c6fb.entry.js → p-c750fa84.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6e51f300.entry.js → p-ccf0c5a6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5e2c13b6.entry.js → p-d19876c3.entry.js} +1 -1
- package/dist/bromcom-ui/{p-349f7a06.entry.js → p-d1ac618a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dfc7ba99.entry.js → p-e843d994.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7f4b5acb.entry.js → p-e9007811.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9cf7682f.entry.js → p-e9667fc1.entry.js} +1 -1
- package/dist/bromcom-ui/{p-04e3c61c.js → p-eb136c15.js} +1 -1
- package/dist/bromcom-ui/{p-6adef7bc.entry.js → p-edfd9eba.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bdcea326.entry.js → p-eeb92456.entry.js} +1 -1
- package/dist/bromcom-ui/{p-094838e0.entry.js → p-efeb0ebe.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b5192846.entry.js → p-f07bed0c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4f5d5e8c.entry.js → p-f2a3b73d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-906cd1d8.entry.js → p-fb6ea0c2.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-32b586bd.entry.js +0 -1
- package/dist/bromcom-ui/p-3a091bcb.entry.js +0 -1
- package/dist/bromcom-ui/p-a4433a78.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as s,r as e,c as t,g as i}from"./p-9d960649.js";import{G as c}from"./p-
|
|
1
|
+
import{h as s,r as e,c as t,g as i}from"./p-9d960649.js";import{G as c}from"./p-78bec67b.js";import"./p-6d018a8f.js";import{B as o}from"./p-af3de684.js";import"./p-112455b1.js";import{c as r}from"./p-7294ec8e.js";import{C as l}from"./p-312efff7.js";import{e as a}from"./p-a80ff3e5.js";import{N as h}from"./p-44d6172f.js";var n;!function(s){s.black="black",s.white="white",s["prime-blue"]="prime-blue",s.grey="grey",s.blue="blue",s.warmyellow="warmyellow",s.yellow="yellow",s.limegreen="limegreen",s.red="red",s.darkorange="darkorange",s.orange="orange",s.green="green",s.turquosie="turquosie",s.cobaltblue="cobaltblue",s.magenta="magenta",s.purple="purple",s["bc-red"]="bc-red",s["bc-blue"]="bc-blue",s["bc-green"]="bc-green",s["bc-orange"]="bc-orange"}(n||(n={}));const d=({_id:e,color:t,customStyle:i,size:c,checked:d,hidden:m,value:p,type:b,onDismiss:u,onSelect:f})=>{!c&&(c=o.FontSize["size-1"]);const g=(s,e=!1)=>(h.isNumber(s)&&(s=o.FontSize["size-"+s]||o.FontSize["size-4"]),e?+(o.FontSizeValue[s]||o.FontSizeValue["size-4"])+2:s),y=r("bcm-tag__content",b,g(c)),k=r("bcm-tag",{hidden:m}),j=g(c,!0);return s("div",{id:e,class:r(k,{checked:d})},s("span",{hidden:!0},s("slot",null)),s("span",{class:y,style:(s=>{if((b===o.TagType.basic||b==o.TagType.dismissable)&&n[s])return{color:a(l,n[s]+"-6"),borderColor:a(l,n[s]+"-3"),backgroundColor:a(l,n[s]+"-1")}})(t),onClick:s=>f(s)},b===o.TagType.add&&s("span",{class:"left"},s("bcm-old-icon",{icon:"plus",type:"outlined",color:"grey-8",size:j})),b===o.TagType.checkable&&s("input",{type:"checkbox",checked:d}),s("span",{class:"value",style:i},p),b===o.TagType.dismissable&&s("span",{class:"right close-button",onClick:s=>u(s)},s("i",{class:"bcm-fal bcm-fa-times"}))))},m=class{constructor(s){e(this,s),this.change=t(this,"bcm-change",7),this.tagDismissable=t(this,"bcm-tag-dismissable",7),this.bcmTagSelect=t(this,"bcm-tag-select",7),this._id=c.UID(),this._internal_id=c.UID(),this.hidden=!1,this.value="",this.type=o.TagType.basic,this.checked=!1,this.size=o.FontSize["size-1"],this.closeFunc=s=>s,this.selectFunc=s=>s}handleClick(){this.type===o.TagType.checkable&&this.handleChecked()}handleClose(){this.tagDismissable.emit(this.el)}handleChecked(){this.checked=!this.checked,this.change.emit(this.checked)}render(){const{type:e,color:t,value:i,customStyle:c,size:r,hidden:l,checked:a}=this;return s(d,{size:r,hidden:l,color:t,customStyle:c,checked:a,value:i,type:o.TagType[e],onSelect:s=>{this.bcmTagSelect.emit(s),this.selectFunc({event:s,id:this._id})},onDismiss:s=>{this.handleClose(),this.closeFunc(s)}})}get el(){return i(this)}};export{m as bcm_tag}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as e,h as s,H as a,g as i}from"./p-9d960649.js";import{G as n}from"./p-
|
|
1
|
+
import{r as t,c as e,h as s,H as a,g as i}from"./p-9d960649.js";import{G as n}from"./p-78bec67b.js";import{s as l}from"./p-6d018a8f.js";import{J as h}from"./p-bb6e1bdc.js";import{B as r}from"./p-af3de684.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{c}from"./p-a8b797d7.js";import{S as d}from"./p-b2a54dac.js";import{d as o}from"./p-a80ff3e5.js";import{I as u}from"./p-ed38e5d2.js";const{state:p}=c({value:new Map}),m=(t,e)=>{let s=[];return t&&(s=t.map((t=>Object.assign(Object.assign(Object.assign({},t),{parentId:l((()=>e),null)}),t.items&&t.items.length>0&&{items:l((()=>m(t.items,t.id)),[])})))),s},f=t=>l((()=>p.value.get(t)),{}),b=(t,e,s)=>{let a=[],i=[],n=[],l=[];const{searchIsOnlyChilds:h}=f(t);return e&&e.length>0&&e.forEach((e=>{let r=h&&null!==e.parentId;if(d.slugify(e.text).indexOf(d.slugify(s))>-1&&(!h||h&&r)){if(n.push(e.id),a.push(e.id),i.push(e.id),l.push({id:e.id,text:e.text,parentId:e.parentId}),e.items&&e.items.length>0){const i=b(t,e.items,s);i.matching.length>0&&i.matching.forEach((t=>{a.push(t)}))}}else if(e.items&&e.items.length>0){const h=b(t,e.items,s);h.result.length>0&&(h.result.forEach((t=>{n.push(t)})),n.push(e.id),i.push(e.id),l.push({id:e.id,text:e.text,parentId:e.parentId,items:h.nestedResult})),h.matching.length>0&&a.push(...h.matching)}})),{result:n,matching:a,parentIndex:i,nestedResult:l}},v=(t,e,s)=>{let a;a=s&&s.length>0?s:f(t).dataSource;let i=[];return a&&i.push(b(t,a,e)),{result:n.flatArray(i[0].result),matching:i[0].matching,parentIndex:i[0].parentIndex,nestedResult:i[0].nestedResult}};const j=class{constructor(s){t(this,s),this.bcmOnSearch=e(this,"bcm-on-search",7),this.bcmOnSearchClear=e(this,"bcm-on-search-clear",7),this._id=n.UID(),this.placeholder="Search",this.disabled=!1,this.readonly=!1,this.clearable=!0,this.size=r.Size.medium,this.limit=10,this.searchIsOnlyChilds=!1,this.data=[],this.tick={},this.isActiveClearable=!1,this.debounceHandler=n.debounceInput((t=>this.onSearchValue(t,this)),300,!1,(()=>{var t,e;this.isActiveClearable=(null===(e=null===(t=this.inputElement)||void 0===t?void 0:t.value)||void 0===e?void 0:e.length)>0&&this.clearable}))}async componentDidLoad(){await this.initState()}async dataChanged(t,e){t!==e&&await this.initState()}async initState(){await(t=>{const{id:e,dataSource:s}=t,a={id:l((()=>e),n.UID),dataSource:s&&s.length>0&&m(s),searchIsOnlyChilds:t.searchIsOnlyChilds};p.value.set(a.id,a)})({id:this._id,dataSource:this.data,searchIsOnlyChilds:this.searchIsOnlyChilds}),await this.markForCheck()}markForCheck(){this.tick=n.UID()}handleInput(){}async onBcmFocus(){this.inputElement.focus()}async onBcmBlur(){this.inputElement.blur()}async onBcmSelect(){this.inputElement.select()}async setValue(t){this.inputElement.value=t}handleFocus(){}handleBlur(){}handleChange(){}async handleClear(t=!0){this.inputElement.value="";const{value:e,id:s}=this.inputElement;return v(s,e),this.isActiveClearable=!1,this.bcmOnSearch.emit({result:null,value:null,matching:null,parentIndex:null}),this.bcmOnSearchClear.emit(t),await o(10),Promise.resolve()}onSearchValue(t,e){const{value:s,id:a}=t.target,i=(null==s?void 0:s.length)>=2?v(a,s,null):null,{bcmOnSearch:n,inputElement:l}=e;n.emit({result:null==i?void 0:i.result,value:null==l?void 0:l.value,matching:null==i?void 0:i.matching,parentIndex:null==i?void 0:i.parentIndex,nestedResult:null==i?void 0:i.nestedResult})}render(){const{_id:t,placeholder:e,disabled:i,readonly:n}=this;return s(a,{onClick:()=>{this.onBcmFocus(),this.onBcmSelect()}},s(u,{size:this.size,id:t,type:"search",placeholder:e,disabled:i,"full-width":!0,readonly:n,clearable:this.isActiveClearable,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleClear:()=>this.handleClear(),handleInput:this.debounceHandler,ref:t=>this.inputElement=t}))}get el(){return i(this)}static get watchers(){return{data:["dataChanged"]}}};!function(t,e,s,a){var i,n=arguments.length,l=n<3?e:null===a?a=Object.getOwnPropertyDescriptor(e,s):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,e,s,a);else for(var h=t.length-1;h>=0;h--)(i=t[h])&&(l=(n<3?i(l):n>3?i(e,s,l):i(e,s))||l);n>3&&l&&Object.defineProperty(e,s,l)}([h("data")],j.prototype,"data",void 0);export{j as bcm_search_2}
|