bromcom-ui 2.6.1 → 2.6.2-rc.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.esm.js +1 -1
- package/dist/bromcom-ui/{p-e1c5b617.entry.js → p-00548093.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b00c1dbe.entry.js → p-060d4830.entry.js} +1 -1
- package/dist/bromcom-ui/p-141a3020.entry.js +1 -0
- package/dist/bromcom-ui/{p-050b2d07.entry.js → p-15451ea8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bbec5360.entry.js → p-214f509f.entry.js} +1 -1
- package/dist/bromcom-ui/p-231f8e6e.entry.js +1 -0
- package/dist/bromcom-ui/p-24b2b16a.entry.js +1 -0
- package/dist/bromcom-ui/{p-1135694c.entry.js → p-2f83346d.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d5c3a496.entry.js → p-2fc3d7c4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d4e995eb.entry.js → p-31006673.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4077b465.entry.js → p-3253a7db.entry.js} +1 -1
- package/dist/bromcom-ui/{p-01dee921.entry.js → p-3b501ebc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bfd5a214.entry.js → p-4bbe0b4e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ace0f8b7.entry.js → p-5a003304.entry.js} +1 -1
- package/dist/bromcom-ui/{p-6b5b5227.entry.js → p-69abf1f9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c57cc7d3.entry.js → p-6eb857e2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f77560e8.entry.js → p-703b569b.entry.js} +1 -1
- package/dist/bromcom-ui/p-7d69ad88.entry.js +1 -0
- package/dist/bromcom-ui/{p-846e84d4.entry.js → p-887aaa28.entry.js} +1 -1
- package/dist/bromcom-ui/{p-426332ab.entry.js → p-8be6b27e.entry.js} +1 -1
- package/dist/bromcom-ui/{p-543f3646.entry.js → p-9831c2e5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7eab4590.entry.js → p-9ad319db.entry.js} +1 -1
- package/dist/bromcom-ui/p-adc6873e.js +1 -0
- package/dist/bromcom-ui/{p-647f59ca.entry.js → p-af88e6ae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c9ab4ee2.entry.js → p-c45140e8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-20af629a.entry.js → p-c6afbd41.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4acd9738.js → p-cf71c42c.js} +1 -1
- package/dist/bromcom-ui/{p-f921bca9.entry.js → p-e760cf4c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-08c714b2.entry.js → p-fa39a9d9.entry.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-125072fb.js +0 -1
- package/dist/bromcom-ui/p-3485be18.entry.js +0 -1
- package/dist/bromcom-ui/p-38c8d848.entry.js +0 -1
- package/dist/bromcom-ui/p-a5e90fbe.entry.js +0 -1
- package/dist/bromcom-ui/p-d2b0647b.entry.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
|
|
1
|
+
import{h as s,r as e,c as t,g as i}from"./p-9d960649.js";import{G as c}from"./p-adc6873e.js";import{B as o}from"./p-7e73190d.js";import"./p-112455b1.js";import{c as r}from"./p-7294ec8e.js";import"./p-6d018a8f.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:u,onDismiss:b,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",u,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((u===o.TagType.basic||u==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)},u===o.TagType.add&&s("span",{class:"left"},s("bcm-old-icon",{icon:"plus",type:"outlined",color:"grey-8",size:j})),u===o.TagType.checkable&&s("input",{type:"checkbox",checked:d}),s("span",{class:"value",style:i},p),u===o.TagType.dismissable&&s("span",{class:"right close-button",onClick:s=>b(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}
|
|
@@ -0,0 +1 @@
|
|
|
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.6.2-rc.0-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.composedPath()||e.path;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.composedPath()||e.path;if(o)return o.filter((e=>e.nodeName===r))[0]},c.findEventPath=(e,r)=>{r=Array.isArray(r)?r:[r];let o=e.composedPath()||e.path;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}
|
|
@@ -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-adc6873e.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}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e}from"./p-9d960649.js";import{G as
|
|
1
|
+
import{r as t,c as s,h as i,H as e}from"./p-9d960649.js";import{G as a}from"./p-adc6873e.js";import{B as h}from"./p-7e73190d.js";import"./p-112455b1.js";import{c as r}from"./p-7294ec8e.js";import"./p-6d018a8f.js";import{d as n}from"./p-a80ff3e5.js";import{C as l}from"./p-b43213d3.js";import{I as c}from"./p-faaebe40.js";var o;!function(t){t.none="none",t.both="both",t.horizontal="horizontal",t.vertical="vertical",t.initial="initial",t.inherit="inherit"}(o||(o={}));const d=class{constructor(i){t(this,i),this.focus=s(this,"bcm-focus",7),this.blur=s(this,"bcm-blur",7),this.clear=s(this,"bcm-clear",7),this.change=s(this,"bcm-change",7),this.input=s(this,"bcm-input",7),this._id=a.UID(),this._internal_id=a.UID(),this.hidden=!1,this.required=!1,this.noCaption=!1,this.captionType=h.Status.default,this.rows=3,this.size=h.Size.medium,this.readonly=!1,this.resize=o.vertical,this.fullWidth=!1,this.focused=!1}connectedCallback(){this.captionCache=this.caption,this.captionTypeCache=this.captionType}async onBcmFocus(){this.textarea.focus()}async onBcmBlur(){this.textarea.blur()}async onBcmSelect(){this.textarea.select()}async set(t){await this.setValue(t)}async get(){return this.value||null}async setValue(t){return this.textarea.value=t,this.value=t,this.handleChange(),t}async setClear(){return this.textarea.value="",this.value="",await n(10),Promise.resolve()}async resetCaption(){return await n(10),this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null,await n(10),Promise.resolve()}async getValue(){return this.value}watchValue(){this.handleChange()}handleFocus(){this.focused=!0,this.focus.emit()}handleBlur(){this.focused=!1,this.blur.emit()}handleChange(){this.value=this.textarea.value,this.change.emit(this.value)}handleInput(){this.value=this.textarea.value,this.input.emit(this.value)}handleClear(t){this.textarea.value="",this.value="",this.clear.emit(),this.textarea.focus(),t.stopPropagation()}render(){const{_id:t,hidden:s,readonly:a,fullWidth:n,size:o,rows:d,disabled:p,clearable:u,label:m,focused:b,noCaption:f,caption:y,captionError:w,captionType:C,value:g,resize:j,maxLength:v,placeholder:B,required:x}=this,z=r("bcm-input",{hidden:s,"full-width":n});return i(e,{class:z},m&&i("bcm-label",{type:C,value:m,required:x,htmlFor:t}),i(c,{elementType:h.HtmlElementType.textarea,id:t,value:g,rows:d,disabled:p,maxLength:v,placeholder:B,clearable:u,resize:j,readonly:a,size:o,focused:b,handleFocus:()=>this.handleFocus(),handleBlur:()=>this.handleBlur(),handleChange:()=>this.handleChange(),handleInput:()=>this.handleInput(),handleClear:t=>this.handleClear(t),ref:t=>this.textarea=t}),i(l,{noCaption:f,captionType:C,captionError:w,caption:y,value:g,maxLength:v}))}static get watchers(){return{value:["watchValue"]}}};export{d as bcm_textarea}
|