bromcom-ui 2.5.3-rc.5 → 2.5.3-rc.8

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 (57) hide show
  1. package/dist/bromcom-ui/bromcom-ui.css +1 -1
  2. package/dist/bromcom-ui/bromcom-ui.esm.js +1 -1
  3. package/dist/bromcom-ui/{p-ba018693.entry.js → p-15136124.entry.js} +1 -1
  4. package/dist/bromcom-ui/{p-2321379f.entry.js → p-17f685ea.entry.js} +1 -1
  5. package/dist/bromcom-ui/{p-4b3d221f.entry.js → p-1875bdc8.entry.js} +1 -1
  6. package/dist/bromcom-ui/{p-5d501f29.entry.js → p-1a2ab25a.entry.js} +1 -1
  7. package/dist/bromcom-ui/{p-32364231.entry.js → p-2782fecb.entry.js} +1 -1
  8. package/dist/bromcom-ui/p-3263f20b.entry.js +1 -0
  9. package/dist/bromcom-ui/p-3d28cef2.entry.js +1 -0
  10. package/dist/bromcom-ui/p-430d7966.entry.js +1 -0
  11. package/dist/bromcom-ui/{p-5609cb2a.js → p-52455882.js} +1 -1
  12. package/dist/bromcom-ui/p-5632fdf3.entry.js +1 -0
  13. package/dist/bromcom-ui/p-5f3c0fe2.js +1 -0
  14. package/dist/bromcom-ui/{p-c9608781.entry.js → p-721d1cd6.entry.js} +1 -1
  15. package/dist/bromcom-ui/{p-f847893e.entry.js → p-77803b18.entry.js} +1 -1
  16. package/dist/bromcom-ui/{p-6a647a28.entry.js → p-77e897f5.entry.js} +1 -1
  17. package/dist/bromcom-ui/p-7c6bd833.entry.js +1 -0
  18. package/dist/bromcom-ui/{p-5a44dd0c.js → p-7d0feff7.js} +1 -1
  19. package/dist/bromcom-ui/{p-95640267.entry.js → p-7fb6a598.entry.js} +1 -1
  20. package/dist/bromcom-ui/{p-cb6103d8.entry.js → p-8de083dd.entry.js} +1 -1
  21. package/dist/bromcom-ui/p-92bdc903.entry.js +1 -0
  22. package/dist/bromcom-ui/{p-20a71b63.entry.js → p-a0cc0d7a.entry.js} +1 -1
  23. package/dist/bromcom-ui/{p-2579dc31.entry.js → p-afa245fc.entry.js} +1 -1
  24. package/dist/bromcom-ui/p-afac41f4.entry.js +1 -0
  25. package/dist/bromcom-ui/p-b99834cd.js +1 -0
  26. package/dist/bromcom-ui/{p-1925660a.entry.js → p-bd9ba462.entry.js} +1 -1
  27. package/dist/bromcom-ui/p-bebcb291.entry.js +1 -0
  28. package/dist/bromcom-ui/{p-acb7017e.entry.js → p-c5687e29.entry.js} +1 -1
  29. package/dist/bromcom-ui/{p-660bd6d5.entry.js → p-c87e24cf.entry.js} +1 -1
  30. package/dist/bromcom-ui/p-cd935626.entry.js +1 -0
  31. package/dist/bromcom-ui/p-ce78003c.js +1 -0
  32. package/dist/bromcom-ui/p-de0ef1a8.entry.js +1 -0
  33. package/dist/bromcom-ui/{p-17fb4985.entry.js → p-e3c75ba9.entry.js} +1 -1
  34. package/dist/bromcom-ui/{p-d45ec4b1.entry.js → p-e70912b4.entry.js} +1 -1
  35. package/dist/bromcom-ui/p-e79d841d.entry.js +1 -0
  36. package/dist/bromcom-ui/p-ebe71480.entry.js +1 -0
  37. package/dist/bromcom-ui/{p-4fd8d0d5.entry.js → p-ed26b2be.entry.js} +1 -1
  38. package/dist/bromcom-ui/p-effc0c8f.js +1 -0
  39. package/dist/bromcom-ui/p-f0b35e4b.entry.js +1 -0
  40. package/dist/bromcom-ui/p-f5d57ccd.js +1 -0
  41. package/package.json +3 -3
  42. package/dist/bromcom-ui/p-0730ede4.entry.js +0 -1
  43. package/dist/bromcom-ui/p-09cef442.entry.js +0 -1
  44. package/dist/bromcom-ui/p-0b7b25d4.js +0 -1
  45. package/dist/bromcom-ui/p-136d305e.entry.js +0 -1
  46. package/dist/bromcom-ui/p-3b2c4149.entry.js +0 -1
  47. package/dist/bromcom-ui/p-578d57f8.entry.js +0 -1
  48. package/dist/bromcom-ui/p-63d1dc9d.entry.js +0 -1
  49. package/dist/bromcom-ui/p-727e9696.js +0 -1
  50. package/dist/bromcom-ui/p-72c62012.js +0 -1
  51. package/dist/bromcom-ui/p-7cd6216d.entry.js +0 -1
  52. package/dist/bromcom-ui/p-94eba718.entry.js +0 -1
  53. package/dist/bromcom-ui/p-984d03f1.entry.js +0 -1
  54. package/dist/bromcom-ui/p-9c258e11.js +0 -1
  55. package/dist/bromcom-ui/p-b5d21d45.entry.js +0 -1
  56. package/dist/bromcom-ui/p-df61df30.js +0 -1
  57. package/dist/bromcom-ui/p-f8c83927.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as e,H as r,g as i}from"./p-9d960649.js";import{G as o}from"./p-9c258e11.js";import"./p-7e73190d.js";import"./p-112455b1.js";import{s as d}from"./p-6d018a8f.js";import{S as l}from"./p-72c62012.js";const a=class{constructor(e){t(this,e),this.bcmItems=s(this,"bcm-items",7),this._id=o.UID()}connectedCallback(){if(this.el.children&&this.el.children.length>0){let t=d((()=>{var t;return Array.from(null===(t=this.el)||void 0===t?void 0:t.children).map((t=>({id:t.getAttribute("id")||o.UID(),text:t.getAttribute("text")||t.textContent.trim(),isHtmlContent:t.innerHTML.trim(),disabled:l.elementBooleanCheck(t.getAttribute("disabled")),selected:l.elementBooleanCheck(t.getAttribute("selected")),checked:l.elementBooleanCheck(t.getAttribute("checked")),readonly:l.elementBooleanCheck(t.getAttribute("readonly"))})))}),[]);this.bcmItems.emit(t),this.el.remove()}}render(){return e(r,null,e("slot",null))}get el(){return i(this)}};export{a as bcm_items}
