bromcom-ui 2.6.3-new-ds.0 → 2.6.3-new-ds.1
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-d48a8f83.entry.js → p-07a5ed64.entry.js} +1 -1
- package/dist/bromcom-ui/{p-71a83f4e.js → p-199b4a02.js} +1 -1
- package/dist/bromcom-ui/{p-4e9bac37.entry.js → p-1b9e11d9.entry.js} +1 -1
- package/dist/bromcom-ui/p-3d31ba07.entry.js +1 -0
- package/dist/bromcom-ui/{p-6b0beb02.entry.js → p-49dc8a2c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-79484032.entry.js → p-4bfbeaae.entry.js} +1 -1
- package/dist/bromcom-ui/{p-b414e783.entry.js → p-4c722bca.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7ba63e35.entry.js → p-4d9faa72.entry.js} +1 -1
- package/dist/bromcom-ui/{p-89805518.entry.js → p-4ef85f16.entry.js} +1 -1
- package/dist/bromcom-ui/{p-f72e7e82.entry.js → p-5e468abc.entry.js} +1 -1
- package/dist/bromcom-ui/{p-27734b80.entry.js → p-6250c2c2.entry.js} +1 -1
- package/dist/bromcom-ui/{p-082e82d2.entry.js → p-657f87c6.entry.js} +1 -1
- package/dist/bromcom-ui/{p-276615cc.entry.js → p-6a1d6c08.entry.js} +1 -1
- package/dist/bromcom-ui/{p-e3ccb280.entry.js → p-6c0c6fa0.entry.js} +1 -1
- package/dist/bromcom-ui/{p-fbd97b73.entry.js → p-70dd6c32.entry.js} +1 -1
- package/dist/bromcom-ui/{p-07aef975.entry.js → p-70f39ee9.entry.js} +1 -1
- package/dist/bromcom-ui/{p-638cf0e3.entry.js → p-7633e32f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-9b03f34e.entry.js → p-76f2ba63.entry.js} +1 -1
- package/dist/bromcom-ui/{p-14640d95.entry.js → p-7a9b630a.entry.js} +1 -1
- package/dist/bromcom-ui/{p-bc394d89.entry.js → p-7b34eaa7.entry.js} +1 -1
- package/dist/bromcom-ui/{p-373a1ef4.entry.js → p-7d6ba726.entry.js} +1 -1
- package/dist/bromcom-ui/{p-138fbaec.entry.js → p-7f0a486c.entry.js} +1 -1
- package/dist/bromcom-ui/{p-a578a6f0.entry.js → p-8a237502.entry.js} +1 -1
- package/dist/bromcom-ui/p-8afe6035.entry.js +1 -0
- package/dist/bromcom-ui/{p-bba86e15.entry.js → p-8e42feb5.entry.js} +1 -1
- package/dist/bromcom-ui/{p-861c1c38.entry.js → p-9194f1e4.entry.js} +1 -1
- package/dist/bromcom-ui/{p-c05b0867.entry.js → p-ad763d62.entry.js} +1 -1
- package/dist/bromcom-ui/{p-16c7679f.entry.js → p-afde331f.entry.js} +1 -1
- package/dist/bromcom-ui/{p-7b3bba17.entry.js → p-b561c673.entry.js} +1 -1
- package/dist/bromcom-ui/{p-009ea4ef.entry.js → p-b7c0b245.entry.js} +1 -1
- package/dist/bromcom-ui/{p-41845a80.entry.js → p-be2c6d35.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5c9027ac.entry.js → p-d2c5e3a8.entry.js} +1 -1
- package/dist/bromcom-ui/{p-8099c451.js → p-f73c9e38.js} +1 -1
- package/dist/bromcom-ui/{p-0d4564e3.entry.js → p-f7e56e22.entry.js} +1 -1
- package/dist/bromcom-ui/{p-3373816b.entry.js → p-f889c641.entry.js} +1 -1
- package/dist/bromcom-ui/{p-5efac4c9.entry.js → p-f98fa816.entry.js} +1 -1
- package/dist/bromcom-ui/{p-696e433b.entry.js → p-fbc50ad7.entry.js} +1 -1
- package/package.json +3 -2
- package/dist/bromcom-ui/p-054aad50.entry.js +0 -1
- package/dist/bromcom-ui/p-406a7903.entry.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bromcom-ui",
|
|
3
|
-
"version": "2.6.3-new-ds.
|
|
3
|
+
"version": "2.6.3-new-ds.1",
|
|
4
4
|
"description": "Stencil Component Starter",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
"build:prod": "stencil build --prod",
|
|
30
30
|
"generate:storybook": "npm run build && build-storybook -o ./storybook && npx cpy ./dist/bromcom-ui ./storybook/build",
|
|
31
31
|
"distRemove": "rm -rf ./dist/cjs && rm -rf ./dist/esm && rm -rf ./dist/types && rm -rf ./dist/collection && rm -r ./dist/index.cjs.js && rm -r ./dist/index.js",
|
|
32
|
-
"pre-version": "npm run build --prod && npm version prerelease --preid=rc && npm run build --prod && npm run distRemove"
|
|
32
|
+
"pre-version": "npm run build --prod && npm version prerelease --preid=rc && npm run build --prod && npm run distRemove",
|
|
33
|
+
"ds-version": "npm run build --prod && npm version prerelease --preid=new-ds && npm run build --prod && npm run distRemove"
|
|
33
34
|
},
|
|
34
35
|
"license": "MIT",
|
|
35
36
|
"devDependencies": {
|
|
@@ -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-8099c451.js";import"./p-112455b1.js";import"./p-7294ec8e.js";import{B as l}from"./p-af3de684.js";import{s as h}from"./p-6d018a8f.js";import{c as r}from"./p-a8b797d7.js";import{S as c}from"./p-66fbf8c0.js";import{J as d}from"./p-bb6e1bdc.js";import{d as o}from"./p-a80ff3e5.js";import{I as u}from"./p-9e7d3618.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)),{}),b=(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=b(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=b(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}},v=(t,s,e)=>{let a;a=e&&e.length>0?e:f(t).dataSource;let i=[];return a&&i.push(b(t,a,s)),{result:n.flatArray(i[0].result),matching:i[0].matching,parentIndex:i[0].parentIndex,nestedResult:i[0].nestedResult}};const j=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:h((()=>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 v(e,s),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,s){const{value:e,id:a}=t.target,i=(null==e?void 0:e.length)>=2?v(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(u,{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)}([d("data")],j.prototype,"data",void 0);export{j as bcm_search_2}
|