bromcom-ui 2.5.3-rc.20 → 2.5.3-rc.21
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-005aafea.entry.js +1 -0
- package/dist/bromcom-ui/{p-6a59ea7e.entry.js → p-0ff4f498.entry.js} +1 -1
- package/dist/bromcom-ui/{p-74916b30.entry.js → p-2cf97b10.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fe029bb5.entry.js → p-3351f4ac.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a7323c46.entry.js → p-41965ea2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d55981b2.entry.js → p-527dc5a0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-114f55ed.entry.js → p-57c6511a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-4081368d.js → p-695564fc.js} +1 -1
- package/dist/bromcom-ui/{p-74b43db3.entry.js → p-6e4edfef.entry.js} +1 -1
- package/dist/bromcom-ui/{p-80751c6b.entry.js → p-71bfac55.entry.js} +1 -1
- package/dist/bromcom-ui/{p-09096580.entry.js → p-7572365c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-d5ba8190.entry.js → p-88e56fb6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3053634d.entry.js → p-9144dc53.entry.js} +1 -1
- package/dist/bromcom-ui/{p-393e78f3.entry.js → p-97879d39.entry.js} +1 -1
- package/dist/bromcom-ui/p-993f0e94.entry.js +1 -0
- package/dist/bromcom-ui/{p-90ead831.entry.js → p-afda8593.entry.js} +1 -1
- package/dist/bromcom-ui/{p-ea8fdf87.entry.js → p-b7fb5df4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-eb26d4a5.entry.js → p-ba38362c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e37e1c63.entry.js → p-bd66ecc9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c9baa282.entry.js → p-c7bf7f38.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7d6dc63e.entry.js → p-d7bb7528.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bc282041.entry.js → p-e0c18821.entry.js} +1 -1
- package/dist/bromcom-ui/{p-aaba924c.entry.js → p-f093f680.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fa7f5509.js → p-f40664cf.js} +1 -1
- package/package.json +1 -1
- package/dist/bromcom-ui/p-096470e7.entry.js +0 -1
- package/dist/bromcom-ui/p-5be203c3.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as i,g as a}from"./p-74df82e2.js";import"./p-112455b1.js";import{c as h}from"./p-7294ec8e.js";import{G as c}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as i,g as a}from"./p-74df82e2.js";import"./p-112455b1.js";import{c as h}from"./p-7294ec8e.js";import{G as c}from"./p-f40664cf.js";import"./p-a5403cdb.js";import"./p-6d018a8f.js";import{A as p}from"./p-43a2dc90.js";import{s as r}from"./p-695564fc.js";const n=class{constructor(e){t(this,e),this.dataIsLoaded=s(this,"data-is-loaded",7),this.bcmChangeHidden=s(this,"bcm-change-hidden",7),this.hidden=!1,this._id=c.UID(),this.status="default",this.loading=!1,this.valid=!0,this.active=!1,this.isLast=!1,this.disabled=!1}componentDidLoad(){this.isLast&&this.dataIsLoaded.emit(!0)}getStepper(){return this.el.closest("bcm-stepper")||null}activeChanged(){if(this.active){const t=this.getStepper();t&&r.changeStepDisabled(t.id,this._id,!1)}}statusChange(){const t=this.getStepper();t&&r.changeStepStatus(t.id,this._id,this.status)}hiddenChange(t,s){const e=this.getStepper();t!==s&&e&&!this.active&&this.bcmChangeHidden.emit(!0)}render(){const{hidden:t,valid:s,active:a}=this,c=h("bcm-stepper__step",s?"bcm-stepper__step-valid":"bcm-stepper__step-invalid",{"bcm-stepper__step-active":a,hidden:t});return e(i,{class:c},e("slot",null))}get el(){return a(this)}static get watchers(){return{active:["activeChanged"],status:["statusChange"],hidden:["hiddenChange"]}}};!function(t,s,e,i){var a,h=arguments.length,c=h<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)c=Reflect.decorate(t,s,e,i);else for(var p=t.length-1;p>=0;p--)(a=t[p])&&(c=(h<3?a(c):h>3?a(s,e,c):a(s,e))||c);h>3&&c&&Object.defineProperty(s,e,c)}([p("title")],n.prototype,"_title",void 0);export{n as bcm_step}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,H as a,g as i}from"./p-74df82e2.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{G as n}from"./p-
|
|
1
|
+
import{r as t,c as s,h as e,H as a,g as i}from"./p-74df82e2.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{G as n}from"./p-f40664cf.js";import{a as l}from"./p-7e73190d.js";import{c as h}from"./p-a5403cdb.js";import{s as r}from"./p-6d018a8f.js";import{d as c}from"./p-84313244.js";import{S as d}from"./p-7ed3562c.js";import{I as o}from"./p-960bf518.js";import{J as u}from"./p-20d1fe2f.js";const{state:p}=h({value:new Map}),m=(t,s)=>{let e=[];return t&&(e=t.map((t=>Object.assign(Object.assign(Object.assign({},t),{parentId:r((()=>s),null)}),t.items&&t.items.length>0&&{items:r((()=>m(t.items,t.id)),[])})))),e},f=t=>r((()=>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(d.slugify(s.text).indexOf(d.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}},j=(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 b=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:r((()=>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 j(e,s),this.isActiveClearable=!1,this.bcmOnSearch.emit({result:null,value:null,matching:null,parentIndex:null}),this.bcmOnSearchClear.emit(t),await c(10),Promise.resolve()}onSearchValue(t,s){const{value:e,id:a}=t.target,i=(null==e?void 0:e.length)>=2?j(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")],b.prototype,"data",void 0);export{b as bcm_search_2}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{G as t}from"./p-
|
|
1
|
+
import{G as t}from"./p-f40664cf.js";import{c as e}from"./p-a5403cdb.js";import{s}from"./p-6d018a8f.js";const{state:a}=e({value:new Map,setData:{}}),c={removeState:t=>{a.value.delete(t)},getValue:t=>s((()=>a.value.get(t)),{}),setValue:e=>{const s=Object.assign(Object.assign({},e),{steps:e.steps&&e.steps.length>0&&e.steps.filter((t=>!t.hidden)).map(((s,a)=>({id:s.id||t.UID(),title:s.title||s._title||"Step "+(a+1),description:s.description||"",status:s.status||"default",disabled:e.linear?0!=a:s.disabled||!1,icon:s.icon||void 0,valid:s.valid||!0,loading:s.loading||!1,index:a+1,active:e.linear?0==a:e.active===a+1,isLast:a===e.steps.length-1,statusIcon:e.icon,headerHidden:s.hidden})))});a.value.set(e.id,s)},changeActiveStep:(t,e)=>{const s=a.value.get(t);s&&(s.active=e,s.steps=s.steps.map(((t,s)=>Object.assign(Object.assign({},t),{active:s===e-1}))))},getActiveIndex:t=>s((()=>a.value.get(t).active),0),changeStepStatus:(e,s,c)=>{const i=a.value.get(e);i&&i.steps&&(i.steps=i.steps.map((t=>Object.assign(Object.assign({},t),{status:t.id===s?c:t.status}))),i.el.tick=t.UID())},changeStepDisabled:(e,s,c)=>{const i=a.value.get(e);i&&i.steps&&(i.steps=i.steps.map((t=>Object.assign(Object.assign({},t),{disabled:t.id===s?c:t.disabled}))),i.el.tick=t.UID())},stepperReset:e=>{const s=a.value.get(e);s&&(s.active=1,s.steps=s.steps.map(((t,e)=>Object.assign(Object.assign({},t),{active:0===e,status:"default",disabled:0!==e,loading:!1}))),s.el.tick=t.UID())}};export{c as s}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as s,h as i,H as e}from"./p-74df82e2.js";import"./p-112455b1.js";import{c as h}from"./p-7294ec8e.js";import{G as a}from"./p-
|
|
1
|
+
import{r as t,c as s,h as i,H as e}from"./p-74df82e2.js";import"./p-112455b1.js";import{c as h}from"./p-7294ec8e.js";import{G as a}from"./p-f40664cf.js";import{a as r}from"./p-7e73190d.js";import"./p-6d018a8f.js";import{d as n}from"./p-84313244.js";import{C as l}from"./p-6d80e6e8.js";import{I as c}from"./p-960bf518.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 p=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=r.Status.default,this.rows=3,this.size=r.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(){this.caption=this.captionCache,this.captionType=this.captionTypeCache,this.captionError=null}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:p,disabled:d,clearable:u,label:m,focused:b,noCaption:f,caption:y,captionError:C,captionType:g,value:j,resize:w,maxLength:v,placeholder:B,required:x}=this,z=h("bcm-input",{hidden:s,"full-width":n});return i(e,{class:z},m&&i("bcm-label",{type:g,value:m,required:x,htmlFor:t}),i(c,{elementType:r.HtmlElementType.textarea,id:t,value:j,rows:p,disabled:d,maxLength:v,placeholder:B,clearable:u,resize:w,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:g,captionError:C,caption:y,value:j,maxLength:v}))}static get watchers(){return{value:["watchValue"]}}};export{p as bcm_textarea}
|