bromcom-ui 2.6.2-rc.7 → 2.6.3-new-ds.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bromcom-ui/bromcom-ui.css +1 -1
- package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
- package/dist/bromcom-ui/{p-9be362b8.entry.js → p-009ea4ef.entry.js} +1 -1
- package/dist/bromcom-ui/p-054aad50.entry.js +1 -0
- package/dist/bromcom-ui/{p-59a05aaa.entry.js → p-07aef975.entry.js} +1 -1
- package/dist/bromcom-ui/p-082e82d2.entry.js +1 -0
- package/dist/bromcom-ui/{p-ed6cb78d.entry.js → p-0d4564e3.entry.js} +1 -1
- package/dist/bromcom-ui/p-12313045.entry.js +1 -0
- package/dist/bromcom-ui/{p-268ac3f3.entry.js → p-138fbaec.entry.js} +1 -1
- package/dist/bromcom-ui/p-14640d95.entry.js +1 -0
- package/dist/bromcom-ui/p-16c7679f.entry.js +1 -0
- package/dist/bromcom-ui/{p-cf5ad9d4.entry.js → p-1c575d5e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-68159e46.entry.js → p-276615cc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-dce28227.entry.js → p-27734b80.entry.js} +1 -1
- package/dist/bromcom-ui/p-2b39c8ef.js +1 -0
- package/dist/bromcom-ui/{p-17e96453.js → p-2db6a141.js} +1 -1
- package/dist/bromcom-ui/p-3373816b.entry.js +1 -0
- package/dist/bromcom-ui/p-373a1ef4.entry.js +1 -0
- package/dist/bromcom-ui/{p-a489a6bd.entry.js → p-3b37bf88.entry.js} +1 -1
- package/dist/bromcom-ui/p-406a7903.entry.js +1 -0
- package/dist/bromcom-ui/{p-f5387ae1.entry.js → p-41845a80.entry.js} +1 -1
- package/dist/bromcom-ui/{p-2b2af2b7.entry.js → p-4b3d8b4b.entry.js} +1 -1
- package/dist/bromcom-ui/{p-57d75242.entry.js → p-4e9bac37.entry.js} +1 -1
- package/dist/bromcom-ui/{p-1fdae6b4.entry.js → p-5c9027ac.entry.js} +1 -1
- package/dist/bromcom-ui/p-5efac4c9.entry.js +1 -0
- package/dist/bromcom-ui/{p-e0182e3c.js → p-5f7aead2.js} +1 -1
- package/dist/bromcom-ui/{p-d9fb5e82.entry.js → p-638cf0e3.entry.js} +1 -1
- package/dist/bromcom-ui/p-6595d6c0.js +1 -0
- package/dist/bromcom-ui/p-66fbf8c0.js +1 -0
- package/dist/bromcom-ui/p-696e433b.entry.js +1 -0
- package/dist/bromcom-ui/{p-4037c37e.entry.js → p-6b0beb02.entry.js} +1 -1
- package/dist/bromcom-ui/p-71a83f4e.js +1 -0
- package/dist/bromcom-ui/{p-f5e3f6f2.entry.js → p-79484032.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7227b23c.entry.js → p-7b3bba17.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0d95fb7f.entry.js → p-7ba63e35.entry.js} +1 -1
- package/dist/bromcom-ui/p-8099c451.js +1 -0
- package/dist/bromcom-ui/{p-6b14a761.entry.js → p-861c1c38.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f0a83e99.entry.js → p-89805518.entry.js} +1 -1
- package/dist/bromcom-ui/p-94456a04.js +1 -0
- package/dist/bromcom-ui/{p-4b701f60.entry.js → p-9b03f34e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b7e75cee.js → p-9e7d3618.js} +1 -1
- package/dist/bromcom-ui/{p-46e61ea1.entry.js → p-a578a6f0.entry.js} +1 -1
- package/dist/bromcom-ui/p-af3de684.js +1 -0
- package/dist/bromcom-ui/{p-01adb7b7.entry.js → p-b414e783.entry.js} +1 -1
- package/dist/bromcom-ui/{p-71d066fb.entry.js → p-bba86e15.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9fc576cc.entry.js → p-bc394d89.entry.js} +1 -1
- package/dist/bromcom-ui/p-bfe2448b.js +1 -0
- package/dist/bromcom-ui/p-c05b0867.entry.js +1 -0
- package/dist/bromcom-ui/p-d48a8f83.entry.js +1 -0
- package/dist/bromcom-ui/{p-4021073f.entry.js → p-e3ccb280.entry.js} +1 -1
- package/dist/bromcom-ui/p-e4258c2a.entry.js +1 -0
- package/dist/bromcom-ui/{p-5d4fe0a9.entry.js → p-f72e7e82.entry.js} +1 -1
- package/dist/bromcom-ui/p-fbd97b73.entry.js +1 -0
- package/dist/bromcom-ui/p-fee1f12b.js +1 -0
- package/package.json +68 -68
- package/dist/bromcom-ui/p-52aa51ce.js +0 -1
- package/dist/bromcom-ui/p-60271ed7.js +0 -1
- package/dist/bromcom-ui/p-6e266ed0.js +0 -1
- package/dist/bromcom-ui/p-73eecb56.entry.js +0 -1
- package/dist/bromcom-ui/p-963478f0.entry.js +0 -1
- package/dist/bromcom-ui/p-9aee8ac6.js +0 -1
- package/dist/bromcom-ui/p-a62cdbe7.js +0 -1
- package/dist/bromcom-ui/p-aa2e4ead.entry.js +0 -1
- package/dist/bromcom-ui/p-abb13d19.js +0 -1
- package/dist/bromcom-ui/p-b43213d3.js +0 -1
- package/dist/bromcom-ui/p-b8aebe79.js +0 -1
- package/dist/bromcom-ui/p-c9cfcb10.entry.js +0 -1
- package/dist/bromcom-ui/p-cf9cdcdb.entry.js +0 -1
- package/dist/bromcom-ui/p-ea1b3d1b.entry.js +0 -1
- package/dist/bromcom-ui/p-f97bb531.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,H as a,g as i}from"./p-9d960649.js";import{G as n}from"./p-8099c451.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{B as l}from"./p-af3de684.js";import{s as h}from"./p-6d018a8f.js";import{c as r}from"./p-a8b797d7.js";import{S as c}from"./p-66fbf8c0.js";import{J as d}from"./p-bb6e1bdc.js";import{d as o}from"./p-a80ff3e5.js";import{I as u}from"./p-9e7d3618.js";const{state:p}=r({value:new Map}),m=(t,s)=>{let e=[];return t&&(e=t.map((t=>Object.assign(Object.assign(Object.assign({},t),{parentId:h((()=>s),null)}),t.items&&t.items.length>0&&{items:h((()=>m(t.items,t.id)),[])})))),e},f=t=>h((()=>p.value.get(t)),{}),b=(t,s,e)=>{let a=[],i=[],n=[],l=[];const{searchIsOnlyChilds:h}=f(t);return s&&s.length>0&&s.forEach((s=>{let r=h&&null!==s.parentId;if(c.slugify(s.text).indexOf(c.slugify(e))>-1&&(!h||h&&r)){if(n.push(s.id),a.push(s.id),i.push(s.id),l.push({id:s.id,text:s.text,parentId:s.parentId}),s.items&&s.items.length>0){const i=b(t,s.items,e);i.matching.length>0&&i.matching.forEach((t=>{a.push(t)}))}}else if(s.items&&s.items.length>0){const h=b(t,s.items,e);h.result.length>0&&(h.result.forEach((t=>{n.push(t)})),n.push(s.id),i.push(s.id),l.push({id:s.id,text:s.text,parentId:s.parentId,items:h.nestedResult})),h.matching.length>0&&a.push(...h.matching)}})),{result:n,matching:a,parentIndex:i,nestedResult:l}},v=(t,s,e)=>{let a;a=e&&e.length>0?e:f(t).dataSource;let i=[];return a&&i.push(b(t,a,s)),{result:n.flatArray(i[0].result),matching:i[0].matching,parentIndex:i[0].parentIndex,nestedResult:i[0].nestedResult}};const j=class{constructor(e){t(this,e),this.bcmOnSearch=s(this,"bcm-on-search",7),this.bcmOnSearchClear=s(this,"bcm-on-search-clear",7),this._id=n.UID(),this.placeholder="Search",this.disabled=!1,this.readonly=!1,this.clearable=!0,this.size=l.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,s;this.isActiveClearable=(null===(s=null===(t=this.inputElement)||void 0===t?void 0:t.value)||void 0===s?void 0:s.length)>0&&this.clearable}))}async componentDidLoad(){await this.initState()}async dataChanged(t,s){t!==s&&await this.initState()}async initState(){await(t=>{const{id:s,dataSource:e}=t,a={id:h((()=>s),n.UID),dataSource:e&&e.length>0&&m(e),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:s,id:e}=this.inputElement;return v(e,s),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,s){const{value:e,id:a}=t.target,i=(null==e?void 0:e.length)>=2?v(a,e,null):null,{bcmOnSearch:n,inputElement:l}=s;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:s,disabled:i,readonly:n}=this;return e(a,{onClick:()=>{this.onBcmFocus(),this.onBcmSelect()}},e(u,{size:this.size,id:t,type:"search",placeholder:s,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,s,e,a){var i,n=arguments.length,l=n<3?s:null===a?a=Object.getOwnPropertyDescriptor(s,e):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)l=Reflect.decorate(t,s,e,a);else for(var h=t.length-1;h>=0;h--)(i=t[h])&&(l=(n<3?i(l):n>3?i(s,e,l):i(s,e))||l);n>3&&l&&Object.defineProperty(s,e,l)}([d("data")],j.prototype,"data",void 0);export{j as bcm_search_2}
|