bromcom-ui 2.6.3-new-ds.7 → 2.6.3-new-ds.10

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.
Files changed (69) hide show
  1. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  2. package/dist/bromcom-ui/{p-7a00c72b.entry.js → p-03be7960.entry.js} +1 -1
  3. package/dist/bromcom-ui/{p-d1ac618a.entry.js → p-0b1f7cf9.entry.js} +1 -1
  4. package/dist/bromcom-ui/p-0cc66bb8.entry.js +1 -0
  5. package/dist/bromcom-ui/{p-25cd7b33.entry.js → p-0e7536e3.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-fb6ea0c2.entry.js → p-155734e9.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-785e041e.entry.js → p-1adb3e94.entry.js} +1 -1
  8. package/dist/bromcom-ui/{p-59bc3473.entry.js → p-1f4edc5c.entry.js} +1 -1
  9. package/dist/bromcom-ui/{p-b2a54dac.js → p-208caef1.js} +1 -1
  10. package/dist/bromcom-ui/p-222abab3.entry.js +1 -0
  11. package/dist/bromcom-ui/{p-b750655b.entry.js → p-46b2ff80.entry.js} +1 -1
  12. package/dist/bromcom-ui/p-4f0b713b.entry.js +1 -0
  13. package/dist/bromcom-ui/{p-c750fa84.entry.js → p-4f4aaf4f.entry.js} +1 -1
  14. package/dist/bromcom-ui/{p-12326068.entry.js → p-6b0da512.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-b56b84d8.entry.js → p-6f3ad022.entry.js} +1 -1
  16. package/dist/bromcom-ui/p-72691c7f.entry.js +1 -0
  17. package/dist/bromcom-ui/p-754b36be.entry.js +1 -0
  18. package/dist/bromcom-ui/{p-eb136c15.js → p-7d4e52fd.js} +1 -1
  19. package/dist/bromcom-ui/{p-b34733a8.entry.js → p-834d1edf.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-e843d994.entry.js → p-888b55b8.entry.js} +1 -1
  21. package/dist/bromcom-ui/{p-6add756e.entry.js → p-88e33f76.entry.js} +1 -1
  22. package/dist/bromcom-ui/p-8da6fc71.entry.js +1 -0
  23. package/dist/bromcom-ui/p-92dc7d6b.js +1 -0
  24. package/dist/bromcom-ui/p-959fb963.js +1 -0
  25. package/dist/bromcom-ui/{p-30e4ec96.entry.js → p-9cc8e7fc.entry.js} +1 -1
  26. package/dist/bromcom-ui/{p-f2a3b73d.entry.js → p-a2f6a4fd.entry.js} +1 -1
  27. package/dist/bromcom-ui/{p-0f36fdc0.entry.js → p-aaa59dc9.entry.js} +1 -1
  28. package/dist/bromcom-ui/p-b2f62d97.entry.js +1 -0
  29. package/dist/bromcom-ui/{p-5e215247.entry.js → p-b8e1411c.entry.js} +1 -1
  30. package/dist/bromcom-ui/{p-9ca74cb4.entry.js → p-ba3c9a3e.entry.js} +1 -1
  31. package/dist/bromcom-ui/p-ba3d0dc2.js +1 -0
  32. package/dist/bromcom-ui/p-beba9505.js +1 -0
  33. package/dist/bromcom-ui/{p-44cf341c.entry.js → p-c1a80212.entry.js} +1 -1
  34. package/dist/bromcom-ui/p-c6585e44.js +1 -0
  35. package/dist/bromcom-ui/{p-c3dc7f60.entry.js → p-c84126ce.entry.js} +1 -1
  36. package/dist/bromcom-ui/p-cabaa43d.js +1 -0
  37. package/dist/bromcom-ui/{p-98ee7339.entry.js → p-cb4ff2de.entry.js} +1 -1
  38. package/dist/bromcom-ui/{p-eeb92456.entry.js → p-cc209203.entry.js} +1 -1
  39. package/dist/bromcom-ui/{p-a4652673.entry.js → p-cde15c69.entry.js} +1 -1
  40. package/dist/bromcom-ui/{p-6ad55e15.entry.js → p-cf213149.entry.js} +1 -1
  41. package/dist/bromcom-ui/{p-1c575d5e.entry.js → p-cf5ad9d4.entry.js} +1 -1
  42. package/dist/bromcom-ui/{p-efeb0ebe.entry.js → p-d52ed428.entry.js} +1 -1
  43. package/dist/bromcom-ui/{p-37426589.entry.js → p-d70690a2.entry.js} +1 -1
  44. package/dist/bromcom-ui/{p-ccf0c5a6.entry.js → p-da8a4445.entry.js} +1 -1
  45. package/dist/bromcom-ui/p-df9e2503.entry.js +1 -0
  46. package/dist/bromcom-ui/{p-edfd9eba.entry.js → p-e0a1fdab.entry.js} +1 -1
  47. package/dist/bromcom-ui/{p-0d3acd50.entry.js → p-e301ba6e.entry.js} +1 -1
  48. package/dist/bromcom-ui/{p-be798ff9.entry.js → p-e4e0dc4e.entry.js} +1 -1
  49. package/dist/bromcom-ui/p-e7e3f754.entry.js +1 -0
  50. package/dist/bromcom-ui/{p-24b206b6.entry.js → p-ecaef875.entry.js} +1 -1
  51. package/dist/bromcom-ui/{p-e9667fc1.entry.js → p-ed4fac5e.entry.js} +1 -1
  52. package/dist/bromcom-ui/{p-157f6037.entry.js → p-f12ea660.entry.js} +1 -1
  53. package/dist/bromcom-ui/{p-98211e55.entry.js → p-f2a771ae.entry.js} +1 -1
  54. package/dist/bromcom-ui/{p-1275ba64.entry.js → p-f3a7e3ea.entry.js} +1 -1
  55. package/package.json +1 -1
  56. package/dist/bromcom-ui/p-08977dbb.entry.js +0 -1
  57. package/dist/bromcom-ui/p-1605ead8.entry.js +0 -1
  58. package/dist/bromcom-ui/p-3596ee65.entry.js +0 -1
  59. package/dist/bromcom-ui/p-6695efde.js +0 -1
  60. package/dist/bromcom-ui/p-78bec67b.js +0 -1
  61. package/dist/bromcom-ui/p-80661d65.js +0 -1
  62. package/dist/bromcom-ui/p-af3de684.js +0 -1
  63. package/dist/bromcom-ui/p-b144eb5e.js +0 -1
  64. package/dist/bromcom-ui/p-b32132cd.entry.js +0 -1
  65. package/dist/bromcom-ui/p-b3981e18.entry.js +0 -1
  66. package/dist/bromcom-ui/p-d19876c3.entry.js +0 -1
  67. package/dist/bromcom-ui/p-e9007811.entry.js +0 -1
  68. package/dist/bromcom-ui/p-ed38e5d2.js +0 -1
  69. package/dist/bromcom-ui/p-f07bed0c.entry.js +0 -1
@@ -1 +0,0 @@
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}