@@ -1 +0,0 @@
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-9c258e11.js";import{B as l}from"./p-7e73190d.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{s as h}from"./p-6d018a8f.js";import{c as r}from"./p-a8b797d7.js";import{S as c}from"./p-72c62012.js";import{d}from"./p-a80ff3e5.js";import{I as o}from"./p-5a44dd0c.js";import{J as u}from"./p-bb6e1bdc.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)),{}),v=(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=v(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=v(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}},b=(t,s,e)=>{let a;a=e&&e.length>0?e:f(t).dataSource;let i=[];return a&&i.push(v(t,a,s)),{result:n.flatArray(i[0].result),matching:i[0].matching,parentIndex:i[0].parentIndex,nestedResult:i[0].nestedResult}};const y=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.searchIsOnlyParents=!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,searchIsOnlyParents:t.searchIsOnlyParents};p.value.set(a.id,a)})({id:this._id,dataSource:this.data,searchIsOnlyChilds:this.searchIsOnlyChilds,searchIsOnlyParents:this.searchIsOnlyParents}),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 b(e,s),this.isActiveClearable=!1,this.bcmOnSearch.emit({result:null,value:null,matching:null,parentIndex:null}),this.bcmOnSearchClear.emit(t),await d(10),Promise.resolve()}onSearchValue(t,s){const{value:e,id:a}=t.target,i=(null==e?void 0:e.length)>=2?b(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(o,{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)}([u("data")],y.prototype,"data",void 0);export{y as bcm_search_2}
@@ -1 +0,0 @@
1
- var e,r;!function(e){e.info="info",e.error="error",e.warning="warning",e.success="success",e.default="default"}(e||(e={})),function(e){e.banner="banner",e.basic="basic"}(r||(r={}));const o=["localhost","beta-regression.bromcomcloud.com","beta-scrum.bromcomcloud.com","beta-kanban.bromcomcloud.com"];(()=>{const e=window.location.hostname;return o.includes(e)})()&&console.log("%cbromcom ui%c version: 2.5.3-rc.5-p ","color: white; background:#1890FF; font-weight: 300; font-size:10px; padding:2px 6px; border-radius: 5px","font-size:10px;");class c{}c.UID=()=>Math.random().toString(36).substr(2,9),c.getIconAttrWithStatusType=(r,o=!1)=>{if(o)return{icon:"loading",color:"blue-6"};switch(r){case e.info:return{color:"blue-6",icon:"info-circle"};case e.error:return{color:"red-6",icon:"close-circle"};case e.warning:return{color:"warmyellow-6",icon:"exclamation-circle"};case e.success:return{color:"green-6",icon:"check-circle"}}},c.createComponent=(e,r)=>{let o=document.getElementById("append-area");o||(o=document.createElement("div"),o.id="append-area",document.body.appendChild(o)),o.style.visibility="hidden",o.style.opacity="0";let c=document.getElementById(r.id);return c||(c=document.createElement(e)),Object.keys(r).forEach((e=>{c[e]=r[e]})),o.appendChild(c),c},c.debounceInput=(e,r,o,c)=>{let n;return function(){let t=this,i=arguments;c&&c.apply(t,i);let l=function(){n=null,o||e.apply(t,i)},a=o&&!n;clearTimeout(n),n=setTimeout(l,r),a&&e.apply(t,i)}},c.flatArray=e=>e.reduce(((e,r)=>e.concat(Array.isArray(r)?c.flatArray(r):r)),[]),c.reverseNodeList=e=>{let r=[];for(let o=e.length-1;o>=0;o--)r.push(e[o]);return r},c.findEventPathWithKey=(e,r,o)=>{o=Array.isArray(o)?o:[o];let c=e.path||e.composedPath();if(c)return void 0!==c.filter((e=>o.includes(e[r])))[0]},c.findEventTarget=(e,r)=>{r=Array.isArray(r)?r:[r];let o=e.target||e.srcElement;if(console.log(o),o)return r.includes(o)},c.findEventPathWithNodeName=(e,r)=>{let o=e.path||e.composedPath();if(o)return o.filter((e=>e.nodeName===r))[0]},c.findEventPath=(e,r)=>{r=Array.isArray(r)?r:[r];let o=e.path||e.composedPath();if(o)return void 0!==o.filter((e=>r.includes(e)))[0]},c.objectIsEmpty=e=>0===Object.keys(e).length&&e.constructor===Object,c.convertIdsToNestedData=(e,r)=>{let o=[],n=[];return r.forEach((r=>{e&&e.indexOf(r.id)>-1?o.push(r):r.items&&(n=c.convertIdsToNestedData(e,r.items),n.length>0&&(r.items=n,o.push(r)))})),o},c.nodeListToArray=e=>Array.prototype.slice.call(e),c.setAttributes=(e,r)=>{Object.keys(r).forEach((o=>{e.setAttribute(o,r[o])}))};export{c as G,e as S,r as T}