bromcom-ui 2.5.3-rc.7 → 2.6.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-04715e25.entry.js +1 -0
- package/dist/bromcom-ui/{p-5c6f38e0.entry.js → p-086480c8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f85942b6.entry.js → p-0b450f3c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8ac4d389.entry.js → p-0dada2ef.entry.js} +1 -1
- package/dist/bromcom-ui/p-0e75b906.entry.js +1 -0
- package/dist/bromcom-ui/p-1000817a.entry.js +1 -0
- package/dist/bromcom-ui/p-124d8fc2.js +1 -0
- package/dist/bromcom-ui/{p-79f4bb16.entry.js → p-13c40d3e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-0014cccd.entry.js → p-1b42141b.entry.js} +1 -1
- package/dist/bromcom-ui/p-1c575d5e.entry.js +1 -0
- package/dist/bromcom-ui/{p-274a1abf.entry.js → p-1d6283cc.entry.js} +1 -1
- package/dist/bromcom-ui/p-2301a2b6.entry.js +1 -0
- package/dist/bromcom-ui/{p-1875bdc8.entry.js → p-25d0939e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-54f75813.entry.js → p-2e3678b6.entry.js} +1 -1
- package/dist/bromcom-ui/p-33931412.entry.js +1 -0
- package/dist/bromcom-ui/p-3d5afd5c.entry.js +1 -0
- package/dist/bromcom-ui/p-407ce259.js +1 -0
- package/dist/bromcom-ui/p-474ec4cc.js +1 -0
- package/dist/bromcom-ui/p-4af1fb2b.js +1 -0
- package/dist/bromcom-ui/{p-79b2cd0c.entry.js → p-4b16f50d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-154962f2.entry.js → p-5d1d29f4.entry.js} +1 -1
- package/dist/bromcom-ui/p-67fdd6ef.entry.js +1 -0
- package/dist/bromcom-ui/p-6f390031.js +1 -0
- package/dist/bromcom-ui/p-7467b1e4.entry.js +1 -0
- package/dist/bromcom-ui/p-82d0b82e.entry.js +1 -0
- package/dist/bromcom-ui/p-878dcaf3.entry.js +1 -0
- package/dist/bromcom-ui/p-87f2312b.entry.js +1 -0
- package/dist/bromcom-ui/p-896e1a29.entry.js +1 -0
- package/dist/bromcom-ui/{p-ad399c29.entry.js → p-968781bc.entry.js} +1 -1
- package/dist/bromcom-ui/p-a69c842b.js +1 -0
- package/dist/bromcom-ui/{p-ccb32cb9.entry.js → p-c078014c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6044e810.entry.js → p-ca02ca51.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8cab8a30.entry.js → p-ce39d425.entry.js} +1 -1
- package/dist/bromcom-ui/p-d4758438.entry.js +1 -0
- package/dist/bromcom-ui/p-e99f720c.entry.js +1 -0
- package/dist/bromcom-ui/{p-52455882.js → p-f8031360.js} +1 -1
- package/dist/bromcom-ui/{p-77803b18.entry.js → p-f847893e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7d0feff7.js → p-faaebe40.js} +1 -1
- package/dist/bromcom-ui/p-ffef5aef.entry.js +1 -0
- package/package.json +1 -1
- package/dist/bromcom-ui/p-0c3edaab.entry.js +0 -1
- package/dist/bromcom-ui/p-118fb279.js +0 -1
- package/dist/bromcom-ui/p-13645646.entry.js +0 -1
- package/dist/bromcom-ui/p-176de10a.entry.js +0 -1
- package/dist/bromcom-ui/p-1beb86f7.entry.js +0 -1
- package/dist/bromcom-ui/p-2432b495.entry.js +0 -1
- package/dist/bromcom-ui/p-287dec0c.entry.js +0 -1
- package/dist/bromcom-ui/p-430d7966.entry.js +0 -1
- package/dist/bromcom-ui/p-4c58e86d.js +0 -1
- package/dist/bromcom-ui/p-505e1941.entry.js +0 -1
- package/dist/bromcom-ui/p-5f3c0fe2.js +0 -1
- package/dist/bromcom-ui/p-6b837324.entry.js +0 -1
- package/dist/bromcom-ui/p-8edb1b22.entry.js +0 -1
- package/dist/bromcom-ui/p-8f7c11ec.entry.js +0 -1
- package/dist/bromcom-ui/p-928f96c8.entry.js +0 -1
- package/dist/bromcom-ui/p-92e54288.entry.js +0 -1
- package/dist/bromcom-ui/p-af96a1b3.entry.js +0 -1
- package/dist/bromcom-ui/p-b607117b.entry.js +0 -1
- package/dist/bromcom-ui/p-b8124adb.entry.js +0 -1
- package/dist/bromcom-ui/p-c5cd31a0.js +0 -1
- package/dist/bromcom-ui/p-ce4907fc.entry.js +0 -1
- package/dist/bromcom-ui/p-ce78003c.js +0 -1
- package/dist/bromcom-ui/p-ded49e9d.entry.js +0 -1
- package/dist/bromcom-ui/p-e586a712.entry.js +0 -1
- package/dist/bromcom-ui/p-ebd87de3.entry.js +0 -1
- package/dist/bromcom-ui/p-f5d57ccd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as n}from"./p-9d960649.js";import{
|
|
1
|
+
import{h as n}from"./p-9d960649.js";import{B as a}from"./p-7e73190d.js";import{c as e}from"./p-7294ec8e.js";import{s}from"./p-6d018a8f.js";var i,t;!function(n){n.search="fal fa-search",n.email="fal fa-mail",n.tel="fal fa-phone",n.url="fal fa-link"}(i||(i={})),function(n){n[n.small=14]="small",n[n.medium=16]="medium",n[n.large=18]="large"}(t||(t={}));const l=({elementType:t,rows:l,id:c,internalId:o,type:r,placeholder:u,value:p,size:f,unit:d,unitPrefix:m,maxLength:x,disabled:b,clearable:h,focused:v,readonly:y,isPasswordVisible:g,passwordToggle:w,noDefaultIcon:z,inValid:C,captionType:j,resize:_,autocomplete:k,_suffix:I,_prefix:T,changePasswordVisibility:L,handleClear:B,steps:O,ref:P,handleBlur:V,handleFocus:F,handleInput:H,handleChange:M})=>{const D=a.HtmlElementType[t]||a.HtmlElementType.input;r="password"===r&&g?"text":r,p=s((()=>p),""),r=(null==d?void 0:d.length)>0&&!v?"text":r,p=v?p:p+(p&&(null==d?void 0:d.length)>0?" "+d:"");var q=e("bcm-input__container",D===a.HtmlElementType.textarea&&e("bcm-input__textarea","textarea-size-"+a.Size[f],"resize-"+_,"textarea-"+f),D===a.HtmlElementType.input&&e("input-size-"+a.Size[f]),{focused:v,clearable:h,disabled:b,readonly:y,invalid:C,unit:(null==d?void 0:d.length)>0,error:"error"===j});const A=e("caret-container",{unit:(null==d?void 0:d.length)>0,disabled:b||y||C}),E="large"===f?"size-3":"size-2",G=e(E,"unit-prefix");return n("div",{class:q},n("span",{hidden:!0},n("slot",null)),n("span",{class:"input-prefix"},n("slot",{name:"prefix"}),T&&T.length>0&&n("span",{innerHTML:T}),m&&n("span",{class:G},m)),n(D,Object.assign({tabindex:"1",id:c,"bcm-internal-id":o,class:"bcm-input-element "+E},D===a.HtmlElementType.input&&{type:r,autocomplete:k?"on":"off"},D===a.HtmlElementType.textarea&&{rows:l},{value:p,maxLength:x,placeholder:u,disabled:b,readOnly:y,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&&!b&&n("span",{class:"input-suffix input-suffix-button input-clear-button",onClick:n=>B(n)},n("bcm-icon",{icon:"fas fa-times-circle"}))),n("span",{class:"input-suffix-content"},("password"===r||"text"===r)&&w&&n("span",{class:"input-suffix input-suffix-button",onClick:()=>L()},n("bcm-icon",{icon:g?"far fa-eye-slash":"far fa-eye"}))),n("span",{class:"input-suffix-content"},Object.keys(i).includes(r)&&!z&&n("span",{class:"input-suffix"},n("bcm-icon",{icon:i[r]}))),n("span",{class:"input-suffix-content"},"number"===r&&n("div",{class:A},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"!==r&&n("span",{class:"input-suffix"},n("slot",{name:"suffix"}),I&&I.length>0&&n("span",{innerHTML:I}))))};export{l as I}
|
|
@@ -0,0 +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-124d8fc2.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-a69c842b.js";import{d}from"./p-a80ff3e5.js";import{I as o}from"./p-faaebe40.js";import{J as u}from"./p-bb6e1bdc.js";const{state:p}=r({value:new Map}),m=(t,e)=>{let s=[];return t&&(s=t.map((t=>Object.assign(Object.assign(Object.assign({},t),{parentId:h((()=>e),null)}),t.items&&t.items.length>0&&{items:h((()=>m(t.items,t.id)),[])})))),s},f=t=>h((()=>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(c.slugify(e.text).indexOf(c.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=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,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:h((()=>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 d(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(o,{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)}([u("data")],j.prototype,"data",void 0);export{j as bcm_search_2}
|
package/package.json
CHANGED
|
@@ -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"./p-112455b1.js";import{G as o}from"./p-118fb279.js";import"./p-7e73190d.js";import{s as d}from"./p-6d018a8f.js";import{S as l}from"./p-5f3c0fe2.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
|
-
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.7-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,o="append-area")=>{let c=o?document.querySelector(o):document.body;o&&!c&&(c=document.createElement("div"),c.id="append-area",document.body.appendChild(c),c.style.visibility="hidden",c.style.opacity="0");let n=document.getElementById(r.id);return n||(n=document.createElement(e)),Object.keys(r).forEach((e=>{n[e]=r[e]})),c.appendChild(n),n},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}
|